@sme.up/ketchup2 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{arc-Klgb378K.js → arc-D80gVCcI.js} +2 -2
- package/dist/{arc-CqG9Hxdf.cjs → arc-MUYNnJxV.cjs} +1 -1
- package/dist/architecture-7EHR7CIX-Bnyu5zgG.js +3 -0
- package/dist/architecture-7EHR7CIX-CKF7-4kH.cjs +1 -0
- package/dist/architectureDiagram-3BPJPVTR-BrmPrClJ.cjs +36 -0
- package/dist/{architectureDiagram-Q4EWVU46-CnzjcVBn.js → architectureDiagram-3BPJPVTR-EFK4DMha.js} +167 -166
- package/dist/basic-components/cell/cell-utils.d.ts +2 -1
- package/dist/basic-components/cell/cell-utils.d.ts.map +1 -1
- package/dist/basic-components/cell/cell.d.ts.map +1 -1
- package/dist/basic-components/icon/icon.d.ts.map +1 -1
- package/dist/basic-components/input-number/input-number.d.ts.map +1 -1
- package/dist/basic-components/text-editor/text-editor-utils.d.ts +11 -0
- package/dist/basic-components/text-editor/text-editor-utils.d.ts.map +1 -1
- package/dist/basic-components/text-editor/text-editor.d.ts.map +1 -1
- package/dist/basic-components/textarea/textarea-types.d.ts +2 -2
- package/dist/basic-components/textarea/textarea-types.d.ts.map +1 -1
- package/dist/basic-components/textarea/textarea.d.ts.map +1 -1
- package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
- package/dist/{blockDiagram-DXYQGD6D-B0NvV2Ph.js → blockDiagram-GPEHLZMM-C3UgY0Z5.js} +999 -877
- package/dist/blockDiagram-GPEHLZMM-CuzoKhJT.cjs +132 -0
- package/dist/{c4Diagram-AHTNJAMY-Dgwv-e5O.cjs → c4Diagram-AAUBKEIU-DU8uXbgK.cjs} +6 -6
- package/dist/{c4Diagram-AHTNJAMY-DPijI3_r.js → c4Diagram-AAUBKEIU-klnmEOUo.js} +279 -279
- package/dist/channel-BbRDdbmM.js +5 -0
- package/dist/channel-intTktDQ.cjs +1 -0
- package/dist/chunk-2J33WTMH-EmvF7iYC.js +25 -0
- package/dist/chunk-2J33WTMH-PlcpVW8G.cjs +1 -0
- package/dist/{chunk-5FUZZQ4R-D3C0F0Tr.js → chunk-3OPIFGDE-C7wE5oN7.js} +957 -929
- package/dist/chunk-3OPIFGDE-CT5oNC5X.cjs +62 -0
- package/dist/{chunk-4BX2VUAB-BW54-JWg.js → chunk-4BX2VUAB-BO1KRGb1.js} +1 -1
- package/dist/{chunk-4BX2VUAB-Qba52sxc.cjs → chunk-4BX2VUAB-CtDGlaPx.cjs} +1 -1
- package/dist/{chunk-7N4EOEYR-C-GuhRgW.js → chunk-4EGX6M5U-BMVrizoY.js} +12 -12
- package/dist/{chunk-7N4EOEYR-jNBQwvHx.cjs → chunk-4EGX6M5U-VENLmgBt.cjs} +1 -1
- package/dist/{chunk-55IACEB6-DPatBzu7.cjs → chunk-55IACEB6-VJP3Osm7.cjs} +1 -1
- package/dist/{chunk-55IACEB6-Bu3k0Yz5.js → chunk-55IACEB6-b_Ivgrk-.js} +1 -1
- package/dist/chunk-5DO6E6H7-Cx6Mfbjl.cjs +1 -0
- package/dist/chunk-5DO6E6H7-QuTLwcim.js +23 -0
- package/dist/chunk-5ZQYHXKU-BMnKD7Zq.cjs +2 -0
- package/dist/{chunk-5PVQY5BW-Dn8n6moB.js → chunk-5ZQYHXKU-C4uam08j.js} +527 -461
- package/dist/chunk-727SXJPM-DTmqhRKX.cjs +206 -0
- package/dist/{chunk-4TB4RGXK-D2LRzcEP.js → chunk-727SXJPM-Dof0vDVV.js} +650 -554
- package/dist/{chunk-OYMX7WX6-CrK-lehh.cjs → chunk-AQP2D5EJ-DdWeFQ4O.cjs} +5 -5
- package/dist/{chunk-OYMX7WX6-DJkGVCqi.js → chunk-AQP2D5EJ-N9ii4fwJ.js} +349 -339
- package/dist/{chunk-LIHQZDEY-59I4-LWb.js → chunk-BR22UD5L-CS6hURQQ.js} +15 -15
- package/dist/{chunk-LIHQZDEY-CrogR3nT.cjs → chunk-BR22UD5L-wI1vkyAT.cjs} +1 -1
- package/dist/{chunk-BSJP7CBP-oNTXVRA7.js → chunk-BSJP7CBP-Bx5APwBA.js} +1 -1
- package/dist/{chunk-BSJP7CBP-CFzYPvgr.cjs → chunk-BSJP7CBP-CaeBFqNU.cjs} +1 -1
- package/dist/{chunk-ICPOFSXX-fQJ5ufMR.js → chunk-CSCIHK7Q-9WKhcDqw.js} +132 -38
- package/dist/chunk-CSCIHK7Q-BPMuICCz.cjs +123 -0
- package/dist/chunk-FHYWG6QK-CfRqYwCI.js +23 -0
- package/dist/chunk-FHYWG6QK-DxmnARsZ.cjs +1 -0
- package/dist/{chunk-FMBD7UC4-RRSc9jqt.js → chunk-FMBD7UC4-BbggSGOg.js} +1 -1
- package/dist/{chunk-FMBD7UC4-CS9_r76V.cjs → chunk-FMBD7UC4-CiO_59ls.cjs} +1 -1
- package/dist/{chunk-ENJZ2VHE-CZ7BvL2h.js → chunk-KSCS5N6A-BY1s4eGg.js} +205 -205
- package/dist/chunk-KSCS5N6A-DO8jEi0y.cjs +10 -0
- package/dist/{chunk-ZZ45TVLE-BfSqZnT4.cjs → chunk-L5ZTLDWV-BE9udiOh.cjs} +1 -1
- package/dist/{chunk-ZZ45TVLE-X2jolXSO.js → chunk-L5ZTLDWV-D3UwMopa.js} +8 -8
- package/dist/{chunk-336JU56O-DQhIGd25.cjs → chunk-LZXEDZCA-Dpz_wx3M.cjs} +1 -1
- package/dist/{chunk-336JU56O-DkZvWJVe.js → chunk-LZXEDZCA-KzBFuWPU.js} +18 -18
- package/dist/chunk-MPE355IW-4bpROspE.js +23 -0
- package/dist/chunk-MPE355IW-CxPw_dPP.cjs +1 -0
- package/dist/chunk-MZUSXYTE-DA5mUG5B.js +30 -0
- package/dist/chunk-MZUSXYTE-DIg1BPts.cjs +1 -0
- package/dist/chunk-N66VUXT2-DSbygtq1.cjs +1 -0
- package/dist/chunk-N66VUXT2-pDZ1b-B3.js +54 -0
- package/dist/{chunk-YZCP3GAM-D6P3SWmL.js → chunk-ND2GUHAM-CHTke4K8.js} +17 -17
- package/dist/{chunk-YZCP3GAM-qxaNo0r8.cjs → chunk-ND2GUHAM-DdBSZTft.cjs} +1 -1
- package/dist/chunk-NNHCCRGN-D_orSz6n.js +20630 -0
- package/dist/chunk-NNHCCRGN-aKMHXBzL.cjs +159 -0
- package/dist/{chunk-X2U36JSP-VxRY65ea.js → chunk-NZK2D7GU-BVOINLmx.js} +13 -13
- package/dist/{chunk-X2U36JSP-CtXjVqek.cjs → chunk-NZK2D7GU-_twqedIe.cjs} +1 -1
- package/dist/{chunk-U2HBQHQK-CJ77uizk.cjs → chunk-O5CBEL6O-CDvi2oZo.cjs} +6 -6
- package/dist/{chunk-U2HBQHQK-Ceyeq0IV.js → chunk-O5CBEL6O-VsMF4aZB.js} +108 -108
- package/dist/chunk-PUPMXCY4-CKjhJQnN.js +23 -0
- package/dist/chunk-PUPMXCY4-DsS_t57r.cjs +1 -0
- package/dist/{chunk-QZHKN3VN-CSMKL2rB.cjs → chunk-QZHKN3VN-CHjRGMI2.cjs} +1 -1
- package/dist/{chunk-QZHKN3VN-Bx8I6l3c.js → chunk-QZHKN3VN-DCddt14Q.js} +1 -1
- package/dist/chunk-UIBZB4QT-BZf7vqd9.cjs +1 -0
- package/dist/chunk-UIBZB4QT-BvFllM0Q.js +23 -0
- package/dist/chunk-WCWK7LTN-D_C1as0Y.js +31 -0
- package/dist/chunk-WCWK7LTN-Dl2uC9ZD.cjs +1 -0
- package/dist/chunk-WU5MYG2G-DgyP9QDj.cjs +1 -0
- package/dist/chunk-WU5MYG2G-mQn7Wt-i.js +9 -0
- package/dist/{chunk-XPW4576I-BcWkx-AL.js → chunk-XPW4576I-BCowsgDU.js} +1 -1
- package/dist/{chunk-XPW4576I-D8Pp6a3j.cjs → chunk-XPW4576I-D_mwgMVU.cjs} +1 -1
- package/dist/classDiagram-4FO5ZUOK-5DyhpZRK.cjs +1 -0
- package/dist/classDiagram-4FO5ZUOK-BHGLQIkz.js +29 -0
- package/dist/classDiagram-v2-Q7XG4LA2-CCAbBo05.js +29 -0
- package/dist/classDiagram-v2-Q7XG4LA2-D4TX4CLT.cjs +1 -0
- package/dist/components/dash-list/assets/dash-list.data.d.ts +1 -0
- package/dist/components/dash-list/assets/dash-list.data.d.ts.map +1 -1
- package/dist/components/dash-list/dash-list-types.d.ts +1 -0
- package/dist/components/dash-list/dash-list-types.d.ts.map +1 -1
- package/dist/components/dash-list/dash-list.d.ts.map +1 -1
- package/dist/components/dash-list/dash-list.utils.d.ts +0 -3
- package/dist/components/dash-list/dash-list.utils.d.ts.map +1 -1
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/htm/htm-types.d.ts +4 -0
- package/dist/components/htm/htm-types.d.ts.map +1 -1
- package/dist/components/htm/htm.d.ts.map +1 -1
- package/dist/components/image-list/components/items/image-list-item.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel-utils.d.ts.map +1 -1
- package/dist/components/pdf/pdf-types.d.ts +8 -0
- package/dist/components/pdf/pdf-types.d.ts.map +1 -1
- package/dist/components/pdf/pdf-utils.d.ts +1 -1
- package/dist/components/pdf/pdf-utils.d.ts.map +1 -1
- package/dist/components/pdf/pdf.d.ts.map +1 -1
- package/dist/components/planner/planner-assets.d.ts +2 -2
- package/dist/components/planner/planner-assets.d.ts.map +1 -1
- package/dist/components/planner/planner-utils.d.ts +1 -0
- package/dist/components/planner/planner-utils.d.ts.map +1 -1
- package/dist/components/planner/planner.d.ts.map +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-assets.d.ts +1 -0
- package/dist/components/tooltip/tooltip-assets.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-types.d.ts +4 -16
- package/dist/components/tooltip/tooltip-types.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/{cose-bilkent-S5V4N54A-B30Rh9DR.js → cose-bilkent-S5V4N54A-Bfb7U01p.js} +26 -27
- package/dist/cose-bilkent-S5V4N54A-CE-7Sw0Y.cjs +1 -0
- package/dist/dagre-BM42HDAG-BhbA1R8l.cjs +4 -0
- package/dist/dagre-BM42HDAG-D87Rv2R4.js +297 -0
- package/dist/dagre-CC68z3y6.cjs +1 -0
- package/dist/dagre-Cg4CV48I.js +1936 -0
- package/dist/diagram-2AECGRRQ-C6vI3yau.cjs +43 -0
- package/dist/{diagram-MMDJMWI5-DUpEI5ug.js → diagram-2AECGRRQ-OSYCK0tv.js} +36 -36
- package/dist/diagram-5GNKFQAL-BS9rRMAe.cjs +10 -0
- package/dist/diagram-5GNKFQAL-DnquluB9.js +101 -0
- package/dist/diagram-KO2AKTUF-CFi6eQYd.js +431 -0
- package/dist/diagram-KO2AKTUF-CjA_KTJj.cjs +3 -0
- package/dist/{diagram-TYMM5635-DHHPZ5ZJ.js → diagram-LMA3HP47-Cwm5bzeM.js} +38 -38
- package/dist/diagram-LMA3HP47-DBwSTp2j.cjs +24 -0
- package/dist/diagram-OG6HWLK6-BdLnbUYy.cjs +24 -0
- package/dist/{diagram-G4DWMVQ6-iYV58Drq.js → diagram-OG6HWLK6-DvGk1j55.js} +93 -93
- package/dist/{dist-DL30VIBI.js → dist-9MKIBfY4.js} +1 -1
- package/dist/dist-DC1YYeHc.cjs +1 -0
- package/dist/{erDiagram-SMLLAGMA-C8FM7wbJ.js → erDiagram-TEJ5UH35-B17mqgD_.js} +164 -164
- package/dist/erDiagram-TEJ5UH35-NlRiP_bX.cjs +85 -0
- package/dist/eventmodeling-FCH6USID-BVaFiLQO.js +3 -0
- package/dist/eventmodeling-FCH6USID-leiC8dtX.cjs +1 -0
- package/dist/{flowDiagram-DWJPFMVM-BGtX2gw0.js → flowDiagram-I6XJVG4X-C2G6Tgw_.js} +444 -444
- package/dist/{flowDiagram-DWJPFMVM-DWuKiJeo.cjs → flowDiagram-I6XJVG4X-ChI_6giU.cjs} +9 -9
- package/dist/functional-components/timeline-engine/components/gantt/bar/gantt-bar.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.d.ts +106 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.test.d.ts +2 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.test.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow.d.ts +38 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +23 -20
- package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/components/gantt/gantt.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/components/gantt/types/gantt-types.d.ts +13 -2
- package/dist/functional-components/timeline-engine/components/gantt/types/gantt-types.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/timeline-engine-types.d.ts +4 -0
- package/dist/functional-components/timeline-engine/timeline-engine-types.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts +24 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/timeline-engine.d.ts.map +1 -1
- package/dist/ganttDiagram-6RSMTGT7-B0DHqd7u.cjs +292 -0
- package/dist/{ganttDiagram-T4ZO3ILL-PY1BUp5b.js → ganttDiagram-6RSMTGT7-Bb6bqcaS.js} +278 -276
- package/dist/gitGraph-WXDBUCRP-BFFuTWG4.cjs +1 -0
- package/dist/gitGraph-WXDBUCRP-Fz2kRwJ-.js +3 -0
- package/dist/gitGraphDiagram-PVQCEYII-BzbgPrwe.cjs +106 -0
- package/dist/{gitGraphDiagram-UUTBAWPF-CDIW9-sX.js → gitGraphDiagram-PVQCEYII-DiJUr7lO.js} +255 -255
- package/dist/graphlib-B1zohIOM.js +1266 -0
- package/dist/graphlib-B5AXIZA4.cjs +1 -0
- package/dist/hooks/useFloating.d.ts.map +1 -1
- package/dist/info-J43DQDTF-CLRXRK49.js +3 -0
- package/dist/info-J43DQDTF-CmpcAuH-.cjs +1 -0
- package/dist/infoDiagram-5YYISTIA-C8P9DHlE.js +19 -0
- package/dist/infoDiagram-5YYISTIA-fhwEAAjF.cjs +2 -0
- package/dist/{ishikawaDiagram-UXIWVN3A-BfkF39Xv.cjs → ishikawaDiagram-YF4QCWOH-j6IZz59g.cjs} +6 -6
- package/dist/{ishikawaDiagram-UXIWVN3A-BblrAmns.js → ishikawaDiagram-YF4QCWOH-rqNbTKZp.js} +134 -134
- package/dist/{journeyDiagram-VCZTEJTY-UwcVOFtb.cjs → journeyDiagram-JHISSGLW-BhHdd4y3.cjs} +6 -6
- package/dist/{journeyDiagram-VCZTEJTY-CCOZ1XFK.js → journeyDiagram-JHISSGLW-peUJlm3L.js} +180 -180
- package/dist/{kanban-definition-6JOO6SKY-BWwfbdd6.js → kanban-definition-UN3LZRKU-DLxDqiQn.js} +151 -151
- package/dist/{kanban-definition-6JOO6SKY-Coxpi43B.cjs → kanban-definition-UN3LZRKU-TUg1x5yJ.cjs} +8 -8
- package/dist/{katex-SAH56fvc.cjs → katex-HkVgAsLB.cjs} +1 -1
- package/dist/ketchup2.cjs.js +107 -110
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +63778 -65955
- package/dist/{line-CrxZdHmO.js → line-BhAnxCE8.js} +3 -3
- package/dist/line-CpcTW4h-.cjs +1 -0
- package/dist/{linear-CxHa1DsM.cjs → linear-D0eFmsG1.cjs} +1 -1
- package/dist/{linear-BsPvNLJv.js → linear-lSeWuvgy.js} +3 -3
- package/dist/{mermaid-parser.core-CERDf-UG.js → mermaid-parser.core-Dz33ts1l.js} +24 -19
- package/dist/mermaid-parser.core-HQxPJrkY.cjs +3 -0
- package/dist/{mindmap-definition-QFDTVHPH--xULjpFZ.cjs → mindmap-definition-RKZ34NQL-D9BOsg5W.cjs} +29 -29
- package/dist/{mindmap-definition-QFDTVHPH-dYQoMeA6.js → mindmap-definition-RKZ34NQL-DHkmUkxh.js} +148 -148
- package/dist/{ordinal-Civr0hZL.cjs → ordinal-BnUYNBtU.cjs} +1 -1
- package/dist/{ordinal-C-VoL0XF.js → ordinal-MD9_ORcM.js} +1 -1
- package/dist/packet-YPE3B663-BwjweAZY.cjs +1 -0
- package/dist/packet-YPE3B663-D1Hr9AQm.js +3 -0
- package/dist/pie-LRSECV5Y-CpDfN1P0.js +3 -0
- package/dist/pie-LRSECV5Y-I1-OkIXi.cjs +1 -0
- package/dist/{pieDiagram-DEJITSTG-Dj5pX4fC.js → pieDiagram-4H26LBE5-ByA7ytZx.js} +40 -40
- package/dist/pieDiagram-4H26LBE5-CrLJh4L9.cjs +30 -0
- package/dist/{quadrantDiagram-34T5L4WZ-BKNOJBiR.js → quadrantDiagram-W4KKPZXB-CHHpmu1l.js} +547 -520
- package/dist/quadrantDiagram-W4KKPZXB-CalC_db_.cjs +7 -0
- package/dist/radar-GUYGQ44K-BXt3oO8c.cjs +1 -0
- package/dist/radar-GUYGQ44K-ByzrmbOz.js +3 -0
- package/dist/{requirementDiagram-MS252O5E-r3eZu57d.js → requirementDiagram-4Y6WPE33-BVcDFSx8.js} +165 -165
- package/dist/requirementDiagram-4Y6WPE33-SsePLT8d.cjs +84 -0
- package/dist/sankeyDiagram-5OEKKPKP-BgvTZ7jd.cjs +40 -0
- package/dist/{sankeyDiagram-XADWPNL6-ErTVVewH.js → sankeyDiagram-5OEKKPKP-C-ODz9lV.js} +202 -153
- package/dist/{sequenceDiagram-FGHM5R23-BmqbzzHY.js → sequenceDiagram-3UESZ5HK-Cnc0aDO4.js} +786 -779
- package/dist/sequenceDiagram-3UESZ5HK-DEVLteqD.cjs +162 -0
- package/dist/src-BgvDIw01.cjs +1 -0
- package/dist/{src-BQiFKP24.js → src-v9RrE_4h.js} +578 -563
- package/dist/stateDiagram-AJRCARHV-CuHe6Iji.js +217 -0
- package/dist/stateDiagram-AJRCARHV-D_yPvIRw.cjs +1 -0
- package/dist/stateDiagram-v2-BHNVJYJU-CTnE6fOT.cjs +1 -0
- package/dist/stateDiagram-v2-BHNVJYJU-DqstYMSl.js +27 -0
- package/dist/{timeline-definition-GMOUNBTQ-DgcI7XnE.js → timeline-definition-PNZ67QCA-Bj1BItRB.js} +324 -324
- package/dist/{timeline-definition-GMOUNBTQ-BeTHmikc.cjs → timeline-definition-PNZ67QCA-Cynbc96w.cjs} +48 -48
- package/dist/treeView-BLDUP644-CxLhpd93.js +3 -0
- package/dist/treeView-BLDUP644-DMwVx0AR.cjs +1 -0
- package/dist/treemap-LRROVOQU-BqmiLdFI.js +3 -0
- package/dist/treemap-LRROVOQU-XhaFZdvI.cjs +1 -0
- package/dist/v4-BpDBEhLK.js +30 -0
- package/dist/v4-CA8ev9YY.cjs +1 -0
- package/dist/{vennDiagram-DHZGUBPP-7tx3VVDU.js → vennDiagram-CIIHVFJN-CdmcxixA.js} +192 -192
- package/dist/vennDiagram-CIIHVFJN-Dm4D6omA.cjs +34 -0
- package/dist/wardley-L42UT6IY-C7UjBmVh.js +3 -0
- package/dist/wardley-L42UT6IY-DFAYOpjD.cjs +1 -0
- package/dist/{wardleyDiagram-NUSXRM2D-DY51LHBa.cjs → wardleyDiagram-YWT4CUSO-C-DdutxP.cjs} +61 -3
- package/dist/{wardleyDiagram-NUSXRM2D-DGKU7A2U.js → wardleyDiagram-YWT4CUSO-D1o116Wi.js} +272 -206
- package/dist/{xychartDiagram-5P7HB3ND--7RYyckP.js → xychartDiagram-2RQKCTM6-Byw7djcg.js} +213 -213
- package/dist/{xychartDiagram-5P7HB3ND-Cj0HUNew.cjs → xychartDiagram-2RQKCTM6-D0D4PIQS.cjs} +6 -6
- package/package.json +1 -1
- package/dist/architecture-YZFGNWBL-BRqToLcm.js +0 -3
- package/dist/architecture-YZFGNWBL-BTOWQWD9.cjs +0 -1
- package/dist/architectureDiagram-Q4EWVU46-CX_6DnSJ.cjs +0 -36
- package/dist/blockDiagram-DXYQGD6D-D6DypQdM.cjs +0 -132
- package/dist/channel-CRWct3-i.js +0 -5
- package/dist/channel-DkTvdPpU.cjs +0 -1
- package/dist/chunk-2KRD3SAO-Ca3zDQyj.js +0 -23
- package/dist/chunk-2KRD3SAO-oZrIWZvV.cjs +0 -1
- package/dist/chunk-426QAEUC-CDXJVpQr.js +0 -9
- package/dist/chunk-426QAEUC-CqN26l3E.cjs +0 -1
- package/dist/chunk-4TB4RGXK-B0SIkKDf.cjs +0 -206
- package/dist/chunk-5FUZZQ4R-Cj5KbGC7.cjs +0 -62
- package/dist/chunk-5PVQY5BW-DEPZKGvb.cjs +0 -2
- package/dist/chunk-67CJDMHE-2Qg7i1xJ.cjs +0 -1
- package/dist/chunk-67CJDMHE-YMBkJcAO.js +0 -23
- package/dist/chunk-AA7GKIK3-B_ZB6dou.js +0 -30
- package/dist/chunk-AA7GKIK3-dqnTmnvO.cjs +0 -1
- package/dist/chunk-CIAEETIT-ClHUj0Su.cjs +0 -1
- package/dist/chunk-CIAEETIT-XlxsAz-4.js +0 -23
- package/dist/chunk-D-IZpNpi.cjs +0 -1
- package/dist/chunk-EDXVE4YY-1dwNWzc7.cjs +0 -1
- package/dist/chunk-EDXVE4YY-CGNVB686.js +0 -25
- package/dist/chunk-ENJZ2VHE-BAWfx0nA.cjs +0 -10
- package/dist/chunk-FOC6F5B3-DcZs851j.cjs +0 -1
- package/dist/chunk-FOC6F5B3-E9n6-juB.js +0 -23
- package/dist/chunk-ICPOFSXX-hY6BIZ4Y.cjs +0 -122
- package/dist/chunk-K5T4RW27-BzDQkjC7.cjs +0 -94
- package/dist/chunk-K5T4RW27-DY7TOEqa.js +0 -16070
- package/dist/chunk-KGLVRYIC-5OJpfQCj.js +0 -23
- package/dist/chunk-KGLVRYIC-DnbIkai8.cjs +0 -1
- package/dist/chunk-ORNJ4GCN-CcrEtiCn.cjs +0 -1
- package/dist/chunk-ORNJ4GCN-CwkOSFbS.js +0 -31
- package/dist/chunk-WQLz0Won.js +0 -20
- package/dist/classDiagram-6PBFFD2Q-BT4_JTnP.cjs +0 -1
- package/dist/classDiagram-6PBFFD2Q-Dgaxt4wI.js +0 -29
- package/dist/classDiagram-v2-HSJHXN6E-CWhiK6nm.js +0 -29
- package/dist/classDiagram-v2-HSJHXN6E-DkBLzgTv.cjs +0 -1
- package/dist/clone-CQQwPjME.cjs +0 -1
- package/dist/clone-Dwbh_blD.js +0 -8
- package/dist/cose-bilkent-S5V4N54A-Bhdp-wcb.cjs +0 -1
- package/dist/dagre-BcwvU6ZF.cjs +0 -1
- package/dist/dagre-D17h-Z-U.js +0 -1606
- package/dist/dagre-KV5264BT-BnEKAAAn.js +0 -293
- package/dist/dagre-KV5264BT-DRbiLA37.cjs +0 -4
- package/dist/diagram-5BDNPKRD-B_Fa4dpl.js +0 -101
- package/dist/diagram-5BDNPKRD-CPN8m2Hl.cjs +0 -10
- package/dist/diagram-G4DWMVQ6-VpXkNb67.cjs +0 -24
- package/dist/diagram-MMDJMWI5-DGk_PUo9.cjs +0 -43
- package/dist/diagram-TYMM5635-BH_-vSv9.cjs +0 -24
- package/dist/dist-BgvMZbfo.cjs +0 -1
- package/dist/erDiagram-SMLLAGMA-vuYEmfFA.cjs +0 -85
- package/dist/flatten-BE1bWL-7.js +0 -40
- package/dist/flatten-DxvYSoR8.cjs +0 -1
- package/dist/ganttDiagram-T4ZO3ILL-C25CnBTv.cjs +0 -292
- package/dist/gitGraph-7Q5UKJZL-DZea3ltD.cjs +0 -1
- package/dist/gitGraph-7Q5UKJZL-sjlqDwJ_.js +0 -3
- package/dist/gitGraphDiagram-UUTBAWPF-0lCBo9nK.cjs +0 -106
- package/dist/graphlib-CdgJ32J_.cjs +0 -1
- package/dist/graphlib-DbQkSsC8.js +0 -373
- package/dist/identity-KQSjemTb.cjs +0 -1
- package/dist/identity-g0dsMjx7.js +0 -393
- package/dist/info-OMHHGYJF-Bk0VWVNW.js +0 -3
- package/dist/info-OMHHGYJF-C8QtwF0k.cjs +0 -1
- package/dist/infoDiagram-42DDH7IO-CQLxpytS.js +0 -19
- package/dist/infoDiagram-42DDH7IO-Da__a_a_.cjs +0 -2
- package/dist/isEmpty-CA3kJuev.cjs +0 -1
- package/dist/isEmpty-RwX-oIQS.js +0 -35
- package/dist/line-C7oijaT4.cjs +0 -1
- package/dist/mermaid-parser.core-DHpvGOZR.cjs +0 -3
- package/dist/packet-4T2RLAQJ-X0BMsNFj.js +0 -3
- package/dist/packet-4T2RLAQJ-lvmQnXPI.cjs +0 -1
- package/dist/pie-ZZUOXDRM-CJ_fU5k1.js +0 -3
- package/dist/pie-ZZUOXDRM-Dp4APKqR.cjs +0 -1
- package/dist/pieDiagram-DEJITSTG-7we8s9eC.cjs +0 -30
- package/dist/quadrantDiagram-34T5L4WZ-B3BFuPYQ.cjs +0 -7
- package/dist/radar-PYXPWWZC-BHWJy_E1.cjs +0 -1
- package/dist/radar-PYXPWWZC-DgZIW9Ah.js +0 -3
- package/dist/reduce-B7WW9rkU.cjs +0 -1
- package/dist/reduce-DNnkcf3M.js +0 -532
- package/dist/requirementDiagram-MS252O5E-BemsEy3Y.cjs +0 -84
- package/dist/sankeyDiagram-XADWPNL6-B9YCkPHh.cjs +0 -10
- package/dist/sequenceDiagram-FGHM5R23-CBpQL6X2.cjs +0 -157
- package/dist/src-DFxq-N5I.cjs +0 -1
- package/dist/stateDiagram-FHFEXIEX-CL9LE-W1.js +0 -217
- package/dist/stateDiagram-FHFEXIEX-Cju5Z2VS.cjs +0 -1
- package/dist/stateDiagram-v2-QKLJ7IA2-BHoytfGp.js +0 -27
- package/dist/stateDiagram-v2-QKLJ7IA2-DO1H6Vqa.cjs +0 -1
- package/dist/treeView-SZITEDCU-CT5vX0q9.cjs +0 -1
- package/dist/treeView-SZITEDCU-Df3xzFtO.js +0 -3
- package/dist/treemap-W4RFUUIX-Bk_jVZ7D.cjs +0 -1
- package/dist/treemap-W4RFUUIX-ClUtdSdn.js +0 -3
- package/dist/v4-6yr83DbP.cjs +0 -1
- package/dist/v4-BR71w5_q.js +0 -33
- package/dist/vennDiagram-DHZGUBPP-C16dnMoe.cjs +0 -34
- package/dist/wardley-RL74JXVD-BtHQbnUy.js +0 -3
- package/dist/wardley-RL74JXVD-y8RO5Iqv.cjs +0 -1
- /package/dist/{array-D8NZ46Ht.js → array-CBdkHBGa.js} +0 -0
- /package/dist/{array-Dxz0O8Q3.cjs → array-Cx1JwiGD.cjs} +0 -0
- /package/dist/{cytoscape.esm-CrBwLFXE.cjs → cytoscape.esm-BzblyxzZ.cjs} +0 -0
- /package/dist/{cytoscape.esm-CPjF_mSK.js → cytoscape.esm-VShrX2U1.js} +0 -0
- /package/dist/{defaultLocale-DtzyZW63.cjs → defaultLocale-Bj_Ndo9V.cjs} +0 -0
- /package/dist/{defaultLocale-Dcyuaxxg.js → defaultLocale-dGy1YRID.js} +0 -0
- /package/dist/{init-BO60vQHJ.js → init-B7h4SEX5.js} +0 -0
- /package/dist/{init-B2MubQrj.cjs → init-CEL65JUo.cjs} +0 -0
- /package/dist/{katex-Du5WiYIy.js → katex-DWDh1q_h.js} +0 -0
- /package/dist/{path-CvfwEr8y.js → path-CAXMhBzK.js} +0 -0
- /package/dist/{path-Civic7PQ.cjs → path-CRahBUHI.cjs} +0 -0
- /package/dist/{rough.esm-BLKo1fIQ.cjs → rough.esm-BEA_SCZB.cjs} +0 -0
- /package/dist/{rough.esm-1mqTSjCt.js → rough.esm-TWNWL4Us.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./src-BgvDIw01.cjs`),t=require(`./cytoscape.esm-BzblyxzZ.cjs`);var n=e.y(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){"use strict";var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){"use strict";function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(4);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.withChildren(),n.forEach(function(t){e.add(t)});return e},l.prototype.getNoOfChildren=function(){var e=0,t;if(this.child==null)e=1;else for(var n=this.child.getNodes(),r=0;r<n.length;r++)t=n[r],e+=t.getNoOfChildren();return e==0&&(e=1),e},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},l.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},l.prototype.scatter=function(){var e,t,n=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_X+s.nextDouble()*(r-n)+n;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=e,this.rect.y=t},l.prototype.updateBounds=function(){if(this.getChild()==null)throw`assert failed`;if(this.getChild().getNodes().length!=0){var e=this.getChild();if(e.updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var t=e.getRight()-e.getLeft(),n=e.getBottom()-e.getTop();this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){"use strict";function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a<i;a++)r=n[a],r.isInterGraph?this.graphManager.remove(r):r.source.owner.remove(r);var o=this.nodes.indexOf(t);if(o==-1)throw`Node not in owner node list!`;this.nodes.splice(o,1)}else if(e instanceof c){var r=e;if(r==null)throw`Edge is null!`;if(!(r.source!=null&&r.target!=null))throw`Source and/or target is null!`;if(!(r.source.owner!=null&&r.target.owner!=null&&r.source.owner==this&&r.target.owner==this))throw`Source and/or target owner is invalid!`;var l=r.source.edges.indexOf(r),u=r.target.edges.indexOf(r);if(!(l>-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;c<s;c++){var l=o[c];n=l.getTop(),r=l.getLeft(),e>n&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;m<p;m++){var h=f[m];e&&h.child!=null&&h.updateBounds(),o=h.getLeft(),s=h.getRight(),c=h.getTop(),u=h.getBottom(),t>o&&(t=o),n<s&&(n=s),r>c&&(r=c),a<u&&(a=u)}var g=new l(t,r,n-t,a-r);t==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),d=f[0].getParent().paddingLeft==null?this.margin:f[0].getParent().paddingLeft,this.left=g.x-d,this.right=g.x+g.width+d,this.top=g.y-d,this.bottom=g.y+g.height+d},f.calculateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d=e.length,f=0;f<d;f++){var p=e[f];o=p.getLeft(),s=p.getRight(),c=p.getTop(),u=p.getBottom(),t>o&&(t=o),n<s&&(n=s),r>c&&(r=c),a<u&&(a=u)}return new l(t,r,n-t,a-r)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r<n;r++){var i=t[r];e+=i.calcEstimatedSize()}return e==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=e/Math.sqrt(this.nodes.length),this.estimatedSize},f.prototype.updateConnected=function(){var e=this;if(this.nodes.length==0){this.isConnected=!0;return}var t=new d,n=new Set,r=this.nodes[0],i,a;for(r.withChildren().forEach(function(e){t.push(e),n.add(e)});t.length!==0;){r=t.shift(),i=r.getEdges();for(var o=i.length,s=0;s<o;s++)a=i[s].getOtherEndInGraph(r,this),a!=null&&!n.has(a)&&a.withChildren().forEach(function(e){t.push(e),n.add(e)})}if(this.isConnected=!1,n.size>=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){"use strict";var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s<o;s++)a=n[s],t.remove(a);var c=[];c=c.concat(t.getNodes());var l;o=c.length;for(var s=0;s<o;s++)l=c[s],t.remove(l);t==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(t);this.graphs.splice(u,1),t.parent=null}else if(e instanceof i){if(a=e,a==null)throw`Edge is null!`;if(!a.isInterGraph)throw`Not an inter-graph edge!`;if(!(a.source!=null&&a.target!=null))throw`Source and/or target is null!`;if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw`Source and/or target doesn't know this edge!`;var u=a.source.edges.indexOf(a);if(a.source.edges.splice(u,1),u=a.target.edges.indexOf(a),a.target.edges.splice(u,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw`Edge owner graph or owner graph manager is null!`;if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw`Not in owner graph manager's edge list!`;var u=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(u,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],t=this.getGraphs(),n=t.length,r=0;r<n;r++)e=e.concat(t[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],t=this.getGraphs();t.length;for(var n=0;n<t.length;n++)e=e.concat(t[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw`assert failed`;this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw`Root not in this graph mgr!`;this.rootGraph=e,e.parent??=this.layout.newNode(`Root node`)},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,t){if(!(e!=null&&t!=null))throw`assert failed`;if(e==t)return!0;var n=e.getOwner(),r;do{if(r=n.getParent(),r==null)break;if(r==t)return!0;if(n=r.getOwner(),n==null)break}while(!0);n=t.getOwner();do{if(r=n.getParent(),r==null)break;if(r==e)return!0;if(n=r.getOwner(),n==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,t,n,r,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++){if(e=a[s],t=e.source,n=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=n,t==n){e.lca=t.getOwner();continue}for(r=t.getOwner();e.lca==null;){for(e.targetInLca=n,i=n.getOwner();e.lca==null;){if(i==r){e.lca=i;break}if(i==this.rootGraph)break;if(e.lca!=null)throw`assert failed`;e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca??(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw`assert failed`}},a.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();var n=e.getOwner();do{if(n==null)break;var r=t.getOwner();do{if(r==null)break;if(r==n)return r;r=r.getParent().getOwner()}while(!0);n=n.getParent().getOwner()}while(!0);return n},a.prototype.calcInclusionTreeDepths=function(e,t){e==null&&t==null&&(e=this.rootGraph,t=1);for(var n,r=e.getNodes(),i=r.length,a=0;a<i;a++)n=r[a],n.inclusionTreeDepth=t,n.child!=null&&this.calcInclusionTreeDepths(n.child,t+1)},a.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,n=0;n<t;n++)if(e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=a}),(function(e,t,n){"use strict";var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){"use strict";var r=n(12);function i(){}i.calcSeparationAmount=function(e,t,n,r){if(!e.intersects(t))throw`assert failed`;var i=[,,];this.decideDirectionsForOverlappingNodes(e,t,i),n[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),n[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]<s?s=n[0]:o=n[1],n[0]=-1*i[0]*(s/2+r),n[1]=-1*i[1]*(o/2+r)},i.decideDirectionsForOverlappingNodes=function(e,t,n){e.getCenterX()<t.getCenterX()?n[0]=-1:n[0]=1,e.getCenterY()<t.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(e,t,n){var r=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),o=t.getCenterY();if(e.intersects(t))return n[0]=r,n[1]=i,n[2]=a,n[3]=o,!0;var s=e.getX(),c=e.getY(),l=e.getRight(),u=e.getX(),d=e.getBottom(),f=e.getRight(),p=e.getWidthHalf(),m=e.getHeightHalf(),h=t.getX(),g=t.getY(),_=t.getRight(),v=t.getX(),y=t.getBottom(),b=t.getRight(),x=t.getWidthHalf(),S=t.getHeightHalf(),C=!1,w=!1;if(r===a){if(i>o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(i<o)return n[0]=r,n[1]=d,n[2]=a,n[3]=g,!1}else if(i===o){if(r>a)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(r<a)return n[0]=l,n[1]=i,n[2]=h,n[3]=o,!1}else{var T=e.height/e.width,E=t.height/t.width,D=(o-i)/(a-r),O=void 0,k=void 0,A=void 0,j=void 0,M=void 0,N=void 0;if(-T===D?r>a?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((r-t)/(n-e)),n<e?i+=Math.PI:r<t&&(i+=this.TWO_PI)),i},i.doIntersect=function(e,t,n,r){var i=e.x,a=e.y,o=t.x,s=t.y,c=n.x,l=n.y,u=r.x,d=r.y,f=(o-i)*(d-l)-(u-c)*(s-a);if(f===0)return!1;var p=((d-l)*(u-i)+(c-u)*(d-a))/f,m=((a-s)*(u-i)+(o-i)*(d-a))/f;return 0<p&&p<1&&0<m&&m<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){"use strict";function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=function(e){return{value:e,next:null,prev:null}},o=function(e,t,n,r){return e===null?r.head=t:e.next=t,n===null?r.tail=t:n.prev=t,t.prev=e,t.next=n,r.length++,t},s=function(e,t){var n=e.prev,r=e.next;return n===null?t.head=r:n.next=r,r===null?t.tail=n:r.prev=n,e.prev=e.next=null,t.length--,e};e.exports=function(){function e(t){var n=this;i(this,e),this.length=0,this.head=null,this.tail=null,t?.forEach(function(e){return n.push(e)})}return r(e,[{key:`size`,value:function(){return this.length}},{key:`insertBefore`,value:function(e,t){return o(t.prev,a(e),t,this)}},{key:`insertAfter`,value:function(e,t){return o(t,a(e),t.next,this)}},{key:`insertNodeBefore`,value:function(e,t){return o(t.prev,e,t,this)}},{key:`insertNodeAfter`,value:function(e,t){return o(t,e,t.next,this)}},{key:`push`,value:function(e){return o(this.tail,a(e),null,this)}},{key:`unshift`,value:function(e){return o(null,a(e),this.head,this)}},{key:`remove`,value:function(e){return s(e,this)}},{key:`pop`,value:function(){return s(this.tail,this).value}},{key:`popNode`,value:function(){return s(this.tail,this)}},{key:`shift`,value:function(){return s(this.head,this).value}},{key:`shiftNode`,value:function(){return s(this.head,this)}},{key:`get_object_at`,value:function(e){if(e<=this.length()){for(var t=1,n=this.head;t<e;)n=n.next,t++;return n.value}}},{key:`set_object_at`,value:function(e,t){if(e<=this.length()){for(var n=1,r=this.head;n<e;)r=r.next,n++;r.value=t}}}]),e}()}),(function(e,t,n){"use strict";function r(e,t,n){this.x=null,this.y=null,e==null&&t==null&&n==null?(this.x=0,this.y=0):typeof e==`number`&&typeof t==`number`&&n==null?(this.x=e,this.y=t):e.constructor.name==`Point`&&t==null&&n==null&&(n=e,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(e,t,n){e.constructor.name==`Point`&&t==null&&n==null?(n=e,this.setLocation(n.x,n.y)):typeof e==`number`&&typeof t==`number`&&n==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},r.prototype.move=function(e,t){this.x=e,this.y=t},r.prototype.translate=function(e,t){this.x+=e,this.y+=t},r.prototype.equals=function(e){if(e.constructor.name==`Point`){var t=e;return this.x==t.x&&this.y==t.y}return this==e},r.prototype.toString=function(){return new r().constructor.name+`[x=`+this.x+`,y=`+this.y+`]`},e.exports=r}),(function(e,t,n){"use strict";function r(e,t,n,r){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&n!=null&&r!=null&&(this.x=e,this.y=t,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(e){this.x=e},r.prototype.getY=function(){return this.y},r.prototype.setY=function(e){this.y=e},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},e.exports=r}),(function(e,t,n){"use strict";var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e};function i(){}i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:e.uniqueID==null?(e.uniqueID=i.getString(),i.lastID++,e.uniqueID):e.uniqueID},i.getString=function(e){return e??=i.lastID,`Object#`+e},i.isPrimitive=function(e){var t=e===void 0?`undefined`:r(e);return e==null||t!=`object`&&t!=`function`},e.exports=i}),(function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var i=n(0),a=n(6),o=n(3),s=n(1),c=n(5),l=n(4),u=n(17),d=n(27);function f(e){d.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,e!=null&&(this.isRemoteUse=e)}f.RANDOM_SEED=1,f.prototype=Object.create(d.prototype),f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},f.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},f.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},f.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},f.prototype.newGraph=function(e){return new c(null,this.graphManager,e)},f.prototype.newNode=function(e){return new o(this.graphManager,e)},f.prototype.newEdge=function(e){return new s(null,null,e)},f.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},f.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var e=this.checkLayoutSuccess()?!1:this.layout();return i.ANIMATE===`during`?!1:(e&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},f.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},f.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var n=this.graphManager.getRoot().getNodes(),t=0;t<n.length;t++)n[t];this.update(this.graphManager.getRoot())}},f.prototype.update=function(e){if(e==null)this.update2();else if(e instanceof o){var t=e;if(t.getChild()!=null)for(var n=t.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);t.vGraphObject!=null&&t.vGraphObject.update(t)}else if(e instanceof s){var i=e;i.vGraphObject!=null&&i.vGraphObject.update(i)}else if(e instanceof c){var a=e;a.vGraphObject!=null&&a.vGraphObject.update(a)}},f.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},f.prototype.transform=function(e){if(e==null)this.transform(new l(0,0));else{var t=new u,n=this.graphManager.getRoot().updateLeftTop();if(n!=null){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(n.x),t.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i,a=0;a<r.length;a++)i=r[a],i.transform(t)}}},f.prototype.positionNodesRandomly=function(e){if(e==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,n,r=e.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.getChild(),n==null||n.getNodes().length==0?t.scatter():(this.positionNodesRandomly(n),t.updateBounds())},f.prototype.getFlatForest=function(){for(var e=[],t=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)n[a].getChild()!=null&&(i=!1);if(!i)return e;var o=new Set,s=[],c=new Map,l=[];for(l=l.concat(n);l.length>0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a<d.length;a++){var f=d[a].getOtherEnd(u);if(c.get(u)!=f)if(!o.has(f))s.push(f),c.set(f,u);else{t=!1;break}}}if(!t)e=[];else{var p=[].concat(r(o));e.push(p);for(var a=0;a<p.length;a++){var m=p[a],h=l.indexOf(m);h>-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var o=this.newEdge(null);this.graphManager.add(o,n,a),t.add(a),n=a}var o=this.newEdge(null);return this.graphManager.add(o,n,e.target),this.edgeToDummyNodes.set(e,t),e.isInterGraph()?this.graphManager.remove(e):r.remove(e),t},f.prototype.createBendpointsFromDummyNodes=function(){var e=[];e=e.concat(this.graphManager.getAllEdges()),e=[].concat(r(this.edgeToDummyNodes.keys()),e);for(var t=0;t<e.length;t++){var n=e[t];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var o=i[a],s=new l(o.getCenterX(),o.getCenterY()),c=n.bendpoints.get(a);c.x=s.x,c.y=s.y,o.getOwner().remove(o)}this.graphManager.add(n,n.source,n.target)}}},f.transform=function(e,t,n,r){if(n!=null&&r!=null){var i=t;if(e<=50){var a=t/n;i-=(t-a)/50*(50-e)}else{var o=t*r;i+=(o-t)/50*(e-50)}return i}else{var s,c;return e<=50?(s=9*t/500,c=t/10):(s=9*t/50,c=-8*t),s*e+c}},f.findCenterOfTree=function(e){var t=[];t=t.concat(e);var n=[],r=new Map,i=!1,a=null;(t.length==1||t.length==2)&&(i=!0,a=t[0]);for(var o=0;o<t.length;o++){var s=t[o],c=s.getNeighborsList().size;r.set(s,s.getNeighborsList().size),c==1&&n.push(s)}var l=[];for(l=l.concat(n);!i;){var u=[];u=u.concat(l),l=[];for(var o=0;o<t.length;o++){var s=t[o],d=t.indexOf(s);d>=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var i=n(15),a=n(7),o=n(0),s=n(8),c=n(9);function l(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}for(var u in l.prototype=Object.create(i.prototype),i)l[u]=i[u];l.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,i,s,c=this.getGraphManager().getAllEdges(),l=0;l<c.length;l++)e=c[l],e.idealLength=this.idealEdgeLength,e.isInterGraph&&(n=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),s=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+s-2*o.SIMPLE_NODE_SIZE),t=e.getLca().getInclusionTreeDepth(),e.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*t))},l.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;n<s.length;n++)i=s[n],this.calculateRepulsionForceOfANode(i,c,e,t),c.add(i);else for(n=0;n<s.length;n++)for(i=s[n],r=n+1;r<s.length;r++)o=s[r],i.getOwner()==o.getOwner()&&this.calcRepulsionForce(i,o)},l.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),n=0;n<t.length;n++)e=t[n],this.calcGravitationalForce(e)},l.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t,n=0;n<e.length;n++)t=e[n],t.move()},l.prototype.calcSpringForce=function(e,t){var n=e.getSource(),r=e.getTarget(),i,a,o,s;if(this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;i=e.getLength(),i!=0&&(a=this.springConstant*(i-t),o=a*(e.lengthX/i),s=a*(e.lengthY/i),n.springForceX+=o,n.springForceY+=s,r.springForceX-=o,r.springForceY-=s)},l.prototype.calcRepulsionForce=function(e,t){var n=e.getRect(),r=t.getRect(),i=[,,],o=[,,,,],l,u,d,f,p,m,h;if(n.intersects(r)){s.calcSeparationAmount(n,r,i,a.DEFAULT_EDGE_LENGTH/2),m=2*i[0],h=2*i[1];var g=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren);e.repulsionForceX-=g*m,e.repulsionForceY-=g*h,t.repulsionForceX+=g*m,t.repulsionForceY+=g*h}else this.uniformLeafNodeSizes&&e.getChild()==null&&t.getChild()==null?(l=r.getCenterX()-n.getCenterX(),u=r.getCenterY()-n.getCenterY()):(s.getIntersection(n,r,o),l=o[2]-o[0],u=o[3]-o[1]),Math.abs(l)<a.MIN_REPULSION_DIST&&(l=c.sign(l)*a.MIN_REPULSION_DIST),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=c.sign(u)*a.MIN_REPULSION_DIST),d=l*l+u*u,f=Math.sqrt(d),p=this.repulsionConstant*e.noOfChildren*t.noOfChildren/d,m=p*l/f,h=p*u/f,e.repulsionForceX-=m,e.repulsionForceY-=h,t.repulsionForceX+=m,t.repulsionForceY+=h},l.prototype.calcGravitationalForce=function(e){var t=e.getOwner(),n=(t.getRight()+t.getLeft())/2,r=(t.getTop()+t.getBottom())/2,i=e.getCenterX()-n,a=e.getCenterY()-r,o=Math.abs(i)+e.getWidth()/2,s=Math.abs(a)+e.getHeight()/2,c;e.getOwner()==this.graphManager.getRoot()?(c=t.getEstimatedSize()*this.gravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)e=t[n],e.noOfChildren=e.getNoOfChildren()},l.prototype.calcGrid=function(e){var t=0,n=0;t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var r=Array(t),i=0;i<t;i++)r[i]=Array(n);for(var i=0;i<t;i++)for(var a=0;a<n;a++)r[i][a]=[];return r},l.prototype.addNodeToGrid=function(e,t,n){var r=0,i=0,a=0,o=0;r=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-n)/this.repulsionRange)),o=parseInt(Math.floor((e.getRect().height+e.getRect().y-n)/this.repulsionRange));for(var s=r;s<=i;s++)for(var c=a;c<=o;c++)this.grid[s][c].push(e),e.setGridCoordinates(r,i,a,o)},l.prototype.updateGrid=function(){var e,t,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<n.length;e++)t=n[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(e,t,n,i){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n||i){var o=new Set;e.surrounding=[];for(var s,c=this.grid,l=e.startX-1;l<e.finishX+2;l++)for(var u=e.startY-1;u<e.finishY+2;u++)if(!(l<0||u<0||l>=c.length||u>=c[0].length)){for(var d=0;d<c[l][u].length;d++)if(s=c[l][u][d],!(e.getOwner()!=s.getOwner()||e==s)&&!t.has(s)&&!o.has(s)){var f=Math.abs(e.getCenterX()-s.getCenterX())-(e.getWidth()/2+s.getWidth()/2),p=Math.abs(e.getCenterY()-s.getCenterY())-(e.getHeight()/2+s.getHeight()/2);f<=this.repulsionRange&&p<=this.repulsionRange&&o.add(s)}}e.surrounding=[].concat(r(o))}for(l=0;l<e.surrounding.length;l++)this.calcRepulsionForce(e,e.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},e.exports=l}),(function(e,t,n){"use strict";var r=n(1),i=n(7);function a(e,t,n){r.call(this,e,t,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];e.exports=a}),(function(e,t,n){"use strict";var r=n(3);function i(e,t,n,i){r.call(this,e,t,n,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(e,t,n,r){this.startX=e,this.finishX=t,this.startY=n,this.finishY=r},e.exports=i}),(function(e,t,n){"use strict";function r(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},e.exports=r}),(function(e,t,n){"use strict";var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(e,t){var n=r.createID(e);this.contains(n)||(this.map[n]=t,this.keys.push(e))},i.prototype.contains=function(e){return r.createID(e),this.map[e]!=null},i.prototype.get=function(e){var t=r.createID(e);return this.map[t]},i.prototype.keySet=function(){return this.keys},e.exports=i}),(function(e,t,n){"use strict";var r=n(14);function i(){this.set={}}i.prototype.add=function(e){var t=r.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[r.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[r.createID(e)]==e},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),n=t.length,r=0;r<n;r++)e.push(this.set[t[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];this.add(r)}},e.exports=i}),(function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=n(11);e.exports=function(){function e(t,n){i(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=t instanceof a?t.size():t.length,this._quicksort(t,0,r-1)}return r(e,[{key:`_quicksort`,value:function(e,t,n){if(t<n){var r=this._partition(e,t,n);this._quicksort(e,t,r),this._quicksort(e,r+1,n)}}},{key:`_partition`,value:function(e,t,n){for(var r=this._get(e,t),i=t,a=n;;){for(;this.compareFunction(r,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),r);)i++;if(i<a)this._swap(e,i,a),i++,a--;else return a}}},{key:`_get`,value:function(e,t){return e instanceof a?e.get_object_at(t):e[t]}},{key:`_set`,value:function(e,t,n){e instanceof a?e.set_object_at(t,n):e[t]=n}},{key:`_swap`,value:function(e,t,n){var r=this._get(e,t);this._set(e,t,this._get(e,n)),this._set(e,n,r)}},{key:`_defaultCompareFunction`,value:function(e,t){return t>e}}]),e}()}),(function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.exports=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.grid[s][c]=0}this.tracebackGrid=Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=Array(this.jMax);for(var u=0;u<this.jMax;u++)this.tracebackGrid[l][u]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(e,[{key:`getScore`,value:function(){return this.score}},{key:`getAlignments`,value:function(){return this.alignments}},{key:`computeGrids`,value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=void 0;i=this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty;var a=this.grid[n-1][r]+this.gap_penalty,o=this.grid[n][r-1]+this.gap_penalty,s=[i,a,o],c=this.arrayAllMaxIndexes(s);this.grid[n][r]=s[c[0]],this.tracebackGrid[n][r]=[c.includes(0),c.includes(1),c.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:`alignmentTraceback`,value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:``,seq2:``});e[0];){var t=e[0],n=this.tracebackGrid[t.pos[0]][t.pos[1]];n[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),n[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:`-`+t.seq2}),n[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:`-`+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),t.pos[0]===0&&t.pos[1]===0&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments}},{key:`getAllIndexes`,value:function(e,t){for(var n=[],r=-1;(r=e.indexOf(t,r+1))!==-1;)n.push(r);return n}},{key:`arrayAllMaxIndexes`,value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),e}()}),(function(e,t,n){"use strict";var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),e.exports=r}),(function(e,t,n){"use strict";function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];e===r.event&&r.callback(t)}},e.exports=r})])})})),r=e.y(((e,t)=>{(function(r,i){typeof e==`object`&&typeof t==`object`?t.exports=i(n()):typeof define==`function`&&define.amd?define([`layout-base`],i):typeof e==`object`?e.coseBase=i(n()):r.coseBase=i(r.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),(function(e,t,n){"use strict";var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),c=n(1),l=n(0).FDLayoutConstants,u=n(0).LayoutConstants,d=n(0).Point,f=n(0).PointD,p=n(0).Layout,m=n(0).Integer,h=n(0).IGeometry,g=n(0).LGraph,_=n(0).Transform;function v(){r.call(this),this.toBeTiled={}}for(var y in v.prototype=Object.create(r.prototype),r)v[y]=r[y];v.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},v.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},v.prototype.newNode=function(e){return new o(this.graphManager,e)},v.prototype.newEdge=function(e){return new s(null,null,e)},v.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=l.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=l.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=l.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(l.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i;for(i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},v.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t=new Set,n;for(n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new f),r.getBendpoints().push(new f),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1){var s;for(s=0;s<o.length;s++){var c=o[s];c.getBendpoints().push(new f),this.createDummyNodesForBendpoints(c)}}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},v.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new f(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=c.DEFAULT_COMPONENT_SEPERATION),r=0);var l=e[s],m=p.findCenterOfTree(l);t.x=a,t.y=i,o=v.radialLayout(l,m,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},v.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(t,null,0,359,0,r);var i=g.calculateBounds(e),a=new _;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new f(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},v.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*h.TWO_PI/360,c=i*Math.cos(s),l=i*Math.sin(s);e.setCenter(c,l);var u=[];u=u.concat(e.getEdges());var d=u.length;t!=null&&d--;for(var f=0,p=u.length,m,g=e.getEdgesBetween(t);g.length>1;){var _=g[0];g.splice(0,1);var y=u.indexOf(_);y>=0&&u.splice(y,1),p--,d--}m=t==null?0:(u.indexOf(g[0])+1)%p;for(var b=Math.abs(r-n)/d,x=m;f!=d;x=++x%p){var S=u[x].getOtherEnd(e);if(S!=t){var C=(n+f*b)%360,w=(C+b)%360;v.branchRadialLayout(S,e,C,w,i+a,a),f++}}},v.maxDiagonalInTree=function(e){for(var t=m.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],c=a.getParent().id;t[c]===void 0&&(t[c]=[]),t[c]=t[c].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;l<t[n].length;l++){var u=t[n][l];c.remove(u),s.add(u)}}})},v.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},v.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height})},v.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},v.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},v.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},v.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},v.prototype.adjustLocations=function(e,t,n,r,i){t+=r,n+=i;for(var a=t,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var c=0,l=0;l<s.length;l++){var u=s[l];u.rect.x=t,u.rect.y=n,t+=u.rect.width+e.horizontalPadding,u.rect.height>c&&(c=u.rect.height)}n+=c+e.verticalPadding}},v.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},v.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height<t.rect.width*t.rect.height)});for(var r=0;r<e.length;r++){var i=e[r];n.rows.length==0?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},v.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},v.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]<n&&r>0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.width<t?(e.height+a)/t:(e.height+a)/e.width;return s<1&&(s=1/s),o<1&&(o=1/o),o<s},v.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.height+=l-c,this.shiftToLastRow(e)}},v.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null&&(i.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(t==1){for(var o=[],s=0;s<i.length;s++)i[s][0].getEdges().length==1&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];n=r==e[1].source?e[1].target:e[1].source;var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,c=[0,0,0,0];if(o>0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a<this.grid.length-1)for(var u=o;u<=s;u++)c[1]+=this.grid[a+1][u].length+this.grid[a][u].length-1;if(s<this.grid[0].length-1)for(var u=i;u<=a;u++)c[2]+=this.grid[u][s+1].length+this.grid[u][s].length-1;if(i>0)for(var u=o;u<=s;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d=m.MAX_VALUE,f,p,h=0;h<c.length;h++)c[h]<d?(d=c[h],f=1,p=h):c[h]==d&&f++;if(f==3&&d==0)c[0]==0&&c[1]==0&&c[2]==0?t=1:c[0]==0&&c[1]==0&&c[3]==0?t=0:c[0]==0&&c[2]==0&&c[3]==0?t=3:c[1]==0&&c[2]==0&&c[3]==0&&(t=2);else if(f==2&&d==0){var g=Math.floor(Math.random()*2);t=c[0]==0&&c[1]==0?g==0?0:1:c[0]==0&&c[2]==0?g==0?0:2:c[0]==0&&c[3]==0?g==0?0:3:c[1]==0&&c[2]==0?g==0?1:2:c[1]==0&&c[3]==0?g==0?1:3:g==0?2:3}else if(f==4&&d==0){var g=Math.floor(Math.random()*4);t=g}else t=p;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-l.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+l.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+l.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-l.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=v}),(function(e,t,n){"use strict";var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r})])})})),i=e.y(((e,t)=>{(function(n,i){typeof e==`object`&&typeof t==`object`?t.exports=i(r()):typeof define==`function`&&define.amd?define([`cose-base`],i):typeof e==`object`?e.cytoscapeCoseBilkent=i(r()):n.cytoscapeCoseBilkent=i(n.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){"use strict";var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,c=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,u={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function f(e){this.options=d(u,e),p(this.options)}var p=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.quality==`draft`?r.QUALITY=0:e.quality==`proof`?r.QUALITY=2:r.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};f.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),c=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var l=0;l<c.length;l++){var u=c[l],d=this.idToLNode[u.data(`source`)],f=this.idToLNode[u.data(`target`)];if(d!==f&&d.getEdgesBetween(f).length==0){var p=a.add(r.newEdge(),d,f);p.id=u.id()}}var m=function(e,t){typeof e==`number`&&(e=t);var n=e.data(`id`),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},h=function a(){for(var o=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one(`layoutready`,n.ready),i.cy.trigger({type:`layoutready`,layout:i}))},s=i.options.refresh,c,l=0;l<s&&!c;l++)c=i.stopped||i.layout.tick();if(c){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(m),o(),i.cy.one(`layoutstop`,i.options.stop),i.cy.trigger({type:`layoutstop`,layout:i}),t&&cancelAnimationFrame(t),e=!1;return}var u=i.layout.getPositionsData();n.eles.nodes().positions(function(e,t){if(typeof e==`number`&&(e=t),!e.isParent()){for(var n=e.id(),r=u[n],i=e;r==null&&(r=u[i.data(`parent`)]||u[`DummyCompound_`+i.data(`parent`)],u[n]=r,i=i.parent()[0],i!=null););return r==null?{x:e.position(`x`),y:e.position(`y`)}:{x:r.x,y:r.y}}}),o(),t=requestAnimationFrame(a)};return r.addListener(`layoutstarted`,function(){i.options.animate===`during`&&(t=requestAnimationFrame(h))}),r.runLayout(),this.options.animate!==`during`&&(i.options.eles.nodes().not(`:parent`).layoutPositions(i,i.options,m),e=!1),this},f.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},f.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a=t[i],o=a.children(),u,d=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(u=a.outerWidth()!=null&&a.outerHeight()!=null?e.add(new s(n.graphManager,new c(a.position(`x`)-d.w/2,a.position(`y`)-d.h/2),new l(parseFloat(d.w),parseFloat(d.h)))):e.add(new s(this.graphManager)),u.id=a.data(`id`),u.paddingLeft=parseInt(a.css(`padding`)),u.paddingTop=parseInt(a.css(`padding`)),u.paddingRight=parseInt(a.css(`padding`)),u.paddingBottom=parseInt(a.css(`padding`)),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var f=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,m=a.css(`text-halign`);u.labelWidth=f,u.labelHeight=p,u.labelPos=m}if(this.idToLNode[a.data(`id`)]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),o!=null&&o.length>0){var h=n.getGraphManager().add(n.newGraph(),u);this.processChildrenList(h,o,n)}}},f.prototype.stop=function(){return this.stopped=!0,this};var m=function(e){e(`layout`,`cose-bilkent`,f)};typeof cytoscape<`u`&&m(cytoscape),e.exports=m})])})})),a=e.x(i(),1);t.t.use(a.default);function o(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}e.h(o,`addNodes`);function s(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}e.h(s,`addEdges`);function c(n){return new Promise(r=>{let i=e.p(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),a=t.t({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});i.remove(),o(n.nodes,a),s(n.edges,a),a.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),a.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),a.ready(t=>{e.g.info(`Cytoscape ready`,t),r(a)})})}e.h(c,`createCytoscapeInstance`);function l(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}e.h(l,`extractPositionedNodes`);function u(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}e.h(u,`extractPositionedEdges`);async function d(t,n){e.g.debug(`Starting cose-bilkent layout algorithm`);try{f(t);let n=await c(t),r=l(n),i=u(n);return e.g.debug(`Layout completed: ${r.length} nodes, ${i.length} edges`),{nodes:r,edges:i}}catch(t){throw e.g.error(`Error in cose-bilkent layout algorithm:`,t),t}}e.h(d,`executeCoseBilkentLayout`);function f(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}e.h(f,`validateLayoutData`);var p=e.h(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:c},{algorithm:l})=>{let u={},f={},p=t.select(`g`);a(p,e.markers,e.type,e.diagramId);let m=p.insert(`g`).attr(`class`,`subgraphs`),h=p.insert(`g`).attr(`class`,`edgePaths`),g=p.insert(`g`).attr(`class`,`edgeLabels`),_=p.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};f[t.id]=e,u[t.id]=e,await n(m,t)}else{let n={...t};u[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await d({...e,nodes:e.nodes.map(e=>{let t=u[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=u[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=u[t.start??``],a=u[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};c(o,r(h,o,f,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};c(i,r(h,i,f,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`);exports.render=p;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e=require(`./src-BgvDIw01.cjs`),t=require(`./chunk-CSCIHK7Q-BPMuICCz.cjs`);require(`./chunk-5ZQYHXKU-BMnKD7Zq.cjs`),require(`./chunk-BSJP7CBP-CaeBFqNU.cjs`);const n=require(`./chunk-L5ZTLDWV-BE9udiOh.cjs`);require(`./chunk-NZK2D7GU-_twqedIe.cjs`),require(`./chunk-O5CBEL6O-CDvi2oZo.cjs`);const r=require(`./chunk-3OPIFGDE-CT5oNC5X.cjs`),i=require(`./chunk-KSCS5N6A-DO8jEi0y.cjs`),a=require(`./graphlib-B5AXIZA4.cjs`),o=require(`./dagre-CC68z3y6.cjs`);var s=4;function c(e){return o.r(e,s)}function l(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:u(e),edges:d(e)};return a.r(e.graph())||(t.value=c(e.graph())),t}function u(e){return o.n(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return a.r(n)||(i.value=n),a.r(r)||(i.parent=r),i})}function d(e){return o.n(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return a.r(t.name)||(r.name=t.name),a.r(n)||(r.value=n),r})}var f=new Map,p=new Map,m=new Map,h=e.h(()=>{p.clear(),m.clear(),f.clear()},`clear`),g=e.h((t,n)=>{let r=p.get(n)||[];return e.g.trace(`In isDescendant`,n,` `,t,` = `,r.includes(t)),r.includes(t)},`isDescendant`),_=e.h((t,n)=>{let r=p.get(n)||[];return e.g.info(`Descendants of `,n,` is `,r),e.g.info(`Edge is `,t),t.v===n||t.w===n?!1:r?r.includes(t.v)||g(t.v,n)||g(t.w,n)||r.includes(t.w):(e.g.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),v=e.h((t,n,r,i)=>{e.g.warn(`Copying children of `,t,`root`,i,`data`,n.node(t),i);let a=n.children(t)||[];t!==i&&a.push(t),e.g.warn(`Copying (nodes) clusterId`,t,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)v(a,n,r,i);else{let o=n.node(a);e.g.info(`cp `,a,` to `,i,` with parent `,t),r.setNode(a,o),i!==n.parent(a)&&(e.g.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),t!==i&&a!==t?(e.g.debug(`Setting parent`,a,t),r.setParent(a,t)):(e.g.info(`In copy `,t,`root`,i,`data`,n.node(t),i),e.g.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,t!==i,`node!==clusterId`,a!==t));let s=n.edges(a);e.g.debug(`Copying Edges`,s),s.forEach(a=>{e.g.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);e.g.info(`Edge data`,o,i);try{_(a,i)?(e.g.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),e.g.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):e.g.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,t)}catch(t){e.g.error(t)}})}e.g.debug(`Removing node`,a),n.removeNode(a)})},`copy`),y=e.h((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)m.set(i,e),r=[...r,...y(i,t)];return r},`extractDescendants`),b=e.h((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),x=e.h((t,n,r)=>{let i=n.children(t);if(e.g.trace(`Searching children of id `,t,i),i.length<1)return t;let a;for(let e of i){let t=x(e,n,r),i=b(n,r,t);if(t)if(i.length>0)a=t;else return t}return a},`findNonClusterChild`),S=e.h(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,`getAnchorId`),C=e.h((t,n)=>{if(!t||n>10){e.g.debug(`Opting out, no graph `);return}else e.g.debug(`Opting in, graph `);t.nodes().forEach(function(n){t.children(n).length>0&&(e.g.warn(`Cluster identified`,n,` Replacement id in edges: `,x(n,t,n)),p.set(n,y(n,t)),f.set(n,{id:x(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){let r=t.children(n),i=t.edges();r.length>0?(e.g.debug(`Cluster identified`,n,p),i.forEach(t=>{g(t.v,n)^g(t.w,n)&&(e.g.warn(`Edge: `,t,` leaves cluster `,n),e.g.warn(`Descendants of XXX `,n,`: `,p.get(n)),f.get(n).externalConnections=!0)})):e.g.debug(`Not a cluster `,n,p)});for(let e of f.keys()){let n=f.get(e).id,r=t.parent(n);r!==e&&f.has(r)&&!f.get(r).externalConnections&&(f.get(e).id=r)}t.edges().forEach(function(n){let r=t.edge(n);e.g.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),e.g.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(t.edge(n)));let i=n.v,a=n.w;if(e.g.warn(`Fix XXX`,f,`ids:`,n.v,n.w,`Translating: `,f.get(n.v),` --- `,f.get(n.w)),f.get(n.v)||f.get(n.w)){if(e.g.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=S(n.v),a=S(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){let e=t.parent(i);f.get(e).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let e=t.parent(a);f.get(e).externalConnections=!0,r.toCluster=n.w}e.g.warn(`Fix Replacing with XXX`,i,a,n.name),t.setEdge(i,a,r,n.name)}}),e.g.warn(`Adjusted Graph`,l(t)),w(t,0),e.g.trace(f)},`adjustClustersAndEdges`),w=e.h((t,n)=>{if(e.g.warn(`extractor - `,n,l(t),t.children(`D`)),n>10){e.g.error(`Bailing out`);return}let r=t.nodes(),i=!1;for(let e of r){let n=t.children(e);i||=n.length>0}if(!i){e.g.debug(`Done, no node has children`,t.nodes());return}e.g.debug(`Nodes = `,r,n);for(let i of r)if(e.g.debug(`Extracting node`,i,f,f.has(i)&&!f.get(i).externalConnections,!t.parent(i),t.node(i),t.children(`D`),` Depth `,n),!f.has(i))e.g.debug(`Not a cluster`,i,n);else if(!f.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){e.g.warn(`Cluster without external connections, without a parent and with children`,i,n);let r=t.graph().rankdir===`TB`?`LR`:`TB`;f.get(i)?.clusterData?.dir&&(r=f.get(i).clusterData.dir,e.g.warn(`Fixing dir`,f.get(i).clusterData.dir,r));let o=new a.t({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});e.g.warn(`Old graph before copy`,l(t)),v(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:f.get(i).clusterData,label:f.get(i).label,graph:o}),e.g.warn(`New graph after copy node: (`,i,`)`,l(o)),e.g.debug(`Old graph after copy`,l(t))}else e.g.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!f.get(i).externalConnections,` no parent: `,!t.parent(i),` children `,t.children(i)&&t.children(i).length>0,t.children(`D`),n),e.g.debug(f);r=t.nodes(),e.g.warn(`New list of nodes`,r);for(let i of r){let r=t.node(i);e.g.warn(` Now next level`,i,r),r?.clusterNode&&w(r.graph,n+1)}},`extractor`),T=e.h((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=T(e,e.children(t));n=[...n,...r]}),n},`sorter`),E=e.h(e=>T(e,e.children()),`sortNodesByHierarchy`),D=e.h(async(t,a,s,c,u,d)=>{e.g.warn(`Graph in recursive render:XAX`,l(a),u);let p=a.graph().rankdir;e.g.trace(`Dir in recursive render - dir:`,p);let m=t.insert(`g`).attr(`class`,`root`);a.nodes()?e.g.info(`Recursive render XXX`,a.nodes()):e.g.info(`No nodes found for`,a),a.edges().length>0&&e.g.info(`Recursive edges`,a.edge(a.edges()[0]));let h=m.insert(`g`).attr(`class`,`clusters`),g=m.insert(`g`).attr(`class`,`edgePaths`),_=m.insert(`g`).attr(`class`,`edgeLabels`),v=m.insert(`g`).attr(`class`,`nodes`);await Promise.all(a.nodes().map(async function(t){let n=a.node(t);if(u!==void 0){let n=JSON.parse(JSON.stringify(u.clusterData));e.g.trace(`Setting data for parent cluster XXX
|
|
2
|
+
Node.id = `,t,`
|
|
3
|
+
data=`,n.height,`
|
|
4
|
+
Parent cluster`,u.height),a.setNode(u.id,n),a.parent(t)||(e.g.trace(`Setting parent`,t,u.id),a.setParent(t,u.id,n))}if(e.g.info(`(Insert) Node XXX`+t+`: `+JSON.stringify(a.node(t))),n?.clusterNode){e.g.info(`Cluster identified XBX`,t,n.width,a.node(t));let{ranksep:i,nodesep:o}=a.graph();n.graph.setGraph({...n.graph.graph(),ranksep:i+25,nodesep:o});let l=await D(v,n.graph,s,c,a.node(t),d),u=l.elem;r.u(n,u),n.diff=l.diff||0,e.g.info(`New compound node after recursive render XAX`,t,`width`,n.width,`height`,n.height),r.l(u,n)}else a.children(t).length>0?(e.g.trace(`Cluster - the non recursive path XBX`,t,n.id,n,n.width,`Graph:`,a),e.g.trace(x(n.id,a)),f.set(n.id,{id:x(n.id,a),node:n})):(e.g.trace(`Node - the non recursive path XAX`,t,v,a.node(t),p),await r.a(v,a.node(t),{config:d,dir:p}))})),await e.h(async()=>{let t=a.edges().map(async function(t){let n=a.edge(t.v,t.w,t.name);e.g.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),e.g.info(`Edge `+t.v+` -> `+t.w+`: `,t,` `,JSON.stringify(a.edge(t))),e.g.info(`Fix`,f,`ids:`,t.v,t.w,`Translating: `,f.get(t.v),f.get(t.w)),await i.r(_,n)});await Promise.all(t)},`processEdges`)(),e.g.info(`Graph before layout:`,JSON.stringify(l(a))),e.g.info(`############################################# XXX`),e.g.info(`### Layout ### XXX`),e.g.info(`############################################# XXX`),o.t(a),e.g.info(`Graph after layout:`,JSON.stringify(l(a)));let y=0,{subGraphTitleTotalMargin:b}=n.n(d);return await Promise.all(E(a).map(async function(t){let n=a.node(t);if(e.g.info(`Position XBX => `+t+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=b,e.g.info(`A tainted cluster node XBX1`,t,n.id,n.width,n.height,n.x,n.y,a.parent(t)),f.get(n.id).node=n,r.c(n);else if(a.children(t).length>0){e.g.info(`A pure cluster node XBX1`,t,n.id,n.x,n.y,n.width,n.height,a.parent(t)),n.height+=b,a.node(n.parentId);let i=n?.padding/2||0,o=n?.labelBBox?.height||0,s=o-i||0;e.g.debug(`OffsetY`,s,`labelHeight`,o,`halfPadding`,i),await r.i(h,n),f.get(n.id).node=n}else{let t=a.node(n.parentId);n.y+=b/2,e.g.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,t,t?.offsetY,n),r.c(n)}})),a.edges().forEach(function(t){let n=a.edge(t);e.g.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(n),n),n.points.forEach(e=>e.y+=b/2),i.a(n,i.n(g,n,f,s,a.node(t.v),a.node(t.w),c))}),a.nodes().forEach(function(t){let n=a.node(t);e.g.info(t,n.type,n.diff),n.isGroup&&(y=n.diff)}),e.g.warn(`Returning from recursive render XAX`,m,y),{elem:m,diff:y}},`recursiveRender`),O=e.h(async(n,o)=>{let s=new a.t({multigraph:!0,compound:!0}).setGraph({rankdir:n.direction,nodesep:n.config?.nodeSpacing||n.config?.flowchart?.nodeSpacing||n.nodeSpacing,ranksep:n.config?.rankSpacing||n.config?.flowchart?.rankSpacing||n.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),c=o.select(`g`);i.i(c,n.markers,n.type,n.diagramId),r.n(),i.t(),r.t(),h(),n.nodes.forEach(e=>{s.setNode(e.id,{...e}),e.parentId&&s.setParent(e.id,e.parentId)}),e.g.debug(`Edges:`,n.edges),n.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,i=s.node(t);s.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),s.setParent(n,i.parentId),s.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),s.setParent(r,i.parentId);let a=structuredClone(e),o=structuredClone(e),c=structuredClone(e);a.label=``,a.arrowTypeEnd=`none`,a.endLabelLeft=``,a.endLabelRight=``,a.startLabelLeft=``,a.id=t+`-cyclic-special-1`,o.startLabelRight=``,o.startLabelLeft=``,o.endLabelLeft=``,o.endLabelRight=``,o.arrowTypeStart=`none`,o.arrowTypeEnd=`none`,o.id=t+`-cyclic-special-mid`,c.label=``,c.startLabelRight=``,c.startLabelLeft=``,c.arrowTypeStart=`none`,i.isGroup&&(a.fromCluster=t,c.toCluster=t),c.id=t+`-cyclic-special-2`,c.arrowTypeStart=`none`,s.setEdge(t,n,a,t+`-cyclic-special-0`),s.setEdge(n,r,o,t+`-cyclic-special-1`),s.setEdge(r,t,c,t+`-cyc<lic-special-2`)}else s.setEdge(e.start,e.end,{...e},e.id)}),e.g.warn(`Graph at first:`,JSON.stringify(l(s))),C(s),e.g.warn(`Graph after XAX:`,JSON.stringify(l(s)));let u=t.x();await D(c,s,n.type,n.diagramId,void 0,u)},`render`);exports.render=O;
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { g as e, h as t } from "./src-v9RrE_4h.js";
|
|
2
|
+
import { x as n } from "./chunk-CSCIHK7Q-9WKhcDqw.js";
|
|
3
|
+
import "./chunk-5ZQYHXKU-C4uam08j.js";
|
|
4
|
+
import "./chunk-BSJP7CBP-Bx5APwBA.js";
|
|
5
|
+
import { n as r } from "./chunk-L5ZTLDWV-D3UwMopa.js";
|
|
6
|
+
import "./chunk-NZK2D7GU-BVOINLmx.js";
|
|
7
|
+
import "./chunk-O5CBEL6O-VsMF4aZB.js";
|
|
8
|
+
import { a as i, c as a, i as o, l as s, n as c, t as l, u } from "./chunk-3OPIFGDE-C7wE5oN7.js";
|
|
9
|
+
import { a as d, i as f, n as p, r as m, t as h } from "./chunk-KSCS5N6A-BY1s4eGg.js";
|
|
10
|
+
import { r as g, t as _ } from "./graphlib-B1zohIOM.js";
|
|
11
|
+
import { n as v, r as y, t as b } from "./dagre-Cg4CV48I.js";
|
|
12
|
+
//#region node_modules/lodash-es/clone.js
|
|
13
|
+
var x = 4;
|
|
14
|
+
function S(e) {
|
|
15
|
+
return y(e, x);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region node_modules/dagre-d3-es/src/graphlib/json.js
|
|
19
|
+
function C(e) {
|
|
20
|
+
var t = {
|
|
21
|
+
options: {
|
|
22
|
+
directed: e.isDirected(),
|
|
23
|
+
multigraph: e.isMultigraph(),
|
|
24
|
+
compound: e.isCompound()
|
|
25
|
+
},
|
|
26
|
+
nodes: w(e),
|
|
27
|
+
edges: T(e)
|
|
28
|
+
};
|
|
29
|
+
return g(e.graph()) || (t.value = S(e.graph())), t;
|
|
30
|
+
}
|
|
31
|
+
function w(e) {
|
|
32
|
+
return v(e.nodes(), function(t) {
|
|
33
|
+
var n = e.node(t), r = e.parent(t), i = { v: t };
|
|
34
|
+
return g(n) || (i.value = n), g(r) || (i.parent = r), i;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function T(e) {
|
|
38
|
+
return v(e.edges(), function(t) {
|
|
39
|
+
var n = e.edge(t), r = {
|
|
40
|
+
v: t.v,
|
|
41
|
+
w: t.w
|
|
42
|
+
};
|
|
43
|
+
return g(t.name) || (r.name = t.name), g(n) || (r.value = n), r;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/dagre-BM42HDAG.mjs
|
|
48
|
+
var E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ t(() => {
|
|
49
|
+
D.clear(), O.clear(), E.clear();
|
|
50
|
+
}, "clear"), A = /* @__PURE__ */ t((t, n) => {
|
|
51
|
+
let r = D.get(n) || [];
|
|
52
|
+
return e.trace("In isDescendant", n, " ", t, " = ", r.includes(t)), r.includes(t);
|
|
53
|
+
}, "isDescendant"), j = /* @__PURE__ */ t((t, n) => {
|
|
54
|
+
let r = D.get(n) || [];
|
|
55
|
+
return e.info("Descendants of ", n, " is ", r), e.info("Edge is ", t), t.v === n || t.w === n ? !1 : r ? r.includes(t.v) || A(t.v, n) || A(t.w, n) || r.includes(t.w) : (e.debug("Tilt, ", n, ",not in descendants"), !1);
|
|
56
|
+
}, "edgeInCluster"), M = /* @__PURE__ */ t((t, n, r, i) => {
|
|
57
|
+
e.warn("Copying children of ", t, "root", i, "data", n.node(t), i);
|
|
58
|
+
let a = n.children(t) || [];
|
|
59
|
+
t !== i && a.push(t), e.warn("Copying (nodes) clusterId", t, "nodes", a), a.forEach((a) => {
|
|
60
|
+
if (n.children(a).length > 0) M(a, n, r, i);
|
|
61
|
+
else {
|
|
62
|
+
let o = n.node(a);
|
|
63
|
+
e.info("cp ", a, " to ", i, " with parent ", t), r.setNode(a, o), i !== n.parent(a) && (e.warn("Setting parent", a, n.parent(a)), r.setParent(a, n.parent(a))), t !== i && a !== t ? (e.debug("Setting parent", a, t), r.setParent(a, t)) : (e.info("In copy ", t, "root", i, "data", n.node(t), i), e.debug("Not Setting parent for node=", a, "cluster!==rootId", t !== i, "node!==clusterId", a !== t));
|
|
64
|
+
let s = n.edges(a);
|
|
65
|
+
e.debug("Copying Edges", s), s.forEach((a) => {
|
|
66
|
+
e.info("Edge", a);
|
|
67
|
+
let o = n.edge(a.v, a.w, a.name);
|
|
68
|
+
e.info("Edge data", o, i);
|
|
69
|
+
try {
|
|
70
|
+
j(a, i) ? (e.info("Copying as ", a.v, a.w, o, a.name), r.setEdge(a.v, a.w, o, a.name), e.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : e.info("Skipping copy of edge ", a.v, "-->", a.w, " rootId: ", i, " clusterId:", t);
|
|
71
|
+
} catch (t) {
|
|
72
|
+
e.error(t);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
e.debug("Removing node", a), n.removeNode(a);
|
|
77
|
+
});
|
|
78
|
+
}, "copy"), N = /* @__PURE__ */ t((e, t) => {
|
|
79
|
+
let n = t.children(e), r = [...n];
|
|
80
|
+
for (let i of n) O.set(i, e), r = [...r, ...N(i, t)];
|
|
81
|
+
return r;
|
|
82
|
+
}, "extractDescendants"), P = /* @__PURE__ */ t((e, t, n) => {
|
|
83
|
+
let r = e.edges().filter((e) => e.v === t || e.w === t), i = e.edges().filter((e) => e.v === n || e.w === n), a = r.map((e) => ({
|
|
84
|
+
v: e.v === t ? n : e.v,
|
|
85
|
+
w: e.w === t ? t : e.w
|
|
86
|
+
})), o = i.map((e) => ({
|
|
87
|
+
v: e.v,
|
|
88
|
+
w: e.w
|
|
89
|
+
}));
|
|
90
|
+
return a.filter((e) => o.some((t) => e.v === t.v && e.w === t.w));
|
|
91
|
+
}, "findCommonEdges"), F = /* @__PURE__ */ t((t, n, r) => {
|
|
92
|
+
let i = n.children(t);
|
|
93
|
+
if (e.trace("Searching children of id ", t, i), i.length < 1) return t;
|
|
94
|
+
let a;
|
|
95
|
+
for (let e of i) {
|
|
96
|
+
let t = F(e, n, r), i = P(n, r, t);
|
|
97
|
+
if (t) if (i.length > 0) a = t;
|
|
98
|
+
else return t;
|
|
99
|
+
}
|
|
100
|
+
return a;
|
|
101
|
+
}, "findNonClusterChild"), I = /* @__PURE__ */ t((e) => !E.has(e) || !E.get(e).externalConnections ? e : E.has(e) ? E.get(e).id : e, "getAnchorId"), L = /* @__PURE__ */ t((t, n) => {
|
|
102
|
+
if (!t || n > 10) {
|
|
103
|
+
e.debug("Opting out, no graph ");
|
|
104
|
+
return;
|
|
105
|
+
} else e.debug("Opting in, graph ");
|
|
106
|
+
t.nodes().forEach(function(n) {
|
|
107
|
+
t.children(n).length > 0 && (e.warn("Cluster identified", n, " Replacement id in edges: ", F(n, t, n)), D.set(n, N(n, t)), E.set(n, {
|
|
108
|
+
id: F(n, t, n),
|
|
109
|
+
clusterData: t.node(n)
|
|
110
|
+
}));
|
|
111
|
+
}), t.nodes().forEach(function(n) {
|
|
112
|
+
let r = t.children(n), i = t.edges();
|
|
113
|
+
r.length > 0 ? (e.debug("Cluster identified", n, D), i.forEach((t) => {
|
|
114
|
+
A(t.v, n) ^ A(t.w, n) && (e.warn("Edge: ", t, " leaves cluster ", n), e.warn("Descendants of XXX ", n, ": ", D.get(n)), E.get(n).externalConnections = !0);
|
|
115
|
+
})) : e.debug("Not a cluster ", n, D);
|
|
116
|
+
});
|
|
117
|
+
for (let e of E.keys()) {
|
|
118
|
+
let n = E.get(e).id, r = t.parent(n);
|
|
119
|
+
r !== e && E.has(r) && !E.get(r).externalConnections && (E.get(e).id = r);
|
|
120
|
+
}
|
|
121
|
+
t.edges().forEach(function(n) {
|
|
122
|
+
let r = t.edge(n);
|
|
123
|
+
e.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), e.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(t.edge(n)));
|
|
124
|
+
let i = n.v, a = n.w;
|
|
125
|
+
if (e.warn("Fix XXX", E, "ids:", n.v, n.w, "Translating: ", E.get(n.v), " --- ", E.get(n.w)), E.get(n.v) || E.get(n.w)) {
|
|
126
|
+
if (e.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), i = I(n.v), a = I(n.w), t.removeEdge(n.v, n.w, n.name), i !== n.v) {
|
|
127
|
+
let e = t.parent(i);
|
|
128
|
+
E.get(e).externalConnections = !0, r.fromCluster = n.v;
|
|
129
|
+
}
|
|
130
|
+
if (a !== n.w) {
|
|
131
|
+
let e = t.parent(a);
|
|
132
|
+
E.get(e).externalConnections = !0, r.toCluster = n.w;
|
|
133
|
+
}
|
|
134
|
+
e.warn("Fix Replacing with XXX", i, a, n.name), t.setEdge(i, a, r, n.name);
|
|
135
|
+
}
|
|
136
|
+
}), e.warn("Adjusted Graph", C(t)), R(t, 0), e.trace(E);
|
|
137
|
+
}, "adjustClustersAndEdges"), R = /* @__PURE__ */ t((t, n) => {
|
|
138
|
+
if (e.warn("extractor - ", n, C(t), t.children("D")), n > 10) {
|
|
139
|
+
e.error("Bailing out");
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
let r = t.nodes(), i = !1;
|
|
143
|
+
for (let e of r) {
|
|
144
|
+
let n = t.children(e);
|
|
145
|
+
i ||= n.length > 0;
|
|
146
|
+
}
|
|
147
|
+
if (!i) {
|
|
148
|
+
e.debug("Done, no node has children", t.nodes());
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
e.debug("Nodes = ", r, n);
|
|
152
|
+
for (let i of r) if (e.debug("Extracting node", i, E, E.has(i) && !E.get(i).externalConnections, !t.parent(i), t.node(i), t.children("D"), " Depth ", n), !E.has(i)) e.debug("Not a cluster", i, n);
|
|
153
|
+
else if (!E.get(i).externalConnections && t.children(i) && t.children(i).length > 0) {
|
|
154
|
+
e.warn("Cluster without external connections, without a parent and with children", i, n);
|
|
155
|
+
let r = t.graph().rankdir === "TB" ? "LR" : "TB";
|
|
156
|
+
E.get(i)?.clusterData?.dir && (r = E.get(i).clusterData.dir, e.warn("Fixing dir", E.get(i).clusterData.dir, r));
|
|
157
|
+
let a = new _({
|
|
158
|
+
multigraph: !0,
|
|
159
|
+
compound: !0
|
|
160
|
+
}).setGraph({
|
|
161
|
+
rankdir: r,
|
|
162
|
+
nodesep: 50,
|
|
163
|
+
ranksep: 50,
|
|
164
|
+
marginx: 8,
|
|
165
|
+
marginy: 8
|
|
166
|
+
}).setDefaultEdgeLabel(function() {
|
|
167
|
+
return {};
|
|
168
|
+
});
|
|
169
|
+
e.warn("Old graph before copy", C(t)), M(i, t, a, i), t.setNode(i, {
|
|
170
|
+
clusterNode: !0,
|
|
171
|
+
id: i,
|
|
172
|
+
clusterData: E.get(i).clusterData,
|
|
173
|
+
label: E.get(i).label,
|
|
174
|
+
graph: a
|
|
175
|
+
}), e.warn("New graph after copy node: (", i, ")", C(a)), e.debug("Old graph after copy", C(t));
|
|
176
|
+
} else e.warn("Cluster ** ", i, " **not meeting the criteria !externalConnections:", !E.get(i).externalConnections, " no parent: ", !t.parent(i), " children ", t.children(i) && t.children(i).length > 0, t.children("D"), n), e.debug(E);
|
|
177
|
+
r = t.nodes(), e.warn("New list of nodes", r);
|
|
178
|
+
for (let i of r) {
|
|
179
|
+
let r = t.node(i);
|
|
180
|
+
e.warn(" Now next level", i, r), r?.clusterNode && R(r.graph, n + 1);
|
|
181
|
+
}
|
|
182
|
+
}, "extractor"), z = /* @__PURE__ */ t((e, t) => {
|
|
183
|
+
if (t.length === 0) return [];
|
|
184
|
+
let n = Object.assign([], t);
|
|
185
|
+
return t.forEach((t) => {
|
|
186
|
+
let r = z(e, e.children(t));
|
|
187
|
+
n = [...n, ...r];
|
|
188
|
+
}), n;
|
|
189
|
+
}, "sorter"), B = /* @__PURE__ */ t((e) => z(e, e.children()), "sortNodesByHierarchy"), V = /* @__PURE__ */ t(async (n, c, l, f, h, g) => {
|
|
190
|
+
e.warn("Graph in recursive render:XAX", C(c), h);
|
|
191
|
+
let _ = c.graph().rankdir;
|
|
192
|
+
e.trace("Dir in recursive render - dir:", _);
|
|
193
|
+
let v = n.insert("g").attr("class", "root");
|
|
194
|
+
c.nodes() ? e.info("Recursive render XXX", c.nodes()) : e.info("No nodes found for", c), c.edges().length > 0 && e.info("Recursive edges", c.edge(c.edges()[0]));
|
|
195
|
+
let y = v.insert("g").attr("class", "clusters"), x = v.insert("g").attr("class", "edgePaths"), S = v.insert("g").attr("class", "edgeLabels"), w = v.insert("g").attr("class", "nodes");
|
|
196
|
+
await Promise.all(c.nodes().map(async function(t) {
|
|
197
|
+
let n = c.node(t);
|
|
198
|
+
if (h !== void 0) {
|
|
199
|
+
let n = JSON.parse(JSON.stringify(h.clusterData));
|
|
200
|
+
e.trace("Setting data for parent cluster XXX\n Node.id = ", t, "\n data=", n.height, "\nParent cluster", h.height), c.setNode(h.id, n), c.parent(t) || (e.trace("Setting parent", t, h.id), c.setParent(t, h.id, n));
|
|
201
|
+
}
|
|
202
|
+
if (e.info("(Insert) Node XXX" + t + ": " + JSON.stringify(c.node(t))), n?.clusterNode) {
|
|
203
|
+
e.info("Cluster identified XBX", t, n.width, c.node(t));
|
|
204
|
+
let { ranksep: r, nodesep: i } = c.graph();
|
|
205
|
+
n.graph.setGraph({
|
|
206
|
+
...n.graph.graph(),
|
|
207
|
+
ranksep: r + 25,
|
|
208
|
+
nodesep: i
|
|
209
|
+
});
|
|
210
|
+
let a = await V(w, n.graph, l, f, c.node(t), g), o = a.elem;
|
|
211
|
+
u(n, o), n.diff = a.diff || 0, e.info("New compound node after recursive render XAX", t, "width", n.width, "height", n.height), s(o, n);
|
|
212
|
+
} else c.children(t).length > 0 ? (e.trace("Cluster - the non recursive path XBX", t, n.id, n, n.width, "Graph:", c), e.trace(F(n.id, c)), E.set(n.id, {
|
|
213
|
+
id: F(n.id, c),
|
|
214
|
+
node: n
|
|
215
|
+
})) : (e.trace("Node - the non recursive path XAX", t, w, c.node(t), _), await i(w, c.node(t), {
|
|
216
|
+
config: g,
|
|
217
|
+
dir: _
|
|
218
|
+
}));
|
|
219
|
+
})), await (/* @__PURE__ */ t(async () => {
|
|
220
|
+
let t = c.edges().map(async function(t) {
|
|
221
|
+
let n = c.edge(t.v, t.w, t.name);
|
|
222
|
+
e.info("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(t)), e.info("Edge " + t.v + " -> " + t.w + ": ", t, " ", JSON.stringify(c.edge(t))), e.info("Fix", E, "ids:", t.v, t.w, "Translating: ", E.get(t.v), E.get(t.w)), await m(S, n);
|
|
223
|
+
});
|
|
224
|
+
await Promise.all(t);
|
|
225
|
+
}, "processEdges"))(), e.info("Graph before layout:", JSON.stringify(C(c))), e.info("############################################# XXX"), e.info("### Layout ### XXX"), e.info("############################################# XXX"), b(c), e.info("Graph after layout:", JSON.stringify(C(c)));
|
|
226
|
+
let T = 0, { subGraphTitleTotalMargin: D } = r(g);
|
|
227
|
+
return await Promise.all(B(c).map(async function(t) {
|
|
228
|
+
let n = c.node(t);
|
|
229
|
+
if (e.info("Position XBX => " + t + ": (" + n.x, "," + n.y, ") width: ", n.width, " height: ", n.height), n?.clusterNode) n.y += D, e.info("A tainted cluster node XBX1", t, n.id, n.width, n.height, n.x, n.y, c.parent(t)), E.get(n.id).node = n, a(n);
|
|
230
|
+
else if (c.children(t).length > 0) {
|
|
231
|
+
e.info("A pure cluster node XBX1", t, n.id, n.x, n.y, n.width, n.height, c.parent(t)), n.height += D, c.node(n.parentId);
|
|
232
|
+
let r = n?.padding / 2 || 0, i = n?.labelBBox?.height || 0, a = i - r || 0;
|
|
233
|
+
e.debug("OffsetY", a, "labelHeight", i, "halfPadding", r), await o(y, n), E.get(n.id).node = n;
|
|
234
|
+
} else {
|
|
235
|
+
let t = c.node(n.parentId);
|
|
236
|
+
n.y += D / 2, e.info("A regular node XBX1 - using the padding", n.id, "parent", n.parentId, n.width, n.height, n.x, n.y, "offsetY", n.offsetY, "parent", t, t?.offsetY, n), a(n);
|
|
237
|
+
}
|
|
238
|
+
})), c.edges().forEach(function(t) {
|
|
239
|
+
let n = c.edge(t);
|
|
240
|
+
e.info("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(n), n), n.points.forEach((e) => e.y += D / 2), d(n, p(x, n, E, l, c.node(t.v), c.node(t.w), f));
|
|
241
|
+
}), c.nodes().forEach(function(t) {
|
|
242
|
+
let n = c.node(t);
|
|
243
|
+
e.info(t, n.type, n.diff), n.isGroup && (T = n.diff);
|
|
244
|
+
}), e.warn("Returning from recursive render XAX", v, T), {
|
|
245
|
+
elem: v,
|
|
246
|
+
diff: T
|
|
247
|
+
};
|
|
248
|
+
}, "recursiveRender"), H = /* @__PURE__ */ t(async (t, r) => {
|
|
249
|
+
let i = new _({
|
|
250
|
+
multigraph: !0,
|
|
251
|
+
compound: !0
|
|
252
|
+
}).setGraph({
|
|
253
|
+
rankdir: t.direction,
|
|
254
|
+
nodesep: t.config?.nodeSpacing || t.config?.flowchart?.nodeSpacing || t.nodeSpacing,
|
|
255
|
+
ranksep: t.config?.rankSpacing || t.config?.flowchart?.rankSpacing || t.rankSpacing,
|
|
256
|
+
marginx: 8,
|
|
257
|
+
marginy: 8
|
|
258
|
+
}).setDefaultEdgeLabel(function() {
|
|
259
|
+
return {};
|
|
260
|
+
}), a = r.select("g");
|
|
261
|
+
f(a, t.markers, t.type, t.diagramId), c(), h(), l(), k(), t.nodes.forEach((e) => {
|
|
262
|
+
i.setNode(e.id, { ...e }), e.parentId && i.setParent(e.id, e.parentId);
|
|
263
|
+
}), e.debug("Edges:", t.edges), t.edges.forEach((e) => {
|
|
264
|
+
if (e.start === e.end) {
|
|
265
|
+
let t = e.start, n = t + "---" + t + "---1", r = t + "---" + t + "---2", a = i.node(t);
|
|
266
|
+
i.setNode(n, {
|
|
267
|
+
domId: n,
|
|
268
|
+
id: n,
|
|
269
|
+
parentId: a.parentId,
|
|
270
|
+
labelStyle: "",
|
|
271
|
+
label: "",
|
|
272
|
+
padding: 0,
|
|
273
|
+
shape: "labelRect",
|
|
274
|
+
style: "",
|
|
275
|
+
width: 10,
|
|
276
|
+
height: 10
|
|
277
|
+
}), i.setParent(n, a.parentId), i.setNode(r, {
|
|
278
|
+
domId: r,
|
|
279
|
+
id: r,
|
|
280
|
+
parentId: a.parentId,
|
|
281
|
+
labelStyle: "",
|
|
282
|
+
padding: 0,
|
|
283
|
+
shape: "labelRect",
|
|
284
|
+
label: "",
|
|
285
|
+
style: "",
|
|
286
|
+
width: 10,
|
|
287
|
+
height: 10
|
|
288
|
+
}), i.setParent(r, a.parentId);
|
|
289
|
+
let o = structuredClone(e), s = structuredClone(e), c = structuredClone(e);
|
|
290
|
+
o.label = "", o.arrowTypeEnd = "none", o.endLabelLeft = "", o.endLabelRight = "", o.startLabelLeft = "", o.id = t + "-cyclic-special-1", s.startLabelRight = "", s.startLabelLeft = "", s.endLabelLeft = "", s.endLabelRight = "", s.arrowTypeStart = "none", s.arrowTypeEnd = "none", s.id = t + "-cyclic-special-mid", c.label = "", c.startLabelRight = "", c.startLabelLeft = "", c.arrowTypeStart = "none", a.isGroup && (o.fromCluster = t, c.toCluster = t), c.id = t + "-cyclic-special-2", c.arrowTypeStart = "none", i.setEdge(t, n, o, t + "-cyclic-special-0"), i.setEdge(n, r, s, t + "-cyclic-special-1"), i.setEdge(r, t, c, t + "-cyc<lic-special-2");
|
|
291
|
+
} else i.setEdge(e.start, e.end, { ...e }, e.id);
|
|
292
|
+
}), e.warn("Graph at first:", JSON.stringify(C(i))), L(i), e.warn("Graph after XAX:", JSON.stringify(C(i)));
|
|
293
|
+
let o = n();
|
|
294
|
+
await V(a, i, t.type, t.diagramId, void 0, o);
|
|
295
|
+
}, "render");
|
|
296
|
+
//#endregion
|
|
297
|
+
export { H as render };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./graphlib-B5AXIZA4.cjs`);var t=/\s/;function n(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}var r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}var a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(t){if(typeof t==`number`)return t;if(e.et(t))return a;if(e.Z(t)){var n=typeof t.valueOf==`function`?t.valueOf():t;t=e.Z(n)?n+``:n}if(typeof t!=`string`)return t===0?t:+t;t=i(t);var r=s.test(t);return r||c.test(t)?l(t.slice(2),r?2:8):o.test(t)?a:+t}var d=1/0,f=17976931348623157e292;function p(e){return e?(e=u(e),e===d||e===-d?(e<0?-1:1)*f:e===e?e:0):e===0?e:0}function m(e){var t=p(e),n=t%1;return t===t?n?t-n:t:0}var h=Object.create,ee=function(){function t(){}return function(n){if(!e.Z(n))return{};if(h)return h(n);t.prototype=n;var r=new t;return t.prototype=void 0,r}}();function te(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function g(t,n,r){n==`__proto__`&&e.q?e.q(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}var ne=Object.prototype.hasOwnProperty;function _(t,n,r){var i=t[n];(!(ne.call(t,n)&&e.H(i,r))||r===void 0&&!(n in t))&&g(t,n,r)}function v(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?g(n,s,c):_(n,s,c)}return n}function y(t,n,r){if(!e.Z(r))return!1;var i=typeof n;return(i==`number`?e.z(r)&&e.U(n,r.length):i==`string`&&n in r)?e.H(r[n],t):!1}function re(t){return e.B(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&typeof a==`function`?(i--,a):void 0,o&&y(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e})}function ie(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ae=Object.prototype.hasOwnProperty;function oe(t){if(!e.Z(t))return ie(t);var n=e.R(t),r=[];for(var i in t)i==`constructor`&&(n||!ae.call(t,i))||r.push(i);return r}function b(t){return e.z(t)?e.M(t,!0):oe(t)}function x(t){return t!=null&&t.length?e.C(t,1):[]}function se(t){return e.K(e.V(t,void 0,x),t+``)}var S=e.j(Object.getPrototypeOf,Object),ce=`[object Object]`,le=Function.prototype,ue=Object.prototype,de=le.toString,fe=ue.hasOwnProperty,pe=de.call(Object);function me(t){if(!e.tt(t)||e.nt(t)!=ce)return!1;var n=S(t);if(n===null)return!0;var r=fe.call(n,`constructor`)&&n.constructor;return typeof r==`function`&&r instanceof r&&de.call(r)==pe}var he=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function ge(e){return he.test(e)}function _e(t,n){return t&&v(n,e.k(n),t)}function ve(e,t){return e&&v(t,b(t),e)}var ye=typeof exports==`object`&&exports&&!exports.nodeType&&exports,be=ye&&typeof module==`object`&&module&&!module.nodeType&&module,xe=be&&be.exports===ye?e.it.Buffer:void 0,Se=xe?xe.allocUnsafe:void 0;function Ce(e,t){if(t)return e.slice();var n=e.length,r=Se?Se(n):new e.constructor(n);return e.copy(r),r}function we(t,n){return v(t,e.b(t),n)}var Te=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)e.w(n,e.b(t)),t=S(t);return n}:e.x;function Ee(e,t){return v(e,Te(e),t)}function De(t){return e.y(t,b,Te)}var Oe=Object.prototype.hasOwnProperty;function ke(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Oe.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function C(t){var n=new t.constructor(t.byteLength);return new e.g(n).set(new e.g(t)),n}function Ae(e,t){var n=t?C(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var je=/\w*$/;function Me(e){var t=new e.constructor(e.source,je.exec(e));return t.lastIndex=e.lastIndex,t}var Ne=e.rt?e.rt.prototype:void 0,Pe=Ne?Ne.valueOf:void 0;function Fe(e){return Pe?Object(Pe.call(e)):{}}function Ie(e,t){var n=t?C(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Le=`[object Boolean]`,Re=`[object Date]`,ze=`[object Map]`,Be=`[object Number]`,Ve=`[object RegExp]`,He=`[object Set]`,Ue=`[object String]`,We=`[object Symbol]`,Ge=`[object ArrayBuffer]`,Ke=`[object DataView]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=`[object Int8Array]`,Xe=`[object Int16Array]`,Ze=`[object Int32Array]`,Qe=`[object Uint8Array]`,$e=`[object Uint8ClampedArray]`,et=`[object Uint16Array]`,tt=`[object Uint32Array]`;function nt(e,t,n){var r=e.constructor;switch(t){case Ge:return C(e);case Le:case Re:return new r(+e);case Ke:return Ae(e,n);case qe:case Je:case Ye:case Xe:case Ze:case Qe:case $e:case et:case tt:return Ie(e,n);case ze:return new r;case Be:case Ue:return new r(e);case Ve:return Me(e);case He:return new r;case We:return Fe(e)}}function rt(t){return typeof t.constructor==`function`&&!e.R(t)?ee(S(t)):{}}var it=`[object Map]`;function at(t){return e.tt(t)&&e._(t)==it}var ot=e.P&&e.P.isMap,st=ot?e.F(ot):at,ct=`[object Set]`;function lt(t){return e.tt(t)&&e._(t)==ct}var ut=e.P&&e.P.isSet,dt=ut?e.F(ut):lt,ft=1,pt=2,mt=4,ht=`[object Arguments]`,gt=`[object Array]`,_t=`[object Boolean]`,vt=`[object Date]`,yt=`[object Error]`,bt=`[object Function]`,xt=`[object GeneratorFunction]`,St=`[object Map]`,Ct=`[object Number]`,wt=`[object Object]`,Tt=`[object RegExp]`,Et=`[object Set]`,Dt=`[object String]`,Ot=`[object Symbol]`,kt=`[object WeakMap]`,At=`[object ArrayBuffer]`,jt=`[object DataView]`,Mt=`[object Float32Array]`,Nt=`[object Float64Array]`,Pt=`[object Int8Array]`,Ft=`[object Int16Array]`,It=`[object Int32Array]`,Lt=`[object Uint8Array]`,Rt=`[object Uint8ClampedArray]`,zt=`[object Uint16Array]`,Bt=`[object Uint32Array]`,w={};w[ht]=w[gt]=w[At]=w[jt]=w[_t]=w[vt]=w[Mt]=w[Nt]=w[Pt]=w[Ft]=w[It]=w[St]=w[Ct]=w[wt]=w[Tt]=w[Et]=w[Dt]=w[Ot]=w[Lt]=w[Rt]=w[zt]=w[Bt]=!0,w[yt]=w[bt]=w[kt]=!1;function T(t,n,r,i,a,o){var s,c=n&ft,l=n&pt,u=n&mt;if(r&&(s=a?r(t,i,a,o):r(t)),s!==void 0)return s;if(!e.Z(t))return t;var d=e.Q(t);if(d){if(s=ke(t),!c)return te(t,s)}else{var f=e._(t),p=f==bt||f==xt;if(e.I(t))return Ce(t,c);if(f==wt||f==ht||p&&!a){if(s=l||p?{}:rt(t),!c)return l?Ee(t,ve(s,t)):we(t,_e(s,t))}else{if(!w[f])return a?t:{};s=nt(t,f,c)}}o||=new e.S;var m=o.get(t);if(m)return m;o.set(t,s),dt(t)?t.forEach(function(e){s.add(T(e,n,r,e,t,o))}):st(t)&&t.forEach(function(e,i){s.set(i,T(e,n,r,i,t,o))});var h=d?void 0:(u?l?De:e.v:l?b:e.k)(t);return e.G(h||t,function(e,i){h&&(i=e,e=t[i]),_(s,i,T(e,n,r,i,t,o))}),s}var Vt=1,Ht=4;function Ut(e){return T(e,Vt|Ht)}var Wt=function(){return e.it.Date.now()},Gt=Object.prototype,Kt=Gt.hasOwnProperty,qt=e.B(function(t,n){t=Object(t);var r=-1,i=n.length,a=i>2?n[2]:void 0;for(a&&y(n[0],n[1],a)&&(i=1);++r<i;)for(var o=n[r],s=b(o),c=-1,l=s.length;++c<l;){var u=s[c],d=t[u];(d===void 0||e.H(d,Gt[u])&&!Kt.call(t,u))&&(t[u]=o[u])}return t});function E(t,n,r){(r!==void 0&&!e.H(t[n],r)||r===void 0&&!(n in t))&&g(t,n,r)}function D(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function Jt(e){return v(e,b(e))}function Yt(t,n,r,i,a,o,s){var c=D(t,r),l=D(n,r),u=s.get(l);if(u){E(t,r,u);return}var d=o?o(c,l,r+``,t,n,s):void 0,f=d===void 0;if(f){var p=e.Q(l),m=!p&&e.I(l),h=!p&&!m&&e.N(l);d=l,p||m||h?e.Q(c)?d=c:e.c(c)?d=te(c):m?(f=!1,d=Ce(l,!0)):h?(f=!1,d=Ie(l,!0)):d=[]:me(l)||e.L(l)?(d=c,e.L(c)?d=Jt(c):(!e.Z(c)||e.Y(c))&&(d=rt(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),E(t,r,d)}function Xt(t,n,r,i,a){t!==n&&e.d(n,function(o,s){if(a||=new e.S,e.Z(o))Yt(t,n,s,r,Xt,i,a);else{var c=i?i(D(t,s),o,s+``,t,n,a):void 0;c===void 0&&(c=o),E(t,s,c)}},b)}function O(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Zt(t){return function(n,r,i){var a=Object(n);if(!e.z(n)){var o=e.f(r,3);n=e.k(n),r=function(e){return o(a[e],e,a)}}var s=t(n,r,i);return s>-1?a[o?n[s]:s]:void 0}}var Qt=Math.max;function $t(t,n,r){var i=t==null?0:t.length;if(!i)return-1;var a=r==null?0:m(r);return a<0&&(a=Qt(i+a,0)),e.W(t,e.f(n,3),a)}var k=Zt($t);function en(t,n){var r=-1,i=e.z(t)?Array(t.length):[];return e.l(t,function(e,t,a){i[++r]=n(e,t,a)}),i}function A(t,n){return(e.Q(t)?e.$:en)(t,e.f(n,3))}function tn(t,n){return t==null?t:e.d(t,e.s(n),b)}function nn(t,n){return t&&e.u(t,e.s(n))}function rn(e,t){return e>t}var an=Object.prototype.hasOwnProperty;function on(e,t){return e!=null&&an.call(e,t)}function sn(t,n){return t!=null&&e.h(t,n,on)}var cn=`[object String]`;function ln(t){return typeof t==`string`||!e.Q(t)&&e.tt(t)&&e.nt(t)==cn}function un(e,t){return e<t}function j(t,n){var r={};return n=e.f(n,3),e.u(t,function(e,t,i){g(r,t,n(e,t,i))}),r}function dn(t,n,r){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=n(o);if(s!=null&&(c===void 0?s===s&&!e.et(s):r(s,c)))var c=s,l=o}return l}function M(t){return t&&t.length?dn(t,e.X,rn):void 0}var N=re(function(e,t,n){Xt(e,t,n)});function P(t){return t&&t.length?dn(t,e.X,un):void 0}function F(t,n){return t&&t.length?dn(t,e.f(n,2),un):void 0}function fn(t,n,r,i){if(!e.Z(t))return t;n=e.D(n,t);for(var a=-1,o=n.length,s=o-1,c=t;c!=null&&++a<o;){var l=e.E(n[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return t;if(a!=s){var d=c[l];u=i?i(d,l,c):void 0,u===void 0&&(u=e.Z(d)?d:e.U(n[a+1])?[]:{})}_(c,l,u),c=c[l]}return t}function pn(t,n,r){for(var i=-1,a=n.length,o={};++i<a;){var s=n[i],c=e.T(t,s);r(c,s)&&fn(o,e.D(s,t),c)}return o}function mn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function hn(t,n){if(t!==n){var r=t!==void 0,i=t===null,a=t===t,o=e.et(t),s=n!==void 0,c=n===null,l=n===n,u=e.et(n);if(!c&&!u&&!o&&t>n||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&t<n||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function gn(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=hn(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function _n(t,n,r){n=n.length?e.$(n,function(t){return e.Q(t)?function(n){return e.T(n,t.length===1?t[0]:t)}:t}):[e.X];var i=-1;return n=e.$(n,e.F(e.f)),mn(en(t,function(t,r,a){return{criteria:e.$(n,function(e){return e(t)}),index:++i,value:t}}),function(e,t){return gn(e,t,r)})}var vn=e.p(`length`),yn=`\\ud800-\\udfff`,bn=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,xn=`\\ufe0e\\ufe0f`,Sn=`[`+yn+`]`,I=`[`+bn+`]`,L=`\\ud83c[\\udffb-\\udfff]`,Cn=`(?:`+I+`|`+L+`)`,wn=`[^`+yn+`]`,Tn=`(?:\\ud83c[\\udde6-\\uddff]){2}`,En=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Dn=`\\u200d`,On=Cn+`?`,kn=`[`+xn+`]?`,An=`(?:`+Dn+`(?:`+[wn,Tn,En].join(`|`)+`)`+kn+On+`)*`,jn=kn+On+An,Mn=`(?:`+[wn+I+`?`,I,Tn,En,Sn].join(`|`)+`)`,Nn=RegExp(L+`(?=`+L+`)|`+Mn+jn,`g`);function Pn(e){for(var t=Nn.lastIndex=0;Nn.test(e);)++t;return t}function Fn(e){return ge(e)?Pn(e):vn(e)}function In(t,n){return pn(t,n,function(n,r){return e.m(t,r)})}var R=se(function(e,t){return e==null?{}:In(e,t)}),Ln=Math.ceil,Rn=Math.max;function zn(e,t,n,r){for(var i=-1,a=Rn(Ln((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function Bn(e){return function(t,n,r){return r&&typeof r!=`number`&&y(t,n,r)&&(n=r=void 0),t=p(t),n===void 0?(n=t,t=0):n=p(n),r=r===void 0?t<n?1:-1:p(r),zn(t,n,r,e)}}var z=Bn(),Vn=`[object Map]`,Hn=`[object Set]`;function Un(t){if(t==null)return 0;if(e.z(t))return ln(t)?Fn(t):t.length;var n=e._(t);return n==Vn||n==Hn?t.size:e.A(t).length}var B=e.B(function(t,n){if(t==null)return[];var r=n.length;return r>1&&y(t,n[0],n[1])?n=[]:r>2&&y(n[0],n[1],n[2])&&(n=[n[0]]),_n(t,e.C(n,1),[])}),Wn=0;function V(t){var n=++Wn;return e.O(t)+n}function Gn(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function Kn(e,t){return Gn(e||[],t||[],_)}var qn=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return Jn(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&Jn(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,Yn)),n=n._prev;return`[`+e.join(`, `)+`]`}};function Jn(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Yn(e,t){if(e!==`_next`&&e!==`_prev`)return t}var Xn=e.J(1);function Zn(e,t){if(e.nodeCount()<=1)return[];var n=$n(e,t||Xn);return x(A(Qn(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function Qn(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)H(e,t,n,o);for(;o=i.dequeue();)H(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(H(e,t,n,o,!0));break}}}return r}function H(t,n,r,i,a){var o=a?[]:void 0;return e.o(t.inEdges(i.v),function(e){var i=t.edge(e),s=t.node(e.v);a&&o.push({v:e.v,w:e.w}),s.out-=i,U(n,r,s)}),e.o(t.outEdges(i.v),function(e){var i=t.edge(e),a=e.w,o=t.node(a);o.in-=i,U(n,r,o)}),t.removeNode(i.v),o}function $n(t,n){var r=new e.t,i=0,a=0;e.o(t.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),e.o(t.edges(),function(e){var t=r.edge(e.v,e.w)||0,o=n(e),s=t+o;r.setEdge(e.v,e.w,s),a=Math.max(a,r.node(e.v).out+=o),i=Math.max(i,r.node(e.w).in+=o)});var o=z(a+i+3).map(function(){return new qn}),s=i+1;return e.o(r.nodes(),function(e){U(o,s,r.node(e))}),{graph:r,buckets:o,zeroIdx:s}}function U(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function er(t){var n=t.graph().acyclicer===`greedy`?Zn(t,r(t)):tr(t);e.o(n,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,V(`rev`))});function r(e){return function(t){return e.edge(t).weight}}}function tr(t){var n=[],r={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,r[o]=!0,e.o(t.outEdges(o),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[o])}return e.o(t.nodes(),a),n}function nr(t){e.o(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}function W(e,t,n,r){var i;do i=V(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function rr(t){var n=new e.t().setGraph(t.graph());return e.o(t.nodes(),function(e){n.setNode(e,t.node(e))}),e.o(t.edges(),function(e){var r=n.edge(e.v,e.w)||{weight:0,minlen:1},i=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function ir(t){var n=new e.t({multigraph:t.isMultigraph()}).setGraph(t.graph());return e.o(t.nodes(),function(e){t.children(e).length||n.setNode(e,t.node(e))}),e.o(t.edges(),function(e){n.setEdge(e,t.edge(e))}),n}function ar(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function G(t){var n=A(z(lr(t)+1),function(){return[]});return e.o(t.nodes(),function(r){var i=t.node(r),a=i.rank;e.r(a)||(n[a][i.order]=r)}),n}function or(t){var n=P(A(t.nodes(),function(e){return t.node(e).rank}));e.o(t.nodes(),function(e){var r=t.node(e);sn(r,`rank`)&&(r.rank-=n)})}function sr(t){var n=P(A(t.nodes(),function(e){return t.node(e).rank})),r=[];e.o(t.nodes(),function(e){var i=t.node(e).rank-n;r[i]||(r[i]=[]),r[i].push(e)});var i=0,a=t.graph().nodeRankFactor;e.o(r,function(n,r){e.r(n)&&r%a!==0?--i:i&&e.o(n,function(e){t.node(e).rank+=i})})}function cr(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),W(e,`border`,i,t)}function lr(t){return M(A(t.nodes(),function(n){var r=t.node(n).rank;if(!e.r(r))return r}))}function ur(t,n){var r={lhs:[],rhs:[]};return e.o(t,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}function dr(e,t){var n=Wt();try{return t()}finally{console.log(e+` time: `+(Wt()-n)+`ms`)}}function fr(e,t){return t()}function pr(t){function n(r){var i=t.children(r),a=t.node(r);if(i.length&&e.o(i,n),Object.prototype.hasOwnProperty.call(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)mr(t,`borderLeft`,`_bl`,r,a,o),mr(t,`borderRight`,`_br`,r,a,o)}}e.o(t.children(),n)}function mr(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=W(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function hr(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&_r(e)}function gr(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&yr(e),(t===`lr`||t===`rl`)&&(br(e),_r(e))}function _r(t){e.o(t.nodes(),function(e){vr(t.node(e))}),e.o(t.edges(),function(e){vr(t.edge(e))})}function vr(e){var t=e.width;e.width=e.height,e.height=t}function yr(t){e.o(t.nodes(),function(e){K(t.node(e))}),e.o(t.edges(),function(n){var r=t.edge(n);e.o(r.points,K),Object.prototype.hasOwnProperty.call(r,`y`)&&K(r)})}function K(e){e.y=-e.y}function br(t){e.o(t.nodes(),function(e){q(t.node(e))}),e.o(t.edges(),function(n){var r=t.edge(n);e.o(r.points,q),Object.prototype.hasOwnProperty.call(r,`x`)&&q(r)})}function q(e){var t=e.x;e.x=e.y,e.y=t}function xr(t){t.graph().dummyChains=[],e.o(t.edges(),function(e){Sr(t,e)})}function Sr(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=W(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function Cr(t){e.o(t.graph().dummyChains,function(e){var n=t.node(e),r=n.edgeLabel,i;for(t.setEdge(n.edgeObj,r);n.dummy;)i=t.successors(e)[0],t.removeNode(e),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),e=i,n=t.node(e)})}function J(t){var n={};function r(e){var i=t.node(e);if(Object.prototype.hasOwnProperty.call(n,e))return i.rank;n[e]=!0;var a=P(A(t.outEdges(e),function(e){return r(e.w)-t.edge(e).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}e.o(t.sources(),r)}function Y(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function wr(t){var n=new e.t({directed:!1}),r=t.nodes()[0],i=t.nodeCount();n.setNode(r,{});for(var a,o;Tr(n,t)<i;)a=Er(n,t),o=n.hasNode(a.v)?Y(t,a):-Y(t,a),Dr(n,t,o);return n}function Tr(t,n){function r(i){e.o(n.nodeEdges(i),function(e){var a=e.v,o=i===a?e.w:a;!t.hasNode(o)&&!Y(n,e)&&(t.setNode(o,{}),t.setEdge(i,o,{}),r(o))})}return e.o(t.nodes(),r),t.nodeCount()}function Er(e,t){return F(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return Y(t,n)})}function Dr(t,n,r){e.o(t.nodes(),function(e){n.node(e).rank+=r})}e.J(1),e.J(1),Or.CycleException=X;function Or(t){var n={},r={},i=[];function a(o){if(Object.prototype.hasOwnProperty.call(r,o))throw new X;Object.prototype.hasOwnProperty.call(n,o)||(r[o]=!0,n[o]=!0,e.o(t.predecessors(o),a),delete r[o],i.push(o))}if(e.o(t.sinks(),a),Un(n)!==t.nodeCount())throw new X;return i}function X(){}X.prototype=Error();function kr(t,n,r){e.Q(n)||(n=[n]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return e.o(n,function(e){if(!t.hasNode(e))throw Error(`Graph does not have node: `+e);Ar(t,e,r===`post`,o,i,a)}),a}function Ar(t,n,r,i,a,o){Object.prototype.hasOwnProperty.call(i,n)||(i[n]=!0,r||o.push(n),e.o(a(n),function(e){Ar(t,e,r,i,a,o)}),r&&o.push(n))}function jr(e,t){return kr(e,t,`post`)}function Mr(e,t){return kr(e,t,`pre`)}Z.initLowLimValues=$,Z.initCutValues=Q,Z.calcCutValue=Pr,Z.leaveEdge=Ir,Z.enterEdge=Lr,Z.exchangeEdges=Rr;function Z(e){e=rr(e),J(e);var t=wr(e);$(t),Q(t,e);for(var n,r;n=Ir(t);)r=Lr(t,e,n),Rr(t,e,n,r)}function Q(t,n){var r=jr(t,t.nodes());r=r.slice(0,r.length-1),e.o(r,function(e){Nr(t,n,e)})}function Nr(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=Pr(e,t,n)}function Pr(t,n,r){var i=t.node(r).parent,a=!0,o=n.edge(r,i),s=0;return o||=(a=!1,n.edge(i,r)),s=o.weight,e.o(n.nodeEdges(r),function(e){var o=e.v===r,c=o?e.w:e.v;if(c!==i){var l=o===a,u=n.edge(e).weight;if(s+=l?u:-u,Br(t,r,c)){var d=t.edge(r,c).cutvalue;s+=l?-d:d}}}),s}function $(e,t){arguments.length<2&&(t=e.nodes()[0]),Fr(e,{},1,t)}function Fr(t,n,r,i,a){var o=r,s=t.node(i);return n[i]=!0,e.o(t.neighbors(i),function(e){Object.prototype.hasOwnProperty.call(n,e)||(r=Fr(t,n,r,e,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function Ir(e){return k(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Lr(t,n,r){var i=r.v,a=r.w;n.hasEdge(i,a)||(i=r.w,a=r.v);var o=t.node(i),s=t.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),F(e.a(n.edges(),function(e){return l===Vr(t,t.node(e.v),c)&&l!==Vr(t,t.node(e.w),c)}),function(e){return Y(n,e)})}function Rr(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),$(e),Q(e,t),zr(e,t)}function zr(t,n){var r=Mr(t,k(t.nodes(),function(e){return!n.node(e).parent}));r=r.slice(1),e.o(r,function(e){var r=t.node(e).parent,i=n.edge(e,r),a=!1;i||(i=n.edge(r,e),a=!0),n.node(e).rank=n.node(r).rank+(a?i.minlen:-i.minlen)})}function Br(e,t,n){return e.hasEdge(t,n)}function Vr(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function Hr(e){switch(e.graph().ranker){case`network-simplex`:Gr(e);break;case`tight-tree`:Wr(e);break;case`longest-path`:Ur(e);break;default:Gr(e)}}var Ur=J;function Wr(e){J(e),wr(e)}function Gr(e){Z(e)}function Kr(t){var n=W(t,`root`,{},`_root`),r=Jr(t),i=M(e.i(r))-1,a=2*i+1;t.graph().nestingRoot=n,e.o(t.edges(),function(e){t.edge(e).minlen*=a});var o=Yr(t)+1;e.o(t.children(),function(e){qr(t,n,a,o,i,r,e)}),t.graph().nodeRankFactor=a}function qr(t,n,r,i,a,o,s){var c=t.children(s);if(!c.length){s!==n&&t.setEdge(n,s,{weight:0,minlen:r});return}var l=cr(t,`_bt`),u=cr(t,`_bb`),d=t.node(s);t.setParent(l,s),d.borderTop=l,t.setParent(u,s),d.borderBottom=u,e.o(c,function(e){qr(t,n,r,i,a,o,e);var c=t.node(e),d=c.borderTop?c.borderTop:e,f=c.borderBottom?c.borderBottom:e,p=c.borderTop?i:2*i,m=d===f?a-o[s]+1:1;t.setEdge(l,d,{weight:p,minlen:m,nestingEdge:!0}),t.setEdge(f,u,{weight:p,minlen:m,nestingEdge:!0})}),t.parent(s)||t.setEdge(n,l,{weight:0,minlen:a+o[s]})}function Jr(t){var n={};function r(i,a){var o=t.children(i);o&&o.length&&e.o(o,function(e){r(e,a+1)}),n[i]=a}return e.o(t.children(),function(e){r(e,1)}),n}function Yr(t){return e.n(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function Xr(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,e.o(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}function Zr(t,n,r){var i={},a;e.o(r,function(e){for(var r=t.parent(e),o,s;r;){if(o=t.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){n.setEdge(s,r);return}r=o}})}function Qr(t,n,r){var i=$r(t),a=new e.t({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(e){return t.node(e)});return e.o(t.nodes(),function(o){var s=t.node(o),c=t.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,c||i),e.o(t[r](o),function(n){var r=n.v===o?n.w:n.v,i=a.edge(r,o),s=e.r(i)?0:i.weight;a.setEdge(r,o,{weight:t.edge(n).weight+s})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}function $r(e){for(var t;e.hasNode(t=V(`_root`)););return t}function ei(e,t){for(var n=0,r=1;r<t.length;++r)n+=ti(e,t[r-1],t[r]);return n}function ti(t,n,r){for(var i=Kn(r,A(r,function(e,t){return t})),a=x(A(n,function(e){return B(A(t.outEdges(e),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),`pos`)})),o=1;o<r.length;)o<<=1;var s=2*o-1;--o;var c=A(Array(s),function(){return 0}),l=0;return e.o(a.forEach(function(e){var t=e.pos+o;c[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n})),l}function ni(t){var n={},r=e.a(t.nodes(),function(e){return!t.children(e).length}),i=A(z(M(A(r,function(e){return t.node(e).rank}))+1),function(){return[]});function a(r){sn(n,r)||(n[r]=!0,i[t.node(r).rank].push(r),e.o(t.successors(r),a))}var o=B(r,function(e){return t.node(e).rank});return e.o(o,a),i}function ri(t,n){return A(n,function(n){var r=t.inEdges(n);if(r.length){var i=e.n(r,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}function ii(t,n){var r={};return e.o(t,function(t,n){var i=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:n};e.r(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)}),e.o(n.edges(),function(t){var n=r[t.v],i=r[t.w];!e.r(n)&&!e.r(i)&&(i.indegree++,n.out.push(r[t.w]))}),ai(e.a(r,function(e){return!e.indegree}))}function ai(t){var n=[];function r(t){return function(n){n.merged||(e.r(n.barycenter)||e.r(t.barycenter)||n.barycenter>=t.barycenter)&&oi(t,n)}}function i(e){return function(n){n.in.push(e),--n.indegree===0&&t.push(n)}}for(;t.length;){var a=t.pop();n.push(a),e.o(a.in.reverse(),r(a)),e.o(a.out,i(a))}return A(e.a(n,function(e){return!e.merged}),function(e){return R(e,[`vs`,`i`,`barycenter`,`weight`])})}function oi(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function si(t,n){var r=ur(t,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),i=r.lhs,a=B(r.rhs,function(e){return-e.i}),o=[],s=0,c=0,l=0;i.sort(li(!!n)),l=ci(o,a,l),e.o(i,function(e){l+=e.vs.length,o.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=ci(o,a,l)});var u={vs:x(o)};return c&&(u.barycenter=s/c,u.weight=c),u}function ci(e,t,n){for(var r;t.length&&(r=O(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function li(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function ui(t,n,r,i){var a=t.children(n),o=t.node(n),s=o?o.borderLeft:void 0,c=o?o.borderRight:void 0,l={};s&&(a=e.a(a,function(e){return e!==s&&e!==c}));var u=ri(t,a);e.o(u,function(e){if(t.children(e.v).length){var n=ui(t,e.v,r,i);l[e.v]=n,Object.prototype.hasOwnProperty.call(n,`barycenter`)&&fi(e,n)}});var d=ii(u,r);di(d,l);var f=si(d,i);if(s&&(f.vs=x([s,f.vs,c]),t.predecessors(s).length)){var p=t.node(t.predecessors(s)[0]),m=t.node(t.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(f,`barycenter`)||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function di(t,n){e.o(t,function(e){e.vs=x(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}function fi(t,n){e.r(t.barycenter)?(t.barycenter=n.barycenter,t.weight=n.weight):(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight)}function pi(e){var t=lr(e),n=mi(e,z(1,t+1),`inEdges`),r=mi(e,z(t-1,-1,-1),`outEdges`),i=ni(e);gi(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){hi(s%2?n:r,s%4>=2),i=G(e);var l=ei(e,i);l<a&&(c=0,o=Ut(i),a=l)}gi(e,o)}function mi(e,t,n){return A(t,function(t){return Qr(e,t,n)})}function hi(t,n){var r=new e.t;e.o(t,function(t){var i=t.graph().root,a=ui(t,i,r,n);e.o(a.vs,function(e,n){t.node(e).order=n}),Zr(t,r,a.vs)})}function gi(t,n){e.o(n,function(n){e.o(n,function(e,n){t.node(e).order=n})})}function _i(t){var n=yi(t);e.o(t.graph().dummyChains,function(e){for(var r=t.node(e),i=r.edgeObj,a=vi(t,n,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;e!==i.w;){if(r=t.node(e),u){for(;(l=o[c])!==s&&t.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}t.setParent(e,l),e=t.successors(e)[0]}})}function vi(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function yi(t){var n={},r=0;function i(a){var o=r;e.o(t.children(a),i),n[a]={low:o,lim:r++}}return e.o(t.children(),i),n}function bi(t,n){var r={};function i(n,i){var a=0,o=0,s=n.length,c=O(i);return e.o(i,function(n,l){var u=Si(t,n),d=u?t.node(u).order:s;(u||n===c)&&(e.o(i.slice(o,l+1),function(n){e.o(t.predecessors(n),function(e){var i=t.node(e),o=i.order;(o<a||d<o)&&!(i.dummy&&t.node(n).dummy)&&Ci(r,e,n)})}),o=l+1,a=d)}),i}return e.n(n,i),r}function xi(t,n){var r={};function i(n,i,a,o,s){var c;e.o(z(i,a),function(i){c=n[i],t.node(c).dummy&&e.o(t.predecessors(c),function(e){var n=t.node(e);n.dummy&&(n.order<o||n.order>s)&&Ci(r,e,c)})})}function a(n,r){var a=-1,o,s=0;return e.o(r,function(e,c){if(t.node(e).dummy===`border`){var l=t.predecessors(e);l.length&&(o=t.node(l[0]).order,i(r,s,c,a,o),s=c,a=o)}i(r,s,r.length,o,n.length)}),r}return e.n(n,a),r}function Si(e,t){if(e.node(t).dummy)return k(e.predecessors(t),function(t){return e.node(t).dummy})}function Ci(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function wi(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Ti(t,n,r,i){var a={},o={},s={};return e.o(n,function(t){e.o(t,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),e.o(n,function(t){var n=-1;e.o(t,function(e){var t=i(e);if(t.length){t=B(t,function(e){return s[e]});for(var c=(t.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=t[l];o[e]===e&&n<s[d]&&!wi(r,e,d)&&(o[d]=e,o[e]=a[e]=a[d],n=s[d])}}})}),{root:a,align:o}}function Ei(t,n,r,i,a){var o={},s=Di(t,n,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(e){var n=s.outEdges(e).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=t.node(e);n!==1/0&&r.borderType!==c&&(o[e]=Math.max(o[e],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),e.o(i,function(e){o[e]=o[r[e]]}),o}function Di(t,n,r,i){var a=new e.t,o=t.graph(),s=Mi(o.nodesep,o.edgesep,i);return e.o(n,function(n){var i;e.o(n,function(e){var n=r[e];if(a.setNode(n),i){var o=r[i],c=a.edge(o,n);a.setEdge(o,n,Math.max(s(t,e,i),c||0))}i=e})}),a}function Oi(t,n){return F(e.i(n),function(e){var n=-1/0,r=1/0;return tn(e,function(e,i){var a=Ni(t,i)/2;n=Math.max(e+a,n),r=Math.min(e-a,r)}),n-r})}function ki(t,n){var r=e.i(n),i=P(r),a=M(r);e.o([`u`,`d`],function(r){e.o([`l`,`r`],function(o){var s=r+o,c=t[s],l;if(c!==n){var u=e.i(c);l=o===`l`?i-P(u):a-M(u),l&&(t[s]=j(c,function(e){return e+l}))}})})}function Ai(e,t){return j(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=B(A(e,r));return(i[1]+i[2])/2})}function ji(t){var n=G(t),r=N(bi(t,n),xi(t,n)),i={},a;return e.o([`u`,`d`],function(o){a=o===`u`?n:e.i(n).reverse(),e.o([`l`,`r`],function(n){n===`r`&&(a=A(a,function(t){return e.i(t).reverse()}));var s=(o===`u`?t.predecessors:t.successors).bind(t),c=Ti(t,a,r,s),l=Ei(t,a,c.root,c.align,n===`r`);n===`r`&&(l=j(l,function(e){return-e})),i[o+n]=l})}),ki(i,Oi(t,i)),Ai(i,t.graph().align)}function Mi(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function Ni(e,t){return e.node(t).width}function Pi(e){e=ir(e),Fi(e),nn(ji(e),function(t,n){e.node(n).x=t})}function Fi(t){var n=G(t),r=t.graph().ranksep,i=0;e.o(n,function(n){var a=M(A(n,function(e){return t.node(e).height}));e.o(n,function(e){t.node(e).y=i+a/2}),i+=a+r})}function Ii(e,t){var n=t&&t.debugTiming?dr:fr;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>qi(e));n(` runLayout`,()=>Li(t,n)),n(` updateInputGraph`,()=>Ri(e,t))})}function Li(e,t){t(` makeSpaceForEdgeLabels`,()=>Ji(e)),t(` removeSelfEdges`,()=>ra(e)),t(` acyclic`,()=>er(e)),t(` nestingGraph.run`,()=>Kr(e)),t(` rank`,()=>Hr(ir(e))),t(` injectEdgeLabelProxies`,()=>Yi(e)),t(` removeEmptyRanks`,()=>sr(e)),t(` nestingGraph.cleanup`,()=>Xr(e)),t(` normalizeRanks`,()=>or(e)),t(` assignRankMinMax`,()=>Xi(e)),t(` removeEdgeLabelProxies`,()=>Zi(e)),t(` normalize.run`,()=>xr(e)),t(` parentDummyChains`,()=>_i(e)),t(` addBorderSegments`,()=>pr(e)),t(` order`,()=>pi(e)),t(` insertSelfEdges`,()=>ia(e)),t(` adjustCoordinateSystem`,()=>hr(e)),t(` position`,()=>Pi(e)),t(` positionSelfEdges`,()=>aa(e)),t(` removeBorderNodes`,()=>na(e)),t(` normalize.undo`,()=>Cr(e)),t(` fixupEdgeLabelCoords`,()=>ea(e)),t(` undoCoordinateSystem`,()=>gr(e)),t(` translateGraph`,()=>Qi(e)),t(` assignNodeIntersects`,()=>$i(e)),t(` reversePoints`,()=>ta(e)),t(` acyclic.undo`,()=>nr(e))}function Ri(t,n){e.o(t.nodes(),function(e){var r=t.node(e),i=n.node(e);r&&(r.x=i.x,r.y=i.y,n.children(e).length&&(r.width=i.width,r.height=i.height))}),e.o(t.edges(),function(e){var r=t.edge(e),i=n.edge(e);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}var zi=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Bi={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Vi=[`acyclicer`,`ranker`,`rankdir`,`align`],Hi=[`width`,`height`],Ui={width:0,height:0},Wi=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Gi={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ki=[`labelpos`];function qi(t){var n=new e.t({multigraph:!0,compound:!0}),r=sa(t.graph());return n.setGraph(N({},Bi,oa(r,zi),R(r,Vi))),e.o(t.nodes(),function(e){var r=sa(t.node(e));n.setNode(e,qt(oa(r,Hi),Ui)),n.setParent(e,t.parent(e))}),e.o(t.edges(),function(e){var r=sa(t.edge(e));n.setEdge(e,N({},Gi,oa(r,Wi),R(r,Ki)))}),n}function Ji(t){var n=t.graph();n.ranksep/=2,e.o(t.edges(),function(e){var r=t.edge(e);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(n.rankdir===`TB`||n.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Yi(t){e.o(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v);W(t,`edge-proxy`,{rank:(t.node(e.w).rank-r.rank)/2+r.rank,e},`_ep`)}})}function Xi(t){var n=0;e.o(t.nodes(),function(e){var r=t.node(e);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,n=M(n,r.maxRank))}),t.graph().maxRank=n}function Zi(t){e.o(t.nodes(),function(e){var n=t.node(e);n.dummy===`edge-proxy`&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function Qi(t){var n=1/0,r=0,i=1/0,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}e.o(t.nodes(),function(e){l(t.node(e))}),e.o(t.edges(),function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,e.o(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),e.o(t.edges(),function(r){var a=t.edge(r);e.o(a.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(a,`x`)&&(a.x-=n),Object.prototype.hasOwnProperty.call(a,`y`)&&(a.y-=i)}),o.width=r-n+s,o.height=a-i+c}function $i(t){e.o(t.edges(),function(e){var n=t.edge(e),r=t.node(e.v),i=t.node(e.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ar(r,a)),n.points.push(ar(i,o))})}function ea(t){e.o(t.edges(),function(e){var n=t.edge(e);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function ta(t){e.o(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function na(t){e.o(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(O(n.borderLeft)),o=t.node(O(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.o(t.nodes(),function(e){t.node(e).dummy===`border`&&t.removeNode(e)})}function ra(t){e.o(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||=[],n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function ia(t){var n=G(t);e.o(n,function(n){var r=0;e.o(n,function(n,i){var a=t.node(n);a.order=i+r,e.o(a.selfEdges,function(e){W(t,`selfedge`,{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++r,e:e.e,label:e.label},`_se`)}),delete a.selfEdges})})}function aa(t){e.o(t.nodes(),function(e){var n=t.node(e);if(n.dummy===`selfedge`){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function oa(e,t){return j(R(e,t),Number)}function sa(t){var n={};return e.o(t,function(e,t){n[t.toLowerCase()]=e}),n}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Ii}});
|