@pb33f/cowboy-components 0.13.0 → 0.14.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/{_baseUniq-D4w9OEfi.cjs → _baseUniq-BCBHARBa.cjs} +1 -1
- package/dist/{_baseUniq-CwhnPBuZ.js → _baseUniq-DxKTOiyd.js} +74 -74
- package/dist/arc-BuSUjh0s.js +84 -0
- package/dist/arc-CH-0H1TF.cjs +1 -0
- package/dist/{architecture-YZFGNWBL-BSnkfFiL.cjs → architecture-YZFGNWBL-BPn_727R.cjs} +1 -1
- package/dist/{architecture-YZFGNWBL-Cv-BGlq1.js → architecture-YZFGNWBL-BTpBH05L.js} +1 -1
- package/dist/{architectureDiagram-Q4EWVU46-Bi5_oLbN.js → architectureDiagram-Q4EWVU46-CYewkKfJ.js} +4 -4
- package/dist/{architectureDiagram-Q4EWVU46-7qN01149.cjs → architectureDiagram-Q4EWVU46-DiD3e6PQ.cjs} +1 -1
- package/dist/blockDiagram-DXYQGD6D-B1FzGfTA.cjs +132 -0
- package/dist/{blockDiagram-DXYQGD6D-DPZDIH8c.js → blockDiagram-DXYQGD6D-C1Xzgnrv.js} +18 -17
- package/dist/{c4Diagram-AHTNJAMY-CzTGAiLN.js → c4Diagram-AHTNJAMY-L6Az2dvx.js} +2 -2
- package/dist/{c4Diagram-AHTNJAMY-vYFfYNT2.cjs → c4Diagram-AHTNJAMY-c5bsYT5q.cjs} +1 -1
- package/dist/change-list-item-4xBSo3-U.cjs +4586 -0
- package/dist/change-list-item-Bu_mPv-k.js +19108 -0
- package/dist/{channel-xkWi7eyU.cjs → channel-BR_Krb9l.cjs} +1 -1
- package/dist/channel-Bo_TnECw.js +5 -0
- package/dist/{chunk-4BX2VUAB-D5fkGnKT.cjs → chunk-4BX2VUAB-B1uaSl0e.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-Crsil6rQ.js → chunk-4BX2VUAB-ClX8oE7L.js} +1 -1
- package/dist/{chunk-4TB4RGXK-BK_Zwn1u.cjs → chunk-4TB4RGXK-D0JpJZOs.cjs} +1 -1
- package/dist/{chunk-4TB4RGXK-CqgUAjqs.js → chunk-4TB4RGXK-DzEEAztK.js} +5 -5
- package/dist/{chunk-55IACEB6-CVOd63y7.cjs → chunk-55IACEB6-595ZDi6s.cjs} +1 -1
- package/dist/{chunk-55IACEB6-BHM-gGnN.js → chunk-55IACEB6-DL_DHCyZ.js} +1 -1
- package/dist/{chunk-EDXVE4YY-XhKW7gue.js → chunk-EDXVE4YY-BII9TpbV.js} +1 -1
- package/dist/{chunk-EDXVE4YY-Cg8LIvnn.cjs → chunk-EDXVE4YY-CQbtNtXr.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-ClqO-tFT.cjs → chunk-FMBD7UC4-BO92YnlB.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-DZgUWYcc.js → chunk-FMBD7UC4-cN7XywSK.js} +1 -1
- package/dist/{chunk-OYMX7WX6-DPeZUR-5.cjs → chunk-OYMX7WX6-BxqhsynN.cjs} +1 -1
- package/dist/{chunk-OYMX7WX6-DDhPRCvb.js → chunk-OYMX7WX6-DTXPUCgU.js} +35 -35
- package/dist/{chunk-QZHKN3VN-CEfUDcqe.js → chunk-QZHKN3VN-Biauj3yN.js} +1 -1
- package/dist/{chunk-QZHKN3VN-DfLK5brs.cjs → chunk-QZHKN3VN-C-mnteH7.cjs} +1 -1
- package/dist/{chunk-YZCP3GAM-CUdZyEqp.cjs → chunk-YZCP3GAM-WiD5REgL.cjs} +1 -1
- package/dist/{chunk-YZCP3GAM-BseNjeX_.js → chunk-YZCP3GAM-eo-UEr6G.js} +1 -1
- package/dist/{classDiagram-v2-HSJHXN6E-DY4pBvUq.js → classDiagram-6PBFFD2Q-8kzuzUL4.js} +2 -2
- package/dist/{classDiagram-6PBFFD2Q-DANanUVD.cjs → classDiagram-6PBFFD2Q-ay2Efc0y.cjs} +1 -1
- package/dist/{classDiagram-6PBFFD2Q-DY4pBvUq.js → classDiagram-v2-HSJHXN6E-8kzuzUL4.js} +2 -2
- package/dist/{classDiagram-v2-HSJHXN6E-DANanUVD.cjs → classDiagram-v2-HSJHXN6E-ay2Efc0y.cjs} +1 -1
- package/dist/{clone-Dd6Qonyi.js → clone-CC2YvoOD.js} +1 -1
- package/dist/clone-DAIpdsWe.cjs +1 -0
- package/dist/components/diff-viewer/diff-viewer.d.ts +3 -0
- package/dist/components/diff-viewer/diff-viewer.js +34 -37
- package/dist/components/diff-viewer/line-renderer.d.ts +15 -0
- package/dist/components/diff-viewer/line-renderer.js +49 -0
- package/dist/components/footer/footer.d.ts +3 -0
- package/dist/components/footer/footer.js +10 -4
- package/dist/components/logo-wall/logos/apache.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apache.svg.js +100 -0
- package/dist/components/logo-wall/logos/apideck.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apideck.svg.js +14 -0
- package/dist/components/logo-wall/logos/apigee.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apigee.svg.js +16 -0
- package/dist/components/logo-wall/logos/bump.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/bump.svg.js +14 -0
- package/dist/components/logo-wall/logos/bytebase.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/bytebase.svg.js +11 -0
- package/dist/components/logo-wall/logos/chainlink.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/chainlink.svg.js +18 -0
- package/dist/components/logo-wall/logos/cisco.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/cisco.svg.js +14 -0
- package/dist/components/logo-wall/logos/elastic.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/elastic.svg.js +14 -0
- package/dist/components/logo-wall/logos/google.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/google.svg.js +12 -0
- package/dist/components/logo-wall/logos/grafana.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/grafana.svg.js +14 -0
- package/dist/components/logo-wall/logos/hashicorp.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/hashicorp.svg.js +18 -0
- package/dist/components/logo-wall/logos/hasura.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/hasura.svg.js +14 -0
- package/dist/components/logo-wall/logos/jpmorgan.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/jpmorgan.svg.js +22 -0
- package/dist/components/logo-wall/logos/kong.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/kong.svg.js +13 -0
- package/dist/components/logo-wall/logos/mongodb.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/mongodb.svg.js +17 -0
- package/dist/components/logo-wall/logos/nhost.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/nhost.svg.js +9 -0
- package/dist/components/logo-wall/logos/okta.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/okta.svg.js +8 -0
- package/dist/components/logo-wall/logos/opentelemetry.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/opentelemetry.svg.js +8 -0
- package/dist/components/logo-wall/logos/prometheus.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/prometheus.svg.js +8 -0
- package/dist/components/logo-wall/logos/pulumi.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/pulumi.svg.js +10 -0
- package/dist/components/logo-wall/logos/redhat.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/redhat.svg.js +8 -0
- package/dist/components/logo-wall/logos/scalar.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/scalar.svg.js +19 -0
- package/dist/components/logo-wall/logos/splunk.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/splunk.svg.js +8 -0
- package/dist/components/logo-wall/logos/unkey.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/unkey.svg.js +15 -0
- package/dist/components/logo-wall/logowall.d.ts +2 -24
- package/dist/components/logo-wall/logowall.js +58 -373
- package/dist/components/model-tree/tree.js +1 -2
- package/dist/components/premium-gate/premium-gate.css.js +18 -1
- package/dist/components/premium-gate/premium-gate.js +2 -2
- package/dist/components/problem-list/problem-item.js +3 -2
- package/dist/components/problem-list/problem-list.d.ts +2 -0
- package/dist/components/problem-list/problem-list.js +26 -7
- package/dist/components/problems-overview/problem-overview-group.js +2 -1
- package/dist/components/visualizer/edge.d.ts +6 -2
- package/dist/components/visualizer/edge.js +26 -4
- package/dist/components/visualizer/equalizer.css.js +11 -2
- package/dist/components/visualizer/explorer.d.ts +3 -1
- package/dist/components/visualizer/explorer.js +51 -59
- package/dist/components/visualizer/nodes/change-view-node.d.ts +2 -2
- package/dist/components/visualizer/nodes/change-view-node.js +10 -6
- package/dist/components/visualizer/nodes/graph-node.d.ts +12 -8
- package/dist/components/visualizer/nodes/graph-node.js +47 -25
- package/dist/components/visualizer/nodes/schema.d.ts +7 -0
- package/dist/components/visualizer/nodes/schema.js +81 -59
- package/dist/components/visualizer/shared.css.js +48 -10
- package/dist/components/visualizer/viewport-position.d.ts +28 -0
- package/dist/components/visualizer/viewport-position.js +38 -0
- package/dist/components/workspaces/workspace-view.js +10 -7
- package/dist/components/yaml-viewer/yaml-viewer.css.d.ts +2 -0
- package/dist/components/yaml-viewer/yaml-viewer.css.js +45 -0
- package/dist/components/yaml-viewer/yaml-viewer.d.ts +22 -0
- package/dist/components/yaml-viewer/yaml-viewer.js +86 -0
- package/dist/controllers/problem-controller.d.ts +1 -0
- package/dist/controllers/problem-controller.js +40 -24
- package/dist/{cose-bilkent-S5V4N54A-CPd0mzpZ.js → cose-bilkent-S5V4N54A-BvU_SKfP.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-BEI30FIt.cjs → cose-bilkent-S5V4N54A-CjLPT2aq.cjs} +1 -1
- package/dist/{cowboy-components-C1bHeXpH.js → cowboy-components-B5MDHQs5.js} +8691 -8836
- package/dist/{cowboy-components-BDlH5KPd.cjs → cowboy-components-DMQv-nwp.cjs} +561 -489
- package/dist/{dagre-KV5264BT-lXj1bQdQ.cjs → dagre-KV5264BT-BJ3g2OfF.cjs} +1 -1
- package/dist/{dagre-KV5264BT-DKYFh03U.js → dagre-KV5264BT-CZZ7IWMJ.js} +29 -29
- package/dist/{diagram-5BDNPKRD-B5z67jan.js → diagram-5BDNPKRD-BtgWDNH6.js} +4 -4
- package/dist/{diagram-5BDNPKRD-BxdT4j_p.cjs → diagram-5BDNPKRD-C8f_rKrj.cjs} +1 -1
- package/dist/{diagram-G4DWMVQ6-CYhKfvVo.cjs → diagram-G4DWMVQ6-CdbbbjZ1.cjs} +1 -1
- package/dist/{diagram-G4DWMVQ6-CW505eM5.js → diagram-G4DWMVQ6-Cvo7MOEn.js} +4 -4
- package/dist/{diagram-MMDJMWI5-CguvhYVm.js → diagram-MMDJMWI5-BBZMNBAZ.js} +3 -3
- package/dist/{diagram-MMDJMWI5-CnbCy2d4.cjs → diagram-MMDJMWI5-CmuOqtUd.cjs} +1 -1
- package/dist/{diagram-TYMM5635-CTqk1SDy.cjs → diagram-TYMM5635-BDWJ5rTp.cjs} +1 -1
- package/dist/{diagram-TYMM5635-DNaputK9.js → diagram-TYMM5635-BJ6YAfrg.js} +3 -3
- package/dist/{erDiagram-SMLLAGMA-CbVmsYT2.js → erDiagram-SMLLAGMA-CYctRkDG.js} +4 -4
- package/dist/{erDiagram-SMLLAGMA-C8J_QyFx.cjs → erDiagram-SMLLAGMA-oQiAbd77.cjs} +1 -1
- package/dist/events/doctor.d.ts +2 -1
- package/dist/factories/explorer-component-factory.d.ts +2 -1
- package/dist/factories/explorer-component-factory.js +1 -0
- package/dist/{flowDiagram-DWJPFMVM-CilWme2B.cjs → flowDiagram-DWJPFMVM-Cl2ZAgx-.cjs} +1 -1
- package/dist/{flowDiagram-DWJPFMVM-CzhP7Mva.js → flowDiagram-DWJPFMVM-XzVvDcKE.js} +6 -6
- package/dist/{ganttDiagram-T4ZO3ILL-D1VjNn5T.js → ganttDiagram-T4ZO3ILL-Bw3whz8Z.js} +3 -3
- package/dist/{ganttDiagram-T4ZO3ILL-CJPTfw3M.cjs → ganttDiagram-T4ZO3ILL-D6p69Xut.cjs} +1 -1
- package/dist/{gitGraph-7Q5UKJZL-KIImqmsm.js → gitGraph-7Q5UKJZL-CV8uXlc6.js} +1 -1
- package/dist/{gitGraph-7Q5UKJZL-Dt7RPGLj.cjs → gitGraph-7Q5UKJZL-Dc00T47S.cjs} +1 -1
- package/dist/{gitGraphDiagram-UUTBAWPF-RgZxgljz.cjs → gitGraphDiagram-UUTBAWPF-DO7-Vg9n.cjs} +1 -1
- package/dist/{gitGraphDiagram-UUTBAWPF-oNmbFzsW.js → gitGraphDiagram-UUTBAWPF-DyF52xzw.js} +4 -4
- package/dist/{graph-CFIa3BqY.js → graph-BNtv6wPN.js} +43 -43
- package/dist/{graph-D7t_ZgqQ.cjs → graph-nnOjqfSF.cjs} +1 -1
- package/dist/info-OMHHGYJF-BEJOj8rC.js +5 -0
- package/dist/{info-OMHHGYJF-DNwPREtC.cjs → info-OMHHGYJF-DenwEztT.cjs} +1 -1
- package/dist/{infoDiagram-42DDH7IO-xpnPsX13.cjs → infoDiagram-42DDH7IO-CDwaPJgE.cjs} +1 -1
- package/dist/{infoDiagram-42DDH7IO-D6tfy_kQ.js → infoDiagram-42DDH7IO-D5ZWT_PY.js} +2 -2
- package/dist/{ishikawaDiagram-UXIWVN3A-1C3ML4wN.js → ishikawaDiagram-UXIWVN3A-DO1TQj8y.js} +1 -1
- package/dist/{ishikawaDiagram-UXIWVN3A-cN7Egzi1.cjs → ishikawaDiagram-UXIWVN3A-DgxKja6G.cjs} +1 -1
- package/dist/{journeyDiagram-VCZTEJTY-BBnQnZeo.js → journeyDiagram-VCZTEJTY-BOrvmHFC.js} +4 -4
- package/dist/{journeyDiagram-VCZTEJTY-CuHlve7g.cjs → journeyDiagram-VCZTEJTY-CJCEu2Bp.cjs} +1 -1
- package/dist/{kanban-definition-6JOO6SKY-w_-A-pcU.cjs → kanban-definition-6JOO6SKY-DEuqG8My.cjs} +1 -1
- package/dist/{kanban-definition-6JOO6SKY-CIUOm1v3.js → kanban-definition-6JOO6SKY-DbcLaE1y.js} +22 -22
- package/dist/{layout-DkbTnSOk.cjs → layout-C5IxZs51.cjs} +1 -1
- package/dist/{layout-B94Gbndw.js → layout-US8yryxu.js} +89 -89
- package/dist/linear-Bmlq6WJ8.cjs +1 -0
- package/dist/{linear-ofqYQwLM.js → linear-D6nUCk2i.js} +26 -26
- package/dist/{mermaid-parser.core-D5yJiPW9.cjs → mermaid-parser.core-COvBhcPG.cjs} +2 -2
- package/dist/{mermaid-parser.core-SWTLxzuR.js → mermaid-parser.core-DvOBQD0s.js} +13 -13
- package/dist/{min-CCJ14kSC.cjs → min-BeG6JEx2.cjs} +1 -1
- package/dist/{min-BVt52F4Z.js → min-gCZaz5eW.js} +8 -8
- package/dist/{mindmap-definition-QFDTVHPH-BBABzpZ_.js → mindmap-definition-QFDTVHPH-Bf7uOPBO.js} +11 -11
- package/dist/{mindmap-definition-QFDTVHPH-DkHlEc6j.cjs → mindmap-definition-QFDTVHPH-Bh_mtad8.cjs} +1 -1
- package/dist/{packet-4T2RLAQJ-C_GHj8I6.js → packet-4T2RLAQJ-CnjxgpUP.js} +1 -1
- package/dist/{packet-4T2RLAQJ-D-3BTAOL.cjs → packet-4T2RLAQJ-EX3JjNtR.cjs} +1 -1
- package/dist/pie-ZZUOXDRM-B0-esN8S.js +5 -0
- package/dist/{pie-ZZUOXDRM-CCr4-X6f.cjs → pie-ZZUOXDRM-S9g0lXgu.cjs} +1 -1
- package/dist/pieDiagram-DEJITSTG-An0q-g5y.cjs +30 -0
- package/dist/{pieDiagram-DEJITSTG-oeQHkFGB.js → pieDiagram-DEJITSTG-DIkSdQCd.js} +43 -42
- package/dist/{quadrantDiagram-34T5L4WZ-CHmpNV-R.cjs → quadrantDiagram-34T5L4WZ-B5f35ihC.cjs} +1 -1
- package/dist/{quadrantDiagram-34T5L4WZ-OYjSZG43.js → quadrantDiagram-34T5L4WZ-CBlxIaIn.js} +2 -2
- package/dist/radar-PYXPWWZC-1Ezs-b76.js +5 -0
- package/dist/{radar-PYXPWWZC-C1rOl50T.cjs → radar-PYXPWWZC-C0zC2ZSo.cjs} +1 -1
- package/dist/{requirementDiagram-MS252O5E-CD_xeIto.cjs → requirementDiagram-MS252O5E-C2bJ8iZf.cjs} +1 -1
- package/dist/{requirementDiagram-MS252O5E-CwRW6-r7.js → requirementDiagram-MS252O5E-CLQv0oWl.js} +3 -3
- package/dist/{sankeyDiagram-XADWPNL6-RMkMjKAW.cjs → sankeyDiagram-XADWPNL6--gS8yJdi.cjs} +1 -1
- package/dist/{sankeyDiagram-XADWPNL6-CQfVCItY.js → sankeyDiagram-XADWPNL6-BPSHvjZ8.js} +1 -1
- package/dist/{sequenceDiagram-FGHM5R23-Bg1onFX3.cjs → sequenceDiagram-FGHM5R23-C8D7r5pW.cjs} +1 -1
- package/dist/{sequenceDiagram-FGHM5R23-CHy2erSS.js → sequenceDiagram-FGHM5R23-Pz7V2MNd.js} +3 -3
- package/dist/services/workspace-service.js +3 -3
- package/dist/stateDiagram-FHFEXIEX-BAF5DJ1S.cjs +1 -0
- package/dist/{stateDiagram-FHFEXIEX-CMl5lVVr.js → stateDiagram-FHFEXIEX-D5m6EHM0.js} +44 -43
- package/dist/{stateDiagram-v2-QKLJ7IA2-Ddx6MvoK.js → stateDiagram-v2-QKLJ7IA2-Bewn3XVh.js} +2 -2
- package/dist/{stateDiagram-v2-QKLJ7IA2-k0ixVO2x.cjs → stateDiagram-v2-QKLJ7IA2-D8ygFuIi.cjs} +1 -1
- package/dist/{timeline-definition-GMOUNBTQ-tsduD7s8.cjs → timeline-definition-GMOUNBTQ-DGnNWVK8.cjs} +1 -1
- package/dist/{timeline-definition-GMOUNBTQ-wGoPQPZW.js → timeline-definition-GMOUNBTQ-D_q_Aq0R.js} +23 -23
- package/dist/{treeView-SZITEDCU-DLnrlNgm.js → treeView-SZITEDCU-CJ-dtg22.js} +1 -1
- package/dist/{treeView-SZITEDCU-0cNlhBgJ.cjs → treeView-SZITEDCU-D_h6_ShC.cjs} +1 -1
- package/dist/{treemap-W4RFUUIX-BhmjFGQ3.js → treemap-W4RFUUIX-B9GQw9aZ.js} +1 -1
- package/dist/{treemap-W4RFUUIX-CKAFw4rq.cjs → treemap-W4RFUUIX-BtKxSF22.cjs} +1 -1
- package/dist/{vennDiagram-DHZGUBPP-D0_k6R1t.js → vennDiagram-DHZGUBPP-JEim8wmH.js} +59 -59
- package/dist/{vennDiagram-DHZGUBPP-cIbatSRt.cjs → vennDiagram-DHZGUBPP-amyk4YMx.cjs} +1 -1
- package/dist/{wardley-RL74JXVD-E_57jQp4.cjs → wardley-RL74JXVD-Cni1Bfk_.cjs} +1 -1
- package/dist/{wardley-RL74JXVD-ClNl5KuH.js → wardley-RL74JXVD-sMbm0y_r.js} +1 -1
- package/dist/{wardleyDiagram-NUSXRM2D-DrU9h_lF.cjs → wardleyDiagram-NUSXRM2D-BxrRpNG2.cjs} +1 -1
- package/dist/{wardleyDiagram-NUSXRM2D-CdC2HbGc.js → wardleyDiagram-NUSXRM2D-C2MLJ-IT.js} +3 -3
- package/dist/workers/elk-fake-worker.generated.d.ts +3 -0
- package/dist/workers/elk-fake-worker.generated.js +50224 -0
- package/dist/workers/elk-layout-blob.generated.js +16 -18
- package/dist/workers/elk-layout.worker.js +5 -2
- package/dist/{xychartDiagram-5P7HB3ND-y-_Hnheq.js → xychartDiagram-5P7HB3ND-CSCEAZnj.js} +8 -7
- package/dist/{xychartDiagram-5P7HB3ND-BsPkSpoT.cjs → xychartDiagram-5P7HB3ND-CpDJRyka.cjs} +4 -4
- package/package.json +11 -2
- package/dist/arc-C1ekKGkb.js +0 -83
- package/dist/arc-R701-DfQ.cjs +0 -1
- package/dist/blockDiagram-DXYQGD6D-C72mCfQb.cjs +0 -132
- package/dist/change-list-item-BEl0JMXU.js +0 -18744
- package/dist/change-list-item-BQAfTtYI.cjs +0 -4535
- package/dist/channel-Bcdtr5hc.js +0 -5
- package/dist/clone-xz9tAnT8.cjs +0 -1
- package/dist/info-OMHHGYJF-CoCJYW0-.js +0 -5
- package/dist/linear-C0WOPIXr.cjs +0 -1
- package/dist/pie-ZZUOXDRM-BZwBUxgW.js +0 -5
- package/dist/pieDiagram-DEJITSTG-DpV5UNcT.cjs +0 -30
- package/dist/radar-PYXPWWZC-CeYN6kDE.js +0 -5
- package/dist/stateDiagram-FHFEXIEX-CYMON_a_.cjs +0 -1
package/dist/{architectureDiagram-Q4EWVU46-7qN01149.cjs → architectureDiagram-Q4EWVU46-DiD3e6PQ.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tt=require("./cowboy-components-BDlH5KPd.cjs"),We=require("./chunk-4BX2VUAB-D5fkGnKT.cjs"),ze=require("./mermaid-parser.core-D5yJiPW9.cjs"),xe=require("./cytoscape.esm-DHF7mANN.cjs"),Be=require("./change-list-item-BQAfTtYI.cjs");var he={exports:{}},le={exports:{}},fe={exports:{}},$e=fe.exports,Ce;function ke(){return Ce||(Ce=1,(function(I,O){(function(b,L){I.exports=L()})($e,function(){return(function(A){var b={};function L(u){if(b[u])return b[u].exports;var h=b[u]={i:u,l:!1,exports:{}};return A[u].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=A,L.c=b,L.i=function(u){return u},L.d=function(u,h,n){L.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:n})},L.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return L.d(h,"a",h),h},L.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},L.p="",L(L.s=28)})([(function(A,b,L){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,A.exports=u}),(function(A,b,L){var u=L(2),h=L(8),n=L(9);function e(f,r,d){u.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(u.prototype);for(var i in u)e[i]=u[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var d=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(d.getOwner()==r)return d;if(d.getOwner()==t)break;d=d.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=e}),(function(A,b,L){function u(h){this.vGraphObject=h}A.exports=u}),(function(A,b,L){var u=L(2),h=L(10),n=L(13),e=L(0),i=L(16),f=L(5);function r(t,s,o,c){o==null&&c==null&&(c=s),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}r.prototype=Object.create(u.prototype);for(var d in u)r[d]=u[d];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},r.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},r.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},r.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.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)},r.prototype.scatter=function(){var t,s,o=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+i.nextDouble()*(c-o)+o;var l=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_Y+i.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=r}),(function(A,b,L){var u=L(0);function h(){}for(var n in u)h[n]=u[n];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,b,L){function u(h,n){h==null&&n==null?(this.x=0,this.y=0):(this.x=h,this.y=n)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=u}),(function(A,b,L){var u=L(2),h=L(10),n=L(0),e=L(7),i=L(3),f=L(1),r=L(13),d=L(12),t=L(11);function s(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var v=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(v.source=l,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),l.edges.push(v),T!=l&&T.edges.push(v),v)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,v=T.length,N=0;N<v;N++)g=T[N],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var P=this.nodes.indexOf(l);if(P==-1)throw"Node not in owner node list!";this.nodes.splice(P,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var C=g.source.edges.indexOf(g),U=g.target.edges.indexOf(g);if(!(C>-1&&U>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(U,1);var P=g.source.owner.getEdges().indexOf(g);if(P==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(P,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,v,N=this.getNodes(),P=N.length,C=0;C<P;C++){var U=N[C];T=U.getTop(),g=U.getLeft(),c>T&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?v=N[0].getParent().paddingLeft:v=this.margin,this.left=l-v,this.top=c-v,new d(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,N,P,C,U,k,X=this.nodes,J=X.length,D=0;D<J;D++){var it=X[D];c&&it.child!=null&&it.updateBounds(),N=it.getLeft(),P=it.getRight(),C=it.getTop(),U=it.getBottom(),l>N&&(l=N),T<P&&(T=P),g>C&&(g=C),v<U&&(v=U)}var a=new r(l,g,T-l,v-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),X[0].getParent().paddingLeft!=null?k=X[0].getParent().paddingLeft:k=this.margin,this.left=a.x-k,this.right=a.x+a.width+k,this.top=a.y-k,this.bottom=a.y+a.height+k},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,N,P,C,U,k=c.length,X=0;X<k;X++){var J=c[X];N=J.getLeft(),P=J.getRight(),C=J.getTop(),U=J.getBottom(),l>N&&(l=N),T<P&&(T=P),g>C&&(g=C),v<U&&(v=U)}var D=new r(l,g,T-l,v-g);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var v=l[g];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],v,N,P=g.withChildren();for(P.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){g=l.shift(),v=g.getEdges();for(var C=v.length,U=0;U<C;U++){var k=v[U];if(N=k.getOtherEndInGraph(g,this),N!=null&&!T.has(N)){var X=N.withChildren();X.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var J=0;T.forEach(function(D){D.owner==c&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,b,L){var u,h=L(1);function n(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(e,i,f,r,d){if(f==null&&r==null&&d==null){if(e==null)throw"Graph is null!";if(i==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(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{d=f,r=i,f=e;var t=r.getOwner(),s=d.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,d);if(f.isInterGraph=!0,f.source=r,f.target=d,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},n.prototype.remove=function(e){if(e instanceof u){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,d=f.length,t=0;t<d;t++)r=f[t],i.remove(r);var s=[];s=s.concat(i.getNodes());var o;d=s.length;for(var t=0;t<d;t++)o=s[t],i.remove(o);i==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(i);this.graphs.splice(c,1),i.parent=null}else if(e instanceof h){if(r=e,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var c=r.source.edges.indexOf(r);if(r.source.edges.splice(c,1),c=r.target.edges.indexOf(r),r.target.edges.splice(c,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var c=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(c,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],i=this.getGraphs(),f=i.length,r=0;r<f;r++)e=e.concat(i[r].getNodes());this.allNodes=e}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)e=e.concat(i[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(e,i){if(!(e!=null&&i!=null))throw"assert failed";if(e==i)return!0;var f=e.getOwner(),r;do{if(r=f.getParent(),r==null)break;if(r==i)return!0;if(f=r.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(r=f.getParent(),r==null)break;if(r==e)return!0;if(f=r.getOwner(),f==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var e,i,f,r,d,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(e=t[o],i=e.source,f=e.target,e.lca=null,e.sourceInLca=i,e.targetInLca=f,i==f){e.lca=i.getOwner();continue}for(r=i.getOwner();e.lca==null;){for(e.targetInLca=f,d=f.getOwner();e.lca==null;){if(d==r){e.lca=d;break}if(d==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=d.getParent(),d=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca==null&&(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(e,i){if(e==i)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var r=i.getOwner();do{if(r==null)break;if(r==f)return r;r=r.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},n.prototype.calcInclusionTreeDepths=function(e,i){e==null&&i==null&&(e=this.rootGraph,i=1);for(var f,r=e.getNodes(),d=r.length,t=0;t<d;t++)f=r[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},n.prototype.includesInvalidEdge=function(){for(var e,i=[],f=this.edges.length,r=0;r<f;r++)e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target)&&i.push(e);for(var r=0;r<i.length;r++)this.remove(i[r]);return!1},A.exports=n}),(function(A,b,L){var u=L(12);function h(){}h.calcSeparationAmount=function(n,e,i,f){if(!n.intersects(e))throw"assert failed";var r=new Array(2);this.decideDirectionsForOverlappingNodes(n,e,r),i[0]=Math.min(n.getRight(),e.getRight())-Math.max(n.x,e.x),i[1]=Math.min(n.getBottom(),e.getBottom())-Math.max(n.y,e.y),n.getX()<=e.getX()&&n.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-n.getX(),n.getRight()-e.getRight()):e.getX()<=n.getX()&&e.getRight()>=n.getRight()&&(i[0]+=Math.min(n.getX()-e.getX(),e.getRight()-n.getRight())),n.getY()<=e.getY()&&n.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-n.getY(),n.getBottom()-e.getBottom()):e.getY()<=n.getY()&&e.getBottom()>=n.getBottom()&&(i[1]+=Math.min(n.getY()-e.getY(),e.getBottom()-n.getBottom()));var d=Math.abs((e.getCenterY()-n.getCenterY())/(e.getCenterX()-n.getCenterX()));e.getCenterY()===n.getCenterY()&&e.getCenterX()===n.getCenterX()&&(d=1);var t=d*i[0],s=i[1]/d;i[0]<s?s=i[0]:t=i[1],i[0]=-1*r[0]*(s/2+f),i[1]=-1*r[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(n,e,i){n.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,n.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},h.getIntersection2=function(n,e,i){var f=n.getCenterX(),r=n.getCenterY(),d=e.getCenterX(),t=e.getCenterY();if(n.intersects(e))return i[0]=f,i[1]=r,i[2]=d,i[3]=t,!0;var s=n.getX(),o=n.getY(),c=n.getRight(),l=n.getX(),T=n.getBottom(),g=n.getRight(),v=n.getWidthHalf(),N=n.getHeightHalf(),P=e.getX(),C=e.getY(),U=e.getRight(),k=e.getX(),X=e.getBottom(),J=e.getRight(),D=e.getWidthHalf(),it=e.getHeightHalf(),a=!1,E=!1;if(f===d){if(r>t)return i[0]=f,i[1]=o,i[2]=d,i[3]=X,!1;if(r<t)return i[0]=f,i[1]=T,i[2]=d,i[3]=C,!1}else if(r===t){if(f>d)return i[0]=s,i[1]=r,i[2]=U,i[3]=t,!1;if(f<d)return i[0]=c,i[1]=r,i[2]=P,i[3]=t,!1}else{var p=n.height/n.width,m=e.height/e.width,y=(t-r)/(d-f),R=void 0,w=void 0,S=void 0,V=void 0,x=void 0,q=void 0;if(-p===y?f>d?(i[0]=l,i[1]=T,a=!0):(i[0]=c,i[1]=o,a=!0):p===y&&(f>d?(i[0]=s,i[1]=o,a=!0):(i[0]=g,i[1]=T,a=!0)),-m===y?d>f?(i[2]=k,i[3]=X,E=!0):(i[2]=U,i[3]=C,E=!0):m===y&&(d>f?(i[2]=P,i[3]=C,E=!0):(i[2]=J,i[3]=X,E=!0)),a&&E)return!1;if(f>d?r>t?(R=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(m,y,2)):(R=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-m,y,1)):r>t?(R=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-m,y,3)):(R=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(m,y,4)),!a)switch(R){case 1:V=o,S=f+-N/y,i[0]=S,i[1]=V;break;case 2:S=g,V=r+v*y,i[0]=S,i[1]=V;break;case 3:V=T,S=f+N/y,i[0]=S,i[1]=V;break;case 4:S=l,V=r+-v*y,i[0]=S,i[1]=V;break}if(!E)switch(w){case 1:q=C,x=d+-it/y,i[2]=x,i[3]=q;break;case 2:x=J,q=t+D*y,i[2]=x,i[3]=q;break;case 3:q=X,x=d+it/y,i[2]=x,i[3]=q;break;case 4:x=k,q=t+-D*y,i[2]=x,i[3]=q;break}}return!1},h.getCardinalDirection=function(n,e,i){return n>e?i:1+i%4},h.getIntersection=function(n,e,i,f){if(f==null)return this.getIntersection2(n,e,i);var r=n.x,d=n.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,v=void 0,N=void 0,P=void 0,C=void 0,U=void 0,k=void 0,X=void 0,J=void 0;return N=s-d,C=r-t,k=t*d-r*s,P=T-c,U=o-l,X=l*c-o*T,J=N*U-P*C,J===0?null:(g=(C*X-U*k)/J,v=(P*k-N*X)/J,new u(g,v))},h.angleOfVector=function(n,e,i,f){var r=void 0;return n!==i?(r=Math.atan((f-e)/(i-n)),i<n?r+=Math.PI:f<e&&(r+=this.TWO_PI)):f<e?r=this.ONE_AND_HALF_PI:r=this.HALF_PI,r},h.doIntersect=function(n,e,i,f){var r=n.x,d=n.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=(t-r)*(T-c)-(l-o)*(s-d);if(g===0)return!1;var v=((T-c)*(l-r)+(o-l)*(T-d))/g,N=((d-s)*(l-r)+(t-r)*(T-d))/g;return 0<v&&v<1&&0<N&&N<1},h.findCircleLineIntersections=function(n,e,i,f,r,d,t){var s=(i-n)*(i-n)+(f-e)*(f-e),o=2*((n-r)*(i-n)+(e-d)*(f-e)),c=(n-r)*(n-r)+(e-d)*(e-d)-t*t,l=o*o-4*s*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),v=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:v}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,b,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=u}),(function(A,b,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,A.exports=u}),(function(A,b,L){var u=(function(){function r(d,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}return function(d,t,s){return t&&r(d.prototype,t),s&&r(d,s),d}})();function h(r,d){if(!(r instanceof d))throw new TypeError("Cannot call a class as a function")}var n=function(d){return{value:d,next:null,prev:null}},e=function(d,t,s,o){return d!==null?d.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=d,t.next=s,o.length++,t},i=function(d,t){var s=d.prev,o=d.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,d.prev=d.next=null,t.length--,d},f=(function(){function r(d){var t=this;h(this,r),this.length=0,this.head=null,this.tail=null,d?.forEach(function(s){return t.push(s)})}return u(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return e(s.prev,n(t),s,this)}},{key:"insertAfter",value:function(t,s){return e(s,n(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return e(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return e(s,t,s.next,this)}},{key:"push",value:function(t){return e(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return e(null,n(t),this.head,this)}},{key:"remove",value:function(t){return i(t,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),r})();A.exports=f}),(function(A,b,L){function u(h,n,e){this.x=null,this.y=null,h==null&&n==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof n=="number"&&e==null?(this.x=h,this.y=n):h.constructor.name=="Point"&&n==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.getLocation=function(){return new u(this.x,this.y)},u.prototype.setLocation=function(h,n,e){h.constructor.name=="Point"&&n==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof n=="number"&&e==null&&(parseInt(h)==h&&parseInt(n)==n?this.move(h,n):(this.x=Math.floor(h+.5),this.y=Math.floor(n+.5)))},u.prototype.move=function(h,n){this.x=h,this.y=n},u.prototype.translate=function(h,n){this.x+=h,this.y+=n},u.prototype.equals=function(h){if(h.constructor.name=="Point"){var n=h;return this.x==n.x&&this.y==n.y}return this==h},u.prototype.toString=function(){return new u().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=u}),(function(A,b,L){function u(h,n,e,i){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&n!=null&&e!=null&&i!=null&&(this.x=h,this.y=n,this.width=e,this.height=i)}u.prototype.getX=function(){return this.x},u.prototype.setX=function(h){this.x=h},u.prototype.getY=function(){return this.y},u.prototype.setY=function(h){this.y=h},u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(h){this.width=h},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(h){this.height=h},u.prototype.getRight=function(){return this.x+this.width},u.prototype.getBottom=function(){return this.y+this.height},u.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},u.prototype.getCenterX=function(){return this.x+this.width/2},u.prototype.getMinX=function(){return this.getX()},u.prototype.getMaxX=function(){return this.getX()+this.width},u.prototype.getCenterY=function(){return this.y+this.height/2},u.prototype.getMinY=function(){return this.getY()},u.prototype.getMaxY=function(){return this.getY()+this.height},u.prototype.getWidthHalf=function(){return this.width/2},u.prototype.getHeightHalf=function(){return this.height/2},A.exports=u}),(function(A,b,L){var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function h(){}h.lastID=0,h.createID=function(n){return h.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=h.getString(),h.lastID++),n.uniqueID)},h.getString=function(n){return n==null&&(n=h.lastID),"Object#"+n},h.isPrimitive=function(n){var e=typeof n>"u"?"undefined":u(n);return n==null||e!="object"&&e!="function"},A.exports=h}),(function(A,b,L){function u(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=L(0),n=L(7),e=L(3),i=L(1),f=L(6),r=L(5),d=L(17),t=L(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new n(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new e(this.graphManager,o)},s.prototype.newEdge=function(o){return new i(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof e){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof i){var v=o;if(v.vGraphObject!=null){var N=v.vGraphObject;N.update(v)}}else if(o instanceof f){var P=o;if(P.vGraphObject!=null){var C=P.vGraphObject;C.update(P)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new r(0,0));else{var c=new d,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),g,v=0;v<T.length;v++)g=T[v],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return o;var v=new Set,N=[],P=new Map,C=[];for(C=C.concat(l);C.length>0&&c;){for(N.push(C[0]);N.length>0&&c;){var U=N[0];N.splice(0,1),v.add(U);for(var k=U.getEdges(),g=0;g<k.length;g++){var X=k[g].getOtherEnd(U);if(P.get(U)!=X)if(!v.has(X))N.push(X),P.set(X,U);else{c=!1;break}}}if(!c)o=[];else{var J=[].concat(u(v));o.push(J);for(var g=0;g<J.length;g++){var D=J[g],it=C.indexOf(D);it>-1&&C.splice(it,1)}v=new Set,P=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g<o.bendpoints.length;g++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var N=this.newEdge(null);this.graphManager.add(N,l,v),c.add(v),l=v}var N=this.newEdge(null);return this.graphManager.add(N,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(u(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),g=0;g<T.length;g++){var v=T[g],N=new r(v.getCenterX(),v.getCenterY()),P=l.bendpoints.get(g);P.x=N.x,P.y=N.y,v.getOwner().remove(v)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var g=c;if(o<=50){var v=c/l;g-=(c-v)/50*(50-o)}else{var N=c*T;g+=(N-c)/50*(o-50)}return g}else{var P,C;return o<=50?(P=9*c/500,C=c/10):(P=9*c/50,C=-8*c),P*o+C}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,g=!1,v=null;(c.length==1||c.length==2)&&(g=!0,v=c[0]);for(var N=0;N<c.length;N++){var P=c[N],C=P.getNeighborsList().size;T.set(P,P.getNeighborsList().size),C==1&&l.push(P)}var U=[];for(U=U.concat(l);!g;){var k=[];k=k.concat(U),U=[];for(var N=0;N<c.length;N++){var P=c[N],X=c.indexOf(P);X>=0&&c.splice(X,1);var J=P.getNeighborsList();J.forEach(function(a){if(l.indexOf(a)<0){var E=T.get(a),p=E-1;p==1&&U.push(a),T.set(a,p)}})}l=l.concat(U),(c.length==1||c.length==2)&&(g=!0,v=c[0])}return v},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,b,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},A.exports=u}),(function(A,b,L){var u=L(5);function h(n,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(n){this.lworldExtX=n},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(n){this.lworldExtY=n},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},h.prototype.transformX=function(n){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(n){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(n){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(n){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(n){var e=new u(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return e},A.exports=h}),(function(A,b,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=L(15),n=L(4),e=L(0),i=L(8),f=L(9);function r(){h.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}r.prototype=Object.create(h.prototype);for(var d in h)r[d]=h[d];r.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,g,v=this.getGraphManager().getAllEdges(),N=0;N<v.length;N++)t=v[N],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},r.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},r.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;o<g.length;o++)l=g[o],this.calculateRepulsionForceOfANode(l,v,t,s),v.add(l);else for(o=0;o<g.length;o++)for(l=g[o],c=o+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},r.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},r.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},r.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,g,v;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),g=T*(t.lengthX/l),v=T*(t.lengthY/l),o.springForceX+=g,o.springForceY+=v,c.springForceX-=g,c.springForceY-=v)},r.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),g,v,N,P,C,U,k;if(o.intersects(c)){i.calcSeparationAmount(o,c,l,n.DEFAULT_EDGE_LENGTH/2),U=2*l[0],k=2*l[1];var X=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=X*U,t.repulsionForceY-=X*k,s.repulsionForceX+=X*U,s.repulsionForceY+=X*k}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),v=c.getCenterY()-o.getCenterY()):(i.getIntersection(o,c,T),g=T[2]-T[0],v=T[3]-T[1]),Math.abs(g)<n.MIN_REPULSION_DIST&&(g=f.sign(g)*n.MIN_REPULSION_DIST),Math.abs(v)<n.MIN_REPULSION_DIST&&(v=f.sign(v)*n.MIN_REPULSION_DIST),N=g*g+v*v,P=Math.sqrt(N),C=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/N,U=C*g/P,k=C*v/P,t.repulsionForceX-=U,t.repulsionForceY-=k,s.repulsionForceX+=U,s.repulsionForceY+=k},r.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,g,v,N;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(N=s.getEstimatedSize()*this.gravityRangeFactor,(g>N||v>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||v>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},r.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},r.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},r.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},r.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var v=c;v<=l;v++)for(var N=T;N<=g;N++)this.grid[v][N].push(t),t.setGridCoordinates(c,l,T,g)},r.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var N=t.startY-1;N<t.finishY+2;N++)if(!(v<0||N<0||v>=g.length||N>=g[0].length)){for(var P=0;P<g[v][N].length;P++)if(T=g[v][N][P],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var C=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),U=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);C<=this.repulsionRange&&U<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(u(l))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},r.prototype.calcRepulsionRange=function(){return 0},A.exports=r}),(function(A,b,L){var u=L(1),h=L(4);function n(i,f,r){u.call(this,i,f,r),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(u.prototype);for(var e in u)n[e]=u[e];A.exports=n}),(function(A,b,L){var u=L(3),h=L(4);function n(i,f,r,d){u.call(this,i,f,r,d),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,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=[]}n.prototype=Object.create(u.prototype);for(var e in u)n[e]=u[e];n.prototype.setGridCoordinates=function(i,f,r,d){this.startX=i,this.finishX=f,this.startY=r,this.finishY=d},A.exports=n}),(function(A,b,L){function u(h,n){this.width=0,this.height=0,h!==null&&n!==null&&(this.height=n,this.width=h)}u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(h){this.width=h},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(h){this.height=h},A.exports=u}),(function(A,b,L){var u=L(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(n,e){var i=u.createID(n);this.contains(i)||(this.map[i]=e,this.keys.push(n))},h.prototype.contains=function(n){return u.createID(n),this.map[n]!=null},h.prototype.get=function(n){var e=u.createID(n);return this.map[e]},h.prototype.keySet=function(){return this.keys},A.exports=h}),(function(A,b,L){var u=L(14);function h(){this.set={}}h.prototype.add=function(n){var e=u.createID(n);this.contains(e)||(this.set[e]=n)},h.prototype.remove=function(n){delete this.set[u.createID(n)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(n){return this.set[u.createID(n)]==n},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(n){for(var e=Object.keys(this.set),i=e.length,f=0;f<i;f++)n.push(this.set[e[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(n){for(var e=n.length,i=0;i<e;i++){var f=n[i];this.add(f)}},A.exports=h}),(function(A,b,L){function u(){}u.multMat=function(h,n){for(var e=[],i=0;i<h.length;i++){e[i]=[];for(var f=0;f<n[0].length;f++){e[i][f]=0;for(var r=0;r<h[0].length;r++)e[i][f]+=h[i][r]*n[r][f]}}return e},u.transpose=function(h){for(var n=[],e=0;e<h[0].length;e++){n[e]=[];for(var i=0;i<h.length;i++)n[e][i]=h[i][e]}return n},u.multCons=function(h,n){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]*n;return e},u.minusOp=function(h,n){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]-n[i];return e},u.dotProduct=function(h,n){for(var e=0,i=0;i<h.length;i++)e+=h[i]*n[i];return e},u.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},u.normalize=function(h){for(var n=[],e=this.mag(h),i=0;i<h.length;i++)n[i]=h[i]/e;return n},u.multGamma=function(h){for(var n=[],e=0,i=0;i<h.length;i++)e+=h[i];e*=-1/h.length;for(var f=0;f<h.length;f++)n[f]=e+h[f];return n},u.multL=function(h,n,e){for(var i=[],f=[],r=[],d=0;d<n[0].length;d++){for(var t=0,s=0;s<n.length;s++)t+=-.5*n[s][d]*h[s];f[d]=t}for(var o=0;o<e.length;o++){for(var c=0,l=0;l<e.length;l++)c+=e[o][l]*f[l];r[o]=c}for(var T=0;T<n.length;T++){for(var g=0,v=0;v<n[0].length;v++)g+=n[T][v]*r[v];i[T]=g}return i},A.exports=u}),(function(A,b,L){var u=(function(){function i(f,r){for(var d=0;d<r.length;d++){var t=r[d];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,r,d){return r&&i(f.prototype,r),d&&i(f,d),f}})();function h(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var n=L(11),e=(function(){function i(f,r){h(this,i),(r!==null||r!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;f instanceof n?d=f.size():d=f.length,this._quicksort(f,0,d-1)}return u(i,[{key:"_quicksort",value:function(r,d,t){if(d<t){var s=this._partition(r,d,t);this._quicksort(r,d,s),this._quicksort(r,s+1,t)}}},{key:"_partition",value:function(r,d,t){for(var s=this._get(r,d),o=d,c=t;;){for(;this.compareFunction(s,this._get(r,c));)c--;for(;this.compareFunction(this._get(r,o),s);)o++;if(o<c)this._swap(r,o,c),o++,c--;else return c}}},{key:"_get",value:function(r,d){return r instanceof n?r.get_object_at(d):r[d]}},{key:"_set",value:function(r,d,t){r instanceof n?r.set_object_at(d,t):r[d]=t}},{key:"_swap",value:function(r,d,t){var s=this._get(r,d);this._set(r,d,this._get(r,t)),this._set(r,t,s)}},{key:"_defaultCompareFunction",value:function(r,d){return d>r}}]),i})();A.exports=e}),(function(A,b,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,n]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(r,d);t++){if(t<r){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=u.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<r,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}e[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<r))for(var v=t;v<this.m;v++)this.U[v][t]=h[v][t];if(t<d){e[t]=0;for(var N=t+1;N<this.n;N++)e[t]=u.hypot(e[t],e[N]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var P=t+1;P<this.n;P++)e[P]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var C=t+1;C<this.m;C++)i[C]=0;for(var U=t+1;U<this.n;U++)for(var k=t+1;k<this.m;k++)i[k]+=e[U]*h[k][U];for(var X=t+1;X<this.n;X++)for(var J=-e[X]/e[t+1],D=t+1;D<this.m;D++)h[D][X]+=J*i[D]}for(var it=t+1;it<this.n;it++)this.V[it][t]=e[it]}}var a=Math.min(this.n,this.m+1);r<this.n&&(this.s[r]=h[r][r]),this.m<a&&(this.s[a-1]=0),d+1<a&&(e[d]=h[d][a-1]),e[a-1]=0;{for(var E=r;E<n;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=r-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<n;y++){for(var R=0,w=m;w<this.m;w++)R+=this.U[w][m]*this.U[w][y];R=-R/this.U[m][m];for(var S=m;S<this.m;S++)this.U[S][y]+=R*this.U[S][m]}for(var V=m;V<this.m;V++)this.U[V][m]=-this.U[V][m];this.U[m][m]=1+this.U[m][m];for(var x=0;x<m-1;x++)this.U[x][m]=0}else{for(var q=0;q<this.m;q++)this.U[q][m]=0;this.U[m][m]=1}}for(var W=this.n-1;W>=0;W--){if((function(Tt,Ct){return Tt&&Ct})(W<d,e[W]!==0))for(var Y=W+1;Y<n;Y++){for(var rt=0,z=W+1;z<this.n;z++)rt+=this.V[z][W]*this.V[z][Y];rt=-rt/this.V[W+1][W];for(var M=W+1;M<this.n;M++)this.V[M][Y]+=rt*this.V[M][W]}for(var H=0;H<this.n;H++)this.V[H][W]=0;this.V[W][W]=1}for(var B=a-1,j=Math.pow(2,-52),lt=Math.pow(2,-966);a>0;){var Q=void 0,It=void 0;for(Q=a-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=lt+j*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===a-2)It=4;else{var Nt=void 0;for(Nt=a-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==a?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=lt+j*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===a-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var nt=e[a-2];e[a-2]=0;for(var ut=a-2;ut>=Q;ut--){var Et=u.hypot(this.s[ut],nt),At=this.s[ut]/Et,Ot=nt/Et;this.s[ut]=Et,ut!==Q&&(nt=-Ot*e[ut-1],e[ut-1]=At*e[ut-1]);for(var mt=0;mt<this.n;mt++)Et=At*this.V[mt][ut]+Ot*this.V[mt][a-1],this.V[mt][a-1]=-Ot*this.V[mt][ut]+At*this.V[mt][a-1],this.V[mt][ut]=Et}}break;case 2:{var Dt=e[Q-1];e[Q-1]=0;for(var Rt=Q;Rt<a;Rt++){var Ht=u.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][Q-1],this.U[Ft][Q-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][Q-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[a-1]),Math.abs(this.s[a-2])),Math.abs(e[a-2])),Math.abs(this.s[Q])),Math.abs(e[Q])),Wt=this.s[a-1]/Yt,F=this.s[a-2]/Yt,G=e[a-2]/Yt,$=this.s[Q]/Yt,K=e[Q]/Yt,Z=((F+Wt)*(F-Wt)+G*G)/2,at=Wt*G*(Wt*G),gt=0;(function(Tt,Ct){return Tt||Ct})(Z!==0,at!==0)&&(gt=Math.sqrt(Z*Z+at),Z<0&&(gt=-gt),gt=at/(Z+gt));for(var ot=($+Wt)*($-Wt)+gt,et=$*K,_=Q;_<a-1;_++){var dt=u.hypot(ot,et),wt=ot/dt,pt=et/dt;_!==Q&&(e[_-1]=dt),ot=wt*this.s[_]+pt*e[_],e[_]=wt*e[_]-pt*this.s[_],et=pt*this.s[_+1],this.s[_+1]=wt*this.s[_+1];for(var xt=0;xt<this.n;xt++)dt=wt*this.V[xt][_]+pt*this.V[xt][_+1],this.V[xt][_+1]=-pt*this.V[xt][_]+wt*this.V[xt][_+1],this.V[xt][_]=dt;if(dt=u.hypot(ot,et),wt=ot/dt,pt=et/dt,this.s[_]=dt,ot=wt*e[_]+pt*this.s[_+1],this.s[_+1]=-pt*e[_]+wt*this.s[_+1],et=pt*e[_+1],e[_+1]=wt*e[_+1],_<this.m-1)for(var ft=0;ft<this.m;ft++)dt=wt*this.U[ft][_]+pt*this.U[ft][_+1],this.U[ft][_+1]=-pt*this.U[ft][_]+wt*this.U[ft][_+1],this.U[ft][_]=dt}e[a-2]=ot}break;case 4:{if(this.s[Q]<=0){this.s[Q]=this.s[Q]<0?-this.s[Q]:0;for(var st=0;st<=B;st++)this.V[st][Q]=-this.V[st][Q]}for(;Q<B&&!(this.s[Q]>=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,Q<this.n-1)for(var ct=0;ct<this.n;ct++)Lt=this.V[ct][Q+1],this.V[ct][Q+1]=this.V[ct][Q],this.V[ct][Q]=Lt;if(Q<this.m-1)for(var ht=0;ht<this.m;ht++)Lt=this.U[ht][Q+1],this.U[ht][Q+1]=this.U[ht][Q],this.U[ht][Q]=Lt;Q++}a--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},u.hypot=function(h,n){var e=void 0;return Math.abs(h)>Math.abs(n)?(e=n/h,e=Math.abs(h)*Math.sqrt(1+e*e)):n!=0?(e=h/n,e=Math.abs(n)*Math.sqrt(1+e*e)):e=0,e},A.exports=u}),(function(A,b,L){var u=(function(){function e(i,f){for(var r=0;r<f.length;r++){var d=f[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,f,r){return f&&e(i.prototype,f),r&&e(i,r),i}})();function h(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}var n=(function(){function e(i,f){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=d,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return u(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[d-1]===this.sequence2[t-1]?s=this.grid[d-1][t-1]+this.match_score:s=this.grid[d-1][t-1]+this.mismatch_penalty;var o=this.grid[d-1][t]+this.gap_penalty,c=this.grid[d][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[d][t]=l[T[0]],this.tracebackGrid[d][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var r=f[0],d=this.tracebackGrid[r.pos[0]][r.pos[1]];d[0]&&f.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),d[1]&&f.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),d[2]&&f.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,r){for(var d=[],t=-1;(t=f.indexOf(r,t+1))!==-1;)d.push(t);return d}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e})();A.exports=n}),(function(A,b,L){var u=function(){};u.FDLayout=L(18),u.FDLayoutConstants=L(4),u.FDLayoutEdge=L(19),u.FDLayoutNode=L(20),u.DimensionD=L(21),u.HashMap=L(22),u.HashSet=L(23),u.IGeometry=L(8),u.IMath=L(9),u.Integer=L(10),u.Point=L(12),u.PointD=L(5),u.RandomSeed=L(16),u.RectangleD=L(13),u.Transform=L(17),u.UniqueIDGeneretor=L(14),u.Quicksort=L(25),u.LinkedList=L(11),u.LGraphObject=L(2),u.LGraph=L(6),u.LEdge=L(1),u.LGraphManager=L(7),u.LNode=L(3),u.Layout=L(15),u.LayoutConstants=L(0),u.NeedlemanWunsch=L(27),u.Matrix=L(24),u.SVD=L(26),A.exports=u}),(function(A,b,L){function u(){this.listeners=[]}var h=u.prototype;h.addListener=function(n,e){this.listeners.push({event:n,callback:e})},h.removeListener=function(n,e){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===n&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(n,e){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];n===f.event&&f.callback(e)}},A.exports=u})])})})(fe)),fe.exports}var Ze=le.exports,Ae;function qe(){return Ae||(Ae=1,(function(I,O){(function(b,L){I.exports=L(ke())})(Ze,function(A){return(()=>{var b={45:((n,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),n.exports=f}),806:((n,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var d in f)r[d]=f[d];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,n.exports=r}),767:((n,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];n.exports=r}),880:((n,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];n.exports=r}),578:((n,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];n.exports=r}),765:((n,e,i)=>{var f=i(551).FDLayout,r=i(578),d=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,v=i(551).PointD,N=i(551).DimensionD,P=i(551).Layout,C=i(551).Integer,U=i(551).IGeometry,k=i(551).LGraph,X=i(551).Transform,J=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var it in f)D[it]=f[it];D.prototype.newGraphManager=function(){var a=new r(this);return this.graphManager=a,a},D.prototype.newGraph=function(a){return new d(null,this.graphManager,a)},D.prototype.newNode=function(a){return new t(this.graphManager,a)},D.prototype.newEdge=function(a){return new s(null,null,a)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,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)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(R){return E.has(R)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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-Math.pow(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 a=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return a.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2: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()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),E={},p=0;p<a.length;p++){var m=a[p].rect,y=a[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var a=this.getAllNodes(),E,p=0;p<a.length;p++)E=a[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<a.length;p++)E=a[p],E.move()},D.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function M(H){for(var B=H.getChild().getNodes(),j,lt=0,Q=0;Q<B.length;Q++)j=B[Q],j.getChild()==null?a.fixedNodeSet.has(j.id)&&(lt+=100):lt+=M(j);return lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(B){a.fixedNodeSet.add(B.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var R=y(m);R>0&&(m.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var w=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){a.fixedNodesOnHorizontal.add(M),a.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var V=this.constraints.alignmentConstraint.vertical,p=0;p<V.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),V[p].forEach(function(H){w.set(H,"dummy"+p),a.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),a.fixedNodeSet.has(H)&&a.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){S.set(H,"dummy"+p),a.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),a.fixedNodeSet.has(H)&&a.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(M){var H,B,j;for(j=M.length-1;j>=2*M.length/3;j--)H=Math.floor(Math.random()*(j+1)),B=M[j],M[j]=M[H],M[H]=B;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var H=w.has(M.left)?w.get(M.left):M.left,B=w.has(M.right)?w.get(M.right):M.right;a.nodesInRelativeHorizontal.includes(H)||(a.nodesInRelativeHorizontal.push(H),a.nodeToRelativeConstraintMapHorizontal.set(H,[]),a.dummyToNodeForVerticalAlignment.has(H)?a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(H).getCenterX())),a.nodesInRelativeHorizontal.includes(B)||(a.nodesInRelativeHorizontal.push(B),a.nodeToRelativeConstraintMapHorizontal.set(B,[]),a.dummyToNodeForVerticalAlignment.has(B)?a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(B).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:M.gap}),a.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:M.gap})}else{var j=S.has(M.top)?S.get(M.top):M.top,lt=S.has(M.bottom)?S.get(M.bottom):M.bottom;a.nodesInRelativeVertical.includes(j)||(a.nodesInRelativeVertical.push(j),a.nodeToRelativeConstraintMapVertical.set(j,[]),a.dummyToNodeForHorizontalAlignment.has(j)?a.nodeToTempPositionMapVertical.set(j,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(j)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(j,a.idToNodeMap.get(j).getCenterY())),a.nodesInRelativeVertical.includes(lt)||(a.nodesInRelativeVertical.push(lt),a.nodeToRelativeConstraintMapVertical.set(lt,[]),a.dummyToNodeForHorizontalAlignment.has(lt)?a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(lt).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(j).push({bottom:lt,gap:M.gap}),a.nodeToRelativeConstraintMapVertical.get(lt).push({top:j,gap:M.gap})}});else{var q=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var H=w.has(M.left)?w.get(M.left):M.left,B=w.has(M.right)?w.get(M.right):M.right;q.has(H)?q.get(H).push(B):q.set(H,[B]),q.has(B)?q.get(B).push(H):q.set(B,[H])}else{var j=S.has(M.top)?S.get(M.top):M.top,lt=S.has(M.bottom)?S.get(M.bottom):M.bottom;W.has(j)?W.get(j).push(lt):W.set(j,[lt]),W.has(lt)?W.get(lt).push(j):W.set(lt,[j])}});var Y=function(H,B){var j=[],lt=[],Q=new J,It=new Set,Nt=0;return H.forEach(function(vt,nt){if(!It.has(nt)){j[Nt]=[],lt[Nt]=!1;var ut=nt;for(Q.push(ut),It.add(ut),j[Nt].push(ut);Q.length!=0;){ut=Q.shift(),B.has(ut)&&(lt[Nt]=!0);var Et=H.get(ut);Et.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),j[Nt].push(At))})}Nt++}}),{components:j,isFixed:lt}},rt=Y(q,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var z=Y(W,a.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var M=a.idToNodeMap.get(z.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var R=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,p=0;p<w.length;p++){for(var S=0,y=0;y<w[p].length;y++){if(this.fixedNodeSet.has(w[p][y])){S=0;break}S+=this.idToNodeMap.get(w[p][y]).displacementY}for(var V=S/w[p].length,y=0;y<w[p].length;y++)this.idToNodeMap.get(w[p][y]).displacementY=V}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(z){if(!a.fixedNodesOnHorizontal.has(z)){var M=0;a.dummyToNodeForVerticalAlignment.has(z)?M=a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(z)[0]).displacementX:M=a.idToNodeMap.get(z).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(z).forEach(function(H){if(H.right){var B=a.nodeToTempPositionMapHorizontal.get(H.right)-a.nodeToTempPositionMapHorizontal.get(z)-M;B<H.gap&&(M-=H.gap-B)}else{var B=a.nodeToTempPositionMapHorizontal.get(z)-a.nodeToTempPositionMapHorizontal.get(H.left)+M;B<H.gap&&(M+=H.gap-B)}}),a.nodeToTempPositionMapHorizontal.set(z,a.nodeToTempPositionMapHorizontal.get(z)+M),a.dummyToNodeForVerticalAlignment.has(z)?a.dummyToNodeForVerticalAlignment.get(z).forEach(function(H){a.idToNodeMap.get(H).displacementX=M}):a.idToNodeMap.get(z).displacementX=M}}),this.nodesInRelativeVertical.forEach(function(z){if(!a.fixedNodesOnHorizontal.has(z)){var M=0;a.dummyToNodeForHorizontalAlignment.has(z)?M=a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(z)[0]).displacementY:M=a.idToNodeMap.get(z).displacementY,a.nodeToRelativeConstraintMapVertical.get(z).forEach(function(H){if(H.bottom){var B=a.nodeToTempPositionMapVertical.get(H.bottom)-a.nodeToTempPositionMapVertical.get(z)-M;B<H.gap&&(M-=H.gap-B)}else{var B=a.nodeToTempPositionMapVertical.get(z)-a.nodeToTempPositionMapVertical.get(H.top)+M;B<H.gap&&(M+=H.gap-B)}}),a.nodeToTempPositionMapVertical.set(z,a.nodeToTempPositionMapVertical.get(z)+M),a.dummyToNodeForHorizontalAlignment.has(z)?a.dummyToNodeForHorizontalAlignment.get(z).forEach(function(H){a.idToNodeMap.get(H).displacementY=M}):a.idToNodeMap.get(z).displacementY=M}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){a.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var q=0,W=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var Y=this.dummyToNodeForVerticalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementX,W+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementX,W++;for(var rt=q/W,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){a.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(B){a.idToNodeMap.get(B).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var q=0,W=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var Y=this.dummyToNodeForHorizontalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementY,W+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementY,W++;for(var rt=q/W,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(Q){a.idToNodeMap.get(Q).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(a=a.concat(E.getNodes()));return a},D.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<a.length;p++){var m=a[p];if(!E.has(m)){var y=m.getSource(),R=m.getTarget();if(y==R)m.getBendpoints().push(new v),m.getBendpoints().push(new v),this.createDummyNodesForBendpoints(m),E.add(m);else{var w=[];if(w=w.concat(y.getEdgeListToNode(R)),w=w.concat(R.getEdgeListToNode(y)),!E.has(w[0])){if(w.length>1){var S;for(S=0;S<w.length;S++){var V=w[S];V.getBendpoints().push(new v),this.createDummyNodesForBendpoints(V)}}w.forEach(function(x){E.add(x)})}}}if(E.size==a.length)break}},D.prototype.positionNodesRadially=function(a){for(var E=new g(0,0),p=Math.ceil(Math.sqrt(a.length)),m=0,y=0,R=0,w=new v(0,0),S=0;S<a.length;S++){S%p==0&&(R=0,y=m,S!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var V=a[S],x=P.findCenterOfTree(V);E.x=R,E.y=y,w=D.radialLayout(V,x,E),w.y>m&&(m=Math.floor(w.y)),R=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(a,E,p){var m=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(E,null,0,359,0,m);var y=k.calculateBounds(a),R=new X;R.setDeviceOrgX(y.getMinX()),R.setDeviceOrgY(y.getMinY()),R.setWorldOrgX(p.x),R.setWorldOrgY(p.y);for(var w=0;w<a.length;w++){var S=a[w];S.transform(R)}var V=new v(y.getMaxX(),y.getMaxY());return R.inverseTransformPoint(V)},D.branchRadialLayout=function(a,E,p,m,y,R){var w=(m-p+1)/2;w<0&&(w+=180);var S=(w+p)%360,V=S*U.TWO_PI/360,x=y*Math.cos(V),q=y*Math.sin(V);a.setCenter(x,q);var W=[];W=W.concat(a.getEdges());var Y=W.length;E!=null&&Y--;for(var rt=0,z=W.length,M,H=a.getEdgesBetween(E);H.length>1;){var B=H[0];H.splice(0,1);var j=W.indexOf(B);j>=0&&W.splice(j,1),z--,Y--}E!=null?M=(W.indexOf(H[0])+1)%z:M=0;for(var lt=Math.abs(m-p)/Y,Q=M;rt!=Y;Q=++Q%z){var It=W[Q].getOtherEnd(a);if(It!=E){var Nt=(p+rt*lt)%360,vt=(Nt+lt)%360;D.branchRadialLayout(It,a,Nt,vt,y+R,R),rt++}}},D.maxDiagonalInTree=function(a){for(var E=C.MIN_VALUE,p=0;p<a.length;p++){var m=a[p],y=m.getDiagonal();y>E&&(E=y)}return E},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var a=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var R=m[y],w=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(w.id==null||!this.getToBeTiled(w))&&p.push(R)}for(var y=0;y<p.length;y++){var R=p[y],S=R.getParent().id;typeof E[S]>"u"&&(E[S]=[]),E[S]=E[S].concat(R)}Object.keys(E).forEach(function(V){if(E[V].length>1){var x="DummyCompound_"+V;a.memberGroups[x]=E[V];var q=E[V][0].getParent(),W=new t(a.graphManager);W.id=x,W.paddingLeft=q.paddingLeft||0,W.paddingRight=q.paddingRight||0,W.paddingBottom=q.paddingBottom||0,W.paddingTop=q.paddingTop||0,a.idToDummyNode[x]=W;var Y=a.getGraphManager().add(a.newGraph(),W),rt=q.getChild();rt.add(W);for(var z=0;z<E[V].length;z++){var M=E[V][z];rt.remove(M),Y.add(M)}}})},D.prototype.clearCompounds=function(){var a={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],a[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,E)},D.prototype.clearZeroDegreeMembers=function(){var a=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=a.idToDummyNode[p];if(E[p]=a.tileNodes(a.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,R=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(R+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>R?(m.rect.y-=(m.labelHeight-R)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-R)/2):m.labelPosVertical=="bottom"&&m.setHeight(R+m.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var E=this.compoundOrder[a],p=E.id,m=E.paddingLeft,y=E.paddingTop,R=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,R,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var a=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=a.idToDummyNode[p],y=m.paddingLeft,R=m.paddingTop,w=m.labelMarginLeft,S=m.labelMarginTop;a.adjustLocations(E[p],m.rect.x,m.rect.y,y,R,w,S)})},D.prototype.getToBeTiled=function(a){var E=a.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=a.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var R=m[y];if(this.getNodeDegree(R)>0)return this.toBeTiled[E]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},D.prototype.getNodeDegree=function(a){a.id;for(var E=a.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(a){var E=this.getNodeDegree(a);if(a.getChild()==null)return E;for(var p=a.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(a){for(var E=0;E<a.length;E++){var p=a[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(a,E,p,m,y,R,w){E+=m+R,p+=y+w;for(var S=E,V=0;V<a.rows.length;V++){var x=a.rows[V];E=S;for(var q=0,W=0;W<x.length;W++){var Y=x[W];Y.rect.x=E,Y.rect.y=p,E+=Y.rect.width+a.horizontalPadding,Y.rect.height>q&&(q=Y.rect.height)}p+=q+a.verticalPadding}},D.prototype.tileCompoundMembers=function(a,E){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(a[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var R=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(R+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>R?(y.rect.x-=(y.labelWidth-R)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-R)/2):y.labelPosHorizontal=="right"&&y.setWidth(R+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(a,E){var p=this.tileNodesByFavoringDim(a,E,!0),m=this.tileNodesByFavoringDim(a,E,!1),y=this.getOrgRatio(p),R=this.getOrgRatio(m),w;return R<y?w=m:w=p,w},D.prototype.getOrgRatio=function(a){var E=a.width,p=a.height,m=E/p;return m<1&&(m=1/m),m},D.prototype.calcIdealRowWidth=function(a,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=a.length,R=0,w=0,S=0;a.forEach(function(z){R+=z.getWidth(),w+=z.getHeight(),z.getWidth()>S&&(S=z.getWidth())});var V=R/y,x=w/y,q=Math.pow(p-m,2)+4*(V+m)*(x+p)*y,W=(m-p+Math.sqrt(q))/(2*(V+m)),Y;E?(Y=Math.ceil(W),Y==W&&Y++):Y=Math.floor(W);var rt=Y*(V+m)-m;return S>rt&&(rt=S),rt+=m*2,rt},D.prototype.tileNodesByFavoringDim=function(a,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,R=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};R&&(w.idealRowWidth=this.calcIdealRowWidth(a,p));var S=function(M){return M.rect.width*M.rect.height},V=function(M,H){return S(H)-S(M)};a.sort(function(z,M){var H=V;return w.idealRowWidth?(H=R,H(z.id,M.id)):H(z,M)});for(var x=0,q=0,W=0;W<a.length;W++){var Y=a[W];x+=Y.getCenterX(),q+=Y.getCenterY()}w.centerX=x/a.length,w.centerY=q/a.length;for(var W=0;W<a.length;W++){var Y=a[W];if(w.rows.length==0)this.insertNodeToRow(w,Y,0,E);else if(this.canAddHorizontal(w,Y.rect.width,Y.rect.height)){var rt=w.rows.length-1;w.idealRowWidth||(rt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,Y,rt,E)}else this.insertNodeToRow(w,Y,w.rows.length,E);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(a,E,p,m){var y=m;if(p==a.rows.length){var R=[];a.rows.push(R),a.rowWidth.push(y),a.rowHeight.push(0)}var w=a.rowWidth[p]+E.rect.width;a.rows[p].length>0&&(w+=a.horizontalPadding),a.rowWidth[p]=w,a.width<w&&(a.width=w);var S=E.rect.height;p>0&&(S+=a.verticalPadding);var V=0;S>a.rowHeight[p]&&(V=a.rowHeight[p],a.rowHeight[p]=S,V=a.rowHeight[p]-V),a.height+=V,a.rows[p].push(E)},D.prototype.getShortestRowIndex=function(a){for(var E=-1,p=Number.MAX_VALUE,m=0;m<a.rows.length;m++)a.rowWidth[m]<p&&(E=m,p=a.rowWidth[m]);return E},D.prototype.getLongestRowIndex=function(a){for(var E=-1,p=Number.MIN_VALUE,m=0;m<a.rows.length;m++)a.rowWidth[m]>p&&(E=m,p=a.rowWidth[m]);return E},D.prototype.canAddHorizontal=function(a,E,p){if(a.idealRowWidth){var m=a.rows.length-1,y=a.rowWidth[m];return y+E+a.horizontalPadding<=a.idealRowWidth}var R=this.getShortestRowIndex(a);if(R<0)return!0;var w=a.rowWidth[R];if(w+a.horizontalPadding+E<=a.width)return!0;var S=0;a.rowHeight[R]<p&&R>0&&(S=p+a.verticalPadding-a.rowHeight[R]);var V;a.width-w>=E+a.horizontalPadding?V=(a.height+S)/(w+E+a.horizontalPadding):V=(a.height+S)/a.width,S=p+a.verticalPadding;var x;return a.width<E?x=(a.height+S)/E:x=(a.height+S)/a.width,x<1&&(x=1/x),V<1&&(V=1/V),V<x},D.prototype.shiftToLastRow=function(a){var E=this.getLongestRowIndex(a),p=a.rowWidth.length-1,m=a.rows[E],y=m[m.length-1],R=y.width+a.horizontalPadding;if(a.width-a.rowWidth[p]>R&&E!=p){m.splice(-1,1),a.rows[p].push(y),a.rowWidth[E]=a.rowWidth[E]-R,a.rowWidth[p]=a.rowWidth[p]+R,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var w=Number.MIN_VALUE,S=0;S<m.length;S++)m[S].height>w&&(w=m[S].height);E>0&&(w+=a.verticalPadding);var V=a.rowHeight[E]+a.rowHeight[p];a.rowHeight[E]=w,a.rowHeight[p]<y.height+a.verticalPadding&&(a.rowHeight[p]=y.height+a.verticalPadding);var x=a.rowHeight[E]+a.rowHeight[p];a.height+=x-V,this.shiftToLastRow(a)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var a=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var R=0;R<m.length;R++)if(p=m[R],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var w=p.getEdges()[0].getOtherEnd(p),S=new N(p.getCenterX()-w.getCenterX(),p.getCenterY()-w.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var V=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(V.push(y[x]),y[x][0].getOwner().remove(y[x][0]));a.push(V),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},D.prototype.growTree=function(a){for(var E=a.length,p=a[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(a){var E,p,m=a[0];if(m==a[1].source?p=a[1].target:p=a[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+a[3].getWidth(),p.getCenterY()+a[3].getHeight());else{var y=p.startX,R=p.finishX,w=p.startY,S=p.finishY,V=0,x=0,q=0,W=0,Y=[V,q,x,W];if(w>0)for(var rt=y;rt<=R;rt++)Y[0]+=this.grid[rt][w-1].length+this.grid[rt][w].length-1;if(R<this.grid.length-1)for(var rt=w;rt<=S;rt++)Y[1]+=this.grid[R+1][rt].length+this.grid[R][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=R;rt++)Y[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=w;rt<=S;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var z=C.MAX_VALUE,M,H,B=0;B<Y.length;B++)Y[B]<z?(z=Y[B],M=1,H=B):Y[B]==z&&M++;if(M==3&&z==0)Y[0]==0&&Y[1]==0&&Y[2]==0?E=1:Y[0]==0&&Y[1]==0&&Y[3]==0?E=0:Y[0]==0&&Y[2]==0&&Y[3]==0?E=3:Y[1]==0&&Y[2]==0&&Y[3]==0&&(E=2);else if(M==2&&z==0){var j=Math.floor(Math.random()*2);Y[0]==0&&Y[1]==0?j==0?E=0:E=1:Y[0]==0&&Y[2]==0?j==0?E=0:E=2:Y[0]==0&&Y[3]==0?j==0?E=0:E=3:Y[1]==0&&Y[2]==0?j==0?E=1:E=2:Y[1]==0&&Y[3]==0?j==0?E=1:E=3:j==0?E=2:E=3}else if(M==4&&z==0){var j=Math.floor(Math.random()*4);E=j}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},n.exports=D}),991:((n,e,i)=>{var f=i(551).FDLayoutNode,r=i(551).IMath;function d(s,o,c,l){f.call(this,s,o,c,l)}d.prototype=Object.create(f.prototype);for(var t in f)d[t]=f[t];d.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},d.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},d.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.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},d.prototype.setPred1=function(s){this.pred1=s},d.prototype.getPred1=function(){return pred1},d.prototype.getPred2=function(){return pred2},d.prototype.setNext=function(s){this.next=s},d.prototype.getNext=function(){return next},d.prototype.setProcessed=function(s){this.processed=s},d.prototype.isProcessed=function(){return processed},n.exports=d}),902:((n,e,i)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var r=i(806),d=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,v=[],N=[],P=c.getAllNodes(),C=0,U=0;U<P.length;U++){var k=P[U];k.getChild()==null&&(g.set(k.id,C++),v.push(k.getCenterX()),N.push(k.getCenterY()),T.set(k.id,k))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=r.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=r.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var X=function(G,$){return{x:G.x-$.x,y:G.y-$.y}},J=function(G){var $=0,K=0;return G.forEach(function(Z){$+=v[g.get(Z)],K+=N[g.get(Z)]}),{x:$/G.size,y:K/G.size}},D=function(G,$,K,Z,at){function gt(ft,st){var Lt=new Set(ft),ct=!0,ht=!1,Xt=void 0;try{for(var Tt=st[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){ht=!0,Xt=bt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}return Lt}var ot=new Map;G.forEach(function(ft,st){ot.set(st,0)}),G.forEach(function(ft,st){ft.forEach(function(Lt){ot.set(Lt.id,ot.get(Lt.id)+1)})});var et=new Map,_=new Map,dt=new d;ot.forEach(function(ft,st){ft==0?(dt.push(st),K||($=="horizontal"?et.set(st,g.has(st)?v[g.get(st)]:Z.get(st)):et.set(st,g.has(st)?N[g.get(st)]:Z.get(st)))):et.set(st,Number.NEGATIVE_INFINITY),K&&_.set(st,new Set([st]))}),K&&at.forEach(function(ft){var st=[];if(ft.forEach(function(ht){K.has(ht)&&st.push(ht)}),st.length>0){var Lt=0;st.forEach(function(ht){$=="horizontal"?(et.set(ht,g.has(ht)?v[g.get(ht)]:Z.get(ht)),Lt+=et.get(ht)):(et.set(ht,g.has(ht)?N[g.get(ht)]:Z.get(ht)),Lt+=et.get(ht))}),Lt=Lt/st.length,ft.forEach(function(ht){K.has(ht)||et.set(ht,Lt)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=g.has(ht)?v[g.get(ht)]:Z.get(ht):ct+=g.has(ht)?N[g.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){et.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Lt=G.get(st);Lt.forEach(function(ct){if(et.get(ct.id)<et.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if($=="horizontal"?ht=g.has(ct.id)?v[g.get(ct.id)]:Z.get(ct.id):ht=g.has(ct.id)?N[g.get(ct.id)]:Z.get(ct.id),et.set(ct.id,ht),ht<et.get(st)+ct.gap){var Xt=et.get(st)+ct.gap-ht;_.get(st).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ct.id,et.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&dt.push(ct.id),K&&_.set(ct.id,gt(_.get(st),_.get(ct.id)))})};dt.length!=0;)wt();if(K){var pt=new Set;G.forEach(function(ft,st){ft.length==0&&pt.add(st)});var xt=[];_.forEach(function(ft,st){if(pt.has(st)){var Lt=!1,ct=!0,ht=!1,Xt=void 0;try{for(var Tt=ft[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){ht=!0,Xt=St}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(ft))[0])&&(bt=!0,zt=kt)}),bt?ft.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(ft))}}}),xt.forEach(function(ft,st){var Lt=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=ft[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;$=="horizontal"?kt=g.has(St)?v[g.get(St)]:Z.get(St):kt=g.has(St)?N[g.get(St)]:Z.get(St);var Kt=et.get(St);kt<Lt&&(Lt=kt),kt>ht&&(ht=kt),Kt<ct&&(ct=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var ce=(Lt+ht)/2-(ct+Xt)/2,Qt=!0,_t=!1,jt=void 0;try{for(var Jt=ft[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+ce)}}catch(ee){_t=!0,jt=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(_t)throw jt}}})}return et},it=function(G){var $=0,K=0,Z=0,at=0;if(G.forEach(function(_){_.left?v[g.get(_.left)]-v[g.get(_.right)]>=0?$++:K++:N[g.get(_.top)]-N[g.get(_.bottom)]>=0?Z++:at++}),$>K&&Z>at)for(var gt=0;gt<g.size;gt++)v[gt]=-1*v[gt],N[gt]=-1*N[gt];else if($>K)for(var ot=0;ot<g.size;ot++)v[ot]=-1*v[ot];else if(Z>at)for(var et=0;et<g.size;et++)N[et]=-1*N[et]},a=function(G){var $=[],K=new d,Z=new Set,at=0;return G.forEach(function(gt,ot){if(!Z.has(ot)){$[at]=[];var et=ot;for(K.push(et),Z.add(et),$[at].push(et);K.length!=0;){et=K.shift();var _=G.get(et);_.forEach(function(dt){Z.has(dt.id)||(K.push(dt.id),Z.add(dt.id),$[at].push(dt.id))})}at++}}),$},E=function(G){var $=new Map;return G.forEach(function(K,Z){$.set(Z,[])}),G.forEach(function(K,Z){K.forEach(function(at){$.get(Z).push(at),$.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),$},p=function(G){var $=new Map;return G.forEach(function(K,Z){$.set(Z,[])}),G.forEach(function(K,Z){K.forEach(function(at){$.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),$},m=[],y=[],R=!1,w=!1,S=new Set,V=new Map,x=new Map,q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(F){S.add(F.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(F){F.left?(V.has(F.left)?V.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):V.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),V.has(F.right)||V.set(F.right,[])):(V.has(F.top)?V.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):V.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),V.has(F.bottom)||V.set(F.bottom,[]))}),x=E(V),q=a(x)),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(F,G){m[G]=[F.position.x,F.position.y],y[G]=[v[g.get(F.nodeId)],N[g.get(F.nodeId)]]}),R=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var G=l.alignmentConstraint.vertical,$=function(et){var _=new Set;G[et].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return S.has(pt)})),wt=void 0;dt.size>0?wt=v[g.get(dt.values().next().value)]:wt=J(_).x,G[et].forEach(function(pt){m[F]=[wt,N[g.get(pt)]],y[F]=[v[g.get(pt)],N[g.get(pt)]],F++})},K=0;K<G.length;K++)$(K);R=!0}if(l.alignmentConstraint.horizontal){for(var Z=l.alignmentConstraint.horizontal,at=function(et){var _=new Set;Z[et].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return S.has(pt)})),wt=void 0;dt.size>0?wt=v[g.get(dt.values().next().value)]:wt=J(_).y,Z[et].forEach(function(pt){m[F]=[v[g.get(pt)],wt],y[F]=[v[g.get(pt)],N[g.get(pt)]],F++})},gt=0;gt<Z.length;gt++)at(gt);R=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var W=0,Y=0,rt=0;rt<q.length;rt++)q[rt].length>W&&(W=q[rt].length,Y=rt);if(W<x.size/2)it(l.relativePlacementConstraint),R=!1,w=!1;else{var z=new Map,M=new Map,H=[];q[Y].forEach(function(F){V.get(F).forEach(function(G){G.direction=="horizontal"?(z.has(F)?z.get(F).push(G):z.set(F,[G]),z.has(G.id)||z.set(G.id,[]),H.push({left:F,right:G.id})):(M.has(F)?M.get(F).push(G):M.set(F,[G]),M.has(G.id)||M.set(G.id,[]),H.push({top:F,bottom:G.id}))})}),it(H),w=!1;var B=D(z,"horizontal"),j=D(M,"vertical");q[Y].forEach(function(F,G){y[G]=[v[g.get(F)],N[g.get(F)]],m[G]=[],B.has(F)?m[G][0]=B.get(F):m[G][0]=v[g.get(F)],j.has(F)?m[G][1]=j.get(F):m[G][1]=N[g.get(F)]}),R=!0}}if(R){for(var lt=void 0,Q=t.transpose(m),It=t.transpose(y),Nt=0;Nt<Q.length;Nt++)Q[Nt]=t.multGamma(Q[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(Q,t.transpose(It)),nt=s.svd(vt);lt=t.multMat(nt.V,t.transpose(nt.U));for(var ut=0;ut<g.size;ut++){var Et=[v[ut],N[ut]],At=[lt[0][0],lt[1][0]],Ot=[lt[0][1],lt[1][1]];v[ut]=t.dotProduct(Et,At),N[ut]=t.dotProduct(Et,Ot)}w&&it(l.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,G){var $={x:v[g.get(F.nodeId)],y:N[g.get(F.nodeId)]},K=F.position,Z=X(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,v.forEach(function(F,G){v[G]+=mt.x}),N.forEach(function(F,G){N[G]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){v[g.get(F.nodeId)]=F.position.x,N[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(G){var $=new Set;Dt[G].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=v[g.get(K.values().next().value)]:Z=J($).x,$.forEach(function(at){S.has(at)||(v[g.get(at)]=Z)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(G){var $=new Set;Ut[G].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=N[g.get(K.values().next().value)]:Z=J($).y,$.forEach(function(at){S.has(at)||(N[g.get(at)]=Z)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var F=new Map,G=new Map,$=new Map,K=new Map,Z=new Map,at=new Map,gt=new Set,ot=new Set;if(S.forEach(function(Gt){gt.add(Gt),ot.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,_=function(yt){$.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),$.get("dummy"+yt).push(Mt),S.has(Mt)&>.add("dummy"+yt)}),Z.set("dummy"+yt,v[g.get(et[yt][0])])},dt=0;dt<et.length;dt++)_(dt);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){G.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),S.has(Mt)&&ot.add("dummy"+yt)}),at.set("dummy"+yt,N[g.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var ft=new Map,st=new Map,Lt=function(yt){V.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ft.has(Zt)?ft.get(Zt).push($t):ft.set(Zt,[$t]),ft.has($t.id)||ft.set($t.id,[])):(Zt=G.get(yt)?G.get(yt):yt,G.get(Mt.id)?$t={id:G.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,st.has(Zt)?st.get(Zt).push($t):st.set(Zt,[$t]),st.has($t.id)||st.set($t.id,[]))})},ct=!0,ht=!1,Xt=void 0;try{for(var Tt=V.keys()[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){ht=!0,Xt=Gt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}var bt=E(ft),zt=E(st),St=a(bt),kt=a(zt),Kt=p(ft),ce=p(st),Qt=[],_t=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){_t[yt]=[],Gt.forEach(function(Mt){ce.get(Mt).length==0&&_t[yt].push(Mt)})});var jt=D(ft,"horizontal",gt,Z,Qt),Jt=D(st,"vertical",ot,at,_t),oe=function(yt){$.get(yt)?$.get(yt).forEach(function(Mt){v[g.get(Mt)]=jt.get(yt)}):v[g.get(yt)]=jt.get(yt)},te=!0,ee=!1,me=void 0;try{for(var ge=jt.keys()[Symbol.iterator](),Ee;!(te=(Ee=ge.next()).done);te=!0){var ue=Ee.value;oe(ue)}}catch(Gt){ee=!0,me=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw me}}var Ve=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){N[g.get(Mt)]=Jt.get(yt)}):N[g.get(yt)]=Jt.get(yt)},de=!0,Te=!1,Ne=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),Le;!(de=(Le=ve.next()).done);de=!0){var ue=Le.value;Ve(ue)}}catch(Gt){Te=!0,Ne=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Te)throw Ne}}})()}for(var Yt=0;Yt<P.length;Yt++){var Wt=P[Yt];Wt.getChild()==null&&Wt.setCenter(v[g.get(Wt.id)],N[g.get(Wt.id)])}},n.exports=o}),551:(n=>{n.exports=A})},L={};function u(n){var e=L[n];if(e!==void 0)return e.exports;var i=L[n]={exports:{}};return b[n](i,i.exports,u),i.exports}var h=u(45);return h})()})})(le)),le.exports}var Qe=he.exports,we;function Je(){return we||(we=1,(function(I,O){(function(b,L){I.exports=L(qe())})(Qe,function(A){return(()=>{var b={658:(n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r<i;r++)f[r-1]=arguments[r];return f.forEach(function(d){Object.keys(d).forEach(function(t){return e[t]=d[t]})}),e}}),548:((n,e,i)=>{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var v=s[Symbol.iterator](),N;!(l=(N=v.next()).done)&&(c.push(N.value),!(o&&c.length===o));l=!0);}catch(P){T=!0,g=P}finally{try{!l&&v.return&&v.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,d={};d.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},d.connectComponents=function(t,s,o,c){var l=new r,T=new Set,g=[],v=void 0,N=void 0,P=void 0,C=!1,U=1,k=[],X=[],J=function(){var it=t.collection();X.push(it);var a=o[0],E=t.collection();E.merge(a).merge(a.descendants().intersection(s)),g.push(a),E.forEach(function(y){l.push(y),T.add(y),it.merge(y)});for(var p=function(){a=l.shift();var R=t.collection();a.neighborhood().nodes().forEach(function(x){s.intersection(a.edgesWith(x)).length>0&&R.merge(x)});for(var w=0;w<R.length;w++){var S=R[w];if(v=o.intersection(S.union(S.ancestors())),v!=null&&!T.has(v[0])){var V=v.union(v.descendants());V.forEach(function(x){l.push(x),T.add(x),it.merge(x),o.has(x)&&g.push(x)})}}};l.length!=0;)p();if(it.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(R){it.has(R.source())&&it.has(R.target())&&it.merge(R)})}),g.length==o.length&&(C=!0),!C||C&&U>1){N=g[0],P=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<P&&(P=y.connectedEdges().length,N=y)}),k.push(N.id());var m=t.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],o=o.difference(m),U++}};do J();while(!C);return c&&k.length>0&&c.set("dummy"+(c.size+1),k),X},d.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,N=!1,P=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),U;!(v=(U=C.next()).done);v=!0){var k=U.value,X=f(k,2),J=X[0],D=X[1],it=o.cy.getElementById(J);if(it){var a=it.boundingBox(),E=s.xCoords[D]-a.w/2,p=s.xCoords[D]+a.w/2,m=s.yCoords[D]-a.h/2,y=s.yCoords[D]+a.h/2;E<c&&(c=E),p>l&&(l=p),m<T&&(T=m),y>g&&(g=y)}}}catch(x){N=!0,P=x}finally{try{!v&&C.return&&C.return()}finally{if(N)throw P}}var R=t.x-(l+c)/2,w=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+R}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],W=q.getRect().x,Y=q.getRect().x+q.getRect().width,rt=q.getRect().y,z=q.getRect().y+q.getRect().height;W<c&&(c=W),Y>l&&(l=Y),rt<T&&(T=rt),z>g&&(g=z)});var S=t.x-(l+c)/2,V=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+S,q.getCenterY()+V)})}}},d.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,N=void 0,P=void 0,C=void 0,U=void 0,k=t.descendants().not(":parent"),X=k.length,J=0;J<X;J++){var D=k[J];N=s[c.get(D.id())]-D.width()/2,P=s[c.get(D.id())]+D.width()/2,C=o[c.get(D.id())]-D.height()/2,U=o[c.get(D.id())]+D.height()/2,l>N&&(l=N),T<P&&(T=P),g>C&&(g=C),v<U&&(v=U)}var it={};return it.topLeftX=l,it.topLeftY=g,it.width=T-l,it.height=v-g,it},d.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},n.exports=d}),816:((n,e,i)=>{var f=i(548),r=i(140).CoSELayout,d=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(v,N){var P=v.cy,C=v.eles,U=C.nodes(),k=C.edges(),X=void 0,J=void 0,D=void 0,it={};v.randomize&&(X=N.nodeIndexes,J=N.xCoords,D=N.yCoords);var a=function(x){return typeof x=="function"},E=function(x,q){return a(x)?x(q):x},p=f.calcParentsWithoutChildren(P,C),m=function V(x,q,W,Y){for(var rt=q.length,z=0;z<rt;z++){var M=q[z],H=null;M.intersection(p).length==0&&(H=M.children());var B=void 0,j=M.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(Y.randomize)if(!M.isParent())B=x.add(new d(W.graphManager,new t(J[X.get(M.id())]-j.w/2,D[X.get(M.id())]-j.h/2),new s(parseFloat(j.w),parseFloat(j.h))));else{var lt=f.calcBoundingBox(M,J,D,X);M.intersection(p).length==0?B=x.add(new d(W.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(lt.width,lt.height))):B=x.add(new d(W.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(parseFloat(j.w),parseFloat(j.h))))}else B=x.add(new d(W.graphManager,new t(M.position("x")-j.w/2,M.position("y")-j.h/2),new s(parseFloat(j.w),parseFloat(j.h))));else B=x.add(new d(this.graphManager));if(B.id=M.data("id"),B.nodeRepulsion=E(Y.nodeRepulsion,M),B.paddingLeft=parseInt(M.css("padding")),B.paddingTop=parseInt(M.css("padding")),B.paddingRight=parseInt(M.css("padding")),B.paddingBottom=parseInt(M.css("padding")),Y.nodeDimensionsIncludeLabels&&(B.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,B.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,B.labelPosVertical=M.css("text-valign"),B.labelPosHorizontal=M.css("text-halign")),it[M.data("id")]=B,isNaN(B.rect.x)&&(B.rect.x=0),isNaN(B.rect.y)&&(B.rect.y=0),H!=null&&H.length>0){var Q=void 0;Q=W.getGraphManager().add(W.newGraph(),B),V(Q,H,W,Y)}}},y=function(x,q,W){for(var Y=0,rt=0,z=0;z<W.length;z++){var M=W[z],H=it[M.data("source")],B=it[M.data("target")];if(H&&B&&H!==B&&H.getEdgesBetween(B).length==0){var j=q.add(x.newEdge(),H,B);j.id=M.id(),j.idealLength=E(v.idealEdgeLength,M),j.edgeElasticity=E(v.edgeElasticity,M),Y+=j.idealLength,rt++}}v.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:a(v.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},R=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};v.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,l.TILE=v.tile,l.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),v.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),v.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new r,S=w.newGraphManager();return m(S.addRoot(),f.getTopMostNodes(U),w,v),y(w,S,k),R(w,v),w.runLayout(),it};n.exports={coseLayout:T}}),212:((n,e,i)=>{var f=(function(){function v(N,P){for(var C=0;C<P.length;C++){var U=P[C];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(N,U.key,U)}}return function(N,P,C){return P&&v(N.prototype,P),C&&v(N,C),N}})();function r(v,N){if(!(v instanceof N))throw new TypeError("Cannot call a class as a function")}var d=i(658),t=i(548),s=i(657),o=s.spectralLayout,c=i(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(N){return 4500},idealEdgeLength:function(N){return 50},edgeElasticity:function(N){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function v(N){r(this,v),this.options=d({},T,N)}return f(v,[{key:"run",value:function(){var P=this,C=this.options,U=C.cy,k=C.eles,X=[],J=[],D=void 0,it=[];C.fixedNodeConstraint&&(!Array.isArray(C.fixedNodeConstraint)||C.fixedNodeConstraint.length==0)&&(C.fixedNodeConstraint=void 0),C.alignmentConstraint&&(C.alignmentConstraint.vertical&&(!Array.isArray(C.alignmentConstraint.vertical)||C.alignmentConstraint.vertical.length==0)&&(C.alignmentConstraint.vertical=void 0),C.alignmentConstraint.horizontal&&(!Array.isArray(C.alignmentConstraint.horizontal)||C.alignmentConstraint.horizontal.length==0)&&(C.alignmentConstraint.horizontal=void 0)),C.relativePlacementConstraint&&(!Array.isArray(C.relativePlacementConstraint)||C.relativePlacementConstraint.length==0)&&(C.relativePlacementConstraint=void 0);var a=C.fixedNodeConstraint||C.alignmentConstraint||C.relativePlacementConstraint;a&&(C.tile=!1,C.packComponents=!1);var E=void 0,p=!1;if(U.layoutUtilities&&C.packComponents&&(E=U.layoutUtilities("get"),E||(E=U.layoutUtilities()),p=!0),k.nodes().length>0)if(p){var R=t.getTopMostNodes(C.eles.nodes());if(D=t.connectComponents(U,C.eles,R),D.forEach(function(vt){var nt=vt.boundingBox();it.push({x:nt.x1+nt.w/2,y:nt.y1+nt.h/2})}),C.randomize&&D.forEach(function(vt){C.eles=vt,X.push(o(C))}),C.quality=="default"||C.quality=="proof"){var w=U.collection();if(C.tile){var S=new Map,V=[],x=[],q=0,W={nodeIndexes:S,xCoords:V,yCoords:x},Y=[];if(D.forEach(function(vt,nt){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){w.merge(vt.nodes()[Et]),ut.isParent()||(W.nodeIndexes.set(vt.nodes()[Et].id(),q++),W.xCoords.push(vt.nodes()[0].position().x),W.yCoords.push(vt.nodes()[0].position().y))}),Y.push(nt))}),w.length>1){var rt=w.boundingBox();it.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(w),X.push(W);for(var z=Y.length-1;z>=0;z--)D.splice(Y[z],1),X.splice(Y[z],1),it.splice(Y[z],1)}}D.forEach(function(vt,nt){C.eles=vt,J.push(l(C,X[nt])),t.relocateComponent(it[nt],J[nt],C)})}else D.forEach(function(vt,nt){t.relocateComponent(it[nt],X[nt],C)});var M=new Set;if(D.length>1){var H=[],B=k.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,nt){var ut=void 0;if(C.quality=="draft"&&(ut=X[nt].nodeIndexes),vt.nodes().not(B).length>0){var Et={};Et.edges=[],Et.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(C.quality=="draft")if(!Ot.isParent())At=ut.get(Ot.id()),Et.nodes.push({x:X[nt].xCoords[At]-Ot.boundingbox().w/2,y:X[nt].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,X[nt].xCoords,X[nt].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else J[nt][Ot.id()]&&Et.nodes.push({x:J[nt][Ot.id()].getLeft(),y:J[nt][Ot.id()].getTop(),width:J[nt][Ot.id()].getWidth(),height:J[nt][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(C.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,X[nt].xCoords,X[nt].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[nt].xCoords[Rt]),Ut.push(X[nt].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[nt].xCoords,X[nt].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[nt].xCoords[Ht]),Pt.push(X[nt].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else J[nt][mt.id()]&&J[nt][Dt.id()]&&Et.edges.push({startX:J[nt][mt.id()].getCenterX(),startY:J[nt][mt.id()].getCenterY(),endX:J[nt][Dt.id()].getCenterX(),endY:J[nt][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),M.add(nt))}});var j=E.packComponents(H,C.randomize).shifts;if(C.quality=="draft")X.forEach(function(vt,nt){var ut=vt.xCoords.map(function(At){return At+j[nt].dx}),Et=vt.yCoords.map(function(At){return At+j[nt].dy});vt.xCoords=ut,vt.yCoords=Et});else{var lt=0;M.forEach(function(vt){Object.keys(J[vt]).forEach(function(nt){var ut=J[vt][nt];ut.setCenter(ut.getCenterX()+j[lt].dx,ut.getCenterY()+j[lt].dy)}),lt++})}}}else{var m=C.eles.boundingBox();if(it.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),C.randomize){var y=o(C);X.push(y)}C.quality=="default"||C.quality=="proof"?(J.push(l(C,X[0])),t.relocateComponent(it[0],J[0],C)):t.relocateComponent(it[0],X[0],C)}var Q=function(nt,ut){if(C.quality=="default"||C.quality=="proof"){typeof nt=="number"&&(nt=ut);var Et=void 0,At=void 0,Ot=nt.data("id");return J.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),C.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Et.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Et.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Et.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Et.y-=At.labelHeight/2))),Et==null&&(Et={x:nt.position("x"),y:nt.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(nt.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:nt.position("x"),y:nt.position("y")}),{x:mt.x,y:mt.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(U,k),Nt=k.filter(function(vt){return vt.css("display")=="none"});C.eles=k.not(Nt),k.nodes().not(":parent").not(Nt).layoutPositions(P,C,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v})();n.exports=g}),657:((n,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,d=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),v=new Map,N=new Map,P=new Map,C=[],U=[],k=[],X=[],J=[],D=[],it=[],a=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,R=o.samplingType,w=o.nodeSeparation,S=void 0,V=function(){for(var G=0,$=0,K=!1;$<S;){G=Math.floor(Math.random()*E),K=!1;for(var Z=0;Z<$;Z++)if(X[Z]==G){K=!0;break}if(!K)X[$]=G,$++;else continue}},x=function(G,$,K){for(var Z=[],at=0,gt=0,ot=0,et=void 0,_=[],dt=0,wt=1,pt=0;pt<E;pt++)_[pt]=p;for(Z[gt]=G,_[G]=0;gt>=at;){ot=Z[at++];for(var xt=C[ot],ft=0;ft<xt.length;ft++)et=N.get(xt[ft]),_[et]==p&&(_[et]=_[ot]+1,Z[++gt]=et);D[ot][$]=_[ot]*w}if(K){for(var st=0;st<E;st++)D[st][$]<J[st]&&(J[st]=D[st][$]);for(var Lt=0;Lt<E;Lt++)J[Lt]>dt&&(dt=J[Lt],wt=Lt)}return wt},q=function(G){var $=void 0;if(G){$=Math.floor(Math.random()*E);for(var Z=0;Z<E;Z++)J[Z]=p;for(var at=0;at<S;at++)X[at]=$,$=x($,at,G)}else{V();for(var K=0;K<S;K++)x(X[K],K,G)}for(var gt=0;gt<E;gt++)for(var ot=0;ot<S;ot++)D[gt][ot]*=D[gt][ot];for(var et=0;et<S;et++)it[et]=[];for(var _=0;_<S;_++)for(var dt=0;dt<S;dt++)it[_][dt]=D[X[dt]][_]},W=function(){for(var G=d.svd(it),$=G.S,K=G.U,Z=G.V,at=$[0]*$[0]*$[0],gt=[],ot=0;ot<S;ot++){gt[ot]=[];for(var et=0;et<S;et++)gt[ot][et]=0,ot==et&&(gt[ot][et]=$[ot]/($[ot]*$[ot]+at/($[ot]*$[ot])))}a=r.multMat(r.multMat(Z,gt),r.transpose(K))},Y=function(){for(var G=void 0,$=void 0,K=[],Z=[],at=[],gt=[],ot=0;ot<E;ot++)K[ot]=Math.random(),Z[ot]=Math.random();K=r.normalize(K),Z=r.normalize(Z);for(var et=m,_=m,dt=void 0;;){for(var wt=0;wt<E;wt++)at[wt]=K[wt];if(K=r.multGamma(r.multL(r.multGamma(at),D,a)),G=r.dotProduct(at,K),K=r.normalize(K),et=r.dotProduct(at,K),dt=Math.abs(et/_),dt<=1+y&&dt>=1)break;_=et}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(_=m;;){for(var xt=0;xt<E;xt++)gt[xt]=Z[xt];if(gt=r.minusOp(gt,r.multCons(at,r.dotProduct(at,gt))),Z=r.multGamma(r.multL(r.multGamma(gt),D,a)),$=r.dotProduct(gt,Z),Z=r.normalize(Z),et=r.dotProduct(gt,Z),dt=Math.abs(et/_),dt<=1+y&&dt>=1)break;_=et}for(var ft=0;ft<E;ft++)gt[ft]=Z[ft];U=r.multCons(at,Math.sqrt(Math.abs(G))),k=r.multCons(gt,Math.sqrt(Math.abs($)))};f.connectComponents(c,l,f.getTopMostNodes(T),v),g.forEach(function(F){f.connectComponents(c,l,f.getTopMostNodes(F.descendants().intersection(l)),v)});for(var rt=0,z=0;z<T.length;z++)T[z].isParent()||N.set(T[z].id(),rt++);var M=!0,H=!1,B=void 0;try{for(var j=v.keys()[Symbol.iterator](),lt;!(M=(lt=j.next()).done);M=!0){var Q=lt.value;N.set(Q,rt++)}}catch(F){H=!0,B=F}finally{try{!M&&j.return&&j.return()}finally{if(H)throw B}}for(var It=0;It<N.size;It++)C[It]=[];g.forEach(function(F){for(var G=F.children().intersection(l);G.nodes(":childless").length==0;)G=G.nodes()[0].children().intersection(l);var $=0,K=G.nodes(":childless")[0].connectedEdges().length;G.nodes(":childless").forEach(function(Z,at){Z.connectedEdges().length<K&&(K=Z.connectedEdges().length,$=at)}),P.set(F.id(),G.nodes(":childless")[$].id())}),T.forEach(function(F){var G=void 0;F.isParent()?G=N.get(P.get(F.id())):G=N.get(F.id()),F.neighborhood().nodes().forEach(function($){l.intersection(F.edgesWith($)).length>0&&($.isParent()?C[G].push(P.get($.id())):C[G].push($.id()))})});var Nt=function(G){var $=N.get(G),K=void 0;v.get(G).forEach(function(Z){c.getElementById(Z).isParent()?K=P.get(Z):K=Z,C[$].push(K),C[N.get(K)].push(G)})},vt=!0,nt=!1,ut=void 0;try{for(var Et=v.keys()[Symbol.iterator](),At;!(vt=(At=Et.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){nt=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(nt)throw ut}}E=N.size;var mt=void 0;if(E>2){S=E<o.sampleSize?E:o.sampleSize;for(var Dt=0;Dt<E;Dt++)D[Dt]=[];for(var Rt=0;Rt<S;Rt++)a[Rt]=[];return o.quality=="draft"||o.step=="all"?(q(R),W(),Y(),mt={nodeIndexes:N,xCoords:U,yCoords:k}):(N.forEach(function(F,G){U.push(c.getElementById(G).position("x")),k.push(c.getElementById(G).position("y"))}),mt={nodeIndexes:N,xCoords:U,yCoords:k}),mt}else{var Ht=N.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(U.push(Pt.x),k.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Wt=Yt.outerWidth();U.push(Pt.x+Ft/2+Wt/2+o.idealEdgeLength),k.push(Pt.y)}return mt={nodeIndexes:N,xCoords:U,yCoords:k},mt}};n.exports={spectralLayout:t}}),579:((n,e,i)=>{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),n.exports=r}),140:(n=>{n.exports=A})},L={};function u(n){var e=L[n];if(e!==void 0)return e.exports;var i=L[n]={exports:{}};return b[n](i,i.exports,u),i.exports}var h=u(579);return h})()})})(he)),he.exports}var Ke=Je();const _e=Be.getDefaultExportFromCjs(Ke);var Me={L:"left",R:"right",T:"top",B:"bottom"},Oe={L:tt.__name(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:tt.__name(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:tt.__name(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:tt.__name(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:tt.__name((I,O)=>I-O+2,"L"),R:tt.__name((I,O)=>I-2,"R"),T:tt.__name((I,O)=>I-O+2,"T"),B:tt.__name((I,O)=>I-2,"B")},je=tt.__name(function(I){return Vt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),De=tt.__name(function(I){const O=I;return O==="L"||O==="R"||O==="T"||O==="B"},"isArchitectureDirection"),Vt=tt.__name(function(I){const O=I;return O==="L"||O==="R"},"isArchitectureDirectionX"),qt=tt.__name(function(I){const O=I;return O==="T"||O==="B"},"isArchitectureDirectionY"),ye=tt.__name(function(I,O){const A=Vt(I)&&qt(O),b=qt(I)&&Vt(O);return A||b},"isArchitectureDirectionXY"),tr=tt.__name(function(I){const O=I[0],A=I[1],b=Vt(O)&&qt(A),L=qt(O)&&Vt(A);return b||L},"isArchitecturePairXY"),er=tt.__name(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),pe=tt.__name(function(I,O){const A=`${I}${O}`;return er(A)?A:void 0},"getArchitectureDirectionPair"),rr=tt.__name(function([I,O],A){const b=A[0],L=A[1];return Vt(b)?qt(L)?[I+(b==="L"?-1:1),O+(L==="T"?1:-1)]:[I+(b==="L"?-1:1),O]:Vt(L)?[I+(L==="L"?1:-1),O+(b==="T"?1:-1)]:[I,O+(b==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ir=tt.__name(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),nr=tt.__name(function(I,O){return ye(I,O)?"bend":Vt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ar=tt.__name(function(I){return I.type==="service"},"isArchitectureService"),or=tt.__name(function(I){return I.type==="junction"},"isArchitectureJunction"),Ie=tt.__name(I=>I.data(),"edgeData"),ie=tt.__name(I=>I.data(),"nodeData"),sr=tt.defaultConfig_default.architecture,ne,Re=(ne=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=tt.setAccTitle,this.getAccTitle=tt.getAccTitle,this.setDiagramTitle=tt.setDiagramTitle,this.getDiagramTitle=tt.getDiagramTitle,this.getAccDescription=tt.getAccDescription,this.setAccDescription=tt.setAccDescription,this.clear()}setDiagramId(O){this.diagramId=O}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",tt.clear()}addService({id:O,icon:A,in:b,title:L,iconText:u}){if(this.registeredIds[O]!==void 0)throw new Error(`The service id [${O}] is already in use by another ${this.registeredIds[O]}`);if(b!==void 0){if(O===b)throw new Error(`The service [${O}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The service [${O}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[b]==="node")throw new Error(`The service [${O}]'s parent is not a group`)}this.registeredIds[O]="node",this.nodes[O]={id:O,type:"service",icon:A,iconText:u,title:L,edges:[],in:b}}getServices(){return Object.values(this.nodes).filter(ar)}addJunction({id:O,in:A}){if(this.registeredIds[O]!==void 0)throw new Error(`The junction id [${O}] is already in use by another ${this.registeredIds[O]}`);if(A!==void 0){if(O===A)throw new Error(`The junction [${O}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The junction [${O}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[A]==="node")throw new Error(`The junction [${O}]'s parent is not a group`)}this.registeredIds[O]="node",this.nodes[O]={id:O,type:"junction",edges:[],in:A}}getJunctions(){return Object.values(this.nodes).filter(or)}getNodes(){return Object.values(this.nodes)}getNode(O){return this.nodes[O]??null}addGroup({id:O,icon:A,in:b,title:L}){if(this.registeredIds?.[O]!==void 0)throw new Error(`The group id [${O}] is already in use by another ${this.registeredIds[O]}`);if(b!==void 0){if(O===b)throw new Error(`The group [${O}] cannot be placed within itself`);if(this.registeredIds?.[b]===void 0)throw new Error(`The group [${O}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[b]==="node")throw new Error(`The group [${O}]'s parent is not a group`)}this.registeredIds[O]="group",this.groups[O]={id:O,icon:A,title:L,in:b}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:O,rhsId:A,lhsDir:b,rhsDir:L,lhsInto:u,rhsInto:h,lhsGroup:n,rhsGroup:e,title:i}){if(!De(b))throw new Error(`Invalid direction given for left hand side of edge ${O}--${A}. Expected (L,R,T,B) got ${String(b)}`);if(!De(L))throw new Error(`Invalid direction given for right hand side of edge ${O}--${A}. Expected (L,R,T,B) got ${String(L)}`);if(this.nodes[O]===void 0&&this.groups[O]===void 0)throw new Error(`The left-hand id [${O}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[O].in,r=this.nodes[A].in;if(n&&f&&r&&f==r)throw new Error(`The left-hand id [${O}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&f&&r&&f==r)throw new Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:O,lhsDir:b,lhsInto:u,lhsGroup:n,rhsId:A,rhsDir:L,rhsInto:h,rhsGroup:e,title:i};this.edges.push(d),this.nodes[O]&&this.nodes[A]&&(this.nodes[O].edges.push(this.edges[this.edges.length-1]),this.nodes[A].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const O={},A=Object.entries(this.nodes).reduce((e,[i,f])=>(e[i]=f.edges.reduce((r,d)=>{const t=this.getNode(d.lhsId)?.in,s=this.getNode(d.rhsId)?.in;if(t&&s&&t!==s){const o=nr(d.lhsDir,d.rhsDir);o!=="bend"&&(O[t]??={},O[t][s]=o,O[s]??={},O[s][t]=o)}if(d.lhsId===i){const o=pe(d.lhsDir,d.rhsDir);o&&(r[o]=d.rhsId)}else{const o=pe(d.rhsDir,d.lhsDir);o&&(r[o]=d.lhsId)}return r},{}),e),{}),b=Object.keys(A)[0],L={[b]:1},u=Object.keys(A).reduce((e,i)=>i===b?e:{...e,[i]:1},{}),h=tt.__name(e=>{const i={[e]:[0,0]},f=[e];for(;f.length>0;){const r=f.shift();if(r){L[r]=1,delete u[r];const d=A[r],[t,s]=i[r];Object.entries(d).forEach(([o,c])=>{L[c]||(i[c]=rr([t,s],o),f.push(c))})}}return i},"BFS"),n=[h(b)];for(;Object.keys(u).length>0;)n.push(h(Object.keys(u)[0]));this.dataStructures={adjList:A,spatialMaps:n,groupAlignments:O}}return this.dataStructures}setElementForId(O,A){this.elements[O]=A}getElementById(O){return this.elements[O]}getConfig(){return tt.cleanAndMerge({...sr,...tt.getConfig().architecture})}getConfigField(O){return this.getConfig()[O]}},tt.__name(ne,"ArchitectureDB"),ne),hr=tt.__name((I,O)=>{We.populateCommonDb(I,O),I.groups.map(A=>O.addGroup(A)),I.services.map(A=>O.addService({...A,type:"service"})),I.junctions.map(A=>O.addJunction({...A,type:"junction"})),I.edges.map(A=>O.addEdge(A))},"populateDb"),Se={parser:{yy:void 0},parse:tt.__name(async I=>{const O=await ze.parse("architecture",I);tt.log.debug(O);const A=Se.parser?.yy;if(!(A instanceof Re))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");hr(O,A)},"parse")},lr=tt.__name(I=>`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tt=require("./cowboy-components-DMQv-nwp.cjs"),We=require("./chunk-4BX2VUAB-B1uaSl0e.cjs"),ze=require("./mermaid-parser.core-COvBhcPG.cjs"),xe=require("./cytoscape.esm-DHF7mANN.cjs"),Be=require("./change-list-item-4xBSo3-U.cjs");var he={exports:{}},le={exports:{}},fe={exports:{}},$e=fe.exports,Ce;function ke(){return Ce||(Ce=1,(function(I,O){(function(b,L){I.exports=L()})($e,function(){return(function(A){var b={};function L(u){if(b[u])return b[u].exports;var h=b[u]={i:u,l:!1,exports:{}};return A[u].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=A,L.c=b,L.i=function(u){return u},L.d=function(u,h,n){L.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:n})},L.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return L.d(h,"a",h),h},L.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},L.p="",L(L.s=28)})([(function(A,b,L){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,A.exports=u}),(function(A,b,L){var u=L(2),h=L(8),n=L(9);function e(f,r,d){u.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(u.prototype);for(var i in u)e[i]=u[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var d=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(d.getOwner()==r)return d;if(d.getOwner()==t)break;d=d.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=e}),(function(A,b,L){function u(h){this.vGraphObject=h}A.exports=u}),(function(A,b,L){var u=L(2),h=L(10),n=L(13),e=L(0),i=L(16),f=L(5);function r(t,s,o,c){o==null&&c==null&&(c=s),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}r.prototype=Object.create(u.prototype);for(var d in u)r[d]=u[d];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},r.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},r.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},r.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.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)},r.prototype.scatter=function(){var t,s,o=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+i.nextDouble()*(c-o)+o;var l=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_Y+i.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=r}),(function(A,b,L){var u=L(0);function h(){}for(var n in u)h[n]=u[n];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,b,L){function u(h,n){h==null&&n==null?(this.x=0,this.y=0):(this.x=h,this.y=n)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=u}),(function(A,b,L){var u=L(2),h=L(10),n=L(0),e=L(7),i=L(3),f=L(1),r=L(13),d=L(12),t=L(11);function s(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var v=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(v.source=l,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),l.edges.push(v),T!=l&&T.edges.push(v),v)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,v=T.length,N=0;N<v;N++)g=T[N],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var P=this.nodes.indexOf(l);if(P==-1)throw"Node not in owner node list!";this.nodes.splice(P,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var C=g.source.edges.indexOf(g),U=g.target.edges.indexOf(g);if(!(C>-1&&U>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(U,1);var P=g.source.owner.getEdges().indexOf(g);if(P==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(P,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,v,N=this.getNodes(),P=N.length,C=0;C<P;C++){var U=N[C];T=U.getTop(),g=U.getLeft(),c>T&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?v=N[0].getParent().paddingLeft:v=this.margin,this.left=l-v,this.top=c-v,new d(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,N,P,C,U,k,X=this.nodes,J=X.length,D=0;D<J;D++){var it=X[D];c&&it.child!=null&&it.updateBounds(),N=it.getLeft(),P=it.getRight(),C=it.getTop(),U=it.getBottom(),l>N&&(l=N),T<P&&(T=P),g>C&&(g=C),v<U&&(v=U)}var a=new r(l,g,T-l,v-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),X[0].getParent().paddingLeft!=null?k=X[0].getParent().paddingLeft:k=this.margin,this.left=a.x-k,this.right=a.x+a.width+k,this.top=a.y-k,this.bottom=a.y+a.height+k},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,N,P,C,U,k=c.length,X=0;X<k;X++){var J=c[X];N=J.getLeft(),P=J.getRight(),C=J.getTop(),U=J.getBottom(),l>N&&(l=N),T<P&&(T=P),g>C&&(g=C),v<U&&(v=U)}var D=new r(l,g,T-l,v-g);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var v=l[g];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],v,N,P=g.withChildren();for(P.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){g=l.shift(),v=g.getEdges();for(var C=v.length,U=0;U<C;U++){var k=v[U];if(N=k.getOtherEndInGraph(g,this),N!=null&&!T.has(N)){var X=N.withChildren();X.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var J=0;T.forEach(function(D){D.owner==c&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,b,L){var u,h=L(1);function n(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(e,i,f,r,d){if(f==null&&r==null&&d==null){if(e==null)throw"Graph is null!";if(i==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(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{d=f,r=i,f=e;var t=r.getOwner(),s=d.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,d);if(f.isInterGraph=!0,f.source=r,f.target=d,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},n.prototype.remove=function(e){if(e instanceof u){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,d=f.length,t=0;t<d;t++)r=f[t],i.remove(r);var s=[];s=s.concat(i.getNodes());var o;d=s.length;for(var t=0;t<d;t++)o=s[t],i.remove(o);i==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(i);this.graphs.splice(c,1),i.parent=null}else if(e instanceof h){if(r=e,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var c=r.source.edges.indexOf(r);if(r.source.edges.splice(c,1),c=r.target.edges.indexOf(r),r.target.edges.splice(c,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var c=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(c,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],i=this.getGraphs(),f=i.length,r=0;r<f;r++)e=e.concat(i[r].getNodes());this.allNodes=e}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)e=e.concat(i[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(e,i){if(!(e!=null&&i!=null))throw"assert failed";if(e==i)return!0;var f=e.getOwner(),r;do{if(r=f.getParent(),r==null)break;if(r==i)return!0;if(f=r.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(r=f.getParent(),r==null)break;if(r==e)return!0;if(f=r.getOwner(),f==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var e,i,f,r,d,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(e=t[o],i=e.source,f=e.target,e.lca=null,e.sourceInLca=i,e.targetInLca=f,i==f){e.lca=i.getOwner();continue}for(r=i.getOwner();e.lca==null;){for(e.targetInLca=f,d=f.getOwner();e.lca==null;){if(d==r){e.lca=d;break}if(d==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=d.getParent(),d=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca==null&&(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(e,i){if(e==i)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var r=i.getOwner();do{if(r==null)break;if(r==f)return r;r=r.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},n.prototype.calcInclusionTreeDepths=function(e,i){e==null&&i==null&&(e=this.rootGraph,i=1);for(var f,r=e.getNodes(),d=r.length,t=0;t<d;t++)f=r[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},n.prototype.includesInvalidEdge=function(){for(var e,i=[],f=this.edges.length,r=0;r<f;r++)e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target)&&i.push(e);for(var r=0;r<i.length;r++)this.remove(i[r]);return!1},A.exports=n}),(function(A,b,L){var u=L(12);function h(){}h.calcSeparationAmount=function(n,e,i,f){if(!n.intersects(e))throw"assert failed";var r=new Array(2);this.decideDirectionsForOverlappingNodes(n,e,r),i[0]=Math.min(n.getRight(),e.getRight())-Math.max(n.x,e.x),i[1]=Math.min(n.getBottom(),e.getBottom())-Math.max(n.y,e.y),n.getX()<=e.getX()&&n.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-n.getX(),n.getRight()-e.getRight()):e.getX()<=n.getX()&&e.getRight()>=n.getRight()&&(i[0]+=Math.min(n.getX()-e.getX(),e.getRight()-n.getRight())),n.getY()<=e.getY()&&n.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-n.getY(),n.getBottom()-e.getBottom()):e.getY()<=n.getY()&&e.getBottom()>=n.getBottom()&&(i[1]+=Math.min(n.getY()-e.getY(),e.getBottom()-n.getBottom()));var d=Math.abs((e.getCenterY()-n.getCenterY())/(e.getCenterX()-n.getCenterX()));e.getCenterY()===n.getCenterY()&&e.getCenterX()===n.getCenterX()&&(d=1);var t=d*i[0],s=i[1]/d;i[0]<s?s=i[0]:t=i[1],i[0]=-1*r[0]*(s/2+f),i[1]=-1*r[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(n,e,i){n.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,n.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},h.getIntersection2=function(n,e,i){var f=n.getCenterX(),r=n.getCenterY(),d=e.getCenterX(),t=e.getCenterY();if(n.intersects(e))return i[0]=f,i[1]=r,i[2]=d,i[3]=t,!0;var s=n.getX(),o=n.getY(),c=n.getRight(),l=n.getX(),T=n.getBottom(),g=n.getRight(),v=n.getWidthHalf(),N=n.getHeightHalf(),P=e.getX(),C=e.getY(),U=e.getRight(),k=e.getX(),X=e.getBottom(),J=e.getRight(),D=e.getWidthHalf(),it=e.getHeightHalf(),a=!1,E=!1;if(f===d){if(r>t)return i[0]=f,i[1]=o,i[2]=d,i[3]=X,!1;if(r<t)return i[0]=f,i[1]=T,i[2]=d,i[3]=C,!1}else if(r===t){if(f>d)return i[0]=s,i[1]=r,i[2]=U,i[3]=t,!1;if(f<d)return i[0]=c,i[1]=r,i[2]=P,i[3]=t,!1}else{var p=n.height/n.width,m=e.height/e.width,y=(t-r)/(d-f),R=void 0,w=void 0,S=void 0,V=void 0,x=void 0,q=void 0;if(-p===y?f>d?(i[0]=l,i[1]=T,a=!0):(i[0]=c,i[1]=o,a=!0):p===y&&(f>d?(i[0]=s,i[1]=o,a=!0):(i[0]=g,i[1]=T,a=!0)),-m===y?d>f?(i[2]=k,i[3]=X,E=!0):(i[2]=U,i[3]=C,E=!0):m===y&&(d>f?(i[2]=P,i[3]=C,E=!0):(i[2]=J,i[3]=X,E=!0)),a&&E)return!1;if(f>d?r>t?(R=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(m,y,2)):(R=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-m,y,1)):r>t?(R=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-m,y,3)):(R=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(m,y,4)),!a)switch(R){case 1:V=o,S=f+-N/y,i[0]=S,i[1]=V;break;case 2:S=g,V=r+v*y,i[0]=S,i[1]=V;break;case 3:V=T,S=f+N/y,i[0]=S,i[1]=V;break;case 4:S=l,V=r+-v*y,i[0]=S,i[1]=V;break}if(!E)switch(w){case 1:q=C,x=d+-it/y,i[2]=x,i[3]=q;break;case 2:x=J,q=t+D*y,i[2]=x,i[3]=q;break;case 3:q=X,x=d+it/y,i[2]=x,i[3]=q;break;case 4:x=k,q=t+-D*y,i[2]=x,i[3]=q;break}}return!1},h.getCardinalDirection=function(n,e,i){return n>e?i:1+i%4},h.getIntersection=function(n,e,i,f){if(f==null)return this.getIntersection2(n,e,i);var r=n.x,d=n.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,v=void 0,N=void 0,P=void 0,C=void 0,U=void 0,k=void 0,X=void 0,J=void 0;return N=s-d,C=r-t,k=t*d-r*s,P=T-c,U=o-l,X=l*c-o*T,J=N*U-P*C,J===0?null:(g=(C*X-U*k)/J,v=(P*k-N*X)/J,new u(g,v))},h.angleOfVector=function(n,e,i,f){var r=void 0;return n!==i?(r=Math.atan((f-e)/(i-n)),i<n?r+=Math.PI:f<e&&(r+=this.TWO_PI)):f<e?r=this.ONE_AND_HALF_PI:r=this.HALF_PI,r},h.doIntersect=function(n,e,i,f){var r=n.x,d=n.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=(t-r)*(T-c)-(l-o)*(s-d);if(g===0)return!1;var v=((T-c)*(l-r)+(o-l)*(T-d))/g,N=((d-s)*(l-r)+(t-r)*(T-d))/g;return 0<v&&v<1&&0<N&&N<1},h.findCircleLineIntersections=function(n,e,i,f,r,d,t){var s=(i-n)*(i-n)+(f-e)*(f-e),o=2*((n-r)*(i-n)+(e-d)*(f-e)),c=(n-r)*(n-r)+(e-d)*(e-d)-t*t,l=o*o-4*s*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),v=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:v}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,b,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=u}),(function(A,b,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,A.exports=u}),(function(A,b,L){var u=(function(){function r(d,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}return function(d,t,s){return t&&r(d.prototype,t),s&&r(d,s),d}})();function h(r,d){if(!(r instanceof d))throw new TypeError("Cannot call a class as a function")}var n=function(d){return{value:d,next:null,prev:null}},e=function(d,t,s,o){return d!==null?d.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=d,t.next=s,o.length++,t},i=function(d,t){var s=d.prev,o=d.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,d.prev=d.next=null,t.length--,d},f=(function(){function r(d){var t=this;h(this,r),this.length=0,this.head=null,this.tail=null,d?.forEach(function(s){return t.push(s)})}return u(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return e(s.prev,n(t),s,this)}},{key:"insertAfter",value:function(t,s){return e(s,n(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return e(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return e(s,t,s.next,this)}},{key:"push",value:function(t){return e(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return e(null,n(t),this.head,this)}},{key:"remove",value:function(t){return i(t,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),r})();A.exports=f}),(function(A,b,L){function u(h,n,e){this.x=null,this.y=null,h==null&&n==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof n=="number"&&e==null?(this.x=h,this.y=n):h.constructor.name=="Point"&&n==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.getLocation=function(){return new u(this.x,this.y)},u.prototype.setLocation=function(h,n,e){h.constructor.name=="Point"&&n==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof n=="number"&&e==null&&(parseInt(h)==h&&parseInt(n)==n?this.move(h,n):(this.x=Math.floor(h+.5),this.y=Math.floor(n+.5)))},u.prototype.move=function(h,n){this.x=h,this.y=n},u.prototype.translate=function(h,n){this.x+=h,this.y+=n},u.prototype.equals=function(h){if(h.constructor.name=="Point"){var n=h;return this.x==n.x&&this.y==n.y}return this==h},u.prototype.toString=function(){return new u().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=u}),(function(A,b,L){function u(h,n,e,i){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&n!=null&&e!=null&&i!=null&&(this.x=h,this.y=n,this.width=e,this.height=i)}u.prototype.getX=function(){return this.x},u.prototype.setX=function(h){this.x=h},u.prototype.getY=function(){return this.y},u.prototype.setY=function(h){this.y=h},u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(h){this.width=h},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(h){this.height=h},u.prototype.getRight=function(){return this.x+this.width},u.prototype.getBottom=function(){return this.y+this.height},u.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},u.prototype.getCenterX=function(){return this.x+this.width/2},u.prototype.getMinX=function(){return this.getX()},u.prototype.getMaxX=function(){return this.getX()+this.width},u.prototype.getCenterY=function(){return this.y+this.height/2},u.prototype.getMinY=function(){return this.getY()},u.prototype.getMaxY=function(){return this.getY()+this.height},u.prototype.getWidthHalf=function(){return this.width/2},u.prototype.getHeightHalf=function(){return this.height/2},A.exports=u}),(function(A,b,L){var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function h(){}h.lastID=0,h.createID=function(n){return h.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=h.getString(),h.lastID++),n.uniqueID)},h.getString=function(n){return n==null&&(n=h.lastID),"Object#"+n},h.isPrimitive=function(n){var e=typeof n>"u"?"undefined":u(n);return n==null||e!="object"&&e!="function"},A.exports=h}),(function(A,b,L){function u(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=L(0),n=L(7),e=L(3),i=L(1),f=L(6),r=L(5),d=L(17),t=L(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new n(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new e(this.graphManager,o)},s.prototype.newEdge=function(o){return new i(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof e){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof i){var v=o;if(v.vGraphObject!=null){var N=v.vGraphObject;N.update(v)}}else if(o instanceof f){var P=o;if(P.vGraphObject!=null){var C=P.vGraphObject;C.update(P)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new r(0,0));else{var c=new d,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),g,v=0;v<T.length;v++)g=T[v],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return o;var v=new Set,N=[],P=new Map,C=[];for(C=C.concat(l);C.length>0&&c;){for(N.push(C[0]);N.length>0&&c;){var U=N[0];N.splice(0,1),v.add(U);for(var k=U.getEdges(),g=0;g<k.length;g++){var X=k[g].getOtherEnd(U);if(P.get(U)!=X)if(!v.has(X))N.push(X),P.set(X,U);else{c=!1;break}}}if(!c)o=[];else{var J=[].concat(u(v));o.push(J);for(var g=0;g<J.length;g++){var D=J[g],it=C.indexOf(D);it>-1&&C.splice(it,1)}v=new Set,P=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g<o.bendpoints.length;g++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var N=this.newEdge(null);this.graphManager.add(N,l,v),c.add(v),l=v}var N=this.newEdge(null);return this.graphManager.add(N,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(u(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),g=0;g<T.length;g++){var v=T[g],N=new r(v.getCenterX(),v.getCenterY()),P=l.bendpoints.get(g);P.x=N.x,P.y=N.y,v.getOwner().remove(v)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var g=c;if(o<=50){var v=c/l;g-=(c-v)/50*(50-o)}else{var N=c*T;g+=(N-c)/50*(o-50)}return g}else{var P,C;return o<=50?(P=9*c/500,C=c/10):(P=9*c/50,C=-8*c),P*o+C}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,g=!1,v=null;(c.length==1||c.length==2)&&(g=!0,v=c[0]);for(var N=0;N<c.length;N++){var P=c[N],C=P.getNeighborsList().size;T.set(P,P.getNeighborsList().size),C==1&&l.push(P)}var U=[];for(U=U.concat(l);!g;){var k=[];k=k.concat(U),U=[];for(var N=0;N<c.length;N++){var P=c[N],X=c.indexOf(P);X>=0&&c.splice(X,1);var J=P.getNeighborsList();J.forEach(function(a){if(l.indexOf(a)<0){var E=T.get(a),p=E-1;p==1&&U.push(a),T.set(a,p)}})}l=l.concat(U),(c.length==1||c.length==2)&&(g=!0,v=c[0])}return v},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,b,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},A.exports=u}),(function(A,b,L){var u=L(5);function h(n,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(n){this.lworldExtX=n},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(n){this.lworldExtY=n},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},h.prototype.transformX=function(n){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(n){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(n){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(n){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(n){var e=new u(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return e},A.exports=h}),(function(A,b,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=L(15),n=L(4),e=L(0),i=L(8),f=L(9);function r(){h.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}r.prototype=Object.create(h.prototype);for(var d in h)r[d]=h[d];r.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,g,v=this.getGraphManager().getAllEdges(),N=0;N<v.length;N++)t=v[N],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},r.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},r.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;o<g.length;o++)l=g[o],this.calculateRepulsionForceOfANode(l,v,t,s),v.add(l);else for(o=0;o<g.length;o++)for(l=g[o],c=o+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},r.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},r.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},r.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,g,v;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),g=T*(t.lengthX/l),v=T*(t.lengthY/l),o.springForceX+=g,o.springForceY+=v,c.springForceX-=g,c.springForceY-=v)},r.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),g,v,N,P,C,U,k;if(o.intersects(c)){i.calcSeparationAmount(o,c,l,n.DEFAULT_EDGE_LENGTH/2),U=2*l[0],k=2*l[1];var X=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=X*U,t.repulsionForceY-=X*k,s.repulsionForceX+=X*U,s.repulsionForceY+=X*k}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),v=c.getCenterY()-o.getCenterY()):(i.getIntersection(o,c,T),g=T[2]-T[0],v=T[3]-T[1]),Math.abs(g)<n.MIN_REPULSION_DIST&&(g=f.sign(g)*n.MIN_REPULSION_DIST),Math.abs(v)<n.MIN_REPULSION_DIST&&(v=f.sign(v)*n.MIN_REPULSION_DIST),N=g*g+v*v,P=Math.sqrt(N),C=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/N,U=C*g/P,k=C*v/P,t.repulsionForceX-=U,t.repulsionForceY-=k,s.repulsionForceX+=U,s.repulsionForceY+=k},r.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,g,v,N;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(N=s.getEstimatedSize()*this.gravityRangeFactor,(g>N||v>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||v>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},r.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},r.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},r.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},r.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var v=c;v<=l;v++)for(var N=T;N<=g;N++)this.grid[v][N].push(t),t.setGridCoordinates(c,l,T,g)},r.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var N=t.startY-1;N<t.finishY+2;N++)if(!(v<0||N<0||v>=g.length||N>=g[0].length)){for(var P=0;P<g[v][N].length;P++)if(T=g[v][N][P],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var C=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),U=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);C<=this.repulsionRange&&U<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(u(l))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},r.prototype.calcRepulsionRange=function(){return 0},A.exports=r}),(function(A,b,L){var u=L(1),h=L(4);function n(i,f,r){u.call(this,i,f,r),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(u.prototype);for(var e in u)n[e]=u[e];A.exports=n}),(function(A,b,L){var u=L(3),h=L(4);function n(i,f,r,d){u.call(this,i,f,r,d),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,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=[]}n.prototype=Object.create(u.prototype);for(var e in u)n[e]=u[e];n.prototype.setGridCoordinates=function(i,f,r,d){this.startX=i,this.finishX=f,this.startY=r,this.finishY=d},A.exports=n}),(function(A,b,L){function u(h,n){this.width=0,this.height=0,h!==null&&n!==null&&(this.height=n,this.width=h)}u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(h){this.width=h},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(h){this.height=h},A.exports=u}),(function(A,b,L){var u=L(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(n,e){var i=u.createID(n);this.contains(i)||(this.map[i]=e,this.keys.push(n))},h.prototype.contains=function(n){return u.createID(n),this.map[n]!=null},h.prototype.get=function(n){var e=u.createID(n);return this.map[e]},h.prototype.keySet=function(){return this.keys},A.exports=h}),(function(A,b,L){var u=L(14);function h(){this.set={}}h.prototype.add=function(n){var e=u.createID(n);this.contains(e)||(this.set[e]=n)},h.prototype.remove=function(n){delete this.set[u.createID(n)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(n){return this.set[u.createID(n)]==n},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(n){for(var e=Object.keys(this.set),i=e.length,f=0;f<i;f++)n.push(this.set[e[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(n){for(var e=n.length,i=0;i<e;i++){var f=n[i];this.add(f)}},A.exports=h}),(function(A,b,L){function u(){}u.multMat=function(h,n){for(var e=[],i=0;i<h.length;i++){e[i]=[];for(var f=0;f<n[0].length;f++){e[i][f]=0;for(var r=0;r<h[0].length;r++)e[i][f]+=h[i][r]*n[r][f]}}return e},u.transpose=function(h){for(var n=[],e=0;e<h[0].length;e++){n[e]=[];for(var i=0;i<h.length;i++)n[e][i]=h[i][e]}return n},u.multCons=function(h,n){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]*n;return e},u.minusOp=function(h,n){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]-n[i];return e},u.dotProduct=function(h,n){for(var e=0,i=0;i<h.length;i++)e+=h[i]*n[i];return e},u.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},u.normalize=function(h){for(var n=[],e=this.mag(h),i=0;i<h.length;i++)n[i]=h[i]/e;return n},u.multGamma=function(h){for(var n=[],e=0,i=0;i<h.length;i++)e+=h[i];e*=-1/h.length;for(var f=0;f<h.length;f++)n[f]=e+h[f];return n},u.multL=function(h,n,e){for(var i=[],f=[],r=[],d=0;d<n[0].length;d++){for(var t=0,s=0;s<n.length;s++)t+=-.5*n[s][d]*h[s];f[d]=t}for(var o=0;o<e.length;o++){for(var c=0,l=0;l<e.length;l++)c+=e[o][l]*f[l];r[o]=c}for(var T=0;T<n.length;T++){for(var g=0,v=0;v<n[0].length;v++)g+=n[T][v]*r[v];i[T]=g}return i},A.exports=u}),(function(A,b,L){var u=(function(){function i(f,r){for(var d=0;d<r.length;d++){var t=r[d];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,r,d){return r&&i(f.prototype,r),d&&i(f,d),f}})();function h(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var n=L(11),e=(function(){function i(f,r){h(this,i),(r!==null||r!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;f instanceof n?d=f.size():d=f.length,this._quicksort(f,0,d-1)}return u(i,[{key:"_quicksort",value:function(r,d,t){if(d<t){var s=this._partition(r,d,t);this._quicksort(r,d,s),this._quicksort(r,s+1,t)}}},{key:"_partition",value:function(r,d,t){for(var s=this._get(r,d),o=d,c=t;;){for(;this.compareFunction(s,this._get(r,c));)c--;for(;this.compareFunction(this._get(r,o),s);)o++;if(o<c)this._swap(r,o,c),o++,c--;else return c}}},{key:"_get",value:function(r,d){return r instanceof n?r.get_object_at(d):r[d]}},{key:"_set",value:function(r,d,t){r instanceof n?r.set_object_at(d,t):r[d]=t}},{key:"_swap",value:function(r,d,t){var s=this._get(r,d);this._set(r,d,this._get(r,t)),this._set(r,t,s)}},{key:"_defaultCompareFunction",value:function(r,d){return d>r}}]),i})();A.exports=e}),(function(A,b,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,n]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(r,d);t++){if(t<r){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=u.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<r,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}e[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<r))for(var v=t;v<this.m;v++)this.U[v][t]=h[v][t];if(t<d){e[t]=0;for(var N=t+1;N<this.n;N++)e[t]=u.hypot(e[t],e[N]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var P=t+1;P<this.n;P++)e[P]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var C=t+1;C<this.m;C++)i[C]=0;for(var U=t+1;U<this.n;U++)for(var k=t+1;k<this.m;k++)i[k]+=e[U]*h[k][U];for(var X=t+1;X<this.n;X++)for(var J=-e[X]/e[t+1],D=t+1;D<this.m;D++)h[D][X]+=J*i[D]}for(var it=t+1;it<this.n;it++)this.V[it][t]=e[it]}}var a=Math.min(this.n,this.m+1);r<this.n&&(this.s[r]=h[r][r]),this.m<a&&(this.s[a-1]=0),d+1<a&&(e[d]=h[d][a-1]),e[a-1]=0;{for(var E=r;E<n;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=r-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<n;y++){for(var R=0,w=m;w<this.m;w++)R+=this.U[w][m]*this.U[w][y];R=-R/this.U[m][m];for(var S=m;S<this.m;S++)this.U[S][y]+=R*this.U[S][m]}for(var V=m;V<this.m;V++)this.U[V][m]=-this.U[V][m];this.U[m][m]=1+this.U[m][m];for(var x=0;x<m-1;x++)this.U[x][m]=0}else{for(var q=0;q<this.m;q++)this.U[q][m]=0;this.U[m][m]=1}}for(var W=this.n-1;W>=0;W--){if((function(Tt,Ct){return Tt&&Ct})(W<d,e[W]!==0))for(var Y=W+1;Y<n;Y++){for(var rt=0,z=W+1;z<this.n;z++)rt+=this.V[z][W]*this.V[z][Y];rt=-rt/this.V[W+1][W];for(var M=W+1;M<this.n;M++)this.V[M][Y]+=rt*this.V[M][W]}for(var H=0;H<this.n;H++)this.V[H][W]=0;this.V[W][W]=1}for(var B=a-1,j=Math.pow(2,-52),lt=Math.pow(2,-966);a>0;){var Q=void 0,It=void 0;for(Q=a-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=lt+j*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===a-2)It=4;else{var Nt=void 0;for(Nt=a-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==a?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=lt+j*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===a-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var nt=e[a-2];e[a-2]=0;for(var ut=a-2;ut>=Q;ut--){var Et=u.hypot(this.s[ut],nt),At=this.s[ut]/Et,Ot=nt/Et;this.s[ut]=Et,ut!==Q&&(nt=-Ot*e[ut-1],e[ut-1]=At*e[ut-1]);for(var mt=0;mt<this.n;mt++)Et=At*this.V[mt][ut]+Ot*this.V[mt][a-1],this.V[mt][a-1]=-Ot*this.V[mt][ut]+At*this.V[mt][a-1],this.V[mt][ut]=Et}}break;case 2:{var Dt=e[Q-1];e[Q-1]=0;for(var Rt=Q;Rt<a;Rt++){var Ht=u.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][Q-1],this.U[Ft][Q-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][Q-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[a-1]),Math.abs(this.s[a-2])),Math.abs(e[a-2])),Math.abs(this.s[Q])),Math.abs(e[Q])),Wt=this.s[a-1]/Yt,F=this.s[a-2]/Yt,G=e[a-2]/Yt,$=this.s[Q]/Yt,K=e[Q]/Yt,Z=((F+Wt)*(F-Wt)+G*G)/2,at=Wt*G*(Wt*G),gt=0;(function(Tt,Ct){return Tt||Ct})(Z!==0,at!==0)&&(gt=Math.sqrt(Z*Z+at),Z<0&&(gt=-gt),gt=at/(Z+gt));for(var ot=($+Wt)*($-Wt)+gt,et=$*K,_=Q;_<a-1;_++){var dt=u.hypot(ot,et),wt=ot/dt,pt=et/dt;_!==Q&&(e[_-1]=dt),ot=wt*this.s[_]+pt*e[_],e[_]=wt*e[_]-pt*this.s[_],et=pt*this.s[_+1],this.s[_+1]=wt*this.s[_+1];for(var xt=0;xt<this.n;xt++)dt=wt*this.V[xt][_]+pt*this.V[xt][_+1],this.V[xt][_+1]=-pt*this.V[xt][_]+wt*this.V[xt][_+1],this.V[xt][_]=dt;if(dt=u.hypot(ot,et),wt=ot/dt,pt=et/dt,this.s[_]=dt,ot=wt*e[_]+pt*this.s[_+1],this.s[_+1]=-pt*e[_]+wt*this.s[_+1],et=pt*e[_+1],e[_+1]=wt*e[_+1],_<this.m-1)for(var ft=0;ft<this.m;ft++)dt=wt*this.U[ft][_]+pt*this.U[ft][_+1],this.U[ft][_+1]=-pt*this.U[ft][_]+wt*this.U[ft][_+1],this.U[ft][_]=dt}e[a-2]=ot}break;case 4:{if(this.s[Q]<=0){this.s[Q]=this.s[Q]<0?-this.s[Q]:0;for(var st=0;st<=B;st++)this.V[st][Q]=-this.V[st][Q]}for(;Q<B&&!(this.s[Q]>=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,Q<this.n-1)for(var ct=0;ct<this.n;ct++)Lt=this.V[ct][Q+1],this.V[ct][Q+1]=this.V[ct][Q],this.V[ct][Q]=Lt;if(Q<this.m-1)for(var ht=0;ht<this.m;ht++)Lt=this.U[ht][Q+1],this.U[ht][Q+1]=this.U[ht][Q],this.U[ht][Q]=Lt;Q++}a--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},u.hypot=function(h,n){var e=void 0;return Math.abs(h)>Math.abs(n)?(e=n/h,e=Math.abs(h)*Math.sqrt(1+e*e)):n!=0?(e=h/n,e=Math.abs(n)*Math.sqrt(1+e*e)):e=0,e},A.exports=u}),(function(A,b,L){var u=(function(){function e(i,f){for(var r=0;r<f.length;r++){var d=f[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,f,r){return f&&e(i.prototype,f),r&&e(i,r),i}})();function h(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}var n=(function(){function e(i,f){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=d,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return u(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[d-1]===this.sequence2[t-1]?s=this.grid[d-1][t-1]+this.match_score:s=this.grid[d-1][t-1]+this.mismatch_penalty;var o=this.grid[d-1][t]+this.gap_penalty,c=this.grid[d][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[d][t]=l[T[0]],this.tracebackGrid[d][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var r=f[0],d=this.tracebackGrid[r.pos[0]][r.pos[1]];d[0]&&f.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),d[1]&&f.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),d[2]&&f.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,r){for(var d=[],t=-1;(t=f.indexOf(r,t+1))!==-1;)d.push(t);return d}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e})();A.exports=n}),(function(A,b,L){var u=function(){};u.FDLayout=L(18),u.FDLayoutConstants=L(4),u.FDLayoutEdge=L(19),u.FDLayoutNode=L(20),u.DimensionD=L(21),u.HashMap=L(22),u.HashSet=L(23),u.IGeometry=L(8),u.IMath=L(9),u.Integer=L(10),u.Point=L(12),u.PointD=L(5),u.RandomSeed=L(16),u.RectangleD=L(13),u.Transform=L(17),u.UniqueIDGeneretor=L(14),u.Quicksort=L(25),u.LinkedList=L(11),u.LGraphObject=L(2),u.LGraph=L(6),u.LEdge=L(1),u.LGraphManager=L(7),u.LNode=L(3),u.Layout=L(15),u.LayoutConstants=L(0),u.NeedlemanWunsch=L(27),u.Matrix=L(24),u.SVD=L(26),A.exports=u}),(function(A,b,L){function u(){this.listeners=[]}var h=u.prototype;h.addListener=function(n,e){this.listeners.push({event:n,callback:e})},h.removeListener=function(n,e){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===n&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(n,e){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];n===f.event&&f.callback(e)}},A.exports=u})])})})(fe)),fe.exports}var Ze=le.exports,Ae;function qe(){return Ae||(Ae=1,(function(I,O){(function(b,L){I.exports=L(ke())})(Ze,function(A){return(()=>{var b={45:((n,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),n.exports=f}),806:((n,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var d in f)r[d]=f[d];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,n.exports=r}),767:((n,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];n.exports=r}),880:((n,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];n.exports=r}),578:((n,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];n.exports=r}),765:((n,e,i)=>{var f=i(551).FDLayout,r=i(578),d=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,v=i(551).PointD,N=i(551).DimensionD,P=i(551).Layout,C=i(551).Integer,U=i(551).IGeometry,k=i(551).LGraph,X=i(551).Transform,J=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var it in f)D[it]=f[it];D.prototype.newGraphManager=function(){var a=new r(this);return this.graphManager=a,a},D.prototype.newGraph=function(a){return new d(null,this.graphManager,a)},D.prototype.newNode=function(a){return new t(this.graphManager,a)},D.prototype.newEdge=function(a){return new s(null,null,a)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,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)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(R){return E.has(R)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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-Math.pow(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 a=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return a.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2: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()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),E={},p=0;p<a.length;p++){var m=a[p].rect,y=a[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var a=this.getAllNodes(),E,p=0;p<a.length;p++)E=a[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<a.length;p++)E=a[p],E.move()},D.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function M(H){for(var B=H.getChild().getNodes(),j,lt=0,Q=0;Q<B.length;Q++)j=B[Q],j.getChild()==null?a.fixedNodeSet.has(j.id)&&(lt+=100):lt+=M(j);return lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(B){a.fixedNodeSet.add(B.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var R=y(m);R>0&&(m.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var w=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){a.fixedNodesOnHorizontal.add(M),a.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var V=this.constraints.alignmentConstraint.vertical,p=0;p<V.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),V[p].forEach(function(H){w.set(H,"dummy"+p),a.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),a.fixedNodeSet.has(H)&&a.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){S.set(H,"dummy"+p),a.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),a.fixedNodeSet.has(H)&&a.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(M){var H,B,j;for(j=M.length-1;j>=2*M.length/3;j--)H=Math.floor(Math.random()*(j+1)),B=M[j],M[j]=M[H],M[H]=B;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var H=w.has(M.left)?w.get(M.left):M.left,B=w.has(M.right)?w.get(M.right):M.right;a.nodesInRelativeHorizontal.includes(H)||(a.nodesInRelativeHorizontal.push(H),a.nodeToRelativeConstraintMapHorizontal.set(H,[]),a.dummyToNodeForVerticalAlignment.has(H)?a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(H).getCenterX())),a.nodesInRelativeHorizontal.includes(B)||(a.nodesInRelativeHorizontal.push(B),a.nodeToRelativeConstraintMapHorizontal.set(B,[]),a.dummyToNodeForVerticalAlignment.has(B)?a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(B).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:M.gap}),a.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:M.gap})}else{var j=S.has(M.top)?S.get(M.top):M.top,lt=S.has(M.bottom)?S.get(M.bottom):M.bottom;a.nodesInRelativeVertical.includes(j)||(a.nodesInRelativeVertical.push(j),a.nodeToRelativeConstraintMapVertical.set(j,[]),a.dummyToNodeForHorizontalAlignment.has(j)?a.nodeToTempPositionMapVertical.set(j,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(j)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(j,a.idToNodeMap.get(j).getCenterY())),a.nodesInRelativeVertical.includes(lt)||(a.nodesInRelativeVertical.push(lt),a.nodeToRelativeConstraintMapVertical.set(lt,[]),a.dummyToNodeForHorizontalAlignment.has(lt)?a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(lt).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(j).push({bottom:lt,gap:M.gap}),a.nodeToRelativeConstraintMapVertical.get(lt).push({top:j,gap:M.gap})}});else{var q=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var H=w.has(M.left)?w.get(M.left):M.left,B=w.has(M.right)?w.get(M.right):M.right;q.has(H)?q.get(H).push(B):q.set(H,[B]),q.has(B)?q.get(B).push(H):q.set(B,[H])}else{var j=S.has(M.top)?S.get(M.top):M.top,lt=S.has(M.bottom)?S.get(M.bottom):M.bottom;W.has(j)?W.get(j).push(lt):W.set(j,[lt]),W.has(lt)?W.get(lt).push(j):W.set(lt,[j])}});var Y=function(H,B){var j=[],lt=[],Q=new J,It=new Set,Nt=0;return H.forEach(function(vt,nt){if(!It.has(nt)){j[Nt]=[],lt[Nt]=!1;var ut=nt;for(Q.push(ut),It.add(ut),j[Nt].push(ut);Q.length!=0;){ut=Q.shift(),B.has(ut)&&(lt[Nt]=!0);var Et=H.get(ut);Et.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),j[Nt].push(At))})}Nt++}}),{components:j,isFixed:lt}},rt=Y(q,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var z=Y(W,a.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var M=a.idToNodeMap.get(z.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var R=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,p=0;p<w.length;p++){for(var S=0,y=0;y<w[p].length;y++){if(this.fixedNodeSet.has(w[p][y])){S=0;break}S+=this.idToNodeMap.get(w[p][y]).displacementY}for(var V=S/w[p].length,y=0;y<w[p].length;y++)this.idToNodeMap.get(w[p][y]).displacementY=V}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(z){if(!a.fixedNodesOnHorizontal.has(z)){var M=0;a.dummyToNodeForVerticalAlignment.has(z)?M=a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(z)[0]).displacementX:M=a.idToNodeMap.get(z).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(z).forEach(function(H){if(H.right){var B=a.nodeToTempPositionMapHorizontal.get(H.right)-a.nodeToTempPositionMapHorizontal.get(z)-M;B<H.gap&&(M-=H.gap-B)}else{var B=a.nodeToTempPositionMapHorizontal.get(z)-a.nodeToTempPositionMapHorizontal.get(H.left)+M;B<H.gap&&(M+=H.gap-B)}}),a.nodeToTempPositionMapHorizontal.set(z,a.nodeToTempPositionMapHorizontal.get(z)+M),a.dummyToNodeForVerticalAlignment.has(z)?a.dummyToNodeForVerticalAlignment.get(z).forEach(function(H){a.idToNodeMap.get(H).displacementX=M}):a.idToNodeMap.get(z).displacementX=M}}),this.nodesInRelativeVertical.forEach(function(z){if(!a.fixedNodesOnHorizontal.has(z)){var M=0;a.dummyToNodeForHorizontalAlignment.has(z)?M=a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(z)[0]).displacementY:M=a.idToNodeMap.get(z).displacementY,a.nodeToRelativeConstraintMapVertical.get(z).forEach(function(H){if(H.bottom){var B=a.nodeToTempPositionMapVertical.get(H.bottom)-a.nodeToTempPositionMapVertical.get(z)-M;B<H.gap&&(M-=H.gap-B)}else{var B=a.nodeToTempPositionMapVertical.get(z)-a.nodeToTempPositionMapVertical.get(H.top)+M;B<H.gap&&(M+=H.gap-B)}}),a.nodeToTempPositionMapVertical.set(z,a.nodeToTempPositionMapVertical.get(z)+M),a.dummyToNodeForHorizontalAlignment.has(z)?a.dummyToNodeForHorizontalAlignment.get(z).forEach(function(H){a.idToNodeMap.get(H).displacementY=M}):a.idToNodeMap.get(z).displacementY=M}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){a.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var q=0,W=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var Y=this.dummyToNodeForVerticalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementX,W+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementX,W++;for(var rt=q/W,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){a.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(B){a.idToNodeMap.get(B).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var q=0,W=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var Y=this.dummyToNodeForHorizontalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementY,W+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementY,W++;for(var rt=q/W,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(Q){a.idToNodeMap.get(Q).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(a=a.concat(E.getNodes()));return a},D.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<a.length;p++){var m=a[p];if(!E.has(m)){var y=m.getSource(),R=m.getTarget();if(y==R)m.getBendpoints().push(new v),m.getBendpoints().push(new v),this.createDummyNodesForBendpoints(m),E.add(m);else{var w=[];if(w=w.concat(y.getEdgeListToNode(R)),w=w.concat(R.getEdgeListToNode(y)),!E.has(w[0])){if(w.length>1){var S;for(S=0;S<w.length;S++){var V=w[S];V.getBendpoints().push(new v),this.createDummyNodesForBendpoints(V)}}w.forEach(function(x){E.add(x)})}}}if(E.size==a.length)break}},D.prototype.positionNodesRadially=function(a){for(var E=new g(0,0),p=Math.ceil(Math.sqrt(a.length)),m=0,y=0,R=0,w=new v(0,0),S=0;S<a.length;S++){S%p==0&&(R=0,y=m,S!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var V=a[S],x=P.findCenterOfTree(V);E.x=R,E.y=y,w=D.radialLayout(V,x,E),w.y>m&&(m=Math.floor(w.y)),R=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(a,E,p){var m=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(E,null,0,359,0,m);var y=k.calculateBounds(a),R=new X;R.setDeviceOrgX(y.getMinX()),R.setDeviceOrgY(y.getMinY()),R.setWorldOrgX(p.x),R.setWorldOrgY(p.y);for(var w=0;w<a.length;w++){var S=a[w];S.transform(R)}var V=new v(y.getMaxX(),y.getMaxY());return R.inverseTransformPoint(V)},D.branchRadialLayout=function(a,E,p,m,y,R){var w=(m-p+1)/2;w<0&&(w+=180);var S=(w+p)%360,V=S*U.TWO_PI/360,x=y*Math.cos(V),q=y*Math.sin(V);a.setCenter(x,q);var W=[];W=W.concat(a.getEdges());var Y=W.length;E!=null&&Y--;for(var rt=0,z=W.length,M,H=a.getEdgesBetween(E);H.length>1;){var B=H[0];H.splice(0,1);var j=W.indexOf(B);j>=0&&W.splice(j,1),z--,Y--}E!=null?M=(W.indexOf(H[0])+1)%z:M=0;for(var lt=Math.abs(m-p)/Y,Q=M;rt!=Y;Q=++Q%z){var It=W[Q].getOtherEnd(a);if(It!=E){var Nt=(p+rt*lt)%360,vt=(Nt+lt)%360;D.branchRadialLayout(It,a,Nt,vt,y+R,R),rt++}}},D.maxDiagonalInTree=function(a){for(var E=C.MIN_VALUE,p=0;p<a.length;p++){var m=a[p],y=m.getDiagonal();y>E&&(E=y)}return E},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var a=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var R=m[y],w=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(w.id==null||!this.getToBeTiled(w))&&p.push(R)}for(var y=0;y<p.length;y++){var R=p[y],S=R.getParent().id;typeof E[S]>"u"&&(E[S]=[]),E[S]=E[S].concat(R)}Object.keys(E).forEach(function(V){if(E[V].length>1){var x="DummyCompound_"+V;a.memberGroups[x]=E[V];var q=E[V][0].getParent(),W=new t(a.graphManager);W.id=x,W.paddingLeft=q.paddingLeft||0,W.paddingRight=q.paddingRight||0,W.paddingBottom=q.paddingBottom||0,W.paddingTop=q.paddingTop||0,a.idToDummyNode[x]=W;var Y=a.getGraphManager().add(a.newGraph(),W),rt=q.getChild();rt.add(W);for(var z=0;z<E[V].length;z++){var M=E[V][z];rt.remove(M),Y.add(M)}}})},D.prototype.clearCompounds=function(){var a={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],a[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,E)},D.prototype.clearZeroDegreeMembers=function(){var a=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=a.idToDummyNode[p];if(E[p]=a.tileNodes(a.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,R=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(R+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>R?(m.rect.y-=(m.labelHeight-R)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-R)/2):m.labelPosVertical=="bottom"&&m.setHeight(R+m.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var E=this.compoundOrder[a],p=E.id,m=E.paddingLeft,y=E.paddingTop,R=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,R,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var a=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=a.idToDummyNode[p],y=m.paddingLeft,R=m.paddingTop,w=m.labelMarginLeft,S=m.labelMarginTop;a.adjustLocations(E[p],m.rect.x,m.rect.y,y,R,w,S)})},D.prototype.getToBeTiled=function(a){var E=a.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=a.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var R=m[y];if(this.getNodeDegree(R)>0)return this.toBeTiled[E]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},D.prototype.getNodeDegree=function(a){a.id;for(var E=a.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(a){var E=this.getNodeDegree(a);if(a.getChild()==null)return E;for(var p=a.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(a){for(var E=0;E<a.length;E++){var p=a[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(a,E,p,m,y,R,w){E+=m+R,p+=y+w;for(var S=E,V=0;V<a.rows.length;V++){var x=a.rows[V];E=S;for(var q=0,W=0;W<x.length;W++){var Y=x[W];Y.rect.x=E,Y.rect.y=p,E+=Y.rect.width+a.horizontalPadding,Y.rect.height>q&&(q=Y.rect.height)}p+=q+a.verticalPadding}},D.prototype.tileCompoundMembers=function(a,E){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(a[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var R=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(R+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>R?(y.rect.x-=(y.labelWidth-R)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-R)/2):y.labelPosHorizontal=="right"&&y.setWidth(R+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(a,E){var p=this.tileNodesByFavoringDim(a,E,!0),m=this.tileNodesByFavoringDim(a,E,!1),y=this.getOrgRatio(p),R=this.getOrgRatio(m),w;return R<y?w=m:w=p,w},D.prototype.getOrgRatio=function(a){var E=a.width,p=a.height,m=E/p;return m<1&&(m=1/m),m},D.prototype.calcIdealRowWidth=function(a,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=a.length,R=0,w=0,S=0;a.forEach(function(z){R+=z.getWidth(),w+=z.getHeight(),z.getWidth()>S&&(S=z.getWidth())});var V=R/y,x=w/y,q=Math.pow(p-m,2)+4*(V+m)*(x+p)*y,W=(m-p+Math.sqrt(q))/(2*(V+m)),Y;E?(Y=Math.ceil(W),Y==W&&Y++):Y=Math.floor(W);var rt=Y*(V+m)-m;return S>rt&&(rt=S),rt+=m*2,rt},D.prototype.tileNodesByFavoringDim=function(a,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,R=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};R&&(w.idealRowWidth=this.calcIdealRowWidth(a,p));var S=function(M){return M.rect.width*M.rect.height},V=function(M,H){return S(H)-S(M)};a.sort(function(z,M){var H=V;return w.idealRowWidth?(H=R,H(z.id,M.id)):H(z,M)});for(var x=0,q=0,W=0;W<a.length;W++){var Y=a[W];x+=Y.getCenterX(),q+=Y.getCenterY()}w.centerX=x/a.length,w.centerY=q/a.length;for(var W=0;W<a.length;W++){var Y=a[W];if(w.rows.length==0)this.insertNodeToRow(w,Y,0,E);else if(this.canAddHorizontal(w,Y.rect.width,Y.rect.height)){var rt=w.rows.length-1;w.idealRowWidth||(rt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,Y,rt,E)}else this.insertNodeToRow(w,Y,w.rows.length,E);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(a,E,p,m){var y=m;if(p==a.rows.length){var R=[];a.rows.push(R),a.rowWidth.push(y),a.rowHeight.push(0)}var w=a.rowWidth[p]+E.rect.width;a.rows[p].length>0&&(w+=a.horizontalPadding),a.rowWidth[p]=w,a.width<w&&(a.width=w);var S=E.rect.height;p>0&&(S+=a.verticalPadding);var V=0;S>a.rowHeight[p]&&(V=a.rowHeight[p],a.rowHeight[p]=S,V=a.rowHeight[p]-V),a.height+=V,a.rows[p].push(E)},D.prototype.getShortestRowIndex=function(a){for(var E=-1,p=Number.MAX_VALUE,m=0;m<a.rows.length;m++)a.rowWidth[m]<p&&(E=m,p=a.rowWidth[m]);return E},D.prototype.getLongestRowIndex=function(a){for(var E=-1,p=Number.MIN_VALUE,m=0;m<a.rows.length;m++)a.rowWidth[m]>p&&(E=m,p=a.rowWidth[m]);return E},D.prototype.canAddHorizontal=function(a,E,p){if(a.idealRowWidth){var m=a.rows.length-1,y=a.rowWidth[m];return y+E+a.horizontalPadding<=a.idealRowWidth}var R=this.getShortestRowIndex(a);if(R<0)return!0;var w=a.rowWidth[R];if(w+a.horizontalPadding+E<=a.width)return!0;var S=0;a.rowHeight[R]<p&&R>0&&(S=p+a.verticalPadding-a.rowHeight[R]);var V;a.width-w>=E+a.horizontalPadding?V=(a.height+S)/(w+E+a.horizontalPadding):V=(a.height+S)/a.width,S=p+a.verticalPadding;var x;return a.width<E?x=(a.height+S)/E:x=(a.height+S)/a.width,x<1&&(x=1/x),V<1&&(V=1/V),V<x},D.prototype.shiftToLastRow=function(a){var E=this.getLongestRowIndex(a),p=a.rowWidth.length-1,m=a.rows[E],y=m[m.length-1],R=y.width+a.horizontalPadding;if(a.width-a.rowWidth[p]>R&&E!=p){m.splice(-1,1),a.rows[p].push(y),a.rowWidth[E]=a.rowWidth[E]-R,a.rowWidth[p]=a.rowWidth[p]+R,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var w=Number.MIN_VALUE,S=0;S<m.length;S++)m[S].height>w&&(w=m[S].height);E>0&&(w+=a.verticalPadding);var V=a.rowHeight[E]+a.rowHeight[p];a.rowHeight[E]=w,a.rowHeight[p]<y.height+a.verticalPadding&&(a.rowHeight[p]=y.height+a.verticalPadding);var x=a.rowHeight[E]+a.rowHeight[p];a.height+=x-V,this.shiftToLastRow(a)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var a=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var R=0;R<m.length;R++)if(p=m[R],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var w=p.getEdges()[0].getOtherEnd(p),S=new N(p.getCenterX()-w.getCenterX(),p.getCenterY()-w.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var V=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(V.push(y[x]),y[x][0].getOwner().remove(y[x][0]));a.push(V),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},D.prototype.growTree=function(a){for(var E=a.length,p=a[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(a){var E,p,m=a[0];if(m==a[1].source?p=a[1].target:p=a[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+a[3].getWidth(),p.getCenterY()+a[3].getHeight());else{var y=p.startX,R=p.finishX,w=p.startY,S=p.finishY,V=0,x=0,q=0,W=0,Y=[V,q,x,W];if(w>0)for(var rt=y;rt<=R;rt++)Y[0]+=this.grid[rt][w-1].length+this.grid[rt][w].length-1;if(R<this.grid.length-1)for(var rt=w;rt<=S;rt++)Y[1]+=this.grid[R+1][rt].length+this.grid[R][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=R;rt++)Y[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=w;rt<=S;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var z=C.MAX_VALUE,M,H,B=0;B<Y.length;B++)Y[B]<z?(z=Y[B],M=1,H=B):Y[B]==z&&M++;if(M==3&&z==0)Y[0]==0&&Y[1]==0&&Y[2]==0?E=1:Y[0]==0&&Y[1]==0&&Y[3]==0?E=0:Y[0]==0&&Y[2]==0&&Y[3]==0?E=3:Y[1]==0&&Y[2]==0&&Y[3]==0&&(E=2);else if(M==2&&z==0){var j=Math.floor(Math.random()*2);Y[0]==0&&Y[1]==0?j==0?E=0:E=1:Y[0]==0&&Y[2]==0?j==0?E=0:E=2:Y[0]==0&&Y[3]==0?j==0?E=0:E=3:Y[1]==0&&Y[2]==0?j==0?E=1:E=2:Y[1]==0&&Y[3]==0?j==0?E=1:E=3:j==0?E=2:E=3}else if(M==4&&z==0){var j=Math.floor(Math.random()*4);E=j}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},n.exports=D}),991:((n,e,i)=>{var f=i(551).FDLayoutNode,r=i(551).IMath;function d(s,o,c,l){f.call(this,s,o,c,l)}d.prototype=Object.create(f.prototype);for(var t in f)d[t]=f[t];d.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},d.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},d.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.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},d.prototype.setPred1=function(s){this.pred1=s},d.prototype.getPred1=function(){return pred1},d.prototype.getPred2=function(){return pred2},d.prototype.setNext=function(s){this.next=s},d.prototype.getNext=function(){return next},d.prototype.setProcessed=function(s){this.processed=s},d.prototype.isProcessed=function(){return processed},n.exports=d}),902:((n,e,i)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var r=i(806),d=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,v=[],N=[],P=c.getAllNodes(),C=0,U=0;U<P.length;U++){var k=P[U];k.getChild()==null&&(g.set(k.id,C++),v.push(k.getCenterX()),N.push(k.getCenterY()),T.set(k.id,k))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=r.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=r.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var X=function(G,$){return{x:G.x-$.x,y:G.y-$.y}},J=function(G){var $=0,K=0;return G.forEach(function(Z){$+=v[g.get(Z)],K+=N[g.get(Z)]}),{x:$/G.size,y:K/G.size}},D=function(G,$,K,Z,at){function gt(ft,st){var Lt=new Set(ft),ct=!0,ht=!1,Xt=void 0;try{for(var Tt=st[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){ht=!0,Xt=bt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}return Lt}var ot=new Map;G.forEach(function(ft,st){ot.set(st,0)}),G.forEach(function(ft,st){ft.forEach(function(Lt){ot.set(Lt.id,ot.get(Lt.id)+1)})});var et=new Map,_=new Map,dt=new d;ot.forEach(function(ft,st){ft==0?(dt.push(st),K||($=="horizontal"?et.set(st,g.has(st)?v[g.get(st)]:Z.get(st)):et.set(st,g.has(st)?N[g.get(st)]:Z.get(st)))):et.set(st,Number.NEGATIVE_INFINITY),K&&_.set(st,new Set([st]))}),K&&at.forEach(function(ft){var st=[];if(ft.forEach(function(ht){K.has(ht)&&st.push(ht)}),st.length>0){var Lt=0;st.forEach(function(ht){$=="horizontal"?(et.set(ht,g.has(ht)?v[g.get(ht)]:Z.get(ht)),Lt+=et.get(ht)):(et.set(ht,g.has(ht)?N[g.get(ht)]:Z.get(ht)),Lt+=et.get(ht))}),Lt=Lt/st.length,ft.forEach(function(ht){K.has(ht)||et.set(ht,Lt)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=g.has(ht)?v[g.get(ht)]:Z.get(ht):ct+=g.has(ht)?N[g.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){et.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Lt=G.get(st);Lt.forEach(function(ct){if(et.get(ct.id)<et.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if($=="horizontal"?ht=g.has(ct.id)?v[g.get(ct.id)]:Z.get(ct.id):ht=g.has(ct.id)?N[g.get(ct.id)]:Z.get(ct.id),et.set(ct.id,ht),ht<et.get(st)+ct.gap){var Xt=et.get(st)+ct.gap-ht;_.get(st).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ct.id,et.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&dt.push(ct.id),K&&_.set(ct.id,gt(_.get(st),_.get(ct.id)))})};dt.length!=0;)wt();if(K){var pt=new Set;G.forEach(function(ft,st){ft.length==0&&pt.add(st)});var xt=[];_.forEach(function(ft,st){if(pt.has(st)){var Lt=!1,ct=!0,ht=!1,Xt=void 0;try{for(var Tt=ft[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){ht=!0,Xt=St}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(ft))[0])&&(bt=!0,zt=kt)}),bt?ft.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(ft))}}}),xt.forEach(function(ft,st){var Lt=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=ft[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;$=="horizontal"?kt=g.has(St)?v[g.get(St)]:Z.get(St):kt=g.has(St)?N[g.get(St)]:Z.get(St);var Kt=et.get(St);kt<Lt&&(Lt=kt),kt>ht&&(ht=kt),Kt<ct&&(ct=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var ce=(Lt+ht)/2-(ct+Xt)/2,Qt=!0,_t=!1,jt=void 0;try{for(var Jt=ft[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+ce)}}catch(ee){_t=!0,jt=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(_t)throw jt}}})}return et},it=function(G){var $=0,K=0,Z=0,at=0;if(G.forEach(function(_){_.left?v[g.get(_.left)]-v[g.get(_.right)]>=0?$++:K++:N[g.get(_.top)]-N[g.get(_.bottom)]>=0?Z++:at++}),$>K&&Z>at)for(var gt=0;gt<g.size;gt++)v[gt]=-1*v[gt],N[gt]=-1*N[gt];else if($>K)for(var ot=0;ot<g.size;ot++)v[ot]=-1*v[ot];else if(Z>at)for(var et=0;et<g.size;et++)N[et]=-1*N[et]},a=function(G){var $=[],K=new d,Z=new Set,at=0;return G.forEach(function(gt,ot){if(!Z.has(ot)){$[at]=[];var et=ot;for(K.push(et),Z.add(et),$[at].push(et);K.length!=0;){et=K.shift();var _=G.get(et);_.forEach(function(dt){Z.has(dt.id)||(K.push(dt.id),Z.add(dt.id),$[at].push(dt.id))})}at++}}),$},E=function(G){var $=new Map;return G.forEach(function(K,Z){$.set(Z,[])}),G.forEach(function(K,Z){K.forEach(function(at){$.get(Z).push(at),$.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),$},p=function(G){var $=new Map;return G.forEach(function(K,Z){$.set(Z,[])}),G.forEach(function(K,Z){K.forEach(function(at){$.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),$},m=[],y=[],R=!1,w=!1,S=new Set,V=new Map,x=new Map,q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(F){S.add(F.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(F){F.left?(V.has(F.left)?V.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):V.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),V.has(F.right)||V.set(F.right,[])):(V.has(F.top)?V.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):V.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),V.has(F.bottom)||V.set(F.bottom,[]))}),x=E(V),q=a(x)),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(F,G){m[G]=[F.position.x,F.position.y],y[G]=[v[g.get(F.nodeId)],N[g.get(F.nodeId)]]}),R=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var G=l.alignmentConstraint.vertical,$=function(et){var _=new Set;G[et].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return S.has(pt)})),wt=void 0;dt.size>0?wt=v[g.get(dt.values().next().value)]:wt=J(_).x,G[et].forEach(function(pt){m[F]=[wt,N[g.get(pt)]],y[F]=[v[g.get(pt)],N[g.get(pt)]],F++})},K=0;K<G.length;K++)$(K);R=!0}if(l.alignmentConstraint.horizontal){for(var Z=l.alignmentConstraint.horizontal,at=function(et){var _=new Set;Z[et].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return S.has(pt)})),wt=void 0;dt.size>0?wt=v[g.get(dt.values().next().value)]:wt=J(_).y,Z[et].forEach(function(pt){m[F]=[v[g.get(pt)],wt],y[F]=[v[g.get(pt)],N[g.get(pt)]],F++})},gt=0;gt<Z.length;gt++)at(gt);R=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var W=0,Y=0,rt=0;rt<q.length;rt++)q[rt].length>W&&(W=q[rt].length,Y=rt);if(W<x.size/2)it(l.relativePlacementConstraint),R=!1,w=!1;else{var z=new Map,M=new Map,H=[];q[Y].forEach(function(F){V.get(F).forEach(function(G){G.direction=="horizontal"?(z.has(F)?z.get(F).push(G):z.set(F,[G]),z.has(G.id)||z.set(G.id,[]),H.push({left:F,right:G.id})):(M.has(F)?M.get(F).push(G):M.set(F,[G]),M.has(G.id)||M.set(G.id,[]),H.push({top:F,bottom:G.id}))})}),it(H),w=!1;var B=D(z,"horizontal"),j=D(M,"vertical");q[Y].forEach(function(F,G){y[G]=[v[g.get(F)],N[g.get(F)]],m[G]=[],B.has(F)?m[G][0]=B.get(F):m[G][0]=v[g.get(F)],j.has(F)?m[G][1]=j.get(F):m[G][1]=N[g.get(F)]}),R=!0}}if(R){for(var lt=void 0,Q=t.transpose(m),It=t.transpose(y),Nt=0;Nt<Q.length;Nt++)Q[Nt]=t.multGamma(Q[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(Q,t.transpose(It)),nt=s.svd(vt);lt=t.multMat(nt.V,t.transpose(nt.U));for(var ut=0;ut<g.size;ut++){var Et=[v[ut],N[ut]],At=[lt[0][0],lt[1][0]],Ot=[lt[0][1],lt[1][1]];v[ut]=t.dotProduct(Et,At),N[ut]=t.dotProduct(Et,Ot)}w&&it(l.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,G){var $={x:v[g.get(F.nodeId)],y:N[g.get(F.nodeId)]},K=F.position,Z=X(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,v.forEach(function(F,G){v[G]+=mt.x}),N.forEach(function(F,G){N[G]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){v[g.get(F.nodeId)]=F.position.x,N[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(G){var $=new Set;Dt[G].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=v[g.get(K.values().next().value)]:Z=J($).x,$.forEach(function(at){S.has(at)||(v[g.get(at)]=Z)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(G){var $=new Set;Ut[G].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=N[g.get(K.values().next().value)]:Z=J($).y,$.forEach(function(at){S.has(at)||(N[g.get(at)]=Z)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var F=new Map,G=new Map,$=new Map,K=new Map,Z=new Map,at=new Map,gt=new Set,ot=new Set;if(S.forEach(function(Gt){gt.add(Gt),ot.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,_=function(yt){$.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),$.get("dummy"+yt).push(Mt),S.has(Mt)&>.add("dummy"+yt)}),Z.set("dummy"+yt,v[g.get(et[yt][0])])},dt=0;dt<et.length;dt++)_(dt);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){G.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),S.has(Mt)&&ot.add("dummy"+yt)}),at.set("dummy"+yt,N[g.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var ft=new Map,st=new Map,Lt=function(yt){V.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ft.has(Zt)?ft.get(Zt).push($t):ft.set(Zt,[$t]),ft.has($t.id)||ft.set($t.id,[])):(Zt=G.get(yt)?G.get(yt):yt,G.get(Mt.id)?$t={id:G.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,st.has(Zt)?st.get(Zt).push($t):st.set(Zt,[$t]),st.has($t.id)||st.set($t.id,[]))})},ct=!0,ht=!1,Xt=void 0;try{for(var Tt=V.keys()[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){ht=!0,Xt=Gt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}var bt=E(ft),zt=E(st),St=a(bt),kt=a(zt),Kt=p(ft),ce=p(st),Qt=[],_t=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){_t[yt]=[],Gt.forEach(function(Mt){ce.get(Mt).length==0&&_t[yt].push(Mt)})});var jt=D(ft,"horizontal",gt,Z,Qt),Jt=D(st,"vertical",ot,at,_t),oe=function(yt){$.get(yt)?$.get(yt).forEach(function(Mt){v[g.get(Mt)]=jt.get(yt)}):v[g.get(yt)]=jt.get(yt)},te=!0,ee=!1,me=void 0;try{for(var ge=jt.keys()[Symbol.iterator](),Ee;!(te=(Ee=ge.next()).done);te=!0){var ue=Ee.value;oe(ue)}}catch(Gt){ee=!0,me=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw me}}var Ve=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){N[g.get(Mt)]=Jt.get(yt)}):N[g.get(yt)]=Jt.get(yt)},de=!0,Te=!1,Ne=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),Le;!(de=(Le=ve.next()).done);de=!0){var ue=Le.value;Ve(ue)}}catch(Gt){Te=!0,Ne=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Te)throw Ne}}})()}for(var Yt=0;Yt<P.length;Yt++){var Wt=P[Yt];Wt.getChild()==null&&Wt.setCenter(v[g.get(Wt.id)],N[g.get(Wt.id)])}},n.exports=o}),551:(n=>{n.exports=A})},L={};function u(n){var e=L[n];if(e!==void 0)return e.exports;var i=L[n]={exports:{}};return b[n](i,i.exports,u),i.exports}var h=u(45);return h})()})})(le)),le.exports}var Qe=he.exports,we;function Je(){return we||(we=1,(function(I,O){(function(b,L){I.exports=L(qe())})(Qe,function(A){return(()=>{var b={658:(n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r<i;r++)f[r-1]=arguments[r];return f.forEach(function(d){Object.keys(d).forEach(function(t){return e[t]=d[t]})}),e}}),548:((n,e,i)=>{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var v=s[Symbol.iterator](),N;!(l=(N=v.next()).done)&&(c.push(N.value),!(o&&c.length===o));l=!0);}catch(P){T=!0,g=P}finally{try{!l&&v.return&&v.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,d={};d.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},d.connectComponents=function(t,s,o,c){var l=new r,T=new Set,g=[],v=void 0,N=void 0,P=void 0,C=!1,U=1,k=[],X=[],J=function(){var it=t.collection();X.push(it);var a=o[0],E=t.collection();E.merge(a).merge(a.descendants().intersection(s)),g.push(a),E.forEach(function(y){l.push(y),T.add(y),it.merge(y)});for(var p=function(){a=l.shift();var R=t.collection();a.neighborhood().nodes().forEach(function(x){s.intersection(a.edgesWith(x)).length>0&&R.merge(x)});for(var w=0;w<R.length;w++){var S=R[w];if(v=o.intersection(S.union(S.ancestors())),v!=null&&!T.has(v[0])){var V=v.union(v.descendants());V.forEach(function(x){l.push(x),T.add(x),it.merge(x),o.has(x)&&g.push(x)})}}};l.length!=0;)p();if(it.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(R){it.has(R.source())&&it.has(R.target())&&it.merge(R)})}),g.length==o.length&&(C=!0),!C||C&&U>1){N=g[0],P=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<P&&(P=y.connectedEdges().length,N=y)}),k.push(N.id());var m=t.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],o=o.difference(m),U++}};do J();while(!C);return c&&k.length>0&&c.set("dummy"+(c.size+1),k),X},d.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,N=!1,P=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),U;!(v=(U=C.next()).done);v=!0){var k=U.value,X=f(k,2),J=X[0],D=X[1],it=o.cy.getElementById(J);if(it){var a=it.boundingBox(),E=s.xCoords[D]-a.w/2,p=s.xCoords[D]+a.w/2,m=s.yCoords[D]-a.h/2,y=s.yCoords[D]+a.h/2;E<c&&(c=E),p>l&&(l=p),m<T&&(T=m),y>g&&(g=y)}}}catch(x){N=!0,P=x}finally{try{!v&&C.return&&C.return()}finally{if(N)throw P}}var R=t.x-(l+c)/2,w=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+R}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],W=q.getRect().x,Y=q.getRect().x+q.getRect().width,rt=q.getRect().y,z=q.getRect().y+q.getRect().height;W<c&&(c=W),Y>l&&(l=Y),rt<T&&(T=rt),z>g&&(g=z)});var S=t.x-(l+c)/2,V=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+S,q.getCenterY()+V)})}}},d.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,N=void 0,P=void 0,C=void 0,U=void 0,k=t.descendants().not(":parent"),X=k.length,J=0;J<X;J++){var D=k[J];N=s[c.get(D.id())]-D.width()/2,P=s[c.get(D.id())]+D.width()/2,C=o[c.get(D.id())]-D.height()/2,U=o[c.get(D.id())]+D.height()/2,l>N&&(l=N),T<P&&(T=P),g>C&&(g=C),v<U&&(v=U)}var it={};return it.topLeftX=l,it.topLeftY=g,it.width=T-l,it.height=v-g,it},d.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},n.exports=d}),816:((n,e,i)=>{var f=i(548),r=i(140).CoSELayout,d=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(v,N){var P=v.cy,C=v.eles,U=C.nodes(),k=C.edges(),X=void 0,J=void 0,D=void 0,it={};v.randomize&&(X=N.nodeIndexes,J=N.xCoords,D=N.yCoords);var a=function(x){return typeof x=="function"},E=function(x,q){return a(x)?x(q):x},p=f.calcParentsWithoutChildren(P,C),m=function V(x,q,W,Y){for(var rt=q.length,z=0;z<rt;z++){var M=q[z],H=null;M.intersection(p).length==0&&(H=M.children());var B=void 0,j=M.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(Y.randomize)if(!M.isParent())B=x.add(new d(W.graphManager,new t(J[X.get(M.id())]-j.w/2,D[X.get(M.id())]-j.h/2),new s(parseFloat(j.w),parseFloat(j.h))));else{var lt=f.calcBoundingBox(M,J,D,X);M.intersection(p).length==0?B=x.add(new d(W.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(lt.width,lt.height))):B=x.add(new d(W.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(parseFloat(j.w),parseFloat(j.h))))}else B=x.add(new d(W.graphManager,new t(M.position("x")-j.w/2,M.position("y")-j.h/2),new s(parseFloat(j.w),parseFloat(j.h))));else B=x.add(new d(this.graphManager));if(B.id=M.data("id"),B.nodeRepulsion=E(Y.nodeRepulsion,M),B.paddingLeft=parseInt(M.css("padding")),B.paddingTop=parseInt(M.css("padding")),B.paddingRight=parseInt(M.css("padding")),B.paddingBottom=parseInt(M.css("padding")),Y.nodeDimensionsIncludeLabels&&(B.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,B.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,B.labelPosVertical=M.css("text-valign"),B.labelPosHorizontal=M.css("text-halign")),it[M.data("id")]=B,isNaN(B.rect.x)&&(B.rect.x=0),isNaN(B.rect.y)&&(B.rect.y=0),H!=null&&H.length>0){var Q=void 0;Q=W.getGraphManager().add(W.newGraph(),B),V(Q,H,W,Y)}}},y=function(x,q,W){for(var Y=0,rt=0,z=0;z<W.length;z++){var M=W[z],H=it[M.data("source")],B=it[M.data("target")];if(H&&B&&H!==B&&H.getEdgesBetween(B).length==0){var j=q.add(x.newEdge(),H,B);j.id=M.id(),j.idealLength=E(v.idealEdgeLength,M),j.edgeElasticity=E(v.edgeElasticity,M),Y+=j.idealLength,rt++}}v.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:a(v.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},R=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};v.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,l.TILE=v.tile,l.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),v.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),v.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new r,S=w.newGraphManager();return m(S.addRoot(),f.getTopMostNodes(U),w,v),y(w,S,k),R(w,v),w.runLayout(),it};n.exports={coseLayout:T}}),212:((n,e,i)=>{var f=(function(){function v(N,P){for(var C=0;C<P.length;C++){var U=P[C];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(N,U.key,U)}}return function(N,P,C){return P&&v(N.prototype,P),C&&v(N,C),N}})();function r(v,N){if(!(v instanceof N))throw new TypeError("Cannot call a class as a function")}var d=i(658),t=i(548),s=i(657),o=s.spectralLayout,c=i(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(N){return 4500},idealEdgeLength:function(N){return 50},edgeElasticity:function(N){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function v(N){r(this,v),this.options=d({},T,N)}return f(v,[{key:"run",value:function(){var P=this,C=this.options,U=C.cy,k=C.eles,X=[],J=[],D=void 0,it=[];C.fixedNodeConstraint&&(!Array.isArray(C.fixedNodeConstraint)||C.fixedNodeConstraint.length==0)&&(C.fixedNodeConstraint=void 0),C.alignmentConstraint&&(C.alignmentConstraint.vertical&&(!Array.isArray(C.alignmentConstraint.vertical)||C.alignmentConstraint.vertical.length==0)&&(C.alignmentConstraint.vertical=void 0),C.alignmentConstraint.horizontal&&(!Array.isArray(C.alignmentConstraint.horizontal)||C.alignmentConstraint.horizontal.length==0)&&(C.alignmentConstraint.horizontal=void 0)),C.relativePlacementConstraint&&(!Array.isArray(C.relativePlacementConstraint)||C.relativePlacementConstraint.length==0)&&(C.relativePlacementConstraint=void 0);var a=C.fixedNodeConstraint||C.alignmentConstraint||C.relativePlacementConstraint;a&&(C.tile=!1,C.packComponents=!1);var E=void 0,p=!1;if(U.layoutUtilities&&C.packComponents&&(E=U.layoutUtilities("get"),E||(E=U.layoutUtilities()),p=!0),k.nodes().length>0)if(p){var R=t.getTopMostNodes(C.eles.nodes());if(D=t.connectComponents(U,C.eles,R),D.forEach(function(vt){var nt=vt.boundingBox();it.push({x:nt.x1+nt.w/2,y:nt.y1+nt.h/2})}),C.randomize&&D.forEach(function(vt){C.eles=vt,X.push(o(C))}),C.quality=="default"||C.quality=="proof"){var w=U.collection();if(C.tile){var S=new Map,V=[],x=[],q=0,W={nodeIndexes:S,xCoords:V,yCoords:x},Y=[];if(D.forEach(function(vt,nt){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){w.merge(vt.nodes()[Et]),ut.isParent()||(W.nodeIndexes.set(vt.nodes()[Et].id(),q++),W.xCoords.push(vt.nodes()[0].position().x),W.yCoords.push(vt.nodes()[0].position().y))}),Y.push(nt))}),w.length>1){var rt=w.boundingBox();it.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(w),X.push(W);for(var z=Y.length-1;z>=0;z--)D.splice(Y[z],1),X.splice(Y[z],1),it.splice(Y[z],1)}}D.forEach(function(vt,nt){C.eles=vt,J.push(l(C,X[nt])),t.relocateComponent(it[nt],J[nt],C)})}else D.forEach(function(vt,nt){t.relocateComponent(it[nt],X[nt],C)});var M=new Set;if(D.length>1){var H=[],B=k.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,nt){var ut=void 0;if(C.quality=="draft"&&(ut=X[nt].nodeIndexes),vt.nodes().not(B).length>0){var Et={};Et.edges=[],Et.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(C.quality=="draft")if(!Ot.isParent())At=ut.get(Ot.id()),Et.nodes.push({x:X[nt].xCoords[At]-Ot.boundingbox().w/2,y:X[nt].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,X[nt].xCoords,X[nt].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else J[nt][Ot.id()]&&Et.nodes.push({x:J[nt][Ot.id()].getLeft(),y:J[nt][Ot.id()].getTop(),width:J[nt][Ot.id()].getWidth(),height:J[nt][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(C.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,X[nt].xCoords,X[nt].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[nt].xCoords[Rt]),Ut.push(X[nt].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[nt].xCoords,X[nt].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[nt].xCoords[Ht]),Pt.push(X[nt].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else J[nt][mt.id()]&&J[nt][Dt.id()]&&Et.edges.push({startX:J[nt][mt.id()].getCenterX(),startY:J[nt][mt.id()].getCenterY(),endX:J[nt][Dt.id()].getCenterX(),endY:J[nt][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),M.add(nt))}});var j=E.packComponents(H,C.randomize).shifts;if(C.quality=="draft")X.forEach(function(vt,nt){var ut=vt.xCoords.map(function(At){return At+j[nt].dx}),Et=vt.yCoords.map(function(At){return At+j[nt].dy});vt.xCoords=ut,vt.yCoords=Et});else{var lt=0;M.forEach(function(vt){Object.keys(J[vt]).forEach(function(nt){var ut=J[vt][nt];ut.setCenter(ut.getCenterX()+j[lt].dx,ut.getCenterY()+j[lt].dy)}),lt++})}}}else{var m=C.eles.boundingBox();if(it.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),C.randomize){var y=o(C);X.push(y)}C.quality=="default"||C.quality=="proof"?(J.push(l(C,X[0])),t.relocateComponent(it[0],J[0],C)):t.relocateComponent(it[0],X[0],C)}var Q=function(nt,ut){if(C.quality=="default"||C.quality=="proof"){typeof nt=="number"&&(nt=ut);var Et=void 0,At=void 0,Ot=nt.data("id");return J.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),C.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Et.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Et.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Et.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Et.y-=At.labelHeight/2))),Et==null&&(Et={x:nt.position("x"),y:nt.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(nt.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:nt.position("x"),y:nt.position("y")}),{x:mt.x,y:mt.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(U,k),Nt=k.filter(function(vt){return vt.css("display")=="none"});C.eles=k.not(Nt),k.nodes().not(":parent").not(Nt).layoutPositions(P,C,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v})();n.exports=g}),657:((n,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,d=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),v=new Map,N=new Map,P=new Map,C=[],U=[],k=[],X=[],J=[],D=[],it=[],a=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,R=o.samplingType,w=o.nodeSeparation,S=void 0,V=function(){for(var G=0,$=0,K=!1;$<S;){G=Math.floor(Math.random()*E),K=!1;for(var Z=0;Z<$;Z++)if(X[Z]==G){K=!0;break}if(!K)X[$]=G,$++;else continue}},x=function(G,$,K){for(var Z=[],at=0,gt=0,ot=0,et=void 0,_=[],dt=0,wt=1,pt=0;pt<E;pt++)_[pt]=p;for(Z[gt]=G,_[G]=0;gt>=at;){ot=Z[at++];for(var xt=C[ot],ft=0;ft<xt.length;ft++)et=N.get(xt[ft]),_[et]==p&&(_[et]=_[ot]+1,Z[++gt]=et);D[ot][$]=_[ot]*w}if(K){for(var st=0;st<E;st++)D[st][$]<J[st]&&(J[st]=D[st][$]);for(var Lt=0;Lt<E;Lt++)J[Lt]>dt&&(dt=J[Lt],wt=Lt)}return wt},q=function(G){var $=void 0;if(G){$=Math.floor(Math.random()*E);for(var Z=0;Z<E;Z++)J[Z]=p;for(var at=0;at<S;at++)X[at]=$,$=x($,at,G)}else{V();for(var K=0;K<S;K++)x(X[K],K,G)}for(var gt=0;gt<E;gt++)for(var ot=0;ot<S;ot++)D[gt][ot]*=D[gt][ot];for(var et=0;et<S;et++)it[et]=[];for(var _=0;_<S;_++)for(var dt=0;dt<S;dt++)it[_][dt]=D[X[dt]][_]},W=function(){for(var G=d.svd(it),$=G.S,K=G.U,Z=G.V,at=$[0]*$[0]*$[0],gt=[],ot=0;ot<S;ot++){gt[ot]=[];for(var et=0;et<S;et++)gt[ot][et]=0,ot==et&&(gt[ot][et]=$[ot]/($[ot]*$[ot]+at/($[ot]*$[ot])))}a=r.multMat(r.multMat(Z,gt),r.transpose(K))},Y=function(){for(var G=void 0,$=void 0,K=[],Z=[],at=[],gt=[],ot=0;ot<E;ot++)K[ot]=Math.random(),Z[ot]=Math.random();K=r.normalize(K),Z=r.normalize(Z);for(var et=m,_=m,dt=void 0;;){for(var wt=0;wt<E;wt++)at[wt]=K[wt];if(K=r.multGamma(r.multL(r.multGamma(at),D,a)),G=r.dotProduct(at,K),K=r.normalize(K),et=r.dotProduct(at,K),dt=Math.abs(et/_),dt<=1+y&&dt>=1)break;_=et}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(_=m;;){for(var xt=0;xt<E;xt++)gt[xt]=Z[xt];if(gt=r.minusOp(gt,r.multCons(at,r.dotProduct(at,gt))),Z=r.multGamma(r.multL(r.multGamma(gt),D,a)),$=r.dotProduct(gt,Z),Z=r.normalize(Z),et=r.dotProduct(gt,Z),dt=Math.abs(et/_),dt<=1+y&&dt>=1)break;_=et}for(var ft=0;ft<E;ft++)gt[ft]=Z[ft];U=r.multCons(at,Math.sqrt(Math.abs(G))),k=r.multCons(gt,Math.sqrt(Math.abs($)))};f.connectComponents(c,l,f.getTopMostNodes(T),v),g.forEach(function(F){f.connectComponents(c,l,f.getTopMostNodes(F.descendants().intersection(l)),v)});for(var rt=0,z=0;z<T.length;z++)T[z].isParent()||N.set(T[z].id(),rt++);var M=!0,H=!1,B=void 0;try{for(var j=v.keys()[Symbol.iterator](),lt;!(M=(lt=j.next()).done);M=!0){var Q=lt.value;N.set(Q,rt++)}}catch(F){H=!0,B=F}finally{try{!M&&j.return&&j.return()}finally{if(H)throw B}}for(var It=0;It<N.size;It++)C[It]=[];g.forEach(function(F){for(var G=F.children().intersection(l);G.nodes(":childless").length==0;)G=G.nodes()[0].children().intersection(l);var $=0,K=G.nodes(":childless")[0].connectedEdges().length;G.nodes(":childless").forEach(function(Z,at){Z.connectedEdges().length<K&&(K=Z.connectedEdges().length,$=at)}),P.set(F.id(),G.nodes(":childless")[$].id())}),T.forEach(function(F){var G=void 0;F.isParent()?G=N.get(P.get(F.id())):G=N.get(F.id()),F.neighborhood().nodes().forEach(function($){l.intersection(F.edgesWith($)).length>0&&($.isParent()?C[G].push(P.get($.id())):C[G].push($.id()))})});var Nt=function(G){var $=N.get(G),K=void 0;v.get(G).forEach(function(Z){c.getElementById(Z).isParent()?K=P.get(Z):K=Z,C[$].push(K),C[N.get(K)].push(G)})},vt=!0,nt=!1,ut=void 0;try{for(var Et=v.keys()[Symbol.iterator](),At;!(vt=(At=Et.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){nt=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(nt)throw ut}}E=N.size;var mt=void 0;if(E>2){S=E<o.sampleSize?E:o.sampleSize;for(var Dt=0;Dt<E;Dt++)D[Dt]=[];for(var Rt=0;Rt<S;Rt++)a[Rt]=[];return o.quality=="draft"||o.step=="all"?(q(R),W(),Y(),mt={nodeIndexes:N,xCoords:U,yCoords:k}):(N.forEach(function(F,G){U.push(c.getElementById(G).position("x")),k.push(c.getElementById(G).position("y"))}),mt={nodeIndexes:N,xCoords:U,yCoords:k}),mt}else{var Ht=N.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(U.push(Pt.x),k.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Wt=Yt.outerWidth();U.push(Pt.x+Ft/2+Wt/2+o.idealEdgeLength),k.push(Pt.y)}return mt={nodeIndexes:N,xCoords:U,yCoords:k},mt}};n.exports={spectralLayout:t}}),579:((n,e,i)=>{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),n.exports=r}),140:(n=>{n.exports=A})},L={};function u(n){var e=L[n];if(e!==void 0)return e.exports;var i=L[n]={exports:{}};return b[n](i,i.exports,u),i.exports}var h=u(579);return h})()})})(he)),he.exports}var Ke=Je();const _e=Be.getDefaultExportFromCjs(Ke);var Me={L:"left",R:"right",T:"top",B:"bottom"},Oe={L:tt.__name(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:tt.__name(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:tt.__name(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:tt.__name(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:tt.__name((I,O)=>I-O+2,"L"),R:tt.__name((I,O)=>I-2,"R"),T:tt.__name((I,O)=>I-O+2,"T"),B:tt.__name((I,O)=>I-2,"B")},je=tt.__name(function(I){return Vt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),De=tt.__name(function(I){const O=I;return O==="L"||O==="R"||O==="T"||O==="B"},"isArchitectureDirection"),Vt=tt.__name(function(I){const O=I;return O==="L"||O==="R"},"isArchitectureDirectionX"),qt=tt.__name(function(I){const O=I;return O==="T"||O==="B"},"isArchitectureDirectionY"),ye=tt.__name(function(I,O){const A=Vt(I)&&qt(O),b=qt(I)&&Vt(O);return A||b},"isArchitectureDirectionXY"),tr=tt.__name(function(I){const O=I[0],A=I[1],b=Vt(O)&&qt(A),L=qt(O)&&Vt(A);return b||L},"isArchitecturePairXY"),er=tt.__name(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),pe=tt.__name(function(I,O){const A=`${I}${O}`;return er(A)?A:void 0},"getArchitectureDirectionPair"),rr=tt.__name(function([I,O],A){const b=A[0],L=A[1];return Vt(b)?qt(L)?[I+(b==="L"?-1:1),O+(L==="T"?1:-1)]:[I+(b==="L"?-1:1),O]:Vt(L)?[I+(L==="L"?1:-1),O+(b==="T"?1:-1)]:[I,O+(b==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ir=tt.__name(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),nr=tt.__name(function(I,O){return ye(I,O)?"bend":Vt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ar=tt.__name(function(I){return I.type==="service"},"isArchitectureService"),or=tt.__name(function(I){return I.type==="junction"},"isArchitectureJunction"),Ie=tt.__name(I=>I.data(),"edgeData"),ie=tt.__name(I=>I.data(),"nodeData"),sr=tt.defaultConfig_default.architecture,ne,Re=(ne=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=tt.setAccTitle,this.getAccTitle=tt.getAccTitle,this.setDiagramTitle=tt.setDiagramTitle,this.getDiagramTitle=tt.getDiagramTitle,this.getAccDescription=tt.getAccDescription,this.setAccDescription=tt.setAccDescription,this.clear()}setDiagramId(O){this.diagramId=O}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",tt.clear()}addService({id:O,icon:A,in:b,title:L,iconText:u}){if(this.registeredIds[O]!==void 0)throw new Error(`The service id [${O}] is already in use by another ${this.registeredIds[O]}`);if(b!==void 0){if(O===b)throw new Error(`The service [${O}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The service [${O}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[b]==="node")throw new Error(`The service [${O}]'s parent is not a group`)}this.registeredIds[O]="node",this.nodes[O]={id:O,type:"service",icon:A,iconText:u,title:L,edges:[],in:b}}getServices(){return Object.values(this.nodes).filter(ar)}addJunction({id:O,in:A}){if(this.registeredIds[O]!==void 0)throw new Error(`The junction id [${O}] is already in use by another ${this.registeredIds[O]}`);if(A!==void 0){if(O===A)throw new Error(`The junction [${O}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The junction [${O}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[A]==="node")throw new Error(`The junction [${O}]'s parent is not a group`)}this.registeredIds[O]="node",this.nodes[O]={id:O,type:"junction",edges:[],in:A}}getJunctions(){return Object.values(this.nodes).filter(or)}getNodes(){return Object.values(this.nodes)}getNode(O){return this.nodes[O]??null}addGroup({id:O,icon:A,in:b,title:L}){if(this.registeredIds?.[O]!==void 0)throw new Error(`The group id [${O}] is already in use by another ${this.registeredIds[O]}`);if(b!==void 0){if(O===b)throw new Error(`The group [${O}] cannot be placed within itself`);if(this.registeredIds?.[b]===void 0)throw new Error(`The group [${O}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[b]==="node")throw new Error(`The group [${O}]'s parent is not a group`)}this.registeredIds[O]="group",this.groups[O]={id:O,icon:A,title:L,in:b}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:O,rhsId:A,lhsDir:b,rhsDir:L,lhsInto:u,rhsInto:h,lhsGroup:n,rhsGroup:e,title:i}){if(!De(b))throw new Error(`Invalid direction given for left hand side of edge ${O}--${A}. Expected (L,R,T,B) got ${String(b)}`);if(!De(L))throw new Error(`Invalid direction given for right hand side of edge ${O}--${A}. Expected (L,R,T,B) got ${String(L)}`);if(this.nodes[O]===void 0&&this.groups[O]===void 0)throw new Error(`The left-hand id [${O}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[O].in,r=this.nodes[A].in;if(n&&f&&r&&f==r)throw new Error(`The left-hand id [${O}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&f&&r&&f==r)throw new Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:O,lhsDir:b,lhsInto:u,lhsGroup:n,rhsId:A,rhsDir:L,rhsInto:h,rhsGroup:e,title:i};this.edges.push(d),this.nodes[O]&&this.nodes[A]&&(this.nodes[O].edges.push(this.edges[this.edges.length-1]),this.nodes[A].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const O={},A=Object.entries(this.nodes).reduce((e,[i,f])=>(e[i]=f.edges.reduce((r,d)=>{const t=this.getNode(d.lhsId)?.in,s=this.getNode(d.rhsId)?.in;if(t&&s&&t!==s){const o=nr(d.lhsDir,d.rhsDir);o!=="bend"&&(O[t]??={},O[t][s]=o,O[s]??={},O[s][t]=o)}if(d.lhsId===i){const o=pe(d.lhsDir,d.rhsDir);o&&(r[o]=d.rhsId)}else{const o=pe(d.rhsDir,d.lhsDir);o&&(r[o]=d.lhsId)}return r},{}),e),{}),b=Object.keys(A)[0],L={[b]:1},u=Object.keys(A).reduce((e,i)=>i===b?e:{...e,[i]:1},{}),h=tt.__name(e=>{const i={[e]:[0,0]},f=[e];for(;f.length>0;){const r=f.shift();if(r){L[r]=1,delete u[r];const d=A[r],[t,s]=i[r];Object.entries(d).forEach(([o,c])=>{L[c]||(i[c]=rr([t,s],o),f.push(c))})}}return i},"BFS"),n=[h(b)];for(;Object.keys(u).length>0;)n.push(h(Object.keys(u)[0]));this.dataStructures={adjList:A,spatialMaps:n,groupAlignments:O}}return this.dataStructures}setElementForId(O,A){this.elements[O]=A}getElementById(O){return this.elements[O]}getConfig(){return tt.cleanAndMerge({...sr,...tt.getConfig().architecture})}getConfigField(O){return this.getConfig()[O]}},tt.__name(ne,"ArchitectureDB"),ne),hr=tt.__name((I,O)=>{We.populateCommonDb(I,O),I.groups.map(A=>O.addGroup(A)),I.services.map(A=>O.addService({...A,type:"service"})),I.junctions.map(A=>O.addJunction({...A,type:"junction"})),I.edges.map(A=>O.addEdge(A))},"populateDb"),Se={parser:{yy:void 0},parse:tt.__name(async I=>{const O=await ze.parse("architecture",I);tt.log.debug(O);const A=Se.parser?.yy;if(!(A instanceof Re))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");hr(O,A)},"parse")},lr=tt.__name(I=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${I.archEdgeWidth};
|
|
4
4
|
stroke: ${I.archEdgeColor};
|