@deep-eye/core 1.3.48 → 1.3.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/{UTIF-C6bUVTkA.js → UTIF-BlIZTUp6.js} +1 -1
- package/dist/{UTIF-CpGrGTC3.cjs → UTIF-D-jppsUg.cjs} +1 -1
- package/dist/{___vite-browser-external_commonjs-proxy-BYmlZwsY.js → ___vite-browser-external_commonjs-proxy-9uWyBnuM.js} +1 -1
- package/dist/{___vite-browser-external_commonjs-proxy-_PE11GZc.cjs → ___vite-browser-external_commonjs-proxy-B1tIqody.cjs} +1 -1
- package/dist/{abnfDiagram-VCTEODGH-Dj1v-UuL.cjs → abnfDiagram-VCTEODGH--tveQvJ7.cjs} +1 -1
- package/dist/{abnfDiagram-VCTEODGH-DDNlE2u7.js → abnfDiagram-VCTEODGH-BBHcJVAL.js} +3 -3
- package/dist/{aiden0z-pptx-renderer.es-DkE7_Ihy.cjs → aiden0z-pptx-renderer.es-6u0m_sW9.cjs} +1 -1
- package/dist/{aiden0z-pptx-renderer.es-D-FDrg2u.js → aiden0z-pptx-renderer.es-C5wa7Q2O.js} +1 -1
- package/dist/{architectureDiagram-5GKGNRK7-BEjN6nna.cjs → architectureDiagram-5GKGNRK7-TsbFdvFS.cjs} +1 -1
- package/dist/{architectureDiagram-5GKGNRK7-Ba3Nk8OL.js → architectureDiagram-5GKGNRK7-cARvFpqj.js} +3 -3
- package/dist/{blockDiagram-I7D4REHJ-ezmF48DT.cjs → blockDiagram-I7D4REHJ-BuEw5c9e.cjs} +1 -1
- package/dist/{blockDiagram-I7D4REHJ-D37OjZY-.js → blockDiagram-I7D4REHJ-ixyOeWQT.js} +3 -3
- package/dist/{c4Diagram-7LVT6UL2-AafN-bHz.js → c4Diagram-7LVT6UL2-BqJO2aVf.js} +2 -2
- package/dist/{c4Diagram-7LVT6UL2-DDzYJCDt.cjs → c4Diagram-7LVT6UL2-C1EXcCHj.cjs} +1 -1
- package/dist/{channel-CFyOO_BV.js → channel-D-t5yGeZ.js} +1 -1
- package/dist/{channel-D0AnA9HC.cjs → channel-DFUC6oDq.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-C40yYE_A.js → chunk-2Q5K7J3B-BmyhSqDh.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-CkYZFx_x.cjs → chunk-2Q5K7J3B-PaAxaTf3.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-DfqA5tow.cjs → chunk-5VM5RSS4-C3mdQtRy.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-BK1ntRKg.js → chunk-5VM5RSS4-DGr3xaoo.js} +1 -1
- package/dist/{chunk-F27PBJKO-LySRDNCZ.cjs → chunk-F27PBJKO-D_5apldD.cjs} +1 -1
- package/dist/{chunk-F27PBJKO-Cm89Fblz.js → chunk-F27PBJKO-QHHCtxCA.js} +1 -1
- package/dist/{chunk-IMKFNOWR-BDyjLSsJ.cjs → chunk-IMKFNOWR-B66aWLKl.cjs} +1 -1
- package/dist/{chunk-IMKFNOWR-DS5hJ--O.js → chunk-IMKFNOWR-CRP3A_qs.js} +5 -5
- package/dist/{chunk-JWPE2WC7-CvjIb4sX.cjs → chunk-JWPE2WC7-Bil73AoD.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-BgDchTI4.js → chunk-JWPE2WC7-C1KeQAEM.js} +1 -1
- package/dist/{chunk-POPQ4Y6H-BGVy8fmB.js → chunk-POPQ4Y6H-28dV0yn9.js} +1 -1
- package/dist/{chunk-POPQ4Y6H-BjSCjuwK.cjs → chunk-POPQ4Y6H-VTXswfsy.cjs} +1 -1
- package/dist/{chunk-SHT3W25Y-CYYBEAIG.cjs → chunk-SHT3W25Y-BJBEgrSj.cjs} +1 -1
- package/dist/{chunk-SHT3W25Y-DuUb9uMn.js → chunk-SHT3W25Y-Rgl-N7_5.js} +7 -7
- package/dist/{chunk-SVP7TREG-C4Ejf7-f.cjs → chunk-SVP7TREG-CTQ_lsFg.cjs} +1 -1
- package/dist/{chunk-SVP7TREG-CdaVCNXY.js → chunk-SVP7TREG-CenhJZLD.js} +1 -1
- package/dist/{chunk-TICWLB2K-QBNwupce.cjs → chunk-TICWLB2K-C_WdVE72.cjs} +1 -1
- package/dist/{chunk-TICWLB2K-B5W0LWgz.js → chunk-TICWLB2K-yxoAiMnL.js} +6 -6
- package/dist/{chunk-XXDRQBXY-Dh1mnOUc.cjs → chunk-XXDRQBXY-BvxNx_Vt.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-aiB4q7pN.js → chunk-XXDRQBXY-DHid8mrY.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-FjxFdlxK.cjs → classDiagram-ZZMXUADV-BAGlh263.cjs} +1 -1
- package/dist/{classDiagram-ZZMXUADV-k6NWyqgB.js → classDiagram-ZZMXUADV-Br4e3cwW.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-FjxFdlxK.cjs → classDiagram-v2-VYDZK3BY-BAGlh263.cjs} +1 -1
- package/dist/{classDiagram-v2-VYDZK3BY-k6NWyqgB.js → classDiagram-v2-VYDZK3BY-Br4e3cwW.js} +2 -2
- package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
- package/dist/components/chat/hydrateHistory.d.ts +3 -1
- package/dist/components/chat/hydrateHistory.d.ts.map +1 -1
- package/dist/components/chat/mdoc/widget/InlineWidgetCard.vue.d.ts.map +1 -1
- package/dist/components/chat/responseStream.d.ts +8 -0
- package/dist/components/chat/responseStream.d.ts.map +1 -1
- package/dist/{cose-bilkent-JH36ORCC-DKE78SUC.cjs → cose-bilkent-JH36ORCC-BkkjSvqt.cjs} +1 -1
- package/dist/{cose-bilkent-JH36ORCC-CtdDmyPS.js → cose-bilkent-JH36ORCC-C87ASZsD.js} +2 -2
- package/dist/{cynefinDiagram-5FMLGOSQ-N2TKx0Yz.js → cynefinDiagram-5FMLGOSQ-CsobHRgN.js} +2 -2
- package/dist/{cynefinDiagram-5FMLGOSQ-Dms-I8kp.cjs → cynefinDiagram-5FMLGOSQ-DJyFdovY.cjs} +1 -1
- package/dist/{dagre-GXQ25YYZ-BLfKBE_Y.js → dagre-GXQ25YYZ-DrrXDaIB.js} +2 -2
- package/dist/{dagre-GXQ25YYZ-Cn1HQqvO.cjs → dagre-GXQ25YYZ-nGlisESO.cjs} +1 -1
- package/dist/{diagram-S7CK7UJ4-s6pkmf8a.cjs → diagram-S7CK7UJ4-BobDu_2D.cjs} +1 -1
- package/dist/{diagram-S7CK7UJ4-CtfbPv36.js → diagram-S7CK7UJ4-D-Y57wSe.js} +3 -3
- package/dist/{diagram-UQ7AKVKN-DiQLabe3.cjs → diagram-UQ7AKVKN-CdKpiBgZ.cjs} +1 -1
- package/dist/{diagram-UQ7AKVKN-PALYdo9v.js → diagram-UQ7AKVKN-I8kHo-dd.js} +2 -2
- package/dist/{diagram-VSXAHHWV-DWLIJ5xh.cjs → diagram-VSXAHHWV-BirFOet9.cjs} +1 -1
- package/dist/{diagram-VSXAHHWV-o_xeFJrf.js → diagram-VSXAHHWV-Bq3EtMJj.js} +2 -2
- package/dist/{diagram-VX7I27RA-Bdxe3bZM.js → diagram-VX7I27RA-0RjBDN07.js} +3 -3
- package/dist/{diagram-VX7I27RA-1zJivqnI.cjs → diagram-VX7I27RA-CuDFb7Es.cjs} +1 -1
- package/dist/{diagram-Z3DM3KII-CLISExOT.js → diagram-Z3DM3KII-CzL4_29H.js} +2 -2
- package/dist/{diagram-Z3DM3KII-BWvJq3XE.cjs → diagram-Z3DM3KII-bUZFX9Q0.cjs} +1 -1
- package/dist/{ebnfDiagram-PWID7BFC-CkyHVRaN.cjs → ebnfDiagram-PWID7BFC-CROiBFPB.cjs} +1 -1
- package/dist/{ebnfDiagram-PWID7BFC-DKRWmng9.js → ebnfDiagram-PWID7BFC-CcItAb6H.js} +3 -3
- package/dist/{erDiagram-RLTQ6QDP-BwOTH5-Y.js → erDiagram-RLTQ6QDP-BM16ijA4.js} +4 -4
- package/dist/{erDiagram-RLTQ6QDP-B8HImTIL.cjs → erDiagram-RLTQ6QDP-BmCZi6Ll.cjs} +1 -1
- package/dist/flowDiagram-HODETNUW-CCs3ub3h.cjs +1 -0
- package/dist/flowDiagram-HODETNUW-DFZdXyHK.js +8 -0
- package/dist/{ganttDiagram-EL5Y4UJY-bTz9GOnH.js → ganttDiagram-EL5Y4UJY-CSANyJJG.js} +2 -2
- package/dist/{ganttDiagram-EL5Y4UJY-D2Co6UQr.cjs → ganttDiagram-EL5Y4UJY-CkcTHHUh.cjs} +1 -1
- package/dist/{gitGraphDiagram-WWUBYQGX-Cf7WqE50.js → gitGraphDiagram-WWUBYQGX-CJaj_GVe.js} +3 -3
- package/dist/{gitGraphDiagram-WWUBYQGX-mnyW0orE.cjs → gitGraphDiagram-WWUBYQGX-D2s8vzlo.cjs} +1 -1
- package/dist/{heic2any-CLnM4XkQ.cjs → heic2any-BZNwpOpu.cjs} +1 -1
- package/dist/{heic2any-ra9HGUg-.js → heic2any-rNfxh_8a.js} +1 -1
- package/dist/{index-BEQN-t94.cjs → index-11uugamP.cjs} +1 -1
- package/dist/{index-DWS9tISy.js → index-64VWX32Q.js} +1 -1
- package/dist/{index-Dog7gAea.js → index-BCUWQQ9L.js} +2 -2
- package/dist/{index-CWkA3b07.cjs → index-C1wy4GPU.cjs} +7 -7
- package/dist/{index-Tu3ULS4U.js → index-C7PesKPq.js} +1 -1
- package/dist/{index-Bloxiqyx.cjs → index-CTI81jel.cjs} +210 -210
- package/dist/{index-CK4F4K6-.cjs → index-CekInfvl.cjs} +1 -1
- package/dist/{index-C6_ElJ4-.js → index-CgqA90PO.js} +38394 -38360
- package/dist/{index-CnmlOcSC.cjs → index-DOtsBLMW.cjs} +1 -1
- package/dist/{index-Cnh1EaDo.cjs → index-Dy9Z8c8U.cjs} +1 -1
- package/dist/{index-KiCple97.js → index-dg0uVM2c.js} +16 -16
- package/dist/{index-DbZIhL7U.js → index-hcTKsNNv.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{infoDiagram-27XIBGKW-B70vhlLH.js → infoDiagram-27XIBGKW-BIwe9zpB.js} +1 -1
- package/dist/{infoDiagram-27XIBGKW-CggyPsOs.cjs → infoDiagram-27XIBGKW-Cb4dnRcI.cjs} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-C4WGPQhc.cjs → ishikawaDiagram-5VMMS53U-B2O3ZkQL.cjs} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-B-su1Mf5.js → ishikawaDiagram-5VMMS53U-DvInq5h0.js} +1 -1
- package/dist/{journeyDiagram-3NMN7TZE-C6k-KChK.js → journeyDiagram-3NMN7TZE-B77I5zO9.js} +3 -3
- package/dist/{journeyDiagram-3NMN7TZE-CJmXAmNs.cjs → journeyDiagram-3NMN7TZE-CWEvi0bG.cjs} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-Bb97GDSA.cjs → kanban-definition-UXKFOSKX-9xNM5RmS.cjs} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-BKPHZNNA.js → kanban-definition-UXKFOSKX-vbLQQJAs.js} +2 -2
- package/dist/{layout-mQTB3tP6.cjs → layout-BlVpb-QN.cjs} +1 -1
- package/dist/{layout-C_R9rxY7.js → layout-pwM7TZMA.js} +1 -1
- package/dist/{leaflet-src-Btd1NKvc.cjs → leaflet-src-CIXKyOTf.cjs} +1 -1
- package/dist/{leaflet-src-B5i9UzjA.js → leaflet-src-MWQD3yea.js} +1 -1
- package/dist/{mermaid.core-3NZiqkiD.js → mermaid.core-Bxy0adAR.js} +44 -44
- package/dist/{mermaid.core-akiFxvQ1.cjs → mermaid.core-DzF5qcy0.cjs} +4 -4
- package/dist/{mindmap-definition-YA3MSWOX-Cg6Sx04O.cjs → mindmap-definition-YA3MSWOX-2KvjUPKa.cjs} +1 -1
- package/dist/{mindmap-definition-YA3MSWOX-FYaqoYow.js → mindmap-definition-YA3MSWOX-DdszNBdX.js} +3 -3
- package/dist/{pegDiagram-XKGWAZYB-roikU-Yp.js → pegDiagram-XKGWAZYB-3cVR0wHF.js} +3 -3
- package/dist/{pegDiagram-XKGWAZYB-A4BfJ6_h.cjs → pegDiagram-XKGWAZYB-bcVihVZo.cjs} +1 -1
- package/dist/{pieDiagram-E7YTZNPT-BGnkPEou.js → pieDiagram-E7YTZNPT-D8J14Pfe.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-B6o7Mcfn.cjs → pieDiagram-E7YTZNPT-DKZfgvnH.cjs} +1 -1
- package/dist/{prism-Dc3ITq7t.cjs → prism-Cgw6S5vx.cjs} +1 -1
- package/dist/{prism-9pVbmlPA.js → prism-DLO929yC.js} +1 -1
- package/dist/{quadrantDiagram-AXDQQJYC-D_zb4J9N.js → quadrantDiagram-AXDQQJYC-CS_ifTZb.js} +1 -1
- package/dist/{quadrantDiagram-AXDQQJYC-BHmbI5ch.cjs → quadrantDiagram-AXDQQJYC-CkrkLNs4.cjs} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-pOZBxucy.cjs → railroadDiagram-O6MQD6OU-DzKpSW0r.cjs} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-BmdJzy8-.js → railroadDiagram-O6MQD6OU-RLmKlSIU.js} +3 -3
- package/dist/{requirementDiagram-BXWQKSXE-CeX08kAg.js → requirementDiagram-BXWQKSXE-BmlsORko.js} +3 -3
- package/dist/{requirementDiagram-BXWQKSXE-nWNdcr6R.cjs → requirementDiagram-BXWQKSXE-DPwHqf0x.cjs} +1 -1
- package/dist/{sankeyDiagram-P5KCCOFB-CfahSdaU.js → sankeyDiagram-P5KCCOFB-CxXOWxw7.js} +1 -1
- package/dist/{sankeyDiagram-P5KCCOFB-CHggSoz-.cjs → sankeyDiagram-P5KCCOFB-DmXoo2Kk.cjs} +1 -1
- package/dist/{sequenceDiagram-WJ2MYXX4-BShO3UHv.js → sequenceDiagram-WJ2MYXX4-BqrfMJQ3.js} +3 -3
- package/dist/{sequenceDiagram-WJ2MYXX4-Cldmxndt.cjs → sequenceDiagram-WJ2MYXX4-ftESBBOs.cjs} +1 -1
- package/dist/{sizeCapture-INFHLROL-BMVPV4DA.cjs → sizeCapture-INFHLROL-CavK5RdJ.cjs} +1 -1
- package/dist/{sizeCapture-INFHLROL-v4ryiiFr.js → sizeCapture-INFHLROL-D0KjulXe.js} +1 -1
- package/dist/{stateDiagram-D77RDMKH-Crd8PNbN.js → stateDiagram-D77RDMKH-Bt5VGiSF.js} +3 -3
- package/dist/{stateDiagram-D77RDMKH-DE7IoKM4.cjs → stateDiagram-D77RDMKH-Y9pjjT_-.cjs} +1 -1
- package/dist/{stateDiagram-v2-MP3YSRHH-BrOKHKgV.js → stateDiagram-v2-MP3YSRHH-Bns42eys.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-Ddw0Psey.cjs → stateDiagram-v2-MP3YSRHH-C9M-BkvO.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-BEI4cIJz.cjs → swimlanes-42K2YHIH-BvgUuz_z.cjs} +1 -1
- package/dist/{swimlanes-42K2YHIH-CHIRbyiB.js → swimlanes-42K2YHIH-C5J-1Cdz.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-B6G3khAm.cjs → swimlanesDiagram-VR7AAH4N-C5wR-YL-.cjs} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-6t3PtgWT.js → swimlanesDiagram-VR7AAH4N-tEpr4uA1.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-BKfbepFL.js → timeline-definition-24CTP7MA-DDvncXi3.js} +1 -1
- package/dist/{timeline-definition-24CTP7MA-BjjrbNmi.cjs → timeline-definition-24CTP7MA-DXjwIJaU.cjs} +1 -1
- package/dist/{togeojson-BCQF3VAL.cjs → togeojson-DKd3hyi0.cjs} +1 -1
- package/dist/{togeojson-DpjgHAJ7.js → togeojson-Mmz2wL1P.js} +1 -1
- package/dist/{vennDiagram-4TSXK5OY-ByGpTQUk.js → vennDiagram-4TSXK5OY-DdvsYjSN.js} +1 -1
- package/dist/{vennDiagram-4TSXK5OY-CzpJ6CvT.cjs → vennDiagram-4TSXK5OY-Dn6rBmcJ.cjs} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-YF4gXKLi.js → wardleyDiagram-VM6X3IG4-D4zH2fe7.js} +2 -2
- package/dist/{wardleyDiagram-VM6X3IG4-Dw9Nre9A.cjs → wardleyDiagram-VM6X3IG4-MonnM1HZ.cjs} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-D5YIxH6D.cjs → xychartDiagram-S5SC5T6Z-BfjrSrJu.cjs} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-CRvT10OA.js → xychartDiagram-S5SC5T6Z-opdwWb4H.js} +1 -1
- package/dist/{xz-decompress-CYkBNYJ9.js → xz-decompress-C9ytU8X1.js} +2 -2
- package/dist/{xz-decompress-CMwV0E_2.cjs → xz-decompress-LS_kK0bf.cjs} +1 -1
- package/package.json +1 -1
- package/dist/flowDiagram-HODETNUW-D2ydoiXz.cjs +0 -1
- package/dist/flowDiagram-HODETNUW-SN9HRzfR.js +0 -8
package/dist/{architectureDiagram-5GKGNRK7-BEjN6nna.cjs → architectureDiagram-5GKGNRK7-TsbFdvFS.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $e=require("./chunk-JWPE2WC7-CvjIb4sX.cjs"),et=require("./mermaid.core-akiFxvQ1.cjs"),Be=require("./cynefin-OW5HDTMX-DaKNJZN5.cjs"),xe=require("./cytoscape.esm-BMd_KE48.cjs"),he=require("./index-Bloxiqyx.cjs"),ke=require("d3");var Ie={exports:{}},de={exports:{}},ve={exports:{}},Ce;function Ze(){return Ce||(Ce=1,function(I,M){(function(x,N){I.exports=N()})(he.commonjsGlobal,function(){return function(C){var x={};function N(v){if(x[v])return x[v].exports;var l=x[v]={i:v,l:!1,exports:{}};return C[v].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=C,N.c=x,N.i=function(v){return v},N.d=function(v,l,a){N.o(v,l)||Object.defineProperty(v,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(v){var l=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(l,"a",l),l},N.o=function(v,l){return Object.prototype.hasOwnProperty.call(v,l)},N.p="",N(N.s=28)}([function(C,x,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v},function(C,x,N){var v=N(2),l=N(8),a=N(9);function r(f,e,g){v.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var i in v)r[i]=v[i];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.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"},r.prototype.getOtherEndInGraph=function(f,e){for(var g=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(g.getOwner()==e)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=r},function(C,x,N){function v(l){this.vGraphObject=l}C.exports=v},function(C,x,N){var v=N(2),l=N(10),a=N(13),r=N(0),i=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.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},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.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},e.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},e.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},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),h=0;h<c.length;h++)s=c[h],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},e.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},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.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)},e.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+i.nextDouble()*(c-o)+o;var h=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+i.nextDouble()*(T-h)+h,this.rect.x=t,this.rect.y=s},e.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()),r.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))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=e},function(C,x,N){var v=N(0);function l(){}for(var a in v)l[a]=v[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=l},function(C,x,N){function v(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(l){this.x=l},v.prototype.setY=function(l){this.y=l},v.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},C.exports=v},function(C,x,N){var v=N(2),l=N(10),a=N(0),r=N(7),i=N(3),f=N(1),e=N(13),g=N(12),t=N(11);function s(c,h,T){v.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[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,h,T){if(h==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(d.source=h,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),T!=h&&T.edges.push(d),d)}},s.prototype.remove=function(c){var h=c;if(c instanceof i){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),u,d=T.length,L=0;L<d;L++)u=T[L],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var b=this.nodes.indexOf(h);if(b==-1)throw"Node not in owner node list!";this.nodes.splice(b,1)}else if(c instanceof f){var u=c;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var w=u.source.edges.indexOf(u),P=u.target.edges.indexOf(u);if(!(w>-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(w,1),u.target!=u.source&&u.target.edges.splice(P,1);var b=u.source.owner.getEdges().indexOf(u);if(b==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,u,d,L=this.getNodes(),b=L.length,w=0;w<b;w++){var P=L[w];T=P.getTop(),u=P.getLeft(),c>T&&(c=T),h>u&&(h=u)}return c==l.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,u=l.MAX_VALUE,d=-l.MAX_VALUE,L,b,w,P,V,Y=this.nodes,B=Y.length,A=0;A<B;A++){var _=Y[A];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),b=_.getRight(),w=_.getTop(),P=_.getBottom(),h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<P&&(d=P)}var n=new e(h,u,T-h,d-u);h==l.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),Y[0].getParent().paddingLeft!=null?V=Y[0].getParent().paddingLeft:V=this.margin,this.left=n.x-V,this.right=n.x+n.width+V,this.top=n.y-V,this.bottom=n.y+n.height+V},s.calculateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,u=l.MAX_VALUE,d=-l.MAX_VALUE,L,b,w,P,V=c.length,Y=0;Y<V;Y++){var B=c[Y];L=B.getLeft(),b=B.getRight(),w=B.getTop(),P=B.getBottom(),h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<P&&(d=P)}var A=new e(h,u,T-h,d-u);return A},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,h=this.nodes,T=h.length,u=0;u<T;u++){var d=h[u];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=a.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 h=new t,T=new Set,u=this.nodes[0],d,L,b=u.withChildren();for(b.forEach(function(A){h.push(A),T.add(A)});h.length!==0;){u=h.shift(),d=u.getEdges();for(var w=d.length,P=0;P<w;P++){var V=d[P];if(L=V.getOtherEndInGraph(u,this),L!=null&&!T.has(L)){var Y=L.withChildren();Y.forEach(function(A){h.push(A),T.add(A)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var B=0;T.forEach(function(A){A.owner==c&&B++}),B==this.nodes.length&&(this.isConnected=!0)}},C.exports=s},function(C,x,N){var v,l=N(1);function a(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(r,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,i,f,e,g){if(f==null&&e==null&&g==null){if(r==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return r.parent=i,i.child=r,r}else{g=f,e=i,f=r;var t=e.getOwner(),s=g.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,e,g);if(f.isInterGraph=!0,f.source=e,f.target=g,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}},a.prototype.remove=function(r){if(r instanceof v){var i=r;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 e,g=f.length,t=0;t<g;t++)e=f[t],i.remove(e);var s=[];s=s.concat(i.getNodes());var o;g=s.length;for(var t=0;t<g;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(r instanceof l){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],i=this.getGraphs(),f=i.length,e=0;e<f;e++)r=r.concat(i[e].getNodes());this.allNodes=r}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)r=r.concat(i[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(r,i){if(!(r!=null&&i!=null))throw"assert failed";if(r==i)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==i)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var r,i,f,e,g,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],i=r.source,f=r.target,r.lca=null,r.sourceInLca=i,r.targetInLca=f,i==f){r.lca=i.getOwner();continue}for(e=i.getOwner();r.lca==null;){for(r.targetInLca=f,g=f.getOwner();r.lca==null;){if(g==e){r.lca=g;break}if(g==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=g.getParent(),g=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(r,i){if(r==i)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=i.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(r,i){r==null&&i==null&&(r=this.rootGraph,i=1);for(var f,e=r.getNodes(),g=e.length,t=0;t<g;t++)f=e[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},a.prototype.includesInvalidEdge=function(){for(var r,i=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&i.push(r);for(var e=0;e<i.length;e++)this.remove(i[e]);return!1},C.exports=a},function(C,x,N){var v=N(12);function l(){}l.calcSeparationAmount=function(a,r,i,f){if(!a.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(a,r,e),i[0]=Math.min(a.getRight(),r.getRight())-Math.max(a.x,r.x),i[1]=Math.min(a.getBottom(),r.getBottom())-Math.max(a.y,r.y),a.getX()<=r.getX()&&a.getRight()>=r.getRight()?i[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?i[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var g=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(g=1);var t=g*i[0],s=i[1]/g;i[0]<s?s=i[0]:t=i[1],i[0]=-1*e[0]*(s/2+f),i[1]=-1*e[1]*(t/2+f)},l.decideDirectionsForOverlappingNodes=function(a,r,i){a.getCenterX()<r.getCenterX()?i[0]=-1:i[0]=1,a.getCenterY()<r.getCenterY()?i[1]=-1:i[1]=1},l.getIntersection2=function(a,r,i){var f=a.getCenterX(),e=a.getCenterY(),g=r.getCenterX(),t=r.getCenterY();if(a.intersects(r))return i[0]=f,i[1]=e,i[2]=g,i[3]=t,!0;var s=a.getX(),o=a.getY(),c=a.getRight(),h=a.getX(),T=a.getBottom(),u=a.getRight(),d=a.getWidthHalf(),L=a.getHeightHalf(),b=r.getX(),w=r.getY(),P=r.getRight(),V=r.getX(),Y=r.getBottom(),B=r.getRight(),A=r.getWidthHalf(),_=r.getHeightHalf(),n=!1,E=!1;if(f===g){if(e>t)return i[0]=f,i[1]=o,i[2]=g,i[3]=Y,!1;if(e<t)return i[0]=f,i[1]=T,i[2]=g,i[3]=w,!1}else if(e===t){if(f>g)return i[0]=s,i[1]=e,i[2]=P,i[3]=t,!1;if(f<g)return i[0]=c,i[1]=e,i[2]=b,i[3]=t,!1}else{var p=a.height/a.width,m=r.height/r.width,y=(t-e)/(g-f),S=void 0,D=void 0,F=void 0,W=void 0,R=void 0,Q=void 0;if(-p===y?f>g?(i[0]=h,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>g?(i[0]=s,i[1]=o,n=!0):(i[0]=u,i[1]=T,n=!0)),-m===y?g>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=P,i[3]=w,E=!0):m===y&&(g>f?(i[2]=b,i[3]=w,E=!0):(i[2]=B,i[3]=Y,E=!0)),n&&E)return!1;if(f>g?e>t?(S=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(S=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):e>t?(S=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(S=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!n)switch(S){case 1:W=o,F=f+-L/y,i[0]=F,i[1]=W;break;case 2:F=u,W=e+d*y,i[0]=F,i[1]=W;break;case 3:W=T,F=f+L/y,i[0]=F,i[1]=W;break;case 4:F=h,W=e+-d*y,i[0]=F,i[1]=W;break}if(!E)switch(D){case 1:Q=w,R=g+-_/y,i[2]=R,i[3]=Q;break;case 2:R=B,Q=t+A*y,i[2]=R,i[3]=Q;break;case 3:Q=Y,R=g+_/y,i[2]=R,i[3]=Q;break;case 4:R=V,Q=t+-A*y,i[2]=R,i[3]=Q;break}}return!1},l.getCardinalDirection=function(a,r,i){return a>r?i:1+i%4},l.getIntersection=function(a,r,i,f){if(f==null)return this.getIntersection2(a,r,i);var e=a.x,g=a.y,t=r.x,s=r.y,o=i.x,c=i.y,h=f.x,T=f.y,u=void 0,d=void 0,L=void 0,b=void 0,w=void 0,P=void 0,V=void 0,Y=void 0,B=void 0;return L=s-g,w=e-t,V=t*g-e*s,b=T-c,P=o-h,Y=h*c-o*T,B=L*P-b*w,B===0?null:(u=(w*Y-P*V)/B,d=(b*V-L*Y)/B,new v(u,d))},l.angleOfVector=function(a,r,i,f){var e=void 0;return a!==i?(e=Math.atan((f-r)/(i-a)),i<a?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},l.doIntersect=function(a,r,i,f){var e=a.x,g=a.y,t=r.x,s=r.y,o=i.x,c=i.y,h=f.x,T=f.y,u=(t-e)*(T-c)-(h-o)*(s-g);if(u===0)return!1;var d=((T-c)*(h-e)+(o-h)*(T-g))/u,L=((g-s)*(h-e)+(t-e)*(T-g))/u;return 0<d&&d<1&&0<L&&L<1},l.findCircleLineIntersections=function(a,r,i,f,e,g,t){var s=(i-a)*(i-a)+(f-r)*(f-r),o=2*((a-e)*(i-a)+(r-g)*(f-r)),c=(a-e)*(a-e)+(r-g)*(r-g)-t*t,h=o*o-4*s*c;if(h>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),u=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,C.exports=l},function(C,x,N){function v(){}v.sign=function(l){return l>0?1:l<0?-1:0},v.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},v.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},C.exports=v},function(C,x,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v},function(C,x,N){var v=function(){function e(g,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(g,o.key,o)}}return function(g,t,s){return t&&e(g.prototype,t),s&&e(g,s),g}}();function l(e,g){if(!(e instanceof g))throw new TypeError("Cannot call a class as a function")}var a=function(g){return{value:g,next:null,prev:null}},r=function(g,t,s,o){return g!==null?g.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=g,t.next=s,o.length++,t},i=function(g,t){var s=g.prev,o=g.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,g.prev=g.next=null,t.length--,g},f=function(){function e(g){var t=this;l(this,e),this.length=0,this.head=null,this.tail=null,g!=null&&g.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,a(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,a(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return r(null,a(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}}}]),e}();C.exports=f},function(C,x,N){function v(l,a,r){this.x=null,this.y=null,l==null&&a==null&&r==null?(this.x=0,this.y=0):typeof l=="number"&&typeof a=="number"&&r==null?(this.x=l,this.y=a):l.constructor.name=="Point"&&a==null&&r==null&&(r=l,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(l,a,r){l.constructor.name=="Point"&&a==null&&r==null?(r=l,this.setLocation(r.x,r.y)):typeof l=="number"&&typeof a=="number"&&r==null&&(parseInt(l)==l&&parseInt(a)==a?this.move(l,a):(this.x=Math.floor(l+.5),this.y=Math.floor(a+.5)))},v.prototype.move=function(l,a){this.x=l,this.y=a},v.prototype.translate=function(l,a){this.x+=l,this.y+=a},v.prototype.equals=function(l){if(l.constructor.name=="Point"){var a=l;return this.x==a.x&&this.y==a.y}return this==l},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=v},function(C,x,N){function v(l,a,r,i){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&a!=null&&r!=null&&i!=null&&(this.x=l,this.y=a,this.width=r,this.height=i)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(l){this.x=l},v.prototype.getY=function(){return this.y},v.prototype.setY=function(l){this.y=l},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},C.exports=v},function(C,x,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function l(){}l.lastID=0,l.createID=function(a){return l.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=l.getString(),l.lastID++),a.uniqueID)},l.getString=function(a){return a==null&&(a=l.lastID),"Object#"+a},l.isPrimitive=function(a){var r=typeof a>"u"?"undefined":v(a);return a==null||r!="object"&&r!="function"},C.exports=l},function(C,x,N){function v(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c<o.length;c++)h[c]=o[c];return h}else return Array.from(o)}var l=N(0),a=N(7),r=N(3),i=N(1),f=N(6),e=N(5),g=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(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 a(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 r(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(),l.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 h=this.graphManager.getRoot().getNodes(),c=0;c<h.length;c++)h[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var h=c.getChild().getNodes(),T=0;T<h.length;T++)update(h[T]);if(c.vGraphObject!=null){var u=c.vGraphObject;u.update(c)}}else if(o instanceof i){var d=o;if(d.vGraphObject!=null){var L=d.vGraphObject;L.update(d)}}else if(o instanceof f){var b=o;if(b.vGraphObject!=null){var w=b.vGraphObject;w.update(b)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new e(0,0));else{var c=new g,h=this.graphManager.getRoot().updateLeftTop();if(h!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(h.x),c.setDeviceOrgY(h.y);for(var T=this.getAllNodes(),u,d=0;d<T.length;d++)u=T[d],u.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,h,T=o.getNodes(),u=0;u<T.length;u++)c=T[u],h=c.getChild(),h==null||h.getNodes().length==0?c.scatter():(this.positionNodesRandomly(h),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,h=this.graphManager.getRoot().getNodes(),T=!0,u=0;u<h.length;u++)h[u].getChild()!=null&&(T=!1);if(!T)return o;var d=new Set,L=[],b=new Map,w=[];for(w=w.concat(h);w.length>0&&c;){for(L.push(w[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var V=P.getEdges(),u=0;u<V.length;u++){var Y=V[u].getOtherEnd(P);if(b.get(P)!=Y)if(!d.has(Y))L.push(Y),b.set(Y,P);else{c=!1;break}}}if(!c)o=[];else{var B=[].concat(v(d));o.push(B);for(var u=0;u<B.length;u++){var A=B[u],_=w.indexOf(A);_>-1&&w.splice(_,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u<o.bendpoints.length;u++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var L=this.newEdge(null);this.graphManager.add(L,h,d),c.add(d),h=d}var L=this.newEdge(null);return this.graphManager.add(L,h,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(v(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var h=o[c];if(h.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(h),u=0;u<T.length;u++){var d=T[u],L=new e(d.getCenterX(),d.getCenterY()),b=h.bendpoints.get(u);b.x=L.x,b.y=L.y,d.getOwner().remove(d)}this.graphManager.add(h,h.source,h.target)}}},s.transform=function(o,c,h,T){if(h!=null&&T!=null){var u=c;if(o<=50){var d=c/h;u-=(c-d)/50*(50-o)}else{var L=c*T;u+=(L-c)/50*(o-50)}return u}else{var b,w;return o<=50?(b=9*c/500,w=c/10):(b=9*c/50,w=-8*c),b*o+w}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var h=[],T=new Map,u=!1,d=null;(c.length==1||c.length==2)&&(u=!0,d=c[0]);for(var L=0;L<c.length;L++){var b=c[L],w=b.getNeighborsList().size;T.set(b,b.getNeighborsList().size),w==1&&h.push(b)}var P=[];for(P=P.concat(h);!u;){var V=[];V=V.concat(P),P=[];for(var L=0;L<c.length;L++){var b=c[L],Y=c.indexOf(b);Y>=0&&c.splice(Y,1);var B=b.getNeighborsList();B.forEach(function(n){if(h.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=s},function(C,x,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v},function(C,x,N){var v=N(5);function l(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var r=0,i=this.lworldExtX;return i!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),r},l.prototype.transformY=function(a){var r=0,i=this.lworldExtY;return i!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),r},l.prototype.inverseTransformX=function(a){var r=0,i=this.ldeviceExtX;return i!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),r},l.prototype.inverseTransformY=function(a){var r=0,i=this.ldeviceExtY;return i!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),r},l.prototype.inverseTransformPoint=function(a){var r=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},C.exports=l},function(C,x,N){function v(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 l=N(15),a=N(4),r=N(0),i=N(8),f=N(9);function e(){l.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}e.prototype=Object.create(l.prototype);for(var g in l)e[g]=l[g];e.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,h,T,u,d=this.getGraphManager().getAllEdges(),L=0;L<d.length;L++)t=d[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),h=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),u=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+u-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+h.getInclusionTreeDepth()-2*o))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},e.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,h,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;o<u.length;o++)h=u[o],this.calculateRepulsionForceOfANode(h,d,t,s),d.add(h);else for(o=0;o<u.length;o++)for(h=u[o],c=o+1;c<u.length;c++)T=u[c],h.getOwner()==T.getOwner()&&this.calcRepulsionForce(h,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},e.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),h,T,u,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;h=t.getLength(),h!=0&&(T=t.edgeElasticity*(h-s),u=T*(t.lengthX/h),d=T*(t.lengthY/h),o.springForceX+=u,o.springForceY+=d,c.springForceX-=u,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),h=new Array(2),T=new Array(4),u,d,L,b,w,P,V;if(o.intersects(c)){i.calcSeparationAmount(o,c,h,a.DEFAULT_EDGE_LENGTH/2),P=2*h[0],V=2*h[1];var Y=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=Y*P,t.repulsionForceY-=Y*V,s.repulsionForceX+=Y*P,s.repulsionForceY+=Y*V}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(u=c.getCenterX()-o.getCenterX(),d=c.getCenterY()-o.getCenterY()):(i.getIntersection(o,c,T),u=T[2]-T[0],d=T[3]-T[1]),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=f.sign(u)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=f.sign(d)*a.MIN_REPULSION_DIST),L=u*u+d*d,b=Math.sqrt(L),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,P=w*u/b,V=w*d/b,t.repulsionForceX-=P,t.repulsionForceY-=V,s.repulsionForceX+=P,s.repulsionForceY+=V},e.prototype.calcGravitationalForce=function(t){var s,o,c,h,T,u,d,L;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,h=t.getCenterX()-o,T=t.getCenterY()-c,u=Math.abs(h)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.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},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},e.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),h=0;h<s;h++)c[h]=new Array(o);for(var h=0;h<s;h++)for(var T=0;T<o;T++)c[h][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,o){var c=0,h=0,T=0,u=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),u=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=c;d<=h;d++)for(var L=T;L<=u;L++)this.grid[d][L].push(t),t.setGridCoordinates(c,h,T,u)},e.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())},e.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var h=new Set;t.surrounding=new Array;for(var T,u=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(d<0||L<0||d>=u.length||L>=u[0].length)){for(var b=0;b<u[d][L].length;b++)if(T=u[d][L][b],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!h.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&P<=this.repulsionRange&&h.add(T)}}t.surrounding=[].concat(v(h))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},C.exports=e},function(C,x,N){var v=N(1),l=N(4);function a(i,f,e){v.call(this,i,f,e),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(v.prototype);for(var r in v)a[r]=v[r];C.exports=a},function(C,x,N){var v=N(3),l=N(4);function a(i,f,e,g){v.call(this,i,f,e,g),this.nodeRepulsion=l.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=[]}a.prototype=Object.create(v.prototype);for(var r in v)a[r]=v[r];a.prototype.setGridCoordinates=function(i,f,e,g){this.startX=i,this.finishX=f,this.startY=e,this.finishY=g},C.exports=a},function(C,x,N){function v(l,a){this.width=0,this.height=0,l!==null&&a!==null&&(this.height=a,this.width=l)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},C.exports=v},function(C,x,N){var v=N(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(a,r){var i=v.createID(a);this.contains(i)||(this.map[i]=r,this.keys.push(a))},l.prototype.contains=function(a){return v.createID(a),this.map[a]!=null},l.prototype.get=function(a){var r=v.createID(a);return this.map[r]},l.prototype.keySet=function(){return this.keys},C.exports=l},function(C,x,N){var v=N(14);function l(){this.set={}}l.prototype.add=function(a){var r=v.createID(a);this.contains(r)||(this.set[r]=a)},l.prototype.remove=function(a){delete this.set[v.createID(a)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(a){return this.set[v.createID(a)]==a},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(a){for(var r=Object.keys(this.set),i=r.length,f=0;f<i;f++)a.push(this.set[r[f]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(a){for(var r=a.length,i=0;i<r;i++){var f=a[i];this.add(f)}},C.exports=l},function(C,x,N){function v(){}v.multMat=function(l,a){for(var r=[],i=0;i<l.length;i++){r[i]=[];for(var f=0;f<a[0].length;f++){r[i][f]=0;for(var e=0;e<l[0].length;e++)r[i][f]+=l[i][e]*a[e][f]}}return r},v.transpose=function(l){for(var a=[],r=0;r<l[0].length;r++){a[r]=[];for(var i=0;i<l.length;i++)a[r][i]=l[i][r]}return a},v.multCons=function(l,a){for(var r=[],i=0;i<l.length;i++)r[i]=l[i]*a;return r},v.minusOp=function(l,a){for(var r=[],i=0;i<l.length;i++)r[i]=l[i]-a[i];return r},v.dotProduct=function(l,a){for(var r=0,i=0;i<l.length;i++)r+=l[i]*a[i];return r},v.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},v.normalize=function(l){for(var a=[],r=this.mag(l),i=0;i<l.length;i++)a[i]=l[i]/r;return a},v.multGamma=function(l){for(var a=[],r=0,i=0;i<l.length;i++)r+=l[i];r*=-1/l.length;for(var f=0;f<l.length;f++)a[f]=r+l[f];return a},v.multL=function(l,a,r){for(var i=[],f=[],e=[],g=0;g<a[0].length;g++){for(var t=0,s=0;s<a.length;s++)t+=-.5*a[s][g]*l[s];f[g]=t}for(var o=0;o<r.length;o++){for(var c=0,h=0;h<r.length;h++)c+=r[o][h]*f[h];e[o]=c}for(var T=0;T<a.length;T++){for(var u=0,d=0;d<a[0].length;d++)u+=a[T][d]*e[d];i[T]=u}return i},C.exports=v},function(C,x,N){var v=function(){function i(f,e){for(var g=0;g<e.length;g++){var t=e[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,g){return e&&i(f.prototype,e),g&&i(f,g),f}}();function l(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var a=N(11),r=function(){function i(f,e){l(this,i),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var g=void 0;f instanceof a?g=f.size():g=f.length,this._quicksort(f,0,g-1)}return v(i,[{key:"_quicksort",value:function(e,g,t){if(g<t){var s=this._partition(e,g,t);this._quicksort(e,g,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,g,t){for(var s=this._get(e,g),o=g,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,o),s);)o++;if(o<c)this._swap(e,o,c),o++,c--;else return c}}},{key:"_get",value:function(e,g){return e instanceof a?e.get_object_at(g):e[g]}},{key:"_set",value:function(e,g,t){e instanceof a?e.set_object_at(g,t):e[g]=t}},{key:"_swap",value:function(e,g,t){var s=this._get(e,g);this._set(e,g,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,g){return g>e}}]),i}();C.exports=r},function(C,x,N){function v(){}v.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(Math.min(this.m+1,this.n)),this.U=function(Tt){var wt=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return wt(Tt)}([this.m,a]),this.V=function(Tt){var wt=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return wt(Tt)}([this.n,this.n]);for(var r=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(this.n),i=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(this.m),f=!0,e=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(e,g);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],l[s][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)l[o][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if(function(Tt,wt){return Tt&&wt}(t<e,this.s[t]!==0)){for(var h=0,T=t;T<this.m;T++)h+=l[T][t]*l[T][c];h=-h/l[t][t];for(var u=t;u<this.m;u++)l[u][c]+=h*l[u][t]}r[c]=l[t][c]}if(function(Tt,wt){return wt}(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=l[d][t];if(t<g){r[t]=0;for(var L=t+1;L<this.n;L++)r[t]=v.hypot(r[t],r[L]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var b=t+1;b<this.n;b++)r[b]/=r[t];r[t+1]+=1}if(r[t]=-r[t],function(Tt,wt){return Tt&&wt}(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)i[w]=0;for(var P=t+1;P<this.n;P++)for(var V=t+1;V<this.m;V++)i[V]+=r[P]*l[V][P];for(var Y=t+1;Y<this.n;Y++)for(var B=-r[Y]/r[t+1],A=t+1;A<this.m;A++)l[A][Y]+=B*i[A]}for(var _=t+1;_<this.n;_++)this.V[_][t]=r[_]}}var n=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=l[e][e]),this.m<n&&(this.s[n-1]=0),g+1<n&&(r[g]=l[g][n-1]),r[n-1]=0;{for(var E=e;E<a;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<a;y++){for(var S=0,D=m;D<this.m;D++)S+=this.U[D][m]*this.U[D][y];S=-S/this.U[m][m];for(var F=m;F<this.m;F++)this.U[F][y]+=S*this.U[F][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var R=0;R<m-1;R++)this.U[R][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if(function(Tt,wt){return Tt&&wt}(z<g,r[z]!==0))for(var X=z+1;X<a;X++){for(var it=0,$=z+1;$<this.n;$++)it+=this.V[$][z]*this.V[$][X];it=-it/this.V[z+1][z];for(var O=z+1;O<this.n;O++)this.V[O][X]+=it*this.V[O][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var k=n-1,tt=Math.pow(2,-52),lt=Math.pow(2,-966);n>0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=lt+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=lt+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var nt=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],nt),Ct=this.s[ut]/Et,Dt=nt/Et;this.s[ut]=Et,ut!==J&&(nt=-Dt*r[ut-1],r[ut-1]=Ct*r[ut-1]);for(var mt=0;mt<this.n;mt++)Et=Ct*this.V[mt][ut]+Dt*this.V[mt][n-1],this.V[mt][n-1]=-Dt*this.V[mt][ut]+Ct*this.V[mt][n-1],this.V[mt][ut]=Et}}break;case 2:{var Ot=r[J-1];r[J-1]=0;for(var Rt=J;Rt<n;Rt++){var Ht=v.hypot(this.s[Rt],Ot),Ut=this.s[Rt]/Ht,Gt=Ot/Ht;this.s[Rt]=Ht,Ot=-Gt*r[Rt],r[Rt]=Ut*r[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Gt*this.U[Ft][J-1],this.U[Ft][J-1]=-Gt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(r[n-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[n-1]/Yt,G=this.s[n-2]/Yt,U=r[n-2]/Yt,Z=this.s[J]/Yt,K=r[J]/Yt,q=((G+Vt)*(G-Vt)+U*U)/2,at=Vt*U*(Vt*U),gt=0;(function(Tt,wt){return Tt||wt})(q!==0,at!==0)&&(gt=Math.sqrt(q*q+at),q<0&&(gt=-gt),gt=at/(q+gt));for(var ot=(Z+Vt)*(Z-Vt)+gt,rt=Z*K,j=J;j<n-1;j++){var dt=v.hypot(ot,rt),Mt=ot/dt,pt=rt/dt;j!==J&&(r[j-1]=dt),ot=Mt*this.s[j]+pt*r[j],r[j]=Mt*r[j]-pt*this.s[j],rt=pt*this.s[j+1],this.s[j+1]=Mt*this.s[j+1];for(var xt=0;xt<this.n;xt++)dt=Mt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+Mt*this.V[xt][j+1],this.V[xt][j]=dt;if(dt=v.hypot(ot,rt),Mt=ot/dt,pt=rt/dt,this.s[j]=dt,ot=Mt*r[j]+pt*this.s[j+1],this.s[j+1]=-pt*r[j]+Mt*this.s[j+1],rt=pt*r[j+1],r[j+1]=Mt*r[j+1],j<this.m-1)for(var ft=0;ft<this.m;ft++)dt=Mt*this.U[ft][j]+pt*this.U[ft][j+1],this.U[ft][j+1]=-pt*this.U[ft][j]+Mt*this.U[ft][j+1],this.U[ft][j]=dt}r[n-2]=ot}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var st=0;st<=k;st++)this.V[st][J]=-this.V[st][J]}for(;J<k&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ct=0;ct<this.n;ct++)Lt=this.V[ct][J+1],this.V[ct][J+1]=this.V[ct][J],this.V[ct][J]=Lt;if(J<this.m-1)for(var ht=0;ht<this.m;ht++)Lt=this.U[ht][J+1],this.U[ht][J+1]=this.U[ht][J],this.U[ht][J]=Lt;J++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(l,a){var r=void 0;return Math.abs(l)>Math.abs(a)?(r=a/l,r=Math.abs(l)*Math.sqrt(1+r*r)):a!=0?(r=l/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},C.exports=v},function(C,x,N){var v=function(){function r(i,f){for(var e=0;e<f.length;e++){var g=f[e];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(i,g.key,g)}}return function(i,f,e){return f&&r(i.prototype,f),e&&r(i,e),i}}();function l(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var a=function(){function r(i,f){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=i,this.sequence2=f,this.match_score=e,this.mismatch_penalty=g,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 h=0;h<this.jMax;h++)this.tracebackGrid[c][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{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 e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var g=1;g<this.iMax;g++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[g-1]===this.sequence2[t-1]?s=this.grid[g-1][t-1]+this.match_score:s=this.grid[g-1][t-1]+this.mismatch_penalty;var o=this.grid[g-1][t]+this.gap_penalty,c=this.grid[g][t-1]+this.gap_penalty,h=[s,o,c],T=this.arrayAllMaxIndexes(h);this.grid[g][t]=h[T[0]],this.tracebackGrid[g][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 e=f[0],g=this.tracebackGrid[e.pos[0]][e.pos[1]];g[0]&&f.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),g[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),g[2]&&f.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var g=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)g.push(t);return g}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r}();C.exports=a},function(C,x,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),C.exports=v},function(C,x,N){function v(){this.listeners=[]}var l=v.prototype;l.addListener=function(a,r){this.listeners.push({event:a,callback:r})},l.removeListener=function(a,r){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===a&&f.callback===r&&this.listeners.splice(i,1)}},l.emit=function(a,r){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];a===f.event&&f.callback(r)}},C.exports=v}])})}(ve)),ve.exports}var Me;function qe(){return Me||(Me=1,function(I,M){(function(x,N){I.exports=N(Ze())})(he.commonjsGlobal,function(C){return(()=>{var x={45:(a,r,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),a.exports=f},806:(a,r,i)=>{var f=i(551).FDLayoutConstants;function e(){}for(var g in f)e[g]=f[g];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e},767:(a,r,i)=>{var f=i(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];a.exports=e},880:(a,r,i)=>{var f=i(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];a.exports=e},578:(a,r,i)=>{var f=i(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];a.exports=e},765:(a,r,i)=>{var f=i(551).FDLayout,e=i(578),g=i(880),t=i(991),s=i(767),o=i(806),c=i(902),h=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,b=i(551).Layout,w=i(551).Integer,P=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,B=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var _ in f)A[_]=f[_];A.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},A.prototype.newGraph=function(n){return new g(null,this.graphManager,n)},A.prototype.newNode=function(n){return new t(this.graphManager,n)},A.prototype.newEdge=function(n){return new s(null,null,n)},A.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=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.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(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);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},A.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%h.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 n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.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=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.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},A.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p<n.length;p++){var m=n[p].rect,y=n[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},A.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},A.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,p=0;p<n.length;p++)E=n[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)E=n[p],E.move()},A.prototype.initConstraintVariables=function(){var n=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 O(H){for(var k=H.getChild().getNodes(),tt,lt=0,J=0;J<k.length;J++)tt=k[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(lt+=100):lt+=O(tt);return lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(k){n.fixedNodeSet.add(k.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var S=y(m);S>0&&(m.fixedNodeWeight=S)}}if(this.constraints.relativePlacementConstraint){var D=new Map,F=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){D.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var R=this.constraints.alignmentConstraint.horizontal,p=0;p<R.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),R[p].forEach(function(H){F.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var H,k,tt;for(tt=O.length-1;tt>=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=O[tt],O[tt]=O[H],O[H]=k;return O},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(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:O.gap})}else{var tt=F.has(O.top)?F.get(O.top):O.top,lt=F.has(O.bottom)?F.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=F.has(O.top)?F.get(O.top):O.top,lt=F.has(O.bottom)?F.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(lt):z.set(tt,[lt]),z.has(lt)?z.get(lt).push(tt):z.set(lt,[tt])}});var X=function(H,k){var tt=[],lt=[],J=new B,It=new Set,Nt=0;return H.forEach(function(vt,nt){if(!It.has(nt)){tt[Nt]=[],lt[Nt]=!1;var ut=nt;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(lt[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:lt}},it=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=it.components,this.fixedComponentsOnHorizontal=it.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},A.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=n.idToNodeMap.get($.nodeId);O.displacementX=0,O.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 S=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=S}if(this.constraints.alignmentConstraint.horizontal)for(var D=this.constraints.alignmentConstraint.horizontal,p=0;p<D.length;p++){for(var F=0,y=0;y<D[p].length;y++){if(this.fixedNodeSet.has(D[p][y])){F=0;break}F+=this.idToNodeMap.get(D[p][y]).displacementY}for(var W=F/D[p].length,y=0;y<D[p].length;y++)this.idToNodeMap.get(D[p][y]).displacementY=W}}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($){if(!n.fixedNodesOnHorizontal.has($)){var O=0;n.dummyToNodeForVerticalAlignment.has($)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:O=n.idToNodeMap.get($).displacementX,n.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var k=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get($)-O;k<H.gap&&(O-=H.gap-k)}else{var k=n.nodeToTempPositionMapHorizontal.get($)-n.nodeToTempPositionMapHorizontal.get(H.left)+O;k<H.gap&&(O+=H.gap-k)}}),n.nodeToTempPositionMapHorizontal.set($,n.nodeToTempPositionMapHorizontal.get($)+O),n.dummyToNodeForVerticalAlignment.has($)?n.dummyToNodeForVerticalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementX=O}):n.idToNodeMap.get($).displacementX=O}}),this.nodesInRelativeVertical.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var O=0;n.dummyToNodeForHorizontalAlignment.has($)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:O=n.idToNodeMap.get($).displacementY,n.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var k=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get($)-O;k<H.gap&&(O-=H.gap-k)}else{var k=n.nodeToTempPositionMapVertical.get($)-n.nodeToTempPositionMapVertical.get(H.top)+O;k<H.gap&&(O+=H.gap-k)}}),n.nodeToTempPositionMapVertical.set($,n.nodeToTempPositionMapVertical.get($)+O),n.dummyToNodeForHorizontalAlignment.has($)?n.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementY=O}):n.idToNodeMap.get($).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var R=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(R[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<R.length;y++)if(this.dummyToNodeForVerticalAlignment.has(R[y])){var X=this.dummyToNodeForVerticalAlignment.get(R[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(R[y]).displacementX,z++;for(var it=Q/z,y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=it}):this.idToNodeMap.get(R[y]).displacementX=it}}for(var p=0;p<this.componentsOnVertical.length;p++){var R=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(k){n.idToNodeMap.get(k).displacementY=0}):this.idToNodeMap.get(R[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<R.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(R[y])){var X=this.dummyToNodeForHorizontalAlignment.get(R[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(R[y]).displacementY,z++;for(var it=Q/z,y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=it}):this.idToNodeMap.get(R[y]).displacementY=it}}}},A.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},A.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<n.length;p++){var m=n[p];if(!E.has(m)){var y=m.getSource(),S=m.getTarget();if(y==S)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var D=[];if(D=D.concat(y.getEdgeListToNode(S)),D=D.concat(S.getEdgeListToNode(y)),!E.has(D[0])){if(D.length>1){var F;for(F=0;F<D.length;F++){var W=D[F];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}D.forEach(function(R){E.add(R)})}}}if(E.size==n.length)break}},A.prototype.positionNodesRadially=function(n){for(var E=new u(0,0),p=Math.ceil(Math.sqrt(n.length)),m=0,y=0,S=0,D=new d(0,0),F=0;F<n.length;F++){F%p==0&&(S=0,y=m,F!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var W=n[F],R=b.findCenterOfTree(W);E.x=S,E.y=y,D=A.radialLayout(W,R,E),D.y>m&&(m=Math.floor(D.y)),S=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(n),S=new Y;S.setDeviceOrgX(y.getMinX()),S.setDeviceOrgY(y.getMinY()),S.setWorldOrgX(p.x),S.setWorldOrgY(p.y);for(var D=0;D<n.length;D++){var F=n[D];F.transform(S)}var W=new d(y.getMaxX(),y.getMaxY());return S.inverseTransformPoint(W)},A.branchRadialLayout=function(n,E,p,m,y,S){var D=(m-p+1)/2;D<0&&(D+=180);var F=(D+p)%360,W=F*P.TWO_PI/360,R=y*Math.cos(W),Q=y*Math.sin(W);n.setCenter(R,Q);var z=[];z=z.concat(n.getEdges());var X=z.length;E!=null&&X--;for(var it=0,$=z.length,O,H=n.getEdgesBetween(E);H.length>1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var lt=Math.abs(m-p)/X,J=O;it!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+it*lt)%360,vt=(Nt+lt)%360;A.branchRadialLayout(It,n,Nt,vt,y+S,S),it++}}},A.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;p<n.length;p++){var m=n[p],y=m.getDiagonal();y>E&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var S=m[y],D=S.getParent();this.getNodeDegreeWithChildren(S)===0&&(D.id==null||!this.getToBeTiled(D))&&p.push(S)}for(var y=0;y<p.length;y++){var S=p[y],F=S.getParent().id;typeof E[F]>"u"&&(E[F]=[]),E[F]=E[F].concat(S)}Object.keys(E).forEach(function(W){if(E[W].length>1){var R="DummyCompound_"+W;n.memberGroups[R]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=R,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[R]=z;var X=n.getGraphManager().add(n.newGraph(),z),it=Q.getChild();it.add(z);for(var $=0;$<E[W].length;$++){var O=E[W][$];it.remove(O),X.add(O)}}})},A.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],n[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(n,E)},A.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=n.idToDummyNode[p];if(E[p]=n.tileNodes(n.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,S=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(S+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>S?(m.rect.y-=(m.labelHeight-S)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-S)/2):m.labelPosVertical=="bottom"&&m.setHeight(S+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,S=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,S,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,S=m.paddingTop,D=m.labelMarginLeft,F=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,S,D,F)})},A.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var S=m[y];if(this.getNodeDegree(S)>0)return this.toBeTiled[E]=!1,!1;if(S.getChild()==null){this.toBeTiled[S.id]=!1;continue}if(!this.getToBeTiled(S))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},A.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var p=n.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},A.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},A.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var p=n[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},A.prototype.adjustLocations=function(n,E,p,m,y,S,D){E+=m+S,p+=y+D;for(var F=E,W=0;W<n.rows.length;W++){var R=n.rows[W];E=F;for(var Q=0,z=0;z<R.length;z++){var X=R[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+n.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},A.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[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 S=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(S+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>S?(y.rect.x-=(y.labelWidth-S)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-S)/2):y.labelPosHorizontal=="right"&&y.setWidth(S+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),S=this.getOrgRatio(m),D;return S<y?D=m:D=p,D},A.prototype.getOrgRatio=function(n){var E=n.width,p=n.height,m=E/p;return m<1&&(m=1/m),m},A.prototype.calcIdealRowWidth=function(n,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=n.length,S=0,D=0,F=0;n.forEach(function($){S+=$.getWidth(),D+=$.getHeight(),$.getWidth()>F&&(F=$.getWidth())});var W=S/y,R=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(R+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var it=X*(W+m)-m;return F>it&&(it=F),it+=m*2,it},A.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,S=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};S&&(D.idealRowWidth=this.calcIdealRowWidth(n,p));var F=function(O){return O.rect.width*O.rect.height},W=function(O,H){return F(H)-F(O)};n.sort(function($,O){var H=W;return D.idealRowWidth?(H=S,H($.id,O.id)):H($,O)});for(var R=0,Q=0,z=0;z<n.length;z++){var X=n[z];R+=X.getCenterX(),Q+=X.getCenterY()}D.centerX=R/n.length,D.centerY=Q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(D.rows.length==0)this.insertNodeToRow(D,X,0,E);else if(this.canAddHorizontal(D,X.rect.width,X.rect.height)){var it=D.rows.length-1;D.idealRowWidth||(it=this.getShortestRowIndex(D)),this.insertNodeToRow(D,X,it,E)}else this.insertNodeToRow(D,X,D.rows.length,E);this.shiftToLastRow(D)}return D},A.prototype.insertNodeToRow=function(n,E,p,m){var y=m;if(p==n.rows.length){var S=[];n.rows.push(S),n.rowWidth.push(y),n.rowHeight.push(0)}var D=n.rowWidth[p]+E.rect.width;n.rows[p].length>0&&(D+=n.horizontalPadding),n.rowWidth[p]=D,n.width<D&&(n.width=D);var F=E.rect.height;p>0&&(F+=n.verticalPadding);var W=0;F>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=F,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},A.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]<p&&(E=m,p=n.rowWidth[m]);return E},A.prototype.getLongestRowIndex=function(n){for(var E=-1,p=Number.MIN_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]>p&&(E=m,p=n.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var S=this.getShortestRowIndex(n);if(S<0)return!0;var D=n.rowWidth[S];if(D+n.horizontalPadding+E<=n.width)return!0;var F=0;n.rowHeight[S]<p&&S>0&&(F=p+n.verticalPadding-n.rowHeight[S]);var W;n.width-D>=E+n.horizontalPadding?W=(n.height+F)/(D+E+n.horizontalPadding):W=(n.height+F)/n.width,F=p+n.verticalPadding;var R;return n.width<E?R=(n.height+F)/E:R=(n.height+F)/n.width,R<1&&(R=1/R),W<1&&(W=1/W),W<R},A.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),p=n.rowWidth.length-1,m=n.rows[E],y=m[m.length-1],S=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>S&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-S,n.rowWidth[p]=n.rowWidth[p]+S,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var D=Number.MIN_VALUE,F=0;F<m.length;F++)m[F].height>D&&(D=m[F].height);E>0&&(D+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=D,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var R=n.rowHeight[E]+n.rowHeight[p];n.height+=R-W,this.shiftToLastRow(n)}},A.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},A.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},A.prototype.reduceTrees=function(){for(var n=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var S=0;S<m.length;S++)if(p=m[S],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var D=p.getEdges()[0].getOtherEnd(p),F=new L(p.getCenterX()-D.getCenterX(),p.getCenterY()-D.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),F])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],R=0;R<y.length;R++)y[R][0].getEdges().length==1&&(W.push(y[R]),y[R][0].getOwner().remove(y[R][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},A.prototype.growTree=function(n){for(var E=n.length,p=n[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);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},A.prototype.findPlaceforPrunedNode=function(n){var E,p,m=n[0];if(m==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,S=p.finishX,D=p.startY,F=p.finishY,W=0,R=0,Q=0,z=0,X=[W,Q,R,z];if(D>0)for(var it=y;it<=S;it++)X[0]+=this.grid[it][D-1].length+this.grid[it][D].length-1;if(S<this.grid.length-1)for(var it=D;it<=F;it++)X[1]+=this.grid[S+1][it].length+this.grid[S][it].length-1;if(F<this.grid[0].length-1)for(var it=y;it<=S;it++)X[2]+=this.grid[it][F+1].length+this.grid[it][F].length-1;if(y>0)for(var it=D;it<=F;it++)X[3]+=this.grid[y-1][it].length+this.grid[y][it].length-1;for(var $=w.MAX_VALUE,O,H,k=0;k<X.length;k++)X[k]<$?($=X[k],O=1,H=k):X[k]==$&&O++;if(O==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(O==2&&$==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?E=0:E=1:X[0]==0&&X[2]==0?tt==0?E=0:E=2:X[0]==0&&X[3]==0?tt==0?E=0:E=3:X[1]==0&&X[2]==0?tt==0?E=1:E=2:X[1]==0&&X[3]==0?tt==0?E=1:E=3:tt==0?E=2:E=3}else if(O==4&&$==0){var tt=Math.floor(Math.random()*4);E=tt}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-h.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+h.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+h.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-h.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},a.exports=A},991:(a,r,i)=>{var f=i(551).FDLayoutNode,e=i(551).IMath;function g(s,o,c,h){f.call(this,s,o,c,h)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.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*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T<c.length;T++)h=c[T],h.getChild()==null?(h.displacementX+=s,h.displacementY+=o):h.propogateDisplacementToChildren(s,o)},g.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},g.prototype.setPred1=function(s){this.pred1=s},g.prototype.getPred1=function(){return pred1},g.prototype.getPred2=function(){return pred2},g.prototype.setNext=function(s){this.next=s},g.prototype.getNext=function(){return next},g.prototype.setProcessed=function(s){this.processed=s},g.prototype.isProcessed=function(){return processed},a.exports=g},902:(a,r,i)=>{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h<c.length;h++)T[h]=c[h];return T}else return Array.from(c)}var e=i(806),g=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function o(){}o.handleConstraints=function(c){var h={};h.fixedNodeConstraint=c.constraints.fixedNodeConstraint,h.alignmentConstraint=c.constraints.alignmentConstraint,h.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,u=new Map,d=[],L=[],b=c.getAllNodes(),w=0,P=0;P<b.length;P++){var V=b[P];V.getChild()==null&&(u.set(V.id,w++),d.push(V.getCenterX()),L.push(V.getCenterY()),T.set(V.id,V))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(G){!G.gap&&G.gap!=0&&(G.left?G.gap=e.DEFAULT_EDGE_LENGTH+T.get(G.left).getWidth()/2+T.get(G.right).getWidth()/2:G.gap=e.DEFAULT_EDGE_LENGTH+T.get(G.top).getHeight()/2+T.get(G.bottom).getHeight()/2)});var Y=function(U,Z){return{x:U.x-Z.x,y:U.y-Z.y}},B=function(U){var Z=0,K=0;return U.forEach(function(q){Z+=d[u.get(q)],K+=L[u.get(q)]}),{x:Z/U.size,y:K/U.size}},A=function(U,Z,K,q,at){function gt(ft,st){var Lt=new Set(ft),ct=!0,ht=!1,Xt=void 0;try{for(var Tt=st[Symbol.iterator](),wt;!(ct=(wt=Tt.next()).done);ct=!0){var $t=wt.value;Lt.add($t)}}catch(bt){ht=!0,Xt=bt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}return Lt}var ot=new Map;U.forEach(function(ft,st){ot.set(st,0)}),U.forEach(function(ft,st){ft.forEach(function(Lt){ot.set(Lt.id,ot.get(Lt.id)+1)})});var rt=new Map,j=new Map,dt=new g;ot.forEach(function(ft,st){ft==0?(dt.push(st),K||(Z=="horizontal"?rt.set(st,u.has(st)?d[u.get(st)]:q.get(st)):rt.set(st,u.has(st)?L[u.get(st)]:q.get(st)))):rt.set(st,Number.NEGATIVE_INFINITY),K&&j.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){Z=="horizontal"?(rt.set(ht,u.has(ht)?d[u.get(ht)]:q.get(ht)),Lt+=rt.get(ht)):(rt.set(ht,u.has(ht)?L[u.get(ht)]:q.get(ht)),Lt+=rt.get(ht))}),Lt=Lt/st.length,ft.forEach(function(ht){K.has(ht)||rt.set(ht,Lt)})}else{var ct=0;ft.forEach(function(ht){Z=="horizontal"?ct+=u.has(ht)?d[u.get(ht)]:q.get(ht):ct+=u.has(ht)?L[u.get(ht)]:q.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){rt.set(ht,ct)})}});for(var Mt=function(){var st=dt.shift(),Lt=U.get(st);Lt.forEach(function(ct){if(rt.get(ct.id)<rt.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if(Z=="horizontal"?ht=u.has(ct.id)?d[u.get(ct.id)]:q.get(ct.id):ht=u.has(ct.id)?L[u.get(ct.id)]:q.get(ct.id),rt.set(ct.id,ht),ht<rt.get(st)+ct.gap){var Xt=rt.get(st)+ct.gap-ht;j.get(st).forEach(function(Tt){rt.set(Tt,rt.get(Tt)-Xt)})}}else rt.set(ct.id,rt.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&dt.push(ct.id),K&&j.set(ct.id,gt(j.get(st),j.get(ct.id)))})};dt.length!=0;)Mt();if(K){var pt=new Set;U.forEach(function(ft,st){ft.length==0&&pt.add(st)});var xt=[];j.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](),wt;!(ct=(wt=Tt.next()).done);ct=!0){var $t=wt.value;K.has($t)&&(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,wt=!1,$t=void 0;try{for(var bt=ft[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;Z=="horizontal"?kt=u.has(St)?d[u.get(St)]:q.get(St):kt=u.has(St)?L[u.get(St)]:q.get(St);var Kt=rt.get(St);kt<Lt&&(Lt=kt),kt>ht&&(ht=kt),Kt<ct&&(ct=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){wt=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw $t}}var le=(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;rt.set(te,rt.get(te)+le)}}catch(ee){_t=!0,jt=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(_t)throw jt}}})}return rt},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?d[u.get(j.left)]-d[u.get(j.right)]>=0?Z++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gt<u.size;gt++)d[gt]=-1*d[gt],L[gt]=-1*L[gt];else if(Z>K)for(var ot=0;ot<u.size;ot++)d[ot]=-1*d[ot];else if(q>at)for(var rt=0;rt<u.size;rt++)L[rt]=-1*L[rt]},n=function(U){var Z=[],K=new g,q=new Set,at=0;return U.forEach(function(gt,ot){if(!q.has(ot)){Z[at]=[];var rt=ot;for(K.push(rt),q.add(rt),Z[at].push(rt);K.length!=0;){rt=K.shift();var j=U.get(rt);j.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),Z[at].push(dt.id))})}at++}}),Z},E=function(U){var Z=new Map;return U.forEach(function(K,q){Z.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(U){var Z=new Map;return U.forEach(function(K,q){Z.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},m=[],y=[],S=!1,D=!1,F=new Set,W=new Map,R=new Map,Q=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(G){F.add(G.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(G){G.left?(W.has(G.left)?W.get(G.left).push({id:G.right,gap:G.gap,direction:"horizontal"}):W.set(G.left,[{id:G.right,gap:G.gap,direction:"horizontal"}]),W.has(G.right)||W.set(G.right,[])):(W.has(G.top)?W.get(G.top).push({id:G.bottom,gap:G.gap,direction:"vertical"}):W.set(G.top,[{id:G.bottom,gap:G.gap,direction:"vertical"}]),W.has(G.bottom)||W.set(G.bottom,[]))}),R=E(W),Q=n(R)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(G,U){m[U]=[G.position.x,G.position.y],y[U]=[d[u.get(G.nodeId)],L[u.get(G.nodeId)]]}),S=!0;else if(h.alignmentConstraint)(function(){var G=0;if(h.alignmentConstraint.vertical){for(var U=h.alignmentConstraint.vertical,Z=function(rt){var j=new Set;U[rt].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return F.has(pt)})),Mt=void 0;dt.size>0?Mt=d[u.get(dt.values().next().value)]:Mt=B(j).x,U[rt].forEach(function(pt){m[G]=[Mt,L[u.get(pt)]],y[G]=[d[u.get(pt)],L[u.get(pt)]],G++})},K=0;K<U.length;K++)Z(K);S=!0}if(h.alignmentConstraint.horizontal){for(var q=h.alignmentConstraint.horizontal,at=function(rt){var j=new Set;q[rt].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return F.has(pt)})),Mt=void 0;dt.size>0?Mt=d[u.get(dt.values().next().value)]:Mt=B(j).y,q[rt].forEach(function(pt){m[G]=[d[u.get(pt)],Mt],y[G]=[d[u.get(pt)],L[u.get(pt)]],G++})},gt=0;gt<q.length;gt++)at(gt);S=!0}h.relativePlacementConstraint&&(D=!0)})();else if(h.relativePlacementConstraint){for(var z=0,X=0,it=0;it<Q.length;it++)Q[it].length>z&&(z=Q[it].length,X=it);if(z<R.size/2)_(h.relativePlacementConstraint),S=!1,D=!1;else{var $=new Map,O=new Map,H=[];Q[X].forEach(function(G){W.get(G).forEach(function(U){U.direction=="horizontal"?($.has(G)?$.get(G).push(U):$.set(G,[U]),$.has(U.id)||$.set(U.id,[]),H.push({left:G,right:U.id})):(O.has(G)?O.get(G).push(U):O.set(G,[U]),O.has(U.id)||O.set(U.id,[]),H.push({top:G,bottom:U.id}))})}),_(H),D=!1;var k=A($,"horizontal"),tt=A(O,"vertical");Q[X].forEach(function(G,U){y[U]=[d[u.get(G)],L[u.get(G)]],m[U]=[],k.has(G)?m[U][0]=k.get(G):m[U][0]=d[u.get(G)],tt.has(G)?m[U][1]=tt.get(G):m[U][1]=L[u.get(G)]}),S=!0}}if(S){for(var lt=void 0,J=t.transpose(m),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),nt=s.svd(vt);lt=t.multMat(nt.V,t.transpose(nt.U));for(var ut=0;ut<u.size;ut++){var Et=[d[ut],L[ut]],Ct=[lt[0][0],lt[1][0]],Dt=[lt[0][1],lt[1][1]];d[ut]=t.dotProduct(Et,Ct),L[ut]=t.dotProduct(Et,Dt)}D&&_(h.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(G,U){var Z={x:d[u.get(G.nodeId)],y:L[u.get(G.nodeId)]},K=G.position,q=Y(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=h.fixedNodeConstraint.length,mt.y/=h.fixedNodeConstraint.length,d.forEach(function(G,U){d[U]+=mt.x}),L.forEach(function(G,U){L[U]+=mt.y}),h.fixedNodeConstraint.forEach(function(G){d[u.get(G.nodeId)]=G.position.x,L[u.get(G.nodeId)]=G.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Ot=h.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Ot[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=d[u.get(K.values().next().value)]:q=B(Z).x,Z.forEach(function(at){F.has(at)||(d[u.get(at)]=q)})},Ht=0;Ht<Ot.length;Ht++)Rt(Ht);if(h.alignmentConstraint.horizontal)for(var Ut=h.alignmentConstraint.horizontal,Gt=function(U){var Z=new Set;Ut[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=L[u.get(K.values().next().value)]:q=B(Z).y,Z.forEach(function(at){F.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Gt(Ft)}h.relativePlacementConstraint&&function(){var G=new Map,U=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,gt=new Set,ot=new Set;if(F.forEach(function(Pt){gt.add(Pt),ot.add(Pt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var rt=h.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),rt[yt].forEach(function(At){G.set(At,"dummy"+yt),Z.get("dummy"+yt).push(At),F.has(At)&>.add("dummy"+yt)}),q.set("dummy"+yt,d[u.get(rt[yt][0])])},dt=0;dt<rt.length;dt++)j(dt);if(h.alignmentConstraint.horizontal)for(var Mt=h.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),Mt[yt].forEach(function(At){U.set(At,"dummy"+yt),K.get("dummy"+yt).push(At),F.has(At)&&ot.add("dummy"+yt)}),at.set("dummy"+yt,L[u.get(Mt[yt][0])])},xt=0;xt<Mt.length;xt++)pt(xt)}var ft=new Map,st=new Map,Lt=function(yt){W.get(yt).forEach(function(At){var Zt=void 0,Bt=void 0;At.direction=="horizontal"?(Zt=G.get(yt)?G.get(yt):yt,G.get(At.id)?Bt={id:G.get(At.id),gap:At.gap,direction:At.direction}:Bt=At,ft.has(Zt)?ft.get(Zt).push(Bt):ft.set(Zt,[Bt]),ft.has(Bt.id)||ft.set(Bt.id,[])):(Zt=U.get(yt)?U.get(yt):yt,U.get(At.id)?Bt={id:U.get(At.id),gap:At.gap,direction:At.direction}:Bt=At,st.has(Zt)?st.get(Zt).push(Bt):st.set(Zt,[Bt]),st.has(Bt.id)||st.set(Bt.id,[]))})},ct=!0,ht=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),wt;!(ct=(wt=Tt.next()).done);ct=!0){var $t=wt.value;Lt($t)}}catch(Pt){ht=!0,Xt=Pt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}var bt=E(ft),zt=E(st),St=n(bt),kt=n(zt),Kt=p(ft),le=p(st),Qt=[],_t=[];St.forEach(function(Pt,yt){Qt[yt]=[],Pt.forEach(function(At){Kt.get(At).length==0&&Qt[yt].push(At)})}),kt.forEach(function(Pt,yt){_t[yt]=[],Pt.forEach(function(At){le.get(At).length==0&&_t[yt].push(At)})});var jt=A(ft,"horizontal",gt,q,Qt),Jt=A(st,"vertical",ot,at,_t),oe=function(yt){Z.get(yt)?Z.get(yt).forEach(function(At){d[u.get(At)]=jt.get(yt)}):d[u.get(yt)]=jt.get(yt)},te=!0,ee=!1,Ee=void 0;try{for(var fe=jt.keys()[Symbol.iterator](),Te;!(te=(Te=fe.next()).done);te=!0){var ce=Te.value;oe(ce)}}catch(Pt){ee=!0,Ee=Pt}finally{try{!te&&fe.return&&fe.return()}finally{if(ee)throw Ee}}var ze=function(yt){K.get(yt)?K.get(yt).forEach(function(At){L[u.get(At)]=Jt.get(yt)}):L[u.get(yt)]=Jt.get(yt)},ge=!0,Ne=!1,Le=void 0;try{for(var ue=Jt.keys()[Symbol.iterator](),we;!(ge=(we=ue.next()).done);ge=!0){var ce=we.value;ze(ce)}}catch(Pt){Ne=!0,Le=Pt}finally{try{!ge&&ue.return&&ue.return()}finally{if(Ne)throw Le}}}()}for(var Yt=0;Yt<b.length;Yt++){var Vt=b[Yt];Vt.getChild()==null&&Vt.setCenter(d[u.get(Vt.id)],L[u.get(Vt.id)])}},a.exports=o},551:a=>{a.exports=C}},N={};function v(a){var r=N[a];if(r!==void 0)return r.exports;var i=N[a]={exports:{}};return x[a](i,i.exports,v),i.exports}var l=v(45);return l})()})}(de)),de.exports}(function(I,M){(function(x,N){I.exports=N(qe())})(he.commonjsGlobal,function(C){return(()=>{var x={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var i=arguments.length,f=Array(i>1?i-1:0),e=1;e<i;e++)f[e-1]=arguments[e];return f.forEach(function(g){Object.keys(g).forEach(function(t){return r[t]=g[t]})}),r}},548:(a,r,i)=>{var f=function(){function t(s,o){var c=[],h=!0,T=!1,u=void 0;try{for(var d=s[Symbol.iterator](),L;!(h=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));h=!0);}catch(b){T=!0,u=b}finally{try{!h&&d.return&&d.return()}finally{if(T)throw u}}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")}}(),e=i(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(h,T){typeof h=="number"&&(h=T);for(var u=h.parent()[0];u!=null;){if(s[u.id()])return!1;u=u.parent()[0]}return!0});return c},g.connectComponents=function(t,s,o,c){var h=new e,T=new Set,u=[],d=void 0,L=void 0,b=void 0,w=!1,P=1,V=[],Y=[],B=function(){var _=t.collection();Y.push(_);var n=o[0],E=t.collection();E.merge(n).merge(n.descendants().intersection(s)),u.push(n),E.forEach(function(y){h.push(y),T.add(y),_.merge(y)});for(var p=function(){n=h.shift();var S=t.collection();n.neighborhood().nodes().forEach(function(R){s.intersection(n.edgesWith(R)).length>0&&S.merge(R)});for(var D=0;D<S.length;D++){var F=S[D];if(d=o.intersection(F.union(F.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(R){h.push(R),T.add(R),_.merge(R),o.has(R)&&u.push(R)})}}};h.length!=0;)p();if(_.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(S){_.has(S.source())&&_.has(S.target())&&_.merge(S)})}),u.length==o.length&&(w=!0),!w||w&&P>1){L=u[0],b=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length<b&&(b=y.connectedEdges().length,L=y)}),V.push(L.id());var m=t.collection();m.merge(u[0]),u.forEach(function(y){m.merge(y)}),u=[],o=o.difference(m),P++}};do B();while(!w);return c&&V.length>0&&c.set("dummy"+(c.size+1),V),Y},g.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var V=P.value,Y=f(V,2),B=Y[0],A=Y[1],_=o.cy.getElementById(B);if(_){var n=_.boundingBox(),E=s.xCoords[A]-n.w/2,p=s.xCoords[A]+n.w/2,m=s.yCoords[A]-n.h/2,y=s.yCoords[A]+n.h/2;E<c&&(c=E),p>h&&(h=p),m<T&&(T=m),y>u&&(u=y)}}}catch(R){L=!0,b=R}finally{try{!d&&w.return&&w.return()}finally{if(L)throw b}}var S=t.x-(h+c)/2,D=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(R){return R+S}),s.yCoords=s.yCoords.map(function(R){return R+D})}else{Object.keys(s).forEach(function(R){var Q=s[R],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,it=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>h&&(h=X),it<T&&(T=it),$>u&&(u=$)});var F=t.x-(h+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(R){var Q=s[R];Q.setCenter(Q.getCenterX()+F,Q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,w=void 0,P=void 0,V=t.descendants().not(":parent"),Y=V.length,B=0;B<Y;B++){var A=V[B];L=s[c.get(A.id())]-A.width()/2,b=s[c.get(A.id())]+A.width()/2,w=o[c.get(A.id())]-A.height()/2,P=o[c.get(A.id())]+A.height()/2,h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<P&&(d=P)}var _={};return _.topLeftX=h,_.topLeftY=u,_.width=T-h,_.height=d-u,_},g.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var h=!1;c.children().forEach(function(T){T.css("display")!="none"&&(h=!0)}),h||o.merge(c)}),o},a.exports=g},816:(a,r,i)=>{var f=i(548),e=i(140).CoSELayout,g=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,h=i(140).CoSEConstants,T=function(d,L){var b=d.cy,w=d.eles,P=w.nodes(),V=w.edges(),Y=void 0,B=void 0,A=void 0,_={};d.randomize&&(Y=L.nodeIndexes,B=L.xCoords,A=L.yCoords);var n=function(R){return typeof R=="function"},E=function(R,Q){return n(R)?R(Q):R},p=f.calcParentsWithoutChildren(b,w),m=function W(R,Q,z,X){for(var it=Q.length,$=0;$<it;$++){var O=Q[$],H=null;O.intersection(p).length==0&&(H=O.children());var k=void 0,tt=O.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(X.randomize)if(!O.isParent())k=R.add(new g(z.graphManager,new t(B[Y.get(O.id())]-tt.w/2,A[Y.get(O.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var lt=f.calcBoundingBox(O,B,A,Y);O.intersection(p).length==0?k=R.add(new g(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(lt.width,lt.height))):k=R.add(new g(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else k=R.add(new g(z.graphManager,new t(O.position("x")-tt.w/2,O.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else k=R.add(new g(this.graphManager));if(k.id=O.data("id"),k.nodeRepulsion=E(X.nodeRepulsion,O),k.paddingLeft=parseInt(O.css("padding")),k.paddingTop=parseInt(O.css("padding")),k.paddingRight=parseInt(O.css("padding")),k.paddingBottom=parseInt(O.css("padding")),X.nodeDimensionsIncludeLabels&&(k.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,k.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,k.labelPosVertical=O.css("text-valign"),k.labelPosHorizontal=O.css("text-halign")),_[O.data("id")]=k,isNaN(k.rect.x)&&(k.rect.x=0),isNaN(k.rect.y)&&(k.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(R,Q,z){for(var X=0,it=0,$=0;$<z.length;$++){var O=z[$],H=_[O.data("source")],k=_[O.data("target")];if(H&&k&&H!==k&&H.getEdgesBetween(k).length==0){var tt=Q.add(R.newEdge(),H,k);tt.id=O.id(),tt.idealLength=E(d.idealEdgeLength,O),tt.edgeElasticity=E(d.edgeElasticity,O),X+=tt.idealLength,it++}}d.idealEdgeLength!=null&&(it>0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/it:n(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},S=function(R,Q){Q.fixedNodeConstraint&&(R.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(R.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(R.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new e,F=D.newGraphManager();return m(F.addRoot(),f.getTopMostNodes(P),D,d),y(D,F,V),S(D,d),D.runLayout(),_};a.exports={coseLayout:T}},212:(a,r,i)=>{var f=function(){function d(L,b){for(var w=0;w<b.length;w++){var P=b[w];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,b,w){return b&&d(L.prototype,b),w&&d(L,w),L}}();function e(d,L){if(!(d instanceof L))throw new TypeError("Cannot call a class as a function")}var g=i(658),t=i(548),s=i(657),o=s.spectralLayout,c=i(816),h=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(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){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(){}}),u=function(){function d(L){e(this,d),this.options=g({},T,L)}return f(d,[{key:"run",value:function(){var b=this,w=this.options,P=w.cy,V=w.eles,Y=[],B=[],A=void 0,_=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var n=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;n&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(P.layoutUtilities&&w.packComponents&&(E=P.layoutUtilities("get"),E||(E=P.layoutUtilities()),p=!0),V.nodes().length>0)if(p){var S=t.getTopMostNodes(w.eles.nodes());if(A=t.connectComponents(P,w.eles,S),A.forEach(function(vt){var nt=vt.boundingBox();_.push({x:nt.x1+nt.w/2,y:nt.y1+nt.h/2})}),w.randomize&&A.forEach(function(vt){w.eles=vt,Y.push(o(w))}),w.quality=="default"||w.quality=="proof"){var D=P.collection();if(w.tile){var F=new Map,W=[],R=[],Q=0,z={nodeIndexes:F,xCoords:W,yCoords:R},X=[];if(A.forEach(function(vt,nt){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(nt))}),D.length>1){var it=D.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2}),A.push(D),Y.push(z);for(var $=X.length-1;$>=0;$--)A.splice(X[$],1),Y.splice(X[$],1),_.splice(X[$],1)}}A.forEach(function(vt,nt){w.eles=vt,B.push(h(w,Y[nt])),t.relocateComponent(_[nt],B[nt],w)})}else A.forEach(function(vt,nt){t.relocateComponent(_[nt],Y[nt],w)});var O=new Set;if(A.length>1){var H=[],k=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,nt){var ut=void 0;if(w.quality=="draft"&&(ut=Y[nt].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(k).forEach(function(Dt){if(w.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[nt].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[nt].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[nt].xCoords,Y[nt].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else B[nt][Dt.id()]&&Et.nodes.push({x:B[nt][Dt.id()].getLeft(),y:B[nt][Dt.id()].getTop(),width:B[nt][Dt.id()].getWidth(),height:B[nt][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[nt].xCoords,Y[nt].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[nt].xCoords[Rt]),Ut.push(Y[nt].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[nt].xCoords,Y[nt].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[nt].xCoords[Ht]),Gt.push(Y[nt].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else B[nt][mt.id()]&&B[nt][Ot.id()]&&Et.edges.push({startX:B[nt][mt.id()].getCenterX(),startY:B[nt][mt.id()].getCenterY(),endX:B[nt][Ot.id()].getCenterX(),endY:B[nt][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(nt))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")Y.forEach(function(vt,nt){var ut=vt.xCoords.map(function(Ct){return Ct+tt[nt].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[nt].dy});vt.xCoords=ut,vt.yCoords=Et});else{var lt=0;O.forEach(function(vt){Object.keys(B[vt]).forEach(function(nt){var ut=B[vt][nt];ut.setCenter(ut.getCenterX()+tt[lt].dx,ut.getCenterY()+tt[lt].dy)}),lt++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);Y.push(y)}w.quality=="default"||w.quality=="proof"?(B.push(h(w,Y[0])),t.relocateComponent(_[0],B[0],w)):t.relocateComponent(_[0],Y[0],w)}var J=function(nt,ut){if(w.quality=="default"||w.quality=="proof"){typeof nt=="number"&&(nt=ut);var Et=void 0,Ct=void 0,Dt=nt.data("id");return B.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),w.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.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 Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(nt.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:nt.position("x"),y:nt.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});w.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();a.exports=u},657:(a,r,i)=>{var f=i(548),e=i(140).layoutBase.Matrix,g=i(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),u=h.nodes(":parent"),d=new Map,L=new Map,b=new Map,w=[],P=[],V=[],Y=[],B=[],A=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,S=o.samplingType,D=o.nodeSeparation,F=void 0,W=function(){for(var U=0,Z=0,K=!1;Z<F;){U=Math.floor(Math.random()*E),K=!1;for(var q=0;q<Z;q++)if(Y[q]==U){K=!0;break}if(!K)Y[Z]=U,Z++;else continue}},R=function(U,Z,K){for(var q=[],at=0,gt=0,ot=0,rt=void 0,j=[],dt=0,Mt=1,pt=0;pt<E;pt++)j[pt]=p;for(q[gt]=U,j[U]=0;gt>=at;){ot=q[at++];for(var xt=w[ot],ft=0;ft<xt.length;ft++)rt=L.get(xt[ft]),j[rt]==p&&(j[rt]=j[ot]+1,q[++gt]=rt);A[ot][Z]=j[ot]*D}if(K){for(var st=0;st<E;st++)A[st][Z]<B[st]&&(B[st]=A[st][Z]);for(var Lt=0;Lt<E;Lt++)B[Lt]>dt&&(dt=B[Lt],Mt=Lt)}return Mt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*E);for(var q=0;q<E;q++)B[q]=p;for(var at=0;at<F;at++)Y[at]=Z,Z=R(Z,at,U)}else{W();for(var K=0;K<F;K++)R(Y[K],K,U)}for(var gt=0;gt<E;gt++)for(var ot=0;ot<F;ot++)A[gt][ot]*=A[gt][ot];for(var rt=0;rt<F;rt++)_[rt]=[];for(var j=0;j<F;j++)for(var dt=0;dt<F;dt++)_[j][dt]=A[Y[dt]][j]},z=function(){for(var U=g.svd(_),Z=U.S,K=U.U,q=U.V,at=Z[0]*Z[0]*Z[0],gt=[],ot=0;ot<F;ot++){gt[ot]=[];for(var rt=0;rt<F;rt++)gt[ot][rt]=0,ot==rt&&(gt[ot][rt]=Z[ot]/(Z[ot]*Z[ot]+at/(Z[ot]*Z[ot])))}n=e.multMat(e.multMat(q,gt),e.transpose(K))},X=function(){for(var U=void 0,Z=void 0,K=[],q=[],at=[],gt=[],ot=0;ot<E;ot++)K[ot]=Math.random(),q[ot]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var rt=m,j=m,dt=void 0;;){for(var Mt=0;Mt<E;Mt++)at[Mt]=K[Mt];if(K=e.multGamma(e.multL(e.multGamma(at),A,n)),U=e.dotProduct(at,K),K=e.normalize(K),rt=e.dotProduct(at,K),dt=Math.abs(rt/j),dt<=1+y&&dt>=1)break;j=rt}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(j=m;;){for(var xt=0;xt<E;xt++)gt[xt]=q[xt];if(gt=e.minusOp(gt,e.multCons(at,e.dotProduct(at,gt))),q=e.multGamma(e.multL(e.multGamma(gt),A,n)),Z=e.dotProduct(gt,q),q=e.normalize(q),rt=e.dotProduct(gt,q),dt=Math.abs(rt/j),dt<=1+y&&dt>=1)break;j=rt}for(var ft=0;ft<E;ft++)gt[ft]=q[ft];P=e.multCons(at,Math.sqrt(Math.abs(U))),V=e.multCons(gt,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,h,f.getTopMostNodes(T),d),u.forEach(function(G){f.connectComponents(c,h,f.getTopMostNodes(G.descendants().intersection(h)),d)});for(var it=0,$=0;$<T.length;$++)T[$].isParent()||L.set(T[$].id(),it++);var O=!0,H=!1,k=void 0;try{for(var tt=d.keys()[Symbol.iterator](),lt;!(O=(lt=tt.next()).done);O=!0){var J=lt.value;L.set(J,it++)}}catch(G){H=!0,k=G}finally{try{!O&&tt.return&&tt.return()}finally{if(H)throw k}}for(var It=0;It<L.size;It++)w[It]=[];u.forEach(function(G){for(var U=G.children().intersection(h);U.nodes(":childless").length==0;)U=U.nodes()[0].children().intersection(h);var Z=0,K=U.nodes(":childless")[0].connectedEdges().length;U.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),b.set(G.id(),U.nodes(":childless")[Z].id())}),T.forEach(function(G){var U=void 0;G.isParent()?U=L.get(b.get(G.id())):U=L.get(G.id()),G.neighborhood().nodes().forEach(function(Z){h.intersection(G.edgesWith(Z)).length>0&&(Z.isParent()?w[U].push(b.get(Z.id())):w[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,w[Z].push(K),w[L.get(K)].push(U)})},vt=!0,nt=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(G){nt=!0,ut=G}finally{try{!vt&&Et.return&&Et.return()}finally{if(nt)throw ut}}E=L.size;var mt=void 0;if(E>2){F=E<o.sampleSize?E:o.sampleSize;for(var Ot=0;Ot<E;Ot++)A[Ot]=[];for(var Rt=0;Rt<F;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(S),z(),X(),mt={nodeIndexes:L,xCoords:P,yCoords:V}):(L.forEach(function(G,U){P.push(c.getElementById(U).position("x")),V.push(c.getElementById(U).position("y"))}),mt={nodeIndexes:L,xCoords:P,yCoords:V}),mt}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Gt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Gt.x),V.push(Gt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Gt.x+Ft/2+Vt/2+o.idealEdgeLength),V.push(Gt.y)}return mt={nodeIndexes:L,xCoords:P,yCoords:V},mt}};a.exports={spectralLayout:t}},579:(a,r,i)=>{var f=i(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),a.exports=e},140:a=>{a.exports=C}},N={};function v(a){var r=N[a];if(r!==void 0)return r.exports;var i=N[a]={exports:{}};return x[a](i,i.exports,v),i.exports}var l=v(579);return l})()})})(Ie);var Qe=Ie.exports;const Je=he.getDefaultExportFromCjs(Qe);var Ae={L:"left",R:"right",T:"top",B:"bottom"},De={L:et.__name(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:et.__name(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:et.__name(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:et.__name(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:et.__name((I,M)=>I-M+2,"L"),R:et.__name((I,M)=>I-2,"R"),T:et.__name((I,M)=>I-M+2,"T"),B:et.__name((I,M)=>I-2,"B")},Ke=et.__name(function(I){return Wt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Oe=et.__name(function(I){const M=I;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=et.__name(function(I){const M=I;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=et.__name(function(I){const M=I;return M==="T"||M==="B"},"isArchitectureDirectionY"),me=et.__name(function(I,M){const C=Wt(I)&&qt(M),x=qt(I)&&Wt(M);return C||x},"isArchitectureDirectionXY"),_e=et.__name(function(I){const M=I[0],C=I[1],x=Wt(M)&&qt(C),N=qt(M)&&Wt(C);return x||N},"isArchitecturePairXY"),je=et.__name(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),pe=et.__name(function(I,M){const C=`${I}${M}`;return je(C)?C:void 0},"getArchitectureDirectionPair"),tr=et.__name(function([I,M],C){const x=C[0],N=C[1];return Wt(x)?qt(N)?[I+(x==="L"?-1:1),M+(N==="T"?1:-1)]:[I+(x==="L"?-1:1),M]:Wt(N)?[I+(N==="L"?1:-1),M+(x==="T"?1:-1)]:[I,M+(x==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),er=et.__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"),rr=et.__name(function(I,M){return me(I,M)?"bend":Wt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ir=et.__name(function(I){return I.type==="service"},"isArchitectureService"),nr=et.__name(function(I){return I.type==="junction"},"isArchitectureJunction"),Re=et.__name((I,M)=>{const[C,x]=[I,M].sort();return`${JSON.stringify(C)}-${JSON.stringify(x)}`},"architectureGroupAlignmentKey"),Se=et.__name(I=>I.data(),"edgeData"),ie=et.__name(I=>I.data(),"nodeData"),ar=et.defaultConfig_default.architecture,ne,Fe=(ne=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=et.setAccTitle,this.getAccTitle=et.getAccTitle,this.setDiagramTitle=et.setDiagramTitle,this.getDiagramTitle=et.getDiagramTitle,this.getAccDescription=et.getAccDescription,this.setAccDescription=et.setAccDescription,this.clear()}setDiagramId(M){this.diagramId=M}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",et.clear()}addService({id:M,icon:C,in:x,title:N,iconText:v}){if(this.registeredIds.has(M))throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The service [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(x)==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"service",icon:C,iconText:v,title:N,edges:[],in:x})}getServices(){return[...this.nodes.values()].filter(ir)}addJunction({id:M,in:C}){if(this.registeredIds.has(M))throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(C!==void 0){if(M===C)throw new Error(`The junction [${M}] cannot be placed within itself`);if(!this.registeredIds.has(C))throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(C)==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"junction",edges:[],in:C})}getJunctions(){return[...this.nodes.values()].filter(nr)}getNodes(){return[...this.nodes.values()]}getNode(M){return this.nodes.get(M)??null}addGroup({id:M,icon:C,in:x,title:N}){if(this.registeredIds.has(M))throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The group [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(x)==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds.set(M,"group"),this.groups.set(M,{id:M,icon:C,title:N,in:x})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:M,rhsId:C,lhsDir:x,rhsDir:N,lhsInto:v,rhsInto:l,lhsGroup:a,rhsGroup:r,title:i}){if(!Oe(x))throw new Error(`Invalid direction given for left hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(x)}`);if(!Oe(N))throw new Error(`Invalid direction given for right hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(!this.nodes.has(M)&&!this.groups.has(M))throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(C)&&!this.groups.has(C))throw new Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes.get(M).in,e=this.nodes.get(C).in;if(a&&f&&e&&f==e)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&f&&e&&f==e)throw new Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:M,lhsDir:x,lhsInto:v,lhsGroup:a,rhsId:C,rhsDir:N,rhsInto:l,rhsGroup:r,title:i};this.edges.push(g);const t=this.nodes.get(M),s=this.nodes.get(C);t&&s&&(t.edges.push(this.edges[this.edges.length-1]),s.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(M){if(M.members.length<2)throw new Error(`An align directive requires at least two members; got ${M.members.length}`);const C=new Set;M.members.forEach(x=>{if(this.registeredIds.get(x)!=="node")throw new Error(`align ${M.direction} references [${x}], which is not a service or junction`);if(C.has(x))throw new Error(`align ${M.direction} lists [${x}] more than once`);C.add(x)}),this.layoutHints.push(M)}getLayoutHints(){return this.layoutHints}getDataStructures(){var M,C;if(this.dataStructures===void 0){const x=new Map,N=new Map;for(const[i,f]of this.nodes.entries()){const e=new Map;for(const g of f.edges){const t=(M=this.getNode(g.lhsId))==null?void 0:M.in,s=(C=this.getNode(g.rhsId))==null?void 0:C.in;if(t&&s&&t!==s){const o=rr(g.lhsDir,g.rhsDir);o!=="bend"&&x.set(Re(t,s),o)}if(g.lhsId===i){const o=pe(g.lhsDir,g.rhsDir);o&&e.set(o,g.rhsId)}else{const o=pe(g.rhsDir,g.lhsDir);o&&e.set(o,g.lhsId)}}N.set(i,e)}const v=new Set,l=new Set(N.keys()),a=et.__name(i=>{const f=new Map([[i,[0,0]]]),e=[i];for(;e.length>0;){const g=e.shift();if(g){v.add(g),l.delete(g);const t=N.get(g);if(!t)throw new Error(`BFS error: adjacency list for id ${g} not found. Please report this as a bug.`);const s=f.get(g);if(!s)throw new Error(`BFS error: position for id ${g} not found in spatial map. Please report this as a bug.`);const[o,c]=s;t.forEach((h,T)=>{v.has(h)||(f.set(h,tr([o,c],T)),e.push(h))})}}return f},"BFS"),r=[];for(;l.size>0;){const i=l.values().next().value;r.push(a(i))}this.dataStructures={adjList:N,spatialMaps:r,groupAlignments:x}}return this.dataStructures}setElementForId(M,C){this.elements.set(M,C)}getElementById(M){return this.elements.get(M)}getConfig(){return et.cleanAndMerge({...ar,...et.getConfig().architecture})}getConfigField(M){return this.getConfig()[M]}},et.__name(ne,"ArchitectureDB"),ne),or=et.__name((I,M)=>{var C;$e.populateCommonDb(I,M),I.groups.map(x=>M.addGroup(x)),I.services.map(x=>M.addService({...x,type:"service"})),I.junctions.map(x=>M.addJunction({...x,type:"junction"})),I.edges.map(x=>M.addEdge(x)),(C=I.alignments)==null||C.map(x=>M.addLayoutHint({direction:x.direction,members:[...x.members]}))},"populateDb"),be={parser:{yy:void 0},parse:et.__name(async I=>{var x;const M=await Be.parse("architecture",I);et.log.debug(M);const C=(x=be.parser)==null?void 0:x.yy;if(!(C instanceof Fe))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.");or(M,C)},"parse")},sr=et.__name(I=>`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $e=require("./chunk-JWPE2WC7-Bil73AoD.cjs"),et=require("./mermaid.core-DzF5qcy0.cjs"),Be=require("./cynefin-OW5HDTMX-DaKNJZN5.cjs"),xe=require("./cytoscape.esm-BMd_KE48.cjs"),he=require("./index-CTI81jel.cjs"),ke=require("d3");var Ie={exports:{}},de={exports:{}},ve={exports:{}},Ce;function Ze(){return Ce||(Ce=1,function(I,M){(function(x,N){I.exports=N()})(he.commonjsGlobal,function(){return function(C){var x={};function N(v){if(x[v])return x[v].exports;var l=x[v]={i:v,l:!1,exports:{}};return C[v].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=C,N.c=x,N.i=function(v){return v},N.d=function(v,l,a){N.o(v,l)||Object.defineProperty(v,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(v){var l=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(l,"a",l),l},N.o=function(v,l){return Object.prototype.hasOwnProperty.call(v,l)},N.p="",N(N.s=28)}([function(C,x,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v},function(C,x,N){var v=N(2),l=N(8),a=N(9);function r(f,e,g){v.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var i in v)r[i]=v[i];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.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"},r.prototype.getOtherEndInGraph=function(f,e){for(var g=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(g.getOwner()==e)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=r},function(C,x,N){function v(l){this.vGraphObject=l}C.exports=v},function(C,x,N){var v=N(2),l=N(10),a=N(13),r=N(0),i=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.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},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.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},e.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},e.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},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),h=0;h<c.length;h++)s=c[h],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},e.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},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.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)},e.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+i.nextDouble()*(c-o)+o;var h=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+i.nextDouble()*(T-h)+h,this.rect.x=t,this.rect.y=s},e.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()),r.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))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=e},function(C,x,N){var v=N(0);function l(){}for(var a in v)l[a]=v[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=l},function(C,x,N){function v(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(l){this.x=l},v.prototype.setY=function(l){this.y=l},v.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},C.exports=v},function(C,x,N){var v=N(2),l=N(10),a=N(0),r=N(7),i=N(3),f=N(1),e=N(13),g=N(12),t=N(11);function s(c,h,T){v.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[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,h,T){if(h==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(d.source=h,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),T!=h&&T.edges.push(d),d)}},s.prototype.remove=function(c){var h=c;if(c instanceof i){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),u,d=T.length,L=0;L<d;L++)u=T[L],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var b=this.nodes.indexOf(h);if(b==-1)throw"Node not in owner node list!";this.nodes.splice(b,1)}else if(c instanceof f){var u=c;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var w=u.source.edges.indexOf(u),P=u.target.edges.indexOf(u);if(!(w>-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(w,1),u.target!=u.source&&u.target.edges.splice(P,1);var b=u.source.owner.getEdges().indexOf(u);if(b==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,u,d,L=this.getNodes(),b=L.length,w=0;w<b;w++){var P=L[w];T=P.getTop(),u=P.getLeft(),c>T&&(c=T),h>u&&(h=u)}return c==l.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,u=l.MAX_VALUE,d=-l.MAX_VALUE,L,b,w,P,V,Y=this.nodes,B=Y.length,A=0;A<B;A++){var _=Y[A];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),b=_.getRight(),w=_.getTop(),P=_.getBottom(),h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<P&&(d=P)}var n=new e(h,u,T-h,d-u);h==l.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),Y[0].getParent().paddingLeft!=null?V=Y[0].getParent().paddingLeft:V=this.margin,this.left=n.x-V,this.right=n.x+n.width+V,this.top=n.y-V,this.bottom=n.y+n.height+V},s.calculateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,u=l.MAX_VALUE,d=-l.MAX_VALUE,L,b,w,P,V=c.length,Y=0;Y<V;Y++){var B=c[Y];L=B.getLeft(),b=B.getRight(),w=B.getTop(),P=B.getBottom(),h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<P&&(d=P)}var A=new e(h,u,T-h,d-u);return A},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,h=this.nodes,T=h.length,u=0;u<T;u++){var d=h[u];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=a.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 h=new t,T=new Set,u=this.nodes[0],d,L,b=u.withChildren();for(b.forEach(function(A){h.push(A),T.add(A)});h.length!==0;){u=h.shift(),d=u.getEdges();for(var w=d.length,P=0;P<w;P++){var V=d[P];if(L=V.getOtherEndInGraph(u,this),L!=null&&!T.has(L)){var Y=L.withChildren();Y.forEach(function(A){h.push(A),T.add(A)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var B=0;T.forEach(function(A){A.owner==c&&B++}),B==this.nodes.length&&(this.isConnected=!0)}},C.exports=s},function(C,x,N){var v,l=N(1);function a(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(r,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,i,f,e,g){if(f==null&&e==null&&g==null){if(r==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return r.parent=i,i.child=r,r}else{g=f,e=i,f=r;var t=e.getOwner(),s=g.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,e,g);if(f.isInterGraph=!0,f.source=e,f.target=g,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}},a.prototype.remove=function(r){if(r instanceof v){var i=r;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 e,g=f.length,t=0;t<g;t++)e=f[t],i.remove(e);var s=[];s=s.concat(i.getNodes());var o;g=s.length;for(var t=0;t<g;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(r instanceof l){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],i=this.getGraphs(),f=i.length,e=0;e<f;e++)r=r.concat(i[e].getNodes());this.allNodes=r}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)r=r.concat(i[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(r,i){if(!(r!=null&&i!=null))throw"assert failed";if(r==i)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==i)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var r,i,f,e,g,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],i=r.source,f=r.target,r.lca=null,r.sourceInLca=i,r.targetInLca=f,i==f){r.lca=i.getOwner();continue}for(e=i.getOwner();r.lca==null;){for(r.targetInLca=f,g=f.getOwner();r.lca==null;){if(g==e){r.lca=g;break}if(g==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=g.getParent(),g=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(r,i){if(r==i)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=i.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(r,i){r==null&&i==null&&(r=this.rootGraph,i=1);for(var f,e=r.getNodes(),g=e.length,t=0;t<g;t++)f=e[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},a.prototype.includesInvalidEdge=function(){for(var r,i=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&i.push(r);for(var e=0;e<i.length;e++)this.remove(i[e]);return!1},C.exports=a},function(C,x,N){var v=N(12);function l(){}l.calcSeparationAmount=function(a,r,i,f){if(!a.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(a,r,e),i[0]=Math.min(a.getRight(),r.getRight())-Math.max(a.x,r.x),i[1]=Math.min(a.getBottom(),r.getBottom())-Math.max(a.y,r.y),a.getX()<=r.getX()&&a.getRight()>=r.getRight()?i[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?i[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var g=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(g=1);var t=g*i[0],s=i[1]/g;i[0]<s?s=i[0]:t=i[1],i[0]=-1*e[0]*(s/2+f),i[1]=-1*e[1]*(t/2+f)},l.decideDirectionsForOverlappingNodes=function(a,r,i){a.getCenterX()<r.getCenterX()?i[0]=-1:i[0]=1,a.getCenterY()<r.getCenterY()?i[1]=-1:i[1]=1},l.getIntersection2=function(a,r,i){var f=a.getCenterX(),e=a.getCenterY(),g=r.getCenterX(),t=r.getCenterY();if(a.intersects(r))return i[0]=f,i[1]=e,i[2]=g,i[3]=t,!0;var s=a.getX(),o=a.getY(),c=a.getRight(),h=a.getX(),T=a.getBottom(),u=a.getRight(),d=a.getWidthHalf(),L=a.getHeightHalf(),b=r.getX(),w=r.getY(),P=r.getRight(),V=r.getX(),Y=r.getBottom(),B=r.getRight(),A=r.getWidthHalf(),_=r.getHeightHalf(),n=!1,E=!1;if(f===g){if(e>t)return i[0]=f,i[1]=o,i[2]=g,i[3]=Y,!1;if(e<t)return i[0]=f,i[1]=T,i[2]=g,i[3]=w,!1}else if(e===t){if(f>g)return i[0]=s,i[1]=e,i[2]=P,i[3]=t,!1;if(f<g)return i[0]=c,i[1]=e,i[2]=b,i[3]=t,!1}else{var p=a.height/a.width,m=r.height/r.width,y=(t-e)/(g-f),S=void 0,D=void 0,F=void 0,W=void 0,R=void 0,Q=void 0;if(-p===y?f>g?(i[0]=h,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>g?(i[0]=s,i[1]=o,n=!0):(i[0]=u,i[1]=T,n=!0)),-m===y?g>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=P,i[3]=w,E=!0):m===y&&(g>f?(i[2]=b,i[3]=w,E=!0):(i[2]=B,i[3]=Y,E=!0)),n&&E)return!1;if(f>g?e>t?(S=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(S=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):e>t?(S=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(S=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!n)switch(S){case 1:W=o,F=f+-L/y,i[0]=F,i[1]=W;break;case 2:F=u,W=e+d*y,i[0]=F,i[1]=W;break;case 3:W=T,F=f+L/y,i[0]=F,i[1]=W;break;case 4:F=h,W=e+-d*y,i[0]=F,i[1]=W;break}if(!E)switch(D){case 1:Q=w,R=g+-_/y,i[2]=R,i[3]=Q;break;case 2:R=B,Q=t+A*y,i[2]=R,i[3]=Q;break;case 3:Q=Y,R=g+_/y,i[2]=R,i[3]=Q;break;case 4:R=V,Q=t+-A*y,i[2]=R,i[3]=Q;break}}return!1},l.getCardinalDirection=function(a,r,i){return a>r?i:1+i%4},l.getIntersection=function(a,r,i,f){if(f==null)return this.getIntersection2(a,r,i);var e=a.x,g=a.y,t=r.x,s=r.y,o=i.x,c=i.y,h=f.x,T=f.y,u=void 0,d=void 0,L=void 0,b=void 0,w=void 0,P=void 0,V=void 0,Y=void 0,B=void 0;return L=s-g,w=e-t,V=t*g-e*s,b=T-c,P=o-h,Y=h*c-o*T,B=L*P-b*w,B===0?null:(u=(w*Y-P*V)/B,d=(b*V-L*Y)/B,new v(u,d))},l.angleOfVector=function(a,r,i,f){var e=void 0;return a!==i?(e=Math.atan((f-r)/(i-a)),i<a?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},l.doIntersect=function(a,r,i,f){var e=a.x,g=a.y,t=r.x,s=r.y,o=i.x,c=i.y,h=f.x,T=f.y,u=(t-e)*(T-c)-(h-o)*(s-g);if(u===0)return!1;var d=((T-c)*(h-e)+(o-h)*(T-g))/u,L=((g-s)*(h-e)+(t-e)*(T-g))/u;return 0<d&&d<1&&0<L&&L<1},l.findCircleLineIntersections=function(a,r,i,f,e,g,t){var s=(i-a)*(i-a)+(f-r)*(f-r),o=2*((a-e)*(i-a)+(r-g)*(f-r)),c=(a-e)*(a-e)+(r-g)*(r-g)-t*t,h=o*o-4*s*c;if(h>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),u=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,C.exports=l},function(C,x,N){function v(){}v.sign=function(l){return l>0?1:l<0?-1:0},v.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},v.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},C.exports=v},function(C,x,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v},function(C,x,N){var v=function(){function e(g,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(g,o.key,o)}}return function(g,t,s){return t&&e(g.prototype,t),s&&e(g,s),g}}();function l(e,g){if(!(e instanceof g))throw new TypeError("Cannot call a class as a function")}var a=function(g){return{value:g,next:null,prev:null}},r=function(g,t,s,o){return g!==null?g.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=g,t.next=s,o.length++,t},i=function(g,t){var s=g.prev,o=g.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,g.prev=g.next=null,t.length--,g},f=function(){function e(g){var t=this;l(this,e),this.length=0,this.head=null,this.tail=null,g!=null&&g.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,a(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,a(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return r(null,a(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}}}]),e}();C.exports=f},function(C,x,N){function v(l,a,r){this.x=null,this.y=null,l==null&&a==null&&r==null?(this.x=0,this.y=0):typeof l=="number"&&typeof a=="number"&&r==null?(this.x=l,this.y=a):l.constructor.name=="Point"&&a==null&&r==null&&(r=l,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(l,a,r){l.constructor.name=="Point"&&a==null&&r==null?(r=l,this.setLocation(r.x,r.y)):typeof l=="number"&&typeof a=="number"&&r==null&&(parseInt(l)==l&&parseInt(a)==a?this.move(l,a):(this.x=Math.floor(l+.5),this.y=Math.floor(a+.5)))},v.prototype.move=function(l,a){this.x=l,this.y=a},v.prototype.translate=function(l,a){this.x+=l,this.y+=a},v.prototype.equals=function(l){if(l.constructor.name=="Point"){var a=l;return this.x==a.x&&this.y==a.y}return this==l},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=v},function(C,x,N){function v(l,a,r,i){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&a!=null&&r!=null&&i!=null&&(this.x=l,this.y=a,this.width=r,this.height=i)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(l){this.x=l},v.prototype.getY=function(){return this.y},v.prototype.setY=function(l){this.y=l},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},C.exports=v},function(C,x,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function l(){}l.lastID=0,l.createID=function(a){return l.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=l.getString(),l.lastID++),a.uniqueID)},l.getString=function(a){return a==null&&(a=l.lastID),"Object#"+a},l.isPrimitive=function(a){var r=typeof a>"u"?"undefined":v(a);return a==null||r!="object"&&r!="function"},C.exports=l},function(C,x,N){function v(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c<o.length;c++)h[c]=o[c];return h}else return Array.from(o)}var l=N(0),a=N(7),r=N(3),i=N(1),f=N(6),e=N(5),g=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(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 a(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 r(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(),l.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 h=this.graphManager.getRoot().getNodes(),c=0;c<h.length;c++)h[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var h=c.getChild().getNodes(),T=0;T<h.length;T++)update(h[T]);if(c.vGraphObject!=null){var u=c.vGraphObject;u.update(c)}}else if(o instanceof i){var d=o;if(d.vGraphObject!=null){var L=d.vGraphObject;L.update(d)}}else if(o instanceof f){var b=o;if(b.vGraphObject!=null){var w=b.vGraphObject;w.update(b)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new e(0,0));else{var c=new g,h=this.graphManager.getRoot().updateLeftTop();if(h!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(h.x),c.setDeviceOrgY(h.y);for(var T=this.getAllNodes(),u,d=0;d<T.length;d++)u=T[d],u.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,h,T=o.getNodes(),u=0;u<T.length;u++)c=T[u],h=c.getChild(),h==null||h.getNodes().length==0?c.scatter():(this.positionNodesRandomly(h),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,h=this.graphManager.getRoot().getNodes(),T=!0,u=0;u<h.length;u++)h[u].getChild()!=null&&(T=!1);if(!T)return o;var d=new Set,L=[],b=new Map,w=[];for(w=w.concat(h);w.length>0&&c;){for(L.push(w[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var V=P.getEdges(),u=0;u<V.length;u++){var Y=V[u].getOtherEnd(P);if(b.get(P)!=Y)if(!d.has(Y))L.push(Y),b.set(Y,P);else{c=!1;break}}}if(!c)o=[];else{var B=[].concat(v(d));o.push(B);for(var u=0;u<B.length;u++){var A=B[u],_=w.indexOf(A);_>-1&&w.splice(_,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u<o.bendpoints.length;u++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var L=this.newEdge(null);this.graphManager.add(L,h,d),c.add(d),h=d}var L=this.newEdge(null);return this.graphManager.add(L,h,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(v(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var h=o[c];if(h.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(h),u=0;u<T.length;u++){var d=T[u],L=new e(d.getCenterX(),d.getCenterY()),b=h.bendpoints.get(u);b.x=L.x,b.y=L.y,d.getOwner().remove(d)}this.graphManager.add(h,h.source,h.target)}}},s.transform=function(o,c,h,T){if(h!=null&&T!=null){var u=c;if(o<=50){var d=c/h;u-=(c-d)/50*(50-o)}else{var L=c*T;u+=(L-c)/50*(o-50)}return u}else{var b,w;return o<=50?(b=9*c/500,w=c/10):(b=9*c/50,w=-8*c),b*o+w}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var h=[],T=new Map,u=!1,d=null;(c.length==1||c.length==2)&&(u=!0,d=c[0]);for(var L=0;L<c.length;L++){var b=c[L],w=b.getNeighborsList().size;T.set(b,b.getNeighborsList().size),w==1&&h.push(b)}var P=[];for(P=P.concat(h);!u;){var V=[];V=V.concat(P),P=[];for(var L=0;L<c.length;L++){var b=c[L],Y=c.indexOf(b);Y>=0&&c.splice(Y,1);var B=b.getNeighborsList();B.forEach(function(n){if(h.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=s},function(C,x,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v},function(C,x,N){var v=N(5);function l(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var r=0,i=this.lworldExtX;return i!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),r},l.prototype.transformY=function(a){var r=0,i=this.lworldExtY;return i!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),r},l.prototype.inverseTransformX=function(a){var r=0,i=this.ldeviceExtX;return i!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),r},l.prototype.inverseTransformY=function(a){var r=0,i=this.ldeviceExtY;return i!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),r},l.prototype.inverseTransformPoint=function(a){var r=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},C.exports=l},function(C,x,N){function v(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 l=N(15),a=N(4),r=N(0),i=N(8),f=N(9);function e(){l.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}e.prototype=Object.create(l.prototype);for(var g in l)e[g]=l[g];e.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,h,T,u,d=this.getGraphManager().getAllEdges(),L=0;L<d.length;L++)t=d[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),h=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),u=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+u-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+h.getInclusionTreeDepth()-2*o))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},e.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,h,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;o<u.length;o++)h=u[o],this.calculateRepulsionForceOfANode(h,d,t,s),d.add(h);else for(o=0;o<u.length;o++)for(h=u[o],c=o+1;c<u.length;c++)T=u[c],h.getOwner()==T.getOwner()&&this.calcRepulsionForce(h,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},e.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),h,T,u,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;h=t.getLength(),h!=0&&(T=t.edgeElasticity*(h-s),u=T*(t.lengthX/h),d=T*(t.lengthY/h),o.springForceX+=u,o.springForceY+=d,c.springForceX-=u,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),h=new Array(2),T=new Array(4),u,d,L,b,w,P,V;if(o.intersects(c)){i.calcSeparationAmount(o,c,h,a.DEFAULT_EDGE_LENGTH/2),P=2*h[0],V=2*h[1];var Y=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=Y*P,t.repulsionForceY-=Y*V,s.repulsionForceX+=Y*P,s.repulsionForceY+=Y*V}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(u=c.getCenterX()-o.getCenterX(),d=c.getCenterY()-o.getCenterY()):(i.getIntersection(o,c,T),u=T[2]-T[0],d=T[3]-T[1]),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=f.sign(u)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=f.sign(d)*a.MIN_REPULSION_DIST),L=u*u+d*d,b=Math.sqrt(L),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,P=w*u/b,V=w*d/b,t.repulsionForceX-=P,t.repulsionForceY-=V,s.repulsionForceX+=P,s.repulsionForceY+=V},e.prototype.calcGravitationalForce=function(t){var s,o,c,h,T,u,d,L;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,h=t.getCenterX()-o,T=t.getCenterY()-c,u=Math.abs(h)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.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},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},e.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),h=0;h<s;h++)c[h]=new Array(o);for(var h=0;h<s;h++)for(var T=0;T<o;T++)c[h][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,o){var c=0,h=0,T=0,u=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),u=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=c;d<=h;d++)for(var L=T;L<=u;L++)this.grid[d][L].push(t),t.setGridCoordinates(c,h,T,u)},e.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())},e.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var h=new Set;t.surrounding=new Array;for(var T,u=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(d<0||L<0||d>=u.length||L>=u[0].length)){for(var b=0;b<u[d][L].length;b++)if(T=u[d][L][b],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!h.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&P<=this.repulsionRange&&h.add(T)}}t.surrounding=[].concat(v(h))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},C.exports=e},function(C,x,N){var v=N(1),l=N(4);function a(i,f,e){v.call(this,i,f,e),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(v.prototype);for(var r in v)a[r]=v[r];C.exports=a},function(C,x,N){var v=N(3),l=N(4);function a(i,f,e,g){v.call(this,i,f,e,g),this.nodeRepulsion=l.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=[]}a.prototype=Object.create(v.prototype);for(var r in v)a[r]=v[r];a.prototype.setGridCoordinates=function(i,f,e,g){this.startX=i,this.finishX=f,this.startY=e,this.finishY=g},C.exports=a},function(C,x,N){function v(l,a){this.width=0,this.height=0,l!==null&&a!==null&&(this.height=a,this.width=l)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},C.exports=v},function(C,x,N){var v=N(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(a,r){var i=v.createID(a);this.contains(i)||(this.map[i]=r,this.keys.push(a))},l.prototype.contains=function(a){return v.createID(a),this.map[a]!=null},l.prototype.get=function(a){var r=v.createID(a);return this.map[r]},l.prototype.keySet=function(){return this.keys},C.exports=l},function(C,x,N){var v=N(14);function l(){this.set={}}l.prototype.add=function(a){var r=v.createID(a);this.contains(r)||(this.set[r]=a)},l.prototype.remove=function(a){delete this.set[v.createID(a)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(a){return this.set[v.createID(a)]==a},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(a){for(var r=Object.keys(this.set),i=r.length,f=0;f<i;f++)a.push(this.set[r[f]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(a){for(var r=a.length,i=0;i<r;i++){var f=a[i];this.add(f)}},C.exports=l},function(C,x,N){function v(){}v.multMat=function(l,a){for(var r=[],i=0;i<l.length;i++){r[i]=[];for(var f=0;f<a[0].length;f++){r[i][f]=0;for(var e=0;e<l[0].length;e++)r[i][f]+=l[i][e]*a[e][f]}}return r},v.transpose=function(l){for(var a=[],r=0;r<l[0].length;r++){a[r]=[];for(var i=0;i<l.length;i++)a[r][i]=l[i][r]}return a},v.multCons=function(l,a){for(var r=[],i=0;i<l.length;i++)r[i]=l[i]*a;return r},v.minusOp=function(l,a){for(var r=[],i=0;i<l.length;i++)r[i]=l[i]-a[i];return r},v.dotProduct=function(l,a){for(var r=0,i=0;i<l.length;i++)r+=l[i]*a[i];return r},v.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},v.normalize=function(l){for(var a=[],r=this.mag(l),i=0;i<l.length;i++)a[i]=l[i]/r;return a},v.multGamma=function(l){for(var a=[],r=0,i=0;i<l.length;i++)r+=l[i];r*=-1/l.length;for(var f=0;f<l.length;f++)a[f]=r+l[f];return a},v.multL=function(l,a,r){for(var i=[],f=[],e=[],g=0;g<a[0].length;g++){for(var t=0,s=0;s<a.length;s++)t+=-.5*a[s][g]*l[s];f[g]=t}for(var o=0;o<r.length;o++){for(var c=0,h=0;h<r.length;h++)c+=r[o][h]*f[h];e[o]=c}for(var T=0;T<a.length;T++){for(var u=0,d=0;d<a[0].length;d++)u+=a[T][d]*e[d];i[T]=u}return i},C.exports=v},function(C,x,N){var v=function(){function i(f,e){for(var g=0;g<e.length;g++){var t=e[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,g){return e&&i(f.prototype,e),g&&i(f,g),f}}();function l(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var a=N(11),r=function(){function i(f,e){l(this,i),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var g=void 0;f instanceof a?g=f.size():g=f.length,this._quicksort(f,0,g-1)}return v(i,[{key:"_quicksort",value:function(e,g,t){if(g<t){var s=this._partition(e,g,t);this._quicksort(e,g,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,g,t){for(var s=this._get(e,g),o=g,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,o),s);)o++;if(o<c)this._swap(e,o,c),o++,c--;else return c}}},{key:"_get",value:function(e,g){return e instanceof a?e.get_object_at(g):e[g]}},{key:"_set",value:function(e,g,t){e instanceof a?e.set_object_at(g,t):e[g]=t}},{key:"_swap",value:function(e,g,t){var s=this._get(e,g);this._set(e,g,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,g){return g>e}}]),i}();C.exports=r},function(C,x,N){function v(){}v.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(Math.min(this.m+1,this.n)),this.U=function(Tt){var wt=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return wt(Tt)}([this.m,a]),this.V=function(Tt){var wt=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return wt(Tt)}([this.n,this.n]);for(var r=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(this.n),i=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(this.m),f=!0,e=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(e,g);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],l[s][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)l[o][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if(function(Tt,wt){return Tt&&wt}(t<e,this.s[t]!==0)){for(var h=0,T=t;T<this.m;T++)h+=l[T][t]*l[T][c];h=-h/l[t][t];for(var u=t;u<this.m;u++)l[u][c]+=h*l[u][t]}r[c]=l[t][c]}if(function(Tt,wt){return wt}(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=l[d][t];if(t<g){r[t]=0;for(var L=t+1;L<this.n;L++)r[t]=v.hypot(r[t],r[L]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var b=t+1;b<this.n;b++)r[b]/=r[t];r[t+1]+=1}if(r[t]=-r[t],function(Tt,wt){return Tt&&wt}(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)i[w]=0;for(var P=t+1;P<this.n;P++)for(var V=t+1;V<this.m;V++)i[V]+=r[P]*l[V][P];for(var Y=t+1;Y<this.n;Y++)for(var B=-r[Y]/r[t+1],A=t+1;A<this.m;A++)l[A][Y]+=B*i[A]}for(var _=t+1;_<this.n;_++)this.V[_][t]=r[_]}}var n=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=l[e][e]),this.m<n&&(this.s[n-1]=0),g+1<n&&(r[g]=l[g][n-1]),r[n-1]=0;{for(var E=e;E<a;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<a;y++){for(var S=0,D=m;D<this.m;D++)S+=this.U[D][m]*this.U[D][y];S=-S/this.U[m][m];for(var F=m;F<this.m;F++)this.U[F][y]+=S*this.U[F][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var R=0;R<m-1;R++)this.U[R][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if(function(Tt,wt){return Tt&&wt}(z<g,r[z]!==0))for(var X=z+1;X<a;X++){for(var it=0,$=z+1;$<this.n;$++)it+=this.V[$][z]*this.V[$][X];it=-it/this.V[z+1][z];for(var O=z+1;O<this.n;O++)this.V[O][X]+=it*this.V[O][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var k=n-1,tt=Math.pow(2,-52),lt=Math.pow(2,-966);n>0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=lt+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=lt+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var nt=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],nt),Ct=this.s[ut]/Et,Dt=nt/Et;this.s[ut]=Et,ut!==J&&(nt=-Dt*r[ut-1],r[ut-1]=Ct*r[ut-1]);for(var mt=0;mt<this.n;mt++)Et=Ct*this.V[mt][ut]+Dt*this.V[mt][n-1],this.V[mt][n-1]=-Dt*this.V[mt][ut]+Ct*this.V[mt][n-1],this.V[mt][ut]=Et}}break;case 2:{var Ot=r[J-1];r[J-1]=0;for(var Rt=J;Rt<n;Rt++){var Ht=v.hypot(this.s[Rt],Ot),Ut=this.s[Rt]/Ht,Gt=Ot/Ht;this.s[Rt]=Ht,Ot=-Gt*r[Rt],r[Rt]=Ut*r[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Gt*this.U[Ft][J-1],this.U[Ft][J-1]=-Gt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(r[n-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[n-1]/Yt,G=this.s[n-2]/Yt,U=r[n-2]/Yt,Z=this.s[J]/Yt,K=r[J]/Yt,q=((G+Vt)*(G-Vt)+U*U)/2,at=Vt*U*(Vt*U),gt=0;(function(Tt,wt){return Tt||wt})(q!==0,at!==0)&&(gt=Math.sqrt(q*q+at),q<0&&(gt=-gt),gt=at/(q+gt));for(var ot=(Z+Vt)*(Z-Vt)+gt,rt=Z*K,j=J;j<n-1;j++){var dt=v.hypot(ot,rt),Mt=ot/dt,pt=rt/dt;j!==J&&(r[j-1]=dt),ot=Mt*this.s[j]+pt*r[j],r[j]=Mt*r[j]-pt*this.s[j],rt=pt*this.s[j+1],this.s[j+1]=Mt*this.s[j+1];for(var xt=0;xt<this.n;xt++)dt=Mt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+Mt*this.V[xt][j+1],this.V[xt][j]=dt;if(dt=v.hypot(ot,rt),Mt=ot/dt,pt=rt/dt,this.s[j]=dt,ot=Mt*r[j]+pt*this.s[j+1],this.s[j+1]=-pt*r[j]+Mt*this.s[j+1],rt=pt*r[j+1],r[j+1]=Mt*r[j+1],j<this.m-1)for(var ft=0;ft<this.m;ft++)dt=Mt*this.U[ft][j]+pt*this.U[ft][j+1],this.U[ft][j+1]=-pt*this.U[ft][j]+Mt*this.U[ft][j+1],this.U[ft][j]=dt}r[n-2]=ot}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var st=0;st<=k;st++)this.V[st][J]=-this.V[st][J]}for(;J<k&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ct=0;ct<this.n;ct++)Lt=this.V[ct][J+1],this.V[ct][J+1]=this.V[ct][J],this.V[ct][J]=Lt;if(J<this.m-1)for(var ht=0;ht<this.m;ht++)Lt=this.U[ht][J+1],this.U[ht][J+1]=this.U[ht][J],this.U[ht][J]=Lt;J++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(l,a){var r=void 0;return Math.abs(l)>Math.abs(a)?(r=a/l,r=Math.abs(l)*Math.sqrt(1+r*r)):a!=0?(r=l/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},C.exports=v},function(C,x,N){var v=function(){function r(i,f){for(var e=0;e<f.length;e++){var g=f[e];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(i,g.key,g)}}return function(i,f,e){return f&&r(i.prototype,f),e&&r(i,e),i}}();function l(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var a=function(){function r(i,f){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=i,this.sequence2=f,this.match_score=e,this.mismatch_penalty=g,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 h=0;h<this.jMax;h++)this.tracebackGrid[c][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{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 e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var g=1;g<this.iMax;g++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[g-1]===this.sequence2[t-1]?s=this.grid[g-1][t-1]+this.match_score:s=this.grid[g-1][t-1]+this.mismatch_penalty;var o=this.grid[g-1][t]+this.gap_penalty,c=this.grid[g][t-1]+this.gap_penalty,h=[s,o,c],T=this.arrayAllMaxIndexes(h);this.grid[g][t]=h[T[0]],this.tracebackGrid[g][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 e=f[0],g=this.tracebackGrid[e.pos[0]][e.pos[1]];g[0]&&f.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),g[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),g[2]&&f.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var g=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)g.push(t);return g}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r}();C.exports=a},function(C,x,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),C.exports=v},function(C,x,N){function v(){this.listeners=[]}var l=v.prototype;l.addListener=function(a,r){this.listeners.push({event:a,callback:r})},l.removeListener=function(a,r){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===a&&f.callback===r&&this.listeners.splice(i,1)}},l.emit=function(a,r){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];a===f.event&&f.callback(r)}},C.exports=v}])})}(ve)),ve.exports}var Me;function qe(){return Me||(Me=1,function(I,M){(function(x,N){I.exports=N(Ze())})(he.commonjsGlobal,function(C){return(()=>{var x={45:(a,r,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),a.exports=f},806:(a,r,i)=>{var f=i(551).FDLayoutConstants;function e(){}for(var g in f)e[g]=f[g];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e},767:(a,r,i)=>{var f=i(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];a.exports=e},880:(a,r,i)=>{var f=i(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];a.exports=e},578:(a,r,i)=>{var f=i(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];a.exports=e},765:(a,r,i)=>{var f=i(551).FDLayout,e=i(578),g=i(880),t=i(991),s=i(767),o=i(806),c=i(902),h=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,b=i(551).Layout,w=i(551).Integer,P=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,B=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var _ in f)A[_]=f[_];A.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},A.prototype.newGraph=function(n){return new g(null,this.graphManager,n)},A.prototype.newNode=function(n){return new t(this.graphManager,n)},A.prototype.newEdge=function(n){return new s(null,null,n)},A.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=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.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(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);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},A.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%h.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 n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.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=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.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},A.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p<n.length;p++){var m=n[p].rect,y=n[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},A.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},A.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,p=0;p<n.length;p++)E=n[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)E=n[p],E.move()},A.prototype.initConstraintVariables=function(){var n=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 O(H){for(var k=H.getChild().getNodes(),tt,lt=0,J=0;J<k.length;J++)tt=k[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(lt+=100):lt+=O(tt);return lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(k){n.fixedNodeSet.add(k.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var S=y(m);S>0&&(m.fixedNodeWeight=S)}}if(this.constraints.relativePlacementConstraint){var D=new Map,F=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){D.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var R=this.constraints.alignmentConstraint.horizontal,p=0;p<R.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),R[p].forEach(function(H){F.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var H,k,tt;for(tt=O.length-1;tt>=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=O[tt],O[tt]=O[H],O[H]=k;return O},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(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:O.gap})}else{var tt=F.has(O.top)?F.get(O.top):O.top,lt=F.has(O.bottom)?F.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=F.has(O.top)?F.get(O.top):O.top,lt=F.has(O.bottom)?F.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(lt):z.set(tt,[lt]),z.has(lt)?z.get(lt).push(tt):z.set(lt,[tt])}});var X=function(H,k){var tt=[],lt=[],J=new B,It=new Set,Nt=0;return H.forEach(function(vt,nt){if(!It.has(nt)){tt[Nt]=[],lt[Nt]=!1;var ut=nt;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(lt[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:lt}},it=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=it.components,this.fixedComponentsOnHorizontal=it.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},A.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=n.idToNodeMap.get($.nodeId);O.displacementX=0,O.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 S=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=S}if(this.constraints.alignmentConstraint.horizontal)for(var D=this.constraints.alignmentConstraint.horizontal,p=0;p<D.length;p++){for(var F=0,y=0;y<D[p].length;y++){if(this.fixedNodeSet.has(D[p][y])){F=0;break}F+=this.idToNodeMap.get(D[p][y]).displacementY}for(var W=F/D[p].length,y=0;y<D[p].length;y++)this.idToNodeMap.get(D[p][y]).displacementY=W}}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($){if(!n.fixedNodesOnHorizontal.has($)){var O=0;n.dummyToNodeForVerticalAlignment.has($)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:O=n.idToNodeMap.get($).displacementX,n.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var k=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get($)-O;k<H.gap&&(O-=H.gap-k)}else{var k=n.nodeToTempPositionMapHorizontal.get($)-n.nodeToTempPositionMapHorizontal.get(H.left)+O;k<H.gap&&(O+=H.gap-k)}}),n.nodeToTempPositionMapHorizontal.set($,n.nodeToTempPositionMapHorizontal.get($)+O),n.dummyToNodeForVerticalAlignment.has($)?n.dummyToNodeForVerticalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementX=O}):n.idToNodeMap.get($).displacementX=O}}),this.nodesInRelativeVertical.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var O=0;n.dummyToNodeForHorizontalAlignment.has($)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:O=n.idToNodeMap.get($).displacementY,n.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var k=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get($)-O;k<H.gap&&(O-=H.gap-k)}else{var k=n.nodeToTempPositionMapVertical.get($)-n.nodeToTempPositionMapVertical.get(H.top)+O;k<H.gap&&(O+=H.gap-k)}}),n.nodeToTempPositionMapVertical.set($,n.nodeToTempPositionMapVertical.get($)+O),n.dummyToNodeForHorizontalAlignment.has($)?n.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementY=O}):n.idToNodeMap.get($).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var R=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(R[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<R.length;y++)if(this.dummyToNodeForVerticalAlignment.has(R[y])){var X=this.dummyToNodeForVerticalAlignment.get(R[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(R[y]).displacementX,z++;for(var it=Q/z,y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=it}):this.idToNodeMap.get(R[y]).displacementX=it}}for(var p=0;p<this.componentsOnVertical.length;p++){var R=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(k){n.idToNodeMap.get(k).displacementY=0}):this.idToNodeMap.get(R[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<R.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(R[y])){var X=this.dummyToNodeForHorizontalAlignment.get(R[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(R[y]).displacementY,z++;for(var it=Q/z,y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=it}):this.idToNodeMap.get(R[y]).displacementY=it}}}},A.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},A.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<n.length;p++){var m=n[p];if(!E.has(m)){var y=m.getSource(),S=m.getTarget();if(y==S)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var D=[];if(D=D.concat(y.getEdgeListToNode(S)),D=D.concat(S.getEdgeListToNode(y)),!E.has(D[0])){if(D.length>1){var F;for(F=0;F<D.length;F++){var W=D[F];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}D.forEach(function(R){E.add(R)})}}}if(E.size==n.length)break}},A.prototype.positionNodesRadially=function(n){for(var E=new u(0,0),p=Math.ceil(Math.sqrt(n.length)),m=0,y=0,S=0,D=new d(0,0),F=0;F<n.length;F++){F%p==0&&(S=0,y=m,F!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var W=n[F],R=b.findCenterOfTree(W);E.x=S,E.y=y,D=A.radialLayout(W,R,E),D.y>m&&(m=Math.floor(D.y)),S=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(n),S=new Y;S.setDeviceOrgX(y.getMinX()),S.setDeviceOrgY(y.getMinY()),S.setWorldOrgX(p.x),S.setWorldOrgY(p.y);for(var D=0;D<n.length;D++){var F=n[D];F.transform(S)}var W=new d(y.getMaxX(),y.getMaxY());return S.inverseTransformPoint(W)},A.branchRadialLayout=function(n,E,p,m,y,S){var D=(m-p+1)/2;D<0&&(D+=180);var F=(D+p)%360,W=F*P.TWO_PI/360,R=y*Math.cos(W),Q=y*Math.sin(W);n.setCenter(R,Q);var z=[];z=z.concat(n.getEdges());var X=z.length;E!=null&&X--;for(var it=0,$=z.length,O,H=n.getEdgesBetween(E);H.length>1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var lt=Math.abs(m-p)/X,J=O;it!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+it*lt)%360,vt=(Nt+lt)%360;A.branchRadialLayout(It,n,Nt,vt,y+S,S),it++}}},A.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;p<n.length;p++){var m=n[p],y=m.getDiagonal();y>E&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var S=m[y],D=S.getParent();this.getNodeDegreeWithChildren(S)===0&&(D.id==null||!this.getToBeTiled(D))&&p.push(S)}for(var y=0;y<p.length;y++){var S=p[y],F=S.getParent().id;typeof E[F]>"u"&&(E[F]=[]),E[F]=E[F].concat(S)}Object.keys(E).forEach(function(W){if(E[W].length>1){var R="DummyCompound_"+W;n.memberGroups[R]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=R,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[R]=z;var X=n.getGraphManager().add(n.newGraph(),z),it=Q.getChild();it.add(z);for(var $=0;$<E[W].length;$++){var O=E[W][$];it.remove(O),X.add(O)}}})},A.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],n[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(n,E)},A.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=n.idToDummyNode[p];if(E[p]=n.tileNodes(n.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,S=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(S+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>S?(m.rect.y-=(m.labelHeight-S)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-S)/2):m.labelPosVertical=="bottom"&&m.setHeight(S+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,S=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,S,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,S=m.paddingTop,D=m.labelMarginLeft,F=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,S,D,F)})},A.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var S=m[y];if(this.getNodeDegree(S)>0)return this.toBeTiled[E]=!1,!1;if(S.getChild()==null){this.toBeTiled[S.id]=!1;continue}if(!this.getToBeTiled(S))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},A.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var p=n.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},A.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},A.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var p=n[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},A.prototype.adjustLocations=function(n,E,p,m,y,S,D){E+=m+S,p+=y+D;for(var F=E,W=0;W<n.rows.length;W++){var R=n.rows[W];E=F;for(var Q=0,z=0;z<R.length;z++){var X=R[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+n.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},A.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[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 S=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(S+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>S?(y.rect.x-=(y.labelWidth-S)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-S)/2):y.labelPosHorizontal=="right"&&y.setWidth(S+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),S=this.getOrgRatio(m),D;return S<y?D=m:D=p,D},A.prototype.getOrgRatio=function(n){var E=n.width,p=n.height,m=E/p;return m<1&&(m=1/m),m},A.prototype.calcIdealRowWidth=function(n,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=n.length,S=0,D=0,F=0;n.forEach(function($){S+=$.getWidth(),D+=$.getHeight(),$.getWidth()>F&&(F=$.getWidth())});var W=S/y,R=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(R+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var it=X*(W+m)-m;return F>it&&(it=F),it+=m*2,it},A.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,S=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};S&&(D.idealRowWidth=this.calcIdealRowWidth(n,p));var F=function(O){return O.rect.width*O.rect.height},W=function(O,H){return F(H)-F(O)};n.sort(function($,O){var H=W;return D.idealRowWidth?(H=S,H($.id,O.id)):H($,O)});for(var R=0,Q=0,z=0;z<n.length;z++){var X=n[z];R+=X.getCenterX(),Q+=X.getCenterY()}D.centerX=R/n.length,D.centerY=Q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(D.rows.length==0)this.insertNodeToRow(D,X,0,E);else if(this.canAddHorizontal(D,X.rect.width,X.rect.height)){var it=D.rows.length-1;D.idealRowWidth||(it=this.getShortestRowIndex(D)),this.insertNodeToRow(D,X,it,E)}else this.insertNodeToRow(D,X,D.rows.length,E);this.shiftToLastRow(D)}return D},A.prototype.insertNodeToRow=function(n,E,p,m){var y=m;if(p==n.rows.length){var S=[];n.rows.push(S),n.rowWidth.push(y),n.rowHeight.push(0)}var D=n.rowWidth[p]+E.rect.width;n.rows[p].length>0&&(D+=n.horizontalPadding),n.rowWidth[p]=D,n.width<D&&(n.width=D);var F=E.rect.height;p>0&&(F+=n.verticalPadding);var W=0;F>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=F,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},A.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]<p&&(E=m,p=n.rowWidth[m]);return E},A.prototype.getLongestRowIndex=function(n){for(var E=-1,p=Number.MIN_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]>p&&(E=m,p=n.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var S=this.getShortestRowIndex(n);if(S<0)return!0;var D=n.rowWidth[S];if(D+n.horizontalPadding+E<=n.width)return!0;var F=0;n.rowHeight[S]<p&&S>0&&(F=p+n.verticalPadding-n.rowHeight[S]);var W;n.width-D>=E+n.horizontalPadding?W=(n.height+F)/(D+E+n.horizontalPadding):W=(n.height+F)/n.width,F=p+n.verticalPadding;var R;return n.width<E?R=(n.height+F)/E:R=(n.height+F)/n.width,R<1&&(R=1/R),W<1&&(W=1/W),W<R},A.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),p=n.rowWidth.length-1,m=n.rows[E],y=m[m.length-1],S=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>S&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-S,n.rowWidth[p]=n.rowWidth[p]+S,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var D=Number.MIN_VALUE,F=0;F<m.length;F++)m[F].height>D&&(D=m[F].height);E>0&&(D+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=D,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var R=n.rowHeight[E]+n.rowHeight[p];n.height+=R-W,this.shiftToLastRow(n)}},A.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},A.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},A.prototype.reduceTrees=function(){for(var n=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var S=0;S<m.length;S++)if(p=m[S],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var D=p.getEdges()[0].getOtherEnd(p),F=new L(p.getCenterX()-D.getCenterX(),p.getCenterY()-D.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),F])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],R=0;R<y.length;R++)y[R][0].getEdges().length==1&&(W.push(y[R]),y[R][0].getOwner().remove(y[R][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},A.prototype.growTree=function(n){for(var E=n.length,p=n[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);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},A.prototype.findPlaceforPrunedNode=function(n){var E,p,m=n[0];if(m==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,S=p.finishX,D=p.startY,F=p.finishY,W=0,R=0,Q=0,z=0,X=[W,Q,R,z];if(D>0)for(var it=y;it<=S;it++)X[0]+=this.grid[it][D-1].length+this.grid[it][D].length-1;if(S<this.grid.length-1)for(var it=D;it<=F;it++)X[1]+=this.grid[S+1][it].length+this.grid[S][it].length-1;if(F<this.grid[0].length-1)for(var it=y;it<=S;it++)X[2]+=this.grid[it][F+1].length+this.grid[it][F].length-1;if(y>0)for(var it=D;it<=F;it++)X[3]+=this.grid[y-1][it].length+this.grid[y][it].length-1;for(var $=w.MAX_VALUE,O,H,k=0;k<X.length;k++)X[k]<$?($=X[k],O=1,H=k):X[k]==$&&O++;if(O==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(O==2&&$==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?E=0:E=1:X[0]==0&&X[2]==0?tt==0?E=0:E=2:X[0]==0&&X[3]==0?tt==0?E=0:E=3:X[1]==0&&X[2]==0?tt==0?E=1:E=2:X[1]==0&&X[3]==0?tt==0?E=1:E=3:tt==0?E=2:E=3}else if(O==4&&$==0){var tt=Math.floor(Math.random()*4);E=tt}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-h.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+h.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+h.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-h.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},a.exports=A},991:(a,r,i)=>{var f=i(551).FDLayoutNode,e=i(551).IMath;function g(s,o,c,h){f.call(this,s,o,c,h)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.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*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T<c.length;T++)h=c[T],h.getChild()==null?(h.displacementX+=s,h.displacementY+=o):h.propogateDisplacementToChildren(s,o)},g.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},g.prototype.setPred1=function(s){this.pred1=s},g.prototype.getPred1=function(){return pred1},g.prototype.getPred2=function(){return pred2},g.prototype.setNext=function(s){this.next=s},g.prototype.getNext=function(){return next},g.prototype.setProcessed=function(s){this.processed=s},g.prototype.isProcessed=function(){return processed},a.exports=g},902:(a,r,i)=>{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h<c.length;h++)T[h]=c[h];return T}else return Array.from(c)}var e=i(806),g=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function o(){}o.handleConstraints=function(c){var h={};h.fixedNodeConstraint=c.constraints.fixedNodeConstraint,h.alignmentConstraint=c.constraints.alignmentConstraint,h.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,u=new Map,d=[],L=[],b=c.getAllNodes(),w=0,P=0;P<b.length;P++){var V=b[P];V.getChild()==null&&(u.set(V.id,w++),d.push(V.getCenterX()),L.push(V.getCenterY()),T.set(V.id,V))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(G){!G.gap&&G.gap!=0&&(G.left?G.gap=e.DEFAULT_EDGE_LENGTH+T.get(G.left).getWidth()/2+T.get(G.right).getWidth()/2:G.gap=e.DEFAULT_EDGE_LENGTH+T.get(G.top).getHeight()/2+T.get(G.bottom).getHeight()/2)});var Y=function(U,Z){return{x:U.x-Z.x,y:U.y-Z.y}},B=function(U){var Z=0,K=0;return U.forEach(function(q){Z+=d[u.get(q)],K+=L[u.get(q)]}),{x:Z/U.size,y:K/U.size}},A=function(U,Z,K,q,at){function gt(ft,st){var Lt=new Set(ft),ct=!0,ht=!1,Xt=void 0;try{for(var Tt=st[Symbol.iterator](),wt;!(ct=(wt=Tt.next()).done);ct=!0){var $t=wt.value;Lt.add($t)}}catch(bt){ht=!0,Xt=bt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}return Lt}var ot=new Map;U.forEach(function(ft,st){ot.set(st,0)}),U.forEach(function(ft,st){ft.forEach(function(Lt){ot.set(Lt.id,ot.get(Lt.id)+1)})});var rt=new Map,j=new Map,dt=new g;ot.forEach(function(ft,st){ft==0?(dt.push(st),K||(Z=="horizontal"?rt.set(st,u.has(st)?d[u.get(st)]:q.get(st)):rt.set(st,u.has(st)?L[u.get(st)]:q.get(st)))):rt.set(st,Number.NEGATIVE_INFINITY),K&&j.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){Z=="horizontal"?(rt.set(ht,u.has(ht)?d[u.get(ht)]:q.get(ht)),Lt+=rt.get(ht)):(rt.set(ht,u.has(ht)?L[u.get(ht)]:q.get(ht)),Lt+=rt.get(ht))}),Lt=Lt/st.length,ft.forEach(function(ht){K.has(ht)||rt.set(ht,Lt)})}else{var ct=0;ft.forEach(function(ht){Z=="horizontal"?ct+=u.has(ht)?d[u.get(ht)]:q.get(ht):ct+=u.has(ht)?L[u.get(ht)]:q.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){rt.set(ht,ct)})}});for(var Mt=function(){var st=dt.shift(),Lt=U.get(st);Lt.forEach(function(ct){if(rt.get(ct.id)<rt.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if(Z=="horizontal"?ht=u.has(ct.id)?d[u.get(ct.id)]:q.get(ct.id):ht=u.has(ct.id)?L[u.get(ct.id)]:q.get(ct.id),rt.set(ct.id,ht),ht<rt.get(st)+ct.gap){var Xt=rt.get(st)+ct.gap-ht;j.get(st).forEach(function(Tt){rt.set(Tt,rt.get(Tt)-Xt)})}}else rt.set(ct.id,rt.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&dt.push(ct.id),K&&j.set(ct.id,gt(j.get(st),j.get(ct.id)))})};dt.length!=0;)Mt();if(K){var pt=new Set;U.forEach(function(ft,st){ft.length==0&&pt.add(st)});var xt=[];j.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](),wt;!(ct=(wt=Tt.next()).done);ct=!0){var $t=wt.value;K.has($t)&&(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,wt=!1,$t=void 0;try{for(var bt=ft[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;Z=="horizontal"?kt=u.has(St)?d[u.get(St)]:q.get(St):kt=u.has(St)?L[u.get(St)]:q.get(St);var Kt=rt.get(St);kt<Lt&&(Lt=kt),kt>ht&&(ht=kt),Kt<ct&&(ct=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){wt=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw $t}}var le=(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;rt.set(te,rt.get(te)+le)}}catch(ee){_t=!0,jt=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(_t)throw jt}}})}return rt},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?d[u.get(j.left)]-d[u.get(j.right)]>=0?Z++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gt<u.size;gt++)d[gt]=-1*d[gt],L[gt]=-1*L[gt];else if(Z>K)for(var ot=0;ot<u.size;ot++)d[ot]=-1*d[ot];else if(q>at)for(var rt=0;rt<u.size;rt++)L[rt]=-1*L[rt]},n=function(U){var Z=[],K=new g,q=new Set,at=0;return U.forEach(function(gt,ot){if(!q.has(ot)){Z[at]=[];var rt=ot;for(K.push(rt),q.add(rt),Z[at].push(rt);K.length!=0;){rt=K.shift();var j=U.get(rt);j.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),Z[at].push(dt.id))})}at++}}),Z},E=function(U){var Z=new Map;return U.forEach(function(K,q){Z.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(U){var Z=new Map;return U.forEach(function(K,q){Z.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},m=[],y=[],S=!1,D=!1,F=new Set,W=new Map,R=new Map,Q=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(G){F.add(G.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(G){G.left?(W.has(G.left)?W.get(G.left).push({id:G.right,gap:G.gap,direction:"horizontal"}):W.set(G.left,[{id:G.right,gap:G.gap,direction:"horizontal"}]),W.has(G.right)||W.set(G.right,[])):(W.has(G.top)?W.get(G.top).push({id:G.bottom,gap:G.gap,direction:"vertical"}):W.set(G.top,[{id:G.bottom,gap:G.gap,direction:"vertical"}]),W.has(G.bottom)||W.set(G.bottom,[]))}),R=E(W),Q=n(R)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(G,U){m[U]=[G.position.x,G.position.y],y[U]=[d[u.get(G.nodeId)],L[u.get(G.nodeId)]]}),S=!0;else if(h.alignmentConstraint)(function(){var G=0;if(h.alignmentConstraint.vertical){for(var U=h.alignmentConstraint.vertical,Z=function(rt){var j=new Set;U[rt].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return F.has(pt)})),Mt=void 0;dt.size>0?Mt=d[u.get(dt.values().next().value)]:Mt=B(j).x,U[rt].forEach(function(pt){m[G]=[Mt,L[u.get(pt)]],y[G]=[d[u.get(pt)],L[u.get(pt)]],G++})},K=0;K<U.length;K++)Z(K);S=!0}if(h.alignmentConstraint.horizontal){for(var q=h.alignmentConstraint.horizontal,at=function(rt){var j=new Set;q[rt].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return F.has(pt)})),Mt=void 0;dt.size>0?Mt=d[u.get(dt.values().next().value)]:Mt=B(j).y,q[rt].forEach(function(pt){m[G]=[d[u.get(pt)],Mt],y[G]=[d[u.get(pt)],L[u.get(pt)]],G++})},gt=0;gt<q.length;gt++)at(gt);S=!0}h.relativePlacementConstraint&&(D=!0)})();else if(h.relativePlacementConstraint){for(var z=0,X=0,it=0;it<Q.length;it++)Q[it].length>z&&(z=Q[it].length,X=it);if(z<R.size/2)_(h.relativePlacementConstraint),S=!1,D=!1;else{var $=new Map,O=new Map,H=[];Q[X].forEach(function(G){W.get(G).forEach(function(U){U.direction=="horizontal"?($.has(G)?$.get(G).push(U):$.set(G,[U]),$.has(U.id)||$.set(U.id,[]),H.push({left:G,right:U.id})):(O.has(G)?O.get(G).push(U):O.set(G,[U]),O.has(U.id)||O.set(U.id,[]),H.push({top:G,bottom:U.id}))})}),_(H),D=!1;var k=A($,"horizontal"),tt=A(O,"vertical");Q[X].forEach(function(G,U){y[U]=[d[u.get(G)],L[u.get(G)]],m[U]=[],k.has(G)?m[U][0]=k.get(G):m[U][0]=d[u.get(G)],tt.has(G)?m[U][1]=tt.get(G):m[U][1]=L[u.get(G)]}),S=!0}}if(S){for(var lt=void 0,J=t.transpose(m),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),nt=s.svd(vt);lt=t.multMat(nt.V,t.transpose(nt.U));for(var ut=0;ut<u.size;ut++){var Et=[d[ut],L[ut]],Ct=[lt[0][0],lt[1][0]],Dt=[lt[0][1],lt[1][1]];d[ut]=t.dotProduct(Et,Ct),L[ut]=t.dotProduct(Et,Dt)}D&&_(h.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(G,U){var Z={x:d[u.get(G.nodeId)],y:L[u.get(G.nodeId)]},K=G.position,q=Y(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=h.fixedNodeConstraint.length,mt.y/=h.fixedNodeConstraint.length,d.forEach(function(G,U){d[U]+=mt.x}),L.forEach(function(G,U){L[U]+=mt.y}),h.fixedNodeConstraint.forEach(function(G){d[u.get(G.nodeId)]=G.position.x,L[u.get(G.nodeId)]=G.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Ot=h.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Ot[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=d[u.get(K.values().next().value)]:q=B(Z).x,Z.forEach(function(at){F.has(at)||(d[u.get(at)]=q)})},Ht=0;Ht<Ot.length;Ht++)Rt(Ht);if(h.alignmentConstraint.horizontal)for(var Ut=h.alignmentConstraint.horizontal,Gt=function(U){var Z=new Set;Ut[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=L[u.get(K.values().next().value)]:q=B(Z).y,Z.forEach(function(at){F.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Gt(Ft)}h.relativePlacementConstraint&&function(){var G=new Map,U=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,gt=new Set,ot=new Set;if(F.forEach(function(Pt){gt.add(Pt),ot.add(Pt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var rt=h.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),rt[yt].forEach(function(At){G.set(At,"dummy"+yt),Z.get("dummy"+yt).push(At),F.has(At)&>.add("dummy"+yt)}),q.set("dummy"+yt,d[u.get(rt[yt][0])])},dt=0;dt<rt.length;dt++)j(dt);if(h.alignmentConstraint.horizontal)for(var Mt=h.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),Mt[yt].forEach(function(At){U.set(At,"dummy"+yt),K.get("dummy"+yt).push(At),F.has(At)&&ot.add("dummy"+yt)}),at.set("dummy"+yt,L[u.get(Mt[yt][0])])},xt=0;xt<Mt.length;xt++)pt(xt)}var ft=new Map,st=new Map,Lt=function(yt){W.get(yt).forEach(function(At){var Zt=void 0,Bt=void 0;At.direction=="horizontal"?(Zt=G.get(yt)?G.get(yt):yt,G.get(At.id)?Bt={id:G.get(At.id),gap:At.gap,direction:At.direction}:Bt=At,ft.has(Zt)?ft.get(Zt).push(Bt):ft.set(Zt,[Bt]),ft.has(Bt.id)||ft.set(Bt.id,[])):(Zt=U.get(yt)?U.get(yt):yt,U.get(At.id)?Bt={id:U.get(At.id),gap:At.gap,direction:At.direction}:Bt=At,st.has(Zt)?st.get(Zt).push(Bt):st.set(Zt,[Bt]),st.has(Bt.id)||st.set(Bt.id,[]))})},ct=!0,ht=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),wt;!(ct=(wt=Tt.next()).done);ct=!0){var $t=wt.value;Lt($t)}}catch(Pt){ht=!0,Xt=Pt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}var bt=E(ft),zt=E(st),St=n(bt),kt=n(zt),Kt=p(ft),le=p(st),Qt=[],_t=[];St.forEach(function(Pt,yt){Qt[yt]=[],Pt.forEach(function(At){Kt.get(At).length==0&&Qt[yt].push(At)})}),kt.forEach(function(Pt,yt){_t[yt]=[],Pt.forEach(function(At){le.get(At).length==0&&_t[yt].push(At)})});var jt=A(ft,"horizontal",gt,q,Qt),Jt=A(st,"vertical",ot,at,_t),oe=function(yt){Z.get(yt)?Z.get(yt).forEach(function(At){d[u.get(At)]=jt.get(yt)}):d[u.get(yt)]=jt.get(yt)},te=!0,ee=!1,Ee=void 0;try{for(var fe=jt.keys()[Symbol.iterator](),Te;!(te=(Te=fe.next()).done);te=!0){var ce=Te.value;oe(ce)}}catch(Pt){ee=!0,Ee=Pt}finally{try{!te&&fe.return&&fe.return()}finally{if(ee)throw Ee}}var ze=function(yt){K.get(yt)?K.get(yt).forEach(function(At){L[u.get(At)]=Jt.get(yt)}):L[u.get(yt)]=Jt.get(yt)},ge=!0,Ne=!1,Le=void 0;try{for(var ue=Jt.keys()[Symbol.iterator](),we;!(ge=(we=ue.next()).done);ge=!0){var ce=we.value;ze(ce)}}catch(Pt){Ne=!0,Le=Pt}finally{try{!ge&&ue.return&&ue.return()}finally{if(Ne)throw Le}}}()}for(var Yt=0;Yt<b.length;Yt++){var Vt=b[Yt];Vt.getChild()==null&&Vt.setCenter(d[u.get(Vt.id)],L[u.get(Vt.id)])}},a.exports=o},551:a=>{a.exports=C}},N={};function v(a){var r=N[a];if(r!==void 0)return r.exports;var i=N[a]={exports:{}};return x[a](i,i.exports,v),i.exports}var l=v(45);return l})()})}(de)),de.exports}(function(I,M){(function(x,N){I.exports=N(qe())})(he.commonjsGlobal,function(C){return(()=>{var x={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var i=arguments.length,f=Array(i>1?i-1:0),e=1;e<i;e++)f[e-1]=arguments[e];return f.forEach(function(g){Object.keys(g).forEach(function(t){return r[t]=g[t]})}),r}},548:(a,r,i)=>{var f=function(){function t(s,o){var c=[],h=!0,T=!1,u=void 0;try{for(var d=s[Symbol.iterator](),L;!(h=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));h=!0);}catch(b){T=!0,u=b}finally{try{!h&&d.return&&d.return()}finally{if(T)throw u}}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")}}(),e=i(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(h,T){typeof h=="number"&&(h=T);for(var u=h.parent()[0];u!=null;){if(s[u.id()])return!1;u=u.parent()[0]}return!0});return c},g.connectComponents=function(t,s,o,c){var h=new e,T=new Set,u=[],d=void 0,L=void 0,b=void 0,w=!1,P=1,V=[],Y=[],B=function(){var _=t.collection();Y.push(_);var n=o[0],E=t.collection();E.merge(n).merge(n.descendants().intersection(s)),u.push(n),E.forEach(function(y){h.push(y),T.add(y),_.merge(y)});for(var p=function(){n=h.shift();var S=t.collection();n.neighborhood().nodes().forEach(function(R){s.intersection(n.edgesWith(R)).length>0&&S.merge(R)});for(var D=0;D<S.length;D++){var F=S[D];if(d=o.intersection(F.union(F.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(R){h.push(R),T.add(R),_.merge(R),o.has(R)&&u.push(R)})}}};h.length!=0;)p();if(_.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(S){_.has(S.source())&&_.has(S.target())&&_.merge(S)})}),u.length==o.length&&(w=!0),!w||w&&P>1){L=u[0],b=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length<b&&(b=y.connectedEdges().length,L=y)}),V.push(L.id());var m=t.collection();m.merge(u[0]),u.forEach(function(y){m.merge(y)}),u=[],o=o.difference(m),P++}};do B();while(!w);return c&&V.length>0&&c.set("dummy"+(c.size+1),V),Y},g.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var V=P.value,Y=f(V,2),B=Y[0],A=Y[1],_=o.cy.getElementById(B);if(_){var n=_.boundingBox(),E=s.xCoords[A]-n.w/2,p=s.xCoords[A]+n.w/2,m=s.yCoords[A]-n.h/2,y=s.yCoords[A]+n.h/2;E<c&&(c=E),p>h&&(h=p),m<T&&(T=m),y>u&&(u=y)}}}catch(R){L=!0,b=R}finally{try{!d&&w.return&&w.return()}finally{if(L)throw b}}var S=t.x-(h+c)/2,D=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(R){return R+S}),s.yCoords=s.yCoords.map(function(R){return R+D})}else{Object.keys(s).forEach(function(R){var Q=s[R],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,it=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>h&&(h=X),it<T&&(T=it),$>u&&(u=$)});var F=t.x-(h+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(R){var Q=s[R];Q.setCenter(Q.getCenterX()+F,Q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,w=void 0,P=void 0,V=t.descendants().not(":parent"),Y=V.length,B=0;B<Y;B++){var A=V[B];L=s[c.get(A.id())]-A.width()/2,b=s[c.get(A.id())]+A.width()/2,w=o[c.get(A.id())]-A.height()/2,P=o[c.get(A.id())]+A.height()/2,h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<P&&(d=P)}var _={};return _.topLeftX=h,_.topLeftY=u,_.width=T-h,_.height=d-u,_},g.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var h=!1;c.children().forEach(function(T){T.css("display")!="none"&&(h=!0)}),h||o.merge(c)}),o},a.exports=g},816:(a,r,i)=>{var f=i(548),e=i(140).CoSELayout,g=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,h=i(140).CoSEConstants,T=function(d,L){var b=d.cy,w=d.eles,P=w.nodes(),V=w.edges(),Y=void 0,B=void 0,A=void 0,_={};d.randomize&&(Y=L.nodeIndexes,B=L.xCoords,A=L.yCoords);var n=function(R){return typeof R=="function"},E=function(R,Q){return n(R)?R(Q):R},p=f.calcParentsWithoutChildren(b,w),m=function W(R,Q,z,X){for(var it=Q.length,$=0;$<it;$++){var O=Q[$],H=null;O.intersection(p).length==0&&(H=O.children());var k=void 0,tt=O.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(X.randomize)if(!O.isParent())k=R.add(new g(z.graphManager,new t(B[Y.get(O.id())]-tt.w/2,A[Y.get(O.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var lt=f.calcBoundingBox(O,B,A,Y);O.intersection(p).length==0?k=R.add(new g(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(lt.width,lt.height))):k=R.add(new g(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else k=R.add(new g(z.graphManager,new t(O.position("x")-tt.w/2,O.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else k=R.add(new g(this.graphManager));if(k.id=O.data("id"),k.nodeRepulsion=E(X.nodeRepulsion,O),k.paddingLeft=parseInt(O.css("padding")),k.paddingTop=parseInt(O.css("padding")),k.paddingRight=parseInt(O.css("padding")),k.paddingBottom=parseInt(O.css("padding")),X.nodeDimensionsIncludeLabels&&(k.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,k.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,k.labelPosVertical=O.css("text-valign"),k.labelPosHorizontal=O.css("text-halign")),_[O.data("id")]=k,isNaN(k.rect.x)&&(k.rect.x=0),isNaN(k.rect.y)&&(k.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(R,Q,z){for(var X=0,it=0,$=0;$<z.length;$++){var O=z[$],H=_[O.data("source")],k=_[O.data("target")];if(H&&k&&H!==k&&H.getEdgesBetween(k).length==0){var tt=Q.add(R.newEdge(),H,k);tt.id=O.id(),tt.idealLength=E(d.idealEdgeLength,O),tt.edgeElasticity=E(d.edgeElasticity,O),X+=tt.idealLength,it++}}d.idealEdgeLength!=null&&(it>0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/it:n(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},S=function(R,Q){Q.fixedNodeConstraint&&(R.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(R.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(R.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new e,F=D.newGraphManager();return m(F.addRoot(),f.getTopMostNodes(P),D,d),y(D,F,V),S(D,d),D.runLayout(),_};a.exports={coseLayout:T}},212:(a,r,i)=>{var f=function(){function d(L,b){for(var w=0;w<b.length;w++){var P=b[w];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,b,w){return b&&d(L.prototype,b),w&&d(L,w),L}}();function e(d,L){if(!(d instanceof L))throw new TypeError("Cannot call a class as a function")}var g=i(658),t=i(548),s=i(657),o=s.spectralLayout,c=i(816),h=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(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){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(){}}),u=function(){function d(L){e(this,d),this.options=g({},T,L)}return f(d,[{key:"run",value:function(){var b=this,w=this.options,P=w.cy,V=w.eles,Y=[],B=[],A=void 0,_=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var n=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;n&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(P.layoutUtilities&&w.packComponents&&(E=P.layoutUtilities("get"),E||(E=P.layoutUtilities()),p=!0),V.nodes().length>0)if(p){var S=t.getTopMostNodes(w.eles.nodes());if(A=t.connectComponents(P,w.eles,S),A.forEach(function(vt){var nt=vt.boundingBox();_.push({x:nt.x1+nt.w/2,y:nt.y1+nt.h/2})}),w.randomize&&A.forEach(function(vt){w.eles=vt,Y.push(o(w))}),w.quality=="default"||w.quality=="proof"){var D=P.collection();if(w.tile){var F=new Map,W=[],R=[],Q=0,z={nodeIndexes:F,xCoords:W,yCoords:R},X=[];if(A.forEach(function(vt,nt){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(nt))}),D.length>1){var it=D.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2}),A.push(D),Y.push(z);for(var $=X.length-1;$>=0;$--)A.splice(X[$],1),Y.splice(X[$],1),_.splice(X[$],1)}}A.forEach(function(vt,nt){w.eles=vt,B.push(h(w,Y[nt])),t.relocateComponent(_[nt],B[nt],w)})}else A.forEach(function(vt,nt){t.relocateComponent(_[nt],Y[nt],w)});var O=new Set;if(A.length>1){var H=[],k=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,nt){var ut=void 0;if(w.quality=="draft"&&(ut=Y[nt].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(k).forEach(function(Dt){if(w.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[nt].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[nt].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[nt].xCoords,Y[nt].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else B[nt][Dt.id()]&&Et.nodes.push({x:B[nt][Dt.id()].getLeft(),y:B[nt][Dt.id()].getTop(),width:B[nt][Dt.id()].getWidth(),height:B[nt][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[nt].xCoords,Y[nt].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[nt].xCoords[Rt]),Ut.push(Y[nt].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[nt].xCoords,Y[nt].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[nt].xCoords[Ht]),Gt.push(Y[nt].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else B[nt][mt.id()]&&B[nt][Ot.id()]&&Et.edges.push({startX:B[nt][mt.id()].getCenterX(),startY:B[nt][mt.id()].getCenterY(),endX:B[nt][Ot.id()].getCenterX(),endY:B[nt][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(nt))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")Y.forEach(function(vt,nt){var ut=vt.xCoords.map(function(Ct){return Ct+tt[nt].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[nt].dy});vt.xCoords=ut,vt.yCoords=Et});else{var lt=0;O.forEach(function(vt){Object.keys(B[vt]).forEach(function(nt){var ut=B[vt][nt];ut.setCenter(ut.getCenterX()+tt[lt].dx,ut.getCenterY()+tt[lt].dy)}),lt++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);Y.push(y)}w.quality=="default"||w.quality=="proof"?(B.push(h(w,Y[0])),t.relocateComponent(_[0],B[0],w)):t.relocateComponent(_[0],Y[0],w)}var J=function(nt,ut){if(w.quality=="default"||w.quality=="proof"){typeof nt=="number"&&(nt=ut);var Et=void 0,Ct=void 0,Dt=nt.data("id");return B.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),w.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.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 Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(nt.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:nt.position("x"),y:nt.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});w.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();a.exports=u},657:(a,r,i)=>{var f=i(548),e=i(140).layoutBase.Matrix,g=i(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),u=h.nodes(":parent"),d=new Map,L=new Map,b=new Map,w=[],P=[],V=[],Y=[],B=[],A=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,S=o.samplingType,D=o.nodeSeparation,F=void 0,W=function(){for(var U=0,Z=0,K=!1;Z<F;){U=Math.floor(Math.random()*E),K=!1;for(var q=0;q<Z;q++)if(Y[q]==U){K=!0;break}if(!K)Y[Z]=U,Z++;else continue}},R=function(U,Z,K){for(var q=[],at=0,gt=0,ot=0,rt=void 0,j=[],dt=0,Mt=1,pt=0;pt<E;pt++)j[pt]=p;for(q[gt]=U,j[U]=0;gt>=at;){ot=q[at++];for(var xt=w[ot],ft=0;ft<xt.length;ft++)rt=L.get(xt[ft]),j[rt]==p&&(j[rt]=j[ot]+1,q[++gt]=rt);A[ot][Z]=j[ot]*D}if(K){for(var st=0;st<E;st++)A[st][Z]<B[st]&&(B[st]=A[st][Z]);for(var Lt=0;Lt<E;Lt++)B[Lt]>dt&&(dt=B[Lt],Mt=Lt)}return Mt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*E);for(var q=0;q<E;q++)B[q]=p;for(var at=0;at<F;at++)Y[at]=Z,Z=R(Z,at,U)}else{W();for(var K=0;K<F;K++)R(Y[K],K,U)}for(var gt=0;gt<E;gt++)for(var ot=0;ot<F;ot++)A[gt][ot]*=A[gt][ot];for(var rt=0;rt<F;rt++)_[rt]=[];for(var j=0;j<F;j++)for(var dt=0;dt<F;dt++)_[j][dt]=A[Y[dt]][j]},z=function(){for(var U=g.svd(_),Z=U.S,K=U.U,q=U.V,at=Z[0]*Z[0]*Z[0],gt=[],ot=0;ot<F;ot++){gt[ot]=[];for(var rt=0;rt<F;rt++)gt[ot][rt]=0,ot==rt&&(gt[ot][rt]=Z[ot]/(Z[ot]*Z[ot]+at/(Z[ot]*Z[ot])))}n=e.multMat(e.multMat(q,gt),e.transpose(K))},X=function(){for(var U=void 0,Z=void 0,K=[],q=[],at=[],gt=[],ot=0;ot<E;ot++)K[ot]=Math.random(),q[ot]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var rt=m,j=m,dt=void 0;;){for(var Mt=0;Mt<E;Mt++)at[Mt]=K[Mt];if(K=e.multGamma(e.multL(e.multGamma(at),A,n)),U=e.dotProduct(at,K),K=e.normalize(K),rt=e.dotProduct(at,K),dt=Math.abs(rt/j),dt<=1+y&&dt>=1)break;j=rt}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(j=m;;){for(var xt=0;xt<E;xt++)gt[xt]=q[xt];if(gt=e.minusOp(gt,e.multCons(at,e.dotProduct(at,gt))),q=e.multGamma(e.multL(e.multGamma(gt),A,n)),Z=e.dotProduct(gt,q),q=e.normalize(q),rt=e.dotProduct(gt,q),dt=Math.abs(rt/j),dt<=1+y&&dt>=1)break;j=rt}for(var ft=0;ft<E;ft++)gt[ft]=q[ft];P=e.multCons(at,Math.sqrt(Math.abs(U))),V=e.multCons(gt,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,h,f.getTopMostNodes(T),d),u.forEach(function(G){f.connectComponents(c,h,f.getTopMostNodes(G.descendants().intersection(h)),d)});for(var it=0,$=0;$<T.length;$++)T[$].isParent()||L.set(T[$].id(),it++);var O=!0,H=!1,k=void 0;try{for(var tt=d.keys()[Symbol.iterator](),lt;!(O=(lt=tt.next()).done);O=!0){var J=lt.value;L.set(J,it++)}}catch(G){H=!0,k=G}finally{try{!O&&tt.return&&tt.return()}finally{if(H)throw k}}for(var It=0;It<L.size;It++)w[It]=[];u.forEach(function(G){for(var U=G.children().intersection(h);U.nodes(":childless").length==0;)U=U.nodes()[0].children().intersection(h);var Z=0,K=U.nodes(":childless")[0].connectedEdges().length;U.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),b.set(G.id(),U.nodes(":childless")[Z].id())}),T.forEach(function(G){var U=void 0;G.isParent()?U=L.get(b.get(G.id())):U=L.get(G.id()),G.neighborhood().nodes().forEach(function(Z){h.intersection(G.edgesWith(Z)).length>0&&(Z.isParent()?w[U].push(b.get(Z.id())):w[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,w[Z].push(K),w[L.get(K)].push(U)})},vt=!0,nt=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(G){nt=!0,ut=G}finally{try{!vt&&Et.return&&Et.return()}finally{if(nt)throw ut}}E=L.size;var mt=void 0;if(E>2){F=E<o.sampleSize?E:o.sampleSize;for(var Ot=0;Ot<E;Ot++)A[Ot]=[];for(var Rt=0;Rt<F;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(S),z(),X(),mt={nodeIndexes:L,xCoords:P,yCoords:V}):(L.forEach(function(G,U){P.push(c.getElementById(U).position("x")),V.push(c.getElementById(U).position("y"))}),mt={nodeIndexes:L,xCoords:P,yCoords:V}),mt}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Gt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Gt.x),V.push(Gt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Gt.x+Ft/2+Vt/2+o.idealEdgeLength),V.push(Gt.y)}return mt={nodeIndexes:L,xCoords:P,yCoords:V},mt}};a.exports={spectralLayout:t}},579:(a,r,i)=>{var f=i(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),a.exports=e},140:a=>{a.exports=C}},N={};function v(a){var r=N[a];if(r!==void 0)return r.exports;var i=N[a]={exports:{}};return x[a](i,i.exports,v),i.exports}var l=v(579);return l})()})})(Ie);var Qe=Ie.exports;const Je=he.getDefaultExportFromCjs(Qe);var Ae={L:"left",R:"right",T:"top",B:"bottom"},De={L:et.__name(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:et.__name(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:et.__name(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:et.__name(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:et.__name((I,M)=>I-M+2,"L"),R:et.__name((I,M)=>I-2,"R"),T:et.__name((I,M)=>I-M+2,"T"),B:et.__name((I,M)=>I-2,"B")},Ke=et.__name(function(I){return Wt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Oe=et.__name(function(I){const M=I;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=et.__name(function(I){const M=I;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=et.__name(function(I){const M=I;return M==="T"||M==="B"},"isArchitectureDirectionY"),me=et.__name(function(I,M){const C=Wt(I)&&qt(M),x=qt(I)&&Wt(M);return C||x},"isArchitectureDirectionXY"),_e=et.__name(function(I){const M=I[0],C=I[1],x=Wt(M)&&qt(C),N=qt(M)&&Wt(C);return x||N},"isArchitecturePairXY"),je=et.__name(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),pe=et.__name(function(I,M){const C=`${I}${M}`;return je(C)?C:void 0},"getArchitectureDirectionPair"),tr=et.__name(function([I,M],C){const x=C[0],N=C[1];return Wt(x)?qt(N)?[I+(x==="L"?-1:1),M+(N==="T"?1:-1)]:[I+(x==="L"?-1:1),M]:Wt(N)?[I+(N==="L"?1:-1),M+(x==="T"?1:-1)]:[I,M+(x==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),er=et.__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"),rr=et.__name(function(I,M){return me(I,M)?"bend":Wt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ir=et.__name(function(I){return I.type==="service"},"isArchitectureService"),nr=et.__name(function(I){return I.type==="junction"},"isArchitectureJunction"),Re=et.__name((I,M)=>{const[C,x]=[I,M].sort();return`${JSON.stringify(C)}-${JSON.stringify(x)}`},"architectureGroupAlignmentKey"),Se=et.__name(I=>I.data(),"edgeData"),ie=et.__name(I=>I.data(),"nodeData"),ar=et.defaultConfig_default.architecture,ne,Fe=(ne=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=et.setAccTitle,this.getAccTitle=et.getAccTitle,this.setDiagramTitle=et.setDiagramTitle,this.getDiagramTitle=et.getDiagramTitle,this.getAccDescription=et.getAccDescription,this.setAccDescription=et.setAccDescription,this.clear()}setDiagramId(M){this.diagramId=M}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",et.clear()}addService({id:M,icon:C,in:x,title:N,iconText:v}){if(this.registeredIds.has(M))throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The service [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(x)==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"service",icon:C,iconText:v,title:N,edges:[],in:x})}getServices(){return[...this.nodes.values()].filter(ir)}addJunction({id:M,in:C}){if(this.registeredIds.has(M))throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(C!==void 0){if(M===C)throw new Error(`The junction [${M}] cannot be placed within itself`);if(!this.registeredIds.has(C))throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(C)==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"junction",edges:[],in:C})}getJunctions(){return[...this.nodes.values()].filter(nr)}getNodes(){return[...this.nodes.values()]}getNode(M){return this.nodes.get(M)??null}addGroup({id:M,icon:C,in:x,title:N}){if(this.registeredIds.has(M))throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The group [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(x)==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds.set(M,"group"),this.groups.set(M,{id:M,icon:C,title:N,in:x})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:M,rhsId:C,lhsDir:x,rhsDir:N,lhsInto:v,rhsInto:l,lhsGroup:a,rhsGroup:r,title:i}){if(!Oe(x))throw new Error(`Invalid direction given for left hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(x)}`);if(!Oe(N))throw new Error(`Invalid direction given for right hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(!this.nodes.has(M)&&!this.groups.has(M))throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(C)&&!this.groups.has(C))throw new Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes.get(M).in,e=this.nodes.get(C).in;if(a&&f&&e&&f==e)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&f&&e&&f==e)throw new Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:M,lhsDir:x,lhsInto:v,lhsGroup:a,rhsId:C,rhsDir:N,rhsInto:l,rhsGroup:r,title:i};this.edges.push(g);const t=this.nodes.get(M),s=this.nodes.get(C);t&&s&&(t.edges.push(this.edges[this.edges.length-1]),s.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(M){if(M.members.length<2)throw new Error(`An align directive requires at least two members; got ${M.members.length}`);const C=new Set;M.members.forEach(x=>{if(this.registeredIds.get(x)!=="node")throw new Error(`align ${M.direction} references [${x}], which is not a service or junction`);if(C.has(x))throw new Error(`align ${M.direction} lists [${x}] more than once`);C.add(x)}),this.layoutHints.push(M)}getLayoutHints(){return this.layoutHints}getDataStructures(){var M,C;if(this.dataStructures===void 0){const x=new Map,N=new Map;for(const[i,f]of this.nodes.entries()){const e=new Map;for(const g of f.edges){const t=(M=this.getNode(g.lhsId))==null?void 0:M.in,s=(C=this.getNode(g.rhsId))==null?void 0:C.in;if(t&&s&&t!==s){const o=rr(g.lhsDir,g.rhsDir);o!=="bend"&&x.set(Re(t,s),o)}if(g.lhsId===i){const o=pe(g.lhsDir,g.rhsDir);o&&e.set(o,g.rhsId)}else{const o=pe(g.rhsDir,g.lhsDir);o&&e.set(o,g.lhsId)}}N.set(i,e)}const v=new Set,l=new Set(N.keys()),a=et.__name(i=>{const f=new Map([[i,[0,0]]]),e=[i];for(;e.length>0;){const g=e.shift();if(g){v.add(g),l.delete(g);const t=N.get(g);if(!t)throw new Error(`BFS error: adjacency list for id ${g} not found. Please report this as a bug.`);const s=f.get(g);if(!s)throw new Error(`BFS error: position for id ${g} not found in spatial map. Please report this as a bug.`);const[o,c]=s;t.forEach((h,T)=>{v.has(h)||(f.set(h,tr([o,c],T)),e.push(h))})}}return f},"BFS"),r=[];for(;l.size>0;){const i=l.values().next().value;r.push(a(i))}this.dataStructures={adjList:N,spatialMaps:r,groupAlignments:x}}return this.dataStructures}setElementForId(M,C){this.elements.set(M,C)}getElementById(M){return this.elements.get(M)}getConfig(){return et.cleanAndMerge({...ar,...et.getConfig().architecture})}getConfigField(M){return this.getConfig()[M]}},et.__name(ne,"ArchitectureDB"),ne),or=et.__name((I,M)=>{var C;$e.populateCommonDb(I,M),I.groups.map(x=>M.addGroup(x)),I.services.map(x=>M.addService({...x,type:"service"})),I.junctions.map(x=>M.addJunction({...x,type:"junction"})),I.edges.map(x=>M.addEdge(x)),(C=I.alignments)==null||C.map(x=>M.addLayoutHint({direction:x.direction,members:[...x.members]}))},"populateDb"),be={parser:{yy:void 0},parse:et.__name(async I=>{var x;const M=await Be.parse("architecture",I);et.log.debug(M);const C=(x=be.parser)==null?void 0:x.yy;if(!(C instanceof Fe))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.");or(M,C)},"parse")},sr=et.__name(I=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${I.archEdgeWidth};
|
|
4
4
|
stroke: ${I.archEdgeColor};
|