ranui 0.2.1-alpha.1 → 0.2.1-alpha.4
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/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
- package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
- package/dist/arc-D25LhgTs.cjs +1 -0
- package/dist/arc-DRPGof21.js +82 -0
- package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
- package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
- package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
- package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
- package/dist/array-By5736M5.js +7 -0
- package/dist/array-C3cbN3GY.cjs +1 -0
- package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
- package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
- package/dist/builder.d.ts +2 -2
- package/dist/builder.js +39 -34
- package/dist/{builtin-D9djWkCE.js → builtin-1lUEp_ro.js} +83 -76
- package/dist/button-Cj-XSCsd.js +117 -0
- package/dist/button.js +1 -1
- package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
- package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
- package/dist/{card-CqJa4Q_v.js → card-BHN9Xp4S.js} +2 -2
- package/dist/card.js +1 -1
- package/dist/channel-C9WSNwcS.cjs +1 -0
- package/dist/channel-k5-UxdcV.js +5 -0
- package/dist/{checkbox-CThC9-vy.js → checkbox-O_J_n1_W.js} +10 -10
- package/dist/checkbox.js +1 -1
- package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
- package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
- package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
- package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
- package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
- package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
- package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
- package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
- package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
- package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
- package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
- package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
- package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
- package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
- package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
- package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
- package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
- package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
- package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
- package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
- package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
- package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
- package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
- package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
- package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
- package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
- package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
- package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
- package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
- package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
- package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
- package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
- package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
- package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
- package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
- package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
- package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
- package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
- package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
- package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
- package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
- package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
- package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
- package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
- package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
- package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
- package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
- package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
- package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
- package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
- package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
- package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
- package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
- package/dist/{colorpicker-XNxDRcQ-.js → colorpicker-mebH0XLm.js} +8 -8
- package/dist/colorpicker.js +1 -1
- package/dist/components/glass/index.d.ts +52 -0
- package/dist/components/icon/core-icons.d.ts +13 -0
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/mermaid/index.d.ts +52 -0
- package/dist/components/modal/index.d.ts +9 -0
- package/dist/content-YOKzMoc7.js +39 -0
- package/dist/content.js +5 -0
- package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
- package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
- package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
- package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
- package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
- package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
- package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
- package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
- package/dist/dagre-D1-W1tt6.cjs +1 -0
- package/dist/dagre-D8GLTwuf.js +1578 -0
- package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
- package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
- package/dist/defaultLocale-0M_kMcEH.js +184 -0
- package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
- package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
- package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
- package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
- package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
- package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
- package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
- package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
- package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
- package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
- package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
- package/dist/dist-C0Fwsvsq.js +70 -0
- package/dist/dist-C20XxSsP.cjs +1 -0
- package/dist/{dropdown-CCvsambb.js → dropdown-CzGAVWYC.js} +4 -4
- package/dist/dropdown.js +1 -1
- package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
- package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
- package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
- package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
- package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
- package/dist/factory-ZNhcQ4tf.js +482 -0
- package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
- package/dist/{form-Ceq3uJzz.js → form-B8afuJlF.js} +5 -5
- package/dist/form.js +1 -1
- package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
- package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
- package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
- package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
- package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
- package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
- package/dist/glass-BniIptBE.js +115 -0
- package/dist/glass.js +5 -0
- package/dist/graphlib-CCKThIKP.js +1104 -0
- package/dist/graphlib-Du-578Js.cjs +1 -0
- package/dist/{icon-C_ENrJ3F.js → icon-GZrfSeon.js} +77 -25
- package/dist/icon.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/iife/button.iife.js +1 -1
- package/dist/iife/card.iife.js +1 -1
- package/dist/iife/checkbox.iife.js +1 -1
- package/dist/iife/colorpicker.iife.js +2 -2
- package/dist/iife/content.iife.js +1 -0
- package/dist/iife/dropdown.iife.js +1 -1
- package/dist/iife/form.iife.js +1 -1
- package/dist/iife/glass.iife.js +1 -0
- package/dist/iife/icon.iife.js +1 -1
- package/dist/iife/image.iife.js +1 -1
- package/dist/iife/input.iife.js +1 -1
- package/dist/iife/loading.iife.js +1 -1
- package/dist/iife/math.iife.js +14 -14
- package/dist/iife/mermaid.iife.js +3535 -0
- package/dist/iife/message.iife.js +1 -1
- package/dist/iife/modal.iife.js +1 -1
- package/dist/iife/player.iife.js +8 -8
- package/dist/iife/popover.iife.js +1 -1
- package/dist/iife/progress.iife.js +1 -1
- package/dist/iife/radar.iife.js +1 -1
- package/dist/iife/route.iife.js +1 -1
- package/dist/iife/router.iife.js +1 -1
- package/dist/iife/scratch.iife.js +1 -1
- package/dist/iife/section.iife.js +1 -1
- package/dist/iife/select.iife.js +2 -2
- package/dist/iife/skeleton.iife.js +1 -1
- package/dist/iife/tab.iife.js +1 -1
- package/dist/iife/tabpane.iife.js +1 -1
- package/dist/iife/theme-switch.iife.js +1 -1
- package/dist/{image-B7MBI5n_.js → image-CqoQfJoV.js} +4 -4
- package/dist/image.js +1 -1
- package/dist/index.cjs +38 -37
- package/dist/index.d.ts +8 -0
- package/dist/index.iife.js +3623 -88
- package/dist/index.js +88 -84
- package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
- package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
- package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
- package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
- package/dist/init-1VpIn1S3.js +16 -0
- package/dist/init-CbDwVtpO.cjs +1 -0
- package/dist/{input-RNqdEHPf.js → input-BlwAXu7I.js} +6 -6
- package/dist/input.js +1 -1
- package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
- package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
- package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
- package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
- package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
- package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
- package/dist/katex-Cq3Y8cmK.cjs +257 -0
- package/dist/katex-Pg2EqTH0.js +23485 -0
- package/dist/line-BIPmUVxO.js +33 -0
- package/dist/line-CAB5QHC6.cjs +1 -0
- package/dist/linear-B2AM4ZBe.js +259 -0
- package/dist/linear-CSAfNEpl.cjs +1 -0
- package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
- package/dist/link.js +1 -1
- package/dist/{loading-B9MFI03l.js → loading-M6gWxLbm.js} +4 -4
- package/dist/loading.js +1 -1
- package/dist/map-BC2bk_rV.cjs +1 -0
- package/dist/map-DMSWkcq6.js +208 -0
- package/dist/{math-CudIwEXZ.js → math-8E-45Y8e.js} +4 -4
- package/dist/math.js +1 -1
- package/dist/mermaid-C1oQyPE3.js +261 -0
- package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
- package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
- package/dist/mermaid.core-B2d5lQW2.js +1085 -0
- package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
- package/dist/mermaid.js +5 -0
- package/dist/{message-DW7qWpEm.js → message-CNdmbeLf.js} +6 -6
- package/dist/message.js +1 -1
- package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
- package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
- package/dist/{modal-CrvGKL2B.js → modal-gRagDkTb.js} +40 -24
- package/dist/modal.js +1 -1
- package/dist/ordinal-BMN81JG2.js +64 -0
- package/dist/ordinal-BplLHIij.cjs +1 -0
- package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
- package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
- package/dist/path-Bja5PoYn.js +82 -0
- package/dist/path-DmfWsuKi.cjs +1 -0
- package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
- package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
- package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
- package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
- package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
- package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
- package/dist/{player-BKQaaT7o.js → player-CAQ5Og2P.js} +196 -195
- package/dist/player.js +1 -1
- package/dist/{popover-CvYIVgUS.js → popover-BZKSLe3D.js} +22 -54
- package/dist/popover.js +1 -1
- package/dist/{progress-C6jctsFH.js → progress-vk40tuhm.js} +5 -5
- package/dist/progress.js +1 -1
- package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
- package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
- package/dist/{radar-BUb4EzmG.js → radar-Bg0cexzU.js} +5 -5
- package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
- package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
- package/dist/radar.js +1 -1
- package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
- package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
- package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
- package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
- package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
- package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
- package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
- package/dist/ranui.css +1 -1
- package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
- package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
- package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
- package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
- package/dist/rough.esm-BWe9E0Nz.js +1387 -0
- package/dist/rough.esm-BfSi6CZE.cjs +1 -0
- package/dist/{route-Djrf9UR_.js → route-CGwS0cd_.js} +10 -10
- package/dist/route.js +1 -1
- package/dist/{router-BU2KhtxV.js → router-BK6DEkcN.js} +5 -5
- package/dist/router.js +1 -1
- package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
- package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
- package/dist/{scratch-CO4I2dIa.js → scratch-ClF1awGi.js} +2 -2
- package/dist/scratch.js +1 -1
- package/dist/{section-CsUkp8bv.js → section-BL0V7Kjf.js} +2 -2
- package/dist/section.js +1 -1
- package/dist/{select-Dn26ajJZ.js → select-BIFVbQIj.js} +13 -13
- package/dist/select.js +1 -1
- package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
- package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
- package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
- package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
- package/dist/{skeleton-BuMLhvzQ.js → skeleton-D7JIbROq.js} +5 -5
- package/dist/skeleton.js +1 -1
- package/dist/src-C9EhKhbk.cjs +1 -0
- package/dist/src-DtRLxcYO.js +2104 -0
- package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
- package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
- package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
- package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
- package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
- package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
- package/dist/{tab-40fDkuox.js → tab-DFVtDJb2.js} +5 -5
- package/dist/tab.js +1 -1
- package/dist/{tabpane-F4Pd7JtC.js → tabpane-C3qZGN-D.js} +5 -5
- package/dist/tabpane.js +1 -1
- package/dist/test/ssr/stream.test.d.ts +1 -0
- package/dist/{theme-switch-B09egc6h.js → theme-switch-BXNH5uPD.js} +45 -45
- package/dist/theme-switch.js +1 -1
- package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
- package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
- package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
- package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
- package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
- package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
- package/dist/utils/builder/core.d.ts +135 -3
- package/dist/utils/builder/index.d.ts +1 -1
- package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
- package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
- package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
- package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
- package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
- package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
- package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
- package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
- package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
- package/docs/BUILDER.md +170 -2
- package/package.json +7 -1
- package/dist/button-BfYw0fes.js +0 -117
- package/dist/factory-DCrO37si.js +0 -334
|
@@ -0,0 +1,3321 @@
|
|
|
1
|
+
import { n as u } from "./chunk-Y2CYZVJY-0JxdZxki.js";
|
|
2
|
+
import { m as L, p as T } from "./src-DtRLxcYO.js";
|
|
3
|
+
import { O as fe, T as M, a as pe, b as et, c as xe, it as ye, s as be, x as C, z as Ct } from "./chunk-WYO6CB5R-DDHkKowO.js";
|
|
4
|
+
import { t as me } from "./channel-k5-UxdcV.js";
|
|
5
|
+
import { A as we, B as Se, C as Le, D as ke, E as ve, F as Ee, G as Ut, H as _e, I as Te, L as De, M as Ne, N as Ie, O as Be, P as Oe, R as Ce, T as Re, U as Ae, V as ze, W as Me, a as Rt, b as Pe, et as Fe, g as J, j as We, k as Ye, l as He, v as Ke, w as Ue, z as Xe } from "./chunk-ICXQ74PX-DR8rL-xF.js";
|
|
6
|
+
import { t as Ve } from "./line-BIPmUVxO.js";
|
|
7
|
+
import "./chunk-HOUHSVGY-DRQcQeMT.js";
|
|
8
|
+
import { n as _t } from "./chunk-Q4XR5HBZ-3BHjjc9u.js";
|
|
9
|
+
import { t as je } from "./chunk-5VM5RSS4-Cni2Ogq2.js";
|
|
10
|
+
import { n as Ge, t as Q } from "./chunk-7BUUIJ7U-9hiBbc7O.js";
|
|
11
|
+
import { n as Ze, t as qe } from "./chunk-OGEWGWER-BV51ll2w.js";
|
|
12
|
+
import { t as Je } from "./graphlib-CCKThIKP.js";
|
|
13
|
+
function Qe(e) {
|
|
14
|
+
return Array.isArray(e);
|
|
15
|
+
}
|
|
16
|
+
function $e(e) {
|
|
17
|
+
if (Pe(e)) return e;
|
|
18
|
+
const t = Ut(e);
|
|
19
|
+
if (!tr(e)) return {};
|
|
20
|
+
if (Qe(e)) {
|
|
21
|
+
const n = Array.from(e);
|
|
22
|
+
return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (n.index = e.index, n.input = e.input), n;
|
|
23
|
+
}
|
|
24
|
+
if (Ke(e)) {
|
|
25
|
+
const n = e, s = n.constructor;
|
|
26
|
+
return new s(n.buffer, n.byteOffset, n.length);
|
|
27
|
+
}
|
|
28
|
+
if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
|
|
29
|
+
if (t === "[object DataView]") {
|
|
30
|
+
const n = e, s = n.buffer, i = n.byteOffset, a = n.byteLength, c = new ArrayBuffer(a), l = new Uint8Array(s, i, a);
|
|
31
|
+
return new Uint8Array(c).set(l), new DataView(c);
|
|
32
|
+
}
|
|
33
|
+
if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
|
|
34
|
+
const n = e.constructor, s = new n(e.valueOf());
|
|
35
|
+
return t === "[object String]" ? rr(s, e) : yt(s, e), s;
|
|
36
|
+
}
|
|
37
|
+
if (t === "[object Date]") return new Date(Number(e));
|
|
38
|
+
if (t === "[object RegExp]") {
|
|
39
|
+
const n = e, s = new RegExp(n.source, n.flags);
|
|
40
|
+
return s.lastIndex = n.lastIndex, s;
|
|
41
|
+
}
|
|
42
|
+
if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
|
|
43
|
+
if (t === "[object Map]") {
|
|
44
|
+
const n = e, s = /* @__PURE__ */ new Map();
|
|
45
|
+
return n.forEach((i, a) => {
|
|
46
|
+
s.set(a, i);
|
|
47
|
+
}), s;
|
|
48
|
+
}
|
|
49
|
+
if (t === "[object Set]") {
|
|
50
|
+
const n = e, s = /* @__PURE__ */ new Set();
|
|
51
|
+
return n.forEach((i) => {
|
|
52
|
+
s.add(i);
|
|
53
|
+
}), s;
|
|
54
|
+
}
|
|
55
|
+
if (t === "[object Arguments]") {
|
|
56
|
+
const n = e, s = {};
|
|
57
|
+
return yt(s, n), s.length = n.length, s[Symbol.iterator] = n[Symbol.iterator], s;
|
|
58
|
+
}
|
|
59
|
+
const r = {};
|
|
60
|
+
return ar(r, e), yt(r, e), er(r, e), r;
|
|
61
|
+
}
|
|
62
|
+
function tr(e) {
|
|
63
|
+
switch (Ut(e)) {
|
|
64
|
+
case Le:
|
|
65
|
+
case Re:
|
|
66
|
+
case Ue:
|
|
67
|
+
case ke:
|
|
68
|
+
case ve:
|
|
69
|
+
case Be:
|
|
70
|
+
case Ye:
|
|
71
|
+
case we:
|
|
72
|
+
case Ie:
|
|
73
|
+
case We:
|
|
74
|
+
case Ne:
|
|
75
|
+
case Oe:
|
|
76
|
+
case Ee:
|
|
77
|
+
case Te:
|
|
78
|
+
case De:
|
|
79
|
+
case Ce:
|
|
80
|
+
case Xe:
|
|
81
|
+
case Se:
|
|
82
|
+
case Ae:
|
|
83
|
+
case Me:
|
|
84
|
+
case ze:
|
|
85
|
+
case _e:
|
|
86
|
+
return !0;
|
|
87
|
+
default:
|
|
88
|
+
return !1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function yt(e, t) {
|
|
92
|
+
for (const r in t) Object.hasOwn(t, r) && (e[r] = t[r]);
|
|
93
|
+
}
|
|
94
|
+
function er(e, t) {
|
|
95
|
+
const r = Object.getOwnPropertySymbols(t);
|
|
96
|
+
for (let n = 0; n < r.length; n++) {
|
|
97
|
+
const s = r[n];
|
|
98
|
+
Object.prototype.propertyIsEnumerable.call(t, s) && (e[s] = t[s]);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function rr(e, t) {
|
|
102
|
+
const r = t.valueOf().length;
|
|
103
|
+
for (const n in t) Object.hasOwn(t, n) && (Number.isNaN(Number(n)) || Number(n) >= r) && (e[n] = t[n]);
|
|
104
|
+
}
|
|
105
|
+
function ar(e, t) {
|
|
106
|
+
const r = Object.getPrototypeOf(t);
|
|
107
|
+
r !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, r);
|
|
108
|
+
}
|
|
109
|
+
var mt = (function() {
|
|
110
|
+
var e = /* @__PURE__ */ u(function(w, f, b, E) {
|
|
111
|
+
for (b = b || {}, E = w.length; E--; b[w[E]] = f) ;
|
|
112
|
+
return b;
|
|
113
|
+
}, "o"), t = [1, 15], r = [1, 7], n = [1, 13], s = [1, 14], i = [1, 19], a = [1, 16], c = [1, 17], l = [1, 18], g = [8, 30], o = [
|
|
114
|
+
8,
|
|
115
|
+
10,
|
|
116
|
+
21,
|
|
117
|
+
28,
|
|
118
|
+
29,
|
|
119
|
+
30,
|
|
120
|
+
31,
|
|
121
|
+
39,
|
|
122
|
+
43,
|
|
123
|
+
46
|
|
124
|
+
], d = [1, 23], x = [1, 24], m = [
|
|
125
|
+
8,
|
|
126
|
+
10,
|
|
127
|
+
15,
|
|
128
|
+
16,
|
|
129
|
+
21,
|
|
130
|
+
28,
|
|
131
|
+
29,
|
|
132
|
+
30,
|
|
133
|
+
31,
|
|
134
|
+
39,
|
|
135
|
+
43,
|
|
136
|
+
46
|
|
137
|
+
], y = [
|
|
138
|
+
8,
|
|
139
|
+
10,
|
|
140
|
+
15,
|
|
141
|
+
16,
|
|
142
|
+
21,
|
|
143
|
+
27,
|
|
144
|
+
28,
|
|
145
|
+
29,
|
|
146
|
+
30,
|
|
147
|
+
31,
|
|
148
|
+
39,
|
|
149
|
+
43,
|
|
150
|
+
46
|
|
151
|
+
], v = [1, 49], S = {
|
|
152
|
+
trace: /* @__PURE__ */ u(function() {
|
|
153
|
+
}, "trace"),
|
|
154
|
+
yy: {},
|
|
155
|
+
symbols_: {
|
|
156
|
+
error: 2,
|
|
157
|
+
spaceLines: 3,
|
|
158
|
+
SPACELINE: 4,
|
|
159
|
+
NL: 5,
|
|
160
|
+
separator: 6,
|
|
161
|
+
SPACE: 7,
|
|
162
|
+
EOF: 8,
|
|
163
|
+
start: 9,
|
|
164
|
+
BLOCK_DIAGRAM_KEY: 10,
|
|
165
|
+
document: 11,
|
|
166
|
+
stop: 12,
|
|
167
|
+
statement: 13,
|
|
168
|
+
link: 14,
|
|
169
|
+
LINK: 15,
|
|
170
|
+
START_LINK: 16,
|
|
171
|
+
LINK_LABEL: 17,
|
|
172
|
+
STR: 18,
|
|
173
|
+
nodeStatement: 19,
|
|
174
|
+
columnsStatement: 20,
|
|
175
|
+
SPACE_BLOCK: 21,
|
|
176
|
+
blockStatement: 22,
|
|
177
|
+
classDefStatement: 23,
|
|
178
|
+
cssClassStatement: 24,
|
|
179
|
+
styleStatement: 25,
|
|
180
|
+
node: 26,
|
|
181
|
+
SIZE: 27,
|
|
182
|
+
COLUMNS: 28,
|
|
183
|
+
"id-block": 29,
|
|
184
|
+
end: 30,
|
|
185
|
+
NODE_ID: 31,
|
|
186
|
+
nodeShapeNLabel: 32,
|
|
187
|
+
dirList: 33,
|
|
188
|
+
DIR: 34,
|
|
189
|
+
NODE_DSTART: 35,
|
|
190
|
+
NODE_DEND: 36,
|
|
191
|
+
BLOCK_ARROW_START: 37,
|
|
192
|
+
BLOCK_ARROW_END: 38,
|
|
193
|
+
classDef: 39,
|
|
194
|
+
CLASSDEF_ID: 40,
|
|
195
|
+
CLASSDEF_STYLEOPTS: 41,
|
|
196
|
+
DEFAULT: 42,
|
|
197
|
+
class: 43,
|
|
198
|
+
CLASSENTITY_IDS: 44,
|
|
199
|
+
STYLECLASS: 45,
|
|
200
|
+
style: 46,
|
|
201
|
+
STYLE_ENTITY_IDS: 47,
|
|
202
|
+
STYLE_DEFINITION_DATA: 48,
|
|
203
|
+
$accept: 0,
|
|
204
|
+
$end: 1
|
|
205
|
+
},
|
|
206
|
+
terminals_: {
|
|
207
|
+
2: "error",
|
|
208
|
+
4: "SPACELINE",
|
|
209
|
+
5: "NL",
|
|
210
|
+
7: "SPACE",
|
|
211
|
+
8: "EOF",
|
|
212
|
+
10: "BLOCK_DIAGRAM_KEY",
|
|
213
|
+
15: "LINK",
|
|
214
|
+
16: "START_LINK",
|
|
215
|
+
17: "LINK_LABEL",
|
|
216
|
+
18: "STR",
|
|
217
|
+
21: "SPACE_BLOCK",
|
|
218
|
+
27: "SIZE",
|
|
219
|
+
28: "COLUMNS",
|
|
220
|
+
29: "id-block",
|
|
221
|
+
30: "end",
|
|
222
|
+
31: "NODE_ID",
|
|
223
|
+
34: "DIR",
|
|
224
|
+
35: "NODE_DSTART",
|
|
225
|
+
36: "NODE_DEND",
|
|
226
|
+
37: "BLOCK_ARROW_START",
|
|
227
|
+
38: "BLOCK_ARROW_END",
|
|
228
|
+
39: "classDef",
|
|
229
|
+
40: "CLASSDEF_ID",
|
|
230
|
+
41: "CLASSDEF_STYLEOPTS",
|
|
231
|
+
42: "DEFAULT",
|
|
232
|
+
43: "class",
|
|
233
|
+
44: "CLASSENTITY_IDS",
|
|
234
|
+
45: "STYLECLASS",
|
|
235
|
+
46: "style",
|
|
236
|
+
47: "STYLE_ENTITY_IDS",
|
|
237
|
+
48: "STYLE_DEFINITION_DATA"
|
|
238
|
+
},
|
|
239
|
+
productions_: [
|
|
240
|
+
0,
|
|
241
|
+
[3, 1],
|
|
242
|
+
[3, 2],
|
|
243
|
+
[3, 2],
|
|
244
|
+
[6, 1],
|
|
245
|
+
[6, 1],
|
|
246
|
+
[6, 1],
|
|
247
|
+
[9, 3],
|
|
248
|
+
[12, 1],
|
|
249
|
+
[12, 1],
|
|
250
|
+
[12, 2],
|
|
251
|
+
[12, 2],
|
|
252
|
+
[11, 1],
|
|
253
|
+
[11, 2],
|
|
254
|
+
[14, 1],
|
|
255
|
+
[14, 4],
|
|
256
|
+
[13, 1],
|
|
257
|
+
[13, 1],
|
|
258
|
+
[13, 1],
|
|
259
|
+
[13, 1],
|
|
260
|
+
[13, 1],
|
|
261
|
+
[13, 1],
|
|
262
|
+
[13, 1],
|
|
263
|
+
[19, 3],
|
|
264
|
+
[19, 2],
|
|
265
|
+
[19, 1],
|
|
266
|
+
[20, 1],
|
|
267
|
+
[22, 4],
|
|
268
|
+
[22, 3],
|
|
269
|
+
[26, 1],
|
|
270
|
+
[26, 2],
|
|
271
|
+
[33, 1],
|
|
272
|
+
[33, 2],
|
|
273
|
+
[32, 3],
|
|
274
|
+
[32, 4],
|
|
275
|
+
[23, 3],
|
|
276
|
+
[23, 3],
|
|
277
|
+
[24, 3],
|
|
278
|
+
[25, 3]
|
|
279
|
+
],
|
|
280
|
+
performAction: /* @__PURE__ */ u(function(f, b, E, k, _, h, P) {
|
|
281
|
+
var p = h.length - 1;
|
|
282
|
+
switch (_) {
|
|
283
|
+
case 4:
|
|
284
|
+
k.getLogger().debug("Rule: separator (NL) ");
|
|
285
|
+
break;
|
|
286
|
+
case 5:
|
|
287
|
+
k.getLogger().debug("Rule: separator (Space) ");
|
|
288
|
+
break;
|
|
289
|
+
case 6:
|
|
290
|
+
k.getLogger().debug("Rule: separator (EOF) ");
|
|
291
|
+
break;
|
|
292
|
+
case 7:
|
|
293
|
+
k.getLogger().debug("Rule: hierarchy: ", h[p - 1]), k.setHierarchy(h[p - 1]);
|
|
294
|
+
break;
|
|
295
|
+
case 8:
|
|
296
|
+
k.getLogger().debug("Stop NL ");
|
|
297
|
+
break;
|
|
298
|
+
case 9:
|
|
299
|
+
k.getLogger().debug("Stop EOF ");
|
|
300
|
+
break;
|
|
301
|
+
case 10:
|
|
302
|
+
k.getLogger().debug("Stop NL2 ");
|
|
303
|
+
break;
|
|
304
|
+
case 11:
|
|
305
|
+
k.getLogger().debug("Stop EOF2 ");
|
|
306
|
+
break;
|
|
307
|
+
case 12:
|
|
308
|
+
k.getLogger().debug("Rule: statement: ", h[p]), typeof h[p].length == "number" ? this.$ = h[p] : this.$ = [h[p]];
|
|
309
|
+
break;
|
|
310
|
+
case 13:
|
|
311
|
+
k.getLogger().debug("Rule: statement #2: ", h[p - 1]), this.$ = [h[p - 1]].concat(h[p]);
|
|
312
|
+
break;
|
|
313
|
+
case 14:
|
|
314
|
+
k.getLogger().debug("Rule: link: ", h[p], f), this.$ = {
|
|
315
|
+
edgeTypeStr: h[p],
|
|
316
|
+
label: ""
|
|
317
|
+
};
|
|
318
|
+
break;
|
|
319
|
+
case 15:
|
|
320
|
+
k.getLogger().debug("Rule: LABEL link: ", h[p - 3], h[p - 1], h[p]), this.$ = {
|
|
321
|
+
edgeTypeStr: h[p],
|
|
322
|
+
label: h[p - 1]
|
|
323
|
+
};
|
|
324
|
+
break;
|
|
325
|
+
case 18:
|
|
326
|
+
const B = parseInt(h[p]), j = k.generateId();
|
|
327
|
+
this.$ = {
|
|
328
|
+
id: j,
|
|
329
|
+
type: "space",
|
|
330
|
+
label: "",
|
|
331
|
+
width: B,
|
|
332
|
+
children: []
|
|
333
|
+
};
|
|
334
|
+
break;
|
|
335
|
+
case 23:
|
|
336
|
+
k.getLogger().debug("Rule: (nodeStatement link node) ", h[p - 2], h[p - 1], h[p], " typestr: ", h[p - 1].edgeTypeStr);
|
|
337
|
+
const X = k.edgeStrToEdgeData(h[p - 1].edgeTypeStr), ht = k.edgeStrToEdgeStartData(h[p - 1].edgeTypeStr), rt = k.edgeStrToThickness(h[p - 1].edgeTypeStr), gt = k.edgeStrToPattern(h[p - 1].edgeTypeStr);
|
|
338
|
+
this.$ = [
|
|
339
|
+
{
|
|
340
|
+
id: h[p - 2].id,
|
|
341
|
+
label: h[p - 2].label,
|
|
342
|
+
type: h[p - 2].type,
|
|
343
|
+
directions: h[p - 2].directions
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: h[p - 2].id + "-" + h[p].id,
|
|
347
|
+
start: h[p - 2].id,
|
|
348
|
+
end: h[p].id,
|
|
349
|
+
label: h[p - 1].label,
|
|
350
|
+
type: "edge",
|
|
351
|
+
thickness: rt,
|
|
352
|
+
pattern: gt,
|
|
353
|
+
directions: h[p].directions,
|
|
354
|
+
arrowTypeEnd: X,
|
|
355
|
+
arrowTypeStart: ht
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: h[p].id,
|
|
359
|
+
label: h[p].label,
|
|
360
|
+
type: k.typeStr2Type(h[p].typeStr),
|
|
361
|
+
directions: h[p].directions
|
|
362
|
+
}
|
|
363
|
+
];
|
|
364
|
+
break;
|
|
365
|
+
case 24:
|
|
366
|
+
k.getLogger().debug("Rule: nodeStatement (abc88 node size) ", h[p - 1], h[p]), this.$ = {
|
|
367
|
+
id: h[p - 1].id,
|
|
368
|
+
label: h[p - 1].label,
|
|
369
|
+
type: k.typeStr2Type(h[p - 1].typeStr),
|
|
370
|
+
directions: h[p - 1].directions,
|
|
371
|
+
widthInColumns: parseInt(h[p], 10)
|
|
372
|
+
};
|
|
373
|
+
break;
|
|
374
|
+
case 25:
|
|
375
|
+
k.getLogger().debug("Rule: nodeStatement (node) ", h[p]), this.$ = {
|
|
376
|
+
id: h[p].id,
|
|
377
|
+
label: h[p].label,
|
|
378
|
+
type: k.typeStr2Type(h[p].typeStr),
|
|
379
|
+
directions: h[p].directions,
|
|
380
|
+
widthInColumns: 1
|
|
381
|
+
};
|
|
382
|
+
break;
|
|
383
|
+
case 26:
|
|
384
|
+
k.getLogger().debug("APA123", this ? this : "na"), k.getLogger().debug("COLUMNS: ", h[p]), this.$ = {
|
|
385
|
+
type: "column-setting",
|
|
386
|
+
columns: h[p] === "auto" ? -1 : parseInt(h[p])
|
|
387
|
+
};
|
|
388
|
+
break;
|
|
389
|
+
case 27:
|
|
390
|
+
k.getLogger().debug("Rule: id-block statement : ", h[p - 2], h[p - 1]), k.generateId(), this.$ = {
|
|
391
|
+
...h[p - 2],
|
|
392
|
+
type: "composite",
|
|
393
|
+
children: h[p - 1]
|
|
394
|
+
};
|
|
395
|
+
break;
|
|
396
|
+
case 28:
|
|
397
|
+
k.getLogger().debug("Rule: blockStatement : ", h[p - 2], h[p - 1], h[p]);
|
|
398
|
+
const O = k.generateId();
|
|
399
|
+
this.$ = {
|
|
400
|
+
id: O,
|
|
401
|
+
type: "composite",
|
|
402
|
+
label: "",
|
|
403
|
+
children: h[p - 1]
|
|
404
|
+
};
|
|
405
|
+
break;
|
|
406
|
+
case 29:
|
|
407
|
+
k.getLogger().debug("Rule: node (NODE_ID separator): ", h[p]), this.$ = { id: h[p] };
|
|
408
|
+
break;
|
|
409
|
+
case 30:
|
|
410
|
+
k.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", h[p - 1], h[p]), this.$ = {
|
|
411
|
+
id: h[p - 1],
|
|
412
|
+
label: h[p].label,
|
|
413
|
+
typeStr: h[p].typeStr,
|
|
414
|
+
directions: h[p].directions
|
|
415
|
+
};
|
|
416
|
+
break;
|
|
417
|
+
case 31:
|
|
418
|
+
k.getLogger().debug("Rule: dirList: ", h[p]), this.$ = [h[p]];
|
|
419
|
+
break;
|
|
420
|
+
case 32:
|
|
421
|
+
k.getLogger().debug("Rule: dirList: ", h[p - 1], h[p]), this.$ = [h[p - 1]].concat(h[p]);
|
|
422
|
+
break;
|
|
423
|
+
case 33:
|
|
424
|
+
k.getLogger().debug("Rule: nodeShapeNLabel: ", h[p - 2], h[p - 1], h[p]), this.$ = {
|
|
425
|
+
typeStr: h[p - 2] + h[p],
|
|
426
|
+
label: h[p - 1]
|
|
427
|
+
};
|
|
428
|
+
break;
|
|
429
|
+
case 34:
|
|
430
|
+
k.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", h[p - 3], h[p - 2], " #3:", h[p - 1], h[p]), this.$ = {
|
|
431
|
+
typeStr: h[p - 3] + h[p],
|
|
432
|
+
label: h[p - 2],
|
|
433
|
+
directions: h[p - 1]
|
|
434
|
+
};
|
|
435
|
+
break;
|
|
436
|
+
case 35:
|
|
437
|
+
case 36:
|
|
438
|
+
this.$ = {
|
|
439
|
+
type: "classDef",
|
|
440
|
+
id: h[p - 1].trim(),
|
|
441
|
+
css: h[p].trim()
|
|
442
|
+
};
|
|
443
|
+
break;
|
|
444
|
+
case 37:
|
|
445
|
+
this.$ = {
|
|
446
|
+
type: "applyClass",
|
|
447
|
+
id: h[p - 1].trim(),
|
|
448
|
+
styleClass: h[p].trim()
|
|
449
|
+
};
|
|
450
|
+
break;
|
|
451
|
+
case 38:
|
|
452
|
+
this.$ = {
|
|
453
|
+
type: "applyStyles",
|
|
454
|
+
id: h[p - 1].trim(),
|
|
455
|
+
stylesStr: h[p].trim()
|
|
456
|
+
};
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
}, "anonymous"),
|
|
460
|
+
table: [
|
|
461
|
+
{
|
|
462
|
+
9: 1,
|
|
463
|
+
10: [1, 2]
|
|
464
|
+
},
|
|
465
|
+
{ 1: [3] },
|
|
466
|
+
{
|
|
467
|
+
10: t,
|
|
468
|
+
11: 3,
|
|
469
|
+
13: 4,
|
|
470
|
+
19: 5,
|
|
471
|
+
20: 6,
|
|
472
|
+
21: r,
|
|
473
|
+
22: 8,
|
|
474
|
+
23: 9,
|
|
475
|
+
24: 10,
|
|
476
|
+
25: 11,
|
|
477
|
+
26: 12,
|
|
478
|
+
28: n,
|
|
479
|
+
29: s,
|
|
480
|
+
31: i,
|
|
481
|
+
39: a,
|
|
482
|
+
43: c,
|
|
483
|
+
46: l
|
|
484
|
+
},
|
|
485
|
+
{ 8: [1, 20] },
|
|
486
|
+
e(g, [2, 12], {
|
|
487
|
+
13: 4,
|
|
488
|
+
19: 5,
|
|
489
|
+
20: 6,
|
|
490
|
+
22: 8,
|
|
491
|
+
23: 9,
|
|
492
|
+
24: 10,
|
|
493
|
+
25: 11,
|
|
494
|
+
26: 12,
|
|
495
|
+
11: 21,
|
|
496
|
+
10: t,
|
|
497
|
+
21: r,
|
|
498
|
+
28: n,
|
|
499
|
+
29: s,
|
|
500
|
+
31: i,
|
|
501
|
+
39: a,
|
|
502
|
+
43: c,
|
|
503
|
+
46: l
|
|
504
|
+
}),
|
|
505
|
+
e(o, [2, 16], {
|
|
506
|
+
14: 22,
|
|
507
|
+
15: d,
|
|
508
|
+
16: x
|
|
509
|
+
}),
|
|
510
|
+
e(o, [2, 17]),
|
|
511
|
+
e(o, [2, 18]),
|
|
512
|
+
e(o, [2, 19]),
|
|
513
|
+
e(o, [2, 20]),
|
|
514
|
+
e(o, [2, 21]),
|
|
515
|
+
e(o, [2, 22]),
|
|
516
|
+
e(m, [2, 25], { 27: [1, 25] }),
|
|
517
|
+
e(o, [2, 26]),
|
|
518
|
+
{
|
|
519
|
+
19: 26,
|
|
520
|
+
26: 12,
|
|
521
|
+
31: i
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
10: t,
|
|
525
|
+
11: 27,
|
|
526
|
+
13: 4,
|
|
527
|
+
19: 5,
|
|
528
|
+
20: 6,
|
|
529
|
+
21: r,
|
|
530
|
+
22: 8,
|
|
531
|
+
23: 9,
|
|
532
|
+
24: 10,
|
|
533
|
+
25: 11,
|
|
534
|
+
26: 12,
|
|
535
|
+
28: n,
|
|
536
|
+
29: s,
|
|
537
|
+
31: i,
|
|
538
|
+
39: a,
|
|
539
|
+
43: c,
|
|
540
|
+
46: l
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
40: [1, 28],
|
|
544
|
+
42: [1, 29]
|
|
545
|
+
},
|
|
546
|
+
{ 44: [1, 30] },
|
|
547
|
+
{ 47: [1, 31] },
|
|
548
|
+
e(y, [2, 29], {
|
|
549
|
+
32: 32,
|
|
550
|
+
35: [1, 33],
|
|
551
|
+
37: [1, 34]
|
|
552
|
+
}),
|
|
553
|
+
{ 1: [2, 7] },
|
|
554
|
+
e(g, [2, 13]),
|
|
555
|
+
{
|
|
556
|
+
26: 35,
|
|
557
|
+
31: i
|
|
558
|
+
},
|
|
559
|
+
{ 31: [2, 14] },
|
|
560
|
+
{ 17: [1, 36] },
|
|
561
|
+
e(m, [2, 24]),
|
|
562
|
+
{
|
|
563
|
+
10: t,
|
|
564
|
+
11: 37,
|
|
565
|
+
13: 4,
|
|
566
|
+
14: 22,
|
|
567
|
+
15: d,
|
|
568
|
+
16: x,
|
|
569
|
+
19: 5,
|
|
570
|
+
20: 6,
|
|
571
|
+
21: r,
|
|
572
|
+
22: 8,
|
|
573
|
+
23: 9,
|
|
574
|
+
24: 10,
|
|
575
|
+
25: 11,
|
|
576
|
+
26: 12,
|
|
577
|
+
28: n,
|
|
578
|
+
29: s,
|
|
579
|
+
31: i,
|
|
580
|
+
39: a,
|
|
581
|
+
43: c,
|
|
582
|
+
46: l
|
|
583
|
+
},
|
|
584
|
+
{ 30: [1, 38] },
|
|
585
|
+
{ 41: [1, 39] },
|
|
586
|
+
{ 41: [1, 40] },
|
|
587
|
+
{ 45: [1, 41] },
|
|
588
|
+
{ 48: [1, 42] },
|
|
589
|
+
e(y, [2, 30]),
|
|
590
|
+
{ 18: [1, 43] },
|
|
591
|
+
{ 18: [1, 44] },
|
|
592
|
+
e(m, [2, 23]),
|
|
593
|
+
{ 18: [1, 45] },
|
|
594
|
+
{ 30: [1, 46] },
|
|
595
|
+
e(o, [2, 28]),
|
|
596
|
+
e(o, [2, 35]),
|
|
597
|
+
e(o, [2, 36]),
|
|
598
|
+
e(o, [2, 37]),
|
|
599
|
+
e(o, [2, 38]),
|
|
600
|
+
{ 36: [1, 47] },
|
|
601
|
+
{
|
|
602
|
+
33: 48,
|
|
603
|
+
34: v
|
|
604
|
+
},
|
|
605
|
+
{ 15: [1, 50] },
|
|
606
|
+
e(o, [2, 27]),
|
|
607
|
+
e(y, [2, 33]),
|
|
608
|
+
{ 38: [1, 51] },
|
|
609
|
+
{
|
|
610
|
+
33: 52,
|
|
611
|
+
34: v,
|
|
612
|
+
38: [2, 31]
|
|
613
|
+
},
|
|
614
|
+
{ 31: [2, 15] },
|
|
615
|
+
e(y, [2, 34]),
|
|
616
|
+
{ 38: [2, 32] }
|
|
617
|
+
],
|
|
618
|
+
defaultActions: {
|
|
619
|
+
20: [2, 7],
|
|
620
|
+
23: [2, 14],
|
|
621
|
+
50: [2, 15],
|
|
622
|
+
52: [2, 32]
|
|
623
|
+
},
|
|
624
|
+
parseError: /* @__PURE__ */ u(function(f, b) {
|
|
625
|
+
if (b.recoverable) this.trace(f);
|
|
626
|
+
else {
|
|
627
|
+
var E = new Error(f);
|
|
628
|
+
throw E.hash = b, E;
|
|
629
|
+
}
|
|
630
|
+
}, "parseError"),
|
|
631
|
+
parse: /* @__PURE__ */ u(function(f) {
|
|
632
|
+
var b = this, E = [0], k = [], _ = [null], h = [], P = this.table, p = "", B = 0, j = 0, X = 0, ht = 2, rt = 1, gt = h.slice.call(arguments, 1), O = Object.create(this.lexer), G = { yy: {} };
|
|
633
|
+
for (var ut in this.yy) Object.prototype.hasOwnProperty.call(this.yy, ut) && (G.yy[ut] = this.yy[ut]);
|
|
634
|
+
O.setInput(f, G.yy), G.yy.lexer = O, G.yy.parser = this, typeof O.yylloc > "u" && (O.yylloc = {});
|
|
635
|
+
var dt = O.yylloc;
|
|
636
|
+
h.push(dt);
|
|
637
|
+
var ue = O.options && O.options.ranges;
|
|
638
|
+
typeof G.yy.parseError == "function" ? this.parseError = G.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
639
|
+
function de(Y) {
|
|
640
|
+
E.length = E.length - 2 * Y, _.length = _.length - Y, h.length = h.length - Y;
|
|
641
|
+
}
|
|
642
|
+
u(de, "popStack");
|
|
643
|
+
function Bt() {
|
|
644
|
+
var Y = k.pop() || O.lex() || rt;
|
|
645
|
+
return typeof Y != "number" && (Y instanceof Array && (k = Y, Y = k.pop()), Y = b.symbols_[Y] || Y), Y;
|
|
646
|
+
}
|
|
647
|
+
u(Bt, "lex");
|
|
648
|
+
for (var z, ft, Z, W, pt, q = {}, at, V, Ot, st; ; ) {
|
|
649
|
+
if (Z = E[E.length - 1], this.defaultActions[Z] ? W = this.defaultActions[Z] : ((z === null || typeof z > "u") && (z = Bt()), W = P[Z] && P[Z][z]), typeof W > "u" || !W.length || !W[0]) {
|
|
650
|
+
var xt = "";
|
|
651
|
+
st = [];
|
|
652
|
+
for (at in P[Z]) this.terminals_[at] && at > ht && st.push("'" + this.terminals_[at] + "'");
|
|
653
|
+
O.showPosition ? xt = "Parse error on line " + (B + 1) + `:
|
|
654
|
+
` + O.showPosition() + `
|
|
655
|
+
Expecting ` + st.join(", ") + ", got '" + (this.terminals_[z] || z) + "'" : xt = "Parse error on line " + (B + 1) + ": Unexpected " + (z == rt ? "end of input" : "'" + (this.terminals_[z] || z) + "'"), this.parseError(xt, {
|
|
656
|
+
text: O.match,
|
|
657
|
+
token: this.terminals_[z] || z,
|
|
658
|
+
line: O.yylineno,
|
|
659
|
+
loc: dt,
|
|
660
|
+
expected: st
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
if (W[0] instanceof Array && W.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + Z + ", token: " + z);
|
|
664
|
+
switch (W[0]) {
|
|
665
|
+
case 1:
|
|
666
|
+
E.push(z), _.push(O.yytext), h.push(O.yylloc), E.push(W[1]), z = null, ft ? (z = ft, ft = null) : (j = O.yyleng, p = O.yytext, B = O.yylineno, dt = O.yylloc, X > 0 && X--);
|
|
667
|
+
break;
|
|
668
|
+
case 2:
|
|
669
|
+
if (V = this.productions_[W[1]][1], q.$ = _[_.length - V], q._$ = {
|
|
670
|
+
first_line: h[h.length - (V || 1)].first_line,
|
|
671
|
+
last_line: h[h.length - 1].last_line,
|
|
672
|
+
first_column: h[h.length - (V || 1)].first_column,
|
|
673
|
+
last_column: h[h.length - 1].last_column
|
|
674
|
+
}, ue && (q._$.range = [h[h.length - (V || 1)].range[0], h[h.length - 1].range[1]]), pt = this.performAction.apply(q, [
|
|
675
|
+
p,
|
|
676
|
+
j,
|
|
677
|
+
B,
|
|
678
|
+
G.yy,
|
|
679
|
+
W[1],
|
|
680
|
+
_,
|
|
681
|
+
h
|
|
682
|
+
].concat(gt)), typeof pt < "u") return pt;
|
|
683
|
+
V && (E = E.slice(0, -1 * V * 2), _ = _.slice(0, -1 * V), h = h.slice(0, -1 * V)), E.push(this.productions_[W[1]][0]), _.push(q.$), h.push(q._$), Ot = P[E[E.length - 2]][E[E.length - 1]], E.push(Ot);
|
|
684
|
+
break;
|
|
685
|
+
case 3:
|
|
686
|
+
return !0;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return !0;
|
|
690
|
+
}, "parse")
|
|
691
|
+
};
|
|
692
|
+
S.lexer = /* @__PURE__ */ (function() {
|
|
693
|
+
return {
|
|
694
|
+
EOF: 1,
|
|
695
|
+
parseError: /* @__PURE__ */ u(function(f, b) {
|
|
696
|
+
if (this.yy.parser) this.yy.parser.parseError(f, b);
|
|
697
|
+
else throw new Error(f);
|
|
698
|
+
}, "parseError"),
|
|
699
|
+
setInput: /* @__PURE__ */ u(function(w, f) {
|
|
700
|
+
return this.yy = f || this.yy || {}, this._input = w, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
701
|
+
first_line: 1,
|
|
702
|
+
first_column: 0,
|
|
703
|
+
last_line: 1,
|
|
704
|
+
last_column: 0
|
|
705
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
706
|
+
}, "setInput"),
|
|
707
|
+
input: /* @__PURE__ */ u(function() {
|
|
708
|
+
var w = this._input[0];
|
|
709
|
+
return this.yytext += w, this.yyleng++, this.offset++, this.match += w, this.matched += w, w.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), w;
|
|
710
|
+
}, "input"),
|
|
711
|
+
unput: /* @__PURE__ */ u(function(w) {
|
|
712
|
+
var f = w.length, b = w.split(/(?:\r\n?|\n)/g);
|
|
713
|
+
this._input = w + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - f), this.offset -= f;
|
|
714
|
+
var E = this.match.split(/(?:\r\n?|\n)/g);
|
|
715
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), b.length - 1 && (this.yylineno -= b.length - 1);
|
|
716
|
+
var k = this.yylloc.range;
|
|
717
|
+
return this.yylloc = {
|
|
718
|
+
first_line: this.yylloc.first_line,
|
|
719
|
+
last_line: this.yylineno + 1,
|
|
720
|
+
first_column: this.yylloc.first_column,
|
|
721
|
+
last_column: b ? (b.length === E.length ? this.yylloc.first_column : 0) + E[E.length - b.length].length - b[0].length : this.yylloc.first_column - f
|
|
722
|
+
}, this.options.ranges && (this.yylloc.range = [k[0], k[0] + this.yyleng - f]), this.yyleng = this.yytext.length, this;
|
|
723
|
+
}, "unput"),
|
|
724
|
+
more: /* @__PURE__ */ u(function() {
|
|
725
|
+
return this._more = !0, this;
|
|
726
|
+
}, "more"),
|
|
727
|
+
reject: /* @__PURE__ */ u(function() {
|
|
728
|
+
if (this.options.backtrack_lexer) this._backtrack = !0;
|
|
729
|
+
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).
|
|
730
|
+
` + this.showPosition(), {
|
|
731
|
+
text: "",
|
|
732
|
+
token: null,
|
|
733
|
+
line: this.yylineno
|
|
734
|
+
});
|
|
735
|
+
return this;
|
|
736
|
+
}, "reject"),
|
|
737
|
+
less: /* @__PURE__ */ u(function(w) {
|
|
738
|
+
this.unput(this.match.slice(w));
|
|
739
|
+
}, "less"),
|
|
740
|
+
pastInput: /* @__PURE__ */ u(function() {
|
|
741
|
+
var w = this.matched.substr(0, this.matched.length - this.match.length);
|
|
742
|
+
return (w.length > 20 ? "..." : "") + w.substr(-20).replace(/\n/g, "");
|
|
743
|
+
}, "pastInput"),
|
|
744
|
+
upcomingInput: /* @__PURE__ */ u(function() {
|
|
745
|
+
var w = this.match;
|
|
746
|
+
return w.length < 20 && (w += this._input.substr(0, 20 - w.length)), (w.substr(0, 20) + (w.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
747
|
+
}, "upcomingInput"),
|
|
748
|
+
showPosition: /* @__PURE__ */ u(function() {
|
|
749
|
+
var w = this.pastInput(), f = new Array(w.length + 1).join("-");
|
|
750
|
+
return w + this.upcomingInput() + `
|
|
751
|
+
` + f + "^";
|
|
752
|
+
}, "showPosition"),
|
|
753
|
+
test_match: /* @__PURE__ */ u(function(w, f) {
|
|
754
|
+
var b, E, k;
|
|
755
|
+
if (this.options.backtrack_lexer && (k = {
|
|
756
|
+
yylineno: this.yylineno,
|
|
757
|
+
yylloc: {
|
|
758
|
+
first_line: this.yylloc.first_line,
|
|
759
|
+
last_line: this.last_line,
|
|
760
|
+
first_column: this.yylloc.first_column,
|
|
761
|
+
last_column: this.yylloc.last_column
|
|
762
|
+
},
|
|
763
|
+
yytext: this.yytext,
|
|
764
|
+
match: this.match,
|
|
765
|
+
matches: this.matches,
|
|
766
|
+
matched: this.matched,
|
|
767
|
+
yyleng: this.yyleng,
|
|
768
|
+
offset: this.offset,
|
|
769
|
+
_more: this._more,
|
|
770
|
+
_input: this._input,
|
|
771
|
+
yy: this.yy,
|
|
772
|
+
conditionStack: this.conditionStack.slice(0),
|
|
773
|
+
done: this.done
|
|
774
|
+
}, this.options.ranges && (k.yylloc.range = this.yylloc.range.slice(0))), E = w[0].match(/(?:\r\n?|\n).*/g), E && (this.yylineno += E.length), this.yylloc = {
|
|
775
|
+
first_line: this.yylloc.last_line,
|
|
776
|
+
last_line: this.yylineno + 1,
|
|
777
|
+
first_column: this.yylloc.last_column,
|
|
778
|
+
last_column: E ? E[E.length - 1].length - E[E.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + w[0].length
|
|
779
|
+
}, this.yytext += w[0], this.match += w[0], this.matches = w, 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(w[0].length), this.matched += w[0], b = this.performAction.call(this, this.yy, this, f, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), b) return b;
|
|
780
|
+
if (this._backtrack) {
|
|
781
|
+
for (var _ in k) this[_] = k[_];
|
|
782
|
+
return !1;
|
|
783
|
+
}
|
|
784
|
+
return !1;
|
|
785
|
+
}, "test_match"),
|
|
786
|
+
next: /* @__PURE__ */ u(function() {
|
|
787
|
+
if (this.done) return this.EOF;
|
|
788
|
+
this._input || (this.done = !0);
|
|
789
|
+
var w, f, b, E;
|
|
790
|
+
this._more || (this.yytext = "", this.match = "");
|
|
791
|
+
for (var k = this._currentRules(), _ = 0; _ < k.length; _++)
|
|
792
|
+
if (b = this._input.match(this.rules[k[_]]), b && (!f || b[0].length > f[0].length)) {
|
|
793
|
+
if (f = b, E = _, this.options.backtrack_lexer) {
|
|
794
|
+
if (w = this.test_match(b, k[_]), w !== !1) return w;
|
|
795
|
+
if (this._backtrack) {
|
|
796
|
+
f = !1;
|
|
797
|
+
continue;
|
|
798
|
+
} else return !1;
|
|
799
|
+
} else if (!this.options.flex) break;
|
|
800
|
+
}
|
|
801
|
+
return f ? (w = this.test_match(f, k[E]), w !== !1 ? w : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
802
|
+
` + this.showPosition(), {
|
|
803
|
+
text: "",
|
|
804
|
+
token: null,
|
|
805
|
+
line: this.yylineno
|
|
806
|
+
});
|
|
807
|
+
}, "next"),
|
|
808
|
+
lex: /* @__PURE__ */ u(function() {
|
|
809
|
+
var f = this.next();
|
|
810
|
+
return f || this.lex();
|
|
811
|
+
}, "lex"),
|
|
812
|
+
begin: /* @__PURE__ */ u(function(f) {
|
|
813
|
+
this.conditionStack.push(f);
|
|
814
|
+
}, "begin"),
|
|
815
|
+
popState: /* @__PURE__ */ u(function() {
|
|
816
|
+
return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
817
|
+
}, "popState"),
|
|
818
|
+
_currentRules: /* @__PURE__ */ u(function() {
|
|
819
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
820
|
+
}, "_currentRules"),
|
|
821
|
+
topState: /* @__PURE__ */ u(function(f) {
|
|
822
|
+
return f = this.conditionStack.length - 1 - Math.abs(f || 0), f >= 0 ? this.conditionStack[f] : "INITIAL";
|
|
823
|
+
}, "topState"),
|
|
824
|
+
pushState: /* @__PURE__ */ u(function(f) {
|
|
825
|
+
this.begin(f);
|
|
826
|
+
}, "pushState"),
|
|
827
|
+
stateStackSize: /* @__PURE__ */ u(function() {
|
|
828
|
+
return this.conditionStack.length;
|
|
829
|
+
}, "stateStackSize"),
|
|
830
|
+
options: {},
|
|
831
|
+
performAction: /* @__PURE__ */ u(function(f, b, E, k) {
|
|
832
|
+
switch (E) {
|
|
833
|
+
case 0:
|
|
834
|
+
return f.getLogger().debug("Found block-beta"), 10;
|
|
835
|
+
case 1:
|
|
836
|
+
return f.getLogger().debug("Found id-block"), 29;
|
|
837
|
+
case 2:
|
|
838
|
+
return f.getLogger().debug("Found block"), 10;
|
|
839
|
+
case 3:
|
|
840
|
+
f.getLogger().debug(".", b.yytext);
|
|
841
|
+
break;
|
|
842
|
+
case 4:
|
|
843
|
+
f.getLogger().debug("_", b.yytext);
|
|
844
|
+
break;
|
|
845
|
+
case 5:
|
|
846
|
+
return 5;
|
|
847
|
+
case 6:
|
|
848
|
+
return b.yytext = -1, 28;
|
|
849
|
+
case 7:
|
|
850
|
+
return b.yytext = b.yytext.replace(/columns\s+/, ""), f.getLogger().debug("COLUMNS (LEX)", b.yytext), 28;
|
|
851
|
+
case 8:
|
|
852
|
+
this.pushState("md_string");
|
|
853
|
+
break;
|
|
854
|
+
case 9:
|
|
855
|
+
return "MD_STR";
|
|
856
|
+
case 10:
|
|
857
|
+
this.popState();
|
|
858
|
+
break;
|
|
859
|
+
case 11:
|
|
860
|
+
this.pushState("string");
|
|
861
|
+
break;
|
|
862
|
+
case 12:
|
|
863
|
+
f.getLogger().debug("LEX: POPPING STR:", b.yytext), this.popState();
|
|
864
|
+
break;
|
|
865
|
+
case 13:
|
|
866
|
+
return f.getLogger().debug("LEX: STR end:", b.yytext), "STR";
|
|
867
|
+
case 14:
|
|
868
|
+
return b.yytext = b.yytext.replace(/space\:/, ""), f.getLogger().debug("SPACE NUM (LEX)", b.yytext), 21;
|
|
869
|
+
case 15:
|
|
870
|
+
return b.yytext = "1", f.getLogger().debug("COLUMNS (LEX)", b.yytext), 21;
|
|
871
|
+
case 16:
|
|
872
|
+
return 42;
|
|
873
|
+
case 17:
|
|
874
|
+
return "LINKSTYLE";
|
|
875
|
+
case 18:
|
|
876
|
+
return "INTERPOLATE";
|
|
877
|
+
case 19:
|
|
878
|
+
return this.pushState("CLASSDEF"), 39;
|
|
879
|
+
case 20:
|
|
880
|
+
return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
|
881
|
+
case 21:
|
|
882
|
+
return this.popState(), this.pushState("CLASSDEFID"), 40;
|
|
883
|
+
case 22:
|
|
884
|
+
return this.popState(), 41;
|
|
885
|
+
case 23:
|
|
886
|
+
return this.pushState("CLASS"), 43;
|
|
887
|
+
case 24:
|
|
888
|
+
return this.popState(), this.pushState("CLASS_STYLE"), 44;
|
|
889
|
+
case 25:
|
|
890
|
+
return this.popState(), 45;
|
|
891
|
+
case 26:
|
|
892
|
+
return this.pushState("STYLE_STMNT"), 46;
|
|
893
|
+
case 27:
|
|
894
|
+
return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
|
|
895
|
+
case 28:
|
|
896
|
+
return this.popState(), 48;
|
|
897
|
+
case 29:
|
|
898
|
+
return this.pushState("acc_title"), "acc_title";
|
|
899
|
+
case 30:
|
|
900
|
+
return this.popState(), "acc_title_value";
|
|
901
|
+
case 31:
|
|
902
|
+
return this.pushState("acc_descr"), "acc_descr";
|
|
903
|
+
case 32:
|
|
904
|
+
return this.popState(), "acc_descr_value";
|
|
905
|
+
case 33:
|
|
906
|
+
this.pushState("acc_descr_multiline");
|
|
907
|
+
break;
|
|
908
|
+
case 34:
|
|
909
|
+
this.popState();
|
|
910
|
+
break;
|
|
911
|
+
case 35:
|
|
912
|
+
return "acc_descr_multiline_value";
|
|
913
|
+
case 36:
|
|
914
|
+
return 30;
|
|
915
|
+
case 37:
|
|
916
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
917
|
+
case 38:
|
|
918
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
919
|
+
case 39:
|
|
920
|
+
return this.popState(), f.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
921
|
+
case 40:
|
|
922
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
923
|
+
case 41:
|
|
924
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
925
|
+
case 42:
|
|
926
|
+
return this.popState(), f.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
927
|
+
case 43:
|
|
928
|
+
return this.popState(), f.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
929
|
+
case 44:
|
|
930
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
931
|
+
case 45:
|
|
932
|
+
return this.popState(), f.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
933
|
+
case 46:
|
|
934
|
+
return this.popState(), f.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
935
|
+
case 47:
|
|
936
|
+
return this.popState(), f.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
937
|
+
case 48:
|
|
938
|
+
return this.popState(), f.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
939
|
+
case 49:
|
|
940
|
+
return this.popState(), f.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
941
|
+
case 50:
|
|
942
|
+
return this.popState(), f.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
943
|
+
case 51:
|
|
944
|
+
return this.popState(), f.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
945
|
+
case 52:
|
|
946
|
+
return this.popState(), f.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
947
|
+
case 53:
|
|
948
|
+
return this.popState(), f.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
949
|
+
case 54:
|
|
950
|
+
return f.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
951
|
+
case 55:
|
|
952
|
+
return f.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
953
|
+
case 56:
|
|
954
|
+
return f.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
955
|
+
case 57:
|
|
956
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
957
|
+
case 58:
|
|
958
|
+
return f.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
959
|
+
case 59:
|
|
960
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
961
|
+
case 60:
|
|
962
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
963
|
+
case 61:
|
|
964
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
965
|
+
case 62:
|
|
966
|
+
return f.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
967
|
+
case 63:
|
|
968
|
+
return f.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
969
|
+
case 64:
|
|
970
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
971
|
+
case 65:
|
|
972
|
+
return this.pushState("NODE"), 35;
|
|
973
|
+
case 66:
|
|
974
|
+
return this.pushState("NODE"), 35;
|
|
975
|
+
case 67:
|
|
976
|
+
return this.pushState("NODE"), 35;
|
|
977
|
+
case 68:
|
|
978
|
+
return this.pushState("NODE"), 35;
|
|
979
|
+
case 69:
|
|
980
|
+
return this.pushState("NODE"), 35;
|
|
981
|
+
case 70:
|
|
982
|
+
return this.pushState("NODE"), 35;
|
|
983
|
+
case 71:
|
|
984
|
+
return this.pushState("NODE"), 35;
|
|
985
|
+
case 72:
|
|
986
|
+
return f.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
987
|
+
case 73:
|
|
988
|
+
return this.pushState("BLOCK_ARROW"), f.getLogger().debug("LEX ARR START"), 37;
|
|
989
|
+
case 74:
|
|
990
|
+
return f.getLogger().debug("Lex: NODE_ID", b.yytext), 31;
|
|
991
|
+
case 75:
|
|
992
|
+
return f.getLogger().debug("Lex: EOF", b.yytext), 8;
|
|
993
|
+
case 76:
|
|
994
|
+
this.pushState("md_string");
|
|
995
|
+
break;
|
|
996
|
+
case 77:
|
|
997
|
+
this.pushState("md_string");
|
|
998
|
+
break;
|
|
999
|
+
case 78:
|
|
1000
|
+
return "NODE_DESCR";
|
|
1001
|
+
case 79:
|
|
1002
|
+
this.popState();
|
|
1003
|
+
break;
|
|
1004
|
+
case 80:
|
|
1005
|
+
f.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
1006
|
+
break;
|
|
1007
|
+
case 81:
|
|
1008
|
+
f.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
1009
|
+
break;
|
|
1010
|
+
case 82:
|
|
1011
|
+
return f.getLogger().debug("LEX: NODE_DESCR:", b.yytext), "NODE_DESCR";
|
|
1012
|
+
case 83:
|
|
1013
|
+
f.getLogger().debug("LEX POPPING"), this.popState();
|
|
1014
|
+
break;
|
|
1015
|
+
case 84:
|
|
1016
|
+
f.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
1017
|
+
break;
|
|
1018
|
+
case 85:
|
|
1019
|
+
return b.yytext = b.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (right): dir:", b.yytext), "DIR";
|
|
1020
|
+
case 86:
|
|
1021
|
+
return b.yytext = b.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (left):", b.yytext), "DIR";
|
|
1022
|
+
case 87:
|
|
1023
|
+
return b.yytext = b.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (x):", b.yytext), "DIR";
|
|
1024
|
+
case 88:
|
|
1025
|
+
return b.yytext = b.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (y):", b.yytext), "DIR";
|
|
1026
|
+
case 89:
|
|
1027
|
+
return b.yytext = b.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (up):", b.yytext), "DIR";
|
|
1028
|
+
case 90:
|
|
1029
|
+
return b.yytext = b.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (down):", b.yytext), "DIR";
|
|
1030
|
+
case 91:
|
|
1031
|
+
return b.yytext = "]>", f.getLogger().debug("Lex (ARROW_DIR end):", b.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
1032
|
+
case 92:
|
|
1033
|
+
return f.getLogger().debug("Lex: LINK", "#" + b.yytext + "#"), 15;
|
|
1034
|
+
case 93:
|
|
1035
|
+
return f.getLogger().debug("Lex: LINK", b.yytext), 15;
|
|
1036
|
+
case 94:
|
|
1037
|
+
return f.getLogger().debug("Lex: LINK", b.yytext), 15;
|
|
1038
|
+
case 95:
|
|
1039
|
+
return f.getLogger().debug("Lex: LINK", b.yytext), 15;
|
|
1040
|
+
case 96:
|
|
1041
|
+
return f.getLogger().debug("Lex: START_LINK", b.yytext), this.pushState("LLABEL"), 16;
|
|
1042
|
+
case 97:
|
|
1043
|
+
return f.getLogger().debug("Lex: START_LINK", b.yytext), this.pushState("LLABEL"), 16;
|
|
1044
|
+
case 98:
|
|
1045
|
+
return f.getLogger().debug("Lex: START_LINK", b.yytext), this.pushState("LLABEL"), 16;
|
|
1046
|
+
case 99:
|
|
1047
|
+
this.pushState("md_string");
|
|
1048
|
+
break;
|
|
1049
|
+
case 100:
|
|
1050
|
+
return f.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
1051
|
+
case 101:
|
|
1052
|
+
return this.popState(), f.getLogger().debug("Lex: LINK", "#" + b.yytext + "#"), 15;
|
|
1053
|
+
case 102:
|
|
1054
|
+
return this.popState(), f.getLogger().debug("Lex: LINK", b.yytext), 15;
|
|
1055
|
+
case 103:
|
|
1056
|
+
return this.popState(), f.getLogger().debug("Lex: LINK", b.yytext), 15;
|
|
1057
|
+
case 104:
|
|
1058
|
+
return f.getLogger().debug("Lex: COLON", b.yytext), b.yytext = b.yytext.slice(1), 27;
|
|
1059
|
+
}
|
|
1060
|
+
}, "anonymous"),
|
|
1061
|
+
rules: [
|
|
1062
|
+
/^(?:block-beta\b)/,
|
|
1063
|
+
/^(?:block:)/,
|
|
1064
|
+
/^(?:block\b)/,
|
|
1065
|
+
/^(?:[\s]+)/,
|
|
1066
|
+
/^(?:[\n]+)/,
|
|
1067
|
+
/^(?:((\u000D\u000A)|(\u000A)))/,
|
|
1068
|
+
/^(?:columns\s+auto\b)/,
|
|
1069
|
+
/^(?:columns\s+[\d]+)/,
|
|
1070
|
+
/^(?:["][`])/,
|
|
1071
|
+
/^(?:[^`"]+)/,
|
|
1072
|
+
/^(?:[`]["])/,
|
|
1073
|
+
/^(?:["])/,
|
|
1074
|
+
/^(?:["])/,
|
|
1075
|
+
/^(?:[^"]*)/,
|
|
1076
|
+
/^(?:space[:]\d+)/,
|
|
1077
|
+
/^(?:space\b)/,
|
|
1078
|
+
/^(?:default\b)/,
|
|
1079
|
+
/^(?:linkStyle\b)/,
|
|
1080
|
+
/^(?:interpolate\b)/,
|
|
1081
|
+
/^(?:classDef\s+)/,
|
|
1082
|
+
/^(?:DEFAULT\s+)/,
|
|
1083
|
+
/^(?:\w+\s+)/,
|
|
1084
|
+
/^(?:[^\n]*)/,
|
|
1085
|
+
/^(?:class\s+)/,
|
|
1086
|
+
/^(?:(\w+)+((,\s*\w+)*))/,
|
|
1087
|
+
/^(?:[^\n]*)/,
|
|
1088
|
+
/^(?:style\s+)/,
|
|
1089
|
+
/^(?:(\w+)+((,\s*\w+)*))/,
|
|
1090
|
+
/^(?:[^\n]*)/,
|
|
1091
|
+
/^(?:accTitle\s*:\s*)/,
|
|
1092
|
+
/^(?:(?!\n||)*[^\n]*)/,
|
|
1093
|
+
/^(?:accDescr\s*:\s*)/,
|
|
1094
|
+
/^(?:(?!\n||)*[^\n]*)/,
|
|
1095
|
+
/^(?:accDescr\s*\{\s*)/,
|
|
1096
|
+
/^(?:[\}])/,
|
|
1097
|
+
/^(?:[^\}]*)/,
|
|
1098
|
+
/^(?:end\b\s*)/,
|
|
1099
|
+
/^(?:\(\(\()/,
|
|
1100
|
+
/^(?:\)\)\))/,
|
|
1101
|
+
/^(?:[\)]\))/,
|
|
1102
|
+
/^(?:\}\})/,
|
|
1103
|
+
/^(?:\})/,
|
|
1104
|
+
/^(?:\(-)/,
|
|
1105
|
+
/^(?:-\))/,
|
|
1106
|
+
/^(?:\(\()/,
|
|
1107
|
+
/^(?:\]\])/,
|
|
1108
|
+
/^(?:\()/,
|
|
1109
|
+
/^(?:\]\))/,
|
|
1110
|
+
/^(?:\\\])/,
|
|
1111
|
+
/^(?:\/\])/,
|
|
1112
|
+
/^(?:\)\])/,
|
|
1113
|
+
/^(?:[\)])/,
|
|
1114
|
+
/^(?:\]>)/,
|
|
1115
|
+
/^(?:[\]])/,
|
|
1116
|
+
/^(?:-\))/,
|
|
1117
|
+
/^(?:\(-)/,
|
|
1118
|
+
/^(?:\)\))/,
|
|
1119
|
+
/^(?:\))/,
|
|
1120
|
+
/^(?:\(\(\()/,
|
|
1121
|
+
/^(?:\(\()/,
|
|
1122
|
+
/^(?:\{\{)/,
|
|
1123
|
+
/^(?:\{)/,
|
|
1124
|
+
/^(?:>)/,
|
|
1125
|
+
/^(?:\(\[)/,
|
|
1126
|
+
/^(?:\()/,
|
|
1127
|
+
/^(?:\[\[)/,
|
|
1128
|
+
/^(?:\[\|)/,
|
|
1129
|
+
/^(?:\[\()/,
|
|
1130
|
+
/^(?:\)\)\))/,
|
|
1131
|
+
/^(?:\[\\)/,
|
|
1132
|
+
/^(?:\[\/)/,
|
|
1133
|
+
/^(?:\[\\)/,
|
|
1134
|
+
/^(?:\[)/,
|
|
1135
|
+
/^(?:<\[)/,
|
|
1136
|
+
/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
|
|
1137
|
+
/^(?:$)/,
|
|
1138
|
+
/^(?:["][`])/,
|
|
1139
|
+
/^(?:["][`])/,
|
|
1140
|
+
/^(?:[^`"]+)/,
|
|
1141
|
+
/^(?:[`]["])/,
|
|
1142
|
+
/^(?:["])/,
|
|
1143
|
+
/^(?:["])/,
|
|
1144
|
+
/^(?:[^"]+)/,
|
|
1145
|
+
/^(?:["])/,
|
|
1146
|
+
/^(?:\]>\s*\()/,
|
|
1147
|
+
/^(?:,?\s*right\s*)/,
|
|
1148
|
+
/^(?:,?\s*left\s*)/,
|
|
1149
|
+
/^(?:,?\s*x\s*)/,
|
|
1150
|
+
/^(?:,?\s*y\s*)/,
|
|
1151
|
+
/^(?:,?\s*up\s*)/,
|
|
1152
|
+
/^(?:,?\s*down\s*)/,
|
|
1153
|
+
/^(?:\)\s*)/,
|
|
1154
|
+
/^(?:\s*[xo<]?--+[-xo>]\s*)/,
|
|
1155
|
+
/^(?:\s*[xo<]?==+[=xo>]\s*)/,
|
|
1156
|
+
/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
|
|
1157
|
+
/^(?:\s*~~[\~]+\s*)/,
|
|
1158
|
+
/^(?:\s*[xo<]?--\s*)/,
|
|
1159
|
+
/^(?:\s*[xo<]?==\s*)/,
|
|
1160
|
+
/^(?:\s*[xo<]?-\.\s*)/,
|
|
1161
|
+
/^(?:["][`])/,
|
|
1162
|
+
/^(?:["])/,
|
|
1163
|
+
/^(?:\s*[xo<]?--+[-xo>]\s*)/,
|
|
1164
|
+
/^(?:\s*[xo<]?==+[=xo>]\s*)/,
|
|
1165
|
+
/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
|
|
1166
|
+
/^(?::\d+)/
|
|
1167
|
+
],
|
|
1168
|
+
conditions: {
|
|
1169
|
+
STYLE_DEFINITION: {
|
|
1170
|
+
rules: [28],
|
|
1171
|
+
inclusive: !1
|
|
1172
|
+
},
|
|
1173
|
+
STYLE_STMNT: {
|
|
1174
|
+
rules: [27],
|
|
1175
|
+
inclusive: !1
|
|
1176
|
+
},
|
|
1177
|
+
CLASSDEFID: {
|
|
1178
|
+
rules: [22],
|
|
1179
|
+
inclusive: !1
|
|
1180
|
+
},
|
|
1181
|
+
CLASSDEF: {
|
|
1182
|
+
rules: [20, 21],
|
|
1183
|
+
inclusive: !1
|
|
1184
|
+
},
|
|
1185
|
+
CLASS_STYLE: {
|
|
1186
|
+
rules: [25],
|
|
1187
|
+
inclusive: !1
|
|
1188
|
+
},
|
|
1189
|
+
CLASS: {
|
|
1190
|
+
rules: [24],
|
|
1191
|
+
inclusive: !1
|
|
1192
|
+
},
|
|
1193
|
+
LLABEL: {
|
|
1194
|
+
rules: [
|
|
1195
|
+
99,
|
|
1196
|
+
100,
|
|
1197
|
+
101,
|
|
1198
|
+
102,
|
|
1199
|
+
103
|
|
1200
|
+
],
|
|
1201
|
+
inclusive: !1
|
|
1202
|
+
},
|
|
1203
|
+
ARROW_DIR: {
|
|
1204
|
+
rules: [
|
|
1205
|
+
85,
|
|
1206
|
+
86,
|
|
1207
|
+
87,
|
|
1208
|
+
88,
|
|
1209
|
+
89,
|
|
1210
|
+
90,
|
|
1211
|
+
91
|
|
1212
|
+
],
|
|
1213
|
+
inclusive: !1
|
|
1214
|
+
},
|
|
1215
|
+
BLOCK_ARROW: {
|
|
1216
|
+
rules: [
|
|
1217
|
+
76,
|
|
1218
|
+
81,
|
|
1219
|
+
84
|
|
1220
|
+
],
|
|
1221
|
+
inclusive: !1
|
|
1222
|
+
},
|
|
1223
|
+
NODE: {
|
|
1224
|
+
rules: [
|
|
1225
|
+
37,
|
|
1226
|
+
38,
|
|
1227
|
+
39,
|
|
1228
|
+
40,
|
|
1229
|
+
41,
|
|
1230
|
+
42,
|
|
1231
|
+
43,
|
|
1232
|
+
44,
|
|
1233
|
+
45,
|
|
1234
|
+
46,
|
|
1235
|
+
47,
|
|
1236
|
+
48,
|
|
1237
|
+
49,
|
|
1238
|
+
50,
|
|
1239
|
+
51,
|
|
1240
|
+
52,
|
|
1241
|
+
53,
|
|
1242
|
+
77,
|
|
1243
|
+
80
|
|
1244
|
+
],
|
|
1245
|
+
inclusive: !1
|
|
1246
|
+
},
|
|
1247
|
+
md_string: {
|
|
1248
|
+
rules: [
|
|
1249
|
+
9,
|
|
1250
|
+
10,
|
|
1251
|
+
78,
|
|
1252
|
+
79
|
|
1253
|
+
],
|
|
1254
|
+
inclusive: !1
|
|
1255
|
+
},
|
|
1256
|
+
space: {
|
|
1257
|
+
rules: [],
|
|
1258
|
+
inclusive: !1
|
|
1259
|
+
},
|
|
1260
|
+
string: {
|
|
1261
|
+
rules: [
|
|
1262
|
+
12,
|
|
1263
|
+
13,
|
|
1264
|
+
82,
|
|
1265
|
+
83
|
|
1266
|
+
],
|
|
1267
|
+
inclusive: !1
|
|
1268
|
+
},
|
|
1269
|
+
acc_descr_multiline: {
|
|
1270
|
+
rules: [34, 35],
|
|
1271
|
+
inclusive: !1
|
|
1272
|
+
},
|
|
1273
|
+
acc_descr: {
|
|
1274
|
+
rules: [32],
|
|
1275
|
+
inclusive: !1
|
|
1276
|
+
},
|
|
1277
|
+
acc_title: {
|
|
1278
|
+
rules: [30],
|
|
1279
|
+
inclusive: !1
|
|
1280
|
+
},
|
|
1281
|
+
INITIAL: {
|
|
1282
|
+
rules: [
|
|
1283
|
+
0,
|
|
1284
|
+
1,
|
|
1285
|
+
2,
|
|
1286
|
+
3,
|
|
1287
|
+
4,
|
|
1288
|
+
5,
|
|
1289
|
+
6,
|
|
1290
|
+
7,
|
|
1291
|
+
8,
|
|
1292
|
+
11,
|
|
1293
|
+
14,
|
|
1294
|
+
15,
|
|
1295
|
+
16,
|
|
1296
|
+
17,
|
|
1297
|
+
18,
|
|
1298
|
+
19,
|
|
1299
|
+
23,
|
|
1300
|
+
26,
|
|
1301
|
+
29,
|
|
1302
|
+
31,
|
|
1303
|
+
33,
|
|
1304
|
+
36,
|
|
1305
|
+
54,
|
|
1306
|
+
55,
|
|
1307
|
+
56,
|
|
1308
|
+
57,
|
|
1309
|
+
58,
|
|
1310
|
+
59,
|
|
1311
|
+
60,
|
|
1312
|
+
61,
|
|
1313
|
+
62,
|
|
1314
|
+
63,
|
|
1315
|
+
64,
|
|
1316
|
+
65,
|
|
1317
|
+
66,
|
|
1318
|
+
67,
|
|
1319
|
+
68,
|
|
1320
|
+
69,
|
|
1321
|
+
70,
|
|
1322
|
+
71,
|
|
1323
|
+
72,
|
|
1324
|
+
73,
|
|
1325
|
+
74,
|
|
1326
|
+
75,
|
|
1327
|
+
92,
|
|
1328
|
+
93,
|
|
1329
|
+
94,
|
|
1330
|
+
95,
|
|
1331
|
+
96,
|
|
1332
|
+
97,
|
|
1333
|
+
98,
|
|
1334
|
+
104
|
|
1335
|
+
],
|
|
1336
|
+
inclusive: !0
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
})();
|
|
1341
|
+
function N() {
|
|
1342
|
+
this.yy = {};
|
|
1343
|
+
}
|
|
1344
|
+
return u(N, "Parser"), N.prototype = S, S.Parser = N, new N();
|
|
1345
|
+
})();
|
|
1346
|
+
mt.parser = mt;
|
|
1347
|
+
var sr = mt, H = /* @__PURE__ */ new Map(), Tt = [], wt = /* @__PURE__ */ new Map(), At = "color", zt = "fill", ir = "bgFill", Xt = ",", nt = /* @__PURE__ */ new Map(), St = "", nr = /* @__PURE__ */ u((e) => be.sanitizeText(e, C()), "sanitizeText"), cr = /* @__PURE__ */ u(function(e, t = "") {
|
|
1348
|
+
let r = nt.get(e);
|
|
1349
|
+
r || (r = {
|
|
1350
|
+
id: e,
|
|
1351
|
+
styles: [],
|
|
1352
|
+
textStyles: []
|
|
1353
|
+
}, nt.set(e, r)), t?.split(Xt).forEach((n) => {
|
|
1354
|
+
const s = n.replace(/([^;]*);/, "$1").trim();
|
|
1355
|
+
if (RegExp(At).exec(n)) {
|
|
1356
|
+
const i = s.replace(zt, ir).replace(At, zt);
|
|
1357
|
+
r.textStyles.push(i);
|
|
1358
|
+
}
|
|
1359
|
+
r.styles.push(s);
|
|
1360
|
+
});
|
|
1361
|
+
}, "addStyleClass"), lr = /* @__PURE__ */ u(function(e, t = "") {
|
|
1362
|
+
const r = H.get(e);
|
|
1363
|
+
t != null && (r.styles = t.split(Xt));
|
|
1364
|
+
}, "addStyle2Node"), or = /* @__PURE__ */ u(function(e, t) {
|
|
1365
|
+
e.split(",").forEach(function(r) {
|
|
1366
|
+
let n = H.get(r);
|
|
1367
|
+
if (n === void 0) {
|
|
1368
|
+
const s = r.trim();
|
|
1369
|
+
n = {
|
|
1370
|
+
id: s,
|
|
1371
|
+
type: "na",
|
|
1372
|
+
children: []
|
|
1373
|
+
}, H.set(s, n);
|
|
1374
|
+
}
|
|
1375
|
+
n.classes || (n.classes = []), n.classes.push(t);
|
|
1376
|
+
});
|
|
1377
|
+
}, "setCssClass"), Vt = /* @__PURE__ */ u((e, t) => {
|
|
1378
|
+
const r = e.flat(), n = [], s = r.find((i) => i?.type === "column-setting")?.columns ?? -1;
|
|
1379
|
+
for (const i of r) {
|
|
1380
|
+
if (typeof s == "number" && s > 0 && i.type !== "column-setting" && typeof i.widthInColumns == "number" && i.widthInColumns > s && L.warn(`Block ${i.id} width ${i.widthInColumns} exceeds configured column width ${s}`), i.label && (i.label = nr(i.label)), i.type === "classDef") {
|
|
1381
|
+
cr(i.id, i.css);
|
|
1382
|
+
continue;
|
|
1383
|
+
}
|
|
1384
|
+
if (i.type === "applyClass") {
|
|
1385
|
+
or(i.id, i?.styleClass ?? "");
|
|
1386
|
+
continue;
|
|
1387
|
+
}
|
|
1388
|
+
if (i.type === "applyStyles") {
|
|
1389
|
+
i?.stylesStr && lr(i.id, i?.stylesStr);
|
|
1390
|
+
continue;
|
|
1391
|
+
}
|
|
1392
|
+
if (i.type === "column-setting") t.columns = i.columns ?? -1;
|
|
1393
|
+
else if (i.type === "edge") {
|
|
1394
|
+
const a = (wt.get(i.id) ?? 0) + 1;
|
|
1395
|
+
wt.set(i.id, a), i.id = a + "-" + i.id, Tt.push(i);
|
|
1396
|
+
} else {
|
|
1397
|
+
i.label || (i.type === "composite" ? i.label = "" : i.label = i.id);
|
|
1398
|
+
const a = H.get(i.id);
|
|
1399
|
+
if (a === void 0 ? H.set(i.id, i) : (i.type !== "na" && (a.type = i.type), i.label !== i.id && (a.label = i.label)), i.children && Vt(i.children, i), i.type === "space") {
|
|
1400
|
+
const c = i.width ?? 1;
|
|
1401
|
+
for (let l = 0; l < c; l++) {
|
|
1402
|
+
const g = $e(i);
|
|
1403
|
+
g.id = g.id + "-" + l, H.set(g.id, g), n.push(g);
|
|
1404
|
+
}
|
|
1405
|
+
} else a === void 0 && n.push(i);
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
t.children = n;
|
|
1409
|
+
}, "populateBlockDatabase"), Lt = [], tt = {
|
|
1410
|
+
id: "root",
|
|
1411
|
+
type: "composite",
|
|
1412
|
+
children: [],
|
|
1413
|
+
columns: -1
|
|
1414
|
+
}, hr = /* @__PURE__ */ u(() => {
|
|
1415
|
+
L.debug("Clear called"), pe(), tt = {
|
|
1416
|
+
id: "root",
|
|
1417
|
+
type: "composite",
|
|
1418
|
+
children: [],
|
|
1419
|
+
columns: -1
|
|
1420
|
+
}, H = /* @__PURE__ */ new Map([["root", tt]]), Lt = [], nt = /* @__PURE__ */ new Map(), Tt = [], wt = /* @__PURE__ */ new Map(), St = "";
|
|
1421
|
+
}, "clear");
|
|
1422
|
+
function jt(e) {
|
|
1423
|
+
switch (L.debug("typeStr2Type", e), e) {
|
|
1424
|
+
case "[]":
|
|
1425
|
+
return "square";
|
|
1426
|
+
case "()":
|
|
1427
|
+
return L.debug("we have a round"), "round";
|
|
1428
|
+
case "(())":
|
|
1429
|
+
return "circle";
|
|
1430
|
+
case ">]":
|
|
1431
|
+
return "rect_left_inv_arrow";
|
|
1432
|
+
case "{}":
|
|
1433
|
+
return "diamond";
|
|
1434
|
+
case "{{}}":
|
|
1435
|
+
return "hexagon";
|
|
1436
|
+
case "([])":
|
|
1437
|
+
return "stadium";
|
|
1438
|
+
case "[[]]":
|
|
1439
|
+
return "subroutine";
|
|
1440
|
+
case "[()]":
|
|
1441
|
+
return "cylinder";
|
|
1442
|
+
case "((()))":
|
|
1443
|
+
return "doublecircle";
|
|
1444
|
+
case "[//]":
|
|
1445
|
+
return "lean_right";
|
|
1446
|
+
case "[\\\\]":
|
|
1447
|
+
return "lean_left";
|
|
1448
|
+
case "[/\\]":
|
|
1449
|
+
return "trapezoid";
|
|
1450
|
+
case "[\\/]":
|
|
1451
|
+
return "inv_trapezoid";
|
|
1452
|
+
case "<[]>":
|
|
1453
|
+
return "block_arrow";
|
|
1454
|
+
default:
|
|
1455
|
+
return "na";
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
u(jt, "typeStr2Type");
|
|
1459
|
+
function Gt(e) {
|
|
1460
|
+
return L.debug("typeStr2Type", e), e === "==" ? "thick" : "normal";
|
|
1461
|
+
}
|
|
1462
|
+
u(Gt, "edgeTypeStr2Type");
|
|
1463
|
+
function Zt(e) {
|
|
1464
|
+
switch (e.trim().slice(-1)) {
|
|
1465
|
+
case "x":
|
|
1466
|
+
return "arrow_cross";
|
|
1467
|
+
case "o":
|
|
1468
|
+
return "arrow_circle";
|
|
1469
|
+
case ">":
|
|
1470
|
+
return "arrow_point";
|
|
1471
|
+
default:
|
|
1472
|
+
return "";
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
u(Zt, "edgeStrToEdgeData");
|
|
1476
|
+
function qt(e) {
|
|
1477
|
+
switch (e.trim().charAt(0)) {
|
|
1478
|
+
case "x":
|
|
1479
|
+
return "arrow_cross";
|
|
1480
|
+
case "o":
|
|
1481
|
+
return "arrow_circle";
|
|
1482
|
+
case "<":
|
|
1483
|
+
return "arrow_point";
|
|
1484
|
+
default:
|
|
1485
|
+
return "arrow_open";
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
u(qt, "edgeStrToEdgeStartData");
|
|
1489
|
+
function Jt(e) {
|
|
1490
|
+
return e.includes("==") ? "thick" : "normal";
|
|
1491
|
+
}
|
|
1492
|
+
u(Jt, "edgeStrToThickness");
|
|
1493
|
+
function Qt(e) {
|
|
1494
|
+
return e.includes(".-") ? "dotted" : "solid";
|
|
1495
|
+
}
|
|
1496
|
+
u(Qt, "edgeStrToPattern");
|
|
1497
|
+
var Mt = 0, gr = {
|
|
1498
|
+
getConfig: /* @__PURE__ */ u(() => et().block, "getConfig"),
|
|
1499
|
+
typeStr2Type: jt,
|
|
1500
|
+
edgeTypeStr2Type: Gt,
|
|
1501
|
+
edgeStrToEdgeData: Zt,
|
|
1502
|
+
edgeStrToEdgeStartData: qt,
|
|
1503
|
+
edgeStrToThickness: Jt,
|
|
1504
|
+
edgeStrToPattern: Qt,
|
|
1505
|
+
getLogger: /* @__PURE__ */ u(() => L, "getLogger"),
|
|
1506
|
+
getBlocksFlat: /* @__PURE__ */ u(() => [...H.values()], "getBlocksFlat"),
|
|
1507
|
+
getBlocks: /* @__PURE__ */ u(() => Lt || [], "getBlocks"),
|
|
1508
|
+
getEdges: /* @__PURE__ */ u(() => Tt, "getEdges"),
|
|
1509
|
+
setHierarchy: /* @__PURE__ */ u((e) => {
|
|
1510
|
+
tt.children = e, Vt(e, tt), Lt = tt.children;
|
|
1511
|
+
}, "setHierarchy"),
|
|
1512
|
+
getBlock: /* @__PURE__ */ u((e) => H.get(e), "getBlock"),
|
|
1513
|
+
setBlock: /* @__PURE__ */ u((e) => {
|
|
1514
|
+
H.set(e.id, e);
|
|
1515
|
+
}, "setBlock"),
|
|
1516
|
+
getColumns: /* @__PURE__ */ u((e) => {
|
|
1517
|
+
const t = H.get(e);
|
|
1518
|
+
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
1519
|
+
}, "getColumns"),
|
|
1520
|
+
getClasses: /* @__PURE__ */ u(function() {
|
|
1521
|
+
return nt;
|
|
1522
|
+
}, "getClasses"),
|
|
1523
|
+
clear: hr,
|
|
1524
|
+
generateId: /* @__PURE__ */ u(() => (Mt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Mt), "generateId"),
|
|
1525
|
+
setDiagramId: /* @__PURE__ */ u((e) => {
|
|
1526
|
+
St = e;
|
|
1527
|
+
}, "setDiagramId"),
|
|
1528
|
+
getDiagramId: /* @__PURE__ */ u(() => St, "getDiagramId")
|
|
1529
|
+
}, bt = /* @__PURE__ */ u((e, t) => {
|
|
1530
|
+
const r = me, n = r(e, "r"), s = r(e, "g"), i = r(e, "b");
|
|
1531
|
+
return ye(n, s, i, t);
|
|
1532
|
+
}, "fade"), ur = /* @__PURE__ */ u((e) => `.label {
|
|
1533
|
+
font-family: ${e.fontFamily};
|
|
1534
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
1535
|
+
}
|
|
1536
|
+
.cluster-label text {
|
|
1537
|
+
fill: ${e.titleColor};
|
|
1538
|
+
}
|
|
1539
|
+
.cluster-label span,p {
|
|
1540
|
+
color: ${e.titleColor};
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
.label text,span,p {
|
|
1546
|
+
fill: ${e.nodeTextColor || e.textColor};
|
|
1547
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
.node rect,
|
|
1551
|
+
.node circle,
|
|
1552
|
+
.node ellipse,
|
|
1553
|
+
.node polygon,
|
|
1554
|
+
.node path {
|
|
1555
|
+
fill: ${e.mainBkg};
|
|
1556
|
+
stroke: ${e.nodeBorder};
|
|
1557
|
+
stroke-width: 1px;
|
|
1558
|
+
}
|
|
1559
|
+
.flowchart-label text {
|
|
1560
|
+
text-anchor: middle;
|
|
1561
|
+
}
|
|
1562
|
+
// .flowchart-label .text-outer-tspan {
|
|
1563
|
+
// text-anchor: middle;
|
|
1564
|
+
// }
|
|
1565
|
+
// .flowchart-label .text-inner-tspan {
|
|
1566
|
+
// text-anchor: start;
|
|
1567
|
+
// }
|
|
1568
|
+
|
|
1569
|
+
.node .label {
|
|
1570
|
+
text-align: center;
|
|
1571
|
+
}
|
|
1572
|
+
.node.clickable {
|
|
1573
|
+
cursor: pointer;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
.arrowheadPath {
|
|
1577
|
+
fill: ${e.arrowheadColor};
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
.edgePath .path {
|
|
1581
|
+
stroke: ${e.lineColor};
|
|
1582
|
+
stroke-width: 2.0px;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
.flowchart-link {
|
|
1586
|
+
stroke: ${e.lineColor};
|
|
1587
|
+
fill: none;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
.edgeLabel {
|
|
1591
|
+
background-color: ${e.edgeLabelBackground};
|
|
1592
|
+
/*
|
|
1593
|
+
* This is for backward compatibility with existing code that didn't
|
|
1594
|
+
* add a \`<p>\` around edge labels.
|
|
1595
|
+
*
|
|
1596
|
+
* TODO: We should probably remove this in a future release.
|
|
1597
|
+
*/
|
|
1598
|
+
p {
|
|
1599
|
+
margin: 0;
|
|
1600
|
+
padding: 0;
|
|
1601
|
+
display: inline;
|
|
1602
|
+
}
|
|
1603
|
+
rect {
|
|
1604
|
+
opacity: 0.5;
|
|
1605
|
+
background-color: ${e.edgeLabelBackground};
|
|
1606
|
+
fill: ${e.edgeLabelBackground};
|
|
1607
|
+
}
|
|
1608
|
+
text-align: center;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
/* For html labels only */
|
|
1612
|
+
.labelBkg {
|
|
1613
|
+
background-color: ${e.edgeLabelBackground};
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
.node .cluster {
|
|
1617
|
+
// fill: ${bt(e.mainBkg, 0.5)};
|
|
1618
|
+
fill: ${bt(e.clusterBkg, 0.5)};
|
|
1619
|
+
stroke: ${bt(e.clusterBorder, 0.2)};
|
|
1620
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
1621
|
+
stroke-width: 1px;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
.cluster text {
|
|
1625
|
+
fill: ${e.titleColor};
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
.cluster span,p {
|
|
1629
|
+
color: ${e.titleColor};
|
|
1630
|
+
}
|
|
1631
|
+
/* .cluster div {
|
|
1632
|
+
color: ${e.titleColor};
|
|
1633
|
+
} */
|
|
1634
|
+
|
|
1635
|
+
div.mermaidTooltip {
|
|
1636
|
+
position: absolute;
|
|
1637
|
+
text-align: center;
|
|
1638
|
+
max-width: 200px;
|
|
1639
|
+
padding: 2px;
|
|
1640
|
+
font-family: ${e.fontFamily};
|
|
1641
|
+
font-size: 12px;
|
|
1642
|
+
background: ${e.tertiaryColor};
|
|
1643
|
+
border: 1px solid ${e.border2};
|
|
1644
|
+
border-radius: 2px;
|
|
1645
|
+
pointer-events: none;
|
|
1646
|
+
z-index: 100;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
.flowchartTitleText {
|
|
1650
|
+
text-anchor: middle;
|
|
1651
|
+
font-size: 18px;
|
|
1652
|
+
fill: ${e.textColor};
|
|
1653
|
+
}
|
|
1654
|
+
${je()}
|
|
1655
|
+
`, "getStyles"), dr = /* @__PURE__ */ u((e, t, r, n) => {
|
|
1656
|
+
t.forEach((s) => {
|
|
1657
|
+
fr[s](e, r, n);
|
|
1658
|
+
});
|
|
1659
|
+
}, "insertMarkers"), fr = {
|
|
1660
|
+
extension: /* @__PURE__ */ u((e, t, r) => {
|
|
1661
|
+
L.trace("Making markers for ", r), e.append("defs").append("marker").attr("id", r + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", r + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
1662
|
+
}, "extension"),
|
|
1663
|
+
composition: /* @__PURE__ */ u((e, t, r) => {
|
|
1664
|
+
e.append("defs").append("marker").attr("id", r + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", r + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1665
|
+
}, "composition"),
|
|
1666
|
+
aggregation: /* @__PURE__ */ u((e, t, r) => {
|
|
1667
|
+
e.append("defs").append("marker").attr("id", r + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", r + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1668
|
+
}, "aggregation"),
|
|
1669
|
+
dependency: /* @__PURE__ */ u((e, t, r) => {
|
|
1670
|
+
e.append("defs").append("marker").attr("id", r + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", r + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
1671
|
+
}, "dependency"),
|
|
1672
|
+
lollipop: /* @__PURE__ */ u((e, t, r) => {
|
|
1673
|
+
e.append("defs").append("marker").attr("id", r + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", r + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
1674
|
+
}, "lollipop"),
|
|
1675
|
+
point: /* @__PURE__ */ u((e, t, r) => {
|
|
1676
|
+
e.append("marker").attr("id", r + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", r + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1677
|
+
}, "point"),
|
|
1678
|
+
circle: /* @__PURE__ */ u((e, t, r) => {
|
|
1679
|
+
e.append("marker").attr("id", r + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", r + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1680
|
+
}, "circle"),
|
|
1681
|
+
cross: /* @__PURE__ */ u((e, t, r) => {
|
|
1682
|
+
e.append("marker").attr("id", r + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", r + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
1683
|
+
}, "cross"),
|
|
1684
|
+
barb: /* @__PURE__ */ u((e, t, r) => {
|
|
1685
|
+
e.append("defs").append("marker").attr("id", r + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
1686
|
+
}, "barb")
|
|
1687
|
+
}, pr = dr;
|
|
1688
|
+
function kt(e, t) {
|
|
1689
|
+
if (e === 0 || !Number.isInteger(e)) throw new Error("Columns must be an integer !== 0.");
|
|
1690
|
+
if (t < 0 || !Number.isInteger(t)) throw new Error("Position must be a non-negative integer." + t);
|
|
1691
|
+
return e < 0 ? {
|
|
1692
|
+
px: t,
|
|
1693
|
+
py: 0
|
|
1694
|
+
} : e === 1 ? {
|
|
1695
|
+
px: 0,
|
|
1696
|
+
py: t
|
|
1697
|
+
} : {
|
|
1698
|
+
px: t % e,
|
|
1699
|
+
py: Math.floor(t / e)
|
|
1700
|
+
};
|
|
1701
|
+
}
|
|
1702
|
+
u(kt, "calculateBlockPosition");
|
|
1703
|
+
var xr = /* @__PURE__ */ u((e) => {
|
|
1704
|
+
let t = 0, r = 0;
|
|
1705
|
+
for (const n of e.children) {
|
|
1706
|
+
const { width: s, height: i, x: a, y: c } = n.size ?? {
|
|
1707
|
+
width: 0,
|
|
1708
|
+
height: 0,
|
|
1709
|
+
x: 0,
|
|
1710
|
+
y: 0
|
|
1711
|
+
};
|
|
1712
|
+
if (L.debug("getMaxChildSize abc95 child:", n.id, "width:", s, "height:", i, "x:", a, "y:", c, n.type), n.type === "space") continue;
|
|
1713
|
+
const l = s / (n.widthInColumns ?? 1);
|
|
1714
|
+
l > t && (t = l), i > r && (r = i);
|
|
1715
|
+
}
|
|
1716
|
+
return {
|
|
1717
|
+
width: t,
|
|
1718
|
+
height: r
|
|
1719
|
+
};
|
|
1720
|
+
}, "getMaxChildSize");
|
|
1721
|
+
function ct(e, t, r = 0, n = 0, s = 8) {
|
|
1722
|
+
L.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", r), e?.size?.width || (e.size = {
|
|
1723
|
+
width: r,
|
|
1724
|
+
height: n,
|
|
1725
|
+
x: 0,
|
|
1726
|
+
y: 0
|
|
1727
|
+
});
|
|
1728
|
+
let i = 0, a = 0;
|
|
1729
|
+
if (e.children?.length > 0) {
|
|
1730
|
+
for (const y of e.children) ct(y, t, 0, 0, s);
|
|
1731
|
+
const c = xr(e);
|
|
1732
|
+
i = c.width, a = c.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, a);
|
|
1733
|
+
for (const y of e.children) y.size && (L.debug(`abc95 Setting size of children of ${e.id} id=${y.id} ${i} ${a} ${JSON.stringify(y.size)}`), y.size.width = i * (y.widthInColumns ?? 1) + s * ((y.widthInColumns ?? 1) - 1), y.size.height = a, y.size.x = 0, y.size.y = 0, L.debug(`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${i} maxHeight:${a}`));
|
|
1734
|
+
for (const y of e.children) ct(y, t, i, a, s);
|
|
1735
|
+
const l = e.columns ?? -1;
|
|
1736
|
+
let g = 0;
|
|
1737
|
+
for (const y of e.children) g += y.widthInColumns ?? 1;
|
|
1738
|
+
let o = e.children.length;
|
|
1739
|
+
l > 0 && l < g && (o = l);
|
|
1740
|
+
const d = Math.ceil(g / o);
|
|
1741
|
+
let x = o * (i + s) + s, m = d * (a + s) + s;
|
|
1742
|
+
if (x < r) {
|
|
1743
|
+
L.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${r} siblingHeight ${n} width ${x}`), x = r, m = n;
|
|
1744
|
+
const y = (r - o * s - s) / o, v = (n - d * s - s) / d;
|
|
1745
|
+
L.debug("Size indata abc88", e.id, "childWidth", y, "maxWidth", i), L.debug("Size indata abc88", e.id, "childHeight", v, "maxHeight", a), L.debug("Size indata abc88 xSize", o, "padding", s);
|
|
1746
|
+
for (const S of e.children) S.size && (S.size.width = y, S.size.height = v, S.size.x = 0, S.size.y = 0);
|
|
1747
|
+
}
|
|
1748
|
+
if (L.debug(`abc95 (finale calc) ${e.id} xSize ${o} ySize ${d} columns ${l}${e.children.length} width=${Math.max(x, e.size?.width || 0)}`), x < (e?.size?.width || 0)) {
|
|
1749
|
+
x = e?.size?.width || 0;
|
|
1750
|
+
const y = l > 0 ? Math.min(e.children.length, l) : e.children.length;
|
|
1751
|
+
if (y > 0) {
|
|
1752
|
+
const v = (x - y * s - s) / y;
|
|
1753
|
+
L.debug("abc95 (growing to fit) width", e.id, x, e.size?.width, v);
|
|
1754
|
+
for (const S of e.children) S.size && (S.size.width = v);
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
e.size = {
|
|
1758
|
+
width: x,
|
|
1759
|
+
height: m,
|
|
1760
|
+
x: 0,
|
|
1761
|
+
y: 0
|
|
1762
|
+
};
|
|
1763
|
+
}
|
|
1764
|
+
L.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
|
|
1765
|
+
}
|
|
1766
|
+
u(ct, "setBlockSizes");
|
|
1767
|
+
function Dt(e, t, r = 8) {
|
|
1768
|
+
L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
|
|
1769
|
+
const n = e.columns ?? -1;
|
|
1770
|
+
if (L.debug("layoutBlocks columns abc95", e.id, "=>", n, e), e.children && e.children.length > 0) {
|
|
1771
|
+
const s = e?.children[0]?.size?.width ?? 0, i = e.children.length * s + (e.children.length - 1) * r;
|
|
1772
|
+
L.debug("widthOfChildren 88", i, "posX");
|
|
1773
|
+
const a = /* @__PURE__ */ new Map();
|
|
1774
|
+
{
|
|
1775
|
+
let d = 0;
|
|
1776
|
+
for (const x of e.children) {
|
|
1777
|
+
if (!x.size) continue;
|
|
1778
|
+
const { py: m } = kt(n, d), y = a.get(m) ?? 0;
|
|
1779
|
+
x.size.height > y && a.set(m, x.size.height);
|
|
1780
|
+
let v = x?.widthInColumns ?? 1;
|
|
1781
|
+
n > 0 && (v = Math.min(v, n - d % n)), d += v;
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
const c = /* @__PURE__ */ new Map();
|
|
1785
|
+
{
|
|
1786
|
+
let d = 0;
|
|
1787
|
+
const x = [...a.keys()].sort((m, y) => m - y);
|
|
1788
|
+
for (const m of x)
|
|
1789
|
+
c.set(m, d), d += (a.get(m) ?? 0) + r;
|
|
1790
|
+
}
|
|
1791
|
+
let l = 0;
|
|
1792
|
+
L.debug("abc91 block?.size?.x", e.id, e?.size?.x);
|
|
1793
|
+
let g = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -r, o = 0;
|
|
1794
|
+
for (const d of e.children) {
|
|
1795
|
+
const x = e;
|
|
1796
|
+
if (!d.size) continue;
|
|
1797
|
+
const { width: m, height: y } = d.size, { px: v, py: S } = kt(n, l);
|
|
1798
|
+
if (S != o && (o = S, g = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -r, L.debug("New row in layout for block", e.id, " and child ", d.id, o)), L.debug(`abc89 layout blocks (child) id: ${d.id} Pos: ${l} (px, py) ${v},${S} (${x?.size?.x},${x?.size?.y}) parent: ${x.id} width: ${m}${r}`), x.size) {
|
|
1799
|
+
const w = m / 2;
|
|
1800
|
+
d.size.x = g + r + w, L.debug(`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${g} new startingPosX${d.size.x} ${w} padding=${r} width=${m} halfWidth=${w} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 ${m * (d?.widthInColumns ?? 1) / 2}`), g = d.size.x + w;
|
|
1801
|
+
const f = c.get(S) ?? 0, b = a.get(S) ?? y;
|
|
1802
|
+
d.size.y = x.size.y - x.size.height / 2 + f + b / 2 + r, L.debug(`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${g}${r}${w}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${m * (d?.widthInColumns ?? 1) / 2}`);
|
|
1803
|
+
}
|
|
1804
|
+
d.children && Dt(d, t, r);
|
|
1805
|
+
let N = d?.widthInColumns ?? 1;
|
|
1806
|
+
n > 0 && (N = Math.min(N, n - l % n)), l += N, L.debug("abc88 columnsPos", d, l);
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
|
|
1810
|
+
}
|
|
1811
|
+
u(Dt, "layoutBlocks");
|
|
1812
|
+
function Nt(e, { minX: t, minY: r, maxX: n, maxY: s } = {
|
|
1813
|
+
minX: 0,
|
|
1814
|
+
minY: 0,
|
|
1815
|
+
maxX: 0,
|
|
1816
|
+
maxY: 0
|
|
1817
|
+
}) {
|
|
1818
|
+
if (e.size && e.id !== "root") {
|
|
1819
|
+
const { x: i, y: a, width: c, height: l } = e.size;
|
|
1820
|
+
i - c / 2 < t && (t = i - c / 2), a - l / 2 < r && (r = a - l / 2), i + c / 2 > n && (n = i + c / 2), a + l / 2 > s && (s = a + l / 2);
|
|
1821
|
+
}
|
|
1822
|
+
if (e.children) for (const i of e.children) ({ minX: t, minY: r, maxX: n, maxY: s } = Nt(i, {
|
|
1823
|
+
minX: t,
|
|
1824
|
+
minY: r,
|
|
1825
|
+
maxX: n,
|
|
1826
|
+
maxY: s
|
|
1827
|
+
}));
|
|
1828
|
+
return {
|
|
1829
|
+
minX: t,
|
|
1830
|
+
minY: r,
|
|
1831
|
+
maxX: n,
|
|
1832
|
+
maxY: s
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
u(Nt, "findBounds");
|
|
1836
|
+
function $t(e) {
|
|
1837
|
+
const t = e.getBlock("root");
|
|
1838
|
+
if (!t) return;
|
|
1839
|
+
const r = C()?.block?.padding ?? 8;
|
|
1840
|
+
ct(t, e, 0, 0, r), Dt(t, e, r), L.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1841
|
+
const { minX: n, minY: s, maxX: i, maxY: a } = Nt(t), c = a - s;
|
|
1842
|
+
return {
|
|
1843
|
+
x: n,
|
|
1844
|
+
y: s,
|
|
1845
|
+
width: i - n,
|
|
1846
|
+
height: c
|
|
1847
|
+
};
|
|
1848
|
+
}
|
|
1849
|
+
u($t, "layout");
|
|
1850
|
+
var K = /* @__PURE__ */ u(async (e, t, r, n = !1, s = !1) => {
|
|
1851
|
+
let i = t || "";
|
|
1852
|
+
typeof i == "object" && (i = i[0]);
|
|
1853
|
+
const a = C(), c = M(a);
|
|
1854
|
+
return await _t(e, i, {
|
|
1855
|
+
style: r,
|
|
1856
|
+
isTitle: n,
|
|
1857
|
+
useHtmlLabels: c,
|
|
1858
|
+
markdown: !1,
|
|
1859
|
+
isNode: s,
|
|
1860
|
+
width: Number.POSITIVE_INFINITY
|
|
1861
|
+
}, a);
|
|
1862
|
+
}, "createLabel"), yr = /* @__PURE__ */ u((e, t, r, n, s) => {
|
|
1863
|
+
t.arrowTypeStart && Pt(e, "start", t.arrowTypeStart, r, n, s), t.arrowTypeEnd && Pt(e, "end", t.arrowTypeEnd, r, n, s);
|
|
1864
|
+
}, "addEdgeMarkers"), br = {
|
|
1865
|
+
arrow_cross: "cross",
|
|
1866
|
+
arrow_point: "point",
|
|
1867
|
+
arrow_barb: "barb",
|
|
1868
|
+
arrow_circle: "circle",
|
|
1869
|
+
aggregation: "aggregation",
|
|
1870
|
+
extension: "extension",
|
|
1871
|
+
composition: "composition",
|
|
1872
|
+
dependency: "dependency",
|
|
1873
|
+
lollipop: "lollipop"
|
|
1874
|
+
}, Pt = /* @__PURE__ */ u((e, t, r, n, s, i) => {
|
|
1875
|
+
const a = br[r];
|
|
1876
|
+
if (!a) {
|
|
1877
|
+
L.warn(`Unknown arrow type: ${r}`);
|
|
1878
|
+
return;
|
|
1879
|
+
}
|
|
1880
|
+
const c = t === "start" ? "Start" : "End";
|
|
1881
|
+
e.attr(`marker-${t}`, `url(${n}#${s}_${i}-${a}${c})`);
|
|
1882
|
+
}, "addEdgeMarker"), vt = {}, A = {}, mr = /* @__PURE__ */ u(async (e, t) => {
|
|
1883
|
+
const r = C(), n = M(r), s = e.insert("g").attr("class", "edgeLabel"), i = s.insert("g").attr("class", "label"), a = t.labelType === "markdown", c = await _t(e, t.label, {
|
|
1884
|
+
style: t.labelStyle,
|
|
1885
|
+
useHtmlLabels: n,
|
|
1886
|
+
addSvgBackground: a,
|
|
1887
|
+
isNode: !1,
|
|
1888
|
+
markdown: a,
|
|
1889
|
+
width: a ? void 0 : Number.POSITIVE_INFINITY
|
|
1890
|
+
}, r);
|
|
1891
|
+
i.node().appendChild(c);
|
|
1892
|
+
let l = c.getBBox(), g = l;
|
|
1893
|
+
if (n) {
|
|
1894
|
+
const d = c.children[0], x = T(c);
|
|
1895
|
+
l = d.getBoundingClientRect(), g = l, x.attr("width", l.width), x.attr("height", l.height);
|
|
1896
|
+
} else {
|
|
1897
|
+
const d = T(c).select("text").node();
|
|
1898
|
+
d && typeof d.getBBox == "function" && (g = d.getBBox());
|
|
1899
|
+
}
|
|
1900
|
+
i.attr("transform", Q(g, n)), vt[t.id] = s, t.width = l.width, t.height = l.height;
|
|
1901
|
+
let o;
|
|
1902
|
+
if (t.startLabelLeft) {
|
|
1903
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), x = d.insert("g").attr("class", "inner"), m = await K(x, t.startLabelLeft, t.labelStyle);
|
|
1904
|
+
o = m;
|
|
1905
|
+
let y = m.getBBox();
|
|
1906
|
+
if (n) {
|
|
1907
|
+
const v = m.children[0], S = T(m);
|
|
1908
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1909
|
+
}
|
|
1910
|
+
x.attr("transform", Q(y, n)), A[t.id] || (A[t.id] = {}), A[t.id].startLeft = d, $(o, t.startLabelLeft);
|
|
1911
|
+
}
|
|
1912
|
+
if (t.startLabelRight) {
|
|
1913
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), x = d.insert("g").attr("class", "inner"), m = await K(x, t.startLabelRight, t.labelStyle);
|
|
1914
|
+
o = m;
|
|
1915
|
+
let y = m.getBBox();
|
|
1916
|
+
if (n) {
|
|
1917
|
+
const v = m.children[0], S = T(m);
|
|
1918
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1919
|
+
}
|
|
1920
|
+
x.attr("transform", Q(y, n)), A[t.id] || (A[t.id] = {}), A[t.id].startRight = d, $(o, t.startLabelRight);
|
|
1921
|
+
}
|
|
1922
|
+
if (t.endLabelLeft) {
|
|
1923
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), x = d.insert("g").attr("class", "inner"), m = await K(d, t.endLabelLeft, t.labelStyle);
|
|
1924
|
+
o = m;
|
|
1925
|
+
let y = m.getBBox();
|
|
1926
|
+
if (n) {
|
|
1927
|
+
const v = m.children[0], S = T(m);
|
|
1928
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1929
|
+
}
|
|
1930
|
+
x.attr("transform", Q(y, n)), A[t.id] || (A[t.id] = {}), A[t.id].endLeft = d, $(o, t.endLabelLeft);
|
|
1931
|
+
}
|
|
1932
|
+
if (t.endLabelRight) {
|
|
1933
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), x = d.insert("g").attr("class", "inner"), m = await K(d, t.endLabelRight, t.labelStyle);
|
|
1934
|
+
o = m;
|
|
1935
|
+
let y = m.getBBox();
|
|
1936
|
+
if (n) {
|
|
1937
|
+
const v = m.children[0], S = T(m);
|
|
1938
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1939
|
+
}
|
|
1940
|
+
x.attr("transform", Q(y, n)), A[t.id] || (A[t.id] = {}), A[t.id].endRight = d, $(o, t.endLabelRight);
|
|
1941
|
+
}
|
|
1942
|
+
return c;
|
|
1943
|
+
}, "insertEdgeLabel");
|
|
1944
|
+
function $(e, t) {
|
|
1945
|
+
M(C()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1946
|
+
}
|
|
1947
|
+
u($, "setTerminalWidth");
|
|
1948
|
+
var wr = /* @__PURE__ */ u((e, t) => {
|
|
1949
|
+
L.debug("Moving label abc88 ", e.id, e.label, vt[e.id], t);
|
|
1950
|
+
let r = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
1951
|
+
const { subGraphTitleTotalMargin: n } = Ze(C());
|
|
1952
|
+
if (e.label) {
|
|
1953
|
+
const s = vt[e.id];
|
|
1954
|
+
let i = e.x, a = e.y;
|
|
1955
|
+
if (r) {
|
|
1956
|
+
const c = J.calcLabelPosition(r);
|
|
1957
|
+
L.debug("Moving label " + e.label + " from (", i, ",", a, ") to (", c.x, ",", c.y, ") abc88"), t.updatedPath && (i = c.x, a = c.y);
|
|
1958
|
+
}
|
|
1959
|
+
s.attr("transform", `translate(${i}, ${a + n / 2})`);
|
|
1960
|
+
}
|
|
1961
|
+
if (e.startLabelLeft) {
|
|
1962
|
+
const s = A[e.id].startLeft;
|
|
1963
|
+
let i = e.x, a = e.y;
|
|
1964
|
+
if (r) {
|
|
1965
|
+
const c = J.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", r);
|
|
1966
|
+
i = c.x, a = c.y;
|
|
1967
|
+
}
|
|
1968
|
+
s.attr("transform", `translate(${i}, ${a})`);
|
|
1969
|
+
}
|
|
1970
|
+
if (e.startLabelRight) {
|
|
1971
|
+
const s = A[e.id].startRight;
|
|
1972
|
+
let i = e.x, a = e.y;
|
|
1973
|
+
if (r) {
|
|
1974
|
+
const c = J.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", r);
|
|
1975
|
+
i = c.x, a = c.y;
|
|
1976
|
+
}
|
|
1977
|
+
s.attr("transform", `translate(${i}, ${a})`);
|
|
1978
|
+
}
|
|
1979
|
+
if (e.endLabelLeft) {
|
|
1980
|
+
const s = A[e.id].endLeft;
|
|
1981
|
+
let i = e.x, a = e.y;
|
|
1982
|
+
if (r) {
|
|
1983
|
+
const c = J.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", r);
|
|
1984
|
+
i = c.x, a = c.y;
|
|
1985
|
+
}
|
|
1986
|
+
s.attr("transform", `translate(${i}, ${a})`);
|
|
1987
|
+
}
|
|
1988
|
+
if (e.endLabelRight) {
|
|
1989
|
+
const s = A[e.id].endRight;
|
|
1990
|
+
let i = e.x, a = e.y;
|
|
1991
|
+
if (r) {
|
|
1992
|
+
const c = J.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", r);
|
|
1993
|
+
i = c.x, a = c.y;
|
|
1994
|
+
}
|
|
1995
|
+
s.attr("transform", `translate(${i}, ${a})`);
|
|
1996
|
+
}
|
|
1997
|
+
}, "positionEdgeLabel"), Sr = /* @__PURE__ */ u((e, t) => {
|
|
1998
|
+
const r = e.x, n = e.y, s = Math.abs(t.x - r), i = Math.abs(t.y - n), a = e.width / 2, c = e.height / 2;
|
|
1999
|
+
return s >= a || i >= c;
|
|
2000
|
+
}, "outsideNode"), Lr = /* @__PURE__ */ u((e, t, r) => {
|
|
2001
|
+
L.debug(`intersection calc abc89:
|
|
2002
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
2003
|
+
insidePoint : ${JSON.stringify(r)}
|
|
2004
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
2005
|
+
const n = e.x, s = e.y, i = Math.abs(n - r.x), a = e.width / 2;
|
|
2006
|
+
let c = r.x < t.x ? a - i : a + i;
|
|
2007
|
+
const l = e.height / 2, g = Math.abs(t.y - r.y), o = Math.abs(t.x - r.x);
|
|
2008
|
+
if (Math.abs(s - t.y) * a > Math.abs(n - t.x) * l) {
|
|
2009
|
+
let d = r.y < t.y ? t.y - l - s : s - l - t.y;
|
|
2010
|
+
c = o * d / g;
|
|
2011
|
+
const x = {
|
|
2012
|
+
x: r.x < t.x ? r.x + c : r.x - o + c,
|
|
2013
|
+
y: r.y < t.y ? r.y + g - d : r.y - g + d
|
|
2014
|
+
};
|
|
2015
|
+
return c === 0 && (x.x = t.x, x.y = t.y), o === 0 && (x.x = t.x), g === 0 && (x.y = t.y), L.debug(`abc89 topp/bott calc, Q ${g}, q ${d}, R ${o}, r ${c}`, x), x;
|
|
2016
|
+
} else {
|
|
2017
|
+
r.x < t.x ? c = t.x - a - n : c = n - a - t.x;
|
|
2018
|
+
let d = g * c / o, x = r.x < t.x ? r.x + o - c : r.x - o + c, m = r.y < t.y ? r.y + d : r.y - d;
|
|
2019
|
+
return L.debug(`sides calc abc89, Q ${g}, q ${d}, R ${o}, r ${c}`, {
|
|
2020
|
+
_x: x,
|
|
2021
|
+
_y: m
|
|
2022
|
+
}), c === 0 && (x = t.x, m = t.y), o === 0 && (x = t.x), g === 0 && (m = t.y), {
|
|
2023
|
+
x,
|
|
2024
|
+
y: m
|
|
2025
|
+
};
|
|
2026
|
+
}
|
|
2027
|
+
}, "intersection"), Ft = /* @__PURE__ */ u((e, t) => {
|
|
2028
|
+
L.debug("abc88 cutPathAtIntersect", e, t);
|
|
2029
|
+
let r = [], n = e[0], s = !1;
|
|
2030
|
+
return e.forEach((i) => {
|
|
2031
|
+
if (!Sr(t, i) && !s) {
|
|
2032
|
+
const a = Lr(t, n, i);
|
|
2033
|
+
let c = !1;
|
|
2034
|
+
r.forEach((l) => {
|
|
2035
|
+
c = c || l.x === a.x && l.y === a.y;
|
|
2036
|
+
}), r.some((l) => l.x === a.x && l.y === a.y) || r.push(a), s = !0;
|
|
2037
|
+
} else
|
|
2038
|
+
n = i, s || r.push(i);
|
|
2039
|
+
}), r;
|
|
2040
|
+
}, "cutPathAtIntersect"), kr = /* @__PURE__ */ u(function(e, t, r, n, s, i, a) {
|
|
2041
|
+
let c = r.points;
|
|
2042
|
+
L.debug("abc88 InsertEdge: edge=", r, "e=", t);
|
|
2043
|
+
let l = !1;
|
|
2044
|
+
const g = i.node(t.v);
|
|
2045
|
+
var o = i.node(t.w);
|
|
2046
|
+
o?.intersect && g?.intersect && (c = c.slice(1, r.points.length - 1), c.unshift(g.intersect(c[0])), c.push(o.intersect(c[c.length - 1]))), r.toCluster && (L.debug("to cluster abc88", n[r.toCluster]), c = Ft(r.points, n[r.toCluster].node), l = !0), r.fromCluster && (L.debug("from cluster abc88", n[r.fromCluster]), c = Ft(c.reverse(), n[r.fromCluster].node).reverse(), l = !0);
|
|
2047
|
+
const d = c.filter((b) => !Number.isNaN(b.y));
|
|
2048
|
+
let x = Fe;
|
|
2049
|
+
r.curve && (s === "graph" || s === "flowchart") && (x = r.curve);
|
|
2050
|
+
const { x: m, y } = Ge(r), v = Ve().x(m).y(y).curve(x);
|
|
2051
|
+
let S;
|
|
2052
|
+
switch (r.thickness) {
|
|
2053
|
+
case "normal":
|
|
2054
|
+
S = "edge-thickness-normal";
|
|
2055
|
+
break;
|
|
2056
|
+
case "thick":
|
|
2057
|
+
S = "edge-thickness-thick";
|
|
2058
|
+
break;
|
|
2059
|
+
case "invisible":
|
|
2060
|
+
S = "edge-thickness-thick";
|
|
2061
|
+
break;
|
|
2062
|
+
default:
|
|
2063
|
+
S = "";
|
|
2064
|
+
}
|
|
2065
|
+
switch (r.pattern) {
|
|
2066
|
+
case "solid":
|
|
2067
|
+
S += " edge-pattern-solid";
|
|
2068
|
+
break;
|
|
2069
|
+
case "dotted":
|
|
2070
|
+
S += " edge-pattern-dotted";
|
|
2071
|
+
break;
|
|
2072
|
+
case "dashed":
|
|
2073
|
+
S += " edge-pattern-dashed";
|
|
2074
|
+
break;
|
|
2075
|
+
}
|
|
2076
|
+
const N = e.append("path").attr("d", v(d)).attr("id", r.id).attr("class", " " + S + (r.classes ? " " + r.classes : "")).attr("style", r.style);
|
|
2077
|
+
let w = "";
|
|
2078
|
+
(C().flowchart.arrowMarkerAbsolute || C().state.arrowMarkerAbsolute) && (w = fe(!0)), yr(N, r, w, a, s);
|
|
2079
|
+
let f = {};
|
|
2080
|
+
return l && (f.updatedPath = c), f.originalPath = r.points, f;
|
|
2081
|
+
}, "insertEdge"), vr = /* @__PURE__ */ u((e) => {
|
|
2082
|
+
const t = /* @__PURE__ */ new Set();
|
|
2083
|
+
for (const r of e) switch (r) {
|
|
2084
|
+
case "x":
|
|
2085
|
+
t.add("right"), t.add("left");
|
|
2086
|
+
break;
|
|
2087
|
+
case "y":
|
|
2088
|
+
t.add("up"), t.add("down");
|
|
2089
|
+
break;
|
|
2090
|
+
default:
|
|
2091
|
+
t.add(r);
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
return t;
|
|
2095
|
+
}, "expandAndDeduplicateDirections"), Er = /* @__PURE__ */ u((e, t, r, n) => {
|
|
2096
|
+
const s = vr(e), i = 2, a = t.height + 2 * r.padding, c = a / i, l = n ?? t.width + 2 * c + r.padding, g = r.padding / 2;
|
|
2097
|
+
return s.has("right") && s.has("left") && s.has("up") && s.has("down") ? [
|
|
2098
|
+
{
|
|
2099
|
+
x: 0,
|
|
2100
|
+
y: 0
|
|
2101
|
+
},
|
|
2102
|
+
{
|
|
2103
|
+
x: c,
|
|
2104
|
+
y: 0
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
x: l / 2,
|
|
2108
|
+
y: 2 * g
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
x: l - c,
|
|
2112
|
+
y: 0
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
x: l,
|
|
2116
|
+
y: 0
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
x: l,
|
|
2120
|
+
y: -a / 3
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
x: l + 2 * g,
|
|
2124
|
+
y: -a / 2
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
x: l,
|
|
2128
|
+
y: -2 * a / 3
|
|
2129
|
+
},
|
|
2130
|
+
{
|
|
2131
|
+
x: l,
|
|
2132
|
+
y: -a
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
x: l - c,
|
|
2136
|
+
y: -a
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
x: l / 2,
|
|
2140
|
+
y: -a - 2 * g
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
x: c,
|
|
2144
|
+
y: -a
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
x: 0,
|
|
2148
|
+
y: -a
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
x: 0,
|
|
2152
|
+
y: -2 * a / 3
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
x: -2 * g,
|
|
2156
|
+
y: -a / 2
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
x: 0,
|
|
2160
|
+
y: -a / 3
|
|
2161
|
+
}
|
|
2162
|
+
] : s.has("right") && s.has("left") && s.has("up") ? [
|
|
2163
|
+
{
|
|
2164
|
+
x: c,
|
|
2165
|
+
y: 0
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
x: l - c,
|
|
2169
|
+
y: 0
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
x: l,
|
|
2173
|
+
y: -a / 2
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
x: l - c,
|
|
2177
|
+
y: -a
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
x: c,
|
|
2181
|
+
y: -a
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
x: 0,
|
|
2185
|
+
y: -a / 2
|
|
2186
|
+
}
|
|
2187
|
+
] : s.has("right") && s.has("left") && s.has("down") ? [
|
|
2188
|
+
{
|
|
2189
|
+
x: 0,
|
|
2190
|
+
y: 0
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
x: c,
|
|
2194
|
+
y: -a
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
x: l - c,
|
|
2198
|
+
y: -a
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
x: l,
|
|
2202
|
+
y: 0
|
|
2203
|
+
}
|
|
2204
|
+
] : s.has("right") && s.has("up") && s.has("down") ? [
|
|
2205
|
+
{
|
|
2206
|
+
x: 0,
|
|
2207
|
+
y: 0
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
x: l,
|
|
2211
|
+
y: -c
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
x: l,
|
|
2215
|
+
y: -a + c
|
|
2216
|
+
},
|
|
2217
|
+
{
|
|
2218
|
+
x: 0,
|
|
2219
|
+
y: -a
|
|
2220
|
+
}
|
|
2221
|
+
] : s.has("left") && s.has("up") && s.has("down") ? [
|
|
2222
|
+
{
|
|
2223
|
+
x: l,
|
|
2224
|
+
y: 0
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
x: 0,
|
|
2228
|
+
y: -c
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
x: 0,
|
|
2232
|
+
y: -a + c
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
x: l,
|
|
2236
|
+
y: -a
|
|
2237
|
+
}
|
|
2238
|
+
] : s.has("right") && s.has("left") ? [
|
|
2239
|
+
{
|
|
2240
|
+
x: c,
|
|
2241
|
+
y: 0
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
x: c,
|
|
2245
|
+
y: -g
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
x: l - c,
|
|
2249
|
+
y: -g
|
|
2250
|
+
},
|
|
2251
|
+
{
|
|
2252
|
+
x: l - c,
|
|
2253
|
+
y: 0
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
x: l,
|
|
2257
|
+
y: -a / 2
|
|
2258
|
+
},
|
|
2259
|
+
{
|
|
2260
|
+
x: l - c,
|
|
2261
|
+
y: -a
|
|
2262
|
+
},
|
|
2263
|
+
{
|
|
2264
|
+
x: l - c,
|
|
2265
|
+
y: -a + g
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
x: c,
|
|
2269
|
+
y: -a + g
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
x: c,
|
|
2273
|
+
y: -a
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
x: 0,
|
|
2277
|
+
y: -a / 2
|
|
2278
|
+
}
|
|
2279
|
+
] : s.has("up") && s.has("down") ? [
|
|
2280
|
+
{
|
|
2281
|
+
x: l / 2,
|
|
2282
|
+
y: 0
|
|
2283
|
+
},
|
|
2284
|
+
{
|
|
2285
|
+
x: 0,
|
|
2286
|
+
y: -g
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
x: c,
|
|
2290
|
+
y: -g
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
x: c,
|
|
2294
|
+
y: -a + g
|
|
2295
|
+
},
|
|
2296
|
+
{
|
|
2297
|
+
x: 0,
|
|
2298
|
+
y: -a + g
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
x: l / 2,
|
|
2302
|
+
y: -a
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
x: l,
|
|
2306
|
+
y: -a + g
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
x: l - c,
|
|
2310
|
+
y: -a + g
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
x: l - c,
|
|
2314
|
+
y: -g
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
x: l,
|
|
2318
|
+
y: -g
|
|
2319
|
+
}
|
|
2320
|
+
] : s.has("right") && s.has("up") ? [
|
|
2321
|
+
{
|
|
2322
|
+
x: 0,
|
|
2323
|
+
y: 0
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
x: l,
|
|
2327
|
+
y: -c
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
x: 0,
|
|
2331
|
+
y: -a
|
|
2332
|
+
}
|
|
2333
|
+
] : s.has("right") && s.has("down") ? [
|
|
2334
|
+
{
|
|
2335
|
+
x: 0,
|
|
2336
|
+
y: 0
|
|
2337
|
+
},
|
|
2338
|
+
{
|
|
2339
|
+
x: l,
|
|
2340
|
+
y: 0
|
|
2341
|
+
},
|
|
2342
|
+
{
|
|
2343
|
+
x: 0,
|
|
2344
|
+
y: -a
|
|
2345
|
+
}
|
|
2346
|
+
] : s.has("left") && s.has("up") ? [
|
|
2347
|
+
{
|
|
2348
|
+
x: l,
|
|
2349
|
+
y: 0
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
x: 0,
|
|
2353
|
+
y: -c
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
x: l,
|
|
2357
|
+
y: -a
|
|
2358
|
+
}
|
|
2359
|
+
] : s.has("left") && s.has("down") ? [
|
|
2360
|
+
{
|
|
2361
|
+
x: l,
|
|
2362
|
+
y: 0
|
|
2363
|
+
},
|
|
2364
|
+
{
|
|
2365
|
+
x: 0,
|
|
2366
|
+
y: 0
|
|
2367
|
+
},
|
|
2368
|
+
{
|
|
2369
|
+
x: l,
|
|
2370
|
+
y: -a
|
|
2371
|
+
}
|
|
2372
|
+
] : s.has("right") ? [
|
|
2373
|
+
{
|
|
2374
|
+
x: c,
|
|
2375
|
+
y: -g
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
x: c,
|
|
2379
|
+
y: -g
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
x: l - c,
|
|
2383
|
+
y: -g
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
x: l - c,
|
|
2387
|
+
y: 0
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
x: l,
|
|
2391
|
+
y: -a / 2
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
x: l - c,
|
|
2395
|
+
y: -a
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
x: l - c,
|
|
2399
|
+
y: -a + g
|
|
2400
|
+
},
|
|
2401
|
+
{
|
|
2402
|
+
x: c,
|
|
2403
|
+
y: -a + g
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
x: c,
|
|
2407
|
+
y: -a + g
|
|
2408
|
+
}
|
|
2409
|
+
] : s.has("left") ? [
|
|
2410
|
+
{
|
|
2411
|
+
x: c,
|
|
2412
|
+
y: 0
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
x: c,
|
|
2416
|
+
y: -g
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
x: l - c,
|
|
2420
|
+
y: -g
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
x: l - c,
|
|
2424
|
+
y: -a + g
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
x: c,
|
|
2428
|
+
y: -a + g
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
x: c,
|
|
2432
|
+
y: -a
|
|
2433
|
+
},
|
|
2434
|
+
{
|
|
2435
|
+
x: 0,
|
|
2436
|
+
y: -a / 2
|
|
2437
|
+
}
|
|
2438
|
+
] : s.has("up") ? [
|
|
2439
|
+
{
|
|
2440
|
+
x: c,
|
|
2441
|
+
y: -g
|
|
2442
|
+
},
|
|
2443
|
+
{
|
|
2444
|
+
x: c,
|
|
2445
|
+
y: -a + g
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
x: 0,
|
|
2449
|
+
y: -a + g
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
x: l / 2,
|
|
2453
|
+
y: -a
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
x: l,
|
|
2457
|
+
y: -a + g
|
|
2458
|
+
},
|
|
2459
|
+
{
|
|
2460
|
+
x: l - c,
|
|
2461
|
+
y: -a + g
|
|
2462
|
+
},
|
|
2463
|
+
{
|
|
2464
|
+
x: l - c,
|
|
2465
|
+
y: -g
|
|
2466
|
+
}
|
|
2467
|
+
] : s.has("down") ? [
|
|
2468
|
+
{
|
|
2469
|
+
x: l / 2,
|
|
2470
|
+
y: 0
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
x: 0,
|
|
2474
|
+
y: -g
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
x: c,
|
|
2478
|
+
y: -g
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
x: c,
|
|
2482
|
+
y: -a + g
|
|
2483
|
+
},
|
|
2484
|
+
{
|
|
2485
|
+
x: l - c,
|
|
2486
|
+
y: -a + g
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
x: l - c,
|
|
2490
|
+
y: -g
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
x: l,
|
|
2494
|
+
y: -g
|
|
2495
|
+
}
|
|
2496
|
+
] : [{
|
|
2497
|
+
x: 0,
|
|
2498
|
+
y: 0
|
|
2499
|
+
}];
|
|
2500
|
+
}, "getArrowPoints");
|
|
2501
|
+
function te(e, t) {
|
|
2502
|
+
return e.intersect(t);
|
|
2503
|
+
}
|
|
2504
|
+
u(te, "intersectNode");
|
|
2505
|
+
var _r = te;
|
|
2506
|
+
function ee(e, t, r, n) {
|
|
2507
|
+
var s = e.x, i = e.y, a = s - n.x, c = i - n.y, l = Math.sqrt(t * t * c * c + r * r * a * a), g = Math.abs(t * r * a / l);
|
|
2508
|
+
n.x < s && (g = -g);
|
|
2509
|
+
var o = Math.abs(t * r * c / l);
|
|
2510
|
+
return n.y < i && (o = -o), {
|
|
2511
|
+
x: s + g,
|
|
2512
|
+
y: i + o
|
|
2513
|
+
};
|
|
2514
|
+
}
|
|
2515
|
+
u(ee, "intersectEllipse");
|
|
2516
|
+
var re = ee;
|
|
2517
|
+
function ae(e, t, r) {
|
|
2518
|
+
return re(e, t, t, r);
|
|
2519
|
+
}
|
|
2520
|
+
u(ae, "intersectCircle");
|
|
2521
|
+
var Tr = ae;
|
|
2522
|
+
function se(e, t, r, n) {
|
|
2523
|
+
var s, i, a, c, l, g, o, d, x, m, y, v, S, N, w;
|
|
2524
|
+
if (s = t.y - e.y, a = e.x - t.x, l = t.x * e.y - e.x * t.y, x = s * r.x + a * r.y + l, m = s * n.x + a * n.y + l, !(x !== 0 && m !== 0 && Et(x, m)) && (i = n.y - r.y, c = r.x - n.x, g = n.x * r.y - r.x * n.y, o = i * e.x + c * e.y + g, d = i * t.x + c * t.y + g, !(o !== 0 && d !== 0 && Et(o, d)) && (y = s * c - i * a, y !== 0)))
|
|
2525
|
+
return v = Math.abs(y / 2), S = a * g - c * l, N = S < 0 ? (S - v) / y : (S + v) / y, S = i * l - s * g, w = S < 0 ? (S - v) / y : (S + v) / y, {
|
|
2526
|
+
x: N,
|
|
2527
|
+
y: w
|
|
2528
|
+
};
|
|
2529
|
+
}
|
|
2530
|
+
u(se, "intersectLine");
|
|
2531
|
+
function Et(e, t) {
|
|
2532
|
+
return e * t > 0;
|
|
2533
|
+
}
|
|
2534
|
+
u(Et, "sameSign");
|
|
2535
|
+
var Dr = se, Nr = ie;
|
|
2536
|
+
function ie(e, t, r) {
|
|
2537
|
+
var n = e.x, s = e.y, i = [], a = Number.POSITIVE_INFINITY, c = Number.POSITIVE_INFINITY;
|
|
2538
|
+
typeof t.forEach == "function" ? t.forEach(function(y) {
|
|
2539
|
+
a = Math.min(a, y.x), c = Math.min(c, y.y);
|
|
2540
|
+
}) : (a = Math.min(a, t.x), c = Math.min(c, t.y));
|
|
2541
|
+
for (var l = n - e.width / 2 - a, g = s - e.height / 2 - c, o = 0; o < t.length; o++) {
|
|
2542
|
+
var d = t[o], x = t[o < t.length - 1 ? o + 1 : 0], m = Dr(e, r, {
|
|
2543
|
+
x: l + d.x,
|
|
2544
|
+
y: g + d.y
|
|
2545
|
+
}, {
|
|
2546
|
+
x: l + x.x,
|
|
2547
|
+
y: g + x.y
|
|
2548
|
+
});
|
|
2549
|
+
m && i.push(m);
|
|
2550
|
+
}
|
|
2551
|
+
return i.length ? (i.length > 1 && i.sort(function(y, v) {
|
|
2552
|
+
var S = y.x - r.x, N = y.y - r.y, w = Math.sqrt(S * S + N * N), f = v.x - r.x, b = v.y - r.y, E = Math.sqrt(f * f + b * b);
|
|
2553
|
+
return w < E ? -1 : w === E ? 0 : 1;
|
|
2554
|
+
}), i[0]) : e;
|
|
2555
|
+
}
|
|
2556
|
+
u(ie, "intersectPolygon");
|
|
2557
|
+
var D = {
|
|
2558
|
+
node: _r,
|
|
2559
|
+
circle: Tr,
|
|
2560
|
+
ellipse: re,
|
|
2561
|
+
polygon: Nr,
|
|
2562
|
+
rect: /* @__PURE__ */ u((e, t) => {
|
|
2563
|
+
var r = e.x, n = e.y, s = t.x - r, i = t.y - n, a = e.width / 2, c = e.height / 2, l, g;
|
|
2564
|
+
return Math.abs(i) * a > Math.abs(s) * c ? (i < 0 && (c = -c), l = i === 0 ? 0 : c * s / i, g = c) : (s < 0 && (a = -a), l = a, g = s === 0 ? 0 : a * i / s), {
|
|
2565
|
+
x: r + l,
|
|
2566
|
+
y: n + g
|
|
2567
|
+
};
|
|
2568
|
+
}, "intersectRect")
|
|
2569
|
+
}, R = /* @__PURE__ */ u(async (e, t, r, n) => {
|
|
2570
|
+
const s = C();
|
|
2571
|
+
let i;
|
|
2572
|
+
const a = t.useHtmlLabels || M(s);
|
|
2573
|
+
r ? i = r : i = "node default";
|
|
2574
|
+
const c = e.insert("g").attr("class", i).attr("id", t.domId || t.id), l = c.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
2575
|
+
let g;
|
|
2576
|
+
t.labelText === void 0 ? g = "" : g = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
2577
|
+
let o;
|
|
2578
|
+
t.labelType === "markdown" ? o = _t(l, Ct(Rt(g), s), {
|
|
2579
|
+
useHtmlLabels: a,
|
|
2580
|
+
width: t.width || s.flowchart.wrappingWidth,
|
|
2581
|
+
classes: "markdown-node-label"
|
|
2582
|
+
}, s) : o = await K(l, Ct(Rt(g), s), t.labelStyle, !1, n);
|
|
2583
|
+
let d = o.getBBox();
|
|
2584
|
+
const x = t.padding / 2;
|
|
2585
|
+
if (M(s)) {
|
|
2586
|
+
const m = o.children[0], y = T(o);
|
|
2587
|
+
await qe(m, g), d = m.getBoundingClientRect(), y.attr("width", d.width), y.attr("height", d.height);
|
|
2588
|
+
}
|
|
2589
|
+
return a ? l.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")") : l.attr("transform", "translate(0, " + -d.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")"), l.insert("rect", ":first-child"), {
|
|
2590
|
+
shapeSvg: c,
|
|
2591
|
+
bbox: d,
|
|
2592
|
+
halfPadding: x,
|
|
2593
|
+
label: l
|
|
2594
|
+
};
|
|
2595
|
+
}, "labelHelper"), I = /* @__PURE__ */ u((e, t) => {
|
|
2596
|
+
const r = t.node().getBBox();
|
|
2597
|
+
e.width = r.width, e.height = r.height;
|
|
2598
|
+
}, "updateNodeBounds");
|
|
2599
|
+
function U(e, t, r, n) {
|
|
2600
|
+
return e.insert("polygon", ":first-child").attr("points", n.map(function(s) {
|
|
2601
|
+
return s.x + "," + s.y;
|
|
2602
|
+
}).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + r / 2 + ")");
|
|
2603
|
+
}
|
|
2604
|
+
u(U, "insertPolygonShape");
|
|
2605
|
+
var Ir = /* @__PURE__ */ u(async (e, t) => {
|
|
2606
|
+
t.useHtmlLabels || M(C()) || (t.centerLabel = !0);
|
|
2607
|
+
const { shapeSvg: r, bbox: n, halfPadding: s } = await R(e, t, "node " + t.classes, !0);
|
|
2608
|
+
L.info("Classes = ", t.classes);
|
|
2609
|
+
const i = r.insert("rect", ":first-child");
|
|
2610
|
+
return i.attr("rx", t.rx).attr("ry", t.ry).attr("x", -n.width / 2 - s).attr("y", -n.height / 2 - s).attr("width", n.width + t.padding).attr("height", n.height + t.padding), I(t, i), t.intersect = function(a) {
|
|
2611
|
+
return D.rect(t, a);
|
|
2612
|
+
}, r;
|
|
2613
|
+
}, "note"), Wt = /* @__PURE__ */ u((e) => e ? " " + e : "", "formatClass"), F = /* @__PURE__ */ u((e, t) => `${t || "node default"}${Wt(e.classes)} ${Wt(e.class)}`, "getClassesFromNode"), Yt = /* @__PURE__ */ u(async (e, t) => {
|
|
2614
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.width + t.padding + (n.height + t.padding), i = [
|
|
2615
|
+
{
|
|
2616
|
+
x: s / 2,
|
|
2617
|
+
y: 0
|
|
2618
|
+
},
|
|
2619
|
+
{
|
|
2620
|
+
x: s,
|
|
2621
|
+
y: -s / 2
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
x: s / 2,
|
|
2625
|
+
y: -s
|
|
2626
|
+
},
|
|
2627
|
+
{
|
|
2628
|
+
x: 0,
|
|
2629
|
+
y: -s / 2
|
|
2630
|
+
}
|
|
2631
|
+
];
|
|
2632
|
+
L.info("Question main (Circle)");
|
|
2633
|
+
const a = U(r, s, s, i);
|
|
2634
|
+
return a.attr("style", t.style), I(t, a), t.intersect = function(c) {
|
|
2635
|
+
return L.warn("Intersect called"), D.polygon(t, i, c);
|
|
2636
|
+
}, r;
|
|
2637
|
+
}, "question"), Br = /* @__PURE__ */ u((e, t) => {
|
|
2638
|
+
const r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, s = [
|
|
2639
|
+
{
|
|
2640
|
+
x: 0,
|
|
2641
|
+
y: n / 2
|
|
2642
|
+
},
|
|
2643
|
+
{
|
|
2644
|
+
x: n / 2,
|
|
2645
|
+
y: 0
|
|
2646
|
+
},
|
|
2647
|
+
{
|
|
2648
|
+
x: 0,
|
|
2649
|
+
y: -28 / 2
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
x: -28 / 2,
|
|
2653
|
+
y: 0
|
|
2654
|
+
}
|
|
2655
|
+
];
|
|
2656
|
+
return r.insert("polygon", ":first-child").attr("points", s.map(function(i) {
|
|
2657
|
+
return i.x + "," + i.y;
|
|
2658
|
+
}).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(i) {
|
|
2659
|
+
return D.circle(t, 14, i);
|
|
2660
|
+
}, r;
|
|
2661
|
+
}, "choice"), Or = /* @__PURE__ */ u(async (e, t) => {
|
|
2662
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = 4, i = t.positioned ? t.height : n.height + t.padding, a = i / s, c = t.positioned ? t.width : n.width + 2 * a + t.padding, l = [
|
|
2663
|
+
{
|
|
2664
|
+
x: a,
|
|
2665
|
+
y: 0
|
|
2666
|
+
},
|
|
2667
|
+
{
|
|
2668
|
+
x: c - a,
|
|
2669
|
+
y: 0
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
x: c,
|
|
2673
|
+
y: -i / 2
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
x: c - a,
|
|
2677
|
+
y: -i
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
x: a,
|
|
2681
|
+
y: -i
|
|
2682
|
+
},
|
|
2683
|
+
{
|
|
2684
|
+
x: 0,
|
|
2685
|
+
y: -i / 2
|
|
2686
|
+
}
|
|
2687
|
+
], g = U(r, c, i, l);
|
|
2688
|
+
return g.attr("style", t.style), I(t, g), t.intersect = function(o) {
|
|
2689
|
+
return D.polygon(t, l, o);
|
|
2690
|
+
}, r;
|
|
2691
|
+
}, "hexagon"), Cr = /* @__PURE__ */ u(async (e, t) => {
|
|
2692
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, void 0, !0), s = 2, i = n.height + 2 * t.padding, a = i / s, c = n.width + 2 * a + t.padding, l = t.positioned && (t.widthInColumns ?? 1) > 1 && t.width > c ? t.width : c, g = Er(t.directions, n, t, l), o = U(r, l, i, g);
|
|
2693
|
+
return o.attr("style", t.style), I(t, o), t.intersect = function(d) {
|
|
2694
|
+
return D.polygon(t, g, d);
|
|
2695
|
+
}, r;
|
|
2696
|
+
}, "block_arrow"), Rr = /* @__PURE__ */ u(async (e, t) => {
|
|
2697
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.width + t.padding, i = n.height + t.padding, a = [
|
|
2698
|
+
{
|
|
2699
|
+
x: -i / 2,
|
|
2700
|
+
y: 0
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
x: s,
|
|
2704
|
+
y: 0
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
x: s,
|
|
2708
|
+
y: -i
|
|
2709
|
+
},
|
|
2710
|
+
{
|
|
2711
|
+
x: -i / 2,
|
|
2712
|
+
y: -i
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
x: 0,
|
|
2716
|
+
y: -i / 2
|
|
2717
|
+
}
|
|
2718
|
+
];
|
|
2719
|
+
return U(r, s, i, a).attr("style", t.style), t.width = s + i, t.height = i, t.intersect = function(c) {
|
|
2720
|
+
return D.polygon(t, a, c);
|
|
2721
|
+
}, r;
|
|
2722
|
+
}, "rect_left_inv_arrow"), Ar = /* @__PURE__ */ u(async (e, t) => {
|
|
2723
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t), !0), s = n.width + t.padding, i = n.height + t.padding, a = [
|
|
2724
|
+
{
|
|
2725
|
+
x: -2 * i / 6,
|
|
2726
|
+
y: 0
|
|
2727
|
+
},
|
|
2728
|
+
{
|
|
2729
|
+
x: s - i / 6,
|
|
2730
|
+
y: 0
|
|
2731
|
+
},
|
|
2732
|
+
{
|
|
2733
|
+
x: s + 2 * i / 6,
|
|
2734
|
+
y: -i
|
|
2735
|
+
},
|
|
2736
|
+
{
|
|
2737
|
+
x: i / 6,
|
|
2738
|
+
y: -i
|
|
2739
|
+
}
|
|
2740
|
+
], c = U(r, s, i, a);
|
|
2741
|
+
return c.attr("style", t.style), I(t, c), t.intersect = function(l) {
|
|
2742
|
+
return D.polygon(t, a, l);
|
|
2743
|
+
}, r;
|
|
2744
|
+
}, "lean_right"), zr = /* @__PURE__ */ u(async (e, t) => {
|
|
2745
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.width + t.padding, i = n.height + t.padding, a = [
|
|
2746
|
+
{
|
|
2747
|
+
x: 2 * i / 6,
|
|
2748
|
+
y: 0
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
x: s + i / 6,
|
|
2752
|
+
y: 0
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
x: s - 2 * i / 6,
|
|
2756
|
+
y: -i
|
|
2757
|
+
},
|
|
2758
|
+
{
|
|
2759
|
+
x: -i / 6,
|
|
2760
|
+
y: -i
|
|
2761
|
+
}
|
|
2762
|
+
], c = U(r, s, i, a);
|
|
2763
|
+
return c.attr("style", t.style), I(t, c), t.intersect = function(l) {
|
|
2764
|
+
return D.polygon(t, a, l);
|
|
2765
|
+
}, r;
|
|
2766
|
+
}, "lean_left"), Mr = /* @__PURE__ */ u(async (e, t) => {
|
|
2767
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.width + t.padding, i = n.height + t.padding, a = [
|
|
2768
|
+
{
|
|
2769
|
+
x: -2 * i / 6,
|
|
2770
|
+
y: 0
|
|
2771
|
+
},
|
|
2772
|
+
{
|
|
2773
|
+
x: s + 2 * i / 6,
|
|
2774
|
+
y: 0
|
|
2775
|
+
},
|
|
2776
|
+
{
|
|
2777
|
+
x: s - i / 6,
|
|
2778
|
+
y: -i
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
x: i / 6,
|
|
2782
|
+
y: -i
|
|
2783
|
+
}
|
|
2784
|
+
], c = U(r, s, i, a);
|
|
2785
|
+
return c.attr("style", t.style), I(t, c), t.intersect = function(l) {
|
|
2786
|
+
return D.polygon(t, a, l);
|
|
2787
|
+
}, r;
|
|
2788
|
+
}, "trapezoid"), Pr = /* @__PURE__ */ u(async (e, t) => {
|
|
2789
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.width + t.padding, i = n.height + t.padding, a = [
|
|
2790
|
+
{
|
|
2791
|
+
x: i / 6,
|
|
2792
|
+
y: 0
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
x: s - i / 6,
|
|
2796
|
+
y: 0
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
x: s + 2 * i / 6,
|
|
2800
|
+
y: -i
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
x: -2 * i / 6,
|
|
2804
|
+
y: -i
|
|
2805
|
+
}
|
|
2806
|
+
], c = U(r, s, i, a);
|
|
2807
|
+
return c.attr("style", t.style), I(t, c), t.intersect = function(l) {
|
|
2808
|
+
return D.polygon(t, a, l);
|
|
2809
|
+
}, r;
|
|
2810
|
+
}, "inv_trapezoid"), Fr = /* @__PURE__ */ u(async (e, t) => {
|
|
2811
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.width + t.padding, i = n.height + t.padding, a = [
|
|
2812
|
+
{
|
|
2813
|
+
x: 0,
|
|
2814
|
+
y: 0
|
|
2815
|
+
},
|
|
2816
|
+
{
|
|
2817
|
+
x: s + i / 2,
|
|
2818
|
+
y: 0
|
|
2819
|
+
},
|
|
2820
|
+
{
|
|
2821
|
+
x: s,
|
|
2822
|
+
y: -i / 2
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
x: s + i / 2,
|
|
2826
|
+
y: -i
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
x: 0,
|
|
2830
|
+
y: -i
|
|
2831
|
+
}
|
|
2832
|
+
], c = U(r, s, i, a);
|
|
2833
|
+
return c.attr("style", t.style), I(t, c), t.intersect = function(l) {
|
|
2834
|
+
return D.polygon(t, a, l);
|
|
2835
|
+
}, r;
|
|
2836
|
+
}, "rect_right_inv_arrow"), Wr = /* @__PURE__ */ u(async (e, t) => {
|
|
2837
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.width + t.padding, i = s / 2, a = i / (2.5 + s / 50), c = n.height + a + t.padding, l = "M 0," + a + " a " + i + "," + a + " 0,0,0 " + s + " 0 a " + i + "," + a + " 0,0,0 " + -s + " 0 l 0," + c + " a " + i + "," + a + " 0,0,0 " + s + " 0 l 0," + -c;
|
|
2838
|
+
return I(t, r.attr("label-offset-y", a).insert("path", ":first-child").attr("style", t.style).attr("d", l).attr("transform", "translate(" + -s / 2 + "," + -(c / 2 + a) + ")")), t.intersect = function(g) {
|
|
2839
|
+
const o = D.rect(t, g), d = o.x - t.x;
|
|
2840
|
+
if (i != 0 && (Math.abs(d) < t.width / 2 || Math.abs(d) == t.width / 2 && Math.abs(o.y - t.y) > t.height / 2 - a)) {
|
|
2841
|
+
let x = a * a * (1 - d * d / (i * i));
|
|
2842
|
+
x != 0 && (x = Math.sqrt(x)), x = a - x, g.y - t.y > 0 && (x = -x), o.y += x;
|
|
2843
|
+
}
|
|
2844
|
+
return o;
|
|
2845
|
+
}, r;
|
|
2846
|
+
}, "cylinder"), Yr = /* @__PURE__ */ u(async (e, t) => {
|
|
2847
|
+
const { shapeSvg: r, bbox: n, halfPadding: s } = await R(e, t, "node " + t.classes + " " + t.class, !0), i = r.insert("rect", ":first-child"), a = t.positioned ? t.width : n.width + t.padding, c = t.positioned ? t.height : n.height + t.padding, l = t.positioned ? -a / 2 : -n.width / 2 - s, g = t.positioned ? -c / 2 : -n.height / 2 - s;
|
|
2848
|
+
if (i.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", g).attr("width", a).attr("height", c), t.props) {
|
|
2849
|
+
const o = new Set(Object.keys(t.props));
|
|
2850
|
+
t.props.borders && (lt(i, t.props.borders, a, c), o.delete("borders")), o.forEach((d) => {
|
|
2851
|
+
L.warn(`Unknown node property ${d}`);
|
|
2852
|
+
});
|
|
2853
|
+
}
|
|
2854
|
+
return I(t, i), t.intersect = function(o) {
|
|
2855
|
+
return D.rect(t, o);
|
|
2856
|
+
}, r;
|
|
2857
|
+
}, "rect"), Hr = /* @__PURE__ */ u(async (e, t) => {
|
|
2858
|
+
const { shapeSvg: r, bbox: n, halfPadding: s } = await R(e, t, "node " + t.classes, !0), i = r.insert("rect", ":first-child"), a = t.positioned ? t.width : n.width + t.padding, c = t.positioned ? t.height : n.height + t.padding, l = t.positioned ? -a / 2 : -n.width / 2 - s, g = t.positioned ? -c / 2 : -n.height / 2 - s;
|
|
2859
|
+
if (i.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", g).attr("width", a).attr("height", c), t.props) {
|
|
2860
|
+
const o = new Set(Object.keys(t.props));
|
|
2861
|
+
t.props.borders && (lt(i, t.props.borders, a, c), o.delete("borders")), o.forEach((d) => {
|
|
2862
|
+
L.warn(`Unknown node property ${d}`);
|
|
2863
|
+
});
|
|
2864
|
+
}
|
|
2865
|
+
return I(t, i), t.intersect = function(o) {
|
|
2866
|
+
return D.rect(t, o);
|
|
2867
|
+
}, r;
|
|
2868
|
+
}, "composite"), Kr = /* @__PURE__ */ u(async (e, t) => {
|
|
2869
|
+
const { shapeSvg: r } = await R(e, t, "label", !0);
|
|
2870
|
+
L.trace("Classes = ", t.class);
|
|
2871
|
+
const n = r.insert("rect", ":first-child"), s = 0, i = 0;
|
|
2872
|
+
if (n.attr("width", s).attr("height", i), r.attr("class", "label edgeLabel"), t.props) {
|
|
2873
|
+
const a = new Set(Object.keys(t.props));
|
|
2874
|
+
t.props.borders && (lt(n, t.props.borders, s, i), a.delete("borders")), a.forEach((c) => {
|
|
2875
|
+
L.warn(`Unknown node property ${c}`);
|
|
2876
|
+
});
|
|
2877
|
+
}
|
|
2878
|
+
return I(t, n), t.intersect = function(a) {
|
|
2879
|
+
return D.rect(t, a);
|
|
2880
|
+
}, r;
|
|
2881
|
+
}, "labelRect");
|
|
2882
|
+
function lt(e, t, r, n) {
|
|
2883
|
+
const s = [], i = /* @__PURE__ */ u((c) => {
|
|
2884
|
+
s.push(c, 0);
|
|
2885
|
+
}, "addBorder"), a = /* @__PURE__ */ u((c) => {
|
|
2886
|
+
s.push(0, c);
|
|
2887
|
+
}, "skipBorder");
|
|
2888
|
+
t.includes("t") ? (L.debug("add top border"), i(r)) : a(r), t.includes("r") ? (L.debug("add right border"), i(n)) : a(n), t.includes("b") ? (L.debug("add bottom border"), i(r)) : a(r), t.includes("l") ? (L.debug("add left border"), i(n)) : a(n), e.attr("stroke-dasharray", s.join(" "));
|
|
2889
|
+
}
|
|
2890
|
+
u(lt, "applyNodePropertyBorders");
|
|
2891
|
+
var Ur = /* @__PURE__ */ u(async (e, t) => {
|
|
2892
|
+
let r;
|
|
2893
|
+
t.classes ? r = "node " + t.classes : r = "node default";
|
|
2894
|
+
const n = e.insert("g").attr("class", r).attr("id", t.domId || t.id), s = n.insert("rect", ":first-child"), i = n.insert("line"), a = n.insert("g").attr("class", "label"), c = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
2895
|
+
let l = "";
|
|
2896
|
+
typeof c == "object" ? l = c[0] : l = c, L.info("Label text abc79", l, c, typeof c == "object");
|
|
2897
|
+
const g = await K(a, l, t.labelStyle, !0, !0);
|
|
2898
|
+
let o = {
|
|
2899
|
+
width: 0,
|
|
2900
|
+
height: 0
|
|
2901
|
+
};
|
|
2902
|
+
if (M(C())) {
|
|
2903
|
+
const v = g.children[0], S = T(g);
|
|
2904
|
+
o = v.getBoundingClientRect(), S.attr("width", o.width), S.attr("height", o.height);
|
|
2905
|
+
}
|
|
2906
|
+
L.info("Text 2", c);
|
|
2907
|
+
const d = c.slice(1, c.length);
|
|
2908
|
+
let x = g.getBBox();
|
|
2909
|
+
const m = await K(a, d.join ? d.join("<br/>") : d, t.labelStyle, !0, !0);
|
|
2910
|
+
if (M(C())) {
|
|
2911
|
+
const v = m.children[0], S = T(m);
|
|
2912
|
+
o = v.getBoundingClientRect(), S.attr("width", o.width), S.attr("height", o.height);
|
|
2913
|
+
}
|
|
2914
|
+
const y = t.padding / 2;
|
|
2915
|
+
return T(m).attr("transform", "translate( " + (o.width > x.width ? 0 : (x.width - o.width) / 2) + ", " + (x.height + y + 5) + ")"), T(g).attr("transform", "translate( " + (o.width < x.width ? 0 : -(x.width - o.width) / 2) + ", 0)"), o = a.node().getBBox(), a.attr("transform", "translate(" + -o.width / 2 + ", " + (-o.height / 2 - y + 3) + ")"), s.attr("class", "outer title-state").attr("x", -o.width / 2 - y).attr("y", -o.height / 2 - y).attr("width", o.width + t.padding).attr("height", o.height + t.padding), i.attr("class", "divider").attr("x1", -o.width / 2 - y).attr("x2", o.width / 2 + y).attr("y1", -o.height / 2 - y + x.height + y).attr("y2", -o.height / 2 - y + x.height + y), I(t, s), t.intersect = function(v) {
|
|
2916
|
+
return D.rect(t, v);
|
|
2917
|
+
}, n;
|
|
2918
|
+
}, "rectWithTitle"), Xr = /* @__PURE__ */ u(async (e, t) => {
|
|
2919
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.height + t.padding, i = n.width + s / 4 + t.padding;
|
|
2920
|
+
return I(t, r.insert("rect", ":first-child").attr("style", t.style).attr("rx", s / 2).attr("ry", s / 2).attr("x", -i / 2).attr("y", -s / 2).attr("width", i).attr("height", s)), t.intersect = function(a) {
|
|
2921
|
+
return D.rect(t, a);
|
|
2922
|
+
}, r;
|
|
2923
|
+
}, "stadium"), Vr = /* @__PURE__ */ u(async (e, t) => {
|
|
2924
|
+
const { shapeSvg: r, bbox: n, halfPadding: s } = await R(e, t, F(t, void 0), !0), i = r.insert("circle", ":first-child");
|
|
2925
|
+
return i.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + s).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("Circle main"), I(t, i), t.intersect = function(a) {
|
|
2926
|
+
return L.info("Circle intersect", t, n.width / 2 + s, a), D.circle(t, n.width / 2 + s, a);
|
|
2927
|
+
}, r;
|
|
2928
|
+
}, "circle"), jr = /* @__PURE__ */ u(async (e, t) => {
|
|
2929
|
+
const { shapeSvg: r, bbox: n, halfPadding: s } = await R(e, t, F(t, void 0), !0), i = 5, a = r.insert("g", ":first-child"), c = a.insert("circle"), l = a.insert("circle");
|
|
2930
|
+
return a.attr("class", t.class), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + s + i).attr("width", n.width + t.padding + i * 2).attr("height", n.height + t.padding + i * 2), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + s).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("DoubleCircle main"), I(t, c), t.intersect = function(g) {
|
|
2931
|
+
return L.info("DoubleCircle intersect", t, n.width / 2 + s + i, g), D.circle(t, n.width / 2 + s + i, g);
|
|
2932
|
+
}, r;
|
|
2933
|
+
}, "doublecircle"), Gr = /* @__PURE__ */ u(async (e, t) => {
|
|
2934
|
+
const { shapeSvg: r, bbox: n } = await R(e, t, F(t, void 0), !0), s = n.width + t.padding, i = n.height + t.padding, a = [
|
|
2935
|
+
{
|
|
2936
|
+
x: 0,
|
|
2937
|
+
y: 0
|
|
2938
|
+
},
|
|
2939
|
+
{
|
|
2940
|
+
x: s,
|
|
2941
|
+
y: 0
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
x: s,
|
|
2945
|
+
y: -i
|
|
2946
|
+
},
|
|
2947
|
+
{
|
|
2948
|
+
x: 0,
|
|
2949
|
+
y: -i
|
|
2950
|
+
},
|
|
2951
|
+
{
|
|
2952
|
+
x: 0,
|
|
2953
|
+
y: 0
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
x: -8,
|
|
2957
|
+
y: 0
|
|
2958
|
+
},
|
|
2959
|
+
{
|
|
2960
|
+
x: s + 8,
|
|
2961
|
+
y: 0
|
|
2962
|
+
},
|
|
2963
|
+
{
|
|
2964
|
+
x: s + 8,
|
|
2965
|
+
y: -i
|
|
2966
|
+
},
|
|
2967
|
+
{
|
|
2968
|
+
x: -8,
|
|
2969
|
+
y: -i
|
|
2970
|
+
},
|
|
2971
|
+
{
|
|
2972
|
+
x: -8,
|
|
2973
|
+
y: 0
|
|
2974
|
+
}
|
|
2975
|
+
], c = U(r, s, i, a);
|
|
2976
|
+
return c.attr("style", t.style), I(t, c), t.intersect = function(l) {
|
|
2977
|
+
return D.polygon(t, a, l);
|
|
2978
|
+
}, r;
|
|
2979
|
+
}, "subroutine"), Zr = /* @__PURE__ */ u((e, t) => {
|
|
2980
|
+
const r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = r.insert("circle", ":first-child");
|
|
2981
|
+
return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), I(t, n), t.intersect = function(s) {
|
|
2982
|
+
return D.circle(t, 7, s);
|
|
2983
|
+
}, r;
|
|
2984
|
+
}, "start"), Ht = /* @__PURE__ */ u((e, t, r) => {
|
|
2985
|
+
const n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
2986
|
+
let s = 70, i = 10;
|
|
2987
|
+
return r === "LR" && (s = 10, i = 70), I(t, n.append("rect").attr("x", -1 * s / 2).attr("y", -1 * i / 2).attr("width", s).attr("height", i).attr("class", "fork-join")), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(a) {
|
|
2988
|
+
return D.rect(t, a);
|
|
2989
|
+
}, n;
|
|
2990
|
+
}, "forkJoin"), Kt = {
|
|
2991
|
+
rhombus: Yt,
|
|
2992
|
+
composite: Hr,
|
|
2993
|
+
question: Yt,
|
|
2994
|
+
rect: Yr,
|
|
2995
|
+
labelRect: Kr,
|
|
2996
|
+
rectWithTitle: Ur,
|
|
2997
|
+
choice: Br,
|
|
2998
|
+
circle: Vr,
|
|
2999
|
+
doublecircle: jr,
|
|
3000
|
+
stadium: Xr,
|
|
3001
|
+
hexagon: Or,
|
|
3002
|
+
block_arrow: Cr,
|
|
3003
|
+
rect_left_inv_arrow: Rr,
|
|
3004
|
+
lean_right: Ar,
|
|
3005
|
+
lean_left: zr,
|
|
3006
|
+
trapezoid: Mr,
|
|
3007
|
+
inv_trapezoid: Pr,
|
|
3008
|
+
rect_right_inv_arrow: Fr,
|
|
3009
|
+
cylinder: Wr,
|
|
3010
|
+
start: Zr,
|
|
3011
|
+
end: /* @__PURE__ */ u((e, t) => {
|
|
3012
|
+
const r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = r.insert("circle", ":first-child"), s = r.insert("circle", ":first-child");
|
|
3013
|
+
return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), I(t, s), t.intersect = function(i) {
|
|
3014
|
+
return D.circle(t, 7, i);
|
|
3015
|
+
}, r;
|
|
3016
|
+
}, "end"),
|
|
3017
|
+
note: Ir,
|
|
3018
|
+
subroutine: Gr,
|
|
3019
|
+
fork: Ht,
|
|
3020
|
+
join: Ht,
|
|
3021
|
+
class_box: /* @__PURE__ */ u(async (e, t) => {
|
|
3022
|
+
const r = t.padding / 2, n = 4, s = 8;
|
|
3023
|
+
let i;
|
|
3024
|
+
t.classes ? i = "node " + t.classes : i = "node default";
|
|
3025
|
+
const a = e.insert("g").attr("class", i).attr("id", t.domId || t.id), c = a.insert("rect", ":first-child"), l = a.insert("line"), g = a.insert("line");
|
|
3026
|
+
let o = 0, d = n;
|
|
3027
|
+
const x = a.insert("g").attr("class", "label");
|
|
3028
|
+
let m = 0;
|
|
3029
|
+
const y = t.classData.annotations?.[0], v = await K(x, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0);
|
|
3030
|
+
let S = v.getBBox();
|
|
3031
|
+
if (M(C())) {
|
|
3032
|
+
const _ = v.children[0], h = T(v);
|
|
3033
|
+
S = _.getBoundingClientRect(), h.attr("width", S.width), h.attr("height", S.height);
|
|
3034
|
+
}
|
|
3035
|
+
t.classData.annotations[0] && (d += S.height + n, o += S.width);
|
|
3036
|
+
let N = t.classData.label;
|
|
3037
|
+
t.classData.type !== void 0 && t.classData.type !== "" && (M(C()) ? N += "<" + t.classData.type + ">" : N += "<" + t.classData.type + ">");
|
|
3038
|
+
const w = await K(x, N, t.labelStyle, !0, !0);
|
|
3039
|
+
T(w).attr("class", "classTitle");
|
|
3040
|
+
let f = w.getBBox();
|
|
3041
|
+
if (M(C())) {
|
|
3042
|
+
const _ = w.children[0], h = T(w);
|
|
3043
|
+
f = _.getBoundingClientRect(), h.attr("width", f.width), h.attr("height", f.height);
|
|
3044
|
+
}
|
|
3045
|
+
d += f.height + n, f.width > o && (o = f.width);
|
|
3046
|
+
const b = [];
|
|
3047
|
+
t.classData.members.forEach(async (_) => {
|
|
3048
|
+
const h = _.getDisplayDetails();
|
|
3049
|
+
let P = h.displayText;
|
|
3050
|
+
M(C()) && (P = P.replace(/</g, "<").replace(/>/g, ">"));
|
|
3051
|
+
const p = await K(x, P, h.cssStyle ? h.cssStyle : t.labelStyle, !0, !0);
|
|
3052
|
+
let B = p.getBBox();
|
|
3053
|
+
if (M(C())) {
|
|
3054
|
+
const j = p.children[0], X = T(p);
|
|
3055
|
+
B = j.getBoundingClientRect(), X.attr("width", B.width), X.attr("height", B.height);
|
|
3056
|
+
}
|
|
3057
|
+
B.width > o && (o = B.width), d += B.height + n, b.push(p);
|
|
3058
|
+
}), d += s;
|
|
3059
|
+
const E = [];
|
|
3060
|
+
if (t.classData.methods.forEach(async (_) => {
|
|
3061
|
+
const h = _.getDisplayDetails();
|
|
3062
|
+
let P = h.displayText;
|
|
3063
|
+
M(C()) && (P = P.replace(/</g, "<").replace(/>/g, ">"));
|
|
3064
|
+
const p = await K(x, P, h.cssStyle ? h.cssStyle : t.labelStyle, !0, !0);
|
|
3065
|
+
let B = p.getBBox();
|
|
3066
|
+
if (M(C())) {
|
|
3067
|
+
const j = p.children[0], X = T(p);
|
|
3068
|
+
B = j.getBoundingClientRect(), X.attr("width", B.width), X.attr("height", B.height);
|
|
3069
|
+
}
|
|
3070
|
+
B.width > o && (o = B.width), d += B.height + n, E.push(p);
|
|
3071
|
+
}), d += s, y) {
|
|
3072
|
+
let _ = (o - S.width) / 2;
|
|
3073
|
+
T(v).attr("transform", "translate( " + (-1 * o / 2 + _) + ", " + -1 * d / 2 + ")"), m = S.height + n;
|
|
3074
|
+
}
|
|
3075
|
+
let k = (o - f.width) / 2;
|
|
3076
|
+
return T(w).attr("transform", "translate( " + (-1 * o / 2 + k) + ", " + (-1 * d / 2 + m) + ")"), m += f.height + n, l.attr("class", "divider").attr("x1", -o / 2 - r).attr("x2", o / 2 + r).attr("y1", -d / 2 - r + s + m).attr("y2", -d / 2 - r + s + m), m += s, b.forEach((_) => {
|
|
3077
|
+
T(_).attr("transform", "translate( " + -o / 2 + ", " + (-1 * d / 2 + m + s / 2) + ")");
|
|
3078
|
+
const h = _?.getBBox();
|
|
3079
|
+
m += (h?.height ?? 0) + n;
|
|
3080
|
+
}), m += s, g.attr("class", "divider").attr("x1", -o / 2 - r).attr("x2", o / 2 + r).attr("y1", -d / 2 - r + s + m).attr("y2", -d / 2 - r + s + m), m += s, E.forEach((_) => {
|
|
3081
|
+
T(_).attr("transform", "translate( " + -o / 2 + ", " + (-1 * d / 2 + m) + ")");
|
|
3082
|
+
const h = _?.getBBox();
|
|
3083
|
+
m += (h?.height ?? 0) + n;
|
|
3084
|
+
}), c.attr("style", t.style).attr("class", "outer title-state").attr("x", -o / 2 - r).attr("y", -(d / 2) - r).attr("width", o + t.padding).attr("height", d + t.padding), I(t, c), t.intersect = function(_) {
|
|
3085
|
+
return D.rect(t, _);
|
|
3086
|
+
}, a;
|
|
3087
|
+
}, "class_box")
|
|
3088
|
+
}, it = {}, ne = /* @__PURE__ */ u(async (e, t, r) => {
|
|
3089
|
+
let n, s;
|
|
3090
|
+
if (t.link) {
|
|
3091
|
+
let i;
|
|
3092
|
+
C().securityLevel === "sandbox" ? i = "_top" : t.linkTarget && (i = t.linkTarget || "_blank"), n = e.insert("svg:a").attr("xlink:href", t.link).attr("target", i), s = await Kt[t.shape](n, t, r);
|
|
3093
|
+
} else
|
|
3094
|
+
s = await Kt[t.shape](e, t, r), n = s;
|
|
3095
|
+
return t.tooltip && s.attr("title", t.tooltip), t.class && s.attr("class", "node default " + t.class), it[t.id] = n, t.haveCallback && it[t.id].attr("class", it[t.id].attr("class") + " clickable"), n;
|
|
3096
|
+
}, "insertNode"), qr = /* @__PURE__ */ u((e) => {
|
|
3097
|
+
const t = it[e.id];
|
|
3098
|
+
L.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
|
|
3099
|
+
const r = 8, n = e.diff || 0;
|
|
3100
|
+
return e.clusterNode ? t.attr("transform", "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - r) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
|
|
3101
|
+
}, "positionNode");
|
|
3102
|
+
function It(e, t, r = !1) {
|
|
3103
|
+
const n = e;
|
|
3104
|
+
let s = "default";
|
|
3105
|
+
(n?.classes?.length || 0) > 0 && (s = (n?.classes ?? []).join(" ")), s = s + " flowchart-label";
|
|
3106
|
+
let i = 0, a = "", c;
|
|
3107
|
+
switch (n.type) {
|
|
3108
|
+
case "round":
|
|
3109
|
+
i = 5, a = "rect";
|
|
3110
|
+
break;
|
|
3111
|
+
case "composite":
|
|
3112
|
+
i = 0, a = "composite", c = 0;
|
|
3113
|
+
break;
|
|
3114
|
+
case "square":
|
|
3115
|
+
a = "rect";
|
|
3116
|
+
break;
|
|
3117
|
+
case "diamond":
|
|
3118
|
+
a = "question";
|
|
3119
|
+
break;
|
|
3120
|
+
case "hexagon":
|
|
3121
|
+
a = "hexagon";
|
|
3122
|
+
break;
|
|
3123
|
+
case "block_arrow":
|
|
3124
|
+
a = "block_arrow";
|
|
3125
|
+
break;
|
|
3126
|
+
case "odd":
|
|
3127
|
+
a = "rect_left_inv_arrow";
|
|
3128
|
+
break;
|
|
3129
|
+
case "lean_right":
|
|
3130
|
+
a = "lean_right";
|
|
3131
|
+
break;
|
|
3132
|
+
case "lean_left":
|
|
3133
|
+
a = "lean_left";
|
|
3134
|
+
break;
|
|
3135
|
+
case "trapezoid":
|
|
3136
|
+
a = "trapezoid";
|
|
3137
|
+
break;
|
|
3138
|
+
case "inv_trapezoid":
|
|
3139
|
+
a = "inv_trapezoid";
|
|
3140
|
+
break;
|
|
3141
|
+
case "rect_left_inv_arrow":
|
|
3142
|
+
a = "rect_left_inv_arrow";
|
|
3143
|
+
break;
|
|
3144
|
+
case "circle":
|
|
3145
|
+
a = "circle";
|
|
3146
|
+
break;
|
|
3147
|
+
case "ellipse":
|
|
3148
|
+
a = "ellipse";
|
|
3149
|
+
break;
|
|
3150
|
+
case "stadium":
|
|
3151
|
+
a = "stadium";
|
|
3152
|
+
break;
|
|
3153
|
+
case "subroutine":
|
|
3154
|
+
a = "subroutine";
|
|
3155
|
+
break;
|
|
3156
|
+
case "cylinder":
|
|
3157
|
+
a = "cylinder";
|
|
3158
|
+
break;
|
|
3159
|
+
case "group":
|
|
3160
|
+
a = "rect";
|
|
3161
|
+
break;
|
|
3162
|
+
case "doublecircle":
|
|
3163
|
+
a = "doublecircle";
|
|
3164
|
+
break;
|
|
3165
|
+
default:
|
|
3166
|
+
a = "rect";
|
|
3167
|
+
}
|
|
3168
|
+
const l = He(n?.styles ?? []), g = n.label, o = n.size ?? {
|
|
3169
|
+
width: 0,
|
|
3170
|
+
height: 0,
|
|
3171
|
+
x: 0,
|
|
3172
|
+
y: 0
|
|
3173
|
+
}, d = t.getDiagramId();
|
|
3174
|
+
return {
|
|
3175
|
+
labelStyle: l.labelStyle,
|
|
3176
|
+
shape: a,
|
|
3177
|
+
labelText: g,
|
|
3178
|
+
rx: i,
|
|
3179
|
+
ry: i,
|
|
3180
|
+
class: s,
|
|
3181
|
+
style: l.style,
|
|
3182
|
+
id: n.id,
|
|
3183
|
+
domId: d ? `${d}-${n.id}` : n.id,
|
|
3184
|
+
directions: n.directions,
|
|
3185
|
+
width: o.width,
|
|
3186
|
+
height: o.height,
|
|
3187
|
+
x: o.x,
|
|
3188
|
+
y: o.y,
|
|
3189
|
+
positioned: r,
|
|
3190
|
+
intersect: void 0,
|
|
3191
|
+
type: n.type,
|
|
3192
|
+
padding: c ?? et()?.block?.padding ?? 0,
|
|
3193
|
+
widthInColumns: n.widthInColumns ?? 1
|
|
3194
|
+
};
|
|
3195
|
+
}
|
|
3196
|
+
u(It, "getNodeFromBlock");
|
|
3197
|
+
async function ce(e, t, r) {
|
|
3198
|
+
const n = It(t, r, !1);
|
|
3199
|
+
if (n.type === "group") return;
|
|
3200
|
+
const s = await ne(e, n, { config: et() }), i = s.node().getBBox(), a = r.getBlock(n.id);
|
|
3201
|
+
a.size = {
|
|
3202
|
+
width: i.width,
|
|
3203
|
+
height: i.height,
|
|
3204
|
+
x: 0,
|
|
3205
|
+
y: 0,
|
|
3206
|
+
node: s
|
|
3207
|
+
}, r.setBlock(a), s.remove();
|
|
3208
|
+
}
|
|
3209
|
+
u(ce, "calculateBlockSize");
|
|
3210
|
+
async function le(e, t, r) {
|
|
3211
|
+
const n = It(t, r, !0);
|
|
3212
|
+
r.getBlock(n.id).type !== "space" && (await ne(e, n, { config: et() }), t.intersect = n?.intersect, qr(n));
|
|
3213
|
+
}
|
|
3214
|
+
u(le, "insertBlockPositioned");
|
|
3215
|
+
async function ot(e, t, r, n) {
|
|
3216
|
+
for (const s of t)
|
|
3217
|
+
await n(e, s, r), s.children && await ot(e, s.children, r, n);
|
|
3218
|
+
}
|
|
3219
|
+
u(ot, "performOperations");
|
|
3220
|
+
async function oe(e, t, r) {
|
|
3221
|
+
await ot(e, t, r, ce);
|
|
3222
|
+
}
|
|
3223
|
+
u(oe, "calculateBlockSizes");
|
|
3224
|
+
async function he(e, t, r) {
|
|
3225
|
+
await ot(e, t, r, le);
|
|
3226
|
+
}
|
|
3227
|
+
u(he, "insertBlocks");
|
|
3228
|
+
async function ge(e, t, r, n, s) {
|
|
3229
|
+
const i = new Je({
|
|
3230
|
+
multigraph: !0,
|
|
3231
|
+
compound: !0
|
|
3232
|
+
});
|
|
3233
|
+
i.setGraph({
|
|
3234
|
+
rankdir: "TB",
|
|
3235
|
+
nodesep: 10,
|
|
3236
|
+
ranksep: 10,
|
|
3237
|
+
marginx: 8,
|
|
3238
|
+
marginy: 8
|
|
3239
|
+
});
|
|
3240
|
+
for (const a of r) a.size && i.setNode(a.id, {
|
|
3241
|
+
width: a.size.width,
|
|
3242
|
+
height: a.size.height,
|
|
3243
|
+
intersect: a.intersect
|
|
3244
|
+
});
|
|
3245
|
+
for (const a of t) if (a.start && a.end) {
|
|
3246
|
+
const c = n.getBlock(a.start), l = n.getBlock(a.end);
|
|
3247
|
+
if (c?.size && l?.size) {
|
|
3248
|
+
const g = c.size, o = l.size, d = [
|
|
3249
|
+
{
|
|
3250
|
+
x: g.x,
|
|
3251
|
+
y: g.y
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
x: g.x + (o.x - g.x) / 2,
|
|
3255
|
+
y: g.y + (o.y - g.y) / 2
|
|
3256
|
+
},
|
|
3257
|
+
{
|
|
3258
|
+
x: o.x,
|
|
3259
|
+
y: o.y
|
|
3260
|
+
}
|
|
3261
|
+
], x = s ? `${s}-${a.id}` : a.id, m = `${a.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${a.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
|
|
3262
|
+
kr(e, {
|
|
3263
|
+
v: a.start,
|
|
3264
|
+
w: a.end,
|
|
3265
|
+
name: x
|
|
3266
|
+
}, {
|
|
3267
|
+
...a,
|
|
3268
|
+
id: x,
|
|
3269
|
+
arrowTypeEnd: a.arrowTypeEnd,
|
|
3270
|
+
arrowTypeStart: a.arrowTypeStart,
|
|
3271
|
+
points: d,
|
|
3272
|
+
classes: m
|
|
3273
|
+
}, void 0, "block", i, s), a.label && (await mr(e, {
|
|
3274
|
+
...a,
|
|
3275
|
+
label: a.label,
|
|
3276
|
+
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
3277
|
+
arrowTypeEnd: a.arrowTypeEnd,
|
|
3278
|
+
arrowTypeStart: a.arrowTypeStart,
|
|
3279
|
+
points: d,
|
|
3280
|
+
classes: m
|
|
3281
|
+
}), wr({
|
|
3282
|
+
...a,
|
|
3283
|
+
x: d[1].x,
|
|
3284
|
+
y: d[1].y
|
|
3285
|
+
}, { originalPath: d }));
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
u(ge, "insertEdges");
|
|
3290
|
+
var oa = {
|
|
3291
|
+
parser: sr,
|
|
3292
|
+
db: gr,
|
|
3293
|
+
renderer: {
|
|
3294
|
+
draw: /* @__PURE__ */ u(async function(e, t, r, n) {
|
|
3295
|
+
const { securityLevel: s, block: i } = et(), a = n.db;
|
|
3296
|
+
a.setDiagramId(t);
|
|
3297
|
+
let c;
|
|
3298
|
+
s === "sandbox" && (c = T("#i" + t));
|
|
3299
|
+
const l = s === "sandbox" ? T(c.nodes()[0].contentDocument.body) : T("body"), g = s === "sandbox" ? l.select(`[id="${t}"]`) : T(`[id="${t}"]`);
|
|
3300
|
+
pr(g, [
|
|
3301
|
+
"point",
|
|
3302
|
+
"circle",
|
|
3303
|
+
"cross"
|
|
3304
|
+
], n.type, t);
|
|
3305
|
+
const o = a.getBlocks(), d = a.getBlocksFlat(), x = a.getEdges(), m = g.insert("g").attr("class", "block");
|
|
3306
|
+
await oe(m, o, a);
|
|
3307
|
+
const y = $t(a);
|
|
3308
|
+
if (await he(m, o, a), await ge(m, x, d, a, t), y) {
|
|
3309
|
+
const v = y, S = Math.max(1, Math.round(0.125 * (v.width / v.height))), N = v.height + S + 10, w = v.width + 10, { useMaxWidth: f } = i;
|
|
3310
|
+
xe(g, N, w, !!f), L.debug("Here Bounds", y, v), g.attr("viewBox", `${v.x - 5} ${v.y - 5} ${v.width + 10} ${v.height + 10}`);
|
|
3311
|
+
}
|
|
3312
|
+
}, "draw"),
|
|
3313
|
+
getClasses: /* @__PURE__ */ u(function(e, t) {
|
|
3314
|
+
return t.db.getClasses();
|
|
3315
|
+
}, "getClasses")
|
|
3316
|
+
},
|
|
3317
|
+
styles: ur
|
|
3318
|
+
};
|
|
3319
|
+
export {
|
|
3320
|
+
oa as diagram
|
|
3321
|
+
};
|