orbitchat 2.2.6 → 2.2.8
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/bin/orbitchat.js +56 -32
- package/dist/assets/{_basePickBy-BjEly54R-XZ-uT-Uj.js → _basePickBy-1MakYQmz-ydNwd1l_.js} +1 -1
- package/dist/assets/{_baseUniq-DRc_T5HB-BsnuNSgv.js → _baseUniq-Cd4llU-Q-Cdw60MU4.js} +1 -1
- package/dist/assets/{api-RpN2_Bta.js → api-L84wIOvt.js} +1 -1
- package/dist/assets/arc-b8oyw-lz-1LLYREoj.js +1 -0
- package/dist/assets/{architectureDiagram-VXUJARFQ-Cfm45ePu-CSKO1yu3.js → architectureDiagram-VXUJARFQ-BuSDV2Do-_okKpoAJ.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-BRbgLESd-Bbm-oCAg.js → blockDiagram-VD42YOAC-jQHtez-j-rtzBv-vF.js} +4 -4
- package/dist/assets/{c4Diagram-YG6GDRKO-DLei6MnZ-SeObXeAe.js → c4Diagram-YG6GDRKO-_5giM-EA-DjRoFacG.js} +4 -4
- package/dist/assets/channel-BLPbvVT2-CnJJPuZ5.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-DeMNg1Xd-CMa4zZ7K.js → chunk-4BX2VUAB-BeuiUsbc-DN2rdYji.js} +1 -1
- package/dist/assets/chunk-55IACEB6-C4OH5_NF-DrgL4Tv-.js +1 -0
- package/dist/assets/{chunk-B4BG7PRW-CIxgz8SC-Cg2SKJYD.js → chunk-B4BG7PRW-CnUkcto7-DHe7ngzh.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-i035IDz6-DxyMtoDb.js → chunk-DI55MBZ5-CSd59tsh-DFg8M9sN.js} +4 -4
- package/dist/assets/{chunk-FMBD7UC4-Bm0ev8jq-DBEEbKOi.js → chunk-FMBD7UC4-C6VImbBX-ip_5_GPo.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-C8-RyAc3-Bziqpynq.js → chunk-QN33PNHL-DrWWTLTH-tpIkWiz1.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-DMEEp6GB-NSbjkrZ8.js → chunk-QZHKN3VN-C6_I39By-ZQp0I6tE.js} +1 -1
- package/dist/assets/chunk-TZMSLE5B-DGddLgNl-CifiGjd6.js +1 -0
- package/dist/assets/classDiagram-2ON5EDUG-BngjTxOv-2Y-76rXt.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-BngjTxOv-2Y-76rXt.js +1 -0
- package/dist/assets/clone-DH1Kq5Y6-DxQT_fR1.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-VxeRCpgs-DsXa8Zq3.js → cose-bilkent-S5V4N54A-DcyCVH6S-zMMT3oqX.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-B-o0qgxK-DfZm7xId.js → dagre-6UL2VRFP-B799wmhr-DuXOlM7I.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-CoKmJ9sN-rwg0eDKT.js → diagram-PSM6KHXK-Dxp2wzKk-CmF_yeQm.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-ETMfkzYL-Bawb4i2Y.js → diagram-QEK2KX5R-Km_liL9n-DiDvLC9k.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-BgLbl6rv-fjzP4qrY.js → diagram-S2PKOQOG-tSpHqt0k-Dhi7ufxY.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-Swwdy5pk-TsPzHVEQ.js → erDiagram-Q2GNP2WA-DF6ylQ7o-CjIoFnUJ.js} +2 -2
- package/dist/assets/{flowDiagram-NV44I4VS-DXJdBBSZ-DNo_92-L.js → flowDiagram-NV44I4VS-BQUYJeB--D2fTwlvO.js} +1 -1
- package/dist/assets/{ganttDiagram-LVOFAZNH-DmRbHwxf-Cwvlwlkm.js → ganttDiagram-LVOFAZNH-BidPm1xz-D_x48jVE.js} +4 -4
- package/dist/assets/{gitGraphDiagram-NY62KEGX-D30uHfXn-C_O3r_x5.js → gitGraphDiagram-NY62KEGX-zbMOFVrv-DTVFadEr.js} +2 -2
- package/dist/assets/{graph-ClfIprSM-BZwHPDDo.js → graph-aRt77rZZ-Dq9dkNsk.js} +1 -1
- package/dist/assets/{index-Dwfg9sR1.js → index-p0knuDQ9.js} +135 -135
- package/dist/assets/{index-Bny2bm5_-BBHjCfey.js → index-rW5EEHFR-Cm6Gxbor.js} +1 -1
- package/dist/assets/{infoDiagram-ER5ION4S-C0DTNQfZ-DOapqc3o.js → infoDiagram-ER5ION4S-ozjqEnsq-D0PwL9B_.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-53CUbf20-Dh7OAcXv.js → journeyDiagram-XKPGCS4Q-C6JuEafR-BSuib8Wf.js} +4 -4
- package/dist/assets/{kanban-definition-3W4ZIXB7-B-HAgUf7-KfKbtZ09.js → kanban-definition-3W4ZIXB7-Ci4U3NR--Bxb6Yi8G.js} +4 -4
- package/dist/assets/{layout-DoRwGyA9-CrmvCQM-.js → layout-BKjRgLFe-WihuzEZg.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-JxieKS1D-DwQCKBi2.js → mindmap-definition-VGOIOE7T-DveejCtl-DXLxEnp4.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-vEsBIPBi-BNA3SacN.js → pieDiagram-ADFJNKIX-DAbSGtae-BruonBFZ.js} +2 -2
- package/dist/assets/{quadrantDiagram-AYHSOK5B-DuNXQUnS-DiYTe8-4.js → quadrantDiagram-AYHSOK5B-DnnzUQMW-DzWXEz5-.js} +4 -4
- package/dist/assets/{requirementDiagram-UZGBJVZJ-Ajt9-U96-CaUedp2k.js → requirementDiagram-UZGBJVZJ-BB9jagBx-q21wBQ9N.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-BNMEPupP-CoW39JHu.js → sankeyDiagram-TZEHDZUN-BttZx2-h-Cr53tHP7.js} +4 -4
- package/dist/assets/{sequenceDiagram-WL72ISMW-D2j881gi-CpM-9Ot5.js → sequenceDiagram-WL72ISMW-DA6yVs26-B4W8xwkp.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-D9G5SS9f-DyhUPTNH.js → stateDiagram-FKZM4ZOC-BD8xEcbc-BWOiPxZu.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-DINzAoyF-DshiRv7Q.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-B95452nE-BtUwy1tt.js → timeline-definition-IT6M3QCI-XN-D5T3b-l0nKzR1k.js} +1 -1
- package/dist/assets/{treemap-KMMF4GRG-Dfxm7cSf-Dp6bDrrM.js → treemap-KMMF4GRG-C4GHjB3F-_nPgBK22.js} +18 -18
- package/dist/assets/{xychartDiagram-PRI3JC2R-CZX71UOJ-DZlx6d4_.js → xychartDiagram-PRI3JC2R-BL53__6J-XcAq-Lxf.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/arc-CZCQSTaI-C-VU_J9B.js +0 -1
- package/dist/assets/channel-DkFrLL9m-oLu-Ehez.js +0 -1
- package/dist/assets/chunk-55IACEB6-_r7qMy9s-Dy635JXO.js +0 -1
- package/dist/assets/chunk-TZMSLE5B-CNFsEzOl-DVds0hZJ.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-DnsiOvOV-O_0UXE1J.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-DnsiOvOV-O_0UXE1J.js +0 -1
- package/dist/assets/clone-DduvFCk3-BjQT37Sj.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D0cjqibA-Db7olDTG.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as pt,am as ze,aT as Ve,O as De,s as je,l as $e,n as qe,o as Qe,u as Ke,f as Ze,t as Je,J as ti,L as ei,M as ii,c as ve,bc as me,bl as ce,w as ri,e as ni,F as oi,bm as ai,bn as si,I as hi}from"./index-Dwfg9sR1.js";import{m as li}from"./chunk-4BX2VUAB-DeMNg1Xd-CMa4zZ7K.js";import{N as di}from"./treemap-KMMF4GRG-Dfxm7cSf-Dp6bDrrM.js";import{e as Re}from"./cytoscape.esm-CjI2IsL8-Da6dFVsf.js";import"./_baseUniq-DRc_T5HB-BsnuNSgv.js";import"./_basePickBy-BjEly54R-XZ-uT-Uj.js";import"./clone-DduvFCk3-BjQT37Sj.js";var ge={exports:{}},ue={exports:{}},fe={exports:{}},ci=fe.exports,Le;function gi(){return Le||(Le=1,function(C,H){(function(L,P){C.exports=P()})(ci,function(){return function(L){var P={};function N(u){if(P[u])return P[u].exports;var l=P[u]={i:u,l:!1,exports:{}};return L[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=L,N.c=P,N.i=function(u){return u},N.d=function(u,l,o){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:o})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)}([function(L,P,N){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,L.exports=u},function(L,P,N){var u=N(2),l=N(8),o=N(9);function i(a,n,f){u.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=a,this.target=n}i.prototype=Object.create(u.prototype);for(var e in u)i[e]=u[e];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(a){if(this.source===a)return this.target;if(this.target===a)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(a,n){for(var f=this.getOtherEnd(a),t=n.getGraphManager().getRoot();;){if(f.getOwner()==n)return f;if(f.getOwner()==t)break;f=f.getOwner().getParent()}return null},i.prototype.updateLength=function(){var a=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),a),this.isOverlapingSourceAndTarget||(this.lengthX=a[0]-a[2],this.lengthY=a[1]-a[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=i},function(L,P,N){function u(l){this.vGraphObject=l}L.exports=u},function(L,P,N){var u=N(2),l=N(10),o=N(13),i=N(0),e=N(16),a=N(5);function n(t,h,s,c){s==null&&c==null&&(c=h),u.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,s!=null&&h!=null?this.rect=new o(h.x,h.y,s.width,s.height):this.rect=new o}n.prototype=Object.create(u.prototype);for(var f in u)n[f]=u[f];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(t){this.rect.width=t},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(t){this.rect.height=t},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new a(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new a(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(t,h){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(t,h){this.rect.x=t-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(t,h){this.rect.x=t,this.rect.y=h},n.prototype.moveBy=function(t,h){this.rect.x+=t,this.rect.y+=h},n.prototype.getEdgeListToNode=function(t){var h=[],s=this;return s.edges.forEach(function(c){if(c.target==t){if(c.source!=s)throw"Incorrect edge source!";h.push(c)}}),h},n.prototype.getEdgesBetween=function(t){var h=[],s=this;return s.edges.forEach(function(c){if(!(c.source==s||c.target==s))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&h.push(c)}),h},n.prototype.getNeighborsList=function(){var t=new Set,h=this;return h.edges.forEach(function(s){if(s.source==h)t.add(s.target);else{if(s.target!=h)throw"Incorrect incidency!";t.add(s.source)}}),t},n.prototype.withChildren=function(){var t=new Set,h,s;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),d=0;d<c.length;d++)h=c[d],s=h.withChildren(),s.forEach(function(T){t.add(T)});return t},n.prototype.getNoOfChildren=function(){var t=0,h;if(this.child==null)t=1;else for(var s=this.child.getNodes(),c=0;c<s.length;c++)h=s[c],t+=h.getNoOfChildren();return t==0&&(t=1),t},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.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)},n.prototype.scatter=function(){var t,h,s=-i.INITIAL_WORLD_BOUNDARY,c=i.INITIAL_WORLD_BOUNDARY;t=i.WORLD_CENTER_X+e.nextDouble()*(c-s)+s;var d=-i.INITIAL_WORLD_BOUNDARY,T=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+e.nextDouble()*(T-d)+d,this.rect.x=t,this.rect.y=h},n.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()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=t.getRight()-t.getLeft(),s=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(h+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>h?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(s+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>s?(this.rect.y-=(this.labelHeight-s)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(s+this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(t){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var s=this.rect.y;s>i.WORLD_BOUNDARY?s=i.WORLD_BOUNDARY:s<-i.WORLD_BOUNDARY&&(s=-i.WORLD_BOUNDARY);var c=new a(h,s),d=t.inverseTransformPoint(c);this.setLocation(d.x,d.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},L.exports=n},function(L,P,N){var u=N(0);function l(){}for(var o in u)l[o]=u[o];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,L.exports=l},function(L,P,N){function u(l,o){l==null&&o==null?(this.x=0,this.y=0):(this.x=l,this.y=o)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},L.exports=u},function(L,P,N){var u=N(2),l=N(10),o=N(0),i=N(7),e=N(3),a=N(1),n=N(13),f=N(12),t=N(11);function h(c,d,T){u.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,d!=null&&d instanceof i?this.graphManager=d:d!=null&&d instanceof Layout&&(this.graphManager=d.graphManager)}h.prototype=Object.create(u.prototype);for(var s in u)h[s]=u[s];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,d,T){if(d==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var y=c;if(!(this.getNodes().indexOf(d)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(d.owner==T.owner&&d.owner==this))throw"Both owners must be this graph!";return d.owner!=T.owner?null:(y.source=d,y.target=T,y.isInterGraph=!1,this.getEdges().push(y),d.edges.push(y),T!=d&&T.edges.push(y),y)}},h.prototype.remove=function(c){var d=c;if(c instanceof e){if(d==null)throw"Node is null!";if(!(d.owner!=null&&d.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=d.edges.slice(),g,y=T.length,A=0;A<y;A++)g=T[A],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var I=this.nodes.indexOf(d);if(I==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(c instanceof a){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var k=g.source.edges.indexOf(g),S=g.target.edges.indexOf(g);if(!(k>-1&&S>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(k,1),g.target!=g.source&&g.target.edges.splice(S,1);var I=g.source.owner.getEdges().indexOf(g);if(I==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(I,1)}},h.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,d=l.MAX_VALUE,T,g,y,A=this.getNodes(),I=A.length,k=0;k<I;k++){var S=A[k];T=S.getTop(),g=S.getLeft(),c>T&&(c=T),d>g&&(d=g)}return c==l.MAX_VALUE?null:(A[0].getParent().paddingLeft!=null?y=A[0].getParent().paddingLeft:y=this.margin,this.left=d-y,this.top=c-y,new f(this.left,this.top))},h.prototype.updateBounds=function(c){for(var d=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,y=-l.MAX_VALUE,A,I,k,S,U,Y=this.nodes,$=Y.length,O=0;O<$;O++){var rt=Y[O];c&&rt.child!=null&&rt.updateBounds(),A=rt.getLeft(),I=rt.getRight(),k=rt.getTop(),S=rt.getBottom(),d>A&&(d=A),T<I&&(T=I),g>k&&(g=k),y<S&&(y=S)}var r=new n(d,g,T-d,y-g);d==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?U=Y[0].getParent().paddingLeft:U=this.margin,this.left=r.x-U,this.right=r.x+r.width+U,this.top=r.y-U,this.bottom=r.y+r.height+U},h.calculateBounds=function(c){for(var d=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,y=-l.MAX_VALUE,A,I,k,S,U=c.length,Y=0;Y<U;Y++){var $=c[Y];A=$.getLeft(),I=$.getRight(),k=$.getTop(),S=$.getBottom(),d>A&&(d=A),T<I&&(T=I),g>k&&(g=k),y<S&&(y=S)}var O=new n(d,g,T-d,y-g);return O},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var c=0,d=this.nodes,T=d.length,g=0;g<T;g++){var y=d[g];c+=y.calcEstimatedSize()}return c==0?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var d=new t,T=new Set,g=this.nodes[0],y,A,I=g.withChildren();for(I.forEach(function(O){d.push(O),T.add(O)});d.length!==0;){g=d.shift(),y=g.getEdges();for(var k=y.length,S=0;S<k;S++){var U=y[S];if(A=U.getOtherEndInGraph(g,this),A!=null&&!T.has(A)){var Y=A.withChildren();Y.forEach(function(O){d.push(O),T.add(O)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var $=0;T.forEach(function(O){O.owner==c&&$++}),$==this.nodes.length&&(this.isConnected=!0)}},L.exports=h},function(L,P,N){var u,l=N(1);function o(i){u=N(6),this.layout=i,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var i=this.layout.newGraph(),e=this.layout.newNode(null),a=this.add(i,e);return this.setRootGraph(a),this.rootGraph},o.prototype.add=function(i,e,a,n,f){if(a==null&&n==null&&f==null){if(i==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return i.parent=e,e.child=i,i}else{f=a,n=e,a=i;var t=n.getOwner(),h=f.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return a.isInterGraph=!1,t.add(a,n,f);if(a.isInterGraph=!0,a.source=n,a.target=f,this.edges.indexOf(a)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(a),!(a.source!=null&&a.target!=null))throw"Edge source and/or target is null!";if(!(a.source.edges.indexOf(a)==-1&&a.target.edges.indexOf(a)==-1))throw"Edge already in source and/or target incidency list!";return a.source.edges.push(a),a.target.edges.push(a),a}},o.prototype.remove=function(i){if(i instanceof u){var e=i;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var a=[];a=a.concat(e.getEdges());for(var n,f=a.length,t=0;t<f;t++)n=a[t],e.remove(n);var h=[];h=h.concat(e.getNodes());var s;f=h.length;for(var t=0;t<f;t++)s=h[t],e.remove(s);e==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(e);this.graphs.splice(c,1),e.parent=null}else if(i instanceof l){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var c=n.source.edges.indexOf(n);if(n.source.edges.splice(c,1),c=n.target.edges.indexOf(n),n.target.edges.splice(c,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var c=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(c,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],e=this.getGraphs(),a=e.length,n=0;n<a;n++)i=i.concat(e[n].getNodes());this.allNodes=i}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],e=this.getGraphs();e.length;for(var a=0;a<e.length;a++)i=i.concat(e[a].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(i,e){if(!(i!=null&&e!=null))throw"assert failed";if(i==e)return!0;var a=i.getOwner(),n;do{if(n=a.getParent(),n==null)break;if(n==e)return!0;if(a=n.getOwner(),a==null)break}while(!0);a=e.getOwner();do{if(n=a.getParent(),n==null)break;if(n==i)return!0;if(a=n.getOwner(),a==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){for(var i,e,a,n,f,t=this.getAllEdges(),h=t.length,s=0;s<h;s++){if(i=t[s],e=i.source,a=i.target,i.lca=null,i.sourceInLca=e,i.targetInLca=a,e==a){i.lca=e.getOwner();continue}for(n=e.getOwner();i.lca==null;){for(i.targetInLca=a,f=a.getOwner();i.lca==null;){if(f==n){i.lca=f;break}if(f==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=f.getParent(),f=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(i,e){if(i==e)return i.getOwner();var a=i.getOwner();do{if(a==null)break;var n=e.getOwner();do{if(n==null)break;if(n==a)return n;n=n.getParent().getOwner()}while(!0);a=a.getParent().getOwner()}while(!0);return a},o.prototype.calcInclusionTreeDepths=function(i,e){i==null&&e==null&&(i=this.rootGraph,e=1);for(var a,n=i.getNodes(),f=n.length,t=0;t<f;t++)a=n[t],a.inclusionTreeDepth=e,a.child!=null&&this.calcInclusionTreeDepths(a.child,e+1)},o.prototype.includesInvalidEdge=function(){for(var i,e=[],a=this.edges.length,n=0;n<a;n++)i=this.edges[n],this.isOneAncestorOfOther(i.source,i.target)&&e.push(i);for(var n=0;n<e.length;n++)this.remove(e[n]);return!1},L.exports=o},function(L,P,N){var u=N(12);function l(){}l.calcSeparationAmount=function(o,i,e,a){if(!o.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(o,i,n),e[0]=Math.min(o.getRight(),i.getRight())-Math.max(o.x,i.x),e[1]=Math.min(o.getBottom(),i.getBottom())-Math.max(o.y,i.y),o.getX()<=i.getX()&&o.getRight()>=i.getRight()?e[0]+=Math.min(i.getX()-o.getX(),o.getRight()-i.getRight()):i.getX()<=o.getX()&&i.getRight()>=o.getRight()&&(e[0]+=Math.min(o.getX()-i.getX(),i.getRight()-o.getRight())),o.getY()<=i.getY()&&o.getBottom()>=i.getBottom()?e[1]+=Math.min(i.getY()-o.getY(),o.getBottom()-i.getBottom()):i.getY()<=o.getY()&&i.getBottom()>=o.getBottom()&&(e[1]+=Math.min(o.getY()-i.getY(),i.getBottom()-o.getBottom()));var f=Math.abs((i.getCenterY()-o.getCenterY())/(i.getCenterX()-o.getCenterX()));i.getCenterY()===o.getCenterY()&&i.getCenterX()===o.getCenterX()&&(f=1);var t=f*e[0],h=e[1]/f;e[0]<h?h=e[0]:t=e[1],e[0]=-1*n[0]*(h/2+a),e[1]=-1*n[1]*(t/2+a)},l.decideDirectionsForOverlappingNodes=function(o,i,e){o.getCenterX()<i.getCenterX()?e[0]=-1:e[0]=1,o.getCenterY()<i.getCenterY()?e[1]=-1:e[1]=1},l.getIntersection2=function(o,i,e){var a=o.getCenterX(),n=o.getCenterY(),f=i.getCenterX(),t=i.getCenterY();if(o.intersects(i))return e[0]=a,e[1]=n,e[2]=f,e[3]=t,!0;var h=o.getX(),s=o.getY(),c=o.getRight(),d=o.getX(),T=o.getBottom(),g=o.getRight(),y=o.getWidthHalf(),A=o.getHeightHalf(),I=i.getX(),k=i.getY(),S=i.getRight(),U=i.getX(),Y=i.getBottom(),$=i.getRight(),O=i.getWidthHalf(),rt=i.getHeightHalf(),r=!1,E=!1;if(a===f){if(n>t)return e[0]=a,e[1]=s,e[2]=f,e[3]=Y,!1;if(n<t)return e[0]=a,e[1]=T,e[2]=f,e[3]=k,!1}else if(n===t){if(a>f)return e[0]=h,e[1]=n,e[2]=S,e[3]=t,!1;if(a<f)return e[0]=c,e[1]=n,e[2]=I,e[3]=t,!1}else{var v=o.height/o.width,p=i.height/i.width,m=(t-n)/(f-a),M=void 0,w=void 0,x=void 0,F=void 0,X=void 0,z=void 0;if(-v===m?a>f?(e[0]=d,e[1]=T,r=!0):(e[0]=c,e[1]=s,r=!0):v===m&&(a>f?(e[0]=h,e[1]=s,r=!0):(e[0]=g,e[1]=T,r=!0)),-p===m?f>a?(e[2]=U,e[3]=Y,E=!0):(e[2]=S,e[3]=k,E=!0):p===m&&(f>a?(e[2]=I,e[3]=k,E=!0):(e[2]=$,e[3]=Y,E=!0)),r&&E)return!1;if(a>f?n>t?(M=this.getCardinalDirection(v,m,4),w=this.getCardinalDirection(p,m,2)):(M=this.getCardinalDirection(-v,m,3),w=this.getCardinalDirection(-p,m,1)):n>t?(M=this.getCardinalDirection(-v,m,1),w=this.getCardinalDirection(-p,m,3)):(M=this.getCardinalDirection(v,m,2),w=this.getCardinalDirection(p,m,4)),!r)switch(M){case 1:F=s,x=a+-A/m,e[0]=x,e[1]=F;break;case 2:x=g,F=n+y*m,e[0]=x,e[1]=F;break;case 3:F=T,x=a+A/m,e[0]=x,e[1]=F;break;case 4:x=d,F=n+-y*m,e[0]=x,e[1]=F;break}if(!E)switch(w){case 1:z=k,X=f+-rt/m,e[2]=X,e[3]=z;break;case 2:X=$,z=t+O*m,e[2]=X,e[3]=z;break;case 3:z=Y,X=f+rt/m,e[2]=X,e[3]=z;break;case 4:X=U,z=t+-O*m,e[2]=X,e[3]=z;break}}return!1},l.getCardinalDirection=function(o,i,e){return o>i?e:1+e%4},l.getIntersection=function(o,i,e,a){if(a==null)return this.getIntersection2(o,i,e);var n=o.x,f=o.y,t=i.x,h=i.y,s=e.x,c=e.y,d=a.x,T=a.y,g=void 0,y=void 0,A=void 0,I=void 0,k=void 0,S=void 0,U=void 0,Y=void 0,$=void 0;return A=h-f,k=n-t,U=t*f-n*h,I=T-c,S=s-d,Y=d*c-s*T,$=A*S-I*k,$===0?null:(g=(k*Y-S*U)/$,y=(I*U-A*Y)/$,new u(g,y))},l.angleOfVector=function(o,i,e,a){var n=void 0;return o!==e?(n=Math.atan((a-i)/(e-o)),e<o?n+=Math.PI:a<i&&(n+=this.TWO_PI)):a<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},l.doIntersect=function(o,i,e,a){var n=o.x,f=o.y,t=i.x,h=i.y,s=e.x,c=e.y,d=a.x,T=a.y,g=(t-n)*(T-c)-(d-s)*(h-f);if(g===0)return!1;var y=((T-c)*(d-n)+(s-d)*(T-f))/g,A=((f-h)*(d-n)+(t-n)*(T-f))/g;return 0<y&&y<1&&0<A&&A<1},l.findCircleLineIntersections=function(o,i,e,a,n,f,t){var h=(e-o)*(e-o)+(a-i)*(a-i),s=2*((o-n)*(e-o)+(i-f)*(a-i)),c=(o-n)*(o-n)+(i-f)*(i-f)-t*t,d=s*s-4*h*c;if(d>=0){var T=(-s+Math.sqrt(s*s-4*h*c))/(2*h),g=(-s-Math.sqrt(s*s-4*h*c))/(2*h),y=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:y}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,L.exports=l},function(L,P,N){function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},L.exports=u},function(L,P,N){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,L.exports=u},function(L,P,N){var u=function(){function n(f,t){for(var h=0;h<t.length;h++){var s=t[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(f,s.key,s)}}return function(f,t,h){return t&&n(f.prototype,t),h&&n(f,h),f}}();function l(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var o=function(n){return{value:n,next:null,prev:null}},i=function(n,f,t,h){return n!==null?n.next=f:h.head=f,t!==null?t.prev=f:h.tail=f,f.prev=n,f.next=t,h.length++,f},e=function(n,f){var t=n.prev,h=n.next;return t!==null?t.next=h:f.head=h,h!==null?h.prev=t:f.tail=t,n.prev=n.next=null,f.length--,n},a=function(){function n(f){var t=this;l(this,n),this.length=0,this.head=null,this.tail=null,f!=null&&f.forEach(function(h){return t.push(h)})}return u(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(f,t){return i(t.prev,o(f),t,this)}},{key:"insertAfter",value:function(f,t){return i(t,o(f),t.next,this)}},{key:"insertNodeBefore",value:function(f,t){return i(t.prev,f,t,this)}},{key:"insertNodeAfter",value:function(f,t){return i(t,f,t.next,this)}},{key:"push",value:function(f){return i(this.tail,o(f),null,this)}},{key:"unshift",value:function(f){return i(null,o(f),this.head,this)}},{key:"remove",value:function(f){return e(f,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(f){if(f<=this.length()){for(var t=1,h=this.head;t<f;)h=h.next,t++;return h.value}}},{key:"set_object_at",value:function(f,t){if(f<=this.length()){for(var h=1,s=this.head;h<f;)s=s.next,h++;s.value=t}}}]),n}();L.exports=a},function(L,P,N){function u(l,o,i){this.x=null,this.y=null,l==null&&o==null&&i==null?(this.x=0,this.y=0):typeof l=="number"&&typeof o=="number"&&i==null?(this.x=l,this.y=o):l.constructor.name=="Point"&&o==null&&i==null&&(i=l,this.x=i.x,this.y=i.y)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.getLocation=function(){return new u(this.x,this.y)},u.prototype.setLocation=function(l,o,i){l.constructor.name=="Point"&&o==null&&i==null?(i=l,this.setLocation(i.x,i.y)):typeof l=="number"&&typeof o=="number"&&i==null&&(parseInt(l)==l&&parseInt(o)==o?this.move(l,o):(this.x=Math.floor(l+.5),this.y=Math.floor(o+.5)))},u.prototype.move=function(l,o){this.x=l,this.y=o},u.prototype.translate=function(l,o){this.x+=l,this.y+=o},u.prototype.equals=function(l){if(l.constructor.name=="Point"){var o=l;return this.x==o.x&&this.y==o.y}return this==l},u.prototype.toString=function(){return new u().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=u},function(L,P,N){function u(l,o,i,e){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&o!=null&&i!=null&&e!=null&&(this.x=l,this.y=o,this.width=i,this.height=e)}u.prototype.getX=function(){return this.x},u.prototype.setX=function(l){this.x=l},u.prototype.getY=function(){return this.y},u.prototype.setY=function(l){this.y=l},u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(l){this.width=l},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(l){this.height=l},u.prototype.getRight=function(){return this.x+this.width},u.prototype.getBottom=function(){return this.y+this.height},u.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},u.prototype.getCenterX=function(){return this.x+this.width/2},u.prototype.getMinX=function(){return this.getX()},u.prototype.getMaxX=function(){return this.getX()+this.width},u.prototype.getCenterY=function(){return this.y+this.height/2},u.prototype.getMinY=function(){return this.getY()},u.prototype.getMaxY=function(){return this.getY()+this.height},u.prototype.getWidthHalf=function(){return this.width/2},u.prototype.getHeightHalf=function(){return this.height/2},L.exports=u},function(L,P,N){var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function l(){}l.lastID=0,l.createID=function(o){return l.isPrimitive(o)?o:(o.uniqueID!=null||(o.uniqueID=l.getString(),l.lastID++),o.uniqueID)},l.getString=function(o){return o==null&&(o=l.lastID),"Object#"+o},l.isPrimitive=function(o){var i=typeof o>"u"?"undefined":u(o);return o==null||i!="object"&&i!="function"},L.exports=l},function(L,P,N){function u(s){if(Array.isArray(s)){for(var c=0,d=Array(s.length);c<s.length;c++)d[c]=s[c];return d}else return Array.from(s)}var l=N(0),o=N(7),i=N(3),e=N(1),a=N(6),n=N(5),f=N(17),t=N(29);function h(s){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 o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,s!=null&&(this.isRemoteUse=s)}h.RANDOM_SEED=1,h.prototype=Object.create(t.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var s=new o(this);return this.graphManager=s,s},h.prototype.newGraph=function(s){return new a(null,this.graphManager,s)},h.prototype.newNode=function(s){return new i(this.graphManager,s)},h.prototype.newEdge=function(s){return new e(null,null,s)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var s;return this.checkLayoutSuccess()?s=!1:s=this.layout(),l.ANIMATE==="during"?!1:(s&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,s)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var s=this.graphManager.getAllEdges(),c=0;c<s.length;c++)s[c];for(var d=this.graphManager.getRoot().getNodes(),c=0;c<d.length;c++)d[c];this.update(this.graphManager.getRoot())}},h.prototype.update=function(s){if(s==null)this.update2();else if(s instanceof i){var c=s;if(c.getChild()!=null)for(var d=c.getChild().getNodes(),T=0;T<d.length;T++)update(d[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(s instanceof e){var y=s;if(y.vGraphObject!=null){var A=y.vGraphObject;A.update(y)}}else if(s instanceof a){var I=s;if(I.vGraphObject!=null){var k=I.vGraphObject;k.update(I)}}},h.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)},h.prototype.transform=function(s){if(s==null)this.transform(new n(0,0));else{var c=new f,d=this.graphManager.getRoot().updateLeftTop();if(d!=null){c.setWorldOrgX(s.x),c.setWorldOrgY(s.y),c.setDeviceOrgX(d.x),c.setDeviceOrgY(d.y);for(var T=this.getAllNodes(),g,y=0;y<T.length;y++)g=T[y],g.transform(c)}}},h.prototype.positionNodesRandomly=function(s){if(s==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,d,T=s.getNodes(),g=0;g<T.length;g++)c=T[g],d=c.getChild(),d==null||d.getNodes().length==0?c.scatter():(this.positionNodesRandomly(d),c.updateBounds())},h.prototype.getFlatForest=function(){for(var s=[],c=!0,d=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<d.length;g++)d[g].getChild()!=null&&(T=!1);if(!T)return s;var y=new Set,A=[],I=new Map,k=[];for(k=k.concat(d);k.length>0&&c;){for(A.push(k[0]);A.length>0&&c;){var S=A[0];A.splice(0,1),y.add(S);for(var U=S.getEdges(),g=0;g<U.length;g++){var Y=U[g].getOtherEnd(S);if(I.get(S)!=Y)if(!y.has(Y))A.push(Y),I.set(Y,S);else{c=!1;break}}}if(!c)s=[];else{var $=[].concat(u(y));s.push($);for(var g=0;g<$.length;g++){var O=$[g],rt=k.indexOf(O);rt>-1&&k.splice(rt,1)}y=new Set,I=new Map}}return s},h.prototype.createDummyNodesForBendpoints=function(s){for(var c=[],d=s.source,T=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g<s.bendpoints.length;g++){var y=this.newNode(null);y.setRect(new Point(0,0),new Dimension(1,1)),T.add(y);var A=this.newEdge(null);this.graphManager.add(A,d,y),c.add(y),d=y}var A=this.newEdge(null);return this.graphManager.add(A,d,s.target),this.edgeToDummyNodes.set(s,c),s.isInterGraph()?this.graphManager.remove(s):T.remove(s),c},h.prototype.createBendpointsFromDummyNodes=function(){var s=[];s=s.concat(this.graphManager.getAllEdges()),s=[].concat(u(this.edgeToDummyNodes.keys())).concat(s);for(var c=0;c<s.length;c++){var d=s[c];if(d.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(d),g=0;g<T.length;g++){var y=T[g],A=new n(y.getCenterX(),y.getCenterY()),I=d.bendpoints.get(g);I.x=A.x,I.y=A.y,y.getOwner().remove(y)}this.graphManager.add(d,d.source,d.target)}}},h.transform=function(s,c,d,T){if(d!=null&&T!=null){var g=c;if(s<=50){var y=c/d;g-=(c-y)/50*(50-s)}else{var A=c*T;g+=(A-c)/50*(s-50)}return g}else{var I,k;return s<=50?(I=9*c/500,k=c/10):(I=9*c/50,k=-8*c),I*s+k}},h.findCenterOfTree=function(s){var c=[];c=c.concat(s);var d=[],T=new Map,g=!1,y=null;(c.length==1||c.length==2)&&(g=!0,y=c[0]);for(var A=0;A<c.length;A++){var I=c[A],k=I.getNeighborsList().size;T.set(I,I.getNeighborsList().size),k==1&&d.push(I)}var S=[];for(S=S.concat(d);!g;){var U=[];U=U.concat(S),S=[];for(var A=0;A<c.length;A++){var I=c[A],Y=c.indexOf(I);Y>=0&&c.splice(Y,1);var $=I.getNeighborsList();$.forEach(function(r){if(d.indexOf(r)<0){var E=T.get(r),v=E-1;v==1&&S.push(r),T.set(r,v)}})}d=d.concat(S),(c.length==1||c.length==2)&&(g=!0,y=c[0])}return y},h.prototype.setGraphManager=function(s){this.graphManager=s},L.exports=h},function(L,P,N){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},L.exports=u},function(L,P,N){var u=N(5);function l(o,i){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(o){this.lworldOrgX=o},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(o){this.lworldExtX=o},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(o){this.lworldExtY=o},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},l.prototype.transformX=function(o){var i=0,e=this.lworldExtX;return e!=0&&(i=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/e),i},l.prototype.transformY=function(o){var i=0,e=this.lworldExtY;return e!=0&&(i=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/e),i},l.prototype.inverseTransformX=function(o){var i=0,e=this.ldeviceExtX;return e!=0&&(i=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/e),i},l.prototype.inverseTransformY=function(o){var i=0,e=this.ldeviceExtY;return e!=0&&(i=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/e),i},l.prototype.inverseTransformPoint=function(o){var i=new u(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return i},L.exports=l},function(L,P,N){function u(t){if(Array.isArray(t)){for(var h=0,s=Array(t.length);h<t.length;h++)s[h]=t[h];return s}else return Array.from(t)}var l=N(15),o=N(4),i=N(0),e=N(8),a=N(9);function n(){l.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}n.prototype=Object.create(l.prototype);for(var f in l)n[f]=l[f];n.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var t,h,s,c,d,T,g,y=this.getGraphManager().getAllEdges(),A=0;A<y.length;A++)t=y[A],h=t.idealLength,t.isInterGraph&&(c=t.getSource(),d=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*i.SIMPLE_NODE_SIZE),s=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*s))},n.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,s=0;s<t.length;s++)h=t[s],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,c,d,T,g=this.getAllNodes(),y;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),y=new Set,s=0;s<g.length;s++)d=g[s],this.calculateRepulsionForceOfANode(d,y,t,h),y.add(d);else for(s=0;s<g.length;s++)for(d=g[s],c=s+1;c<g.length;c++)T=g[c],d.getOwner()==T.getOwner()&&this.calcRepulsionForce(d,T)},n.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),s=0;s<h.length;s++)t=h[s],this.calcGravitationalForce(t)},n.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h,s=0;s<t.length;s++)h=t[s],h.move()},n.prototype.calcSpringForce=function(t,h){var s=t.getSource(),c=t.getTarget(),d,T,g,y;if(this.uniformLeafNodeSizes&&s.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;d=t.getLength(),d!=0&&(T=t.edgeElasticity*(d-h),g=T*(t.lengthX/d),y=T*(t.lengthY/d),s.springForceX+=g,s.springForceY+=y,c.springForceX-=g,c.springForceY-=y)},n.prototype.calcRepulsionForce=function(t,h){var s=t.getRect(),c=h.getRect(),d=new Array(2),T=new Array(4),g,y,A,I,k,S,U;if(s.intersects(c)){e.calcSeparationAmount(s,c,d,o.DEFAULT_EDGE_LENGTH/2),S=2*d[0],U=2*d[1];var Y=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=Y*S,t.repulsionForceY-=Y*U,h.repulsionForceX+=Y*S,h.repulsionForceY+=Y*U}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(g=c.getCenterX()-s.getCenterX(),y=c.getCenterY()-s.getCenterY()):(e.getIntersection(s,c,T),g=T[2]-T[0],y=T[3]-T[1]),Math.abs(g)<o.MIN_REPULSION_DIST&&(g=a.sign(g)*o.MIN_REPULSION_DIST),Math.abs(y)<o.MIN_REPULSION_DIST&&(y=a.sign(y)*o.MIN_REPULSION_DIST),A=g*g+y*y,I=Math.sqrt(A),k=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/A,S=k*g/I,U=k*y/I,t.repulsionForceX-=S,t.repulsionForceY-=U,h.repulsionForceX+=S,h.repulsionForceY+=U},n.prototype.calcGravitationalForce=function(t){var h,s,c,d,T,g,y,A;h=t.getOwner(),s=(h.getRight()+h.getLeft())/2,c=(h.getTop()+h.getBottom())/2,d=t.getCenterX()-s,T=t.getCenterY()-c,g=Math.abs(d)+t.getWidth()/2,y=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(A=h.getEstimatedSize()*this.gravityRangeFactor,(g>A||y>A)&&(t.gravitationForceX=-this.gravityConstant*d,t.gravitationForceY=-this.gravityConstant*T)):(A=h.getEstimatedSize()*this.compoundGravityRangeFactor,(g>A||y>A)&&(t.gravitationForceX=-this.gravityConstant*d*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},n.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,h=this.graphManager.getAllNodes(),s=0;s<h.length;s++)t=h[s],t.noOfChildren=t.getNoOfChildren()},n.prototype.calcGrid=function(t){var h=0,s=0;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(h),d=0;d<h;d++)c[d]=new Array(s);for(var d=0;d<h;d++)for(var T=0;T<s;T++)c[d][T]=new Array;return c},n.prototype.addNodeToGrid=function(t,h,s){var c=0,d=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),d=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-s)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-s)/this.repulsionRange));for(var y=c;y<=d;y++)for(var A=T;A<=g;A++)this.grid[y][A].push(t),t.setGridCoordinates(c,d,T,g)},n.prototype.updateGrid=function(){var t,h,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<s.length;t++)h=s[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(t,h,s,c){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&s||c){var d=new Set;t.surrounding=new Array;for(var T,g=this.grid,y=t.startX-1;y<t.finishX+2;y++)for(var A=t.startY-1;A<t.finishY+2;A++)if(!(y<0||A<0||y>=g.length||A>=g[0].length)){for(var I=0;I<g[y][A].length;I++)if(T=g[y][A][I],!(t.getOwner()!=T.getOwner()||t==T)&&!h.has(T)&&!d.has(T)){var k=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),S=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);k<=this.repulsionRange&&S<=this.repulsionRange&&d.add(T)}}t.surrounding=[].concat(u(d))}for(y=0;y<t.surrounding.length;y++)this.calcRepulsionForce(t,t.surrounding[y])},n.prototype.calcRepulsionRange=function(){return 0},L.exports=n},function(L,P,N){var u=N(1),l=N(4);function o(e,a,n){u.call(this,e,a,n),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(u.prototype);for(var i in u)o[i]=u[i];L.exports=o},function(L,P,N){var u=N(3),l=N(4);function o(e,a,n,f){u.call(this,e,a,n,f),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=[]}o.prototype=Object.create(u.prototype);for(var i in u)o[i]=u[i];o.prototype.setGridCoordinates=function(e,a,n,f){this.startX=e,this.finishX=a,this.startY=n,this.finishY=f},L.exports=o},function(L,P,N){function u(l,o){this.width=0,this.height=0,l!==null&&o!==null&&(this.height=o,this.width=l)}u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(l){this.width=l},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(l){this.height=l},L.exports=u},function(L,P,N){var u=N(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(o,i){var e=u.createID(o);this.contains(e)||(this.map[e]=i,this.keys.push(o))},l.prototype.contains=function(o){return u.createID(o),this.map[o]!=null},l.prototype.get=function(o){var i=u.createID(o);return this.map[i]},l.prototype.keySet=function(){return this.keys},L.exports=l},function(L,P,N){var u=N(14);function l(){this.set={}}l.prototype.add=function(o){var i=u.createID(o);this.contains(i)||(this.set[i]=o)},l.prototype.remove=function(o){delete this.set[u.createID(o)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(o){return this.set[u.createID(o)]==o},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(o){for(var i=Object.keys(this.set),e=i.length,a=0;a<e;a++)o.push(this.set[i[a]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(o){for(var i=o.length,e=0;e<i;e++){var a=o[e];this.add(a)}},L.exports=l},function(L,P,N){function u(){}u.multMat=function(l,o){for(var i=[],e=0;e<l.length;e++){i[e]=[];for(var a=0;a<o[0].length;a++){i[e][a]=0;for(var n=0;n<l[0].length;n++)i[e][a]+=l[e][n]*o[n][a]}}return i},u.transpose=function(l){for(var o=[],i=0;i<l[0].length;i++){o[i]=[];for(var e=0;e<l.length;e++)o[i][e]=l[e][i]}return o},u.multCons=function(l,o){for(var i=[],e=0;e<l.length;e++)i[e]=l[e]*o;return i},u.minusOp=function(l,o){for(var i=[],e=0;e<l.length;e++)i[e]=l[e]-o[e];return i},u.dotProduct=function(l,o){for(var i=0,e=0;e<l.length;e++)i+=l[e]*o[e];return i},u.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},u.normalize=function(l){for(var o=[],i=this.mag(l),e=0;e<l.length;e++)o[e]=l[e]/i;return o},u.multGamma=function(l){for(var o=[],i=0,e=0;e<l.length;e++)i+=l[e];i*=-1/l.length;for(var a=0;a<l.length;a++)o[a]=i+l[a];return o},u.multL=function(l,o,i){for(var e=[],a=[],n=[],f=0;f<o[0].length;f++){for(var t=0,h=0;h<o.length;h++)t+=-.5*o[h][f]*l[h];a[f]=t}for(var s=0;s<i.length;s++){for(var c=0,d=0;d<i.length;d++)c+=i[s][d]*a[d];n[s]=c}for(var T=0;T<o.length;T++){for(var g=0,y=0;y<o[0].length;y++)g+=o[T][y]*n[y];e[T]=g}return e},L.exports=u},function(L,P,N){var u=function(){function e(a,n){for(var f=0;f<n.length;f++){var t=n[f];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(a,t.key,t)}}return function(a,n,f){return n&&e(a.prototype,n),f&&e(a,f),a}}();function l(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}var o=N(11),i=function(){function e(a,n){l(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;a instanceof o?f=a.size():f=a.length,this._quicksort(a,0,f-1)}return u(e,[{key:"_quicksort",value:function(a,n,f){if(n<f){var t=this._partition(a,n,f);this._quicksort(a,n,t),this._quicksort(a,t+1,f)}}},{key:"_partition",value:function(a,n,f){for(var t=this._get(a,n),h=n,s=f;;){for(;this.compareFunction(t,this._get(a,s));)s--;for(;this.compareFunction(this._get(a,h),t);)h++;if(h<s)this._swap(a,h,s),h++,s--;else return s}}},{key:"_get",value:function(a,n){return a instanceof o?a.get_object_at(n):a[n]}},{key:"_set",value:function(a,n,f){a instanceof o?a.set_object_at(n,f):a[n]=f}},{key:"_swap",value:function(a,n,f){var t=this._get(a,n);this._set(a,n,this._get(a,f)),this._set(a,f,t)}},{key:"_defaultCompareFunction",value:function(a,n){return n>a}}]),e}();L.exports=i},function(L,P,N){function u(){}u.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 o=Math.min(this.m,this.n);this.s=function(It){for(var Tt=[];It-- >0;)Tt.push(0);return Tt}(Math.min(this.m+1,this.n)),this.U=function(It){var Tt=function Ut(kt){if(kt.length==0)return 0;for(var Dt=[],Ft=0;Ft<kt[0];Ft++)Dt.push(Ut(kt.slice(1)));return Dt};return Tt(It)}([this.m,o]),this.V=function(It){var Tt=function Ut(kt){if(kt.length==0)return 0;for(var Dt=[],Ft=0;Ft<kt[0];Ft++)Dt.push(Ut(kt.slice(1)));return Dt};return Tt(It)}([this.n,this.n]);for(var i=function(It){for(var Tt=[];It-- >0;)Tt.push(0);return Tt}(this.n),e=function(It){for(var Tt=[];It-- >0;)Tt.push(0);return Tt}(this.m),a=!0,n=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(n,f);t++){if(t<n){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=u.hypot(this.s[t],l[h][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var s=t;s<this.m;s++)l[s][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(It,Tt){return It&&Tt}(t<n,this.s[t]!==0)){for(var d=0,T=t;T<this.m;T++)d+=l[T][t]*l[T][c];d=-d/l[t][t];for(var g=t;g<this.m;g++)l[g][c]+=d*l[g][t]}i[c]=l[t][c]}if(function(It,Tt){return Tt}(a,t<n))for(var y=t;y<this.m;y++)this.U[y][t]=l[y][t];if(t<f){i[t]=0;for(var A=t+1;A<this.n;A++)i[t]=u.hypot(i[t],i[A]);if(i[t]!==0){i[t+1]<0&&(i[t]=-i[t]);for(var I=t+1;I<this.n;I++)i[I]/=i[t];i[t+1]+=1}if(i[t]=-i[t],function(It,Tt){return It&&Tt}(t+1<this.m,i[t]!==0)){for(var k=t+1;k<this.m;k++)e[k]=0;for(var S=t+1;S<this.n;S++)for(var U=t+1;U<this.m;U++)e[U]+=i[S]*l[U][S];for(var Y=t+1;Y<this.n;Y++)for(var $=-i[Y]/i[t+1],O=t+1;O<this.m;O++)l[O][Y]+=$*e[O]}for(var rt=t+1;rt<this.n;rt++)this.V[rt][t]=i[rt]}}var r=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=l[n][n]),this.m<r&&(this.s[r-1]=0),f+1<r&&(i[f]=l[f][r-1]),i[r-1]=0;{for(var E=n;E<o;E++){for(var v=0;v<this.m;v++)this.U[v][E]=0;this.U[E][E]=1}for(var p=n-1;p>=0;p--)if(this.s[p]!==0){for(var m=p+1;m<o;m++){for(var M=0,w=p;w<this.m;w++)M+=this.U[w][p]*this.U[w][m];M=-M/this.U[p][p];for(var x=p;x<this.m;x++)this.U[x][m]+=M*this.U[x][p]}for(var F=p;F<this.m;F++)this.U[F][p]=-this.U[F][p];this.U[p][p]=1+this.U[p][p];for(var X=0;X<p-1;X++)this.U[X][p]=0}else{for(var z=0;z<this.m;z++)this.U[z][p]=0;this.U[p][p]=1}}for(var W=this.n-1;W>=0;W--){if(function(It,Tt){return It&&Tt}(W<f,i[W]!==0))for(var B=W+1;B<o;B++){for(var Q=0,G=W+1;G<this.n;G++)Q+=this.V[G][W]*this.V[G][B];Q=-Q/this.V[W+1][W];for(var D=W+1;D<this.n;D++)this.V[D][B]+=Q*this.V[D][W]}for(var b=0;b<this.n;b++)this.V[b][W]=0;this.V[W][W]=1}for(var q=r-1,et=Math.pow(2,-52),vt=Math.pow(2,-966);r>0;){var j=void 0,xt=void 0;for(j=r-2;j>=-1&&j!==-1;j--)if(Math.abs(i[j])<=vt+et*(Math.abs(this.s[j])+Math.abs(this.s[j+1]))){i[j]=0;break}if(j===r-2)xt=4;else{var J=void 0;for(J=r-1;J>=j&&J!==j;J--){var nt=(J!==r?Math.abs(i[J]):0)+(J!==j+1?Math.abs(i[J-1]):0);if(Math.abs(this.s[J])<=vt+et*nt){this.s[J]=0;break}}J===j?xt=3:J===r-1?xt=1:(xt=2,j=J)}switch(j++,xt){case 1:{var mt=i[r-2];i[r-2]=0;for(var st=r-2;st>=j;st--){var Lt=u.hypot(this.s[st],mt),_t=this.s[st]/Lt,Nt=mt/Lt;this.s[st]=Lt,st!==j&&(mt=-Nt*i[st-1],i[st-1]=_t*i[st-1]);for(var At=0;At<this.n;At++)Lt=_t*this.V[At][st]+Nt*this.V[At][r-1],this.V[At][r-1]=-Nt*this.V[At][st]+_t*this.V[At][r-1],this.V[At][st]=Lt}}break;case 2:{var Ht=i[j-1];i[j-1]=0;for(var Rt=j;Rt<r;Rt++){var bt=u.hypot(this.s[Rt],Ht),Gt=this.s[Rt]/bt,Bt=Ht/bt;this.s[Rt]=bt,Ht=-Bt*i[Rt],i[Rt]=Gt*i[Rt];for(var Pt=0;Pt<this.m;Pt++)bt=Gt*this.U[Pt][Rt]+Bt*this.U[Pt][j-1],this.U[Pt][j-1]=-Bt*this.U[Pt][Rt]+Gt*this.U[Pt][j-1],this.U[Pt][Rt]=bt}}break;case 3:{var zt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[r-1]),Math.abs(this.s[r-2])),Math.abs(i[r-2])),Math.abs(this.s[j])),Math.abs(i[j])),dt=this.s[r-1]/zt,_=this.s[r-2]/zt,R=i[r-2]/zt,V=this.s[j]/zt,Z=i[j]/zt,K=((_+dt)*(_-dt)+R*R)/2,ft=dt*R*(dt*R),ht=0;(function(It,Tt){return It||Tt})(K!==0,ft!==0)&&(ht=Math.sqrt(K*K+ft),K<0&&(ht=-ht),ht=ft/(K+ht));for(var tt=(V+dt)*(V-dt)+ht,ct=V*Z,it=j;it<r-1;it++){var Et=u.hypot(tt,ct),yt=tt/Et,Ot=ct/Et;it!==j&&(i[it-1]=Et),tt=yt*this.s[it]+Ot*i[it],i[it]=yt*i[it]-Ot*this.s[it],ct=Ot*this.s[it+1],this.s[it+1]=yt*this.s[it+1];for(var lt=0;lt<this.n;lt++)Et=yt*this.V[lt][it]+Ot*this.V[lt][it+1],this.V[lt][it+1]=-Ot*this.V[lt][it]+yt*this.V[lt][it+1],this.V[lt][it]=Et;if(Et=u.hypot(tt,ct),yt=tt/Et,Ot=ct/Et,this.s[it]=Et,tt=yt*i[it]+Ot*this.s[it+1],this.s[it+1]=-Ot*i[it]+yt*this.s[it+1],ct=Ot*i[it+1],i[it+1]=yt*i[it+1],it<this.m-1)for(var ot=0;ot<this.m;ot++)Et=yt*this.U[ot][it]+Ot*this.U[ot][it+1],this.U[ot][it+1]=-Ot*this.U[ot][it]+yt*this.U[ot][it+1],this.U[ot][it]=Et}i[r-2]=tt}break;case 4:{if(this.s[j]<=0){this.s[j]=this.s[j]<0?-this.s[j]:0;for(var at=0;at<=q;at++)this.V[at][j]=-this.V[at][j]}for(;j<q&&!(this.s[j]>=this.s[j+1]);){var Ct=this.s[j];if(this.s[j]=this.s[j+1],this.s[j+1]=Ct,j<this.n-1)for(var gt=0;gt<this.n;gt++)Ct=this.V[gt][j+1],this.V[gt][j+1]=this.V[gt][j],this.V[gt][j]=Ct;if(j<this.m-1)for(var Mt=0;Mt<this.m;Mt++)Ct=this.U[Mt][j+1],this.U[Mt][j+1]=this.U[Mt][j],this.U[Mt][j]=Ct;j++}r--}break}}var St={U:this.U,V:this.V,S:this.s};return St},u.hypot=function(l,o){var i=void 0;return Math.abs(l)>Math.abs(o)?(i=o/l,i=Math.abs(l)*Math.sqrt(1+i*i)):o!=0?(i=l/o,i=Math.abs(o)*Math.sqrt(1+i*i)):i=0,i},L.exports=u},function(L,P,N){var u=function(){function i(e,a){for(var n=0;n<a.length;n++){var f=a[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}return function(e,a,n){return a&&i(e.prototype,a),n&&i(e,n),e}}();function l(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function i(e,a){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,i),this.sequence1=e,this.sequence2=a,this.match_score=n,this.mismatch_penalty=f,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=a.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[h][s]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[c][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return u(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var a=1;a<this.iMax;a++)this.grid[a][0]=this.grid[a-1][0]+this.gap_penalty,this.tracebackGrid[a][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var f=1;f<this.jMax;f++){var t=void 0;this.sequence1[n-1]===this.sequence2[f-1]?t=this.grid[n-1][f-1]+this.match_score:t=this.grid[n-1][f-1]+this.mismatch_penalty;var h=this.grid[n-1][f]+this.gap_penalty,s=this.grid[n][f-1]+this.gap_penalty,c=[t,h,s],d=this.arrayAllMaxIndexes(c);this.grid[n][f]=c[d[0]],this.tracebackGrid[n][f]=[d.includes(0),d.includes(1),d.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var a=e[0],n=this.tracebackGrid[a.pos[0]][a.pos[1]];n[0]&&e.push({pos:[a.pos[0]-1,a.pos[1]-1],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),n[1]&&e.push({pos:[a.pos[0]-1,a.pos[1]],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:"-"+a.seq2}),n[2]&&e.push({pos:[a.pos[0],a.pos[1]-1],seq1:"-"+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),a.pos[0]===0&&a.pos[1]===0&&this.alignments.push({sequence1:a.seq1,sequence2:a.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,a){for(var n=[],f=-1;(f=e.indexOf(a,f+1))!==-1;)n.push(f);return n}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),i}();L.exports=o},function(L,P,N){var u=function(){};u.FDLayout=N(18),u.FDLayoutConstants=N(4),u.FDLayoutEdge=N(19),u.FDLayoutNode=N(20),u.DimensionD=N(21),u.HashMap=N(22),u.HashSet=N(23),u.IGeometry=N(8),u.IMath=N(9),u.Integer=N(10),u.Point=N(12),u.PointD=N(5),u.RandomSeed=N(16),u.RectangleD=N(13),u.Transform=N(17),u.UniqueIDGeneretor=N(14),u.Quicksort=N(25),u.LinkedList=N(11),u.LGraphObject=N(2),u.LGraph=N(6),u.LEdge=N(1),u.LGraphManager=N(7),u.LNode=N(3),u.Layout=N(15),u.LayoutConstants=N(0),u.NeedlemanWunsch=N(27),u.Matrix=N(24),u.SVD=N(26),L.exports=u},function(L,P,N){function u(){this.listeners=[]}var l=u.prototype;l.addListener=function(o,i){this.listeners.push({event:o,callback:i})},l.removeListener=function(o,i){for(var e=this.listeners.length;e>=0;e--){var a=this.listeners[e];a.event===o&&a.callback===i&&this.listeners.splice(e,1)}},l.emit=function(o,i){for(var e=0;e<this.listeners.length;e++){var a=this.listeners[e];o===a.event&&a.callback(i)}},L.exports=u}])})}(fe)),fe.exports}var ui=ue.exports,_e;function fi(){return _e||(_e=1,function(C,H){(function(L,P){C.exports=P(gi())})(ui,function(L){return(()=>{var P={45:(o,i,e)=>{var a={};a.layoutBase=e(551),a.CoSEConstants=e(806),a.CoSEEdge=e(767),a.CoSEGraph=e(880),a.CoSEGraphManager=e(578),a.CoSELayout=e(765),a.CoSENode=e(991),a.ConstraintHandler=e(902),o.exports=a},806:(o,i,e)=>{var a=e(551).FDLayoutConstants;function n(){}for(var f in a)n[f]=a[f];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=a.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,o.exports=n},767:(o,i,e)=>{var a=e(551).FDLayoutEdge;function n(t,h,s){a.call(this,t,h,s)}n.prototype=Object.create(a.prototype);for(var f in a)n[f]=a[f];o.exports=n},880:(o,i,e)=>{var a=e(551).LGraph;function n(t,h,s){a.call(this,t,h,s)}n.prototype=Object.create(a.prototype);for(var f in a)n[f]=a[f];o.exports=n},578:(o,i,e)=>{var a=e(551).LGraphManager;function n(t){a.call(this,t)}n.prototype=Object.create(a.prototype);for(var f in a)n[f]=a[f];o.exports=n},765:(o,i,e)=>{var a=e(551).FDLayout,n=e(578),f=e(880),t=e(991),h=e(767),s=e(806),c=e(902),d=e(551).FDLayoutConstants,T=e(551).LayoutConstants,g=e(551).Point,y=e(551).PointD,A=e(551).DimensionD,I=e(551).Layout,k=e(551).Integer,S=e(551).IGeometry,U=e(551).LGraph,Y=e(551).Transform,$=e(551).LinkedList;function O(){a.call(this),this.toBeTiled={},this.constraints={}}O.prototype=Object.create(a.prototype);for(var rt in a)O[rt]=a[rt];O.prototype.newGraphManager=function(){var r=new n(this);return this.graphManager=r,r},O.prototype.newGraph=function(r){return new f(null,this.graphManager,r)},O.prototype.newNode=function(r){return new t(this.graphManager,r)},O.prototype.newEdge=function(r){return new h(null,null,r)},O.prototype.initParameters=function(){a.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},O.prototype.initSpringEmbedder=function(){a.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},O.prototype.layout=function(){var r=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return r&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},O.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(s.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var r=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(p){return r.has(p)});this.graphManager.setAllNodesToApplyGravitation(E)}}else{var v=this.getFlatForest();if(v.length>0)this.positionNodesRadially(v);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var r=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(M){return r.has(M)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},O.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%d.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 r=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(m){return r.has(m)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.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()),s.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var v=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(v,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},O.prototype.getPositionsData=function(){for(var r=this.graphManager.getAllNodes(),E={},v=0;v<r.length;v++){var p=r[v].rect,m=r[v].id;E[m]={id:m,x:p.getCenterX(),y:p.getCenterY(),w:p.width,h:p.height}}return E},O.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var r=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!r;)r=this.tick();this.graphManager.updateBounds()}},O.prototype.moveNodes=function(){for(var r=this.getAllNodes(),E,v=0;v<r.length;v++)E=r[v],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var v=0;v<r.length;v++)E=r[v],E.move()},O.prototype.initConstraintVariables=function(){var r=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),v=0;v<E.length;v++){var p=E[v];this.idToNodeMap.set(p.id,p)}var m=function D(b){for(var q=b.getChild().getNodes(),et,vt=0,j=0;j<q.length;j++)et=q[j],et.getChild()==null?r.fixedNodeSet.has(et.id)&&(vt+=100):vt+=D(et);return vt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(D){r.fixedNodeSet.add(D.nodeId)});for(var E=this.graphManager.getAllNodes(),p,v=0;v<E.length;v++)if(p=E[v],p.getChild()!=null){var M=m(p);M>0&&(p.fixedNodeWeight=M)}}if(this.constraints.relativePlacementConstraint){var w=new Map,x=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){r.fixedNodesOnHorizontal.add(D),r.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var F=this.constraints.alignmentConstraint.vertical,v=0;v<F.length;v++)this.dummyToNodeForVerticalAlignment.set("dummy"+v,[]),F[v].forEach(function(b){w.set(b,"dummy"+v),r.dummyToNodeForVerticalAlignment.get("dummy"+v).push(b),r.fixedNodeSet.has(b)&&r.fixedNodesOnHorizontal.add("dummy"+v)});if(this.constraints.alignmentConstraint.horizontal)for(var X=this.constraints.alignmentConstraint.horizontal,v=0;v<X.length;v++)this.dummyToNodeForHorizontalAlignment.set("dummy"+v,[]),X[v].forEach(function(b){x.set(b,"dummy"+v),r.dummyToNodeForHorizontalAlignment.get("dummy"+v).push(b),r.fixedNodeSet.has(b)&&r.fixedNodesOnVertical.add("dummy"+v)})}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var b,q,et;for(et=D.length-1;et>=2*D.length/3;et--)b=Math.floor(Math.random()*(et+1)),q=D[et],D[et]=D[b],D[b]=q;return D},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(D){if(D.left){var b=w.has(D.left)?w.get(D.left):D.left,q=w.has(D.right)?w.get(D.right):D.right;r.nodesInRelativeHorizontal.includes(b)||(r.nodesInRelativeHorizontal.push(b),r.nodeToRelativeConstraintMapHorizontal.set(b,[]),r.dummyToNodeForVerticalAlignment.has(b)?r.nodeToTempPositionMapHorizontal.set(b,r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(b)[0]).getCenterX()):r.nodeToTempPositionMapHorizontal.set(b,r.idToNodeMap.get(b).getCenterX())),r.nodesInRelativeHorizontal.includes(q)||(r.nodesInRelativeHorizontal.push(q),r.nodeToRelativeConstraintMapHorizontal.set(q,[]),r.dummyToNodeForVerticalAlignment.has(q)?r.nodeToTempPositionMapHorizontal.set(q,r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(q)[0]).getCenterX()):r.nodeToTempPositionMapHorizontal.set(q,r.idToNodeMap.get(q).getCenterX())),r.nodeToRelativeConstraintMapHorizontal.get(b).push({right:q,gap:D.gap}),r.nodeToRelativeConstraintMapHorizontal.get(q).push({left:b,gap:D.gap})}else{var et=x.has(D.top)?x.get(D.top):D.top,vt=x.has(D.bottom)?x.get(D.bottom):D.bottom;r.nodesInRelativeVertical.includes(et)||(r.nodesInRelativeVertical.push(et),r.nodeToRelativeConstraintMapVertical.set(et,[]),r.dummyToNodeForHorizontalAlignment.has(et)?r.nodeToTempPositionMapVertical.set(et,r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(et)[0]).getCenterY()):r.nodeToTempPositionMapVertical.set(et,r.idToNodeMap.get(et).getCenterY())),r.nodesInRelativeVertical.includes(vt)||(r.nodesInRelativeVertical.push(vt),r.nodeToRelativeConstraintMapVertical.set(vt,[]),r.dummyToNodeForHorizontalAlignment.has(vt)?r.nodeToTempPositionMapVertical.set(vt,r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(vt)[0]).getCenterY()):r.nodeToTempPositionMapVertical.set(vt,r.idToNodeMap.get(vt).getCenterY())),r.nodeToRelativeConstraintMapVertical.get(et).push({bottom:vt,gap:D.gap}),r.nodeToRelativeConstraintMapVertical.get(vt).push({top:et,gap:D.gap})}});else{var z=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var b=w.has(D.left)?w.get(D.left):D.left,q=w.has(D.right)?w.get(D.right):D.right;z.has(b)?z.get(b).push(q):z.set(b,[q]),z.has(q)?z.get(q).push(b):z.set(q,[b])}else{var et=x.has(D.top)?x.get(D.top):D.top,vt=x.has(D.bottom)?x.get(D.bottom):D.bottom;W.has(et)?W.get(et).push(vt):W.set(et,[vt]),W.has(vt)?W.get(vt).push(et):W.set(vt,[et])}});var B=function(D,b){var q=[],et=[],vt=new $,j=new Set,xt=0;return D.forEach(function(J,nt){if(!j.has(nt)){q[xt]=[],et[xt]=!1;var mt=nt;for(vt.push(mt),j.add(mt),q[xt].push(mt);vt.length!=0;){mt=vt.shift(),b.has(mt)&&(et[xt]=!0);var st=D.get(mt);st.forEach(function(Lt){j.has(Lt)||(vt.push(Lt),j.add(Lt),q[xt].push(Lt))})}xt++}}),{components:q,isFixed:et}},Q=B(z,r.fixedNodesOnHorizontal);this.componentsOnHorizontal=Q.components,this.fixedComponentsOnHorizontal=Q.isFixed;var G=B(W,r.fixedNodesOnVertical);this.componentsOnVertical=G.components,this.fixedComponentsOnVertical=G.isFixed}}},O.prototype.updateDisplacements=function(){var r=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(G){var D=r.idToNodeMap.get(G.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,v=0;v<E.length;v++){for(var p=0,m=0;m<E[v].length;m++){if(this.fixedNodeSet.has(E[v][m])){p=0;break}p+=this.idToNodeMap.get(E[v][m]).displacementX}for(var M=p/E[v].length,m=0;m<E[v].length;m++)this.idToNodeMap.get(E[v][m]).displacementX=M}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,v=0;v<w.length;v++){for(var x=0,m=0;m<w[v].length;m++){if(this.fixedNodeSet.has(w[v][m])){x=0;break}x+=this.idToNodeMap.get(w[v][m]).displacementY}for(var F=x/w[v].length,m=0;m<w[v].length;m++)this.idToNodeMap.get(w[v][m]).displacementY=F}}if(this.constraints.relativePlacementConstraint)if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(G){if(!r.fixedNodesOnHorizontal.has(G)){var D=0;r.dummyToNodeForVerticalAlignment.has(G)?D=r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(G)[0]).displacementX:D=r.idToNodeMap.get(G).displacementX,r.nodeToRelativeConstraintMapHorizontal.get(G).forEach(function(b){if(b.right){var q=r.nodeToTempPositionMapHorizontal.get(b.right)-r.nodeToTempPositionMapHorizontal.get(G)-D;q<b.gap&&(D-=b.gap-q)}else{var q=r.nodeToTempPositionMapHorizontal.get(G)-r.nodeToTempPositionMapHorizontal.get(b.left)+D;q<b.gap&&(D+=b.gap-q)}}),r.nodeToTempPositionMapHorizontal.set(G,r.nodeToTempPositionMapHorizontal.get(G)+D),r.dummyToNodeForVerticalAlignment.has(G)?r.dummyToNodeForVerticalAlignment.get(G).forEach(function(b){r.idToNodeMap.get(b).displacementX=D}):r.idToNodeMap.get(G).displacementX=D}}),this.nodesInRelativeVertical.forEach(function(G){if(!r.fixedNodesOnHorizontal.has(G)){var D=0;r.dummyToNodeForHorizontalAlignment.has(G)?D=r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(G)[0]).displacementY:D=r.idToNodeMap.get(G).displacementY,r.nodeToRelativeConstraintMapVertical.get(G).forEach(function(b){if(b.bottom){var q=r.nodeToTempPositionMapVertical.get(b.bottom)-r.nodeToTempPositionMapVertical.get(G)-D;q<b.gap&&(D-=b.gap-q)}else{var q=r.nodeToTempPositionMapVertical.get(G)-r.nodeToTempPositionMapVertical.get(b.top)+D;q<b.gap&&(D+=b.gap-q)}}),r.nodeToTempPositionMapVertical.set(G,r.nodeToTempPositionMapVertical.get(G)+D),r.dummyToNodeForHorizontalAlignment.has(G)?r.dummyToNodeForHorizontalAlignment.get(G).forEach(function(b){r.idToNodeMap.get(b).displacementY=D}):r.idToNodeMap.get(G).displacementY=D}});else{for(var v=0;v<this.componentsOnHorizontal.length;v++){var X=this.componentsOnHorizontal[v];if(this.fixedComponentsOnHorizontal[v])for(var m=0;m<X.length;m++)this.dummyToNodeForVerticalAlignment.has(X[m])?this.dummyToNodeForVerticalAlignment.get(X[m]).forEach(function(b){r.idToNodeMap.get(b).displacementX=0}):this.idToNodeMap.get(X[m]).displacementX=0;else{for(var z=0,W=0,m=0;m<X.length;m++)if(this.dummyToNodeForVerticalAlignment.has(X[m])){var B=this.dummyToNodeForVerticalAlignment.get(X[m]);z+=B.length*this.idToNodeMap.get(B[0]).displacementX,W+=B.length}else z+=this.idToNodeMap.get(X[m]).displacementX,W++;for(var Q=z/W,m=0;m<X.length;m++)this.dummyToNodeForVerticalAlignment.has(X[m])?this.dummyToNodeForVerticalAlignment.get(X[m]).forEach(function(b){r.idToNodeMap.get(b).displacementX=Q}):this.idToNodeMap.get(X[m]).displacementX=Q}}for(var v=0;v<this.componentsOnVertical.length;v++){var X=this.componentsOnVertical[v];if(this.fixedComponentsOnVertical[v])for(var m=0;m<X.length;m++)this.dummyToNodeForHorizontalAlignment.has(X[m])?this.dummyToNodeForHorizontalAlignment.get(X[m]).forEach(function(q){r.idToNodeMap.get(q).displacementY=0}):this.idToNodeMap.get(X[m]).displacementY=0;else{for(var z=0,W=0,m=0;m<X.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(X[m])){var B=this.dummyToNodeForHorizontalAlignment.get(X[m]);z+=B.length*this.idToNodeMap.get(B[0]).displacementY,W+=B.length}else z+=this.idToNodeMap.get(X[m]).displacementY,W++;for(var Q=z/W,m=0;m<X.length;m++)this.dummyToNodeForHorizontalAlignment.has(X[m])?this.dummyToNodeForHorizontalAlignment.get(X[m]).forEach(function(et){r.idToNodeMap.get(et).displacementY=Q}):this.idToNodeMap.get(X[m]).displacementY=Q}}}},O.prototype.calculateNodesToApplyGravitationTo=function(){var r=[],E,v=this.graphManager.getGraphs(),p=v.length,m;for(m=0;m<p;m++)E=v[m],E.updateConnected(),E.isConnected||(r=r.concat(E.getNodes()));return r},O.prototype.createBendpoints=function(){var r=[];r=r.concat(this.graphManager.getAllEdges());var E=new Set,v;for(v=0;v<r.length;v++){var p=r[v];if(!E.has(p)){var m=p.getSource(),M=p.getTarget();if(m==M)p.getBendpoints().push(new y),p.getBendpoints().push(new y),this.createDummyNodesForBendpoints(p),E.add(p);else{var w=[];if(w=w.concat(m.getEdgeListToNode(M)),w=w.concat(M.getEdgeListToNode(m)),!E.has(w[0])){if(w.length>1){var x;for(x=0;x<w.length;x++){var F=w[x];F.getBendpoints().push(new y),this.createDummyNodesForBendpoints(F)}}w.forEach(function(X){E.add(X)})}}}if(E.size==r.length)break}},O.prototype.positionNodesRadially=function(r){for(var E=new g(0,0),v=Math.ceil(Math.sqrt(r.length)),p=0,m=0,M=0,w=new y(0,0),x=0;x<r.length;x++){x%v==0&&(M=0,m=p,x!=0&&(m+=s.DEFAULT_COMPONENT_SEPERATION),p=0);var F=r[x],X=I.findCenterOfTree(F);E.x=M,E.y=m,w=O.radialLayout(F,X,E),w.y>p&&(p=Math.floor(w.y)),M=Math.floor(w.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new y(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},O.radialLayout=function(r,E,v){var p=Math.max(this.maxDiagonalInTree(r),s.DEFAULT_RADIAL_SEPARATION);O.branchRadialLayout(E,null,0,359,0,p);var m=U.calculateBounds(r),M=new Y;M.setDeviceOrgX(m.getMinX()),M.setDeviceOrgY(m.getMinY()),M.setWorldOrgX(v.x),M.setWorldOrgY(v.y);for(var w=0;w<r.length;w++){var x=r[w];x.transform(M)}var F=new y(m.getMaxX(),m.getMaxY());return M.inverseTransformPoint(F)},O.branchRadialLayout=function(r,E,v,p,m,M){var w=(p-v+1)/2;w<0&&(w+=180);var x=(w+v)%360,F=x*S.TWO_PI/360,X=m*Math.cos(F),z=m*Math.sin(F);r.setCenter(X,z);var W=[];W=W.concat(r.getEdges());var B=W.length;E!=null&&B--;for(var Q=0,G=W.length,D,b=r.getEdgesBetween(E);b.length>1;){var q=b[0];b.splice(0,1);var et=W.indexOf(q);et>=0&&W.splice(et,1),G--,B--}E!=null?D=(W.indexOf(b[0])+1)%G:D=0;for(var vt=Math.abs(p-v)/B,j=D;Q!=B;j=++j%G){var xt=W[j].getOtherEnd(r);if(xt!=E){var J=(v+Q*vt)%360,nt=(J+vt)%360;O.branchRadialLayout(xt,r,J,nt,m+M,M),Q++}}},O.maxDiagonalInTree=function(r){for(var E=k.MIN_VALUE,v=0;v<r.length;v++){var p=r[v],m=p.getDiagonal();m>E&&(E=m)}return E},O.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},O.prototype.groupZeroDegreeMembers=function(){var r=this,E={};this.memberGroups={},this.idToDummyNode={};for(var v=[],p=this.graphManager.getAllNodes(),m=0;m<p.length;m++){var M=p[m],w=M.getParent();this.getNodeDegreeWithChildren(M)===0&&(w.id==null||!this.getToBeTiled(w))&&v.push(M)}for(var m=0;m<v.length;m++){var M=v[m],x=M.getParent().id;typeof E[x]>"u"&&(E[x]=[]),E[x]=E[x].concat(M)}Object.keys(E).forEach(function(F){if(E[F].length>1){var X="DummyCompound_"+F;r.memberGroups[X]=E[F];var z=E[F][0].getParent(),W=new t(r.graphManager);W.id=X,W.paddingLeft=z.paddingLeft||0,W.paddingRight=z.paddingRight||0,W.paddingBottom=z.paddingBottom||0,W.paddingTop=z.paddingTop||0,r.idToDummyNode[X]=W;var B=r.getGraphManager().add(r.newGraph(),W),Q=z.getChild();Q.add(W);for(var G=0;G<E[F].length;G++){var D=E[F][G];Q.remove(D),B.add(D)}}})},O.prototype.clearCompounds=function(){var r={},E={};this.performDFSOnCompounds();for(var v=0;v<this.compoundOrder.length;v++)E[this.compoundOrder[v].id]=this.compoundOrder[v],r[this.compoundOrder[v].id]=[].concat(this.compoundOrder[v].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[v].getChild()),this.compoundOrder[v].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(r,E)},O.prototype.clearZeroDegreeMembers=function(){var r=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(v){var p=r.idToDummyNode[v];if(E[v]=r.tileNodes(r.memberGroups[v],p.paddingLeft+p.paddingRight),p.rect.width=E[v].width,p.rect.height=E[v].height,p.setCenter(E[v].centerX,E[v].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var m=p.rect.width,M=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(m+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>m?(p.rect.x-=(p.labelWidth-m)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-m)/2):p.labelPosHorizontal=="right"&&p.setWidth(m+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(M+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>M?(p.rect.y-=(p.labelHeight-M)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-M)/2):p.labelPosVertical=="bottom"&&p.setHeight(M+p.labelHeight))}})},O.prototype.repopulateCompounds=function(){for(var r=this.compoundOrder.length-1;r>=0;r--){var E=this.compoundOrder[r],v=E.id,p=E.paddingLeft,m=E.paddingTop,M=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[v],E.rect.x,E.rect.y,p,m,M,w)}},O.prototype.repopulateZeroDegreeMembers=function(){var r=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(v){var p=r.idToDummyNode[v],m=p.paddingLeft,M=p.paddingTop,w=p.labelMarginLeft,x=p.labelMarginTop;r.adjustLocations(E[v],p.rect.x,p.rect.y,m,M,w,x)})},O.prototype.getToBeTiled=function(r){var E=r.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var v=r.getChild();if(v==null)return this.toBeTiled[E]=!1,!1;for(var p=v.getNodes(),m=0;m<p.length;m++){var M=p[m];if(this.getNodeDegree(M)>0)return this.toBeTiled[E]=!1,!1;if(M.getChild()==null){this.toBeTiled[M.id]=!1;continue}if(!this.getToBeTiled(M))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},O.prototype.getNodeDegree=function(r){r.id;for(var E=r.getEdges(),v=0,p=0;p<E.length;p++){var m=E[p];m.getSource().id!==m.getTarget().id&&(v=v+1)}return v},O.prototype.getNodeDegreeWithChildren=function(r){var E=this.getNodeDegree(r);if(r.getChild()==null)return E;for(var v=r.getChild().getNodes(),p=0;p<v.length;p++){var m=v[p];E+=this.getNodeDegreeWithChildren(m)}return E},O.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},O.prototype.fillCompexOrderByDFS=function(r){for(var E=0;E<r.length;E++){var v=r[E];v.getChild()!=null&&this.fillCompexOrderByDFS(v.getChild().getNodes()),this.getToBeTiled(v)&&this.compoundOrder.push(v)}},O.prototype.adjustLocations=function(r,E,v,p,m,M,w){E+=p+M,v+=m+w;for(var x=E,F=0;F<r.rows.length;F++){var X=r.rows[F];E=x;for(var z=0,W=0;W<X.length;W++){var B=X[W];B.rect.x=E,B.rect.y=v,E+=B.rect.width+r.horizontalPadding,B.rect.height>z&&(z=B.rect.height)}v+=z+r.verticalPadding}},O.prototype.tileCompoundMembers=function(r,E){var v=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(p){var m=E[p];if(v.tiledMemberPack[p]=v.tileNodes(r[p],m.paddingLeft+m.paddingRight),m.rect.width=v.tiledMemberPack[p].width,m.rect.height=v.tiledMemberPack[p].height,m.setCenter(v.tiledMemberPack[p].centerX,v.tiledMemberPack[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var M=m.rect.width,w=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(M+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>M?(m.rect.x-=(m.labelWidth-M)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-M)/2):m.labelPosHorizontal=="right"&&m.setWidth(M+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(w+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>w?(m.rect.y-=(m.labelHeight-w)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-w)/2):m.labelPosVertical=="bottom"&&m.setHeight(w+m.labelHeight))}})},O.prototype.tileNodes=function(r,E){var v=this.tileNodesByFavoringDim(r,E,!0),p=this.tileNodesByFavoringDim(r,E,!1),m=this.getOrgRatio(v),M=this.getOrgRatio(p),w;return M<m?w=p:w=v,w},O.prototype.getOrgRatio=function(r){var E=r.width,v=r.height,p=E/v;return p<1&&(p=1/p),p},O.prototype.calcIdealRowWidth=function(r,E){var v=s.TILING_PADDING_VERTICAL,p=s.TILING_PADDING_HORIZONTAL,m=r.length,M=0,w=0,x=0;r.forEach(function(G){M+=G.getWidth(),w+=G.getHeight(),G.getWidth()>x&&(x=G.getWidth())});var F=M/m,X=w/m,z=Math.pow(v-p,2)+4*(F+p)*(X+v)*m,W=(p-v+Math.sqrt(z))/(2*(F+p)),B;E?(B=Math.ceil(W),B==W&&B++):B=Math.floor(W);var Q=B*(F+p)-p;return x>Q&&(Q=x),Q+=p*2,Q},O.prototype.tileNodesByFavoringDim=function(r,E,v){var p=s.TILING_PADDING_VERTICAL,m=s.TILING_PADDING_HORIZONTAL,M=s.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:p,horizontalPadding:m,centerX:0,centerY:0};M&&(w.idealRowWidth=this.calcIdealRowWidth(r,v));var x=function(G){return G.rect.width*G.rect.height},F=function(G,D){return x(D)-x(G)};r.sort(function(G,D){var b=F;return w.idealRowWidth?(b=M,b(G.id,D.id)):b(G,D)});for(var X=0,z=0,W=0;W<r.length;W++){var B=r[W];X+=B.getCenterX(),z+=B.getCenterY()}w.centerX=X/r.length,w.centerY=z/r.length;for(var W=0;W<r.length;W++){var B=r[W];if(w.rows.length==0)this.insertNodeToRow(w,B,0,E);else if(this.canAddHorizontal(w,B.rect.width,B.rect.height)){var Q=w.rows.length-1;w.idealRowWidth||(Q=this.getShortestRowIndex(w)),this.insertNodeToRow(w,B,Q,E)}else this.insertNodeToRow(w,B,w.rows.length,E);this.shiftToLastRow(w)}return w},O.prototype.insertNodeToRow=function(r,E,v,p){var m=p;if(v==r.rows.length){var M=[];r.rows.push(M),r.rowWidth.push(m),r.rowHeight.push(0)}var w=r.rowWidth[v]+E.rect.width;r.rows[v].length>0&&(w+=r.horizontalPadding),r.rowWidth[v]=w,r.width<w&&(r.width=w);var x=E.rect.height;v>0&&(x+=r.verticalPadding);var F=0;x>r.rowHeight[v]&&(F=r.rowHeight[v],r.rowHeight[v]=x,F=r.rowHeight[v]-F),r.height+=F,r.rows[v].push(E)},O.prototype.getShortestRowIndex=function(r){for(var E=-1,v=Number.MAX_VALUE,p=0;p<r.rows.length;p++)r.rowWidth[p]<v&&(E=p,v=r.rowWidth[p]);return E},O.prototype.getLongestRowIndex=function(r){for(var E=-1,v=Number.MIN_VALUE,p=0;p<r.rows.length;p++)r.rowWidth[p]>v&&(E=p,v=r.rowWidth[p]);return E},O.prototype.canAddHorizontal=function(r,E,v){if(r.idealRowWidth){var p=r.rows.length-1,m=r.rowWidth[p];return m+E+r.horizontalPadding<=r.idealRowWidth}var M=this.getShortestRowIndex(r);if(M<0)return!0;var w=r.rowWidth[M];if(w+r.horizontalPadding+E<=r.width)return!0;var x=0;r.rowHeight[M]<v&&M>0&&(x=v+r.verticalPadding-r.rowHeight[M]);var F;r.width-w>=E+r.horizontalPadding?F=(r.height+x)/(w+E+r.horizontalPadding):F=(r.height+x)/r.width,x=v+r.verticalPadding;var X;return r.width<E?X=(r.height+x)/E:X=(r.height+x)/r.width,X<1&&(X=1/X),F<1&&(F=1/F),F<X},O.prototype.shiftToLastRow=function(r){var E=this.getLongestRowIndex(r),v=r.rowWidth.length-1,p=r.rows[E],m=p[p.length-1],M=m.width+r.horizontalPadding;if(r.width-r.rowWidth[v]>M&&E!=v){p.splice(-1,1),r.rows[v].push(m),r.rowWidth[E]=r.rowWidth[E]-M,r.rowWidth[v]=r.rowWidth[v]+M,r.width=r.rowWidth[instance.getLongestRowIndex(r)];for(var w=Number.MIN_VALUE,x=0;x<p.length;x++)p[x].height>w&&(w=p[x].height);E>0&&(w+=r.verticalPadding);var F=r.rowHeight[E]+r.rowHeight[v];r.rowHeight[E]=w,r.rowHeight[v]<m.height+r.verticalPadding&&(r.rowHeight[v]=m.height+r.verticalPadding);var X=r.rowHeight[E]+r.rowHeight[v];r.height+=X-F,this.shiftToLastRow(r)}},O.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},O.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},O.prototype.reduceTrees=function(){for(var r=[],E=!0,v;E;){var p=this.graphManager.getAllNodes(),m=[];E=!1;for(var M=0;M<p.length;M++)if(v=p[M],v.getEdges().length==1&&!v.getEdges()[0].isInterGraph&&v.getChild()==null){if(s.PURE_INCREMENTAL){var w=v.getEdges()[0].getOtherEnd(v),x=new A(v.getCenterX()-w.getCenterX(),v.getCenterY()-w.getCenterY());m.push([v,v.getEdges()[0],v.getOwner(),x])}else m.push([v,v.getEdges()[0],v.getOwner()]);E=!0}if(E==!0){for(var F=[],X=0;X<m.length;X++)m[X][0].getEdges().length==1&&(F.push(m[X]),m[X][0].getOwner().remove(m[X][0]));r.push(F),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=r},O.prototype.growTree=function(r){for(var E=r.length,v=r[E-1],p,m=0;m<v.length;m++)p=v[m],this.findPlaceforPrunedNode(p),p[2].add(p[0]),p[2].add(p[1],p[1].source,p[1].target);r.splice(r.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},O.prototype.findPlaceforPrunedNode=function(r){var E,v,p=r[0];if(p==r[1].source?v=r[1].target:v=r[1].source,s.PURE_INCREMENTAL)p.setCenter(v.getCenterX()+r[3].getWidth(),v.getCenterY()+r[3].getHeight());else{var m=v.startX,M=v.finishX,w=v.startY,x=v.finishY,F=0,X=0,z=0,W=0,B=[F,z,X,W];if(w>0)for(var Q=m;Q<=M;Q++)B[0]+=this.grid[Q][w-1].length+this.grid[Q][w].length-1;if(M<this.grid.length-1)for(var Q=w;Q<=x;Q++)B[1]+=this.grid[M+1][Q].length+this.grid[M][Q].length-1;if(x<this.grid[0].length-1)for(var Q=m;Q<=M;Q++)B[2]+=this.grid[Q][x+1].length+this.grid[Q][x].length-1;if(m>0)for(var Q=w;Q<=x;Q++)B[3]+=this.grid[m-1][Q].length+this.grid[m][Q].length-1;for(var G=k.MAX_VALUE,D,b,q=0;q<B.length;q++)B[q]<G?(G=B[q],D=1,b=q):B[q]==G&&D++;if(D==3&&G==0)B[0]==0&&B[1]==0&&B[2]==0?E=1:B[0]==0&&B[1]==0&&B[3]==0?E=0:B[0]==0&&B[2]==0&&B[3]==0?E=3:B[1]==0&&B[2]==0&&B[3]==0&&(E=2);else if(D==2&&G==0){var et=Math.floor(Math.random()*2);B[0]==0&&B[1]==0?et==0?E=0:E=1:B[0]==0&&B[2]==0?et==0?E=0:E=2:B[0]==0&&B[3]==0?et==0?E=0:E=3:B[1]==0&&B[2]==0?et==0?E=1:E=2:B[1]==0&&B[3]==0?et==0?E=1:E=3:et==0?E=2:E=3}else if(D==4&&G==0){var et=Math.floor(Math.random()*4);E=et}else E=b;E==0?p.setCenter(v.getCenterX(),v.getCenterY()-v.getHeight()/2-d.DEFAULT_EDGE_LENGTH-p.getHeight()/2):E==1?p.setCenter(v.getCenterX()+v.getWidth()/2+d.DEFAULT_EDGE_LENGTH+p.getWidth()/2,v.getCenterY()):E==2?p.setCenter(v.getCenterX(),v.getCenterY()+v.getHeight()/2+d.DEFAULT_EDGE_LENGTH+p.getHeight()/2):p.setCenter(v.getCenterX()-v.getWidth()/2-d.DEFAULT_EDGE_LENGTH-p.getWidth()/2,v.getCenterY())}},o.exports=O},991:(o,i,e)=>{var a=e(551).FDLayoutNode,n=e(551).IMath;function f(h,s,c,d){a.call(this,h,s,c,d)}f.prototype=Object.create(a.prototype);for(var t in a)f[t]=a[t];f.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},f.prototype.propogateDisplacementToChildren=function(h,s){for(var c=this.getChild().getNodes(),d,T=0;T<c.length;T++)d=c[T],d.getChild()==null?(d.displacementX+=h,d.displacementY+=s):d.propogateDisplacementToChildren(h,s)},f.prototype.move=function(){var h=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),h.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},f.prototype.setPred1=function(h){this.pred1=h},f.prototype.getPred1=function(){return pred1},f.prototype.getPred2=function(){return pred2},f.prototype.setNext=function(h){this.next=h},f.prototype.getNext=function(){return next},f.prototype.setProcessed=function(h){this.processed=h},f.prototype.isProcessed=function(){return processed},o.exports=f},902:(o,i,e)=>{function a(c){if(Array.isArray(c)){for(var d=0,T=Array(c.length);d<c.length;d++)T[d]=c[d];return T}else return Array.from(c)}var n=e(806),f=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function s(){}s.handleConstraints=function(c){var d={};d.fixedNodeConstraint=c.constraints.fixedNodeConstraint,d.alignmentConstraint=c.constraints.alignmentConstraint,d.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,y=[],A=[],I=c.getAllNodes(),k=0,S=0;S<I.length;S++){var U=I[S];U.getChild()==null&&(g.set(U.id,k++),y.push(U.getCenterX()),A.push(U.getCenterY()),T.set(U.id,U))}d.relativePlacementConstraint&&d.relativePlacementConstraint.forEach(function(_){!_.gap&&_.gap!=0&&(_.left?_.gap=n.DEFAULT_EDGE_LENGTH+T.get(_.left).getWidth()/2+T.get(_.right).getWidth()/2:_.gap=n.DEFAULT_EDGE_LENGTH+T.get(_.top).getHeight()/2+T.get(_.bottom).getHeight()/2)});var Y=function(_,R){return{x:_.x-R.x,y:_.y-R.y}},$=function(_){var R=0,V=0;return _.forEach(function(Z){R+=y[g.get(Z)],V+=A[g.get(Z)]}),{x:R/_.size,y:V/_.size}},O=function(_,R,V,Z,K){function ft(lt,ot){var at=new Set(lt),Ct=!0,gt=!1,Mt=void 0;try{for(var St=ot[Symbol.iterator](),It;!(Ct=(It=St.next()).done);Ct=!0){var Tt=It.value;at.add(Tt)}}catch(Ut){gt=!0,Mt=Ut}finally{try{!Ct&&St.return&&St.return()}finally{if(gt)throw Mt}}return at}var ht=new Map;_.forEach(function(lt,ot){ht.set(ot,0)}),_.forEach(function(lt,ot){lt.forEach(function(at){ht.set(at.id,ht.get(at.id)+1)})});var tt=new Map,ct=new Map,it=new f;ht.forEach(function(lt,ot){lt==0?(it.push(ot),V||(R=="horizontal"?tt.set(ot,g.has(ot)?y[g.get(ot)]:Z.get(ot)):tt.set(ot,g.has(ot)?A[g.get(ot)]:Z.get(ot)))):tt.set(ot,Number.NEGATIVE_INFINITY),V&&ct.set(ot,new Set([ot]))}),V&&K.forEach(function(lt){var ot=[];if(lt.forEach(function(gt){V.has(gt)&&ot.push(gt)}),ot.length>0){var at=0;ot.forEach(function(gt){R=="horizontal"?(tt.set(gt,g.has(gt)?y[g.get(gt)]:Z.get(gt)),at+=tt.get(gt)):(tt.set(gt,g.has(gt)?A[g.get(gt)]:Z.get(gt)),at+=tt.get(gt))}),at=at/ot.length,lt.forEach(function(gt){V.has(gt)||tt.set(gt,at)})}else{var Ct=0;lt.forEach(function(gt){R=="horizontal"?Ct+=g.has(gt)?y[g.get(gt)]:Z.get(gt):Ct+=g.has(gt)?A[g.get(gt)]:Z.get(gt)}),Ct=Ct/lt.length,lt.forEach(function(gt){tt.set(gt,Ct)})}});for(var Et=function(){var lt=it.shift(),ot=_.get(lt);ot.forEach(function(at){if(tt.get(at.id)<tt.get(lt)+at.gap)if(V&&V.has(at.id)){var Ct=void 0;if(R=="horizontal"?Ct=g.has(at.id)?y[g.get(at.id)]:Z.get(at.id):Ct=g.has(at.id)?A[g.get(at.id)]:Z.get(at.id),tt.set(at.id,Ct),Ct<tt.get(lt)+at.gap){var gt=tt.get(lt)+at.gap-Ct;ct.get(lt).forEach(function(Mt){tt.set(Mt,tt.get(Mt)-gt)})}}else tt.set(at.id,tt.get(lt)+at.gap);ht.set(at.id,ht.get(at.id)-1),ht.get(at.id)==0&&it.push(at.id),V&&ct.set(at.id,ft(ct.get(lt),ct.get(at.id)))})};it.length!=0;)Et();if(V){var yt=new Set;_.forEach(function(lt,ot){lt.length==0&&yt.add(ot)});var Ot=[];ct.forEach(function(lt,ot){if(yt.has(ot)){var at=!1,Ct=!0,gt=!1,Mt=void 0;try{for(var St=lt[Symbol.iterator](),It;!(Ct=(It=St.next()).done);Ct=!0){var Tt=It.value;V.has(Tt)&&(at=!0)}}catch(Dt){gt=!0,Mt=Dt}finally{try{!Ct&&St.return&&St.return()}finally{if(gt)throw Mt}}if(!at){var Ut=!1,kt=void 0;Ot.forEach(function(Dt,Ft){Dt.has([].concat(a(lt))[0])&&(Ut=!0,kt=Ft)}),Ut?lt.forEach(function(Dt){Ot[kt].add(Dt)}):Ot.push(new Set(lt))}}}),Ot.forEach(function(lt,ot){var at=Number.POSITIVE_INFINITY,Ct=Number.POSITIVE_INFINITY,gt=Number.NEGATIVE_INFINITY,Mt=Number.NEGATIVE_INFINITY,St=!0,It=!1,Tt=void 0;try{for(var Ut=lt[Symbol.iterator](),kt;!(St=(kt=Ut.next()).done);St=!0){var Dt=kt.value,Ft=void 0;R=="horizontal"?Ft=g.has(Dt)?y[g.get(Dt)]:Z.get(Dt):Ft=g.has(Dt)?A[g.get(Dt)]:Z.get(Dt);var qt=tt.get(Dt);Ft<at&&(at=Ft),Ft>gt&&(gt=Ft),qt<Ct&&(Ct=qt),qt>Mt&&(Mt=qt)}}catch($t){It=!0,Tt=$t}finally{try{!St&&Ut.return&&Ut.return()}finally{if(It)throw Tt}}var oe=(at+gt)/2-(Ct+Mt)/2,ee=!0,Qt=!1,Kt=void 0;try{for(var jt=lt[Symbol.iterator](),Zt;!(ee=(Zt=jt.next()).done);ee=!0){var re=Zt.value;tt.set(re,tt.get(re)+oe)}}catch($t){Qt=!0,Kt=$t}finally{try{!ee&&jt.return&&jt.return()}finally{if(Qt)throw Kt}}})}return tt},rt=function(_){var R=0,V=0,Z=0,K=0;if(_.forEach(function(ct){ct.left?y[g.get(ct.left)]-y[g.get(ct.right)]>=0?R++:V++:A[g.get(ct.top)]-A[g.get(ct.bottom)]>=0?Z++:K++}),R>V&&Z>K)for(var ft=0;ft<g.size;ft++)y[ft]=-1*y[ft],A[ft]=-1*A[ft];else if(R>V)for(var ht=0;ht<g.size;ht++)y[ht]=-1*y[ht];else if(Z>K)for(var tt=0;tt<g.size;tt++)A[tt]=-1*A[tt]},r=function(_){var R=[],V=new f,Z=new Set,K=0;return _.forEach(function(ft,ht){if(!Z.has(ht)){R[K]=[];var tt=ht;for(V.push(tt),Z.add(tt),R[K].push(tt);V.length!=0;){tt=V.shift();var ct=_.get(tt);ct.forEach(function(it){Z.has(it.id)||(V.push(it.id),Z.add(it.id),R[K].push(it.id))})}K++}}),R},E=function(_){var R=new Map;return _.forEach(function(V,Z){R.set(Z,[])}),_.forEach(function(V,Z){V.forEach(function(K){R.get(Z).push(K),R.get(K.id).push({id:Z,gap:K.gap,direction:K.direction})})}),R},v=function(_){var R=new Map;return _.forEach(function(V,Z){R.set(Z,[])}),_.forEach(function(V,Z){V.forEach(function(K){R.get(K.id).push({id:Z,gap:K.gap,direction:K.direction})})}),R},p=[],m=[],M=!1,w=!1,x=new Set,F=new Map,X=new Map,z=[];if(d.fixedNodeConstraint&&d.fixedNodeConstraint.forEach(function(_){x.add(_.nodeId)}),d.relativePlacementConstraint&&(d.relativePlacementConstraint.forEach(function(_){_.left?(F.has(_.left)?F.get(_.left).push({id:_.right,gap:_.gap,direction:"horizontal"}):F.set(_.left,[{id:_.right,gap:_.gap,direction:"horizontal"}]),F.has(_.right)||F.set(_.right,[])):(F.has(_.top)?F.get(_.top).push({id:_.bottom,gap:_.gap,direction:"vertical"}):F.set(_.top,[{id:_.bottom,gap:_.gap,direction:"vertical"}]),F.has(_.bottom)||F.set(_.bottom,[]))}),X=E(F),z=r(X)),n.TRANSFORM_ON_CONSTRAINT_HANDLING){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>1)d.fixedNodeConstraint.forEach(function(_,R){p[R]=[_.position.x,_.position.y],m[R]=[y[g.get(_.nodeId)],A[g.get(_.nodeId)]]}),M=!0;else if(d.alignmentConstraint)(function(){var _=0;if(d.alignmentConstraint.vertical){for(var R=d.alignmentConstraint.vertical,V=function(tt){var ct=new Set;R[tt].forEach(function(yt){ct.add(yt)});var it=new Set([].concat(a(ct)).filter(function(yt){return x.has(yt)})),Et=void 0;it.size>0?Et=y[g.get(it.values().next().value)]:Et=$(ct).x,R[tt].forEach(function(yt){p[_]=[Et,A[g.get(yt)]],m[_]=[y[g.get(yt)],A[g.get(yt)]],_++})},Z=0;Z<R.length;Z++)V(Z);M=!0}if(d.alignmentConstraint.horizontal){for(var K=d.alignmentConstraint.horizontal,ft=function(tt){var ct=new Set;K[tt].forEach(function(yt){ct.add(yt)});var it=new Set([].concat(a(ct)).filter(function(yt){return x.has(yt)})),Et=void 0;it.size>0?Et=y[g.get(it.values().next().value)]:Et=$(ct).y,K[tt].forEach(function(yt){p[_]=[y[g.get(yt)],Et],m[_]=[y[g.get(yt)],A[g.get(yt)]],_++})},ht=0;ht<K.length;ht++)ft(ht);M=!0}d.relativePlacementConstraint&&(w=!0)})();else if(d.relativePlacementConstraint){for(var W=0,B=0,Q=0;Q<z.length;Q++)z[Q].length>W&&(W=z[Q].length,B=Q);if(W<X.size/2)rt(d.relativePlacementConstraint),M=!1,w=!1;else{var G=new Map,D=new Map,b=[];z[B].forEach(function(_){F.get(_).forEach(function(R){R.direction=="horizontal"?(G.has(_)?G.get(_).push(R):G.set(_,[R]),G.has(R.id)||G.set(R.id,[]),b.push({left:_,right:R.id})):(D.has(_)?D.get(_).push(R):D.set(_,[R]),D.has(R.id)||D.set(R.id,[]),b.push({top:_,bottom:R.id}))})}),rt(b),w=!1;var q=O(G,"horizontal"),et=O(D,"vertical");z[B].forEach(function(_,R){m[R]=[y[g.get(_)],A[g.get(_)]],p[R]=[],q.has(_)?p[R][0]=q.get(_):p[R][0]=y[g.get(_)],et.has(_)?p[R][1]=et.get(_):p[R][1]=A[g.get(_)]}),M=!0}}if(M){for(var vt=void 0,j=t.transpose(p),xt=t.transpose(m),J=0;J<j.length;J++)j[J]=t.multGamma(j[J]),xt[J]=t.multGamma(xt[J]);var nt=t.multMat(j,t.transpose(xt)),mt=h.svd(nt);vt=t.multMat(mt.V,t.transpose(mt.U));for(var st=0;st<g.size;st++){var Lt=[y[st],A[st]],_t=[vt[0][0],vt[1][0]],Nt=[vt[0][1],vt[1][1]];y[st]=t.dotProduct(Lt,_t),A[st]=t.dotProduct(Lt,Nt)}w&&rt(d.relativePlacementConstraint)}}if(n.ENFORCE_CONSTRAINTS){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>0){var At={x:0,y:0};d.fixedNodeConstraint.forEach(function(_,R){var V={x:y[g.get(_.nodeId)],y:A[g.get(_.nodeId)]},Z=_.position,K=Y(Z,V);At.x+=K.x,At.y+=K.y}),At.x/=d.fixedNodeConstraint.length,At.y/=d.fixedNodeConstraint.length,y.forEach(function(_,R){y[R]+=At.x}),A.forEach(function(_,R){A[R]+=At.y}),d.fixedNodeConstraint.forEach(function(_){y[g.get(_.nodeId)]=_.position.x,A[g.get(_.nodeId)]=_.position.y})}if(d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var Ht=d.alignmentConstraint.vertical,Rt=function(_){var R=new Set;Ht[_].forEach(function(K){R.add(K)});var V=new Set([].concat(a(R)).filter(function(K){return x.has(K)})),Z=void 0;V.size>0?Z=y[g.get(V.values().next().value)]:Z=$(R).x,R.forEach(function(K){x.has(K)||(y[g.get(K)]=Z)})},bt=0;bt<Ht.length;bt++)Rt(bt);if(d.alignmentConstraint.horizontal)for(var Gt=d.alignmentConstraint.horizontal,Bt=function(_){var R=new Set;Gt[_].forEach(function(K){R.add(K)});var V=new Set([].concat(a(R)).filter(function(K){return x.has(K)})),Z=void 0;V.size>0?Z=A[g.get(V.values().next().value)]:Z=$(R).y,R.forEach(function(K){x.has(K)||(A[g.get(K)]=Z)})},Pt=0;Pt<Gt.length;Pt++)Bt(Pt)}d.relativePlacementConstraint&&function(){var _=new Map,R=new Map,V=new Map,Z=new Map,K=new Map,ft=new Map,ht=new Set,tt=new Set;if(x.forEach(function(ut){ht.add(ut),tt.add(ut)}),d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var ct=d.alignmentConstraint.vertical,it=function(ut){V.set("dummy"+ut,[]),ct[ut].forEach(function(wt){_.set(wt,"dummy"+ut),V.get("dummy"+ut).push(wt),x.has(wt)&&ht.add("dummy"+ut)}),K.set("dummy"+ut,y[g.get(ct[ut][0])])},Et=0;Et<ct.length;Et++)it(Et);if(d.alignmentConstraint.horizontal)for(var yt=d.alignmentConstraint.horizontal,Ot=function(ut){Z.set("dummy"+ut,[]),yt[ut].forEach(function(wt){R.set(wt,"dummy"+ut),Z.get("dummy"+ut).push(wt),x.has(wt)&&tt.add("dummy"+ut)}),ft.set("dummy"+ut,A[g.get(yt[ut][0])])},lt=0;lt<yt.length;lt++)Ot(lt)}var ot=new Map,at=new Map,Ct=function(ut){F.get(ut).forEach(function(wt){var Yt=void 0,Wt=void 0;wt.direction=="horizontal"?(Yt=_.get(ut)?_.get(ut):ut,_.get(wt.id)?Wt={id:_.get(wt.id),gap:wt.gap,direction:wt.direction}:Wt=wt,ot.has(Yt)?ot.get(Yt).push(Wt):ot.set(Yt,[Wt]),ot.has(Wt.id)||ot.set(Wt.id,[])):(Yt=R.get(ut)?R.get(ut):ut,R.get(wt.id)?Wt={id:R.get(wt.id),gap:wt.gap,direction:wt.direction}:Wt=wt,at.has(Yt)?at.get(Yt).push(Wt):at.set(Yt,[Wt]),at.has(Wt.id)||at.set(Wt.id,[]))})},gt=!0,Mt=!1,St=void 0;try{for(var It=F.keys()[Symbol.iterator](),Tt;!(gt=(Tt=It.next()).done);gt=!0){var Ut=Tt.value;Ct(Ut)}}catch(ut){Mt=!0,St=ut}finally{try{!gt&&It.return&&It.return()}finally{if(Mt)throw St}}var kt=E(ot),Dt=E(at),Ft=r(kt),qt=r(Dt),oe=v(ot),ee=v(at),Qt=[],Kt=[];Ft.forEach(function(ut,wt){Qt[wt]=[],ut.forEach(function(Yt){oe.get(Yt).length==0&&Qt[wt].push(Yt)})}),qt.forEach(function(ut,wt){Kt[wt]=[],ut.forEach(function(Yt){ee.get(Yt).length==0&&Kt[wt].push(Yt)})});var jt=O(ot,"horizontal",ht,K,Qt),Zt=O(at,"vertical",tt,ft,Kt),re=function(ut){V.get(ut)?V.get(ut).forEach(function(wt){y[g.get(wt)]=jt.get(ut)}):y[g.get(ut)]=jt.get(ut)},$t=!0,Ee=!1,Ne=void 0;try{for(var ae=jt.keys()[Symbol.iterator](),Te;!($t=(Te=ae.next()).done);$t=!0){var se=Te.value;re(se)}}catch(ut){Ee=!0,Ne=ut}finally{try{!$t&&ae.return&&ae.return()}finally{if(Ee)throw Ne}}var We=function(ut){Z.get(ut)?Z.get(ut).forEach(function(wt){A[g.get(wt)]=Zt.get(ut)}):A[g.get(ut)]=Zt.get(ut)},he=!0,Ae=!1,Ce=void 0;try{for(var le=Zt.keys()[Symbol.iterator](),Ie;!(he=(Ie=le.next()).done);he=!0){var se=Ie.value;We(se)}}catch(ut){Ae=!0,Ce=ut}finally{try{!he&&le.return&&le.return()}finally{if(Ae)throw Ce}}}()}for(var zt=0;zt<I.length;zt++){var dt=I[zt];dt.getChild()==null&&dt.setCenter(y[g.get(dt.id)],A[g.get(dt.id)])}},o.exports=s},551:o=>{o.exports=L}},N={};function u(o){var i=N[o];if(i!==void 0)return i.exports;var e=N[o]={exports:{}};return P[o](e,e.exports,u),e.exports}var l=u(45);return l})()})}(ue)),ue.exports}var pi=ge.exports,we;function vi(){return we||(we=1,function(C,H){(function(L,P){C.exports=P(fi())})(pi,function(L){return(()=>{var P={658:o=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(i){for(var e=arguments.length,a=Array(e>1?e-1:0),n=1;n<e;n++)a[n-1]=arguments[n];return a.forEach(function(f){Object.keys(f).forEach(function(t){return i[t]=f[t]})}),i}},548:(o,i,e)=>{var a=function(){function t(h,s){var c=[],d=!0,T=!1,g=void 0;try{for(var y=h[Symbol.iterator](),A;!(d=(A=y.next()).done)&&(c.push(A.value),!(s&&c.length===s));d=!0);}catch(I){T=!0,g=I}finally{try{!d&&y.return&&y.return()}finally{if(T)throw g}}return c}return function(h,s){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=e(140).layoutBase.LinkedList,f={};f.getTopMostNodes=function(t){for(var h={},s=0;s<t.length;s++)h[t[s].id()]=!0;var c=t.filter(function(d,T){typeof d=="number"&&(d=T);for(var g=d.parent()[0];g!=null;){if(h[g.id()])return!1;g=g.parent()[0]}return!0});return c},f.connectComponents=function(t,h,s,c){var d=new n,T=new Set,g=[],y=void 0,A=void 0,I=void 0,k=!1,S=1,U=[],Y=[],$=function(){var O=t.collection();Y.push(O);var rt=s[0],r=t.collection();r.merge(rt).merge(rt.descendants().intersection(h)),g.push(rt),r.forEach(function(p){d.push(p),T.add(p),O.merge(p)});for(var E=function(){rt=d.shift();var p=t.collection();rt.neighborhood().nodes().forEach(function(x){h.intersection(rt.edgesWith(x)).length>0&&p.merge(x)});for(var m=0;m<p.length;m++){var M=p[m];if(y=s.intersection(M.union(M.ancestors())),y!=null&&!T.has(y[0])){var w=y.union(y.descendants());w.forEach(function(x){d.push(x),T.add(x),O.merge(x),s.has(x)&&g.push(x)})}}};d.length!=0;)E();if(O.forEach(function(p){h.intersection(p.connectedEdges()).forEach(function(m){O.has(m.source())&&O.has(m.target())&&O.merge(m)})}),g.length==s.length&&(k=!0),!k||k&&S>1){A=g[0],I=A.connectedEdges().length,g.forEach(function(p){p.connectedEdges().length<I&&(I=p.connectedEdges().length,A=p)}),U.push(A.id());var v=t.collection();v.merge(g[0]),g.forEach(function(p){v.merge(p)}),g=[],s=s.difference(v),S++}};do $();while(!k);return c&&U.length>0&&c.set("dummy"+(c.size+1),U),Y},f.relocateComponent=function(t,h,s){if(!s.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var y=!0,A=!1,I=void 0;try{for(var k=h.nodeIndexes[Symbol.iterator](),S;!(y=(S=k.next()).done);y=!0){var U=S.value,Y=a(U,2),$=Y[0],O=Y[1],rt=s.cy.getElementById($);if(rt){var r=rt.boundingBox(),E=h.xCoords[O]-r.w/2,v=h.xCoords[O]+r.w/2,p=h.yCoords[O]-r.h/2,m=h.yCoords[O]+r.h/2;E<c&&(c=E),v>d&&(d=v),p<T&&(T=p),m>g&&(g=m)}}}catch(X){A=!0,I=X}finally{try{!y&&k.return&&k.return()}finally{if(A)throw I}}var M=t.x-(d+c)/2,w=t.y-(g+T)/2;h.xCoords=h.xCoords.map(function(X){return X+M}),h.yCoords=h.yCoords.map(function(X){return X+w})}else{Object.keys(h).forEach(function(X){var z=h[X],W=z.getRect().x,B=z.getRect().x+z.getRect().width,Q=z.getRect().y,G=z.getRect().y+z.getRect().height;W<c&&(c=W),B>d&&(d=B),Q<T&&(T=Q),G>g&&(g=G)});var x=t.x-(d+c)/2,F=t.y-(g+T)/2;Object.keys(h).forEach(function(X){var z=h[X];z.setCenter(z.getCenterX()+x,z.getCenterY()+F)})}}},f.calcBoundingBox=function(t,h,s,c){for(var d=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,y=Number.MIN_SAFE_INTEGER,A=void 0,I=void 0,k=void 0,S=void 0,U=t.descendants().not(":parent"),Y=U.length,$=0;$<Y;$++){var O=U[$];A=h[c.get(O.id())]-O.width()/2,I=h[c.get(O.id())]+O.width()/2,k=s[c.get(O.id())]-O.height()/2,S=s[c.get(O.id())]+O.height()/2,d>A&&(d=A),T<I&&(T=I),g>k&&(g=k),y<S&&(y=S)}var rt={};return rt.topLeftX=d,rt.topLeftY=g,rt.width=T-d,rt.height=y-g,rt},f.calcParentsWithoutChildren=function(t,h){var s=t.collection();return h.nodes(":parent").forEach(function(c){var d=!1;c.children().forEach(function(T){T.css("display")!="none"&&(d=!0)}),d||s.merge(c)}),s},o.exports=f},816:(o,i,e)=>{var a=e(548),n=e(140).CoSELayout,f=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,s=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,d=e(140).CoSEConstants,T=function(g,y){var A=g.cy,I=g.eles,k=I.nodes(),S=I.edges(),U=void 0,Y=void 0,$=void 0,O={};g.randomize&&(U=y.nodeIndexes,Y=y.xCoords,$=y.yCoords);var rt=function(x){return typeof x=="function"},r=function(x,F){return rt(x)?x(F):x},E=a.calcParentsWithoutChildren(A,I),v=function x(F,X,z,W){for(var B=X.length,Q=0;Q<B;Q++){var G=X[Q],D=null;G.intersection(E).length==0&&(D=G.children());var b=void 0,q=G.layoutDimensions({nodeDimensionsIncludeLabels:W.nodeDimensionsIncludeLabels});if(G.outerWidth()!=null&&G.outerHeight()!=null)if(W.randomize)if(!G.isParent())b=F.add(new f(z.graphManager,new t(Y[U.get(G.id())]-q.w/2,$[U.get(G.id())]-q.h/2),new h(parseFloat(q.w),parseFloat(q.h))));else{var et=a.calcBoundingBox(G,Y,$,U);G.intersection(E).length==0?b=F.add(new f(z.graphManager,new t(et.topLeftX,et.topLeftY),new h(et.width,et.height))):b=F.add(new f(z.graphManager,new t(et.topLeftX,et.topLeftY),new h(parseFloat(q.w),parseFloat(q.h))))}else b=F.add(new f(z.graphManager,new t(G.position("x")-q.w/2,G.position("y")-q.h/2),new h(parseFloat(q.w),parseFloat(q.h))));else b=F.add(new f(this.graphManager));if(b.id=G.data("id"),b.nodeRepulsion=r(W.nodeRepulsion,G),b.paddingLeft=parseInt(G.css("padding")),b.paddingTop=parseInt(G.css("padding")),b.paddingRight=parseInt(G.css("padding")),b.paddingBottom=parseInt(G.css("padding")),W.nodeDimensionsIncludeLabels&&(b.labelWidth=G.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,b.labelHeight=G.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,b.labelPosVertical=G.css("text-valign"),b.labelPosHorizontal=G.css("text-halign")),O[G.data("id")]=b,isNaN(b.rect.x)&&(b.rect.x=0),isNaN(b.rect.y)&&(b.rect.y=0),D!=null&&D.length>0){var vt=void 0;vt=z.getGraphManager().add(z.newGraph(),b),x(vt,D,z,W)}}},p=function(x,F,X){for(var z=0,W=0,B=0;B<X.length;B++){var Q=X[B],G=O[Q.data("source")],D=O[Q.data("target")];if(G&&D&&G!==D&&G.getEdgesBetween(D).length==0){var b=F.add(x.newEdge(),G,D);b.id=Q.id(),b.idealLength=r(g.idealEdgeLength,Q),b.edgeElasticity=r(g.edgeElasticity,Q),z+=b.idealLength,W++}}g.idealEdgeLength!=null&&(W>0?d.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=z/W:rt(g.idealEdgeLength)?d.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:d.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=g.idealEdgeLength,d.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,d.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},m=function(x,F){F.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=F.fixedNodeConstraint),F.alignmentConstraint&&(x.constraints.alignmentConstraint=F.alignmentConstraint),F.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=F.relativePlacementConstraint)};g.nestingFactor!=null&&(d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(d.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(d.MAX_ITERATIONS=c.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(d.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(d.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.tilingCompareBy!=null&&(d.TILING_COMPARE_BY=g.tilingCompareBy),g.quality=="proof"?s.QUALITY=2:s.QUALITY=0,d.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,d.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!g.randomize,d.ANIMATE=c.ANIMATE=s.ANIMATE=g.animate,d.TILE=g.tile,d.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,d.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal,d.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,d.PURE_INCREMENTAL=!g.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=g.uniformNodeDimensions,g.step=="transformed"&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!1),g.step=="enforced"&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!1),g.step=="cose"&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!0),g.step=="all"&&(g.randomize?d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!0),g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint?d.TREE_REDUCTION_ON_INCREMENTAL=!1:d.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new n,w=M.newGraphManager();return v(w.addRoot(),a.getTopMostNodes(k),M,g),p(M,w,S),m(M,g),M.runLayout(),O};o.exports={coseLayout:T}},212:(o,i,e)=>{var a=function(){function y(A,I){for(var k=0;k<I.length;k++){var S=I[k];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(A,S.key,S)}}return function(A,I,k){return I&&y(A.prototype,I),k&&y(A,k),A}}();function n(y,A){if(!(y instanceof A))throw new TypeError("Cannot call a class as a function")}var f=e(658),t=e(548),h=e(657),s=h.spectralLayout,c=e(816),d=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(y){return 4500},idealEdgeLength:function(y){return 50},edgeElasticity:function(y){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=function(){function y(A){n(this,y),this.options=f({},T,A)}return a(y,[{key:"run",value:function(){var A=this,I=this.options,k=I.cy,S=I.eles,U=[],Y=[],$=void 0,O=[];I.fixedNodeConstraint&&(!Array.isArray(I.fixedNodeConstraint)||I.fixedNodeConstraint.length==0)&&(I.fixedNodeConstraint=void 0),I.alignmentConstraint&&(I.alignmentConstraint.vertical&&(!Array.isArray(I.alignmentConstraint.vertical)||I.alignmentConstraint.vertical.length==0)&&(I.alignmentConstraint.vertical=void 0),I.alignmentConstraint.horizontal&&(!Array.isArray(I.alignmentConstraint.horizontal)||I.alignmentConstraint.horizontal.length==0)&&(I.alignmentConstraint.horizontal=void 0)),I.relativePlacementConstraint&&(!Array.isArray(I.relativePlacementConstraint)||I.relativePlacementConstraint.length==0)&&(I.relativePlacementConstraint=void 0);var rt=I.fixedNodeConstraint||I.alignmentConstraint||I.relativePlacementConstraint;rt&&(I.tile=!1,I.packComponents=!1);var r=void 0,E=!1;if(k.layoutUtilities&&I.packComponents&&(r=k.layoutUtilities("get"),r||(r=k.layoutUtilities()),E=!0),S.nodes().length>0)if(E){var v=t.getTopMostNodes(I.eles.nodes());if($=t.connectComponents(k,I.eles,v),$.forEach(function(J){var nt=J.boundingBox();O.push({x:nt.x1+nt.w/2,y:nt.y1+nt.h/2})}),I.randomize&&$.forEach(function(J){I.eles=J,U.push(s(I))}),I.quality=="default"||I.quality=="proof"){var p=k.collection();if(I.tile){var m=new Map,M=[],w=[],x=0,F={nodeIndexes:m,xCoords:M,yCoords:w},X=[];if($.forEach(function(J,nt){J.edges().length==0&&(J.nodes().forEach(function(mt,st){p.merge(J.nodes()[st]),mt.isParent()||(F.nodeIndexes.set(J.nodes()[st].id(),x++),F.xCoords.push(J.nodes()[0].position().x),F.yCoords.push(J.nodes()[0].position().y))}),X.push(nt))}),p.length>1){var z=p.boundingBox();O.push({x:z.x1+z.w/2,y:z.y1+z.h/2}),$.push(p),U.push(F);for(var W=X.length-1;W>=0;W--)$.splice(X[W],1),U.splice(X[W],1),O.splice(X[W],1)}}$.forEach(function(J,nt){I.eles=J,Y.push(d(I,U[nt])),t.relocateComponent(O[nt],Y[nt],I)})}else $.forEach(function(J,nt){t.relocateComponent(O[nt],U[nt],I)});var B=new Set;if($.length>1){var Q=[],G=S.filter(function(J){return J.css("display")=="none"});$.forEach(function(J,nt){var mt=void 0;if(I.quality=="draft"&&(mt=U[nt].nodeIndexes),J.nodes().not(G).length>0){var st={};st.edges=[],st.nodes=[];var Lt=void 0;J.nodes().not(G).forEach(function(_t){if(I.quality=="draft")if(!_t.isParent())Lt=mt.get(_t.id()),st.nodes.push({x:U[nt].xCoords[Lt]-_t.boundingbox().w/2,y:U[nt].yCoords[Lt]-_t.boundingbox().h/2,width:_t.boundingbox().w,height:_t.boundingbox().h});else{var Nt=t.calcBoundingBox(_t,U[nt].xCoords,U[nt].yCoords,mt);st.nodes.push({x:Nt.topLeftX,y:Nt.topLeftY,width:Nt.width,height:Nt.height})}else Y[nt][_t.id()]&&st.nodes.push({x:Y[nt][_t.id()].getLeft(),y:Y[nt][_t.id()].getTop(),width:Y[nt][_t.id()].getWidth(),height:Y[nt][_t.id()].getHeight()})}),J.edges().forEach(function(_t){var Nt=_t.source(),At=_t.target();if(Nt.css("display")!="none"&&At.css("display")!="none")if(I.quality=="draft"){var Ht=mt.get(Nt.id()),Rt=mt.get(At.id()),bt=[],Gt=[];if(Nt.isParent()){var Bt=t.calcBoundingBox(Nt,U[nt].xCoords,U[nt].yCoords,mt);bt.push(Bt.topLeftX+Bt.width/2),bt.push(Bt.topLeftY+Bt.height/2)}else bt.push(U[nt].xCoords[Ht]),bt.push(U[nt].yCoords[Ht]);if(At.isParent()){var Pt=t.calcBoundingBox(At,U[nt].xCoords,U[nt].yCoords,mt);Gt.push(Pt.topLeftX+Pt.width/2),Gt.push(Pt.topLeftY+Pt.height/2)}else Gt.push(U[nt].xCoords[Rt]),Gt.push(U[nt].yCoords[Rt]);st.edges.push({startX:bt[0],startY:bt[1],endX:Gt[0],endY:Gt[1]})}else Y[nt][Nt.id()]&&Y[nt][At.id()]&&st.edges.push({startX:Y[nt][Nt.id()].getCenterX(),startY:Y[nt][Nt.id()].getCenterY(),endX:Y[nt][At.id()].getCenterX(),endY:Y[nt][At.id()].getCenterY()})}),st.nodes.length>0&&(Q.push(st),B.add(nt))}});var D=r.packComponents(Q,I.randomize).shifts;if(I.quality=="draft")U.forEach(function(J,nt){var mt=J.xCoords.map(function(Lt){return Lt+D[nt].dx}),st=J.yCoords.map(function(Lt){return Lt+D[nt].dy});J.xCoords=mt,J.yCoords=st});else{var b=0;B.forEach(function(J){Object.keys(Y[J]).forEach(function(nt){var mt=Y[J][nt];mt.setCenter(mt.getCenterX()+D[b].dx,mt.getCenterY()+D[b].dy)}),b++})}}}else{var q=I.eles.boundingBox();if(O.push({x:q.x1+q.w/2,y:q.y1+q.h/2}),I.randomize){var et=s(I);U.push(et)}I.quality=="default"||I.quality=="proof"?(Y.push(d(I,U[0])),t.relocateComponent(O[0],Y[0],I)):t.relocateComponent(O[0],U[0],I)}var vt=function(J,nt){if(I.quality=="default"||I.quality=="proof"){typeof J=="number"&&(J=nt);var mt=void 0,st=void 0,Lt=J.data("id");return Y.forEach(function(Nt){Lt in Nt&&(mt={x:Nt[Lt].getRect().getCenterX(),y:Nt[Lt].getRect().getCenterY()},st=Nt[Lt])}),I.nodeDimensionsIncludeLabels&&(st.labelWidth&&(st.labelPosHorizontal=="left"?mt.x+=st.labelWidth/2:st.labelPosHorizontal=="right"&&(mt.x-=st.labelWidth/2)),st.labelHeight&&(st.labelPosVertical=="top"?mt.y+=st.labelHeight/2:st.labelPosVertical=="bottom"&&(mt.y-=st.labelHeight/2))),mt==null&&(mt={x:J.position("x"),y:J.position("y")}),{x:mt.x,y:mt.y}}else{var _t=void 0;return U.forEach(function(Nt){var At=Nt.nodeIndexes.get(J.id());At!=null&&(_t={x:Nt.xCoords[At],y:Nt.yCoords[At]})}),_t==null&&(_t={x:J.position("x"),y:J.position("y")}),{x:_t.x,y:_t.y}}};if(I.quality=="default"||I.quality=="proof"||I.randomize){var j=t.calcParentsWithoutChildren(k,S),xt=S.filter(function(J){return J.css("display")=="none"});I.eles=S.not(xt),S.nodes().not(":parent").not(xt).layoutPositions(A,I,vt),j.length>0&&j.forEach(function(J){J.position(vt(J))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),y}();o.exports=g},657:(o,i,e)=>{var a=e(548),n=e(140).layoutBase.Matrix,f=e(140).layoutBase.SVD,t=function(h){var s=h.cy,c=h.eles,d=c.nodes(),T=c.nodes(":parent"),g=new Map,y=new Map,A=new Map,I=[],k=[],S=[],U=[],Y=[],$=[],O=[],rt=[],r=void 0,E=1e8,v=1e-9,p=h.piTol,m=h.samplingType,M=h.nodeSeparation,w=void 0,x=function(){for(var dt=0,_=0,R=!1;_<w;){dt=Math.floor(Math.random()*r),R=!1;for(var V=0;V<_;V++)if(U[V]==dt){R=!0;break}if(!R)U[_]=dt,_++;else continue}},F=function(dt,_,R){for(var V=[],Z=0,K=0,ft=0,ht=void 0,tt=[],ct=0,it=1,Et=0;Et<r;Et++)tt[Et]=E;for(V[K]=dt,tt[dt]=0;K>=Z;){ft=V[Z++];for(var yt=I[ft],Ot=0;Ot<yt.length;Ot++)ht=y.get(yt[Ot]),tt[ht]==E&&(tt[ht]=tt[ft]+1,V[++K]=ht);$[ft][_]=tt[ft]*M}if(R){for(var lt=0;lt<r;lt++)$[lt][_]<Y[lt]&&(Y[lt]=$[lt][_]);for(var ot=0;ot<r;ot++)Y[ot]>ct&&(ct=Y[ot],it=ot)}return it},X=function(dt){var _=void 0;if(dt){_=Math.floor(Math.random()*r);for(var R=0;R<r;R++)Y[R]=E;for(var V=0;V<w;V++)U[V]=_,_=F(_,V,dt)}else{x();for(var Z=0;Z<w;Z++)F(U[Z],Z,dt)}for(var K=0;K<r;K++)for(var ft=0;ft<w;ft++)$[K][ft]*=$[K][ft];for(var ht=0;ht<w;ht++)O[ht]=[];for(var tt=0;tt<w;tt++)for(var ct=0;ct<w;ct++)O[tt][ct]=$[U[ct]][tt]},z=function(){for(var dt=f.svd(O),_=dt.S,R=dt.U,V=dt.V,Z=_[0]*_[0]*_[0],K=[],ft=0;ft<w;ft++){K[ft]=[];for(var ht=0;ht<w;ht++)K[ft][ht]=0,ft==ht&&(K[ft][ht]=_[ft]/(_[ft]*_[ft]+Z/(_[ft]*_[ft])))}rt=n.multMat(n.multMat(V,K),n.transpose(R))},W=function(){for(var dt=void 0,_=void 0,R=[],V=[],Z=[],K=[],ft=0;ft<r;ft++)R[ft]=Math.random(),V[ft]=Math.random();R=n.normalize(R),V=n.normalize(V);for(var ht=v,tt=v,ct=void 0;;){for(var it=0;it<r;it++)Z[it]=R[it];if(R=n.multGamma(n.multL(n.multGamma(Z),$,rt)),dt=n.dotProduct(Z,R),R=n.normalize(R),ht=n.dotProduct(Z,R),ct=Math.abs(ht/tt),ct<=1+p&&ct>=1)break;tt=ht}for(var Et=0;Et<r;Et++)Z[Et]=R[Et];for(tt=v;;){for(var yt=0;yt<r;yt++)K[yt]=V[yt];if(K=n.minusOp(K,n.multCons(Z,n.dotProduct(Z,K))),V=n.multGamma(n.multL(n.multGamma(K),$,rt)),_=n.dotProduct(K,V),V=n.normalize(V),ht=n.dotProduct(K,V),ct=Math.abs(ht/tt),ct<=1+p&&ct>=1)break;tt=ht}for(var Ot=0;Ot<r;Ot++)K[Ot]=V[Ot];k=n.multCons(Z,Math.sqrt(Math.abs(dt))),S=n.multCons(K,Math.sqrt(Math.abs(_)))};a.connectComponents(s,c,a.getTopMostNodes(d),g),T.forEach(function(dt){a.connectComponents(s,c,a.getTopMostNodes(dt.descendants().intersection(c)),g)});for(var B=0,Q=0;Q<d.length;Q++)d[Q].isParent()||y.set(d[Q].id(),B++);var G=!0,D=!1,b=void 0;try{for(var q=g.keys()[Symbol.iterator](),et;!(G=(et=q.next()).done);G=!0){var vt=et.value;y.set(vt,B++)}}catch(dt){D=!0,b=dt}finally{try{!G&&q.return&&q.return()}finally{if(D)throw b}}for(var j=0;j<y.size;j++)I[j]=[];T.forEach(function(dt){for(var _=dt.children().intersection(c);_.nodes(":childless").length==0;)_=_.nodes()[0].children().intersection(c);var R=0,V=_.nodes(":childless")[0].connectedEdges().length;_.nodes(":childless").forEach(function(Z,K){Z.connectedEdges().length<V&&(V=Z.connectedEdges().length,R=K)}),A.set(dt.id(),_.nodes(":childless")[R].id())}),d.forEach(function(dt){var _=void 0;dt.isParent()?_=y.get(A.get(dt.id())):_=y.get(dt.id()),dt.neighborhood().nodes().forEach(function(R){c.intersection(dt.edgesWith(R)).length>0&&(R.isParent()?I[_].push(A.get(R.id())):I[_].push(R.id()))})});var xt=function(dt){var _=y.get(dt),R=void 0;g.get(dt).forEach(function(V){s.getElementById(V).isParent()?R=A.get(V):R=V,I[_].push(R),I[y.get(R)].push(dt)})},J=!0,nt=!1,mt=void 0;try{for(var st=g.keys()[Symbol.iterator](),Lt;!(J=(Lt=st.next()).done);J=!0){var _t=Lt.value;xt(_t)}}catch(dt){nt=!0,mt=dt}finally{try{!J&&st.return&&st.return()}finally{if(nt)throw mt}}r=y.size;var Nt=void 0;if(r>2){w=r<h.sampleSize?r:h.sampleSize;for(var At=0;At<r;At++)$[At]=[];for(var Ht=0;Ht<w;Ht++)rt[Ht]=[];return h.quality=="draft"||h.step=="all"?(X(m),z(),W(),Nt={nodeIndexes:y,xCoords:k,yCoords:S}):(y.forEach(function(dt,_){k.push(s.getElementById(_).position("x")),S.push(s.getElementById(_).position("y"))}),Nt={nodeIndexes:y,xCoords:k,yCoords:S}),Nt}else{var Rt=y.keys(),bt=s.getElementById(Rt.next().value),Gt=bt.position(),Bt=bt.outerWidth();if(k.push(Gt.x),S.push(Gt.y),r==2){var Pt=s.getElementById(Rt.next().value),zt=Pt.outerWidth();k.push(Gt.x+Bt/2+zt/2+h.idealEdgeLength),S.push(Gt.y)}return Nt={nodeIndexes:y,xCoords:k,yCoords:S},Nt}};o.exports={spectralLayout:t}},579:(o,i,e)=>{var a=e(212),n=function(f){f&&f("layout","fcose",a)};typeof cytoscape<"u"&&n(cytoscape),o.exports=n},140:o=>{o.exports=L}},N={};function u(o){var i=N[o];if(i!==void 0)return i.exports;var e=N[o]={exports:{}};return P[o](e,e.exports,u),e.exports}var l=u(579);return l})()})}(ge)),ge.exports}var mi=vi();const yi=hi(mi);var Oe={L:"left",R:"right",T:"top",B:"bottom"},xe={L:pt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:pt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:pt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:pt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},ne={L:pt((C,H)=>C-H+2,"L"),R:pt((C,H)=>C-2,"R"),T:pt((C,H)=>C-H+2,"T"),B:pt((C,H)=>C-2,"B")},Ei=pt(function(C){return Xt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Me=pt(function(C){const H=C;return H==="L"||H==="R"||H==="T"||H==="B"},"isArchitectureDirection"),Xt=pt(function(C){const H=C;return H==="L"||H==="R"},"isArchitectureDirectionX"),Vt=pt(function(C){const H=C;return H==="T"||H==="B"},"isArchitectureDirectionY"),ye=pt(function(C,H){const L=Xt(C)&&Vt(H),P=Vt(C)&&Xt(H);return L||P},"isArchitectureDirectionXY"),Ni=pt(function(C){const H=C[0],L=C[1],P=Xt(H)&&Vt(L),N=Vt(H)&&Xt(L);return P||N},"isArchitecturePairXY"),Ti=pt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=pt(function(C,H){const L=`${C}${H}`;return Ti(L)?L:void 0},"getArchitectureDirectionPair"),Ai=pt(function([C,H],L){const P=L[0],N=L[1];return Xt(P)?Vt(N)?[C+(P==="L"?-1:1),H+(N==="T"?1:-1)]:[C+(P==="L"?-1:1),H]:Xt(N)?[C+(N==="L"?1:-1),H+(P==="T"?1:-1)]:[C,H+(P==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ci=pt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ii=pt(function(C,H){return ye(C,H)?"bend":Xt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Li=pt(function(C){return C.type==="service"},"isArchitectureService"),_i=pt(function(C){return C.type==="junction"},"isArchitectureJunction"),be=pt(C=>C.data(),"edgeData"),te=pt(C=>C.data(),"nodeData"),wi=ii.architecture,de,Pe=(de=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=je,this.getAccTitle=$e,this.setDiagramTitle=qe,this.getDiagramTitle=Qe,this.getAccDescription=Ke,this.setAccDescription=Ze,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},Je()}addService({id:C,icon:H,in:L,title:P,iconText:N}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(L!==void 0){if(C===L)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[L]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[L]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:H,iconText:N,title:P,edges:[],in:L}}getServices(){return Object.values(this.nodes).filter(Li)}addJunction({id:C,in:H}){this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:H}}getJunctions(){return Object.values(this.nodes).filter(_i)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:H,in:L,title:P}){var N,u,l;if(((N=this.registeredIds)==null?void 0:N[C])!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(L!==void 0){if(C===L)throw new Error(`The group [${C}] cannot be placed within itself`);if(((u=this.registeredIds)==null?void 0:u[L])===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(((l=this.registeredIds)==null?void 0:l[L])==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:H,title:P,in:L}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:H,lhsDir:L,rhsDir:P,lhsInto:N,rhsInto:u,lhsGroup:l,rhsGroup:o,title:i}){if(!Me(L))throw new Error(`Invalid direction given for left hand side of edge ${C}--${H}. Expected (L,R,T,B) got ${String(L)}`);if(!Me(P))throw new Error(`Invalid direction given for right hand side of edge ${C}--${H}. Expected (L,R,T,B) got ${String(P)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[H]===void 0&&this.groups[H]===void 0)throw new Error(`The right-hand id [${H}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=this.nodes[C].in,a=this.nodes[H].in;if(l&&e&&a&&e==a)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&e&&a&&e==a)throw new Error(`The right-hand id [${H}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const n={lhsId:C,lhsDir:L,lhsInto:N,lhsGroup:l,rhsId:H,rhsDir:P,rhsInto:u,rhsGroup:o,title:i};this.edges.push(n),this.nodes[C]&&this.nodes[H]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[H].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},H=Object.entries(this.nodes).reduce((o,[i,e])=>(o[i]=e.edges.reduce((a,n)=>{var f,t;const h=(f=this.getNode(n.lhsId))==null?void 0:f.in,s=(t=this.getNode(n.rhsId))==null?void 0:t.in;if(h&&s&&h!==s){const c=Ii(n.lhsDir,n.rhsDir);c!=="bend"&&(C[h]??(C[h]={}),C[h][s]=c,C[s]??(C[s]={}),C[s][h]=c)}if(n.lhsId===i){const c=pe(n.lhsDir,n.rhsDir);c&&(a[c]=n.rhsId)}else{const c=pe(n.rhsDir,n.lhsDir);c&&(a[c]=n.lhsId)}return a},{}),o),{}),L=Object.keys(H)[0],P={[L]:1},N=Object.keys(H).reduce((o,i)=>i===L?o:{...o,[i]:1},{}),u=pt(o=>{const i={[o]:[0,0]},e=[o];for(;e.length>0;){const a=e.shift();if(a){P[a]=1,delete N[a];const n=H[a],[f,t]=i[a];Object.entries(n).forEach(([h,s])=>{P[s]||(i[s]=Ai([f,t],h),e.push(s))})}}return i},"BFS"),l=[u(L)];for(;Object.keys(N).length>0;)l.push(u(Object.keys(N)[0]));this.dataStructures={adjList:H,spatialMaps:l,groupAlignments:C}}return this.dataStructures}setElementForId(C,H){this.elements[C]=H}getElementById(C){return this.elements[C]}getConfig(){return ti({...wi,...ei().architecture})}getConfigField(C){return this.getConfig()[C]}},pt(de,"ArchitectureDB"),de),Oi=pt((C,H)=>{li(C,H),C.groups.map(L=>H.addGroup(L)),C.services.map(L=>H.addService({...L,type:"service"})),C.junctions.map(L=>H.addJunction({...L,type:"junction"})),C.edges.map(L=>H.addEdge(L))},"populateDb"),Ge={parser:{yy:void 0},parse:pt(async C=>{var H;const L=await di("architecture",C);De.debug(L);const P=(H=Ge.parser)==null?void 0:H.yy;if(!(P instanceof Pe))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.");Oi(L,P)},"parse")},xi=pt(C=>`
|
|
1
|
+
import{R as pt,am as ze,aT as Ve,O as De,s as je,l as $e,o as qe,r as Qe,u as Ke,f as Ze,w as Je,H as ti,J as ei,L as ii,g as ve,bc as me,bl as ce,A as ri,e as ni,F as oi,bm as ai,bn as si,D as hi}from"./index-p0knuDQ9.js";import{m as li}from"./chunk-4BX2VUAB-BeuiUsbc-DN2rdYji.js";import{N as di}from"./treemap-KMMF4GRG-C4GHjB3F-_nPgBK22.js";import{e as Re}from"./cytoscape.esm-CjI2IsL8-Da6dFVsf.js";import"./_baseUniq-Cd4llU-Q-Cdw60MU4.js";import"./_basePickBy-1MakYQmz-ydNwd1l_.js";import"./clone-DH1Kq5Y6-DxQT_fR1.js";var ge={exports:{}},ue={exports:{}},fe={exports:{}},ci=fe.exports,Le;function gi(){return Le||(Le=1,function(C,H){(function(L,P){C.exports=P()})(ci,function(){return function(L){var P={};function N(u){if(P[u])return P[u].exports;var l=P[u]={i:u,l:!1,exports:{}};return L[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=L,N.c=P,N.i=function(u){return u},N.d=function(u,l,o){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:o})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)}([function(L,P,N){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,L.exports=u},function(L,P,N){var u=N(2),l=N(8),o=N(9);function i(a,n,f){u.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=a,this.target=n}i.prototype=Object.create(u.prototype);for(var e in u)i[e]=u[e];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(a){if(this.source===a)return this.target;if(this.target===a)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(a,n){for(var f=this.getOtherEnd(a),t=n.getGraphManager().getRoot();;){if(f.getOwner()==n)return f;if(f.getOwner()==t)break;f=f.getOwner().getParent()}return null},i.prototype.updateLength=function(){var a=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),a),this.isOverlapingSourceAndTarget||(this.lengthX=a[0]-a[2],this.lengthY=a[1]-a[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=i},function(L,P,N){function u(l){this.vGraphObject=l}L.exports=u},function(L,P,N){var u=N(2),l=N(10),o=N(13),i=N(0),e=N(16),a=N(5);function n(t,h,s,c){s==null&&c==null&&(c=h),u.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,s!=null&&h!=null?this.rect=new o(h.x,h.y,s.width,s.height):this.rect=new o}n.prototype=Object.create(u.prototype);for(var f in u)n[f]=u[f];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(t){this.rect.width=t},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(t){this.rect.height=t},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new a(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new a(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(t,h){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(t,h){this.rect.x=t-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(t,h){this.rect.x=t,this.rect.y=h},n.prototype.moveBy=function(t,h){this.rect.x+=t,this.rect.y+=h},n.prototype.getEdgeListToNode=function(t){var h=[],s=this;return s.edges.forEach(function(c){if(c.target==t){if(c.source!=s)throw"Incorrect edge source!";h.push(c)}}),h},n.prototype.getEdgesBetween=function(t){var h=[],s=this;return s.edges.forEach(function(c){if(!(c.source==s||c.target==s))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&h.push(c)}),h},n.prototype.getNeighborsList=function(){var t=new Set,h=this;return h.edges.forEach(function(s){if(s.source==h)t.add(s.target);else{if(s.target!=h)throw"Incorrect incidency!";t.add(s.source)}}),t},n.prototype.withChildren=function(){var t=new Set,h,s;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),d=0;d<c.length;d++)h=c[d],s=h.withChildren(),s.forEach(function(T){t.add(T)});return t},n.prototype.getNoOfChildren=function(){var t=0,h;if(this.child==null)t=1;else for(var s=this.child.getNodes(),c=0;c<s.length;c++)h=s[c],t+=h.getNoOfChildren();return t==0&&(t=1),t},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.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)},n.prototype.scatter=function(){var t,h,s=-i.INITIAL_WORLD_BOUNDARY,c=i.INITIAL_WORLD_BOUNDARY;t=i.WORLD_CENTER_X+e.nextDouble()*(c-s)+s;var d=-i.INITIAL_WORLD_BOUNDARY,T=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+e.nextDouble()*(T-d)+d,this.rect.x=t,this.rect.y=h},n.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()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=t.getRight()-t.getLeft(),s=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(h+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>h?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(s+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>s?(this.rect.y-=(this.labelHeight-s)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(s+this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(t){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var s=this.rect.y;s>i.WORLD_BOUNDARY?s=i.WORLD_BOUNDARY:s<-i.WORLD_BOUNDARY&&(s=-i.WORLD_BOUNDARY);var c=new a(h,s),d=t.inverseTransformPoint(c);this.setLocation(d.x,d.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},L.exports=n},function(L,P,N){var u=N(0);function l(){}for(var o in u)l[o]=u[o];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,L.exports=l},function(L,P,N){function u(l,o){l==null&&o==null?(this.x=0,this.y=0):(this.x=l,this.y=o)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},L.exports=u},function(L,P,N){var u=N(2),l=N(10),o=N(0),i=N(7),e=N(3),a=N(1),n=N(13),f=N(12),t=N(11);function h(c,d,T){u.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,d!=null&&d instanceof i?this.graphManager=d:d!=null&&d instanceof Layout&&(this.graphManager=d.graphManager)}h.prototype=Object.create(u.prototype);for(var s in u)h[s]=u[s];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,d,T){if(d==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var y=c;if(!(this.getNodes().indexOf(d)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(d.owner==T.owner&&d.owner==this))throw"Both owners must be this graph!";return d.owner!=T.owner?null:(y.source=d,y.target=T,y.isInterGraph=!1,this.getEdges().push(y),d.edges.push(y),T!=d&&T.edges.push(y),y)}},h.prototype.remove=function(c){var d=c;if(c instanceof e){if(d==null)throw"Node is null!";if(!(d.owner!=null&&d.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=d.edges.slice(),g,y=T.length,A=0;A<y;A++)g=T[A],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var I=this.nodes.indexOf(d);if(I==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(c instanceof a){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var k=g.source.edges.indexOf(g),S=g.target.edges.indexOf(g);if(!(k>-1&&S>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(k,1),g.target!=g.source&&g.target.edges.splice(S,1);var I=g.source.owner.getEdges().indexOf(g);if(I==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(I,1)}},h.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,d=l.MAX_VALUE,T,g,y,A=this.getNodes(),I=A.length,k=0;k<I;k++){var S=A[k];T=S.getTop(),g=S.getLeft(),c>T&&(c=T),d>g&&(d=g)}return c==l.MAX_VALUE?null:(A[0].getParent().paddingLeft!=null?y=A[0].getParent().paddingLeft:y=this.margin,this.left=d-y,this.top=c-y,new f(this.left,this.top))},h.prototype.updateBounds=function(c){for(var d=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,y=-l.MAX_VALUE,A,I,k,S,U,Y=this.nodes,$=Y.length,O=0;O<$;O++){var rt=Y[O];c&&rt.child!=null&&rt.updateBounds(),A=rt.getLeft(),I=rt.getRight(),k=rt.getTop(),S=rt.getBottom(),d>A&&(d=A),T<I&&(T=I),g>k&&(g=k),y<S&&(y=S)}var r=new n(d,g,T-d,y-g);d==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?U=Y[0].getParent().paddingLeft:U=this.margin,this.left=r.x-U,this.right=r.x+r.width+U,this.top=r.y-U,this.bottom=r.y+r.height+U},h.calculateBounds=function(c){for(var d=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,y=-l.MAX_VALUE,A,I,k,S,U=c.length,Y=0;Y<U;Y++){var $=c[Y];A=$.getLeft(),I=$.getRight(),k=$.getTop(),S=$.getBottom(),d>A&&(d=A),T<I&&(T=I),g>k&&(g=k),y<S&&(y=S)}var O=new n(d,g,T-d,y-g);return O},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var c=0,d=this.nodes,T=d.length,g=0;g<T;g++){var y=d[g];c+=y.calcEstimatedSize()}return c==0?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var d=new t,T=new Set,g=this.nodes[0],y,A,I=g.withChildren();for(I.forEach(function(O){d.push(O),T.add(O)});d.length!==0;){g=d.shift(),y=g.getEdges();for(var k=y.length,S=0;S<k;S++){var U=y[S];if(A=U.getOtherEndInGraph(g,this),A!=null&&!T.has(A)){var Y=A.withChildren();Y.forEach(function(O){d.push(O),T.add(O)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var $=0;T.forEach(function(O){O.owner==c&&$++}),$==this.nodes.length&&(this.isConnected=!0)}},L.exports=h},function(L,P,N){var u,l=N(1);function o(i){u=N(6),this.layout=i,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var i=this.layout.newGraph(),e=this.layout.newNode(null),a=this.add(i,e);return this.setRootGraph(a),this.rootGraph},o.prototype.add=function(i,e,a,n,f){if(a==null&&n==null&&f==null){if(i==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return i.parent=e,e.child=i,i}else{f=a,n=e,a=i;var t=n.getOwner(),h=f.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return a.isInterGraph=!1,t.add(a,n,f);if(a.isInterGraph=!0,a.source=n,a.target=f,this.edges.indexOf(a)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(a),!(a.source!=null&&a.target!=null))throw"Edge source and/or target is null!";if(!(a.source.edges.indexOf(a)==-1&&a.target.edges.indexOf(a)==-1))throw"Edge already in source and/or target incidency list!";return a.source.edges.push(a),a.target.edges.push(a),a}},o.prototype.remove=function(i){if(i instanceof u){var e=i;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var a=[];a=a.concat(e.getEdges());for(var n,f=a.length,t=0;t<f;t++)n=a[t],e.remove(n);var h=[];h=h.concat(e.getNodes());var s;f=h.length;for(var t=0;t<f;t++)s=h[t],e.remove(s);e==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(e);this.graphs.splice(c,1),e.parent=null}else if(i instanceof l){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var c=n.source.edges.indexOf(n);if(n.source.edges.splice(c,1),c=n.target.edges.indexOf(n),n.target.edges.splice(c,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var c=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(c,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],e=this.getGraphs(),a=e.length,n=0;n<a;n++)i=i.concat(e[n].getNodes());this.allNodes=i}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],e=this.getGraphs();e.length;for(var a=0;a<e.length;a++)i=i.concat(e[a].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(i,e){if(!(i!=null&&e!=null))throw"assert failed";if(i==e)return!0;var a=i.getOwner(),n;do{if(n=a.getParent(),n==null)break;if(n==e)return!0;if(a=n.getOwner(),a==null)break}while(!0);a=e.getOwner();do{if(n=a.getParent(),n==null)break;if(n==i)return!0;if(a=n.getOwner(),a==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){for(var i,e,a,n,f,t=this.getAllEdges(),h=t.length,s=0;s<h;s++){if(i=t[s],e=i.source,a=i.target,i.lca=null,i.sourceInLca=e,i.targetInLca=a,e==a){i.lca=e.getOwner();continue}for(n=e.getOwner();i.lca==null;){for(i.targetInLca=a,f=a.getOwner();i.lca==null;){if(f==n){i.lca=f;break}if(f==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=f.getParent(),f=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(i,e){if(i==e)return i.getOwner();var a=i.getOwner();do{if(a==null)break;var n=e.getOwner();do{if(n==null)break;if(n==a)return n;n=n.getParent().getOwner()}while(!0);a=a.getParent().getOwner()}while(!0);return a},o.prototype.calcInclusionTreeDepths=function(i,e){i==null&&e==null&&(i=this.rootGraph,e=1);for(var a,n=i.getNodes(),f=n.length,t=0;t<f;t++)a=n[t],a.inclusionTreeDepth=e,a.child!=null&&this.calcInclusionTreeDepths(a.child,e+1)},o.prototype.includesInvalidEdge=function(){for(var i,e=[],a=this.edges.length,n=0;n<a;n++)i=this.edges[n],this.isOneAncestorOfOther(i.source,i.target)&&e.push(i);for(var n=0;n<e.length;n++)this.remove(e[n]);return!1},L.exports=o},function(L,P,N){var u=N(12);function l(){}l.calcSeparationAmount=function(o,i,e,a){if(!o.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(o,i,n),e[0]=Math.min(o.getRight(),i.getRight())-Math.max(o.x,i.x),e[1]=Math.min(o.getBottom(),i.getBottom())-Math.max(o.y,i.y),o.getX()<=i.getX()&&o.getRight()>=i.getRight()?e[0]+=Math.min(i.getX()-o.getX(),o.getRight()-i.getRight()):i.getX()<=o.getX()&&i.getRight()>=o.getRight()&&(e[0]+=Math.min(o.getX()-i.getX(),i.getRight()-o.getRight())),o.getY()<=i.getY()&&o.getBottom()>=i.getBottom()?e[1]+=Math.min(i.getY()-o.getY(),o.getBottom()-i.getBottom()):i.getY()<=o.getY()&&i.getBottom()>=o.getBottom()&&(e[1]+=Math.min(o.getY()-i.getY(),i.getBottom()-o.getBottom()));var f=Math.abs((i.getCenterY()-o.getCenterY())/(i.getCenterX()-o.getCenterX()));i.getCenterY()===o.getCenterY()&&i.getCenterX()===o.getCenterX()&&(f=1);var t=f*e[0],h=e[1]/f;e[0]<h?h=e[0]:t=e[1],e[0]=-1*n[0]*(h/2+a),e[1]=-1*n[1]*(t/2+a)},l.decideDirectionsForOverlappingNodes=function(o,i,e){o.getCenterX()<i.getCenterX()?e[0]=-1:e[0]=1,o.getCenterY()<i.getCenterY()?e[1]=-1:e[1]=1},l.getIntersection2=function(o,i,e){var a=o.getCenterX(),n=o.getCenterY(),f=i.getCenterX(),t=i.getCenterY();if(o.intersects(i))return e[0]=a,e[1]=n,e[2]=f,e[3]=t,!0;var h=o.getX(),s=o.getY(),c=o.getRight(),d=o.getX(),T=o.getBottom(),g=o.getRight(),y=o.getWidthHalf(),A=o.getHeightHalf(),I=i.getX(),k=i.getY(),S=i.getRight(),U=i.getX(),Y=i.getBottom(),$=i.getRight(),O=i.getWidthHalf(),rt=i.getHeightHalf(),r=!1,E=!1;if(a===f){if(n>t)return e[0]=a,e[1]=s,e[2]=f,e[3]=Y,!1;if(n<t)return e[0]=a,e[1]=T,e[2]=f,e[3]=k,!1}else if(n===t){if(a>f)return e[0]=h,e[1]=n,e[2]=S,e[3]=t,!1;if(a<f)return e[0]=c,e[1]=n,e[2]=I,e[3]=t,!1}else{var v=o.height/o.width,p=i.height/i.width,m=(t-n)/(f-a),M=void 0,w=void 0,x=void 0,F=void 0,X=void 0,z=void 0;if(-v===m?a>f?(e[0]=d,e[1]=T,r=!0):(e[0]=c,e[1]=s,r=!0):v===m&&(a>f?(e[0]=h,e[1]=s,r=!0):(e[0]=g,e[1]=T,r=!0)),-p===m?f>a?(e[2]=U,e[3]=Y,E=!0):(e[2]=S,e[3]=k,E=!0):p===m&&(f>a?(e[2]=I,e[3]=k,E=!0):(e[2]=$,e[3]=Y,E=!0)),r&&E)return!1;if(a>f?n>t?(M=this.getCardinalDirection(v,m,4),w=this.getCardinalDirection(p,m,2)):(M=this.getCardinalDirection(-v,m,3),w=this.getCardinalDirection(-p,m,1)):n>t?(M=this.getCardinalDirection(-v,m,1),w=this.getCardinalDirection(-p,m,3)):(M=this.getCardinalDirection(v,m,2),w=this.getCardinalDirection(p,m,4)),!r)switch(M){case 1:F=s,x=a+-A/m,e[0]=x,e[1]=F;break;case 2:x=g,F=n+y*m,e[0]=x,e[1]=F;break;case 3:F=T,x=a+A/m,e[0]=x,e[1]=F;break;case 4:x=d,F=n+-y*m,e[0]=x,e[1]=F;break}if(!E)switch(w){case 1:z=k,X=f+-rt/m,e[2]=X,e[3]=z;break;case 2:X=$,z=t+O*m,e[2]=X,e[3]=z;break;case 3:z=Y,X=f+rt/m,e[2]=X,e[3]=z;break;case 4:X=U,z=t+-O*m,e[2]=X,e[3]=z;break}}return!1},l.getCardinalDirection=function(o,i,e){return o>i?e:1+e%4},l.getIntersection=function(o,i,e,a){if(a==null)return this.getIntersection2(o,i,e);var n=o.x,f=o.y,t=i.x,h=i.y,s=e.x,c=e.y,d=a.x,T=a.y,g=void 0,y=void 0,A=void 0,I=void 0,k=void 0,S=void 0,U=void 0,Y=void 0,$=void 0;return A=h-f,k=n-t,U=t*f-n*h,I=T-c,S=s-d,Y=d*c-s*T,$=A*S-I*k,$===0?null:(g=(k*Y-S*U)/$,y=(I*U-A*Y)/$,new u(g,y))},l.angleOfVector=function(o,i,e,a){var n=void 0;return o!==e?(n=Math.atan((a-i)/(e-o)),e<o?n+=Math.PI:a<i&&(n+=this.TWO_PI)):a<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},l.doIntersect=function(o,i,e,a){var n=o.x,f=o.y,t=i.x,h=i.y,s=e.x,c=e.y,d=a.x,T=a.y,g=(t-n)*(T-c)-(d-s)*(h-f);if(g===0)return!1;var y=((T-c)*(d-n)+(s-d)*(T-f))/g,A=((f-h)*(d-n)+(t-n)*(T-f))/g;return 0<y&&y<1&&0<A&&A<1},l.findCircleLineIntersections=function(o,i,e,a,n,f,t){var h=(e-o)*(e-o)+(a-i)*(a-i),s=2*((o-n)*(e-o)+(i-f)*(a-i)),c=(o-n)*(o-n)+(i-f)*(i-f)-t*t,d=s*s-4*h*c;if(d>=0){var T=(-s+Math.sqrt(s*s-4*h*c))/(2*h),g=(-s-Math.sqrt(s*s-4*h*c))/(2*h),y=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:y}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,L.exports=l},function(L,P,N){function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},L.exports=u},function(L,P,N){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,L.exports=u},function(L,P,N){var u=function(){function n(f,t){for(var h=0;h<t.length;h++){var s=t[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(f,s.key,s)}}return function(f,t,h){return t&&n(f.prototype,t),h&&n(f,h),f}}();function l(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var o=function(n){return{value:n,next:null,prev:null}},i=function(n,f,t,h){return n!==null?n.next=f:h.head=f,t!==null?t.prev=f:h.tail=f,f.prev=n,f.next=t,h.length++,f},e=function(n,f){var t=n.prev,h=n.next;return t!==null?t.next=h:f.head=h,h!==null?h.prev=t:f.tail=t,n.prev=n.next=null,f.length--,n},a=function(){function n(f){var t=this;l(this,n),this.length=0,this.head=null,this.tail=null,f!=null&&f.forEach(function(h){return t.push(h)})}return u(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(f,t){return i(t.prev,o(f),t,this)}},{key:"insertAfter",value:function(f,t){return i(t,o(f),t.next,this)}},{key:"insertNodeBefore",value:function(f,t){return i(t.prev,f,t,this)}},{key:"insertNodeAfter",value:function(f,t){return i(t,f,t.next,this)}},{key:"push",value:function(f){return i(this.tail,o(f),null,this)}},{key:"unshift",value:function(f){return i(null,o(f),this.head,this)}},{key:"remove",value:function(f){return e(f,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(f){if(f<=this.length()){for(var t=1,h=this.head;t<f;)h=h.next,t++;return h.value}}},{key:"set_object_at",value:function(f,t){if(f<=this.length()){for(var h=1,s=this.head;h<f;)s=s.next,h++;s.value=t}}}]),n}();L.exports=a},function(L,P,N){function u(l,o,i){this.x=null,this.y=null,l==null&&o==null&&i==null?(this.x=0,this.y=0):typeof l=="number"&&typeof o=="number"&&i==null?(this.x=l,this.y=o):l.constructor.name=="Point"&&o==null&&i==null&&(i=l,this.x=i.x,this.y=i.y)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.getLocation=function(){return new u(this.x,this.y)},u.prototype.setLocation=function(l,o,i){l.constructor.name=="Point"&&o==null&&i==null?(i=l,this.setLocation(i.x,i.y)):typeof l=="number"&&typeof o=="number"&&i==null&&(parseInt(l)==l&&parseInt(o)==o?this.move(l,o):(this.x=Math.floor(l+.5),this.y=Math.floor(o+.5)))},u.prototype.move=function(l,o){this.x=l,this.y=o},u.prototype.translate=function(l,o){this.x+=l,this.y+=o},u.prototype.equals=function(l){if(l.constructor.name=="Point"){var o=l;return this.x==o.x&&this.y==o.y}return this==l},u.prototype.toString=function(){return new u().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=u},function(L,P,N){function u(l,o,i,e){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&o!=null&&i!=null&&e!=null&&(this.x=l,this.y=o,this.width=i,this.height=e)}u.prototype.getX=function(){return this.x},u.prototype.setX=function(l){this.x=l},u.prototype.getY=function(){return this.y},u.prototype.setY=function(l){this.y=l},u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(l){this.width=l},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(l){this.height=l},u.prototype.getRight=function(){return this.x+this.width},u.prototype.getBottom=function(){return this.y+this.height},u.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},u.prototype.getCenterX=function(){return this.x+this.width/2},u.prototype.getMinX=function(){return this.getX()},u.prototype.getMaxX=function(){return this.getX()+this.width},u.prototype.getCenterY=function(){return this.y+this.height/2},u.prototype.getMinY=function(){return this.getY()},u.prototype.getMaxY=function(){return this.getY()+this.height},u.prototype.getWidthHalf=function(){return this.width/2},u.prototype.getHeightHalf=function(){return this.height/2},L.exports=u},function(L,P,N){var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function l(){}l.lastID=0,l.createID=function(o){return l.isPrimitive(o)?o:(o.uniqueID!=null||(o.uniqueID=l.getString(),l.lastID++),o.uniqueID)},l.getString=function(o){return o==null&&(o=l.lastID),"Object#"+o},l.isPrimitive=function(o){var i=typeof o>"u"?"undefined":u(o);return o==null||i!="object"&&i!="function"},L.exports=l},function(L,P,N){function u(s){if(Array.isArray(s)){for(var c=0,d=Array(s.length);c<s.length;c++)d[c]=s[c];return d}else return Array.from(s)}var l=N(0),o=N(7),i=N(3),e=N(1),a=N(6),n=N(5),f=N(17),t=N(29);function h(s){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 o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,s!=null&&(this.isRemoteUse=s)}h.RANDOM_SEED=1,h.prototype=Object.create(t.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var s=new o(this);return this.graphManager=s,s},h.prototype.newGraph=function(s){return new a(null,this.graphManager,s)},h.prototype.newNode=function(s){return new i(this.graphManager,s)},h.prototype.newEdge=function(s){return new e(null,null,s)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var s;return this.checkLayoutSuccess()?s=!1:s=this.layout(),l.ANIMATE==="during"?!1:(s&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,s)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var s=this.graphManager.getAllEdges(),c=0;c<s.length;c++)s[c];for(var d=this.graphManager.getRoot().getNodes(),c=0;c<d.length;c++)d[c];this.update(this.graphManager.getRoot())}},h.prototype.update=function(s){if(s==null)this.update2();else if(s instanceof i){var c=s;if(c.getChild()!=null)for(var d=c.getChild().getNodes(),T=0;T<d.length;T++)update(d[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(s instanceof e){var y=s;if(y.vGraphObject!=null){var A=y.vGraphObject;A.update(y)}}else if(s instanceof a){var I=s;if(I.vGraphObject!=null){var k=I.vGraphObject;k.update(I)}}},h.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)},h.prototype.transform=function(s){if(s==null)this.transform(new n(0,0));else{var c=new f,d=this.graphManager.getRoot().updateLeftTop();if(d!=null){c.setWorldOrgX(s.x),c.setWorldOrgY(s.y),c.setDeviceOrgX(d.x),c.setDeviceOrgY(d.y);for(var T=this.getAllNodes(),g,y=0;y<T.length;y++)g=T[y],g.transform(c)}}},h.prototype.positionNodesRandomly=function(s){if(s==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,d,T=s.getNodes(),g=0;g<T.length;g++)c=T[g],d=c.getChild(),d==null||d.getNodes().length==0?c.scatter():(this.positionNodesRandomly(d),c.updateBounds())},h.prototype.getFlatForest=function(){for(var s=[],c=!0,d=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<d.length;g++)d[g].getChild()!=null&&(T=!1);if(!T)return s;var y=new Set,A=[],I=new Map,k=[];for(k=k.concat(d);k.length>0&&c;){for(A.push(k[0]);A.length>0&&c;){var S=A[0];A.splice(0,1),y.add(S);for(var U=S.getEdges(),g=0;g<U.length;g++){var Y=U[g].getOtherEnd(S);if(I.get(S)!=Y)if(!y.has(Y))A.push(Y),I.set(Y,S);else{c=!1;break}}}if(!c)s=[];else{var $=[].concat(u(y));s.push($);for(var g=0;g<$.length;g++){var O=$[g],rt=k.indexOf(O);rt>-1&&k.splice(rt,1)}y=new Set,I=new Map}}return s},h.prototype.createDummyNodesForBendpoints=function(s){for(var c=[],d=s.source,T=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g<s.bendpoints.length;g++){var y=this.newNode(null);y.setRect(new Point(0,0),new Dimension(1,1)),T.add(y);var A=this.newEdge(null);this.graphManager.add(A,d,y),c.add(y),d=y}var A=this.newEdge(null);return this.graphManager.add(A,d,s.target),this.edgeToDummyNodes.set(s,c),s.isInterGraph()?this.graphManager.remove(s):T.remove(s),c},h.prototype.createBendpointsFromDummyNodes=function(){var s=[];s=s.concat(this.graphManager.getAllEdges()),s=[].concat(u(this.edgeToDummyNodes.keys())).concat(s);for(var c=0;c<s.length;c++){var d=s[c];if(d.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(d),g=0;g<T.length;g++){var y=T[g],A=new n(y.getCenterX(),y.getCenterY()),I=d.bendpoints.get(g);I.x=A.x,I.y=A.y,y.getOwner().remove(y)}this.graphManager.add(d,d.source,d.target)}}},h.transform=function(s,c,d,T){if(d!=null&&T!=null){var g=c;if(s<=50){var y=c/d;g-=(c-y)/50*(50-s)}else{var A=c*T;g+=(A-c)/50*(s-50)}return g}else{var I,k;return s<=50?(I=9*c/500,k=c/10):(I=9*c/50,k=-8*c),I*s+k}},h.findCenterOfTree=function(s){var c=[];c=c.concat(s);var d=[],T=new Map,g=!1,y=null;(c.length==1||c.length==2)&&(g=!0,y=c[0]);for(var A=0;A<c.length;A++){var I=c[A],k=I.getNeighborsList().size;T.set(I,I.getNeighborsList().size),k==1&&d.push(I)}var S=[];for(S=S.concat(d);!g;){var U=[];U=U.concat(S),S=[];for(var A=0;A<c.length;A++){var I=c[A],Y=c.indexOf(I);Y>=0&&c.splice(Y,1);var $=I.getNeighborsList();$.forEach(function(r){if(d.indexOf(r)<0){var E=T.get(r),v=E-1;v==1&&S.push(r),T.set(r,v)}})}d=d.concat(S),(c.length==1||c.length==2)&&(g=!0,y=c[0])}return y},h.prototype.setGraphManager=function(s){this.graphManager=s},L.exports=h},function(L,P,N){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},L.exports=u},function(L,P,N){var u=N(5);function l(o,i){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(o){this.lworldOrgX=o},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(o){this.lworldExtX=o},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(o){this.lworldExtY=o},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},l.prototype.transformX=function(o){var i=0,e=this.lworldExtX;return e!=0&&(i=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/e),i},l.prototype.transformY=function(o){var i=0,e=this.lworldExtY;return e!=0&&(i=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/e),i},l.prototype.inverseTransformX=function(o){var i=0,e=this.ldeviceExtX;return e!=0&&(i=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/e),i},l.prototype.inverseTransformY=function(o){var i=0,e=this.ldeviceExtY;return e!=0&&(i=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/e),i},l.prototype.inverseTransformPoint=function(o){var i=new u(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return i},L.exports=l},function(L,P,N){function u(t){if(Array.isArray(t)){for(var h=0,s=Array(t.length);h<t.length;h++)s[h]=t[h];return s}else return Array.from(t)}var l=N(15),o=N(4),i=N(0),e=N(8),a=N(9);function n(){l.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}n.prototype=Object.create(l.prototype);for(var f in l)n[f]=l[f];n.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var t,h,s,c,d,T,g,y=this.getGraphManager().getAllEdges(),A=0;A<y.length;A++)t=y[A],h=t.idealLength,t.isInterGraph&&(c=t.getSource(),d=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*i.SIMPLE_NODE_SIZE),s=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*s))},n.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,s=0;s<t.length;s++)h=t[s],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,c,d,T,g=this.getAllNodes(),y;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),y=new Set,s=0;s<g.length;s++)d=g[s],this.calculateRepulsionForceOfANode(d,y,t,h),y.add(d);else for(s=0;s<g.length;s++)for(d=g[s],c=s+1;c<g.length;c++)T=g[c],d.getOwner()==T.getOwner()&&this.calcRepulsionForce(d,T)},n.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),s=0;s<h.length;s++)t=h[s],this.calcGravitationalForce(t)},n.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h,s=0;s<t.length;s++)h=t[s],h.move()},n.prototype.calcSpringForce=function(t,h){var s=t.getSource(),c=t.getTarget(),d,T,g,y;if(this.uniformLeafNodeSizes&&s.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;d=t.getLength(),d!=0&&(T=t.edgeElasticity*(d-h),g=T*(t.lengthX/d),y=T*(t.lengthY/d),s.springForceX+=g,s.springForceY+=y,c.springForceX-=g,c.springForceY-=y)},n.prototype.calcRepulsionForce=function(t,h){var s=t.getRect(),c=h.getRect(),d=new Array(2),T=new Array(4),g,y,A,I,k,S,U;if(s.intersects(c)){e.calcSeparationAmount(s,c,d,o.DEFAULT_EDGE_LENGTH/2),S=2*d[0],U=2*d[1];var Y=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=Y*S,t.repulsionForceY-=Y*U,h.repulsionForceX+=Y*S,h.repulsionForceY+=Y*U}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(g=c.getCenterX()-s.getCenterX(),y=c.getCenterY()-s.getCenterY()):(e.getIntersection(s,c,T),g=T[2]-T[0],y=T[3]-T[1]),Math.abs(g)<o.MIN_REPULSION_DIST&&(g=a.sign(g)*o.MIN_REPULSION_DIST),Math.abs(y)<o.MIN_REPULSION_DIST&&(y=a.sign(y)*o.MIN_REPULSION_DIST),A=g*g+y*y,I=Math.sqrt(A),k=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/A,S=k*g/I,U=k*y/I,t.repulsionForceX-=S,t.repulsionForceY-=U,h.repulsionForceX+=S,h.repulsionForceY+=U},n.prototype.calcGravitationalForce=function(t){var h,s,c,d,T,g,y,A;h=t.getOwner(),s=(h.getRight()+h.getLeft())/2,c=(h.getTop()+h.getBottom())/2,d=t.getCenterX()-s,T=t.getCenterY()-c,g=Math.abs(d)+t.getWidth()/2,y=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(A=h.getEstimatedSize()*this.gravityRangeFactor,(g>A||y>A)&&(t.gravitationForceX=-this.gravityConstant*d,t.gravitationForceY=-this.gravityConstant*T)):(A=h.getEstimatedSize()*this.compoundGravityRangeFactor,(g>A||y>A)&&(t.gravitationForceX=-this.gravityConstant*d*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},n.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,h=this.graphManager.getAllNodes(),s=0;s<h.length;s++)t=h[s],t.noOfChildren=t.getNoOfChildren()},n.prototype.calcGrid=function(t){var h=0,s=0;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(h),d=0;d<h;d++)c[d]=new Array(s);for(var d=0;d<h;d++)for(var T=0;T<s;T++)c[d][T]=new Array;return c},n.prototype.addNodeToGrid=function(t,h,s){var c=0,d=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),d=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-s)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-s)/this.repulsionRange));for(var y=c;y<=d;y++)for(var A=T;A<=g;A++)this.grid[y][A].push(t),t.setGridCoordinates(c,d,T,g)},n.prototype.updateGrid=function(){var t,h,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<s.length;t++)h=s[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(t,h,s,c){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&s||c){var d=new Set;t.surrounding=new Array;for(var T,g=this.grid,y=t.startX-1;y<t.finishX+2;y++)for(var A=t.startY-1;A<t.finishY+2;A++)if(!(y<0||A<0||y>=g.length||A>=g[0].length)){for(var I=0;I<g[y][A].length;I++)if(T=g[y][A][I],!(t.getOwner()!=T.getOwner()||t==T)&&!h.has(T)&&!d.has(T)){var k=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),S=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);k<=this.repulsionRange&&S<=this.repulsionRange&&d.add(T)}}t.surrounding=[].concat(u(d))}for(y=0;y<t.surrounding.length;y++)this.calcRepulsionForce(t,t.surrounding[y])},n.prototype.calcRepulsionRange=function(){return 0},L.exports=n},function(L,P,N){var u=N(1),l=N(4);function o(e,a,n){u.call(this,e,a,n),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(u.prototype);for(var i in u)o[i]=u[i];L.exports=o},function(L,P,N){var u=N(3),l=N(4);function o(e,a,n,f){u.call(this,e,a,n,f),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=[]}o.prototype=Object.create(u.prototype);for(var i in u)o[i]=u[i];o.prototype.setGridCoordinates=function(e,a,n,f){this.startX=e,this.finishX=a,this.startY=n,this.finishY=f},L.exports=o},function(L,P,N){function u(l,o){this.width=0,this.height=0,l!==null&&o!==null&&(this.height=o,this.width=l)}u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(l){this.width=l},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(l){this.height=l},L.exports=u},function(L,P,N){var u=N(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(o,i){var e=u.createID(o);this.contains(e)||(this.map[e]=i,this.keys.push(o))},l.prototype.contains=function(o){return u.createID(o),this.map[o]!=null},l.prototype.get=function(o){var i=u.createID(o);return this.map[i]},l.prototype.keySet=function(){return this.keys},L.exports=l},function(L,P,N){var u=N(14);function l(){this.set={}}l.prototype.add=function(o){var i=u.createID(o);this.contains(i)||(this.set[i]=o)},l.prototype.remove=function(o){delete this.set[u.createID(o)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(o){return this.set[u.createID(o)]==o},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(o){for(var i=Object.keys(this.set),e=i.length,a=0;a<e;a++)o.push(this.set[i[a]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(o){for(var i=o.length,e=0;e<i;e++){var a=o[e];this.add(a)}},L.exports=l},function(L,P,N){function u(){}u.multMat=function(l,o){for(var i=[],e=0;e<l.length;e++){i[e]=[];for(var a=0;a<o[0].length;a++){i[e][a]=0;for(var n=0;n<l[0].length;n++)i[e][a]+=l[e][n]*o[n][a]}}return i},u.transpose=function(l){for(var o=[],i=0;i<l[0].length;i++){o[i]=[];for(var e=0;e<l.length;e++)o[i][e]=l[e][i]}return o},u.multCons=function(l,o){for(var i=[],e=0;e<l.length;e++)i[e]=l[e]*o;return i},u.minusOp=function(l,o){for(var i=[],e=0;e<l.length;e++)i[e]=l[e]-o[e];return i},u.dotProduct=function(l,o){for(var i=0,e=0;e<l.length;e++)i+=l[e]*o[e];return i},u.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},u.normalize=function(l){for(var o=[],i=this.mag(l),e=0;e<l.length;e++)o[e]=l[e]/i;return o},u.multGamma=function(l){for(var o=[],i=0,e=0;e<l.length;e++)i+=l[e];i*=-1/l.length;for(var a=0;a<l.length;a++)o[a]=i+l[a];return o},u.multL=function(l,o,i){for(var e=[],a=[],n=[],f=0;f<o[0].length;f++){for(var t=0,h=0;h<o.length;h++)t+=-.5*o[h][f]*l[h];a[f]=t}for(var s=0;s<i.length;s++){for(var c=0,d=0;d<i.length;d++)c+=i[s][d]*a[d];n[s]=c}for(var T=0;T<o.length;T++){for(var g=0,y=0;y<o[0].length;y++)g+=o[T][y]*n[y];e[T]=g}return e},L.exports=u},function(L,P,N){var u=function(){function e(a,n){for(var f=0;f<n.length;f++){var t=n[f];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(a,t.key,t)}}return function(a,n,f){return n&&e(a.prototype,n),f&&e(a,f),a}}();function l(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}var o=N(11),i=function(){function e(a,n){l(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;a instanceof o?f=a.size():f=a.length,this._quicksort(a,0,f-1)}return u(e,[{key:"_quicksort",value:function(a,n,f){if(n<f){var t=this._partition(a,n,f);this._quicksort(a,n,t),this._quicksort(a,t+1,f)}}},{key:"_partition",value:function(a,n,f){for(var t=this._get(a,n),h=n,s=f;;){for(;this.compareFunction(t,this._get(a,s));)s--;for(;this.compareFunction(this._get(a,h),t);)h++;if(h<s)this._swap(a,h,s),h++,s--;else return s}}},{key:"_get",value:function(a,n){return a instanceof o?a.get_object_at(n):a[n]}},{key:"_set",value:function(a,n,f){a instanceof o?a.set_object_at(n,f):a[n]=f}},{key:"_swap",value:function(a,n,f){var t=this._get(a,n);this._set(a,n,this._get(a,f)),this._set(a,f,t)}},{key:"_defaultCompareFunction",value:function(a,n){return n>a}}]),e}();L.exports=i},function(L,P,N){function u(){}u.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 o=Math.min(this.m,this.n);this.s=function(It){for(var Tt=[];It-- >0;)Tt.push(0);return Tt}(Math.min(this.m+1,this.n)),this.U=function(It){var Tt=function Ut(kt){if(kt.length==0)return 0;for(var Dt=[],Ft=0;Ft<kt[0];Ft++)Dt.push(Ut(kt.slice(1)));return Dt};return Tt(It)}([this.m,o]),this.V=function(It){var Tt=function Ut(kt){if(kt.length==0)return 0;for(var Dt=[],Ft=0;Ft<kt[0];Ft++)Dt.push(Ut(kt.slice(1)));return Dt};return Tt(It)}([this.n,this.n]);for(var i=function(It){for(var Tt=[];It-- >0;)Tt.push(0);return Tt}(this.n),e=function(It){for(var Tt=[];It-- >0;)Tt.push(0);return Tt}(this.m),a=!0,n=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(n,f);t++){if(t<n){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=u.hypot(this.s[t],l[h][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var s=t;s<this.m;s++)l[s][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(It,Tt){return It&&Tt}(t<n,this.s[t]!==0)){for(var d=0,T=t;T<this.m;T++)d+=l[T][t]*l[T][c];d=-d/l[t][t];for(var g=t;g<this.m;g++)l[g][c]+=d*l[g][t]}i[c]=l[t][c]}if(function(It,Tt){return Tt}(a,t<n))for(var y=t;y<this.m;y++)this.U[y][t]=l[y][t];if(t<f){i[t]=0;for(var A=t+1;A<this.n;A++)i[t]=u.hypot(i[t],i[A]);if(i[t]!==0){i[t+1]<0&&(i[t]=-i[t]);for(var I=t+1;I<this.n;I++)i[I]/=i[t];i[t+1]+=1}if(i[t]=-i[t],function(It,Tt){return It&&Tt}(t+1<this.m,i[t]!==0)){for(var k=t+1;k<this.m;k++)e[k]=0;for(var S=t+1;S<this.n;S++)for(var U=t+1;U<this.m;U++)e[U]+=i[S]*l[U][S];for(var Y=t+1;Y<this.n;Y++)for(var $=-i[Y]/i[t+1],O=t+1;O<this.m;O++)l[O][Y]+=$*e[O]}for(var rt=t+1;rt<this.n;rt++)this.V[rt][t]=i[rt]}}var r=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=l[n][n]),this.m<r&&(this.s[r-1]=0),f+1<r&&(i[f]=l[f][r-1]),i[r-1]=0;{for(var E=n;E<o;E++){for(var v=0;v<this.m;v++)this.U[v][E]=0;this.U[E][E]=1}for(var p=n-1;p>=0;p--)if(this.s[p]!==0){for(var m=p+1;m<o;m++){for(var M=0,w=p;w<this.m;w++)M+=this.U[w][p]*this.U[w][m];M=-M/this.U[p][p];for(var x=p;x<this.m;x++)this.U[x][m]+=M*this.U[x][p]}for(var F=p;F<this.m;F++)this.U[F][p]=-this.U[F][p];this.U[p][p]=1+this.U[p][p];for(var X=0;X<p-1;X++)this.U[X][p]=0}else{for(var z=0;z<this.m;z++)this.U[z][p]=0;this.U[p][p]=1}}for(var W=this.n-1;W>=0;W--){if(function(It,Tt){return It&&Tt}(W<f,i[W]!==0))for(var B=W+1;B<o;B++){for(var Q=0,G=W+1;G<this.n;G++)Q+=this.V[G][W]*this.V[G][B];Q=-Q/this.V[W+1][W];for(var D=W+1;D<this.n;D++)this.V[D][B]+=Q*this.V[D][W]}for(var b=0;b<this.n;b++)this.V[b][W]=0;this.V[W][W]=1}for(var q=r-1,et=Math.pow(2,-52),vt=Math.pow(2,-966);r>0;){var j=void 0,xt=void 0;for(j=r-2;j>=-1&&j!==-1;j--)if(Math.abs(i[j])<=vt+et*(Math.abs(this.s[j])+Math.abs(this.s[j+1]))){i[j]=0;break}if(j===r-2)xt=4;else{var J=void 0;for(J=r-1;J>=j&&J!==j;J--){var nt=(J!==r?Math.abs(i[J]):0)+(J!==j+1?Math.abs(i[J-1]):0);if(Math.abs(this.s[J])<=vt+et*nt){this.s[J]=0;break}}J===j?xt=3:J===r-1?xt=1:(xt=2,j=J)}switch(j++,xt){case 1:{var mt=i[r-2];i[r-2]=0;for(var st=r-2;st>=j;st--){var Lt=u.hypot(this.s[st],mt),_t=this.s[st]/Lt,Nt=mt/Lt;this.s[st]=Lt,st!==j&&(mt=-Nt*i[st-1],i[st-1]=_t*i[st-1]);for(var At=0;At<this.n;At++)Lt=_t*this.V[At][st]+Nt*this.V[At][r-1],this.V[At][r-1]=-Nt*this.V[At][st]+_t*this.V[At][r-1],this.V[At][st]=Lt}}break;case 2:{var Ht=i[j-1];i[j-1]=0;for(var Rt=j;Rt<r;Rt++){var bt=u.hypot(this.s[Rt],Ht),Gt=this.s[Rt]/bt,Bt=Ht/bt;this.s[Rt]=bt,Ht=-Bt*i[Rt],i[Rt]=Gt*i[Rt];for(var Pt=0;Pt<this.m;Pt++)bt=Gt*this.U[Pt][Rt]+Bt*this.U[Pt][j-1],this.U[Pt][j-1]=-Bt*this.U[Pt][Rt]+Gt*this.U[Pt][j-1],this.U[Pt][Rt]=bt}}break;case 3:{var zt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[r-1]),Math.abs(this.s[r-2])),Math.abs(i[r-2])),Math.abs(this.s[j])),Math.abs(i[j])),dt=this.s[r-1]/zt,_=this.s[r-2]/zt,R=i[r-2]/zt,V=this.s[j]/zt,Z=i[j]/zt,K=((_+dt)*(_-dt)+R*R)/2,ft=dt*R*(dt*R),ht=0;(function(It,Tt){return It||Tt})(K!==0,ft!==0)&&(ht=Math.sqrt(K*K+ft),K<0&&(ht=-ht),ht=ft/(K+ht));for(var tt=(V+dt)*(V-dt)+ht,ct=V*Z,it=j;it<r-1;it++){var Et=u.hypot(tt,ct),yt=tt/Et,Ot=ct/Et;it!==j&&(i[it-1]=Et),tt=yt*this.s[it]+Ot*i[it],i[it]=yt*i[it]-Ot*this.s[it],ct=Ot*this.s[it+1],this.s[it+1]=yt*this.s[it+1];for(var lt=0;lt<this.n;lt++)Et=yt*this.V[lt][it]+Ot*this.V[lt][it+1],this.V[lt][it+1]=-Ot*this.V[lt][it]+yt*this.V[lt][it+1],this.V[lt][it]=Et;if(Et=u.hypot(tt,ct),yt=tt/Et,Ot=ct/Et,this.s[it]=Et,tt=yt*i[it]+Ot*this.s[it+1],this.s[it+1]=-Ot*i[it]+yt*this.s[it+1],ct=Ot*i[it+1],i[it+1]=yt*i[it+1],it<this.m-1)for(var ot=0;ot<this.m;ot++)Et=yt*this.U[ot][it]+Ot*this.U[ot][it+1],this.U[ot][it+1]=-Ot*this.U[ot][it]+yt*this.U[ot][it+1],this.U[ot][it]=Et}i[r-2]=tt}break;case 4:{if(this.s[j]<=0){this.s[j]=this.s[j]<0?-this.s[j]:0;for(var at=0;at<=q;at++)this.V[at][j]=-this.V[at][j]}for(;j<q&&!(this.s[j]>=this.s[j+1]);){var Ct=this.s[j];if(this.s[j]=this.s[j+1],this.s[j+1]=Ct,j<this.n-1)for(var gt=0;gt<this.n;gt++)Ct=this.V[gt][j+1],this.V[gt][j+1]=this.V[gt][j],this.V[gt][j]=Ct;if(j<this.m-1)for(var Mt=0;Mt<this.m;Mt++)Ct=this.U[Mt][j+1],this.U[Mt][j+1]=this.U[Mt][j],this.U[Mt][j]=Ct;j++}r--}break}}var St={U:this.U,V:this.V,S:this.s};return St},u.hypot=function(l,o){var i=void 0;return Math.abs(l)>Math.abs(o)?(i=o/l,i=Math.abs(l)*Math.sqrt(1+i*i)):o!=0?(i=l/o,i=Math.abs(o)*Math.sqrt(1+i*i)):i=0,i},L.exports=u},function(L,P,N){var u=function(){function i(e,a){for(var n=0;n<a.length;n++){var f=a[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}return function(e,a,n){return a&&i(e.prototype,a),n&&i(e,n),e}}();function l(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function i(e,a){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,i),this.sequence1=e,this.sequence2=a,this.match_score=n,this.mismatch_penalty=f,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=a.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[h][s]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[c][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return u(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var a=1;a<this.iMax;a++)this.grid[a][0]=this.grid[a-1][0]+this.gap_penalty,this.tracebackGrid[a][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var f=1;f<this.jMax;f++){var t=void 0;this.sequence1[n-1]===this.sequence2[f-1]?t=this.grid[n-1][f-1]+this.match_score:t=this.grid[n-1][f-1]+this.mismatch_penalty;var h=this.grid[n-1][f]+this.gap_penalty,s=this.grid[n][f-1]+this.gap_penalty,c=[t,h,s],d=this.arrayAllMaxIndexes(c);this.grid[n][f]=c[d[0]],this.tracebackGrid[n][f]=[d.includes(0),d.includes(1),d.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var a=e[0],n=this.tracebackGrid[a.pos[0]][a.pos[1]];n[0]&&e.push({pos:[a.pos[0]-1,a.pos[1]-1],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),n[1]&&e.push({pos:[a.pos[0]-1,a.pos[1]],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:"-"+a.seq2}),n[2]&&e.push({pos:[a.pos[0],a.pos[1]-1],seq1:"-"+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),a.pos[0]===0&&a.pos[1]===0&&this.alignments.push({sequence1:a.seq1,sequence2:a.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,a){for(var n=[],f=-1;(f=e.indexOf(a,f+1))!==-1;)n.push(f);return n}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),i}();L.exports=o},function(L,P,N){var u=function(){};u.FDLayout=N(18),u.FDLayoutConstants=N(4),u.FDLayoutEdge=N(19),u.FDLayoutNode=N(20),u.DimensionD=N(21),u.HashMap=N(22),u.HashSet=N(23),u.IGeometry=N(8),u.IMath=N(9),u.Integer=N(10),u.Point=N(12),u.PointD=N(5),u.RandomSeed=N(16),u.RectangleD=N(13),u.Transform=N(17),u.UniqueIDGeneretor=N(14),u.Quicksort=N(25),u.LinkedList=N(11),u.LGraphObject=N(2),u.LGraph=N(6),u.LEdge=N(1),u.LGraphManager=N(7),u.LNode=N(3),u.Layout=N(15),u.LayoutConstants=N(0),u.NeedlemanWunsch=N(27),u.Matrix=N(24),u.SVD=N(26),L.exports=u},function(L,P,N){function u(){this.listeners=[]}var l=u.prototype;l.addListener=function(o,i){this.listeners.push({event:o,callback:i})},l.removeListener=function(o,i){for(var e=this.listeners.length;e>=0;e--){var a=this.listeners[e];a.event===o&&a.callback===i&&this.listeners.splice(e,1)}},l.emit=function(o,i){for(var e=0;e<this.listeners.length;e++){var a=this.listeners[e];o===a.event&&a.callback(i)}},L.exports=u}])})}(fe)),fe.exports}var ui=ue.exports,_e;function fi(){return _e||(_e=1,function(C,H){(function(L,P){C.exports=P(gi())})(ui,function(L){return(()=>{var P={45:(o,i,e)=>{var a={};a.layoutBase=e(551),a.CoSEConstants=e(806),a.CoSEEdge=e(767),a.CoSEGraph=e(880),a.CoSEGraphManager=e(578),a.CoSELayout=e(765),a.CoSENode=e(991),a.ConstraintHandler=e(902),o.exports=a},806:(o,i,e)=>{var a=e(551).FDLayoutConstants;function n(){}for(var f in a)n[f]=a[f];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=a.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,o.exports=n},767:(o,i,e)=>{var a=e(551).FDLayoutEdge;function n(t,h,s){a.call(this,t,h,s)}n.prototype=Object.create(a.prototype);for(var f in a)n[f]=a[f];o.exports=n},880:(o,i,e)=>{var a=e(551).LGraph;function n(t,h,s){a.call(this,t,h,s)}n.prototype=Object.create(a.prototype);for(var f in a)n[f]=a[f];o.exports=n},578:(o,i,e)=>{var a=e(551).LGraphManager;function n(t){a.call(this,t)}n.prototype=Object.create(a.prototype);for(var f in a)n[f]=a[f];o.exports=n},765:(o,i,e)=>{var a=e(551).FDLayout,n=e(578),f=e(880),t=e(991),h=e(767),s=e(806),c=e(902),d=e(551).FDLayoutConstants,T=e(551).LayoutConstants,g=e(551).Point,y=e(551).PointD,A=e(551).DimensionD,I=e(551).Layout,k=e(551).Integer,S=e(551).IGeometry,U=e(551).LGraph,Y=e(551).Transform,$=e(551).LinkedList;function O(){a.call(this),this.toBeTiled={},this.constraints={}}O.prototype=Object.create(a.prototype);for(var rt in a)O[rt]=a[rt];O.prototype.newGraphManager=function(){var r=new n(this);return this.graphManager=r,r},O.prototype.newGraph=function(r){return new f(null,this.graphManager,r)},O.prototype.newNode=function(r){return new t(this.graphManager,r)},O.prototype.newEdge=function(r){return new h(null,null,r)},O.prototype.initParameters=function(){a.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},O.prototype.initSpringEmbedder=function(){a.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},O.prototype.layout=function(){var r=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return r&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},O.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(s.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var r=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(p){return r.has(p)});this.graphManager.setAllNodesToApplyGravitation(E)}}else{var v=this.getFlatForest();if(v.length>0)this.positionNodesRadially(v);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var r=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(M){return r.has(M)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},O.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%d.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 r=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(m){return r.has(m)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.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()),s.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var v=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(v,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},O.prototype.getPositionsData=function(){for(var r=this.graphManager.getAllNodes(),E={},v=0;v<r.length;v++){var p=r[v].rect,m=r[v].id;E[m]={id:m,x:p.getCenterX(),y:p.getCenterY(),w:p.width,h:p.height}}return E},O.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var r=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!r;)r=this.tick();this.graphManager.updateBounds()}},O.prototype.moveNodes=function(){for(var r=this.getAllNodes(),E,v=0;v<r.length;v++)E=r[v],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var v=0;v<r.length;v++)E=r[v],E.move()},O.prototype.initConstraintVariables=function(){var r=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),v=0;v<E.length;v++){var p=E[v];this.idToNodeMap.set(p.id,p)}var m=function D(b){for(var q=b.getChild().getNodes(),et,vt=0,j=0;j<q.length;j++)et=q[j],et.getChild()==null?r.fixedNodeSet.has(et.id)&&(vt+=100):vt+=D(et);return vt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(D){r.fixedNodeSet.add(D.nodeId)});for(var E=this.graphManager.getAllNodes(),p,v=0;v<E.length;v++)if(p=E[v],p.getChild()!=null){var M=m(p);M>0&&(p.fixedNodeWeight=M)}}if(this.constraints.relativePlacementConstraint){var w=new Map,x=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){r.fixedNodesOnHorizontal.add(D),r.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var F=this.constraints.alignmentConstraint.vertical,v=0;v<F.length;v++)this.dummyToNodeForVerticalAlignment.set("dummy"+v,[]),F[v].forEach(function(b){w.set(b,"dummy"+v),r.dummyToNodeForVerticalAlignment.get("dummy"+v).push(b),r.fixedNodeSet.has(b)&&r.fixedNodesOnHorizontal.add("dummy"+v)});if(this.constraints.alignmentConstraint.horizontal)for(var X=this.constraints.alignmentConstraint.horizontal,v=0;v<X.length;v++)this.dummyToNodeForHorizontalAlignment.set("dummy"+v,[]),X[v].forEach(function(b){x.set(b,"dummy"+v),r.dummyToNodeForHorizontalAlignment.get("dummy"+v).push(b),r.fixedNodeSet.has(b)&&r.fixedNodesOnVertical.add("dummy"+v)})}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var b,q,et;for(et=D.length-1;et>=2*D.length/3;et--)b=Math.floor(Math.random()*(et+1)),q=D[et],D[et]=D[b],D[b]=q;return D},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(D){if(D.left){var b=w.has(D.left)?w.get(D.left):D.left,q=w.has(D.right)?w.get(D.right):D.right;r.nodesInRelativeHorizontal.includes(b)||(r.nodesInRelativeHorizontal.push(b),r.nodeToRelativeConstraintMapHorizontal.set(b,[]),r.dummyToNodeForVerticalAlignment.has(b)?r.nodeToTempPositionMapHorizontal.set(b,r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(b)[0]).getCenterX()):r.nodeToTempPositionMapHorizontal.set(b,r.idToNodeMap.get(b).getCenterX())),r.nodesInRelativeHorizontal.includes(q)||(r.nodesInRelativeHorizontal.push(q),r.nodeToRelativeConstraintMapHorizontal.set(q,[]),r.dummyToNodeForVerticalAlignment.has(q)?r.nodeToTempPositionMapHorizontal.set(q,r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(q)[0]).getCenterX()):r.nodeToTempPositionMapHorizontal.set(q,r.idToNodeMap.get(q).getCenterX())),r.nodeToRelativeConstraintMapHorizontal.get(b).push({right:q,gap:D.gap}),r.nodeToRelativeConstraintMapHorizontal.get(q).push({left:b,gap:D.gap})}else{var et=x.has(D.top)?x.get(D.top):D.top,vt=x.has(D.bottom)?x.get(D.bottom):D.bottom;r.nodesInRelativeVertical.includes(et)||(r.nodesInRelativeVertical.push(et),r.nodeToRelativeConstraintMapVertical.set(et,[]),r.dummyToNodeForHorizontalAlignment.has(et)?r.nodeToTempPositionMapVertical.set(et,r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(et)[0]).getCenterY()):r.nodeToTempPositionMapVertical.set(et,r.idToNodeMap.get(et).getCenterY())),r.nodesInRelativeVertical.includes(vt)||(r.nodesInRelativeVertical.push(vt),r.nodeToRelativeConstraintMapVertical.set(vt,[]),r.dummyToNodeForHorizontalAlignment.has(vt)?r.nodeToTempPositionMapVertical.set(vt,r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(vt)[0]).getCenterY()):r.nodeToTempPositionMapVertical.set(vt,r.idToNodeMap.get(vt).getCenterY())),r.nodeToRelativeConstraintMapVertical.get(et).push({bottom:vt,gap:D.gap}),r.nodeToRelativeConstraintMapVertical.get(vt).push({top:et,gap:D.gap})}});else{var z=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var b=w.has(D.left)?w.get(D.left):D.left,q=w.has(D.right)?w.get(D.right):D.right;z.has(b)?z.get(b).push(q):z.set(b,[q]),z.has(q)?z.get(q).push(b):z.set(q,[b])}else{var et=x.has(D.top)?x.get(D.top):D.top,vt=x.has(D.bottom)?x.get(D.bottom):D.bottom;W.has(et)?W.get(et).push(vt):W.set(et,[vt]),W.has(vt)?W.get(vt).push(et):W.set(vt,[et])}});var B=function(D,b){var q=[],et=[],vt=new $,j=new Set,xt=0;return D.forEach(function(J,nt){if(!j.has(nt)){q[xt]=[],et[xt]=!1;var mt=nt;for(vt.push(mt),j.add(mt),q[xt].push(mt);vt.length!=0;){mt=vt.shift(),b.has(mt)&&(et[xt]=!0);var st=D.get(mt);st.forEach(function(Lt){j.has(Lt)||(vt.push(Lt),j.add(Lt),q[xt].push(Lt))})}xt++}}),{components:q,isFixed:et}},Q=B(z,r.fixedNodesOnHorizontal);this.componentsOnHorizontal=Q.components,this.fixedComponentsOnHorizontal=Q.isFixed;var G=B(W,r.fixedNodesOnVertical);this.componentsOnVertical=G.components,this.fixedComponentsOnVertical=G.isFixed}}},O.prototype.updateDisplacements=function(){var r=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(G){var D=r.idToNodeMap.get(G.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,v=0;v<E.length;v++){for(var p=0,m=0;m<E[v].length;m++){if(this.fixedNodeSet.has(E[v][m])){p=0;break}p+=this.idToNodeMap.get(E[v][m]).displacementX}for(var M=p/E[v].length,m=0;m<E[v].length;m++)this.idToNodeMap.get(E[v][m]).displacementX=M}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,v=0;v<w.length;v++){for(var x=0,m=0;m<w[v].length;m++){if(this.fixedNodeSet.has(w[v][m])){x=0;break}x+=this.idToNodeMap.get(w[v][m]).displacementY}for(var F=x/w[v].length,m=0;m<w[v].length;m++)this.idToNodeMap.get(w[v][m]).displacementY=F}}if(this.constraints.relativePlacementConstraint)if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(G){if(!r.fixedNodesOnHorizontal.has(G)){var D=0;r.dummyToNodeForVerticalAlignment.has(G)?D=r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(G)[0]).displacementX:D=r.idToNodeMap.get(G).displacementX,r.nodeToRelativeConstraintMapHorizontal.get(G).forEach(function(b){if(b.right){var q=r.nodeToTempPositionMapHorizontal.get(b.right)-r.nodeToTempPositionMapHorizontal.get(G)-D;q<b.gap&&(D-=b.gap-q)}else{var q=r.nodeToTempPositionMapHorizontal.get(G)-r.nodeToTempPositionMapHorizontal.get(b.left)+D;q<b.gap&&(D+=b.gap-q)}}),r.nodeToTempPositionMapHorizontal.set(G,r.nodeToTempPositionMapHorizontal.get(G)+D),r.dummyToNodeForVerticalAlignment.has(G)?r.dummyToNodeForVerticalAlignment.get(G).forEach(function(b){r.idToNodeMap.get(b).displacementX=D}):r.idToNodeMap.get(G).displacementX=D}}),this.nodesInRelativeVertical.forEach(function(G){if(!r.fixedNodesOnHorizontal.has(G)){var D=0;r.dummyToNodeForHorizontalAlignment.has(G)?D=r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(G)[0]).displacementY:D=r.idToNodeMap.get(G).displacementY,r.nodeToRelativeConstraintMapVertical.get(G).forEach(function(b){if(b.bottom){var q=r.nodeToTempPositionMapVertical.get(b.bottom)-r.nodeToTempPositionMapVertical.get(G)-D;q<b.gap&&(D-=b.gap-q)}else{var q=r.nodeToTempPositionMapVertical.get(G)-r.nodeToTempPositionMapVertical.get(b.top)+D;q<b.gap&&(D+=b.gap-q)}}),r.nodeToTempPositionMapVertical.set(G,r.nodeToTempPositionMapVertical.get(G)+D),r.dummyToNodeForHorizontalAlignment.has(G)?r.dummyToNodeForHorizontalAlignment.get(G).forEach(function(b){r.idToNodeMap.get(b).displacementY=D}):r.idToNodeMap.get(G).displacementY=D}});else{for(var v=0;v<this.componentsOnHorizontal.length;v++){var X=this.componentsOnHorizontal[v];if(this.fixedComponentsOnHorizontal[v])for(var m=0;m<X.length;m++)this.dummyToNodeForVerticalAlignment.has(X[m])?this.dummyToNodeForVerticalAlignment.get(X[m]).forEach(function(b){r.idToNodeMap.get(b).displacementX=0}):this.idToNodeMap.get(X[m]).displacementX=0;else{for(var z=0,W=0,m=0;m<X.length;m++)if(this.dummyToNodeForVerticalAlignment.has(X[m])){var B=this.dummyToNodeForVerticalAlignment.get(X[m]);z+=B.length*this.idToNodeMap.get(B[0]).displacementX,W+=B.length}else z+=this.idToNodeMap.get(X[m]).displacementX,W++;for(var Q=z/W,m=0;m<X.length;m++)this.dummyToNodeForVerticalAlignment.has(X[m])?this.dummyToNodeForVerticalAlignment.get(X[m]).forEach(function(b){r.idToNodeMap.get(b).displacementX=Q}):this.idToNodeMap.get(X[m]).displacementX=Q}}for(var v=0;v<this.componentsOnVertical.length;v++){var X=this.componentsOnVertical[v];if(this.fixedComponentsOnVertical[v])for(var m=0;m<X.length;m++)this.dummyToNodeForHorizontalAlignment.has(X[m])?this.dummyToNodeForHorizontalAlignment.get(X[m]).forEach(function(q){r.idToNodeMap.get(q).displacementY=0}):this.idToNodeMap.get(X[m]).displacementY=0;else{for(var z=0,W=0,m=0;m<X.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(X[m])){var B=this.dummyToNodeForHorizontalAlignment.get(X[m]);z+=B.length*this.idToNodeMap.get(B[0]).displacementY,W+=B.length}else z+=this.idToNodeMap.get(X[m]).displacementY,W++;for(var Q=z/W,m=0;m<X.length;m++)this.dummyToNodeForHorizontalAlignment.has(X[m])?this.dummyToNodeForHorizontalAlignment.get(X[m]).forEach(function(et){r.idToNodeMap.get(et).displacementY=Q}):this.idToNodeMap.get(X[m]).displacementY=Q}}}},O.prototype.calculateNodesToApplyGravitationTo=function(){var r=[],E,v=this.graphManager.getGraphs(),p=v.length,m;for(m=0;m<p;m++)E=v[m],E.updateConnected(),E.isConnected||(r=r.concat(E.getNodes()));return r},O.prototype.createBendpoints=function(){var r=[];r=r.concat(this.graphManager.getAllEdges());var E=new Set,v;for(v=0;v<r.length;v++){var p=r[v];if(!E.has(p)){var m=p.getSource(),M=p.getTarget();if(m==M)p.getBendpoints().push(new y),p.getBendpoints().push(new y),this.createDummyNodesForBendpoints(p),E.add(p);else{var w=[];if(w=w.concat(m.getEdgeListToNode(M)),w=w.concat(M.getEdgeListToNode(m)),!E.has(w[0])){if(w.length>1){var x;for(x=0;x<w.length;x++){var F=w[x];F.getBendpoints().push(new y),this.createDummyNodesForBendpoints(F)}}w.forEach(function(X){E.add(X)})}}}if(E.size==r.length)break}},O.prototype.positionNodesRadially=function(r){for(var E=new g(0,0),v=Math.ceil(Math.sqrt(r.length)),p=0,m=0,M=0,w=new y(0,0),x=0;x<r.length;x++){x%v==0&&(M=0,m=p,x!=0&&(m+=s.DEFAULT_COMPONENT_SEPERATION),p=0);var F=r[x],X=I.findCenterOfTree(F);E.x=M,E.y=m,w=O.radialLayout(F,X,E),w.y>p&&(p=Math.floor(w.y)),M=Math.floor(w.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new y(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},O.radialLayout=function(r,E,v){var p=Math.max(this.maxDiagonalInTree(r),s.DEFAULT_RADIAL_SEPARATION);O.branchRadialLayout(E,null,0,359,0,p);var m=U.calculateBounds(r),M=new Y;M.setDeviceOrgX(m.getMinX()),M.setDeviceOrgY(m.getMinY()),M.setWorldOrgX(v.x),M.setWorldOrgY(v.y);for(var w=0;w<r.length;w++){var x=r[w];x.transform(M)}var F=new y(m.getMaxX(),m.getMaxY());return M.inverseTransformPoint(F)},O.branchRadialLayout=function(r,E,v,p,m,M){var w=(p-v+1)/2;w<0&&(w+=180);var x=(w+v)%360,F=x*S.TWO_PI/360,X=m*Math.cos(F),z=m*Math.sin(F);r.setCenter(X,z);var W=[];W=W.concat(r.getEdges());var B=W.length;E!=null&&B--;for(var Q=0,G=W.length,D,b=r.getEdgesBetween(E);b.length>1;){var q=b[0];b.splice(0,1);var et=W.indexOf(q);et>=0&&W.splice(et,1),G--,B--}E!=null?D=(W.indexOf(b[0])+1)%G:D=0;for(var vt=Math.abs(p-v)/B,j=D;Q!=B;j=++j%G){var xt=W[j].getOtherEnd(r);if(xt!=E){var J=(v+Q*vt)%360,nt=(J+vt)%360;O.branchRadialLayout(xt,r,J,nt,m+M,M),Q++}}},O.maxDiagonalInTree=function(r){for(var E=k.MIN_VALUE,v=0;v<r.length;v++){var p=r[v],m=p.getDiagonal();m>E&&(E=m)}return E},O.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},O.prototype.groupZeroDegreeMembers=function(){var r=this,E={};this.memberGroups={},this.idToDummyNode={};for(var v=[],p=this.graphManager.getAllNodes(),m=0;m<p.length;m++){var M=p[m],w=M.getParent();this.getNodeDegreeWithChildren(M)===0&&(w.id==null||!this.getToBeTiled(w))&&v.push(M)}for(var m=0;m<v.length;m++){var M=v[m],x=M.getParent().id;typeof E[x]>"u"&&(E[x]=[]),E[x]=E[x].concat(M)}Object.keys(E).forEach(function(F){if(E[F].length>1){var X="DummyCompound_"+F;r.memberGroups[X]=E[F];var z=E[F][0].getParent(),W=new t(r.graphManager);W.id=X,W.paddingLeft=z.paddingLeft||0,W.paddingRight=z.paddingRight||0,W.paddingBottom=z.paddingBottom||0,W.paddingTop=z.paddingTop||0,r.idToDummyNode[X]=W;var B=r.getGraphManager().add(r.newGraph(),W),Q=z.getChild();Q.add(W);for(var G=0;G<E[F].length;G++){var D=E[F][G];Q.remove(D),B.add(D)}}})},O.prototype.clearCompounds=function(){var r={},E={};this.performDFSOnCompounds();for(var v=0;v<this.compoundOrder.length;v++)E[this.compoundOrder[v].id]=this.compoundOrder[v],r[this.compoundOrder[v].id]=[].concat(this.compoundOrder[v].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[v].getChild()),this.compoundOrder[v].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(r,E)},O.prototype.clearZeroDegreeMembers=function(){var r=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(v){var p=r.idToDummyNode[v];if(E[v]=r.tileNodes(r.memberGroups[v],p.paddingLeft+p.paddingRight),p.rect.width=E[v].width,p.rect.height=E[v].height,p.setCenter(E[v].centerX,E[v].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var m=p.rect.width,M=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(m+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>m?(p.rect.x-=(p.labelWidth-m)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-m)/2):p.labelPosHorizontal=="right"&&p.setWidth(m+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(M+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>M?(p.rect.y-=(p.labelHeight-M)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-M)/2):p.labelPosVertical=="bottom"&&p.setHeight(M+p.labelHeight))}})},O.prototype.repopulateCompounds=function(){for(var r=this.compoundOrder.length-1;r>=0;r--){var E=this.compoundOrder[r],v=E.id,p=E.paddingLeft,m=E.paddingTop,M=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[v],E.rect.x,E.rect.y,p,m,M,w)}},O.prototype.repopulateZeroDegreeMembers=function(){var r=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(v){var p=r.idToDummyNode[v],m=p.paddingLeft,M=p.paddingTop,w=p.labelMarginLeft,x=p.labelMarginTop;r.adjustLocations(E[v],p.rect.x,p.rect.y,m,M,w,x)})},O.prototype.getToBeTiled=function(r){var E=r.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var v=r.getChild();if(v==null)return this.toBeTiled[E]=!1,!1;for(var p=v.getNodes(),m=0;m<p.length;m++){var M=p[m];if(this.getNodeDegree(M)>0)return this.toBeTiled[E]=!1,!1;if(M.getChild()==null){this.toBeTiled[M.id]=!1;continue}if(!this.getToBeTiled(M))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},O.prototype.getNodeDegree=function(r){r.id;for(var E=r.getEdges(),v=0,p=0;p<E.length;p++){var m=E[p];m.getSource().id!==m.getTarget().id&&(v=v+1)}return v},O.prototype.getNodeDegreeWithChildren=function(r){var E=this.getNodeDegree(r);if(r.getChild()==null)return E;for(var v=r.getChild().getNodes(),p=0;p<v.length;p++){var m=v[p];E+=this.getNodeDegreeWithChildren(m)}return E},O.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},O.prototype.fillCompexOrderByDFS=function(r){for(var E=0;E<r.length;E++){var v=r[E];v.getChild()!=null&&this.fillCompexOrderByDFS(v.getChild().getNodes()),this.getToBeTiled(v)&&this.compoundOrder.push(v)}},O.prototype.adjustLocations=function(r,E,v,p,m,M,w){E+=p+M,v+=m+w;for(var x=E,F=0;F<r.rows.length;F++){var X=r.rows[F];E=x;for(var z=0,W=0;W<X.length;W++){var B=X[W];B.rect.x=E,B.rect.y=v,E+=B.rect.width+r.horizontalPadding,B.rect.height>z&&(z=B.rect.height)}v+=z+r.verticalPadding}},O.prototype.tileCompoundMembers=function(r,E){var v=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(p){var m=E[p];if(v.tiledMemberPack[p]=v.tileNodes(r[p],m.paddingLeft+m.paddingRight),m.rect.width=v.tiledMemberPack[p].width,m.rect.height=v.tiledMemberPack[p].height,m.setCenter(v.tiledMemberPack[p].centerX,v.tiledMemberPack[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var M=m.rect.width,w=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(M+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>M?(m.rect.x-=(m.labelWidth-M)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-M)/2):m.labelPosHorizontal=="right"&&m.setWidth(M+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(w+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>w?(m.rect.y-=(m.labelHeight-w)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-w)/2):m.labelPosVertical=="bottom"&&m.setHeight(w+m.labelHeight))}})},O.prototype.tileNodes=function(r,E){var v=this.tileNodesByFavoringDim(r,E,!0),p=this.tileNodesByFavoringDim(r,E,!1),m=this.getOrgRatio(v),M=this.getOrgRatio(p),w;return M<m?w=p:w=v,w},O.prototype.getOrgRatio=function(r){var E=r.width,v=r.height,p=E/v;return p<1&&(p=1/p),p},O.prototype.calcIdealRowWidth=function(r,E){var v=s.TILING_PADDING_VERTICAL,p=s.TILING_PADDING_HORIZONTAL,m=r.length,M=0,w=0,x=0;r.forEach(function(G){M+=G.getWidth(),w+=G.getHeight(),G.getWidth()>x&&(x=G.getWidth())});var F=M/m,X=w/m,z=Math.pow(v-p,2)+4*(F+p)*(X+v)*m,W=(p-v+Math.sqrt(z))/(2*(F+p)),B;E?(B=Math.ceil(W),B==W&&B++):B=Math.floor(W);var Q=B*(F+p)-p;return x>Q&&(Q=x),Q+=p*2,Q},O.prototype.tileNodesByFavoringDim=function(r,E,v){var p=s.TILING_PADDING_VERTICAL,m=s.TILING_PADDING_HORIZONTAL,M=s.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:p,horizontalPadding:m,centerX:0,centerY:0};M&&(w.idealRowWidth=this.calcIdealRowWidth(r,v));var x=function(G){return G.rect.width*G.rect.height},F=function(G,D){return x(D)-x(G)};r.sort(function(G,D){var b=F;return w.idealRowWidth?(b=M,b(G.id,D.id)):b(G,D)});for(var X=0,z=0,W=0;W<r.length;W++){var B=r[W];X+=B.getCenterX(),z+=B.getCenterY()}w.centerX=X/r.length,w.centerY=z/r.length;for(var W=0;W<r.length;W++){var B=r[W];if(w.rows.length==0)this.insertNodeToRow(w,B,0,E);else if(this.canAddHorizontal(w,B.rect.width,B.rect.height)){var Q=w.rows.length-1;w.idealRowWidth||(Q=this.getShortestRowIndex(w)),this.insertNodeToRow(w,B,Q,E)}else this.insertNodeToRow(w,B,w.rows.length,E);this.shiftToLastRow(w)}return w},O.prototype.insertNodeToRow=function(r,E,v,p){var m=p;if(v==r.rows.length){var M=[];r.rows.push(M),r.rowWidth.push(m),r.rowHeight.push(0)}var w=r.rowWidth[v]+E.rect.width;r.rows[v].length>0&&(w+=r.horizontalPadding),r.rowWidth[v]=w,r.width<w&&(r.width=w);var x=E.rect.height;v>0&&(x+=r.verticalPadding);var F=0;x>r.rowHeight[v]&&(F=r.rowHeight[v],r.rowHeight[v]=x,F=r.rowHeight[v]-F),r.height+=F,r.rows[v].push(E)},O.prototype.getShortestRowIndex=function(r){for(var E=-1,v=Number.MAX_VALUE,p=0;p<r.rows.length;p++)r.rowWidth[p]<v&&(E=p,v=r.rowWidth[p]);return E},O.prototype.getLongestRowIndex=function(r){for(var E=-1,v=Number.MIN_VALUE,p=0;p<r.rows.length;p++)r.rowWidth[p]>v&&(E=p,v=r.rowWidth[p]);return E},O.prototype.canAddHorizontal=function(r,E,v){if(r.idealRowWidth){var p=r.rows.length-1,m=r.rowWidth[p];return m+E+r.horizontalPadding<=r.idealRowWidth}var M=this.getShortestRowIndex(r);if(M<0)return!0;var w=r.rowWidth[M];if(w+r.horizontalPadding+E<=r.width)return!0;var x=0;r.rowHeight[M]<v&&M>0&&(x=v+r.verticalPadding-r.rowHeight[M]);var F;r.width-w>=E+r.horizontalPadding?F=(r.height+x)/(w+E+r.horizontalPadding):F=(r.height+x)/r.width,x=v+r.verticalPadding;var X;return r.width<E?X=(r.height+x)/E:X=(r.height+x)/r.width,X<1&&(X=1/X),F<1&&(F=1/F),F<X},O.prototype.shiftToLastRow=function(r){var E=this.getLongestRowIndex(r),v=r.rowWidth.length-1,p=r.rows[E],m=p[p.length-1],M=m.width+r.horizontalPadding;if(r.width-r.rowWidth[v]>M&&E!=v){p.splice(-1,1),r.rows[v].push(m),r.rowWidth[E]=r.rowWidth[E]-M,r.rowWidth[v]=r.rowWidth[v]+M,r.width=r.rowWidth[instance.getLongestRowIndex(r)];for(var w=Number.MIN_VALUE,x=0;x<p.length;x++)p[x].height>w&&(w=p[x].height);E>0&&(w+=r.verticalPadding);var F=r.rowHeight[E]+r.rowHeight[v];r.rowHeight[E]=w,r.rowHeight[v]<m.height+r.verticalPadding&&(r.rowHeight[v]=m.height+r.verticalPadding);var X=r.rowHeight[E]+r.rowHeight[v];r.height+=X-F,this.shiftToLastRow(r)}},O.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},O.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},O.prototype.reduceTrees=function(){for(var r=[],E=!0,v;E;){var p=this.graphManager.getAllNodes(),m=[];E=!1;for(var M=0;M<p.length;M++)if(v=p[M],v.getEdges().length==1&&!v.getEdges()[0].isInterGraph&&v.getChild()==null){if(s.PURE_INCREMENTAL){var w=v.getEdges()[0].getOtherEnd(v),x=new A(v.getCenterX()-w.getCenterX(),v.getCenterY()-w.getCenterY());m.push([v,v.getEdges()[0],v.getOwner(),x])}else m.push([v,v.getEdges()[0],v.getOwner()]);E=!0}if(E==!0){for(var F=[],X=0;X<m.length;X++)m[X][0].getEdges().length==1&&(F.push(m[X]),m[X][0].getOwner().remove(m[X][0]));r.push(F),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=r},O.prototype.growTree=function(r){for(var E=r.length,v=r[E-1],p,m=0;m<v.length;m++)p=v[m],this.findPlaceforPrunedNode(p),p[2].add(p[0]),p[2].add(p[1],p[1].source,p[1].target);r.splice(r.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},O.prototype.findPlaceforPrunedNode=function(r){var E,v,p=r[0];if(p==r[1].source?v=r[1].target:v=r[1].source,s.PURE_INCREMENTAL)p.setCenter(v.getCenterX()+r[3].getWidth(),v.getCenterY()+r[3].getHeight());else{var m=v.startX,M=v.finishX,w=v.startY,x=v.finishY,F=0,X=0,z=0,W=0,B=[F,z,X,W];if(w>0)for(var Q=m;Q<=M;Q++)B[0]+=this.grid[Q][w-1].length+this.grid[Q][w].length-1;if(M<this.grid.length-1)for(var Q=w;Q<=x;Q++)B[1]+=this.grid[M+1][Q].length+this.grid[M][Q].length-1;if(x<this.grid[0].length-1)for(var Q=m;Q<=M;Q++)B[2]+=this.grid[Q][x+1].length+this.grid[Q][x].length-1;if(m>0)for(var Q=w;Q<=x;Q++)B[3]+=this.grid[m-1][Q].length+this.grid[m][Q].length-1;for(var G=k.MAX_VALUE,D,b,q=0;q<B.length;q++)B[q]<G?(G=B[q],D=1,b=q):B[q]==G&&D++;if(D==3&&G==0)B[0]==0&&B[1]==0&&B[2]==0?E=1:B[0]==0&&B[1]==0&&B[3]==0?E=0:B[0]==0&&B[2]==0&&B[3]==0?E=3:B[1]==0&&B[2]==0&&B[3]==0&&(E=2);else if(D==2&&G==0){var et=Math.floor(Math.random()*2);B[0]==0&&B[1]==0?et==0?E=0:E=1:B[0]==0&&B[2]==0?et==0?E=0:E=2:B[0]==0&&B[3]==0?et==0?E=0:E=3:B[1]==0&&B[2]==0?et==0?E=1:E=2:B[1]==0&&B[3]==0?et==0?E=1:E=3:et==0?E=2:E=3}else if(D==4&&G==0){var et=Math.floor(Math.random()*4);E=et}else E=b;E==0?p.setCenter(v.getCenterX(),v.getCenterY()-v.getHeight()/2-d.DEFAULT_EDGE_LENGTH-p.getHeight()/2):E==1?p.setCenter(v.getCenterX()+v.getWidth()/2+d.DEFAULT_EDGE_LENGTH+p.getWidth()/2,v.getCenterY()):E==2?p.setCenter(v.getCenterX(),v.getCenterY()+v.getHeight()/2+d.DEFAULT_EDGE_LENGTH+p.getHeight()/2):p.setCenter(v.getCenterX()-v.getWidth()/2-d.DEFAULT_EDGE_LENGTH-p.getWidth()/2,v.getCenterY())}},o.exports=O},991:(o,i,e)=>{var a=e(551).FDLayoutNode,n=e(551).IMath;function f(h,s,c,d){a.call(this,h,s,c,d)}f.prototype=Object.create(a.prototype);for(var t in a)f[t]=a[t];f.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},f.prototype.propogateDisplacementToChildren=function(h,s){for(var c=this.getChild().getNodes(),d,T=0;T<c.length;T++)d=c[T],d.getChild()==null?(d.displacementX+=h,d.displacementY+=s):d.propogateDisplacementToChildren(h,s)},f.prototype.move=function(){var h=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),h.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},f.prototype.setPred1=function(h){this.pred1=h},f.prototype.getPred1=function(){return pred1},f.prototype.getPred2=function(){return pred2},f.prototype.setNext=function(h){this.next=h},f.prototype.getNext=function(){return next},f.prototype.setProcessed=function(h){this.processed=h},f.prototype.isProcessed=function(){return processed},o.exports=f},902:(o,i,e)=>{function a(c){if(Array.isArray(c)){for(var d=0,T=Array(c.length);d<c.length;d++)T[d]=c[d];return T}else return Array.from(c)}var n=e(806),f=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function s(){}s.handleConstraints=function(c){var d={};d.fixedNodeConstraint=c.constraints.fixedNodeConstraint,d.alignmentConstraint=c.constraints.alignmentConstraint,d.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,y=[],A=[],I=c.getAllNodes(),k=0,S=0;S<I.length;S++){var U=I[S];U.getChild()==null&&(g.set(U.id,k++),y.push(U.getCenterX()),A.push(U.getCenterY()),T.set(U.id,U))}d.relativePlacementConstraint&&d.relativePlacementConstraint.forEach(function(_){!_.gap&&_.gap!=0&&(_.left?_.gap=n.DEFAULT_EDGE_LENGTH+T.get(_.left).getWidth()/2+T.get(_.right).getWidth()/2:_.gap=n.DEFAULT_EDGE_LENGTH+T.get(_.top).getHeight()/2+T.get(_.bottom).getHeight()/2)});var Y=function(_,R){return{x:_.x-R.x,y:_.y-R.y}},$=function(_){var R=0,V=0;return _.forEach(function(Z){R+=y[g.get(Z)],V+=A[g.get(Z)]}),{x:R/_.size,y:V/_.size}},O=function(_,R,V,Z,K){function ft(lt,ot){var at=new Set(lt),Ct=!0,gt=!1,Mt=void 0;try{for(var St=ot[Symbol.iterator](),It;!(Ct=(It=St.next()).done);Ct=!0){var Tt=It.value;at.add(Tt)}}catch(Ut){gt=!0,Mt=Ut}finally{try{!Ct&&St.return&&St.return()}finally{if(gt)throw Mt}}return at}var ht=new Map;_.forEach(function(lt,ot){ht.set(ot,0)}),_.forEach(function(lt,ot){lt.forEach(function(at){ht.set(at.id,ht.get(at.id)+1)})});var tt=new Map,ct=new Map,it=new f;ht.forEach(function(lt,ot){lt==0?(it.push(ot),V||(R=="horizontal"?tt.set(ot,g.has(ot)?y[g.get(ot)]:Z.get(ot)):tt.set(ot,g.has(ot)?A[g.get(ot)]:Z.get(ot)))):tt.set(ot,Number.NEGATIVE_INFINITY),V&&ct.set(ot,new Set([ot]))}),V&&K.forEach(function(lt){var ot=[];if(lt.forEach(function(gt){V.has(gt)&&ot.push(gt)}),ot.length>0){var at=0;ot.forEach(function(gt){R=="horizontal"?(tt.set(gt,g.has(gt)?y[g.get(gt)]:Z.get(gt)),at+=tt.get(gt)):(tt.set(gt,g.has(gt)?A[g.get(gt)]:Z.get(gt)),at+=tt.get(gt))}),at=at/ot.length,lt.forEach(function(gt){V.has(gt)||tt.set(gt,at)})}else{var Ct=0;lt.forEach(function(gt){R=="horizontal"?Ct+=g.has(gt)?y[g.get(gt)]:Z.get(gt):Ct+=g.has(gt)?A[g.get(gt)]:Z.get(gt)}),Ct=Ct/lt.length,lt.forEach(function(gt){tt.set(gt,Ct)})}});for(var Et=function(){var lt=it.shift(),ot=_.get(lt);ot.forEach(function(at){if(tt.get(at.id)<tt.get(lt)+at.gap)if(V&&V.has(at.id)){var Ct=void 0;if(R=="horizontal"?Ct=g.has(at.id)?y[g.get(at.id)]:Z.get(at.id):Ct=g.has(at.id)?A[g.get(at.id)]:Z.get(at.id),tt.set(at.id,Ct),Ct<tt.get(lt)+at.gap){var gt=tt.get(lt)+at.gap-Ct;ct.get(lt).forEach(function(Mt){tt.set(Mt,tt.get(Mt)-gt)})}}else tt.set(at.id,tt.get(lt)+at.gap);ht.set(at.id,ht.get(at.id)-1),ht.get(at.id)==0&&it.push(at.id),V&&ct.set(at.id,ft(ct.get(lt),ct.get(at.id)))})};it.length!=0;)Et();if(V){var yt=new Set;_.forEach(function(lt,ot){lt.length==0&&yt.add(ot)});var Ot=[];ct.forEach(function(lt,ot){if(yt.has(ot)){var at=!1,Ct=!0,gt=!1,Mt=void 0;try{for(var St=lt[Symbol.iterator](),It;!(Ct=(It=St.next()).done);Ct=!0){var Tt=It.value;V.has(Tt)&&(at=!0)}}catch(Dt){gt=!0,Mt=Dt}finally{try{!Ct&&St.return&&St.return()}finally{if(gt)throw Mt}}if(!at){var Ut=!1,kt=void 0;Ot.forEach(function(Dt,Ft){Dt.has([].concat(a(lt))[0])&&(Ut=!0,kt=Ft)}),Ut?lt.forEach(function(Dt){Ot[kt].add(Dt)}):Ot.push(new Set(lt))}}}),Ot.forEach(function(lt,ot){var at=Number.POSITIVE_INFINITY,Ct=Number.POSITIVE_INFINITY,gt=Number.NEGATIVE_INFINITY,Mt=Number.NEGATIVE_INFINITY,St=!0,It=!1,Tt=void 0;try{for(var Ut=lt[Symbol.iterator](),kt;!(St=(kt=Ut.next()).done);St=!0){var Dt=kt.value,Ft=void 0;R=="horizontal"?Ft=g.has(Dt)?y[g.get(Dt)]:Z.get(Dt):Ft=g.has(Dt)?A[g.get(Dt)]:Z.get(Dt);var qt=tt.get(Dt);Ft<at&&(at=Ft),Ft>gt&&(gt=Ft),qt<Ct&&(Ct=qt),qt>Mt&&(Mt=qt)}}catch($t){It=!0,Tt=$t}finally{try{!St&&Ut.return&&Ut.return()}finally{if(It)throw Tt}}var oe=(at+gt)/2-(Ct+Mt)/2,ee=!0,Qt=!1,Kt=void 0;try{for(var jt=lt[Symbol.iterator](),Zt;!(ee=(Zt=jt.next()).done);ee=!0){var re=Zt.value;tt.set(re,tt.get(re)+oe)}}catch($t){Qt=!0,Kt=$t}finally{try{!ee&&jt.return&&jt.return()}finally{if(Qt)throw Kt}}})}return tt},rt=function(_){var R=0,V=0,Z=0,K=0;if(_.forEach(function(ct){ct.left?y[g.get(ct.left)]-y[g.get(ct.right)]>=0?R++:V++:A[g.get(ct.top)]-A[g.get(ct.bottom)]>=0?Z++:K++}),R>V&&Z>K)for(var ft=0;ft<g.size;ft++)y[ft]=-1*y[ft],A[ft]=-1*A[ft];else if(R>V)for(var ht=0;ht<g.size;ht++)y[ht]=-1*y[ht];else if(Z>K)for(var tt=0;tt<g.size;tt++)A[tt]=-1*A[tt]},r=function(_){var R=[],V=new f,Z=new Set,K=0;return _.forEach(function(ft,ht){if(!Z.has(ht)){R[K]=[];var tt=ht;for(V.push(tt),Z.add(tt),R[K].push(tt);V.length!=0;){tt=V.shift();var ct=_.get(tt);ct.forEach(function(it){Z.has(it.id)||(V.push(it.id),Z.add(it.id),R[K].push(it.id))})}K++}}),R},E=function(_){var R=new Map;return _.forEach(function(V,Z){R.set(Z,[])}),_.forEach(function(V,Z){V.forEach(function(K){R.get(Z).push(K),R.get(K.id).push({id:Z,gap:K.gap,direction:K.direction})})}),R},v=function(_){var R=new Map;return _.forEach(function(V,Z){R.set(Z,[])}),_.forEach(function(V,Z){V.forEach(function(K){R.get(K.id).push({id:Z,gap:K.gap,direction:K.direction})})}),R},p=[],m=[],M=!1,w=!1,x=new Set,F=new Map,X=new Map,z=[];if(d.fixedNodeConstraint&&d.fixedNodeConstraint.forEach(function(_){x.add(_.nodeId)}),d.relativePlacementConstraint&&(d.relativePlacementConstraint.forEach(function(_){_.left?(F.has(_.left)?F.get(_.left).push({id:_.right,gap:_.gap,direction:"horizontal"}):F.set(_.left,[{id:_.right,gap:_.gap,direction:"horizontal"}]),F.has(_.right)||F.set(_.right,[])):(F.has(_.top)?F.get(_.top).push({id:_.bottom,gap:_.gap,direction:"vertical"}):F.set(_.top,[{id:_.bottom,gap:_.gap,direction:"vertical"}]),F.has(_.bottom)||F.set(_.bottom,[]))}),X=E(F),z=r(X)),n.TRANSFORM_ON_CONSTRAINT_HANDLING){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>1)d.fixedNodeConstraint.forEach(function(_,R){p[R]=[_.position.x,_.position.y],m[R]=[y[g.get(_.nodeId)],A[g.get(_.nodeId)]]}),M=!0;else if(d.alignmentConstraint)(function(){var _=0;if(d.alignmentConstraint.vertical){for(var R=d.alignmentConstraint.vertical,V=function(tt){var ct=new Set;R[tt].forEach(function(yt){ct.add(yt)});var it=new Set([].concat(a(ct)).filter(function(yt){return x.has(yt)})),Et=void 0;it.size>0?Et=y[g.get(it.values().next().value)]:Et=$(ct).x,R[tt].forEach(function(yt){p[_]=[Et,A[g.get(yt)]],m[_]=[y[g.get(yt)],A[g.get(yt)]],_++})},Z=0;Z<R.length;Z++)V(Z);M=!0}if(d.alignmentConstraint.horizontal){for(var K=d.alignmentConstraint.horizontal,ft=function(tt){var ct=new Set;K[tt].forEach(function(yt){ct.add(yt)});var it=new Set([].concat(a(ct)).filter(function(yt){return x.has(yt)})),Et=void 0;it.size>0?Et=y[g.get(it.values().next().value)]:Et=$(ct).y,K[tt].forEach(function(yt){p[_]=[y[g.get(yt)],Et],m[_]=[y[g.get(yt)],A[g.get(yt)]],_++})},ht=0;ht<K.length;ht++)ft(ht);M=!0}d.relativePlacementConstraint&&(w=!0)})();else if(d.relativePlacementConstraint){for(var W=0,B=0,Q=0;Q<z.length;Q++)z[Q].length>W&&(W=z[Q].length,B=Q);if(W<X.size/2)rt(d.relativePlacementConstraint),M=!1,w=!1;else{var G=new Map,D=new Map,b=[];z[B].forEach(function(_){F.get(_).forEach(function(R){R.direction=="horizontal"?(G.has(_)?G.get(_).push(R):G.set(_,[R]),G.has(R.id)||G.set(R.id,[]),b.push({left:_,right:R.id})):(D.has(_)?D.get(_).push(R):D.set(_,[R]),D.has(R.id)||D.set(R.id,[]),b.push({top:_,bottom:R.id}))})}),rt(b),w=!1;var q=O(G,"horizontal"),et=O(D,"vertical");z[B].forEach(function(_,R){m[R]=[y[g.get(_)],A[g.get(_)]],p[R]=[],q.has(_)?p[R][0]=q.get(_):p[R][0]=y[g.get(_)],et.has(_)?p[R][1]=et.get(_):p[R][1]=A[g.get(_)]}),M=!0}}if(M){for(var vt=void 0,j=t.transpose(p),xt=t.transpose(m),J=0;J<j.length;J++)j[J]=t.multGamma(j[J]),xt[J]=t.multGamma(xt[J]);var nt=t.multMat(j,t.transpose(xt)),mt=h.svd(nt);vt=t.multMat(mt.V,t.transpose(mt.U));for(var st=0;st<g.size;st++){var Lt=[y[st],A[st]],_t=[vt[0][0],vt[1][0]],Nt=[vt[0][1],vt[1][1]];y[st]=t.dotProduct(Lt,_t),A[st]=t.dotProduct(Lt,Nt)}w&&rt(d.relativePlacementConstraint)}}if(n.ENFORCE_CONSTRAINTS){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>0){var At={x:0,y:0};d.fixedNodeConstraint.forEach(function(_,R){var V={x:y[g.get(_.nodeId)],y:A[g.get(_.nodeId)]},Z=_.position,K=Y(Z,V);At.x+=K.x,At.y+=K.y}),At.x/=d.fixedNodeConstraint.length,At.y/=d.fixedNodeConstraint.length,y.forEach(function(_,R){y[R]+=At.x}),A.forEach(function(_,R){A[R]+=At.y}),d.fixedNodeConstraint.forEach(function(_){y[g.get(_.nodeId)]=_.position.x,A[g.get(_.nodeId)]=_.position.y})}if(d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var Ht=d.alignmentConstraint.vertical,Rt=function(_){var R=new Set;Ht[_].forEach(function(K){R.add(K)});var V=new Set([].concat(a(R)).filter(function(K){return x.has(K)})),Z=void 0;V.size>0?Z=y[g.get(V.values().next().value)]:Z=$(R).x,R.forEach(function(K){x.has(K)||(y[g.get(K)]=Z)})},bt=0;bt<Ht.length;bt++)Rt(bt);if(d.alignmentConstraint.horizontal)for(var Gt=d.alignmentConstraint.horizontal,Bt=function(_){var R=new Set;Gt[_].forEach(function(K){R.add(K)});var V=new Set([].concat(a(R)).filter(function(K){return x.has(K)})),Z=void 0;V.size>0?Z=A[g.get(V.values().next().value)]:Z=$(R).y,R.forEach(function(K){x.has(K)||(A[g.get(K)]=Z)})},Pt=0;Pt<Gt.length;Pt++)Bt(Pt)}d.relativePlacementConstraint&&function(){var _=new Map,R=new Map,V=new Map,Z=new Map,K=new Map,ft=new Map,ht=new Set,tt=new Set;if(x.forEach(function(ut){ht.add(ut),tt.add(ut)}),d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var ct=d.alignmentConstraint.vertical,it=function(ut){V.set("dummy"+ut,[]),ct[ut].forEach(function(wt){_.set(wt,"dummy"+ut),V.get("dummy"+ut).push(wt),x.has(wt)&&ht.add("dummy"+ut)}),K.set("dummy"+ut,y[g.get(ct[ut][0])])},Et=0;Et<ct.length;Et++)it(Et);if(d.alignmentConstraint.horizontal)for(var yt=d.alignmentConstraint.horizontal,Ot=function(ut){Z.set("dummy"+ut,[]),yt[ut].forEach(function(wt){R.set(wt,"dummy"+ut),Z.get("dummy"+ut).push(wt),x.has(wt)&&tt.add("dummy"+ut)}),ft.set("dummy"+ut,A[g.get(yt[ut][0])])},lt=0;lt<yt.length;lt++)Ot(lt)}var ot=new Map,at=new Map,Ct=function(ut){F.get(ut).forEach(function(wt){var Yt=void 0,Wt=void 0;wt.direction=="horizontal"?(Yt=_.get(ut)?_.get(ut):ut,_.get(wt.id)?Wt={id:_.get(wt.id),gap:wt.gap,direction:wt.direction}:Wt=wt,ot.has(Yt)?ot.get(Yt).push(Wt):ot.set(Yt,[Wt]),ot.has(Wt.id)||ot.set(Wt.id,[])):(Yt=R.get(ut)?R.get(ut):ut,R.get(wt.id)?Wt={id:R.get(wt.id),gap:wt.gap,direction:wt.direction}:Wt=wt,at.has(Yt)?at.get(Yt).push(Wt):at.set(Yt,[Wt]),at.has(Wt.id)||at.set(Wt.id,[]))})},gt=!0,Mt=!1,St=void 0;try{for(var It=F.keys()[Symbol.iterator](),Tt;!(gt=(Tt=It.next()).done);gt=!0){var Ut=Tt.value;Ct(Ut)}}catch(ut){Mt=!0,St=ut}finally{try{!gt&&It.return&&It.return()}finally{if(Mt)throw St}}var kt=E(ot),Dt=E(at),Ft=r(kt),qt=r(Dt),oe=v(ot),ee=v(at),Qt=[],Kt=[];Ft.forEach(function(ut,wt){Qt[wt]=[],ut.forEach(function(Yt){oe.get(Yt).length==0&&Qt[wt].push(Yt)})}),qt.forEach(function(ut,wt){Kt[wt]=[],ut.forEach(function(Yt){ee.get(Yt).length==0&&Kt[wt].push(Yt)})});var jt=O(ot,"horizontal",ht,K,Qt),Zt=O(at,"vertical",tt,ft,Kt),re=function(ut){V.get(ut)?V.get(ut).forEach(function(wt){y[g.get(wt)]=jt.get(ut)}):y[g.get(ut)]=jt.get(ut)},$t=!0,Ee=!1,Ne=void 0;try{for(var ae=jt.keys()[Symbol.iterator](),Te;!($t=(Te=ae.next()).done);$t=!0){var se=Te.value;re(se)}}catch(ut){Ee=!0,Ne=ut}finally{try{!$t&&ae.return&&ae.return()}finally{if(Ee)throw Ne}}var We=function(ut){Z.get(ut)?Z.get(ut).forEach(function(wt){A[g.get(wt)]=Zt.get(ut)}):A[g.get(ut)]=Zt.get(ut)},he=!0,Ae=!1,Ce=void 0;try{for(var le=Zt.keys()[Symbol.iterator](),Ie;!(he=(Ie=le.next()).done);he=!0){var se=Ie.value;We(se)}}catch(ut){Ae=!0,Ce=ut}finally{try{!he&&le.return&&le.return()}finally{if(Ae)throw Ce}}}()}for(var zt=0;zt<I.length;zt++){var dt=I[zt];dt.getChild()==null&&dt.setCenter(y[g.get(dt.id)],A[g.get(dt.id)])}},o.exports=s},551:o=>{o.exports=L}},N={};function u(o){var i=N[o];if(i!==void 0)return i.exports;var e=N[o]={exports:{}};return P[o](e,e.exports,u),e.exports}var l=u(45);return l})()})}(ue)),ue.exports}var pi=ge.exports,we;function vi(){return we||(we=1,function(C,H){(function(L,P){C.exports=P(fi())})(pi,function(L){return(()=>{var P={658:o=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(i){for(var e=arguments.length,a=Array(e>1?e-1:0),n=1;n<e;n++)a[n-1]=arguments[n];return a.forEach(function(f){Object.keys(f).forEach(function(t){return i[t]=f[t]})}),i}},548:(o,i,e)=>{var a=function(){function t(h,s){var c=[],d=!0,T=!1,g=void 0;try{for(var y=h[Symbol.iterator](),A;!(d=(A=y.next()).done)&&(c.push(A.value),!(s&&c.length===s));d=!0);}catch(I){T=!0,g=I}finally{try{!d&&y.return&&y.return()}finally{if(T)throw g}}return c}return function(h,s){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=e(140).layoutBase.LinkedList,f={};f.getTopMostNodes=function(t){for(var h={},s=0;s<t.length;s++)h[t[s].id()]=!0;var c=t.filter(function(d,T){typeof d=="number"&&(d=T);for(var g=d.parent()[0];g!=null;){if(h[g.id()])return!1;g=g.parent()[0]}return!0});return c},f.connectComponents=function(t,h,s,c){var d=new n,T=new Set,g=[],y=void 0,A=void 0,I=void 0,k=!1,S=1,U=[],Y=[],$=function(){var O=t.collection();Y.push(O);var rt=s[0],r=t.collection();r.merge(rt).merge(rt.descendants().intersection(h)),g.push(rt),r.forEach(function(p){d.push(p),T.add(p),O.merge(p)});for(var E=function(){rt=d.shift();var p=t.collection();rt.neighborhood().nodes().forEach(function(x){h.intersection(rt.edgesWith(x)).length>0&&p.merge(x)});for(var m=0;m<p.length;m++){var M=p[m];if(y=s.intersection(M.union(M.ancestors())),y!=null&&!T.has(y[0])){var w=y.union(y.descendants());w.forEach(function(x){d.push(x),T.add(x),O.merge(x),s.has(x)&&g.push(x)})}}};d.length!=0;)E();if(O.forEach(function(p){h.intersection(p.connectedEdges()).forEach(function(m){O.has(m.source())&&O.has(m.target())&&O.merge(m)})}),g.length==s.length&&(k=!0),!k||k&&S>1){A=g[0],I=A.connectedEdges().length,g.forEach(function(p){p.connectedEdges().length<I&&(I=p.connectedEdges().length,A=p)}),U.push(A.id());var v=t.collection();v.merge(g[0]),g.forEach(function(p){v.merge(p)}),g=[],s=s.difference(v),S++}};do $();while(!k);return c&&U.length>0&&c.set("dummy"+(c.size+1),U),Y},f.relocateComponent=function(t,h,s){if(!s.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var y=!0,A=!1,I=void 0;try{for(var k=h.nodeIndexes[Symbol.iterator](),S;!(y=(S=k.next()).done);y=!0){var U=S.value,Y=a(U,2),$=Y[0],O=Y[1],rt=s.cy.getElementById($);if(rt){var r=rt.boundingBox(),E=h.xCoords[O]-r.w/2,v=h.xCoords[O]+r.w/2,p=h.yCoords[O]-r.h/2,m=h.yCoords[O]+r.h/2;E<c&&(c=E),v>d&&(d=v),p<T&&(T=p),m>g&&(g=m)}}}catch(X){A=!0,I=X}finally{try{!y&&k.return&&k.return()}finally{if(A)throw I}}var M=t.x-(d+c)/2,w=t.y-(g+T)/2;h.xCoords=h.xCoords.map(function(X){return X+M}),h.yCoords=h.yCoords.map(function(X){return X+w})}else{Object.keys(h).forEach(function(X){var z=h[X],W=z.getRect().x,B=z.getRect().x+z.getRect().width,Q=z.getRect().y,G=z.getRect().y+z.getRect().height;W<c&&(c=W),B>d&&(d=B),Q<T&&(T=Q),G>g&&(g=G)});var x=t.x-(d+c)/2,F=t.y-(g+T)/2;Object.keys(h).forEach(function(X){var z=h[X];z.setCenter(z.getCenterX()+x,z.getCenterY()+F)})}}},f.calcBoundingBox=function(t,h,s,c){for(var d=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,y=Number.MIN_SAFE_INTEGER,A=void 0,I=void 0,k=void 0,S=void 0,U=t.descendants().not(":parent"),Y=U.length,$=0;$<Y;$++){var O=U[$];A=h[c.get(O.id())]-O.width()/2,I=h[c.get(O.id())]+O.width()/2,k=s[c.get(O.id())]-O.height()/2,S=s[c.get(O.id())]+O.height()/2,d>A&&(d=A),T<I&&(T=I),g>k&&(g=k),y<S&&(y=S)}var rt={};return rt.topLeftX=d,rt.topLeftY=g,rt.width=T-d,rt.height=y-g,rt},f.calcParentsWithoutChildren=function(t,h){var s=t.collection();return h.nodes(":parent").forEach(function(c){var d=!1;c.children().forEach(function(T){T.css("display")!="none"&&(d=!0)}),d||s.merge(c)}),s},o.exports=f},816:(o,i,e)=>{var a=e(548),n=e(140).CoSELayout,f=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,s=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,d=e(140).CoSEConstants,T=function(g,y){var A=g.cy,I=g.eles,k=I.nodes(),S=I.edges(),U=void 0,Y=void 0,$=void 0,O={};g.randomize&&(U=y.nodeIndexes,Y=y.xCoords,$=y.yCoords);var rt=function(x){return typeof x=="function"},r=function(x,F){return rt(x)?x(F):x},E=a.calcParentsWithoutChildren(A,I),v=function x(F,X,z,W){for(var B=X.length,Q=0;Q<B;Q++){var G=X[Q],D=null;G.intersection(E).length==0&&(D=G.children());var b=void 0,q=G.layoutDimensions({nodeDimensionsIncludeLabels:W.nodeDimensionsIncludeLabels});if(G.outerWidth()!=null&&G.outerHeight()!=null)if(W.randomize)if(!G.isParent())b=F.add(new f(z.graphManager,new t(Y[U.get(G.id())]-q.w/2,$[U.get(G.id())]-q.h/2),new h(parseFloat(q.w),parseFloat(q.h))));else{var et=a.calcBoundingBox(G,Y,$,U);G.intersection(E).length==0?b=F.add(new f(z.graphManager,new t(et.topLeftX,et.topLeftY),new h(et.width,et.height))):b=F.add(new f(z.graphManager,new t(et.topLeftX,et.topLeftY),new h(parseFloat(q.w),parseFloat(q.h))))}else b=F.add(new f(z.graphManager,new t(G.position("x")-q.w/2,G.position("y")-q.h/2),new h(parseFloat(q.w),parseFloat(q.h))));else b=F.add(new f(this.graphManager));if(b.id=G.data("id"),b.nodeRepulsion=r(W.nodeRepulsion,G),b.paddingLeft=parseInt(G.css("padding")),b.paddingTop=parseInt(G.css("padding")),b.paddingRight=parseInt(G.css("padding")),b.paddingBottom=parseInt(G.css("padding")),W.nodeDimensionsIncludeLabels&&(b.labelWidth=G.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,b.labelHeight=G.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,b.labelPosVertical=G.css("text-valign"),b.labelPosHorizontal=G.css("text-halign")),O[G.data("id")]=b,isNaN(b.rect.x)&&(b.rect.x=0),isNaN(b.rect.y)&&(b.rect.y=0),D!=null&&D.length>0){var vt=void 0;vt=z.getGraphManager().add(z.newGraph(),b),x(vt,D,z,W)}}},p=function(x,F,X){for(var z=0,W=0,B=0;B<X.length;B++){var Q=X[B],G=O[Q.data("source")],D=O[Q.data("target")];if(G&&D&&G!==D&&G.getEdgesBetween(D).length==0){var b=F.add(x.newEdge(),G,D);b.id=Q.id(),b.idealLength=r(g.idealEdgeLength,Q),b.edgeElasticity=r(g.edgeElasticity,Q),z+=b.idealLength,W++}}g.idealEdgeLength!=null&&(W>0?d.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=z/W:rt(g.idealEdgeLength)?d.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:d.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=g.idealEdgeLength,d.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,d.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},m=function(x,F){F.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=F.fixedNodeConstraint),F.alignmentConstraint&&(x.constraints.alignmentConstraint=F.alignmentConstraint),F.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=F.relativePlacementConstraint)};g.nestingFactor!=null&&(d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(d.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(d.MAX_ITERATIONS=c.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(d.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(d.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.tilingCompareBy!=null&&(d.TILING_COMPARE_BY=g.tilingCompareBy),g.quality=="proof"?s.QUALITY=2:s.QUALITY=0,d.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,d.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!g.randomize,d.ANIMATE=c.ANIMATE=s.ANIMATE=g.animate,d.TILE=g.tile,d.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,d.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal,d.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,d.PURE_INCREMENTAL=!g.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=g.uniformNodeDimensions,g.step=="transformed"&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!1),g.step=="enforced"&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!1),g.step=="cose"&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!0),g.step=="all"&&(g.randomize?d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!0),g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint?d.TREE_REDUCTION_ON_INCREMENTAL=!1:d.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new n,w=M.newGraphManager();return v(w.addRoot(),a.getTopMostNodes(k),M,g),p(M,w,S),m(M,g),M.runLayout(),O};o.exports={coseLayout:T}},212:(o,i,e)=>{var a=function(){function y(A,I){for(var k=0;k<I.length;k++){var S=I[k];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(A,S.key,S)}}return function(A,I,k){return I&&y(A.prototype,I),k&&y(A,k),A}}();function n(y,A){if(!(y instanceof A))throw new TypeError("Cannot call a class as a function")}var f=e(658),t=e(548),h=e(657),s=h.spectralLayout,c=e(816),d=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(y){return 4500},idealEdgeLength:function(y){return 50},edgeElasticity:function(y){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=function(){function y(A){n(this,y),this.options=f({},T,A)}return a(y,[{key:"run",value:function(){var A=this,I=this.options,k=I.cy,S=I.eles,U=[],Y=[],$=void 0,O=[];I.fixedNodeConstraint&&(!Array.isArray(I.fixedNodeConstraint)||I.fixedNodeConstraint.length==0)&&(I.fixedNodeConstraint=void 0),I.alignmentConstraint&&(I.alignmentConstraint.vertical&&(!Array.isArray(I.alignmentConstraint.vertical)||I.alignmentConstraint.vertical.length==0)&&(I.alignmentConstraint.vertical=void 0),I.alignmentConstraint.horizontal&&(!Array.isArray(I.alignmentConstraint.horizontal)||I.alignmentConstraint.horizontal.length==0)&&(I.alignmentConstraint.horizontal=void 0)),I.relativePlacementConstraint&&(!Array.isArray(I.relativePlacementConstraint)||I.relativePlacementConstraint.length==0)&&(I.relativePlacementConstraint=void 0);var rt=I.fixedNodeConstraint||I.alignmentConstraint||I.relativePlacementConstraint;rt&&(I.tile=!1,I.packComponents=!1);var r=void 0,E=!1;if(k.layoutUtilities&&I.packComponents&&(r=k.layoutUtilities("get"),r||(r=k.layoutUtilities()),E=!0),S.nodes().length>0)if(E){var v=t.getTopMostNodes(I.eles.nodes());if($=t.connectComponents(k,I.eles,v),$.forEach(function(J){var nt=J.boundingBox();O.push({x:nt.x1+nt.w/2,y:nt.y1+nt.h/2})}),I.randomize&&$.forEach(function(J){I.eles=J,U.push(s(I))}),I.quality=="default"||I.quality=="proof"){var p=k.collection();if(I.tile){var m=new Map,M=[],w=[],x=0,F={nodeIndexes:m,xCoords:M,yCoords:w},X=[];if($.forEach(function(J,nt){J.edges().length==0&&(J.nodes().forEach(function(mt,st){p.merge(J.nodes()[st]),mt.isParent()||(F.nodeIndexes.set(J.nodes()[st].id(),x++),F.xCoords.push(J.nodes()[0].position().x),F.yCoords.push(J.nodes()[0].position().y))}),X.push(nt))}),p.length>1){var z=p.boundingBox();O.push({x:z.x1+z.w/2,y:z.y1+z.h/2}),$.push(p),U.push(F);for(var W=X.length-1;W>=0;W--)$.splice(X[W],1),U.splice(X[W],1),O.splice(X[W],1)}}$.forEach(function(J,nt){I.eles=J,Y.push(d(I,U[nt])),t.relocateComponent(O[nt],Y[nt],I)})}else $.forEach(function(J,nt){t.relocateComponent(O[nt],U[nt],I)});var B=new Set;if($.length>1){var Q=[],G=S.filter(function(J){return J.css("display")=="none"});$.forEach(function(J,nt){var mt=void 0;if(I.quality=="draft"&&(mt=U[nt].nodeIndexes),J.nodes().not(G).length>0){var st={};st.edges=[],st.nodes=[];var Lt=void 0;J.nodes().not(G).forEach(function(_t){if(I.quality=="draft")if(!_t.isParent())Lt=mt.get(_t.id()),st.nodes.push({x:U[nt].xCoords[Lt]-_t.boundingbox().w/2,y:U[nt].yCoords[Lt]-_t.boundingbox().h/2,width:_t.boundingbox().w,height:_t.boundingbox().h});else{var Nt=t.calcBoundingBox(_t,U[nt].xCoords,U[nt].yCoords,mt);st.nodes.push({x:Nt.topLeftX,y:Nt.topLeftY,width:Nt.width,height:Nt.height})}else Y[nt][_t.id()]&&st.nodes.push({x:Y[nt][_t.id()].getLeft(),y:Y[nt][_t.id()].getTop(),width:Y[nt][_t.id()].getWidth(),height:Y[nt][_t.id()].getHeight()})}),J.edges().forEach(function(_t){var Nt=_t.source(),At=_t.target();if(Nt.css("display")!="none"&&At.css("display")!="none")if(I.quality=="draft"){var Ht=mt.get(Nt.id()),Rt=mt.get(At.id()),bt=[],Gt=[];if(Nt.isParent()){var Bt=t.calcBoundingBox(Nt,U[nt].xCoords,U[nt].yCoords,mt);bt.push(Bt.topLeftX+Bt.width/2),bt.push(Bt.topLeftY+Bt.height/2)}else bt.push(U[nt].xCoords[Ht]),bt.push(U[nt].yCoords[Ht]);if(At.isParent()){var Pt=t.calcBoundingBox(At,U[nt].xCoords,U[nt].yCoords,mt);Gt.push(Pt.topLeftX+Pt.width/2),Gt.push(Pt.topLeftY+Pt.height/2)}else Gt.push(U[nt].xCoords[Rt]),Gt.push(U[nt].yCoords[Rt]);st.edges.push({startX:bt[0],startY:bt[1],endX:Gt[0],endY:Gt[1]})}else Y[nt][Nt.id()]&&Y[nt][At.id()]&&st.edges.push({startX:Y[nt][Nt.id()].getCenterX(),startY:Y[nt][Nt.id()].getCenterY(),endX:Y[nt][At.id()].getCenterX(),endY:Y[nt][At.id()].getCenterY()})}),st.nodes.length>0&&(Q.push(st),B.add(nt))}});var D=r.packComponents(Q,I.randomize).shifts;if(I.quality=="draft")U.forEach(function(J,nt){var mt=J.xCoords.map(function(Lt){return Lt+D[nt].dx}),st=J.yCoords.map(function(Lt){return Lt+D[nt].dy});J.xCoords=mt,J.yCoords=st});else{var b=0;B.forEach(function(J){Object.keys(Y[J]).forEach(function(nt){var mt=Y[J][nt];mt.setCenter(mt.getCenterX()+D[b].dx,mt.getCenterY()+D[b].dy)}),b++})}}}else{var q=I.eles.boundingBox();if(O.push({x:q.x1+q.w/2,y:q.y1+q.h/2}),I.randomize){var et=s(I);U.push(et)}I.quality=="default"||I.quality=="proof"?(Y.push(d(I,U[0])),t.relocateComponent(O[0],Y[0],I)):t.relocateComponent(O[0],U[0],I)}var vt=function(J,nt){if(I.quality=="default"||I.quality=="proof"){typeof J=="number"&&(J=nt);var mt=void 0,st=void 0,Lt=J.data("id");return Y.forEach(function(Nt){Lt in Nt&&(mt={x:Nt[Lt].getRect().getCenterX(),y:Nt[Lt].getRect().getCenterY()},st=Nt[Lt])}),I.nodeDimensionsIncludeLabels&&(st.labelWidth&&(st.labelPosHorizontal=="left"?mt.x+=st.labelWidth/2:st.labelPosHorizontal=="right"&&(mt.x-=st.labelWidth/2)),st.labelHeight&&(st.labelPosVertical=="top"?mt.y+=st.labelHeight/2:st.labelPosVertical=="bottom"&&(mt.y-=st.labelHeight/2))),mt==null&&(mt={x:J.position("x"),y:J.position("y")}),{x:mt.x,y:mt.y}}else{var _t=void 0;return U.forEach(function(Nt){var At=Nt.nodeIndexes.get(J.id());At!=null&&(_t={x:Nt.xCoords[At],y:Nt.yCoords[At]})}),_t==null&&(_t={x:J.position("x"),y:J.position("y")}),{x:_t.x,y:_t.y}}};if(I.quality=="default"||I.quality=="proof"||I.randomize){var j=t.calcParentsWithoutChildren(k,S),xt=S.filter(function(J){return J.css("display")=="none"});I.eles=S.not(xt),S.nodes().not(":parent").not(xt).layoutPositions(A,I,vt),j.length>0&&j.forEach(function(J){J.position(vt(J))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),y}();o.exports=g},657:(o,i,e)=>{var a=e(548),n=e(140).layoutBase.Matrix,f=e(140).layoutBase.SVD,t=function(h){var s=h.cy,c=h.eles,d=c.nodes(),T=c.nodes(":parent"),g=new Map,y=new Map,A=new Map,I=[],k=[],S=[],U=[],Y=[],$=[],O=[],rt=[],r=void 0,E=1e8,v=1e-9,p=h.piTol,m=h.samplingType,M=h.nodeSeparation,w=void 0,x=function(){for(var dt=0,_=0,R=!1;_<w;){dt=Math.floor(Math.random()*r),R=!1;for(var V=0;V<_;V++)if(U[V]==dt){R=!0;break}if(!R)U[_]=dt,_++;else continue}},F=function(dt,_,R){for(var V=[],Z=0,K=0,ft=0,ht=void 0,tt=[],ct=0,it=1,Et=0;Et<r;Et++)tt[Et]=E;for(V[K]=dt,tt[dt]=0;K>=Z;){ft=V[Z++];for(var yt=I[ft],Ot=0;Ot<yt.length;Ot++)ht=y.get(yt[Ot]),tt[ht]==E&&(tt[ht]=tt[ft]+1,V[++K]=ht);$[ft][_]=tt[ft]*M}if(R){for(var lt=0;lt<r;lt++)$[lt][_]<Y[lt]&&(Y[lt]=$[lt][_]);for(var ot=0;ot<r;ot++)Y[ot]>ct&&(ct=Y[ot],it=ot)}return it},X=function(dt){var _=void 0;if(dt){_=Math.floor(Math.random()*r);for(var R=0;R<r;R++)Y[R]=E;for(var V=0;V<w;V++)U[V]=_,_=F(_,V,dt)}else{x();for(var Z=0;Z<w;Z++)F(U[Z],Z,dt)}for(var K=0;K<r;K++)for(var ft=0;ft<w;ft++)$[K][ft]*=$[K][ft];for(var ht=0;ht<w;ht++)O[ht]=[];for(var tt=0;tt<w;tt++)for(var ct=0;ct<w;ct++)O[tt][ct]=$[U[ct]][tt]},z=function(){for(var dt=f.svd(O),_=dt.S,R=dt.U,V=dt.V,Z=_[0]*_[0]*_[0],K=[],ft=0;ft<w;ft++){K[ft]=[];for(var ht=0;ht<w;ht++)K[ft][ht]=0,ft==ht&&(K[ft][ht]=_[ft]/(_[ft]*_[ft]+Z/(_[ft]*_[ft])))}rt=n.multMat(n.multMat(V,K),n.transpose(R))},W=function(){for(var dt=void 0,_=void 0,R=[],V=[],Z=[],K=[],ft=0;ft<r;ft++)R[ft]=Math.random(),V[ft]=Math.random();R=n.normalize(R),V=n.normalize(V);for(var ht=v,tt=v,ct=void 0;;){for(var it=0;it<r;it++)Z[it]=R[it];if(R=n.multGamma(n.multL(n.multGamma(Z),$,rt)),dt=n.dotProduct(Z,R),R=n.normalize(R),ht=n.dotProduct(Z,R),ct=Math.abs(ht/tt),ct<=1+p&&ct>=1)break;tt=ht}for(var Et=0;Et<r;Et++)Z[Et]=R[Et];for(tt=v;;){for(var yt=0;yt<r;yt++)K[yt]=V[yt];if(K=n.minusOp(K,n.multCons(Z,n.dotProduct(Z,K))),V=n.multGamma(n.multL(n.multGamma(K),$,rt)),_=n.dotProduct(K,V),V=n.normalize(V),ht=n.dotProduct(K,V),ct=Math.abs(ht/tt),ct<=1+p&&ct>=1)break;tt=ht}for(var Ot=0;Ot<r;Ot++)K[Ot]=V[Ot];k=n.multCons(Z,Math.sqrt(Math.abs(dt))),S=n.multCons(K,Math.sqrt(Math.abs(_)))};a.connectComponents(s,c,a.getTopMostNodes(d),g),T.forEach(function(dt){a.connectComponents(s,c,a.getTopMostNodes(dt.descendants().intersection(c)),g)});for(var B=0,Q=0;Q<d.length;Q++)d[Q].isParent()||y.set(d[Q].id(),B++);var G=!0,D=!1,b=void 0;try{for(var q=g.keys()[Symbol.iterator](),et;!(G=(et=q.next()).done);G=!0){var vt=et.value;y.set(vt,B++)}}catch(dt){D=!0,b=dt}finally{try{!G&&q.return&&q.return()}finally{if(D)throw b}}for(var j=0;j<y.size;j++)I[j]=[];T.forEach(function(dt){for(var _=dt.children().intersection(c);_.nodes(":childless").length==0;)_=_.nodes()[0].children().intersection(c);var R=0,V=_.nodes(":childless")[0].connectedEdges().length;_.nodes(":childless").forEach(function(Z,K){Z.connectedEdges().length<V&&(V=Z.connectedEdges().length,R=K)}),A.set(dt.id(),_.nodes(":childless")[R].id())}),d.forEach(function(dt){var _=void 0;dt.isParent()?_=y.get(A.get(dt.id())):_=y.get(dt.id()),dt.neighborhood().nodes().forEach(function(R){c.intersection(dt.edgesWith(R)).length>0&&(R.isParent()?I[_].push(A.get(R.id())):I[_].push(R.id()))})});var xt=function(dt){var _=y.get(dt),R=void 0;g.get(dt).forEach(function(V){s.getElementById(V).isParent()?R=A.get(V):R=V,I[_].push(R),I[y.get(R)].push(dt)})},J=!0,nt=!1,mt=void 0;try{for(var st=g.keys()[Symbol.iterator](),Lt;!(J=(Lt=st.next()).done);J=!0){var _t=Lt.value;xt(_t)}}catch(dt){nt=!0,mt=dt}finally{try{!J&&st.return&&st.return()}finally{if(nt)throw mt}}r=y.size;var Nt=void 0;if(r>2){w=r<h.sampleSize?r:h.sampleSize;for(var At=0;At<r;At++)$[At]=[];for(var Ht=0;Ht<w;Ht++)rt[Ht]=[];return h.quality=="draft"||h.step=="all"?(X(m),z(),W(),Nt={nodeIndexes:y,xCoords:k,yCoords:S}):(y.forEach(function(dt,_){k.push(s.getElementById(_).position("x")),S.push(s.getElementById(_).position("y"))}),Nt={nodeIndexes:y,xCoords:k,yCoords:S}),Nt}else{var Rt=y.keys(),bt=s.getElementById(Rt.next().value),Gt=bt.position(),Bt=bt.outerWidth();if(k.push(Gt.x),S.push(Gt.y),r==2){var Pt=s.getElementById(Rt.next().value),zt=Pt.outerWidth();k.push(Gt.x+Bt/2+zt/2+h.idealEdgeLength),S.push(Gt.y)}return Nt={nodeIndexes:y,xCoords:k,yCoords:S},Nt}};o.exports={spectralLayout:t}},579:(o,i,e)=>{var a=e(212),n=function(f){f&&f("layout","fcose",a)};typeof cytoscape<"u"&&n(cytoscape),o.exports=n},140:o=>{o.exports=L}},N={};function u(o){var i=N[o];if(i!==void 0)return i.exports;var e=N[o]={exports:{}};return P[o](e,e.exports,u),e.exports}var l=u(579);return l})()})}(ge)),ge.exports}var mi=vi();const yi=hi(mi);var Oe={L:"left",R:"right",T:"top",B:"bottom"},xe={L:pt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:pt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:pt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:pt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},ne={L:pt((C,H)=>C-H+2,"L"),R:pt((C,H)=>C-2,"R"),T:pt((C,H)=>C-H+2,"T"),B:pt((C,H)=>C-2,"B")},Ei=pt(function(C){return Xt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Me=pt(function(C){const H=C;return H==="L"||H==="R"||H==="T"||H==="B"},"isArchitectureDirection"),Xt=pt(function(C){const H=C;return H==="L"||H==="R"},"isArchitectureDirectionX"),Vt=pt(function(C){const H=C;return H==="T"||H==="B"},"isArchitectureDirectionY"),ye=pt(function(C,H){const L=Xt(C)&&Vt(H),P=Vt(C)&&Xt(H);return L||P},"isArchitectureDirectionXY"),Ni=pt(function(C){const H=C[0],L=C[1],P=Xt(H)&&Vt(L),N=Vt(H)&&Xt(L);return P||N},"isArchitecturePairXY"),Ti=pt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=pt(function(C,H){const L=`${C}${H}`;return Ti(L)?L:void 0},"getArchitectureDirectionPair"),Ai=pt(function([C,H],L){const P=L[0],N=L[1];return Xt(P)?Vt(N)?[C+(P==="L"?-1:1),H+(N==="T"?1:-1)]:[C+(P==="L"?-1:1),H]:Xt(N)?[C+(N==="L"?1:-1),H+(P==="T"?1:-1)]:[C,H+(P==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ci=pt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ii=pt(function(C,H){return ye(C,H)?"bend":Xt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Li=pt(function(C){return C.type==="service"},"isArchitectureService"),_i=pt(function(C){return C.type==="junction"},"isArchitectureJunction"),be=pt(C=>C.data(),"edgeData"),te=pt(C=>C.data(),"nodeData"),wi=ii.architecture,de,Pe=(de=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=je,this.getAccTitle=$e,this.setDiagramTitle=qe,this.getDiagramTitle=Qe,this.getAccDescription=Ke,this.setAccDescription=Ze,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},Je()}addService({id:C,icon:H,in:L,title:P,iconText:N}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(L!==void 0){if(C===L)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[L]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[L]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:H,iconText:N,title:P,edges:[],in:L}}getServices(){return Object.values(this.nodes).filter(Li)}addJunction({id:C,in:H}){this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:H}}getJunctions(){return Object.values(this.nodes).filter(_i)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:H,in:L,title:P}){var N,u,l;if(((N=this.registeredIds)==null?void 0:N[C])!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(L!==void 0){if(C===L)throw new Error(`The group [${C}] cannot be placed within itself`);if(((u=this.registeredIds)==null?void 0:u[L])===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(((l=this.registeredIds)==null?void 0:l[L])==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:H,title:P,in:L}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:H,lhsDir:L,rhsDir:P,lhsInto:N,rhsInto:u,lhsGroup:l,rhsGroup:o,title:i}){if(!Me(L))throw new Error(`Invalid direction given for left hand side of edge ${C}--${H}. Expected (L,R,T,B) got ${String(L)}`);if(!Me(P))throw new Error(`Invalid direction given for right hand side of edge ${C}--${H}. Expected (L,R,T,B) got ${String(P)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[H]===void 0&&this.groups[H]===void 0)throw new Error(`The right-hand id [${H}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=this.nodes[C].in,a=this.nodes[H].in;if(l&&e&&a&&e==a)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&e&&a&&e==a)throw new Error(`The right-hand id [${H}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const n={lhsId:C,lhsDir:L,lhsInto:N,lhsGroup:l,rhsId:H,rhsDir:P,rhsInto:u,rhsGroup:o,title:i};this.edges.push(n),this.nodes[C]&&this.nodes[H]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[H].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},H=Object.entries(this.nodes).reduce((o,[i,e])=>(o[i]=e.edges.reduce((a,n)=>{var f,t;const h=(f=this.getNode(n.lhsId))==null?void 0:f.in,s=(t=this.getNode(n.rhsId))==null?void 0:t.in;if(h&&s&&h!==s){const c=Ii(n.lhsDir,n.rhsDir);c!=="bend"&&(C[h]??(C[h]={}),C[h][s]=c,C[s]??(C[s]={}),C[s][h]=c)}if(n.lhsId===i){const c=pe(n.lhsDir,n.rhsDir);c&&(a[c]=n.rhsId)}else{const c=pe(n.rhsDir,n.lhsDir);c&&(a[c]=n.lhsId)}return a},{}),o),{}),L=Object.keys(H)[0],P={[L]:1},N=Object.keys(H).reduce((o,i)=>i===L?o:{...o,[i]:1},{}),u=pt(o=>{const i={[o]:[0,0]},e=[o];for(;e.length>0;){const a=e.shift();if(a){P[a]=1,delete N[a];const n=H[a],[f,t]=i[a];Object.entries(n).forEach(([h,s])=>{P[s]||(i[s]=Ai([f,t],h),e.push(s))})}}return i},"BFS"),l=[u(L)];for(;Object.keys(N).length>0;)l.push(u(Object.keys(N)[0]));this.dataStructures={adjList:H,spatialMaps:l,groupAlignments:C}}return this.dataStructures}setElementForId(C,H){this.elements[C]=H}getElementById(C){return this.elements[C]}getConfig(){return ti({...wi,...ei().architecture})}getConfigField(C){return this.getConfig()[C]}},pt(de,"ArchitectureDB"),de),Oi=pt((C,H)=>{li(C,H),C.groups.map(L=>H.addGroup(L)),C.services.map(L=>H.addService({...L,type:"service"})),C.junctions.map(L=>H.addJunction({...L,type:"junction"})),C.edges.map(L=>H.addEdge(L))},"populateDb"),Ge={parser:{yy:void 0},parse:pt(async C=>{var H;const L=await di("architecture",C);De.debug(L);const P=(H=Ge.parser)==null?void 0:H.yy;if(!(P instanceof Pe))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.");Oi(L,P)},"parse")},xi=pt(C=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${C.archEdgeWidth};
|
|
4
4
|
stroke: ${C.archEdgeColor};
|