@elizaos/client 1.6.4-alpha.13 → 1.6.4-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{_basePickBy-DOk4jgEF.js → _basePickBy-OPoOl3Yl.js} +2 -2
- package/dist/assets/{_basePickBy-DOk4jgEF.js.map → _basePickBy-OPoOl3Yl.js.map} +1 -1
- package/dist/assets/{_baseUniq-BiMo_HZq.js → _baseUniq-CLNFotAy.js} +2 -2
- package/dist/assets/{_baseUniq-BiMo_HZq.js.map → _baseUniq-CLNFotAy.js.map} +1 -1
- package/dist/assets/{arc-Cv2vwe6U.js → arc-_3baghbc.js} +2 -2
- package/dist/assets/{arc-Cv2vwe6U.js.map → arc-_3baghbc.js.map} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-RWVbHu7y.js → architectureDiagram-VXUJARFQ-CSo1yn8K.js} +2 -2
- package/dist/assets/{architectureDiagram-VXUJARFQ-RWVbHu7y.js.map → architectureDiagram-VXUJARFQ-CSo1yn8K.js.map} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-BqiJhler.js → blockDiagram-VD42YOAC-CEpmBUYr.js} +2 -2
- package/dist/assets/{blockDiagram-VD42YOAC-BqiJhler.js.map → blockDiagram-VD42YOAC-CEpmBUYr.js.map} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-BZnCYQNM.js → c4Diagram-YG6GDRKO-C1A_MZgD.js} +2 -2
- package/dist/assets/{c4Diagram-YG6GDRKO-BZnCYQNM.js.map → c4Diagram-YG6GDRKO-C1A_MZgD.js.map} +1 -1
- package/dist/assets/{channel-CPBtB0_-.js → channel-DDjAJRPT.js} +2 -2
- package/dist/assets/{channel-CPBtB0_-.js.map → channel-DDjAJRPT.js.map} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-Ca8yxxU5.js → chunk-4BX2VUAB-BTd4ZOZy.js} +2 -2
- package/dist/assets/{chunk-4BX2VUAB-Ca8yxxU5.js.map → chunk-4BX2VUAB-BTd4ZOZy.js.map} +1 -1
- package/dist/assets/{chunk-55IACEB6-CxHpHml-.js → chunk-55IACEB6-B-fijQl_.js} +2 -2
- package/dist/assets/{chunk-55IACEB6-CxHpHml-.js.map → chunk-55IACEB6-B-fijQl_.js.map} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-DhjDQyh7.js → chunk-B4BG7PRW-ImSHc4Kb.js} +2 -2
- package/dist/assets/{chunk-B4BG7PRW-DhjDQyh7.js.map → chunk-B4BG7PRW-ImSHc4Kb.js.map} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-wZ45gNYn.js → chunk-DI55MBZ5-D-NlJiLq.js} +2 -2
- package/dist/assets/{chunk-DI55MBZ5-wZ45gNYn.js.map → chunk-DI55MBZ5-D-NlJiLq.js.map} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-iUlHBjOh.js → chunk-FMBD7UC4-DC1BJMt2.js} +2 -2
- package/dist/assets/{chunk-FMBD7UC4-iUlHBjOh.js.map → chunk-FMBD7UC4-DC1BJMt2.js.map} +1 -1
- package/dist/assets/{chunk-QN33PNHL-Dk9jyaPB.js → chunk-QN33PNHL-BSBTcUJP.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-Dk9jyaPB.js.map → chunk-QN33PNHL-BSBTcUJP.js.map} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BLF_lJM6.js → chunk-QZHKN3VN-CUgTh6eE.js} +2 -2
- package/dist/assets/{chunk-QZHKN3VN-BLF_lJM6.js.map → chunk-QZHKN3VN-CUgTh6eE.js.map} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-PTIp1nwb.js → chunk-TZMSLE5B-Y35BFGim.js} +2 -2
- package/dist/assets/{chunk-TZMSLE5B-PTIp1nwb.js.map → chunk-TZMSLE5B-Y35BFGim.js.map} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-BLoVYyOp.js +2 -0
- package/dist/assets/{classDiagram-2ON5EDUG-D_eOAlUT.js.map → classDiagram-2ON5EDUG-BLoVYyOp.js.map} +1 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-BLoVYyOp.js +2 -0
- package/dist/assets/{classDiagram-v2-WZHVMYZB-D_eOAlUT.js.map → classDiagram-v2-WZHVMYZB-BLoVYyOp.js.map} +1 -1
- package/dist/assets/{clone-CKV7qvup.js → clone-C5OnEcJ1.js} +2 -2
- package/dist/assets/{clone-CKV7qvup.js.map → clone-C5OnEcJ1.js.map} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-BrGQGQhk.js → cose-bilkent-S5V4N54A-DsOUMVg8.js} +2 -2
- package/dist/assets/{cose-bilkent-S5V4N54A-BrGQGQhk.js.map → cose-bilkent-S5V4N54A-DsOUMVg8.js.map} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-OohhMk2A.js → dagre-6UL2VRFP-DK_CZddY.js} +2 -2
- package/dist/assets/{dagre-6UL2VRFP-OohhMk2A.js.map → dagre-6UL2VRFP-DK_CZddY.js.map} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-BjnQnTip.js → diagram-PSM6KHXK-BdqBdFQt.js} +2 -2
- package/dist/assets/{diagram-PSM6KHXK-BjnQnTip.js.map → diagram-PSM6KHXK-BdqBdFQt.js.map} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-BjWcXkgD.js → diagram-QEK2KX5R-ClnjOlF5.js} +2 -2
- package/dist/assets/{diagram-QEK2KX5R-BjWcXkgD.js.map → diagram-QEK2KX5R-ClnjOlF5.js.map} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-DQyP4oDe.js → diagram-S2PKOQOG-DO9PNOHL.js} +2 -2
- package/dist/assets/{diagram-S2PKOQOG-DQyP4oDe.js.map → diagram-S2PKOQOG-DO9PNOHL.js.map} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-BVr7aXFh.js → erDiagram-Q2GNP2WA-ClB5Xam_.js} +2 -2
- package/dist/assets/{erDiagram-Q2GNP2WA-BVr7aXFh.js.map → erDiagram-Q2GNP2WA-ClB5Xam_.js.map} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-CG7Mek_q.js → flowDiagram-NV44I4VS-Jq5WxWVo.js} +2 -2
- package/dist/assets/{flowDiagram-NV44I4VS-CG7Mek_q.js.map → flowDiagram-NV44I4VS-Jq5WxWVo.js.map} +1 -1
- package/dist/assets/{ganttDiagram-LVOFAZNH-b9-JUrOG.js → ganttDiagram-LVOFAZNH-B-lR2KuT.js} +2 -2
- package/dist/assets/{ganttDiagram-LVOFAZNH-b9-JUrOG.js.map → ganttDiagram-LVOFAZNH-B-lR2KuT.js.map} +1 -1
- package/dist/assets/{gitGraphDiagram-NY62KEGX-sBhvjLdb.js → gitGraphDiagram-NY62KEGX-Cuctnp7-.js} +2 -2
- package/dist/assets/{gitGraphDiagram-NY62KEGX-sBhvjLdb.js.map → gitGraphDiagram-NY62KEGX-Cuctnp7-.js.map} +1 -1
- package/dist/assets/{graph-CzQmlbiN.js → graph-BELGKevg.js} +2 -2
- package/dist/assets/{graph-CzQmlbiN.js.map → graph-BELGKevg.js.map} +1 -1
- package/dist/assets/{infoDiagram-ER5ION4S-DXEU2J-U.js → infoDiagram-ER5ION4S-FI9ZQ1hu.js} +2 -2
- package/dist/assets/{infoDiagram-ER5ION4S-DXEU2J-U.js.map → infoDiagram-ER5ION4S-FI9ZQ1hu.js.map} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-DEOI_9eC.js → journeyDiagram-XKPGCS4Q-BBYU1G8C.js} +2 -2
- package/dist/assets/{journeyDiagram-XKPGCS4Q-DEOI_9eC.js.map → journeyDiagram-XKPGCS4Q-BBYU1G8C.js.map} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-DHS2wmnh.js → kanban-definition-3W4ZIXB7-CrZQfCw2.js} +2 -2
- package/dist/assets/{kanban-definition-3W4ZIXB7-DHS2wmnh.js.map → kanban-definition-3W4ZIXB7-CrZQfCw2.js.map} +1 -1
- package/dist/assets/{layout-D2Y2lrJe.js → layout-DxcoE51K.js} +2 -2
- package/dist/assets/{layout-D2Y2lrJe.js.map → layout-DxcoE51K.js.map} +1 -1
- package/dist/assets/{linear-DrZWDG9K.js → linear-B8znCPcT.js} +2 -2
- package/dist/assets/{linear-DrZWDG9K.js.map → linear-B8znCPcT.js.map} +1 -1
- package/dist/assets/{main-D8nc36TP.js → main-BGGa0Ytm.js} +25 -25
- package/dist/assets/{main-D8nc36TP.js.map → main-BGGa0Ytm.js.map} +1 -1
- package/dist/assets/{main-KmkwMMr6.js → main-BYwCRnQT.js} +3 -3
- package/dist/assets/{main-KmkwMMr6.js.map → main-BYwCRnQT.js.map} +1 -1
- package/dist/assets/{mermaid.core-Da_oMzO2.js → mermaid.core-BoltmwOy.js} +6 -6
- package/dist/assets/{mermaid.core-Da_oMzO2.js.map → mermaid.core-BoltmwOy.js.map} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-BBeYTSSM.js → mindmap-definition-VGOIOE7T-DK-9S2r2.js} +2 -2
- package/dist/assets/{mindmap-definition-VGOIOE7T-BBeYTSSM.js.map → mindmap-definition-VGOIOE7T-DK-9S2r2.js.map} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-CVgVo4Q8.js → pieDiagram-ADFJNKIX-CIfRwOAs.js} +2 -2
- package/dist/assets/{pieDiagram-ADFJNKIX-CVgVo4Q8.js.map → pieDiagram-ADFJNKIX-CIfRwOAs.js.map} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-Dt5dFT39.js → quadrantDiagram-AYHSOK5B-JAzDr10Q.js} +2 -2
- package/dist/assets/{quadrantDiagram-AYHSOK5B-Dt5dFT39.js.map → quadrantDiagram-AYHSOK5B-JAzDr10Q.js.map} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-BUMHpYYF.js → requirementDiagram-UZGBJVZJ-DvwTUAyk.js} +2 -2
- package/dist/assets/{requirementDiagram-UZGBJVZJ-BUMHpYYF.js.map → requirementDiagram-UZGBJVZJ-DvwTUAyk.js.map} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-B8-FVOlj.js → sankeyDiagram-TZEHDZUN-CKI3unHp.js} +2 -2
- package/dist/assets/{sankeyDiagram-TZEHDZUN-B8-FVOlj.js.map → sankeyDiagram-TZEHDZUN-CKI3unHp.js.map} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-m6OISd75.js → sequenceDiagram-WL72ISMW-B9uqxv1u.js} +2 -2
- package/dist/assets/{sequenceDiagram-WL72ISMW-m6OISd75.js.map → sequenceDiagram-WL72ISMW-B9uqxv1u.js.map} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-ChSlWHf8.js → stateDiagram-FKZM4ZOC-CLVbuRUu.js} +2 -2
- package/dist/assets/{stateDiagram-FKZM4ZOC-ChSlWHf8.js.map → stateDiagram-FKZM4ZOC-CLVbuRUu.js.map} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-JpE-WfCw.js +2 -0
- package/dist/assets/{stateDiagram-v2-4FDKWEC3-DRGghSW0.js.map → stateDiagram-v2-4FDKWEC3-JpE-WfCw.js.map} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-HfRsw2R1.js → timeline-definition-IT6M3QCI-D8gEhPHt.js} +2 -2
- package/dist/assets/{timeline-definition-IT6M3QCI-HfRsw2R1.js.map → timeline-definition-IT6M3QCI-D8gEhPHt.js.map} +1 -1
- package/dist/assets/{treemap-KMMF4GRG-D63uO6f-.js → treemap-KMMF4GRG-BZXWCFgl.js} +2 -2
- package/dist/assets/{treemap-KMMF4GRG-D63uO6f-.js.map → treemap-KMMF4GRG-BZXWCFgl.js.map} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-C_PzN3mt.js → xychartDiagram-PRI3JC2R-DlTXpcgY.js} +2 -2
- package/dist/assets/{xychartDiagram-PRI3JC2R-C_PzN3mt.js.map → xychartDiagram-PRI3JC2R-DlTXpcgY.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/classDiagram-2ON5EDUG-D_eOAlUT.js +0 -2
- package/dist/assets/classDiagram-v2-WZHVMYZB-D_eOAlUT.js +0 -2
- package/dist/assets/stateDiagram-v2-4FDKWEC3-DRGghSW0.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ze=Object.defineProperty;var w=(C,H)=>Ze(C,"name",{value:H,configurable:!0});import{_ as dt,K as ke,ac as qe,l as Se,b as Qe,a as Je,q as Ke,t as je,g as _e,s as tr,z as er,F as rr,G as ir,H as ar,c as Ee,am as me,aI as pe,i as nr,d as or,y as sr,aJ as hr,aK as lr}from"./mermaid.core-Da_oMzO2.js";import{p as fr}from"./chunk-4BX2VUAB-Ca8yxxU5.js";import{p as cr}from"./treemap-KMMF4GRG-D63uO6f-.js";import{c as Fe}from"./cytoscape.esm-D8BKPn10.js";import{g as gr}from"./react-vendor-BGrcQn-n.js";import"./main-KmkwMMr6.js";import"./main-D8nc36TP.js";import"./_baseUniq-BiMo_HZq.js";import"./_basePickBy-DOk4jgEF.js";import"./clone-CKV7qvup.js";import"./ui-vendor-B7JxFfFk.js";var he={exports:{}},le={exports:{}},fe={exports:{}},ur=fe.exports,we;function vr(){return we||(we=1,(function(C,H){w((function(U,N){C.exports=N()}),"webpackUniversalModuleDefinition")(ur,function(){return(function(M){var U={};function N(v){if(U[v])return U[v].exports;var h=U[v]={i:v,l:!1,exports:{}};return M[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return w(N,"__webpack_require__"),N.m=M,N.c=U,N.i=function(v){return v},N.d=function(v,h,a){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(v){var h=v&&v.__esModule?w((function(){return v.default}),"getDefault"):w((function(){return v}),"getModuleExports");return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(M,U,N){function v(){}w(v,"LayoutConstants"),v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,M.exports=v}),(function(M,U,N){var v=N(2),h=N(8),a=N(9);function e(l,i,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=l,this.target=i}w(e,"LEdge"),e.prototype=Object.create(v.prototype);for(var r in v)e[r]=v[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(l,i){for(var u=this.getOtherEnd(l),t=i.getGraphManager().getRoot();;){if(u.getOwner()==i)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},e.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},M.exports=e}),(function(M,U,N){function v(h){this.vGraphObject=h}w(v,"LGraphObject"),M.exports=v}),(function(M,U,N){var v=N(2),h=N(10),a=N(13),e=N(0),r=N(16),l=N(5);function i(t,o,s,c){s==null&&c==null&&(c=o),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,s!=null&&o!=null?this.rect=new a(o.x,o.y,s.width,s.height):this.rect=new a}w(i,"LNode"),i.prototype=Object.create(v.prototype);for(var u in v)i[u]=v[u];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,o){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=o.width,this.rect.height=o.height},i.prototype.setCenter=function(t,o){this.rect.x=t-this.rect.width/2,this.rect.y=o-this.rect.height/2},i.prototype.setLocation=function(t,o){this.rect.x=t,this.rect.y=o},i.prototype.moveBy=function(t,o){this.rect.x+=t,this.rect.y+=o},i.prototype.getEdgeListToNode=function(t){var o=[],s=this;return s.edges.forEach(function(c){if(c.target==t){if(c.source!=s)throw"Incorrect edge source!";o.push(c)}}),o},i.prototype.getEdgesBetween=function(t){var o=[],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)&&o.push(c)}),o},i.prototype.getNeighborsList=function(){var t=new Set,o=this;return o.edges.forEach(function(s){if(s.source==o)t.add(s.target);else{if(s.target!=o)throw"Incorrect incidency!";t.add(s.source)}}),t},i.prototype.withChildren=function(){var t=new Set,o,s;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),f=0;f<c.length;f++)o=c[f],s=o.withChildren(),s.forEach(function(T){t.add(T)});return t},i.prototype.getNoOfChildren=function(){var t=0,o;if(this.child==null)t=1;else for(var s=this.child.getNodes(),c=0;c<s.length;c++)o=s[c],t+=o.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.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)},i.prototype.scatter=function(){var t,o,s=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(c-s)+s;var f=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;o=e.WORLD_CENTER_Y+r.nextDouble()*(T-f)+f,this.rect.x=t,this.rect.y=o},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var o=t.getRight()-t.getLeft(),s=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+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))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var o=this.rect.x;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var s=this.rect.y;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var c=new l(o,s),f=t.inverseTransformPoint(c);this.setLocation(f.x,f.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=i}),(function(M,U,N){var v=N(0);function h(){}w(h,"FDLayoutConstants");for(var a in v)h[a]=v[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,U,N){function v(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}w(v,"PointD"),v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=v}),(function(M,U,N){var v=N(2),h=N(10),a=N(0),e=N(7),r=N(3),l=N(1),i=N(13),u=N(12),t=N(11);function o(c,f,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,f!=null&&f instanceof e?this.graphManager=f:f!=null&&f instanceof Layout&&(this.graphManager=f.graphManager)}w(o,"LGraph"),o.prototype=Object.create(v.prototype);for(var s in v)o[s]=v[s];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(c,f,T){if(f==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 d=c;if(!(this.getNodes().indexOf(f)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(f.owner==T.owner&&f.owner==this))throw"Both owners must be this graph!";return f.owner!=T.owner?null:(d.source=f,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),f.edges.push(d),T!=f&&T.edges.push(d),d)}},o.prototype.remove=function(c){var f=c;if(c instanceof r){if(f==null)throw"Node is null!";if(!(f.owner!=null&&f.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=f.edges.slice(),g,d=T.length,L=0;L<d;L++)g=T[L],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var b=this.nodes.indexOf(f);if(b==-1)throw"Node not in owner node list!";this.nodes.splice(b,1)}else if(c instanceof l){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 A=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(A>-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(P,1);var b=g.source.owner.getEdges().indexOf(g);if(b==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(b,1)}},o.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,f=h.MAX_VALUE,T,g,d,L=this.getNodes(),b=L.length,A=0;A<b;A++){var P=L[A];T=P.getTop(),g=P.getLeft(),c>T&&(c=T),f>g&&(f=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=f-d,this.top=c-d,new u(this.left,this.top))},o.prototype.updateBounds=function(c){for(var f=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,b,A,P,q,Y=this.nodes,j=Y.length,x=0;x<j;x++){var at=Y[x];c&&at.child!=null&&at.updateBounds(),L=at.getLeft(),b=at.getRight(),A=at.getTop(),P=at.getBottom(),f>L&&(f=L),T<b&&(T=b),g>A&&(g=A),d<P&&(d=P)}var n=new i(f,g,T-f,d-g);f==h.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?q=Y[0].getParent().paddingLeft:q=this.margin,this.left=n.x-q,this.right=n.x+n.width+q,this.top=n.y-q,this.bottom=n.y+n.height+q},o.calculateBounds=function(c){for(var f=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,b,A,P,q=c.length,Y=0;Y<q;Y++){var j=c[Y];L=j.getLeft(),b=j.getRight(),A=j.getTop(),P=j.getBottom(),f>L&&(f=L),T<b&&(T=b),g>A&&(g=A),d<P&&(d=P)}var x=new i(f,g,T-f,d-g);return x},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var c=0,f=this.nodes,T=f.length,g=0;g<T;g++){var d=f[g];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var f=new t,T=new Set,g=this.nodes[0],d,L,b=g.withChildren();for(b.forEach(function(x){f.push(x),T.add(x)});f.length!==0;){g=f.shift(),d=g.getEdges();for(var A=d.length,P=0;P<A;P++){var q=d[P];if(L=q.getOtherEndInGraph(g,this),L!=null&&!T.has(L)){var Y=L.withChildren();Y.forEach(function(x){f.push(x),T.add(x)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var j=0;T.forEach(function(x){x.owner==c&&j++}),j==this.nodes.length&&(this.isConnected=!0)}},M.exports=o}),(function(M,U,N){var v,h=N(1);function a(e){v=N(6),this.layout=e,this.graphs=[],this.edges=[]}w(a,"LGraphManager"),a.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),l=this.add(e,r);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(e,r,l,i,u){if(l==null&&i==null&&u==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{u=l,i=r,l=e;var t=i.getOwner(),o=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==o)return l.isInterGraph=!1,t.add(l,i,u);if(l.isInterGraph=!0,l.source=i,l.target=u,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(e){if(e instanceof v){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(r.getEdges());for(var i,u=l.length,t=0;t<u;t++)i=l[t],r.remove(i);var o=[];o=o.concat(r.getNodes());var s;u=o.length;for(var t=0;t<u;t++)s=o[t],r.remove(s);r==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(r);this.graphs.splice(c,1),r.parent=null}else if(e instanceof h){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var c=i.source.edges.indexOf(i);if(i.source.edges.splice(c,1),c=i.target.edges.indexOf(i),i.target.edges.splice(c,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var c=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),l=r.length,i=0;i<l;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var l=0;l<r.length;l++)e=e.concat(r[l].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var l=e.getOwner(),i;do{if(i=l.getParent(),i==null)break;if(i==r)return!0;if(l=i.getOwner(),l==null)break}while(!0);l=r.getOwner();do{if(i=l.getParent(),i==null)break;if(i==e)return!0;if(l=i.getOwner(),l==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,r,l,i,u,t=this.getAllEdges(),o=t.length,s=0;s<o;s++){if(e=t[s],r=e.source,l=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=l,r==l){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=l,u=l.getOwner();e.lca==null;){if(u==i){e.lca=u;break}if(u==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=u.getParent(),u=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var l=e.getOwner();do{if(l==null)break;var i=r.getOwner();do{if(i==null)break;if(i==l)return i;i=i.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},a.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var l,i=e.getNodes(),u=i.length,t=0;t<u;t++)l=i[t],l.inclusionTreeDepth=r,l.child!=null&&this.calcInclusionTreeDepths(l.child,r+1)},a.prototype.includesInvalidEdge=function(){for(var e,r=[],l=this.edges.length,i=0;i<l;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},M.exports=a}),(function(M,U,N){var v=N(12);function h(){}w(h,"IGeometry"),h.calcSeparationAmount=function(a,e,r,l){if(!a.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,i),r[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),r[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(r[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(r[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*r[0],o=r[1]/u;r[0]<o?o=r[0]:t=r[1],r[0]=-1*i[0]*(o/2+l),r[1]=-1*i[1]*(t/2+l)},h.decideDirectionsForOverlappingNodes=function(a,e,r){a.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,a.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},h.getIntersection2=function(a,e,r){var l=a.getCenterX(),i=a.getCenterY(),u=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return r[0]=l,r[1]=i,r[2]=u,r[3]=t,!0;var o=a.getX(),s=a.getY(),c=a.getRight(),f=a.getX(),T=a.getBottom(),g=a.getRight(),d=a.getWidthHalf(),L=a.getHeightHalf(),b=e.getX(),A=e.getY(),P=e.getRight(),q=e.getX(),Y=e.getBottom(),j=e.getRight(),x=e.getWidthHalf(),at=e.getHeightHalf(),n=!1,m=!1;if(l===u){if(i>t)return r[0]=l,r[1]=s,r[2]=u,r[3]=Y,!1;if(i<t)return r[0]=l,r[1]=T,r[2]=u,r[3]=A,!1}else if(i===t){if(l>u)return r[0]=o,r[1]=i,r[2]=P,r[3]=t,!1;if(l<u)return r[0]=c,r[1]=i,r[2]=b,r[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-i)/(u-l),R=void 0,O=void 0,S=void 0,V=void 0,I=void 0,Q=void 0;if(-p===y?l>u?(r[0]=f,r[1]=T,n=!0):(r[0]=c,r[1]=s,n=!0):p===y&&(l>u?(r[0]=o,r[1]=s,n=!0):(r[0]=g,r[1]=T,n=!0)),-E===y?u>l?(r[2]=q,r[3]=Y,m=!0):(r[2]=P,r[3]=A,m=!0):E===y&&(u>l?(r[2]=b,r[3]=A,m=!0):(r[2]=j,r[3]=Y,m=!0)),n&&m)return!1;if(l>u?i>t?(R=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(E,y,2)):(R=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-E,y,1)):i>t?(R=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-E,y,3)):(R=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(E,y,4)),!n)switch(R){case 1:V=s,S=l+-L/y,r[0]=S,r[1]=V;break;case 2:S=g,V=i+d*y,r[0]=S,r[1]=V;break;case 3:V=T,S=l+L/y,r[0]=S,r[1]=V;break;case 4:S=f,V=i+-d*y,r[0]=S,r[1]=V;break}if(!m)switch(O){case 1:Q=A,I=u+-at/y,r[2]=I,r[3]=Q;break;case 2:I=j,Q=t+x*y,r[2]=I,r[3]=Q;break;case 3:Q=Y,I=u+at/y,r[2]=I,r[3]=Q;break;case 4:I=q,Q=t+-x*y,r[2]=I,r[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,r){return a>e?r:1+r%4},h.getIntersection=function(a,e,r,l){if(l==null)return this.getIntersection2(a,e,r);var i=a.x,u=a.y,t=e.x,o=e.y,s=r.x,c=r.y,f=l.x,T=l.y,g=void 0,d=void 0,L=void 0,b=void 0,A=void 0,P=void 0,q=void 0,Y=void 0,j=void 0;return L=o-u,A=i-t,q=t*u-i*o,b=T-c,P=s-f,Y=f*c-s*T,j=L*P-b*A,j===0?null:(g=(A*Y-P*q)/j,d=(b*q-L*Y)/j,new v(g,d))},h.angleOfVector=function(a,e,r,l){var i=void 0;return a!==r?(i=Math.atan((l-e)/(r-a)),r<a?i+=Math.PI:l<e&&(i+=this.TWO_PI)):l<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},h.doIntersect=function(a,e,r,l){var i=a.x,u=a.y,t=e.x,o=e.y,s=r.x,c=r.y,f=l.x,T=l.y,g=(t-i)*(T-c)-(f-s)*(o-u);if(g===0)return!1;var d=((T-c)*(f-i)+(s-f)*(T-u))/g,L=((u-o)*(f-i)+(t-i)*(T-u))/g;return 0<d&&d<1&&0<L&&L<1},h.findCircleLineIntersections=function(a,e,r,l,i,u,t){var o=(r-a)*(r-a)+(l-e)*(l-e),s=2*((a-i)*(r-a)+(e-u)*(l-e)),c=(a-i)*(a-i)+(e-u)*(e-u)-t*t,f=s*s-4*o*c;if(f>=0){var T=(-s+Math.sqrt(s*s-4*o*c))/(2*o),g=(-s-Math.sqrt(s*s-4*o*c))/(2*o),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,U,N){function v(){}w(v,"IMath"),v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=v}),(function(M,U,N){function v(){}w(v,"Integer"),v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,M.exports=v}),(function(M,U,N){var v=(function(){function i(u,t){for(var o=0;o<t.length;o++){var s=t[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(u,s.key,s)}}return w(i,"defineProperties"),function(u,t,o){return t&&i(u.prototype,t),o&&i(u,o),u}})();function h(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}w(h,"_classCallCheck");var a=w(function(u){return{value:u,next:null,prev:null}},"nodeFrom2"),e=w(function(u,t,o,s){return u!==null?u.next=t:s.head=t,o!==null?o.prev=t:s.tail=t,t.prev=u,t.next=o,s.length++,t},"add2"),r=w(function(u,t){var o=u.prev,s=u.next;return o!==null?o.next=s:t.head=s,s!==null?s.prev=o:t.tail=o,u.prev=u.next=null,t.length--,u},"_remove2"),l=(function(){function i(u){var t=this;h(this,i),this.length=0,this.head=null,this.tail=null,u?.forEach(function(o){return t.push(o)})}return w(i,"LinkedList2"),v(i,[{key:"size",value:w(function(){return this.length},"size")},{key:"insertBefore",value:w(function(t,o){return e(o.prev,a(t),o,this)},"insertBefore")},{key:"insertAfter",value:w(function(t,o){return e(o,a(t),o.next,this)},"insertAfter")},{key:"insertNodeBefore",value:w(function(t,o){return e(o.prev,t,o,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:w(function(t,o){return e(o,t,o.next,this)},"insertNodeAfter")},{key:"push",value:w(function(t){return e(this.tail,a(t),null,this)},"push")},{key:"unshift",value:w(function(t){return e(null,a(t),this.head,this)},"unshift")},{key:"remove",value:w(function(t){return r(t,this)},"remove")},{key:"pop",value:w(function(){return r(this.tail,this).value},"pop")},{key:"popNode",value:w(function(){return r(this.tail,this)},"popNode")},{key:"shift",value:w(function(){return r(this.head,this).value},"shift")},{key:"shiftNode",value:w(function(){return r(this.head,this)},"shiftNode")},{key:"get_object_at",value:w(function(t){if(t<=this.length()){for(var o=1,s=this.head;o<t;)s=s.next,o++;return s.value}},"get_object_at")},{key:"set_object_at",value:w(function(t,o){if(t<=this.length()){for(var s=1,c=this.head;s<t;)c=c.next,s++;c.value=o}},"set_object_at")}]),i})();M.exports=l}),(function(M,U,N){function v(h,a,e){this.x=null,this.y=null,h==null&&a==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof a=="number"&&e==null?(this.x=h,this.y=a):h.constructor.name=="Point"&&a==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}w(v,"Point2"),v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(h,a,e){h.constructor.name=="Point"&&a==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof a=="number"&&e==null&&(parseInt(h)==h&&parseInt(a)==a?this.move(h,a):(this.x=Math.floor(h+.5),this.y=Math.floor(a+.5)))},v.prototype.move=function(h,a){this.x=h,this.y=a},v.prototype.translate=function(h,a){this.x+=h,this.y+=a},v.prototype.equals=function(h){if(h.constructor.name=="Point"){var a=h;return this.x==a.x&&this.y==a.y}return this==h},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},M.exports=v}),(function(M,U,N){function v(h,a,e,r){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&a!=null&&e!=null&&r!=null&&(this.x=h,this.y=a,this.width=e,this.height=r)}w(v,"RectangleD"),v.prototype.getX=function(){return this.x},v.prototype.setX=function(h){this.x=h},v.prototype.getY=function(){return this.y},v.prototype.setY=function(h){this.y=h},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},M.exports=v}),(function(M,U,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function h(){}w(h,"UniqueIDGeneretor"),h.lastID=0,h.createID=function(a){return h.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=h.getString(),h.lastID++),a.uniqueID)},h.getString=function(a){return a==null&&(a=h.lastID),"Object#"+a},h.isPrimitive=function(a){var e=typeof a>"u"?"undefined":v(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,U,N){function v(s){if(Array.isArray(s)){for(var c=0,f=Array(s.length);c<s.length;c++)f[c]=s[c];return f}else return Array.from(s)}w(v,"_toConsumableArray");var h=N(0),a=N(7),e=N(3),r=N(1),l=N(6),i=N(5),u=N(17),t=N(29);function o(s){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,s!=null&&(this.isRemoteUse=s)}w(o,"Layout2"),o.RANDOM_SEED=1,o.prototype=Object.create(t.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var s=new a(this);return this.graphManager=s,s},o.prototype.newGraph=function(s){return new l(null,this.graphManager,s)},o.prototype.newNode=function(s){return new e(this.graphManager,s)},o.prototype.newEdge=function(s){return new r(null,null,s)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var s;return this.checkLayoutSuccess()?s=!1:s=this.layout(),h.ANIMATE==="during"?!1:(s&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,s)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.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 f=this.graphManager.getRoot().getNodes(),c=0;c<f.length;c++)f[c];this.update(this.graphManager.getRoot())}},o.prototype.update=function(s){if(s==null)this.update2();else if(s instanceof e){var c=s;if(c.getChild()!=null)for(var f=c.getChild().getNodes(),T=0;T<f.length;T++)update(f[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(s instanceof r){var d=s;if(d.vGraphObject!=null){var L=d.vGraphObject;L.update(d)}}else if(s instanceof l){var b=s;if(b.vGraphObject!=null){var A=b.vGraphObject;A.update(b)}}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(s){if(s==null)this.transform(new i(0,0));else{var c=new u,f=this.graphManager.getRoot().updateLeftTop();if(f!=null){c.setWorldOrgX(s.x),c.setWorldOrgY(s.y),c.setDeviceOrgX(f.x),c.setDeviceOrgY(f.y);for(var T=this.getAllNodes(),g,d=0;d<T.length;d++)g=T[d],g.transform(c)}}},o.prototype.positionNodesRandomly=function(s){if(s==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,f,T=s.getNodes(),g=0;g<T.length;g++)c=T[g],f=c.getChild(),f==null||f.getNodes().length==0?c.scatter():(this.positionNodesRandomly(f),c.updateBounds())},o.prototype.getFlatForest=function(){for(var s=[],c=!0,f=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<f.length;g++)f[g].getChild()!=null&&(T=!1);if(!T)return s;var d=new Set,L=[],b=new Map,A=[];for(A=A.concat(f);A.length>0&&c;){for(L.push(A[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var q=P.getEdges(),g=0;g<q.length;g++){var Y=q[g].getOtherEnd(P);if(b.get(P)!=Y)if(!d.has(Y))L.push(Y),b.set(Y,P);else{c=!1;break}}}if(!c)s=[];else{var j=[].concat(v(d));s.push(j);for(var g=0;g<j.length;g++){var x=j[g],at=A.indexOf(x);at>-1&&A.splice(at,1)}d=new Set,b=new Map}}return s},o.prototype.createDummyNodesForBendpoints=function(s){for(var c=[],f=s.source,T=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g<s.bendpoints.length;g++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var L=this.newEdge(null);this.graphManager.add(L,f,d),c.add(d),f=d}var L=this.newEdge(null);return this.graphManager.add(L,f,s.target),this.edgeToDummyNodes.set(s,c),s.isInterGraph()?this.graphManager.remove(s):T.remove(s),c},o.prototype.createBendpointsFromDummyNodes=function(){var s=[];s=s.concat(this.graphManager.getAllEdges()),s=[].concat(v(this.edgeToDummyNodes.keys())).concat(s);for(var c=0;c<s.length;c++){var f=s[c];if(f.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(f),g=0;g<T.length;g++){var d=T[g],L=new i(d.getCenterX(),d.getCenterY()),b=f.bendpoints.get(g);b.x=L.x,b.y=L.y,d.getOwner().remove(d)}this.graphManager.add(f,f.source,f.target)}}},o.transform=function(s,c,f,T){if(f!=null&&T!=null){var g=c;if(s<=50){var d=c/f;g-=(c-d)/50*(50-s)}else{var L=c*T;g+=(L-c)/50*(s-50)}return g}else{var b,A;return s<=50?(b=9*c/500,A=c/10):(b=9*c/50,A=-8*c),b*s+A}},o.findCenterOfTree=function(s){var c=[];c=c.concat(s);var f=[],T=new Map,g=!1,d=null;(c.length==1||c.length==2)&&(g=!0,d=c[0]);for(var L=0;L<c.length;L++){var b=c[L],A=b.getNeighborsList().size;T.set(b,b.getNeighborsList().size),A==1&&f.push(b)}var P=[];for(P=P.concat(f);!g;){var q=[];q=q.concat(P),P=[];for(var L=0;L<c.length;L++){var b=c[L],Y=c.indexOf(b);Y>=0&&c.splice(Y,1);var j=b.getNeighborsList();j.forEach(function(n){if(f.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&P.push(n),T.set(n,p)}})}f=f.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},o.prototype.setGraphManager=function(s){this.graphManager=s},M.exports=o}),(function(M,U,N){function v(){}w(v,"RandomSeed"),v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},M.exports=v}),(function(M,U,N){var v=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}w(h,"Transform"),h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/r),e},h.prototype.transformY=function(a){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/r),e},h.prototype.inverseTransformX=function(a){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/r),e},h.prototype.inverseTransformY=function(a){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/r),e},h.prototype.inverseTransformPoint=function(a){var e=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,U,N){function v(t){if(Array.isArray(t)){for(var o=0,s=Array(t.length);o<t.length;o++)s[o]=t[o];return s}else return Array.from(t)}w(v,"_toConsumableArray");var h=N(15),a=N(4),e=N(0),r=N(8),l=N(9);function i(){h.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}w(i,"FDLayout"),i.prototype=Object.create(h.prototype);for(var u in h)i[u]=h[u];i.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,o,s,c,f,T,g,d=this.getGraphManager().getAllEdges(),L=0;L<d.length;L++)t=d[L],o=t.idealLength,t.isInterGraph&&(c=t.getSource(),f=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),s=t.getLca().getInclusionTreeDepth(),t.idealLength+=o*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+f.getInclusionTreeDepth()-2*s))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),o,s=0;s<t.length;s++)o=t[s],this.calcSpringForce(o,o.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,c,f,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,s=0;s<g.length;s++)f=g[s],this.calculateRepulsionForceOfANode(f,d,t,o),d.add(f);else for(s=0;s<g.length;s++)for(f=g[s],c=s+1;c<g.length;c++)T=g[c],f.getOwner()==T.getOwner()&&this.calcRepulsionForce(f,T)},i.prototype.calcGravitationalForces=function(){for(var t,o=this.getAllNodesToApplyGravitation(),s=0;s<o.length;s++)t=o[s],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),o,s=0;s<t.length;s++)o=t[s],o.move()},i.prototype.calcSpringForce=function(t,o){var s=t.getSource(),c=t.getTarget(),f,T,g,d;if(this.uniformLeafNodeSizes&&s.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;f=t.getLength(),f!=0&&(T=t.edgeElasticity*(f-o),g=T*(t.lengthX/f),d=T*(t.lengthY/f),s.springForceX+=g,s.springForceY+=d,c.springForceX-=g,c.springForceY-=d)},i.prototype.calcRepulsionForce=function(t,o){var s=t.getRect(),c=o.getRect(),f=new Array(2),T=new Array(4),g,d,L,b,A,P,q;if(s.intersects(c)){r.calcSeparationAmount(s,c,f,a.DEFAULT_EDGE_LENGTH/2),P=2*f[0],q=2*f[1];var Y=t.noOfChildren*o.noOfChildren/(t.noOfChildren+o.noOfChildren);t.repulsionForceX-=Y*P,t.repulsionForceY-=Y*q,o.repulsionForceX+=Y*P,o.repulsionForceY+=Y*q}else this.uniformLeafNodeSizes&&t.getChild()==null&&o.getChild()==null?(g=c.getCenterX()-s.getCenterX(),d=c.getCenterY()-s.getCenterY()):(r.getIntersection(s,c,T),g=T[2]-T[0],d=T[3]-T[1]),Math.abs(g)<a.MIN_REPULSION_DIST&&(g=l.sign(g)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=l.sign(d)*a.MIN_REPULSION_DIST),L=g*g+d*d,b=Math.sqrt(L),A=(t.nodeRepulsion/2+o.nodeRepulsion/2)*t.noOfChildren*o.noOfChildren/L,P=A*g/b,q=A*d/b,t.repulsionForceX-=P,t.repulsionForceY-=q,o.repulsionForceX+=P,o.repulsionForceY+=q},i.prototype.calcGravitationalForce=function(t){var o,s,c,f,T,g,d,L;o=t.getOwner(),s=(o.getRight()+o.getLeft())/2,c=(o.getTop()+o.getBottom())/2,f=t.getCenterX()-s,T=t.getCenterY()-c,g=Math.abs(f)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=o.getEstimatedSize()*this.gravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*f,t.gravitationForceY=-this.gravityConstant*T)):(L=o.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||o},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,o=this.graphManager.getAllNodes(),s=0;s<o.length;s++)t=o[s],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var o=0,s=0;o=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(o),f=0;f<o;f++)c[f]=new Array(s);for(var f=0;f<o;f++)for(var T=0;T<s;T++)c[f][T]=new Array;return c},i.prototype.addNodeToGrid=function(t,o,s){var c=0,f=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-o)/this.repulsionRange)),f=parseInt(Math.floor((t.getRect().width+t.getRect().x-o)/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 d=c;d<=f;d++)for(var L=T;L<=g;L++)this.grid[d][L].push(t),t.setGridCoordinates(c,f,T,g)},i.prototype.updateGrid=function(){var t,o,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<s.length;t++)o=s[t],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,o,s,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&s||c){var f=new Set;t.surrounding=new Array;for(var T,g=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(d<0||L<0||d>=g.length||L>=g[0].length)){for(var b=0;b<g[d][L].length;b++)if(T=g[d][L][b],!(t.getOwner()!=T.getOwner()||t==T)&&!o.has(T)&&!f.has(T)){var A=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);A<=this.repulsionRange&&P<=this.repulsionRange&&f.add(T)}}t.surrounding=[].concat(v(f))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},i.prototype.calcRepulsionRange=function(){return 0},M.exports=i}),(function(M,U,N){var v=N(1),h=N(4);function a(r,l,i){v.call(this,r,l,i),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}w(a,"FDLayoutEdge"),a.prototype=Object.create(v.prototype);for(var e in v)a[e]=v[e];M.exports=a}),(function(M,U,N){var v=N(3),h=N(4);function a(r,l,i,u){v.call(this,r,l,i,u),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}w(a,"FDLayoutNode"),a.prototype=Object.create(v.prototype);for(var e in v)a[e]=v[e];a.prototype.setGridCoordinates=function(r,l,i,u){this.startX=r,this.finishX=l,this.startY=i,this.finishY=u},M.exports=a}),(function(M,U,N){function v(h,a){this.width=0,this.height=0,h!==null&&a!==null&&(this.height=a,this.width=h)}w(v,"DimensionD2"),v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},M.exports=v}),(function(M,U,N){var v=N(14);function h(){this.map={},this.keys=[]}w(h,"HashMap"),h.prototype.put=function(a,e){var r=v.createID(a);this.contains(r)||(this.map[r]=e,this.keys.push(a))},h.prototype.contains=function(a){return v.createID(a),this.map[a]!=null},h.prototype.get=function(a){var e=v.createID(a);return this.map[e]},h.prototype.keySet=function(){return this.keys},M.exports=h}),(function(M,U,N){var v=N(14);function h(){this.set={}}w(h,"HashSet"),h.prototype.add=function(a){var e=v.createID(a);this.contains(e)||(this.set[e]=a)},h.prototype.remove=function(a){delete this.set[v.createID(a)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(a){return this.set[v.createID(a)]==a},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),r=e.length,l=0;l<r;l++)a.push(this.set[e[l]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(a){for(var e=a.length,r=0;r<e;r++){var l=a[r];this.add(l)}},M.exports=h}),(function(M,U,N){function v(){}w(v,"Matrix"),v.multMat=function(h,a){for(var e=[],r=0;r<h.length;r++){e[r]=[];for(var l=0;l<a[0].length;l++){e[r][l]=0;for(var i=0;i<h[0].length;i++)e[r][l]+=h[r][i]*a[i][l]}}return e},v.transpose=function(h){for(var a=[],e=0;e<h[0].length;e++){a[e]=[];for(var r=0;r<h.length;r++)a[e][r]=h[r][e]}return a},v.multCons=function(h,a){for(var e=[],r=0;r<h.length;r++)e[r]=h[r]*a;return e},v.minusOp=function(h,a){for(var e=[],r=0;r<h.length;r++)e[r]=h[r]-a[r];return e},v.dotProduct=function(h,a){for(var e=0,r=0;r<h.length;r++)e+=h[r]*a[r];return e},v.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},v.normalize=function(h){for(var a=[],e=this.mag(h),r=0;r<h.length;r++)a[r]=h[r]/e;return a},v.multGamma=function(h){for(var a=[],e=0,r=0;r<h.length;r++)e+=h[r];e*=-1/h.length;for(var l=0;l<h.length;l++)a[l]=e+h[l];return a},v.multL=function(h,a,e){for(var r=[],l=[],i=[],u=0;u<a[0].length;u++){for(var t=0,o=0;o<a.length;o++)t+=-.5*a[o][u]*h[o];l[u]=t}for(var s=0;s<e.length;s++){for(var c=0,f=0;f<e.length;f++)c+=e[s][f]*l[f];i[s]=c}for(var T=0;T<a.length;T++){for(var g=0,d=0;d<a[0].length;d++)g+=a[T][d]*i[d];r[T]=g}return r},M.exports=v}),(function(M,U,N){var v=(function(){function r(l,i){for(var u=0;u<i.length;u++){var t=i[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(l,t.key,t)}}return w(r,"defineProperties"),function(l,i,u){return i&&r(l.prototype,i),u&&r(l,u),l}})();function h(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")}w(h,"_classCallCheck");var a=N(11),e=(function(){function r(l,i){h(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;l instanceof a?u=l.size():u=l.length,this._quicksort(l,0,u-1)}return w(r,"Quicksort2"),v(r,[{key:"_quicksort",value:w(function(i,u,t){if(u<t){var o=this._partition(i,u,t);this._quicksort(i,u,o),this._quicksort(i,o+1,t)}},"_quicksort")},{key:"_partition",value:w(function(i,u,t){for(var o=this._get(i,u),s=u,c=t;;){for(;this.compareFunction(o,this._get(i,c));)c--;for(;this.compareFunction(this._get(i,s),o);)s++;if(s<c)this._swap(i,s,c),s++,c--;else return c}},"_partition")},{key:"_get",value:w(function(i,u){return i instanceof a?i.get_object_at(u):i[u]},"_get")},{key:"_set",value:w(function(i,u,t){i instanceof a?i.set_object_at(u,t):i[u]=t},"_set")},{key:"_swap",value:w(function(i,u,t){var o=this._get(i,u);this._set(i,u,this._get(i,t)),this._set(i,t,o)},"_swap")},{key:"_defaultCompareFunction",value:w(function(i,u){return u>i},"_defaultCompareFunction")}]),r})();M.exports=e}),(function(M,U,N){function v(){}w(v,"SVD"),v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At})(Math.min(this.m+1,this.n)),this.U=(function(Nt){var At=w(function $t(Pt){if(Pt.length==0)return 0;for(var Bt=[],Ft=0;Ft<Pt[0];Ft++)Bt.push($t(Pt.slice(1)));return Bt},"allocate2");return At(Nt)})([this.m,a]),this.V=(function(Nt){var At=w(function $t(Pt){if(Pt.length==0)return 0;for(var Bt=[],Ft=0;Ft<Pt[0];Ft++)Bt.push($t(Pt.slice(1)));return Bt},"allocate2");return At(Nt)})([this.n,this.n]);for(var e=(function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At})(this.n),r=(function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At})(this.m),l=!0,i=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,u);t++){if(t<i){this.s[t]=0;for(var o=t;o<this.m;o++)this.s[t]=v.hypot(this.s[t],h[o][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var s=t;s<this.m;s++)h[s][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Nt,At){return Nt&&At})(t<i,this.s[t]!==0)){for(var f=0,T=t;T<this.m;T++)f+=h[T][t]*h[T][c];f=-f/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=f*h[g][t]}e[c]=h[t][c]}if((function(Nt,At){return At})(l,t<i))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<u){e[t]=0;for(var L=t+1;L<this.n;L++)e[t]=v.hypot(e[t],e[L]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var b=t+1;b<this.n;b++)e[b]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Nt,At){return Nt&&At})(t+1<this.m,e[t]!==0)){for(var A=t+1;A<this.m;A++)r[A]=0;for(var P=t+1;P<this.n;P++)for(var q=t+1;q<this.m;q++)r[q]+=e[P]*h[q][P];for(var Y=t+1;Y<this.n;Y++)for(var j=-e[Y]/e[t+1],x=t+1;x<this.m;x++)h[x][Y]+=j*r[x]}for(var at=t+1;at<this.n;at++)this.V[at][t]=e[at]}}var n=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=h[i][i]),this.m<n&&(this.s[n-1]=0),u+1<n&&(e[u]=h[u][n-1]),e[n-1]=0;{for(var m=i;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=i-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var R=0,O=E;O<this.m;O++)R+=this.U[O][E]*this.U[O][y];R=-R/this.U[E][E];for(var S=E;S<this.m;S++)this.U[S][y]+=R*this.U[S][E]}for(var V=E;V<this.m;V++)this.U[V][E]=-this.U[V][E];this.U[E][E]=1+this.U[E][E];for(var I=0;I<E-1;I++)this.U[I][E]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][E]=0;this.U[E][E]=1}}for(var z=this.n-1;z>=0;z--){if((function(Nt,At){return Nt&&At})(z<u,e[z]!==0))for(var X=z+1;X<a;X++){for(var rt=0,B=z+1;B<this.n;B++)rt+=this.V[B][z]*this.V[B][X];rt=-rt/this.V[z+1][z];for(var D=z+1;D<this.n;D++)this.V[D][X]+=rt*this.V[D][z]}for(var W=0;W<this.n;W++)this.V[W][z]=0;this.V[z][z]=1}for(var $=n-1,tt=Math.pow(2,-52),lt=Math.pow(2,-966);n>0;){var J=void 0,Rt=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=lt+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=J&&Lt!==J;Lt--){var pt=(Lt!==n?Math.abs(e[Lt]):0)+(Lt!==J+1?Math.abs(e[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+tt*pt){this.s[Lt]=0;break}}Lt===J?Rt=3:Lt===n-1?Rt=1:(Rt=2,J=Lt)}switch(J++,Rt){case 1:{var it=e[n-2];e[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Tt=v.hypot(this.s[ut],it),Mt=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==J&&(it=-Dt*e[ut-1],e[ut-1]=Mt*e[ut-1]);for(var mt=0;mt<this.n;mt++)Tt=Mt*this.V[mt][ut]+Dt*this.V[mt][n-1],this.V[mt][n-1]=-Dt*this.V[mt][ut]+Mt*this.V[mt][n-1],this.V[mt][ut]=Tt}}break;case 2:{var xt=e[J-1];e[J-1]=0;for(var St=J;St<n;St++){var Wt=v.hypot(this.s[St],xt),Yt=this.s[St]/Wt,Gt=xt/Wt;this.s[St]=Wt,xt=-Gt*e[St],e[St]=Yt*e[St];for(var bt=0;bt<this.m;bt++)Wt=Yt*this.U[bt][St]+Gt*this.U[bt][J-1],this.U[bt][J-1]=-Gt*this.U[bt][St]+Yt*this.U[bt][J-1],this.U[bt][St]=Wt}}break;case 3:{var Xt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[J])),Math.abs(e[J])),zt=this.s[n-1]/Xt,F=this.s[n-2]/Xt,G=e[n-2]/Xt,Z=this.s[J]/Xt,K=e[J]/Xt,k=((F+zt)*(F-zt)+G*G)/2,nt=zt*G*(zt*G),gt=0;(function(Nt,At){return Nt||At})(k!==0,nt!==0)&&(gt=Math.sqrt(k*k+nt),k<0&&(gt=-gt),gt=nt/(k+gt));for(var ot=(Z+zt)*(Z-zt)+gt,et=Z*K,_=J;_<n-1;_++){var vt=v.hypot(ot,et),wt=ot/vt,yt=et/vt;_!==J&&(e[_-1]=vt),ot=wt*this.s[_]+yt*e[_],e[_]=wt*e[_]-yt*this.s[_],et=yt*this.s[_+1],this.s[_+1]=wt*this.s[_+1];for(var It=0;It<this.n;It++)vt=wt*this.V[It][_]+yt*this.V[It][_+1],this.V[It][_+1]=-yt*this.V[It][_]+wt*this.V[It][_+1],this.V[It][_]=vt;if(vt=v.hypot(ot,et),wt=ot/vt,yt=et/vt,this.s[_]=vt,ot=wt*e[_]+yt*this.s[_+1],this.s[_+1]=-yt*e[_]+wt*this.s[_+1],et=yt*e[_+1],e[_+1]=wt*e[_+1],_<this.m-1)for(var ft=0;ft<this.m;ft++)vt=wt*this.U[ft][_]+yt*this.U[ft][_+1],this.U[ft][_+1]=-yt*this.U[ft][_]+wt*this.U[ft][_+1],this.U[ft][_]=vt}e[n-2]=ot}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var st=0;st<=$;st++)this.V[st][J]=-this.V[st][J]}for(;J<$&&!(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 ct=0;ct<this.n;ct++)Ct=this.V[ct][J+1],this.V[ct][J+1]=this.V[ct][J],this.V[ct][J]=Ct;if(J<this.m-1)for(var ht=0;ht<this.m;ht++)Ct=this.U[ht][J+1],this.U[ht][J+1]=this.U[ht][J],this.U[ht][J]=Ct;J++}n--}break}}var Ht={U:this.U,V:this.V,S:this.s};return Ht},v.hypot=function(h,a){var e=void 0;return Math.abs(h)>Math.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=v}),(function(M,U,N){var v=(function(){function e(r,l){for(var i=0;i<l.length;i++){var u=l[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,u.key,u)}}return w(e,"defineProperties"),function(r,l,i){return l&&e(r.prototype,l),i&&e(r,i),r}})();function h(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}w(h,"_classCallCheck");var a=(function(){function e(r,l){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=r,this.sequence2=l,this.match_score=i,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[o][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 f=0;f<this.jMax;f++)this.tracebackGrid[c][f]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return w(e,"NeedlemanWunsch2"),v(e,[{key:"getScore",value:w(function(){return this.score},"getScore")},{key:"getAlignments",value:w(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:w(function(){for(var l=1;l<this.jMax;l++)this.grid[0][l]=this.grid[0][l-1]+this.gap_penalty,this.tracebackGrid[0][l]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var t=1;t<this.jMax;t++){var o=void 0;this.sequence1[u-1]===this.sequence2[t-1]?o=this.grid[u-1][t-1]+this.match_score:o=this.grid[u-1][t-1]+this.mismatch_penalty;var s=this.grid[u-1][t]+this.gap_penalty,c=this.grid[u][t-1]+this.gap_penalty,f=[o,s,c],T=this.arrayAllMaxIndexes(f);this.grid[u][t]=f[T[0]],this.tracebackGrid[u][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:w(function(){var l=[];for(l.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});l[0];){var i=l[0],u=this.tracebackGrid[i.pos[0]][i.pos[1]];u[0]&&l.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),u[1]&&l.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),u[2]&&l.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),l.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:w(function(l,i){for(var u=[],t=-1;(t=l.indexOf(i,t+1))!==-1;)u.push(t);return u},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:w(function(l){return this.getAllIndexes(l,Math.max.apply(null,l))},"arrayAllMaxIndexes")}]),e})();M.exports=a}),(function(M,U,N){var v=w(function(){},"layoutBase2");v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),M.exports=v}),(function(M,U,N){function v(){this.listeners=[]}w(v,"Emitter");var h=v.prototype;h.addListener=function(a,e){this.listeners.push({event:a,callback:e})},h.removeListener=function(a,e){for(var r=this.listeners.length;r>=0;r--){var l=this.listeners[r];l.event===a&&l.callback===e&&this.listeners.splice(r,1)}},h.emit=function(a,e){for(var r=0;r<this.listeners.length;r++){var l=this.listeners[r];a===l.event&&l.callback(e)}},M.exports=v})])})})(fe)),fe.exports}w(vr,"requireLayoutBase");var dr=le.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,H){w((function(U,N){C.exports=N(vr())}),"webpackUniversalModuleDefinition")(dr,function(M){return(()=>{var U={45:((a,e,r)=>{var l={};l.layoutBase=r(551),l.CoSEConstants=r(806),l.CoSEEdge=r(767),l.CoSEGraph=r(880),l.CoSEGraphManager=r(578),l.CoSELayout=r(765),l.CoSENode=r(991),l.ConstraintHandler=r(902),a.exports=l}),806:((a,e,r)=>{var l=r(551).FDLayoutConstants;function i(){}w(i,"CoSEConstants");for(var u in l)i[u]=l[u];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i}),767:((a,e,r)=>{var l=r(551).FDLayoutEdge;function i(t,o,s){l.call(this,t,o,s)}w(i,"CoSEEdge"),i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),880:((a,e,r)=>{var l=r(551).LGraph;function i(t,o,s){l.call(this,t,o,s)}w(i,"CoSEGraph"),i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),578:((a,e,r)=>{var l=r(551).LGraphManager;function i(t){l.call(this,t)}w(i,"CoSEGraphManager"),i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),765:((a,e,r)=>{var l=r(551).FDLayout,i=r(578),u=r(880),t=r(991),o=r(767),s=r(806),c=r(902),f=r(551).FDLayoutConstants,T=r(551).LayoutConstants,g=r(551).Point,d=r(551).PointD,L=r(551).DimensionD,b=r(551).Layout,A=r(551).Integer,P=r(551).IGeometry,q=r(551).LGraph,Y=r(551).Transform,j=r(551).LinkedList;function x(){l.call(this),this.toBeTiled={},this.constraints={}}w(x,"CoSELayout"),x.prototype=Object.create(l.prototype);for(var at in l)x[at]=l[at];x.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},x.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},x.prototype.newNode=function(n){return new t(this.graphManager,n)},x.prototype.newEdge=function(n){return new o(null,null,n)},x.prototype.initParameters=function(){l.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=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.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 m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(R){return m.has(R)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.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%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=f.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=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},x.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=w(function D(W){for(var $=W.getChild().getNodes(),tt,lt=0,J=0;J<$.length;J++)tt=$[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(lt+=100):lt+=D(tt);return lt},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){n.fixedNodeSet.add($.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var R=y(E);R>0&&(E.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var O=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var V=this.constraints.alignmentConstraint.vertical,p=0;p<V.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),V[p].forEach(function(W){O.set(W,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(W),n.fixedNodeSet.has(W)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var I=this.constraints.alignmentConstraint.horizontal,p=0;p<I.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),I[p].forEach(function(W){S.set(W,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(W),n.fixedNodeSet.has(W)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var W,$,tt;for(tt=D.length-1;tt>=2*D.length/3;tt--)W=Math.floor(Math.random()*(tt+1)),$=D[tt],D[tt]=D[W],D[W]=$;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 W=O.has(D.left)?O.get(D.left):D.left,$=O.has(D.right)?O.get(D.right):D.right;n.nodesInRelativeHorizontal.includes(W)||(n.nodesInRelativeHorizontal.push(W),n.nodeToRelativeConstraintMapHorizontal.set(W,[]),n.dummyToNodeForVerticalAlignment.has(W)?n.nodeToTempPositionMapHorizontal.set(W,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(W)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(W,n.idToNodeMap.get(W).getCenterX())),n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(W).push({right:$,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get($).push({left:W,gap:D.gap})}else{var tt=S.has(D.top)?S.get(D.top):D.top,lt=S.has(D.bottom)?S.get(D.bottom):D.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:lt,gap:D.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var W=O.has(D.left)?O.get(D.left):D.left,$=O.has(D.right)?O.get(D.right):D.right;Q.has(W)?Q.get(W).push($):Q.set(W,[$]),Q.has($)?Q.get($).push(W):Q.set($,[W])}else{var tt=S.has(D.top)?S.get(D.top):D.top,lt=S.has(D.bottom)?S.get(D.bottom):D.bottom;z.has(tt)?z.get(tt).push(lt):z.set(tt,[lt]),z.has(lt)?z.get(lt).push(tt):z.set(lt,[tt])}});var X=w(function(W,$){var tt=[],lt=[],J=new j,Rt=new Set,Lt=0;return W.forEach(function(pt,it){if(!Rt.has(it)){tt[Lt]=[],lt[Lt]=!1;var ut=it;for(J.push(ut),Rt.add(ut),tt[Lt].push(ut);J.length!=0;){ut=J.shift(),$.has(ut)&&(lt[Lt]=!0);var Tt=W.get(ut);Tt.forEach(function(Mt){Rt.has(Mt)||(J.push(Mt),Rt.add(Mt),tt[Lt].push(Mt))})}Lt++}}),{components:tt,isFixed:lt}},"constructComponents"),rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},x.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var D=n.idToNodeMap.get(B.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var R=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,p=0;p<O.length;p++){for(var S=0,y=0;y<O[p].length;y++){if(this.fixedNodeSet.has(O[p][y])){S=0;break}S+=this.idToNodeMap.get(O[p][y]).displacementY}for(var V=S/O[p].length,y=0;y<O[p].length;y++)this.idToNodeMap.get(O[p][y]).displacementY=V}}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(B){if(!n.fixedNodesOnHorizontal.has(B)){var D=0;n.dummyToNodeForVerticalAlignment.has(B)?D=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).displacementX:D=n.idToNodeMap.get(B).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(B).forEach(function(W){if(W.right){var $=n.nodeToTempPositionMapHorizontal.get(W.right)-n.nodeToTempPositionMapHorizontal.get(B)-D;$<W.gap&&(D-=W.gap-$)}else{var $=n.nodeToTempPositionMapHorizontal.get(B)-n.nodeToTempPositionMapHorizontal.get(W.left)+D;$<W.gap&&(D+=W.gap-$)}}),n.nodeToTempPositionMapHorizontal.set(B,n.nodeToTempPositionMapHorizontal.get(B)+D),n.dummyToNodeForVerticalAlignment.has(B)?n.dummyToNodeForVerticalAlignment.get(B).forEach(function(W){n.idToNodeMap.get(W).displacementX=D}):n.idToNodeMap.get(B).displacementX=D}}),this.nodesInRelativeVertical.forEach(function(B){if(!n.fixedNodesOnHorizontal.has(B)){var D=0;n.dummyToNodeForHorizontalAlignment.has(B)?D=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(B)[0]).displacementY:D=n.idToNodeMap.get(B).displacementY,n.nodeToRelativeConstraintMapVertical.get(B).forEach(function(W){if(W.bottom){var $=n.nodeToTempPositionMapVertical.get(W.bottom)-n.nodeToTempPositionMapVertical.get(B)-D;$<W.gap&&(D-=W.gap-$)}else{var $=n.nodeToTempPositionMapVertical.get(B)-n.nodeToTempPositionMapVertical.get(W.top)+D;$<W.gap&&(D+=W.gap-$)}}),n.nodeToTempPositionMapVertical.set(B,n.nodeToTempPositionMapVertical.get(B)+D),n.dummyToNodeForHorizontalAlignment.has(B)?n.dummyToNodeForHorizontalAlignment.get(B).forEach(function(W){n.idToNodeMap.get(W).displacementY=D}):n.idToNodeMap.get(B).displacementY=D}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var I=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(W){n.idToNodeMap.get(W).displacementX=0}):this.idToNodeMap.get(I[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<I.length;y++)if(this.dummyToNodeForVerticalAlignment.has(I[y])){var X=this.dummyToNodeForVerticalAlignment.get(I[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(I[y]).displacementX,z++;for(var rt=Q/z,y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(W){n.idToNodeMap.get(W).displacementX=rt}):this.idToNodeMap.get(I[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var I=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function($){n.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(I[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<I.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(I[y])){var X=this.dummyToNodeForHorizontalAlignment.get(I[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(I[y]).displacementY,z++;for(var rt=Q/z,y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(I[y]).displacementY=rt}}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},x.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),R=E.getTarget();if(y==R)E.getBendpoints().push(new d),E.getBendpoints().push(new d),this.createDummyNodesForBendpoints(E),m.add(E);else{var O=[];if(O=O.concat(y.getEdgeListToNode(R)),O=O.concat(R.getEdgeListToNode(y)),!m.has(O[0])){if(O.length>1){var S;for(S=0;S<O.length;S++){var V=O[S];V.getBendpoints().push(new d),this.createDummyNodesForBendpoints(V)}}O.forEach(function(I){m.add(I)})}}}if(m.size==n.length)break}},x.prototype.positionNodesRadially=function(n){for(var m=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,R=0,O=new d(0,0),S=0;S<n.length;S++){S%p==0&&(R=0,y=E,S!=0&&(y+=s.DEFAULT_COMPONENT_SEPERATION),E=0);var V=n[S],I=b.findCenterOfTree(V);m.x=R,m.y=y,O=x.radialLayout(V,I,m),O.y>E&&(E=Math.floor(O.y)),R=Math.floor(O.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},x.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),s.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,E);var y=q.calculateBounds(n),R=new Y;R.setDeviceOrgX(y.getMinX()),R.setDeviceOrgY(y.getMinY()),R.setWorldOrgX(p.x),R.setWorldOrgY(p.y);for(var O=0;O<n.length;O++){var S=n[O];S.transform(R)}var V=new d(y.getMaxX(),y.getMaxY());return R.inverseTransformPoint(V)},x.branchRadialLayout=function(n,m,p,E,y,R){var O=(E-p+1)/2;O<0&&(O+=180);var S=(O+p)%360,V=S*P.TWO_PI/360,I=y*Math.cos(V),Q=y*Math.sin(V);n.setCenter(I,Q);var z=[];z=z.concat(n.getEdges());var X=z.length;m!=null&&X--;for(var rt=0,B=z.length,D,W=n.getEdgesBetween(m);W.length>1;){var $=W[0];W.splice(0,1);var tt=z.indexOf($);tt>=0&&z.splice(tt,1),B--,X--}m!=null?D=(z.indexOf(W[0])+1)%B:D=0;for(var lt=Math.abs(E-p)/X,J=D;rt!=X;J=++J%B){var Rt=z[J].getOtherEnd(n);if(Rt!=m){var Lt=(p+rt*lt)%360,pt=(Lt+lt)%360;x.branchRadialLayout(Rt,n,Lt,pt,y+R,R),rt++}}},x.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var R=E[y],O=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(O.id==null||!this.getToBeTiled(O))&&p.push(R)}for(var y=0;y<p.length;y++){var R=p[y],S=R.getParent().id;typeof m[S]>"u"&&(m[S]=[]),m[S]=m[S].concat(R)}Object.keys(m).forEach(function(V){if(m[V].length>1){var I="DummyCompound_"+V;n.memberGroups[I]=m[V];var Q=m[V][0].getParent(),z=new t(n.graphManager);z.id=I,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[I]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var B=0;B<m[V].length;B++){var D=m[V][B];rt.remove(D),X.add(D)}}})},x.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},x.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,R=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(R+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>R?(E.rect.y-=(E.labelHeight-R)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-R)/2):E.labelPosVertical=="bottom"&&E.setHeight(R+E.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,R=m.labelMarginLeft,O=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,R,O)}},x.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,R=E.paddingTop,O=E.labelMarginLeft,S=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,R,O,S)})},x.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var R=E[y];if(this.getNodeDegree(R)>0)return this.toBeTiled[m]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},x.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},x.prototype.adjustLocations=function(n,m,p,E,y,R,O){m+=E+R,p+=y+O;for(var S=m,V=0;V<n.rows.length;V++){var I=n.rows[V];m=S;for(var Q=0,z=0;z<I.length;z++){var X=I[z];X.rect.x=m,X.rect.y=p,m+=X.rect.width+n.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},x.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var R=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(R+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>R?(y.rect.x-=(y.labelWidth-R)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-R)/2):y.labelPosHorizontal=="right"&&y.setWidth(R+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},x.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),R=this.getOrgRatio(E),O;return R<y?O=E:O=p,O},x.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},x.prototype.calcIdealRowWidth=function(n,m){var p=s.TILING_PADDING_VERTICAL,E=s.TILING_PADDING_HORIZONTAL,y=n.length,R=0,O=0,S=0;n.forEach(function(B){R+=B.getWidth(),O+=B.getHeight(),B.getWidth()>S&&(S=B.getWidth())});var V=R/y,I=O/y,Q=Math.pow(p-E,2)+4*(V+E)*(I+p)*y,z=(E-p+Math.sqrt(Q))/(2*(V+E)),X;m?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(V+E)-E;return S>rt&&(rt=S),rt+=E*2,rt},x.prototype.tileNodesByFavoringDim=function(n,m,p){var E=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,R=s.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};R&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var S=w(function(D){return D.rect.width*D.rect.height},"getNodeArea"),V=w(function(D,W){return S(W)-S(D)},"areaCompareFcn");n.sort(function(B,D){var W=V;return O.idealRowWidth?(W=R,W(B.id,D.id)):W(B,D)});for(var I=0,Q=0,z=0;z<n.length;z++){var X=n[z];I+=X.getCenterX(),Q+=X.getCenterY()}O.centerX=I/n.length,O.centerY=Q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(O.rows.length==0)this.insertNodeToRow(O,X,0,m);else if(this.canAddHorizontal(O,X.rect.width,X.rect.height)){var rt=O.rows.length-1;O.idealRowWidth||(rt=this.getShortestRowIndex(O)),this.insertNodeToRow(O,X,rt,m)}else this.insertNodeToRow(O,X,O.rows.length,m);this.shiftToLastRow(O)}return O},x.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var R=[];n.rows.push(R),n.rowWidth.push(y),n.rowHeight.push(0)}var O=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width<O&&(n.width=O);var S=m.rect.height;p>0&&(S+=n.verticalPadding);var V=0;S>n.rowHeight[p]&&(V=n.rowHeight[p],n.rowHeight[p]=S,V=n.rowHeight[p]-V),n.height+=V,n.rows[p].push(m)},x.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},x.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},x.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var R=this.getShortestRowIndex(n);if(R<0)return!0;var O=n.rowWidth[R];if(O+n.horizontalPadding+m<=n.width)return!0;var S=0;n.rowHeight[R]<p&&R>0&&(S=p+n.verticalPadding-n.rowHeight[R]);var V;n.width-O>=m+n.horizontalPadding?V=(n.height+S)/(O+m+n.horizontalPadding):V=(n.height+S)/n.width,S=p+n.verticalPadding;var I;return n.width<m?I=(n.height+S)/m:I=(n.height+S)/n.width,I<1&&(I=1/I),V<1&&(V=1/V),V<I},x.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],R=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>R&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-R,n.rowWidth[p]=n.rowWidth[p]+R,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,S=0;S<E.length;S++)E[S].height>O&&(O=E[S].height);m>0&&(O+=n.verticalPadding);var V=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=O,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var I=n.rowHeight[m]+n.rowHeight[p];n.height+=I-V,this.shiftToLastRow(n)}},x.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var R=0;R<E.length;R++)if(p=E[R],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(s.PURE_INCREMENTAL){var O=p.getEdges()[0].getOtherEnd(p),S=new L(p.getCenterX()-O.getCenterX(),p.getCenterY()-O.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var V=[],I=0;I<y.length;I++)y[I][0].getEdges().length==1&&(V.push(y[I]),y[I][0].getOwner().remove(y[I][0]));n.push(V),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},x.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,s.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,R=p.finishX,O=p.startY,S=p.finishY,V=0,I=0,Q=0,z=0,X=[V,Q,I,z];if(O>0)for(var rt=y;rt<=R;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(R<this.grid.length-1)for(var rt=O;rt<=S;rt++)X[1]+=this.grid[R+1][rt].length+this.grid[R][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=R;rt++)X[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=O;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=A.MAX_VALUE,D,W,$=0;$<X.length;$++)X[$]<B?(B=X[$],D=1,W=$):X[$]==B&&D++;if(D==3&&B==0)X[0]==0&&X[1]==0&&X[2]==0?m=1:X[0]==0&&X[1]==0&&X[3]==0?m=0:X[0]==0&&X[2]==0&&X[3]==0?m=3:X[1]==0&&X[2]==0&&X[3]==0&&(m=2);else if(D==2&&B==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?m=0:m=1:X[0]==0&&X[2]==0?tt==0?m=0:m=2:X[0]==0&&X[3]==0?tt==0?m=0:m=3:X[1]==0&&X[2]==0?tt==0?m=1:m=2:X[1]==0&&X[3]==0?tt==0?m=1:m=3:tt==0?m=2:m=3}else if(D==4&&B==0){var tt=Math.floor(Math.random()*4);m=tt}else m=W;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-f.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+f.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+f.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-f.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=x}),991:((a,e,r)=>{var l=r(551).FDLayoutNode,i=r(551).IMath;function u(o,s,c,f){l.call(this,o,s,c,f)}w(u,"CoSENode"),u.prototype=Object.create(l.prototype);for(var t in l)u[t]=l[t];u.prototype.calculateDisplacement=function(){var o=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(o,s){for(var c=this.getChild().getNodes(),f,T=0;T<c.length;T++)f=c[T],f.getChild()==null?(f.displacementX+=o,f.displacementY+=s):f.propogateDisplacementToChildren(o,s)},u.prototype.move=function(){var o=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),o.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},u.prototype.setPred1=function(o){this.pred1=o},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(o){this.next=o},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(o){this.processed=o},u.prototype.isProcessed=function(){return processed},a.exports=u}),902:((a,e,r)=>{function l(c){if(Array.isArray(c)){for(var f=0,T=Array(c.length);f<c.length;f++)T[f]=c[f];return T}else return Array.from(c)}w(l,"_toConsumableArray");var i=r(806),u=r(551).LinkedList,t=r(551).Matrix,o=r(551).SVD;function s(){}w(s,"ConstraintHandler"),s.handleConstraints=function(c){var f={};f.fixedNodeConstraint=c.constraints.fixedNodeConstraint,f.alignmentConstraint=c.constraints.alignmentConstraint,f.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,d=[],L=[],b=c.getAllNodes(),A=0,P=0;P<b.length;P++){var q=b[P];q.getChild()==null&&(g.set(q.id,A++),d.push(q.getCenterX()),L.push(q.getCenterY()),T.set(q.id,q))}f.relativePlacementConstraint&&f.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var Y=w(function(G,Z){return{x:G.x-Z.x,y:G.y-Z.y}},"calculatePositionDiff"),j=w(function(G){var Z=0,K=0;return G.forEach(function(k){Z+=d[g.get(k)],K+=L[g.get(k)]}),{x:Z/G.size,y:K/G.size}},"calculateAvgPosition"),x=w(function(G,Z,K,k,nt){function gt(ft,st){var Ct=new Set(ft),ct=!0,ht=!1,Ht=void 0;try{for(var Nt=st[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var $t=At.value;Ct.add($t)}}catch(Pt){ht=!0,Ht=Pt}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Ht}}return Ct}w(gt,"setUnion");var ot=new Map;G.forEach(function(ft,st){ot.set(st,0)}),G.forEach(function(ft,st){ft.forEach(function(Ct){ot.set(Ct.id,ot.get(Ct.id)+1)})});var et=new Map,_=new Map,vt=new u;ot.forEach(function(ft,st){ft==0?(vt.push(st),K||(Z=="horizontal"?et.set(st,g.has(st)?d[g.get(st)]:k.get(st)):et.set(st,g.has(st)?L[g.get(st)]:k.get(st)))):et.set(st,Number.NEGATIVE_INFINITY),K&&_.set(st,new Set([st]))}),K&&nt.forEach(function(ft){var st=[];if(ft.forEach(function(ht){K.has(ht)&&st.push(ht)}),st.length>0){var Ct=0;st.forEach(function(ht){Z=="horizontal"?(et.set(ht,g.has(ht)?d[g.get(ht)]:k.get(ht)),Ct+=et.get(ht)):(et.set(ht,g.has(ht)?L[g.get(ht)]:k.get(ht)),Ct+=et.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){K.has(ht)||et.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){Z=="horizontal"?ct+=g.has(ht)?d[g.get(ht)]:k.get(ht):ct+=g.has(ht)?L[g.get(ht)]:k.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){et.set(ht,ct)})}});for(var wt=w(function(){var st=vt.shift(),Ct=G.get(st);Ct.forEach(function(ct){if(et.get(ct.id)<et.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if(Z=="horizontal"?ht=g.has(ct.id)?d[g.get(ct.id)]:k.get(ct.id):ht=g.has(ct.id)?L[g.get(ct.id)]:k.get(ct.id),et.set(ct.id,ht),ht<et.get(st)+ct.gap){var Ht=et.get(st)+ct.gap-ht;_.get(st).forEach(function(Nt){et.set(Nt,et.get(Nt)-Ht)})}}else et.set(ct.id,et.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&vt.push(ct.id),K&&_.set(ct.id,gt(_.get(st),_.get(ct.id)))})},"_loop");vt.length!=0;)wt();if(K){var yt=new Set;G.forEach(function(ft,st){ft.length==0&&yt.add(st)});var It=[];_.forEach(function(ft,st){if(yt.has(st)){var Ct=!1,ct=!0,ht=!1,Ht=void 0;try{for(var Nt=ft[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var $t=At.value;K.has($t)&&(Ct=!0)}}catch(Ft){ht=!0,Ht=Ft}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Ht}}if(!Ct){var Pt=!1,Bt=void 0;It.forEach(function(Ft,kt){Ft.has([].concat(l(ft))[0])&&(Pt=!0,Bt=kt)}),Pt?ft.forEach(function(Ft){It[Bt].add(Ft)}):It.push(new Set(ft))}}}),It.forEach(function(ft,st){var Ct=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.NEGATIVE_INFINITY,Ht=Number.NEGATIVE_INFINITY,Nt=!0,At=!1,$t=void 0;try{for(var Pt=ft[Symbol.iterator](),Bt;!(Nt=(Bt=Pt.next()).done);Nt=!0){var Ft=Bt.value,kt=void 0;Z=="horizontal"?kt=g.has(Ft)?d[g.get(Ft)]:k.get(Ft):kt=g.has(Ft)?L[g.get(Ft)]:k.get(Ft);var jt=et.get(Ft);kt<Ct&&(Ct=kt),kt>ht&&(ht=kt),jt<ct&&(ct=jt),jt>Ht&&(Ht=jt)}}catch(re){At=!0,$t=re}finally{try{!Nt&&Pt.return&&Pt.return()}finally{if(At)throw $t}}var ce=(Ct+ht)/2-(ct+Ht)/2,Jt=!0,_t=!1,te=void 0;try{for(var Kt=ft[Symbol.iterator](),oe;!(Jt=(oe=Kt.next()).done);Jt=!0){var ee=oe.value;et.set(ee,et.get(ee)+ce)}}catch(re){_t=!0,te=re}finally{try{!Jt&&Kt.return&&Kt.return()}finally{if(_t)throw te}}})}return et},"findAppropriatePositionForRelativePlacement"),at=w(function(G){var Z=0,K=0,k=0,nt=0;if(G.forEach(function(_){_.left?d[g.get(_.left)]-d[g.get(_.right)]>=0?Z++:K++:L[g.get(_.top)]-L[g.get(_.bottom)]>=0?k++:nt++}),Z>K&&k>nt)for(var gt=0;gt<g.size;gt++)d[gt]=-1*d[gt],L[gt]=-1*L[gt];else if(Z>K)for(var ot=0;ot<g.size;ot++)d[ot]=-1*d[ot];else if(k>nt)for(var et=0;et<g.size;et++)L[et]=-1*L[et]},"applyReflectionForRelativePlacement"),n=w(function(G){var Z=[],K=new u,k=new Set,nt=0;return G.forEach(function(gt,ot){if(!k.has(ot)){Z[nt]=[];var et=ot;for(K.push(et),k.add(et),Z[nt].push(et);K.length!=0;){et=K.shift();var _=G.get(et);_.forEach(function(vt){k.has(vt.id)||(K.push(vt.id),k.add(vt.id),Z[nt].push(vt.id))})}nt++}}),Z},"findComponents"),m=w(function(G){var Z=new Map;return G.forEach(function(K,k){Z.set(k,[])}),G.forEach(function(K,k){K.forEach(function(nt){Z.get(k).push(nt),Z.get(nt.id).push({id:k,gap:nt.gap,direction:nt.direction})})}),Z},"dagToUndirected"),p=w(function(G){var Z=new Map;return G.forEach(function(K,k){Z.set(k,[])}),G.forEach(function(K,k){K.forEach(function(nt){Z.get(nt.id).push({id:k,gap:nt.gap,direction:nt.direction})})}),Z},"dagToReversed"),E=[],y=[],R=!1,O=!1,S=new Set,V=new Map,I=new Map,Q=[];if(f.fixedNodeConstraint&&f.fixedNodeConstraint.forEach(function(F){S.add(F.nodeId)}),f.relativePlacementConstraint&&(f.relativePlacementConstraint.forEach(function(F){F.left?(V.has(F.left)?V.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):V.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),V.has(F.right)||V.set(F.right,[])):(V.has(F.top)?V.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):V.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),V.has(F.bottom)||V.set(F.bottom,[]))}),I=m(V),Q=n(I)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>1)f.fixedNodeConstraint.forEach(function(F,G){E[G]=[F.position.x,F.position.y],y[G]=[d[g.get(F.nodeId)],L[g.get(F.nodeId)]]}),R=!0;else if(f.alignmentConstraint)(function(){var F=0;if(f.alignmentConstraint.vertical){for(var G=f.alignmentConstraint.vertical,Z=w(function(et){var _=new Set;G[et].forEach(function(yt){_.add(yt)});var vt=new Set([].concat(l(_)).filter(function(yt){return S.has(yt)})),wt=void 0;vt.size>0?wt=d[g.get(vt.values().next().value)]:wt=j(_).x,G[et].forEach(function(yt){E[F]=[wt,L[g.get(yt)]],y[F]=[d[g.get(yt)],L[g.get(yt)]],F++})},"_loop2"),K=0;K<G.length;K++)Z(K);R=!0}if(f.alignmentConstraint.horizontal){for(var k=f.alignmentConstraint.horizontal,nt=w(function(et){var _=new Set;k[et].forEach(function(yt){_.add(yt)});var vt=new Set([].concat(l(_)).filter(function(yt){return S.has(yt)})),wt=void 0;vt.size>0?wt=d[g.get(vt.values().next().value)]:wt=j(_).y,k[et].forEach(function(yt){E[F]=[d[g.get(yt)],wt],y[F]=[d[g.get(yt)],L[g.get(yt)]],F++})},"_loop3"),gt=0;gt<k.length;gt++)nt(gt);R=!0}f.relativePlacementConstraint&&(O=!0)})();else if(f.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,X=rt);if(z<I.size/2)at(f.relativePlacementConstraint),R=!1,O=!1;else{var B=new Map,D=new Map,W=[];Q[X].forEach(function(F){V.get(F).forEach(function(G){G.direction=="horizontal"?(B.has(F)?B.get(F).push(G):B.set(F,[G]),B.has(G.id)||B.set(G.id,[]),W.push({left:F,right:G.id})):(D.has(F)?D.get(F).push(G):D.set(F,[G]),D.has(G.id)||D.set(G.id,[]),W.push({top:F,bottom:G.id}))})}),at(W),O=!1;var $=x(B,"horizontal"),tt=x(D,"vertical");Q[X].forEach(function(F,G){y[G]=[d[g.get(F)],L[g.get(F)]],E[G]=[],$.has(F)?E[G][0]=$.get(F):E[G][0]=d[g.get(F)],tt.has(F)?E[G][1]=tt.get(F):E[G][1]=L[g.get(F)]}),R=!0}}if(R){for(var lt=void 0,J=t.transpose(E),Rt=t.transpose(y),Lt=0;Lt<J.length;Lt++)J[Lt]=t.multGamma(J[Lt]),Rt[Lt]=t.multGamma(Rt[Lt]);var pt=t.multMat(J,t.transpose(Rt)),it=o.svd(pt);lt=t.multMat(it.V,t.transpose(it.U));for(var ut=0;ut<g.size;ut++){var Tt=[d[ut],L[ut]],Mt=[lt[0][0],lt[1][0]],Dt=[lt[0][1],lt[1][1]];d[ut]=t.dotProduct(Tt,Mt),L[ut]=t.dotProduct(Tt,Dt)}O&&at(f.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>0){var mt={x:0,y:0};f.fixedNodeConstraint.forEach(function(F,G){var Z={x:d[g.get(F.nodeId)],y:L[g.get(F.nodeId)]},K=F.position,k=Y(K,Z);mt.x+=k.x,mt.y+=k.y}),mt.x/=f.fixedNodeConstraint.length,mt.y/=f.fixedNodeConstraint.length,d.forEach(function(F,G){d[G]+=mt.x}),L.forEach(function(F,G){L[G]+=mt.y}),f.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,L[g.get(F.nodeId)]=F.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var xt=f.alignmentConstraint.vertical,St=w(function(G){var Z=new Set;xt[G].forEach(function(nt){Z.add(nt)});var K=new Set([].concat(l(Z)).filter(function(nt){return S.has(nt)})),k=void 0;K.size>0?k=d[g.get(K.values().next().value)]:k=j(Z).x,Z.forEach(function(nt){S.has(nt)||(d[g.get(nt)]=k)})},"_loop4"),Wt=0;Wt<xt.length;Wt++)St(Wt);if(f.alignmentConstraint.horizontal)for(var Yt=f.alignmentConstraint.horizontal,Gt=w(function(G){var Z=new Set;Yt[G].forEach(function(nt){Z.add(nt)});var K=new Set([].concat(l(Z)).filter(function(nt){return S.has(nt)})),k=void 0;K.size>0?k=L[g.get(K.values().next().value)]:k=j(Z).y,Z.forEach(function(nt){S.has(nt)||(L[g.get(nt)]=k)})},"_loop5"),bt=0;bt<Yt.length;bt++)Gt(bt)}f.relativePlacementConstraint&&(function(){var F=new Map,G=new Map,Z=new Map,K=new Map,k=new Map,nt=new Map,gt=new Set,ot=new Set;if(S.forEach(function(Ut){gt.add(Ut),ot.add(Ut)}),f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var et=f.alignmentConstraint.vertical,_=w(function(Et){Z.set("dummy"+Et,[]),et[Et].forEach(function(Ot){F.set(Ot,"dummy"+Et),Z.get("dummy"+Et).push(Ot),S.has(Ot)&>.add("dummy"+Et)}),k.set("dummy"+Et,d[g.get(et[Et][0])])},"_loop6"),vt=0;vt<et.length;vt++)_(vt);if(f.alignmentConstraint.horizontal)for(var wt=f.alignmentConstraint.horizontal,yt=w(function(Et){K.set("dummy"+Et,[]),wt[Et].forEach(function(Ot){G.set(Ot,"dummy"+Et),K.get("dummy"+Et).push(Ot),S.has(Ot)&&ot.add("dummy"+Et)}),nt.set("dummy"+Et,L[g.get(wt[Et][0])])},"_loop7"),It=0;It<wt.length;It++)yt(It)}var ft=new Map,st=new Map,Ct=w(function(Et){V.get(Et).forEach(function(Ot){var qt=void 0,Zt=void 0;Ot.direction=="horizontal"?(qt=F.get(Et)?F.get(Et):Et,F.get(Ot.id)?Zt={id:F.get(Ot.id),gap:Ot.gap,direction:Ot.direction}:Zt=Ot,ft.has(qt)?ft.get(qt).push(Zt):ft.set(qt,[Zt]),ft.has(Zt.id)||ft.set(Zt.id,[])):(qt=G.get(Et)?G.get(Et):Et,G.get(Ot.id)?Zt={id:G.get(Ot.id),gap:Ot.gap,direction:Ot.direction}:Zt=Ot,st.has(qt)?st.get(qt).push(Zt):st.set(qt,[Zt]),st.has(Zt.id)||st.set(Zt.id,[]))})},"_loop8"),ct=!0,ht=!1,Ht=void 0;try{for(var Nt=V.keys()[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var $t=At.value;Ct($t)}}catch(Ut){ht=!0,Ht=Ut}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Ht}}var Pt=m(ft),Bt=m(st),Ft=n(Pt),kt=n(Bt),jt=p(ft),ce=p(st),Jt=[],_t=[];Ft.forEach(function(Ut,Et){Jt[Et]=[],Ut.forEach(function(Ot){jt.get(Ot).length==0&&Jt[Et].push(Ot)})}),kt.forEach(function(Ut,Et){_t[Et]=[],Ut.forEach(function(Ot){ce.get(Ot).length==0&&_t[Et].push(Ot)})});var te=x(ft,"horizontal",gt,k,Jt),Kt=x(st,"vertical",ot,nt,_t),oe=w(function(Et){Z.get(Et)?Z.get(Et).forEach(function(Ot){d[g.get(Ot)]=te.get(Et)}):d[g.get(Et)]=te.get(Et)},"_loop9"),ee=!0,re=!1,Ne=void 0;try{for(var ge=te.keys()[Symbol.iterator](),Le;!(ee=(Le=ge.next()).done);ee=!0){var ue=Le.value;oe(ue)}}catch(Ut){re=!0,Ne=Ut}finally{try{!ee&&ge.return&&ge.return()}finally{if(re)throw Ne}}var $e=w(function(Et){K.get(Et)?K.get(Et).forEach(function(Ot){L[g.get(Ot)]=Kt.get(Et)}):L[g.get(Et)]=Kt.get(Et)},"_loop10"),ve=!0,Ce=!1,Ae=void 0;try{for(var de=Kt.keys()[Symbol.iterator](),Me;!(ve=(Me=de.next()).done);ve=!0){var ue=Me.value;$e(ue)}}catch(Ut){Ce=!0,Ae=Ut}finally{try{!ve&&de.return&&de.return()}finally{if(Ce)throw Ae}}})()}for(var Xt=0;Xt<b.length;Xt++){var zt=b[Xt];zt.getChild()==null&&zt.setCenter(d[g.get(zt.id)],L[g.get(zt.id)])}},a.exports=s}),551:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return U[a](r,r.exports,v),r.exports}w(v,"__webpack_require__");var h=v(45);return h})()})})(le)),le.exports}w(pr,"requireCoseBase");var yr=he.exports,De;function Er(){return De||(De=1,(function(C,H){w((function(U,N){C.exports=N(pr())}),"webpackUniversalModuleDefinition")(yr,function(M){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var r=arguments.length,l=Array(r>1?r-1:0),i=1;i<r;i++)l[i-1]=arguments[i];return l.forEach(function(u){Object.keys(u).forEach(function(t){return e[t]=u[t]})}),e}}),548:((a,e,r)=>{var l=(function(){function t(o,s){var c=[],f=!0,T=!1,g=void 0;try{for(var d=o[Symbol.iterator](),L;!(f=(L=d.next()).done)&&(c.push(L.value),!(s&&c.length===s));f=!0);}catch(b){T=!0,g=b}finally{try{!f&&d.return&&d.return()}finally{if(T)throw g}}return c}return w(t,"sliceIterator"),function(o,s){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return t(o,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=r(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var o={},s=0;s<t.length;s++)o[t[s].id()]=!0;var c=t.filter(function(f,T){typeof f=="number"&&(f=T);for(var g=f.parent()[0];g!=null;){if(o[g.id()])return!1;g=g.parent()[0]}return!0});return c},u.connectComponents=function(t,o,s,c){var f=new i,T=new Set,g=[],d=void 0,L=void 0,b=void 0,A=!1,P=1,q=[],Y=[],j=w(function(){var at=t.collection();Y.push(at);var n=s[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(o)),g.push(n),m.forEach(function(y){f.push(y),T.add(y),at.merge(y)});for(var p=w(function(){n=f.shift();var R=t.collection();n.neighborhood().nodes().forEach(function(I){o.intersection(n.edgesWith(I)).length>0&&R.merge(I)});for(var O=0;O<R.length;O++){var S=R[O];if(d=s.intersection(S.union(S.ancestors())),d!=null&&!T.has(d[0])){var V=d.union(d.descendants());V.forEach(function(I){f.push(I),T.add(I),at.merge(I),s.has(I)&&g.push(I)})}}},"_loop23");f.length!=0;)p();if(at.forEach(function(y){o.intersection(y.connectedEdges()).forEach(function(R){at.has(R.source())&&at.has(R.target())&&at.merge(R)})}),g.length==s.length&&(A=!0),!A||A&&P>1){L=g[0],b=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<b&&(b=y.connectedEdges().length,L=y)}),q.push(L.id());var E=t.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],s=s.difference(E),P++}},"_loop2");do j();while(!A);return c&&q.length>0&&c.set("dummy"+(c.size+1),q),Y},u.relocateComponent=function(t,o,s){if(!s.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var A=o.nodeIndexes[Symbol.iterator](),P;!(d=(P=A.next()).done);d=!0){var q=P.value,Y=l(q,2),j=Y[0],x=Y[1],at=s.cy.getElementById(j);if(at){var n=at.boundingBox(),m=o.xCoords[x]-n.w/2,p=o.xCoords[x]+n.w/2,E=o.yCoords[x]-n.h/2,y=o.yCoords[x]+n.h/2;m<c&&(c=m),p>f&&(f=p),E<T&&(T=E),y>g&&(g=y)}}}catch(I){L=!0,b=I}finally{try{!d&&A.return&&A.return()}finally{if(L)throw b}}var R=t.x-(f+c)/2,O=t.y-(g+T)/2;o.xCoords=o.xCoords.map(function(I){return I+R}),o.yCoords=o.yCoords.map(function(I){return I+O})}else{Object.keys(o).forEach(function(I){var Q=o[I],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,B=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>f&&(f=X),rt<T&&(T=rt),B>g&&(g=B)});var S=t.x-(f+c)/2,V=t.y-(g+T)/2;Object.keys(o).forEach(function(I){var Q=o[I];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+V)})}}},u.calcBoundingBox=function(t,o,s,c){for(var f=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,A=void 0,P=void 0,q=t.descendants().not(":parent"),Y=q.length,j=0;j<Y;j++){var x=q[j];L=o[c.get(x.id())]-x.width()/2,b=o[c.get(x.id())]+x.width()/2,A=s[c.get(x.id())]-x.height()/2,P=s[c.get(x.id())]+x.height()/2,f>L&&(f=L),T<b&&(T=b),g>A&&(g=A),d<P&&(d=P)}var at={};return at.topLeftX=f,at.topLeftY=g,at.width=T-f,at.height=d-g,at},u.calcParentsWithoutChildren=function(t,o){var s=t.collection();return o.nodes(":parent").forEach(function(c){var f=!1;c.children().forEach(function(T){T.css("display")!="none"&&(f=!0)}),f||s.merge(c)}),s},a.exports=u}),816:((a,e,r)=>{var l=r(548),i=r(140).CoSELayout,u=r(140).CoSENode,t=r(140).layoutBase.PointD,o=r(140).layoutBase.DimensionD,s=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,f=r(140).CoSEConstants,T=w(function(d,L){var b=d.cy,A=d.eles,P=A.nodes(),q=A.edges(),Y=void 0,j=void 0,x=void 0,at={};d.randomize&&(Y=L.nodeIndexes,j=L.xCoords,x=L.yCoords);var n=w(function(I){return typeof I=="function"},"isFn2"),m=w(function(I,Q){return n(I)?I(Q):I},"optFn2"),p=l.calcParentsWithoutChildren(b,A),E=w(function V(I,Q,z,X){for(var rt=Q.length,B=0;B<rt;B++){var D=Q[B],W=null;D.intersection(p).length==0&&(W=D.children());var $=void 0,tt=D.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(D.outerWidth()!=null&&D.outerHeight()!=null)if(X.randomize)if(!D.isParent())$=I.add(new u(z.graphManager,new t(j[Y.get(D.id())]-tt.w/2,x[Y.get(D.id())]-tt.h/2),new o(parseFloat(tt.w),parseFloat(tt.h))));else{var lt=l.calcBoundingBox(D,j,x,Y);D.intersection(p).length==0?$=I.add(new u(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new o(lt.width,lt.height))):$=I.add(new u(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new o(parseFloat(tt.w),parseFloat(tt.h))))}else $=I.add(new u(z.graphManager,new t(D.position("x")-tt.w/2,D.position("y")-tt.h/2),new o(parseFloat(tt.w),parseFloat(tt.h))));else $=I.add(new u(this.graphManager));if($.id=D.data("id"),$.nodeRepulsion=m(X.nodeRepulsion,D),$.paddingLeft=parseInt(D.css("padding")),$.paddingTop=parseInt(D.css("padding")),$.paddingRight=parseInt(D.css("padding")),$.paddingBottom=parseInt(D.css("padding")),X.nodeDimensionsIncludeLabels&&($.labelWidth=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=D.css("text-valign"),$.labelPosHorizontal=D.css("text-halign")),at[D.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),W!=null&&W.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),$),V(J,W,z,X)}}},"processChildrenList2"),y=w(function(I,Q,z){for(var X=0,rt=0,B=0;B<z.length;B++){var D=z[B],W=at[D.data("source")],$=at[D.data("target")];if(W&&$&&W!==$&&W.getEdgesBetween($).length==0){var tt=Q.add(I.newEdge(),W,$);tt.id=D.id(),tt.idealLength=m(d.idealEdgeLength,D),tt.edgeElasticity=m(d.edgeElasticity,D),X+=tt.idealLength,rt++}}d.idealEdgeLength!=null&&(rt>0?f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,f.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},"processEdges2"),R=w(function(I,Q){Q.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(I.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)},"processConstraints2");d.nestingFactor!=null&&(f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(f.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(f.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(f.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(f.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(f.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?s.QUALITY=2:s.QUALITY=0,f.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!d.randomize,f.ANIMATE=c.ANIMATE=s.ANIMATE=d.animate,f.TILE=d.tile,f.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!d.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1),d.step=="enforced"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1),d.step=="cose"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?f.TREE_REDUCTION_ON_INCREMENTAL=!1:f.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new i,S=O.newGraphManager();return E(S.addRoot(),l.getTopMostNodes(P),O,d),y(O,S,q),R(O,d),O.runLayout(),at},"coseLayout2");a.exports={coseLayout:T}}),212:((a,e,r)=>{var l=(function(){function d(L,b){for(var A=0;A<b.length;A++){var P=b[A];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return w(d,"defineProperties"),function(L,b,A){return b&&d(L.prototype,b),A&&d(L,A),L}})();function i(d,L){if(!(d instanceof L))throw new TypeError("Cannot call a class as a function")}w(i,"_classCallCheck");var u=r(658),t=r(548),o=r(657),s=o.spectralLayout,c=r(816),f=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:w(function(L){return 4500},"nodeRepulsion"),idealEdgeLength:w(function(L){return 50},"idealEdgeLength"),edgeElasticity:w(function(L){return .45},"edgeElasticity"),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:w(function(){},"ready"),stop:w(function(){},"stop")}),g=(function(){function d(L){i(this,d),this.options=u({},T,L)}return w(d,"Layout2"),l(d,[{key:"run",value:w(function(){var b=this,A=this.options,P=A.cy,q=A.eles,Y=[],j=[],x=void 0,at=[];A.fixedNodeConstraint&&(!Array.isArray(A.fixedNodeConstraint)||A.fixedNodeConstraint.length==0)&&(A.fixedNodeConstraint=void 0),A.alignmentConstraint&&(A.alignmentConstraint.vertical&&(!Array.isArray(A.alignmentConstraint.vertical)||A.alignmentConstraint.vertical.length==0)&&(A.alignmentConstraint.vertical=void 0),A.alignmentConstraint.horizontal&&(!Array.isArray(A.alignmentConstraint.horizontal)||A.alignmentConstraint.horizontal.length==0)&&(A.alignmentConstraint.horizontal=void 0)),A.relativePlacementConstraint&&(!Array.isArray(A.relativePlacementConstraint)||A.relativePlacementConstraint.length==0)&&(A.relativePlacementConstraint=void 0);var n=A.fixedNodeConstraint||A.alignmentConstraint||A.relativePlacementConstraint;n&&(A.tile=!1,A.packComponents=!1);var m=void 0,p=!1;if(P.layoutUtilities&&A.packComponents&&(m=P.layoutUtilities("get"),m||(m=P.layoutUtilities()),p=!0),q.nodes().length>0)if(p){var R=t.getTopMostNodes(A.eles.nodes());if(x=t.connectComponents(P,A.eles,R),x.forEach(function(pt){var it=pt.boundingBox();at.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&x.forEach(function(pt){A.eles=pt,Y.push(s(A))}),A.quality=="default"||A.quality=="proof"){var O=P.collection();if(A.tile){var S=new Map,V=[],I=[],Q=0,z={nodeIndexes:S,xCoords:V,yCoords:I},X=[];if(x.forEach(function(pt,it){pt.edges().length==0&&(pt.nodes().forEach(function(ut,Tt){O.merge(pt.nodes()[Tt]),ut.isParent()||(z.nodeIndexes.set(pt.nodes()[Tt].id(),Q++),z.xCoords.push(pt.nodes()[0].position().x),z.yCoords.push(pt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();at.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),x.push(O),Y.push(z);for(var B=X.length-1;B>=0;B--)x.splice(X[B],1),Y.splice(X[B],1),at.splice(X[B],1)}}x.forEach(function(pt,it){A.eles=pt,j.push(f(A,Y[it])),t.relocateComponent(at[it],j[it],A)})}else x.forEach(function(pt,it){t.relocateComponent(at[it],Y[it],A)});var D=new Set;if(x.length>1){var W=[],$=q.filter(function(pt){return pt.css("display")=="none"});x.forEach(function(pt,it){var ut=void 0;if(A.quality=="draft"&&(ut=Y[it].nodeIndexes),pt.nodes().not($).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var Mt=void 0;pt.nodes().not($).forEach(function(Dt){if(A.quality=="draft")if(!Dt.isParent())Mt=ut.get(Dt.id()),Tt.nodes.push({x:Y[it].xCoords[Mt]-Dt.boundingbox().w/2,y:Y[it].yCoords[Mt]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else j[it][Dt.id()]&&Tt.nodes.push({x:j[it][Dt.id()].getLeft(),y:j[it][Dt.id()].getTop(),width:j[it][Dt.id()].getWidth(),height:j[it][Dt.id()].getHeight()})}),pt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(A.quality=="draft"){var St=ut.get(mt.id()),Wt=ut.get(xt.id()),Yt=[],Gt=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Yt.push(bt.topLeftX+bt.width/2),Yt.push(bt.topLeftY+bt.height/2)}else Yt.push(Y[it].xCoords[St]),Yt.push(Y[it].yCoords[St]);if(xt.isParent()){var Xt=t.calcBoundingBox(xt,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Xt.topLeftX+Xt.width/2),Gt.push(Xt.topLeftY+Xt.height/2)}else Gt.push(Y[it].xCoords[Wt]),Gt.push(Y[it].yCoords[Wt]);Tt.edges.push({startX:Yt[0],startY:Yt[1],endX:Gt[0],endY:Gt[1]})}else j[it][mt.id()]&&j[it][xt.id()]&&Tt.edges.push({startX:j[it][mt.id()].getCenterX(),startY:j[it][mt.id()].getCenterY(),endX:j[it][xt.id()].getCenterX(),endY:j[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(W.push(Tt),D.add(it))}});var tt=m.packComponents(W,A.randomize).shifts;if(A.quality=="draft")Y.forEach(function(pt,it){var ut=pt.xCoords.map(function(Mt){return Mt+tt[it].dx}),Tt=pt.yCoords.map(function(Mt){return Mt+tt[it].dy});pt.xCoords=ut,pt.yCoords=Tt});else{var lt=0;D.forEach(function(pt){Object.keys(j[pt]).forEach(function(it){var ut=j[pt][it];ut.setCenter(ut.getCenterX()+tt[lt].dx,ut.getCenterY()+tt[lt].dy)}),lt++})}}}else{var E=A.eles.boundingBox();if(at.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=s(A);Y.push(y)}A.quality=="default"||A.quality=="proof"?(j.push(f(A,Y[0])),t.relocateComponent(at[0],j[0],A)):t.relocateComponent(at[0],Y[0],A)}var J=w(function(it,ut){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,Mt=void 0,Dt=it.data("id");return j.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},Mt=xt[Dt])}),A.nodeDimensionsIncludeLabels&&(Mt.labelWidth&&(Mt.labelPosHorizontal=="left"?Tt.x+=Mt.labelWidth/2:Mt.labelPosHorizontal=="right"&&(Tt.x-=Mt.labelWidth/2)),Mt.labelHeight&&(Mt.labelPosVertical=="top"?Tt.y+=Mt.labelHeight/2:Mt.labelPosVertical=="bottom"&&(Tt.y-=Mt.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return Y.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}},"getPositions2");if(A.quality=="default"||A.quality=="proof"||A.randomize){var Rt=t.calcParentsWithoutChildren(P,q),Lt=q.filter(function(pt){return pt.css("display")=="none"});A.eles=q.not(Lt),q.nodes().not(":parent").not(Lt).layoutPositions(b,A,J),Rt.length>0&&Rt.forEach(function(pt){pt.position(J(pt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}]),d})();a.exports=g}),657:((a,e,r)=>{var l=r(548),i=r(140).layoutBase.Matrix,u=r(140).layoutBase.SVD,t=w(function(s){var c=s.cy,f=s.eles,T=f.nodes(),g=f.nodes(":parent"),d=new Map,L=new Map,b=new Map,A=[],P=[],q=[],Y=[],j=[],x=[],at=[],n=[],m=void 0,p=1e8,E=1e-9,y=s.piTol,R=s.samplingType,O=s.nodeSeparation,S=void 0,V=w(function(){for(var G=0,Z=0,K=!1;Z<S;){G=Math.floor(Math.random()*m),K=!1;for(var k=0;k<Z;k++)if(Y[k]==G){K=!0;break}if(!K)Y[Z]=G,Z++;else continue}},"randomSampleCR2"),I=w(function(G,Z,K){for(var k=[],nt=0,gt=0,ot=0,et=void 0,_=[],vt=0,wt=1,yt=0;yt<m;yt++)_[yt]=p;for(k[gt]=G,_[G]=0;gt>=nt;){ot=k[nt++];for(var It=A[ot],ft=0;ft<It.length;ft++)et=L.get(It[ft]),_[et]==p&&(_[et]=_[ot]+1,k[++gt]=et);x[ot][Z]=_[ot]*O}if(K){for(var st=0;st<m;st++)x[st][Z]<j[st]&&(j[st]=x[st][Z]);for(var Ct=0;Ct<m;Ct++)j[Ct]>vt&&(vt=j[Ct],wt=Ct)}return wt},"BFS2"),Q=w(function(G){var Z=void 0;if(G){Z=Math.floor(Math.random()*m);for(var k=0;k<m;k++)j[k]=p;for(var nt=0;nt<S;nt++)Y[nt]=Z,Z=I(Z,nt,G)}else{V();for(var K=0;K<S;K++)I(Y[K],K,G)}for(var gt=0;gt<m;gt++)for(var ot=0;ot<S;ot++)x[gt][ot]*=x[gt][ot];for(var et=0;et<S;et++)at[et]=[];for(var _=0;_<S;_++)for(var vt=0;vt<S;vt++)at[_][vt]=x[Y[vt]][_]},"allBFS2"),z=w(function(){for(var G=u.svd(at),Z=G.S,K=G.U,k=G.V,nt=Z[0]*Z[0]*Z[0],gt=[],ot=0;ot<S;ot++){gt[ot]=[];for(var et=0;et<S;et++)gt[ot][et]=0,ot==et&&(gt[ot][et]=Z[ot]/(Z[ot]*Z[ot]+nt/(Z[ot]*Z[ot])))}n=i.multMat(i.multMat(k,gt),i.transpose(K))},"sample2"),X=w(function(){for(var G=void 0,Z=void 0,K=[],k=[],nt=[],gt=[],ot=0;ot<m;ot++)K[ot]=Math.random(),k[ot]=Math.random();K=i.normalize(K),k=i.normalize(k);for(var et=E,_=E,vt=void 0;;){for(var wt=0;wt<m;wt++)nt[wt]=K[wt];if(K=i.multGamma(i.multL(i.multGamma(nt),x,n)),G=i.dotProduct(nt,K),K=i.normalize(K),et=i.dotProduct(nt,K),vt=Math.abs(et/_),vt<=1+y&&vt>=1)break;_=et}for(var yt=0;yt<m;yt++)nt[yt]=K[yt];for(_=E;;){for(var It=0;It<m;It++)gt[It]=k[It];if(gt=i.minusOp(gt,i.multCons(nt,i.dotProduct(nt,gt))),k=i.multGamma(i.multL(i.multGamma(gt),x,n)),Z=i.dotProduct(gt,k),k=i.normalize(k),et=i.dotProduct(gt,k),vt=Math.abs(et/_),vt<=1+y&&vt>=1)break;_=et}for(var ft=0;ft<m;ft++)gt[ft]=k[ft];P=i.multCons(nt,Math.sqrt(Math.abs(G))),q=i.multCons(gt,Math.sqrt(Math.abs(Z)))},"powerIteration2");l.connectComponents(c,f,l.getTopMostNodes(T),d),g.forEach(function(F){l.connectComponents(c,f,l.getTopMostNodes(F.descendants().intersection(f)),d)});for(var rt=0,B=0;B<T.length;B++)T[B].isParent()||L.set(T[B].id(),rt++);var D=!0,W=!1,$=void 0;try{for(var tt=d.keys()[Symbol.iterator](),lt;!(D=(lt=tt.next()).done);D=!0){var J=lt.value;L.set(J,rt++)}}catch(F){W=!0,$=F}finally{try{!D&&tt.return&&tt.return()}finally{if(W)throw $}}for(var Rt=0;Rt<L.size;Rt++)A[Rt]=[];g.forEach(function(F){for(var G=F.children().intersection(f);G.nodes(":childless").length==0;)G=G.nodes()[0].children().intersection(f);var Z=0,K=G.nodes(":childless")[0].connectedEdges().length;G.nodes(":childless").forEach(function(k,nt){k.connectedEdges().length<K&&(K=k.connectedEdges().length,Z=nt)}),b.set(F.id(),G.nodes(":childless")[Z].id())}),T.forEach(function(F){var G=void 0;F.isParent()?G=L.get(b.get(F.id())):G=L.get(F.id()),F.neighborhood().nodes().forEach(function(Z){f.intersection(F.edgesWith(Z)).length>0&&(Z.isParent()?A[G].push(b.get(Z.id())):A[G].push(Z.id()))})});var Lt=w(function(G){var Z=L.get(G),K=void 0;d.get(G).forEach(function(k){c.getElementById(k).isParent()?K=b.get(k):K=k,A[Z].push(K),A[L.get(K)].push(G)})},"_loop2"),pt=!0,it=!1,ut=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),Mt;!(pt=(Mt=Tt.next()).done);pt=!0){var Dt=Mt.value;Lt(Dt)}}catch(F){it=!0,ut=F}finally{try{!pt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=L.size;var mt=void 0;if(m>2){S=m<s.sampleSize?m:s.sampleSize;for(var xt=0;xt<m;xt++)x[xt]=[];for(var St=0;St<S;St++)n[St]=[];return s.quality=="draft"||s.step=="all"?(Q(R),z(),X(),mt={nodeIndexes:L,xCoords:P,yCoords:q}):(L.forEach(function(F,G){P.push(c.getElementById(G).position("x")),q.push(c.getElementById(G).position("y"))}),mt={nodeIndexes:L,xCoords:P,yCoords:q}),mt}else{var Wt=L.keys(),Yt=c.getElementById(Wt.next().value),Gt=Yt.position(),bt=Yt.outerWidth();if(P.push(Gt.x),q.push(Gt.y),m==2){var Xt=c.getElementById(Wt.next().value),zt=Xt.outerWidth();P.push(Gt.x+bt/2+zt/2+s.idealEdgeLength),q.push(Gt.y)}return mt={nodeIndexes:L,xCoords:P,yCoords:q},mt}},"spectralLayout2");a.exports={spectralLayout:t}}),579:((a,e,r)=>{var l=r(212),i=w(function(t){t&&t("layout","fcose",l)},"register2");typeof cytoscape<"u"&&i(cytoscape),a.exports=i}),140:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return U[a](r,r.exports,v),r.exports}w(v,"__webpack_require__");var h=v(579);return h})()})})(he)),he.exports}w(Er,"requireCytoscapeFcose");var mr=Er();const Tr=gr(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},se={L:dt((C,H)=>C-H+2,"L"),R:dt((C,H)=>C-2,"R"),T:dt((C,H)=>C-H+2,"T"),B:dt((C,H)=>C-2,"B")},Nr=dt(function(C){return Vt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=dt(function(C){const H=C;return H==="L"||H==="R"||H==="T"||H==="B"},"isArchitectureDirection"),Vt=dt(function(C){const H=C;return H==="L"||H==="R"},"isArchitectureDirectionX"),Qt=dt(function(C){const H=C;return H==="T"||H==="B"},"isArchitectureDirectionY"),Te=dt(function(C,H){const M=Vt(C)&&Qt(H),U=Qt(C)&&Vt(H);return M||U},"isArchitectureDirectionXY"),Lr=dt(function(C){const H=C[0],M=C[1],U=Vt(H)&&Qt(M),N=Qt(H)&&Vt(M);return U||N},"isArchitecturePairXY"),Cr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),ye=dt(function(C,H){const M=`${C}${H}`;return Cr(M)?M:void 0},"getArchitectureDirectionPair"),Ar=dt(function([C,H],M){const U=M[0],N=M[1];return Vt(U)?Qt(N)?[C+(U==="L"?-1:1),H+(N==="T"?1:-1)]:[C+(U==="L"?-1:1),H]:Vt(N)?[C+(N==="L"?1:-1),H+(U==="T"?1:-1)]:[C,H+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Mr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=dt(function(C,H){return Te(C,H)?"bend":Vt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Or=dt(function(C){return C.type==="service"},"isArchitectureService"),Dr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),be=dt(C=>C.data(),"edgeData"),ae=dt(C=>C.data(),"nodeData"),xr=ar.architecture,Pe=class{static{w(this,"ArchitectureDB")}constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}static{dt(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},er()}addService({id:C,icon:H,in:M,title:U,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(M!==void 0){if(C===M)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[M]===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[M]==="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:U,edges:[],in:M}}getServices(){return Object.values(this.nodes).filter(Or)}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(Dr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:H,in:M,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(M!==void 0){if(C===M)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[M]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[M]==="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:U,in:M}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:H,lhsDir:M,rhsDir:U,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:a,title:e}){if(!Re(M))throw new Error(`Invalid direction given for left hand side of edge ${C}--${H}. Expected (L,R,T,B) got ${String(M)}`);if(!Re(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${H}. Expected (L,R,T,B) got ${String(U)}`);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 r=this.nodes[C].in,l=this.nodes[H].in;if(h&&r&&l&&r==l)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(a&&r&&l&&r==l)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 i={lhsId:C,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:H,rhsDir:U,rhsInto:v,rhsGroup:a,title:e};this.edges.push(i),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((a,[e,r])=>(a[e]=r.edges.reduce((l,i)=>{const u=this.getNode(i.lhsId)?.in,t=this.getNode(i.rhsId)?.in;if(u&&t&&u!==t){const o=wr(i.lhsDir,i.rhsDir);o!=="bend"&&(C[u]??={},C[u][t]=o,C[t]??={},C[t][u]=o)}if(i.lhsId===e){const o=ye(i.lhsDir,i.rhsDir);o&&(l[o]=i.rhsId)}else{const o=ye(i.rhsDir,i.lhsDir);o&&(l[o]=i.lhsId)}return l},{}),a),{}),M=Object.keys(H)[0],U={[M]:1},N=Object.keys(H).reduce((a,e)=>e===M?a:{...a,[e]:1},{}),v=dt(a=>{const e={[a]:[0,0]},r=[a];for(;r.length>0;){const l=r.shift();if(l){U[l]=1,delete N[l];const i=H[l],[u,t]=e[l];Object.entries(i).forEach(([o,s])=>{U[s]||(e[s]=Ar([u,t],o),r.push(s))})}}return e},"BFS"),h=[v(M)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:H,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,H){this.elements[C]=H}getElementById(C){return this.elements[C]}getConfig(){return rr({...xr,...ir().architecture})}getConfigField(C){return this.getConfig()[C]}},Ir=dt((C,H)=>{fr(C,H),C.groups.map(M=>H.addGroup(M)),C.services.map(M=>H.addService({...M,type:"service"})),C.junctions.map(M=>H.addJunction({...M,type:"junction"})),C.edges.map(M=>H.addEdge(M))},"populateDb"),Ge={parser:{yy:void 0},parse:dt(async C=>{const H=await cr("architecture",C);Se.debug(H);const M=Ge.parser?.yy;if(!(M 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.");Ir(H,M)},"parse")},Rr=dt(C=>`
|
|
1
|
+
var Ze=Object.defineProperty;var w=(C,H)=>Ze(C,"name",{value:H,configurable:!0});import{_ as dt,K as ke,ac as qe,l as Se,b as Qe,a as Je,q as Ke,t as je,g as _e,s as tr,z as er,F as rr,G as ir,H as ar,c as Ee,am as me,aI as pe,i as nr,d as or,y as sr,aJ as hr,aK as lr}from"./mermaid.core-BoltmwOy.js";import{p as fr}from"./chunk-4BX2VUAB-BTd4ZOZy.js";import{p as cr}from"./treemap-KMMF4GRG-BZXWCFgl.js";import{c as Fe}from"./cytoscape.esm-D8BKPn10.js";import{g as gr}from"./react-vendor-BGrcQn-n.js";import"./main-BYwCRnQT.js";import"./main-BGGa0Ytm.js";import"./_baseUniq-CLNFotAy.js";import"./_basePickBy-OPoOl3Yl.js";import"./clone-C5OnEcJ1.js";import"./ui-vendor-B7JxFfFk.js";var he={exports:{}},le={exports:{}},fe={exports:{}},ur=fe.exports,we;function vr(){return we||(we=1,(function(C,H){w((function(U,N){C.exports=N()}),"webpackUniversalModuleDefinition")(ur,function(){return(function(M){var U={};function N(v){if(U[v])return U[v].exports;var h=U[v]={i:v,l:!1,exports:{}};return M[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return w(N,"__webpack_require__"),N.m=M,N.c=U,N.i=function(v){return v},N.d=function(v,h,a){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(v){var h=v&&v.__esModule?w((function(){return v.default}),"getDefault"):w((function(){return v}),"getModuleExports");return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(M,U,N){function v(){}w(v,"LayoutConstants"),v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,M.exports=v}),(function(M,U,N){var v=N(2),h=N(8),a=N(9);function e(l,i,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=l,this.target=i}w(e,"LEdge"),e.prototype=Object.create(v.prototype);for(var r in v)e[r]=v[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(l,i){for(var u=this.getOtherEnd(l),t=i.getGraphManager().getRoot();;){if(u.getOwner()==i)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},e.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},M.exports=e}),(function(M,U,N){function v(h){this.vGraphObject=h}w(v,"LGraphObject"),M.exports=v}),(function(M,U,N){var v=N(2),h=N(10),a=N(13),e=N(0),r=N(16),l=N(5);function i(t,o,s,c){s==null&&c==null&&(c=o),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,s!=null&&o!=null?this.rect=new a(o.x,o.y,s.width,s.height):this.rect=new a}w(i,"LNode"),i.prototype=Object.create(v.prototype);for(var u in v)i[u]=v[u];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,o){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=o.width,this.rect.height=o.height},i.prototype.setCenter=function(t,o){this.rect.x=t-this.rect.width/2,this.rect.y=o-this.rect.height/2},i.prototype.setLocation=function(t,o){this.rect.x=t,this.rect.y=o},i.prototype.moveBy=function(t,o){this.rect.x+=t,this.rect.y+=o},i.prototype.getEdgeListToNode=function(t){var o=[],s=this;return s.edges.forEach(function(c){if(c.target==t){if(c.source!=s)throw"Incorrect edge source!";o.push(c)}}),o},i.prototype.getEdgesBetween=function(t){var o=[],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)&&o.push(c)}),o},i.prototype.getNeighborsList=function(){var t=new Set,o=this;return o.edges.forEach(function(s){if(s.source==o)t.add(s.target);else{if(s.target!=o)throw"Incorrect incidency!";t.add(s.source)}}),t},i.prototype.withChildren=function(){var t=new Set,o,s;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),f=0;f<c.length;f++)o=c[f],s=o.withChildren(),s.forEach(function(T){t.add(T)});return t},i.prototype.getNoOfChildren=function(){var t=0,o;if(this.child==null)t=1;else for(var s=this.child.getNodes(),c=0;c<s.length;c++)o=s[c],t+=o.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.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)},i.prototype.scatter=function(){var t,o,s=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(c-s)+s;var f=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;o=e.WORLD_CENTER_Y+r.nextDouble()*(T-f)+f,this.rect.x=t,this.rect.y=o},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var o=t.getRight()-t.getLeft(),s=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+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))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var o=this.rect.x;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var s=this.rect.y;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var c=new l(o,s),f=t.inverseTransformPoint(c);this.setLocation(f.x,f.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=i}),(function(M,U,N){var v=N(0);function h(){}w(h,"FDLayoutConstants");for(var a in v)h[a]=v[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,U,N){function v(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}w(v,"PointD"),v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=v}),(function(M,U,N){var v=N(2),h=N(10),a=N(0),e=N(7),r=N(3),l=N(1),i=N(13),u=N(12),t=N(11);function o(c,f,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,f!=null&&f instanceof e?this.graphManager=f:f!=null&&f instanceof Layout&&(this.graphManager=f.graphManager)}w(o,"LGraph"),o.prototype=Object.create(v.prototype);for(var s in v)o[s]=v[s];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(c,f,T){if(f==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 d=c;if(!(this.getNodes().indexOf(f)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(f.owner==T.owner&&f.owner==this))throw"Both owners must be this graph!";return f.owner!=T.owner?null:(d.source=f,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),f.edges.push(d),T!=f&&T.edges.push(d),d)}},o.prototype.remove=function(c){var f=c;if(c instanceof r){if(f==null)throw"Node is null!";if(!(f.owner!=null&&f.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=f.edges.slice(),g,d=T.length,L=0;L<d;L++)g=T[L],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var b=this.nodes.indexOf(f);if(b==-1)throw"Node not in owner node list!";this.nodes.splice(b,1)}else if(c instanceof l){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 A=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(A>-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(P,1);var b=g.source.owner.getEdges().indexOf(g);if(b==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(b,1)}},o.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,f=h.MAX_VALUE,T,g,d,L=this.getNodes(),b=L.length,A=0;A<b;A++){var P=L[A];T=P.getTop(),g=P.getLeft(),c>T&&(c=T),f>g&&(f=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=f-d,this.top=c-d,new u(this.left,this.top))},o.prototype.updateBounds=function(c){for(var f=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,b,A,P,q,Y=this.nodes,j=Y.length,x=0;x<j;x++){var at=Y[x];c&&at.child!=null&&at.updateBounds(),L=at.getLeft(),b=at.getRight(),A=at.getTop(),P=at.getBottom(),f>L&&(f=L),T<b&&(T=b),g>A&&(g=A),d<P&&(d=P)}var n=new i(f,g,T-f,d-g);f==h.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?q=Y[0].getParent().paddingLeft:q=this.margin,this.left=n.x-q,this.right=n.x+n.width+q,this.top=n.y-q,this.bottom=n.y+n.height+q},o.calculateBounds=function(c){for(var f=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,b,A,P,q=c.length,Y=0;Y<q;Y++){var j=c[Y];L=j.getLeft(),b=j.getRight(),A=j.getTop(),P=j.getBottom(),f>L&&(f=L),T<b&&(T=b),g>A&&(g=A),d<P&&(d=P)}var x=new i(f,g,T-f,d-g);return x},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var c=0,f=this.nodes,T=f.length,g=0;g<T;g++){var d=f[g];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var f=new t,T=new Set,g=this.nodes[0],d,L,b=g.withChildren();for(b.forEach(function(x){f.push(x),T.add(x)});f.length!==0;){g=f.shift(),d=g.getEdges();for(var A=d.length,P=0;P<A;P++){var q=d[P];if(L=q.getOtherEndInGraph(g,this),L!=null&&!T.has(L)){var Y=L.withChildren();Y.forEach(function(x){f.push(x),T.add(x)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var j=0;T.forEach(function(x){x.owner==c&&j++}),j==this.nodes.length&&(this.isConnected=!0)}},M.exports=o}),(function(M,U,N){var v,h=N(1);function a(e){v=N(6),this.layout=e,this.graphs=[],this.edges=[]}w(a,"LGraphManager"),a.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),l=this.add(e,r);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(e,r,l,i,u){if(l==null&&i==null&&u==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{u=l,i=r,l=e;var t=i.getOwner(),o=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==o)return l.isInterGraph=!1,t.add(l,i,u);if(l.isInterGraph=!0,l.source=i,l.target=u,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(e){if(e instanceof v){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(r.getEdges());for(var i,u=l.length,t=0;t<u;t++)i=l[t],r.remove(i);var o=[];o=o.concat(r.getNodes());var s;u=o.length;for(var t=0;t<u;t++)s=o[t],r.remove(s);r==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(r);this.graphs.splice(c,1),r.parent=null}else if(e instanceof h){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var c=i.source.edges.indexOf(i);if(i.source.edges.splice(c,1),c=i.target.edges.indexOf(i),i.target.edges.splice(c,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var c=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),l=r.length,i=0;i<l;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var l=0;l<r.length;l++)e=e.concat(r[l].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var l=e.getOwner(),i;do{if(i=l.getParent(),i==null)break;if(i==r)return!0;if(l=i.getOwner(),l==null)break}while(!0);l=r.getOwner();do{if(i=l.getParent(),i==null)break;if(i==e)return!0;if(l=i.getOwner(),l==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,r,l,i,u,t=this.getAllEdges(),o=t.length,s=0;s<o;s++){if(e=t[s],r=e.source,l=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=l,r==l){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=l,u=l.getOwner();e.lca==null;){if(u==i){e.lca=u;break}if(u==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=u.getParent(),u=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var l=e.getOwner();do{if(l==null)break;var i=r.getOwner();do{if(i==null)break;if(i==l)return i;i=i.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},a.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var l,i=e.getNodes(),u=i.length,t=0;t<u;t++)l=i[t],l.inclusionTreeDepth=r,l.child!=null&&this.calcInclusionTreeDepths(l.child,r+1)},a.prototype.includesInvalidEdge=function(){for(var e,r=[],l=this.edges.length,i=0;i<l;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},M.exports=a}),(function(M,U,N){var v=N(12);function h(){}w(h,"IGeometry"),h.calcSeparationAmount=function(a,e,r,l){if(!a.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,i),r[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),r[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(r[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(r[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*r[0],o=r[1]/u;r[0]<o?o=r[0]:t=r[1],r[0]=-1*i[0]*(o/2+l),r[1]=-1*i[1]*(t/2+l)},h.decideDirectionsForOverlappingNodes=function(a,e,r){a.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,a.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},h.getIntersection2=function(a,e,r){var l=a.getCenterX(),i=a.getCenterY(),u=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return r[0]=l,r[1]=i,r[2]=u,r[3]=t,!0;var o=a.getX(),s=a.getY(),c=a.getRight(),f=a.getX(),T=a.getBottom(),g=a.getRight(),d=a.getWidthHalf(),L=a.getHeightHalf(),b=e.getX(),A=e.getY(),P=e.getRight(),q=e.getX(),Y=e.getBottom(),j=e.getRight(),x=e.getWidthHalf(),at=e.getHeightHalf(),n=!1,m=!1;if(l===u){if(i>t)return r[0]=l,r[1]=s,r[2]=u,r[3]=Y,!1;if(i<t)return r[0]=l,r[1]=T,r[2]=u,r[3]=A,!1}else if(i===t){if(l>u)return r[0]=o,r[1]=i,r[2]=P,r[3]=t,!1;if(l<u)return r[0]=c,r[1]=i,r[2]=b,r[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-i)/(u-l),R=void 0,O=void 0,S=void 0,V=void 0,I=void 0,Q=void 0;if(-p===y?l>u?(r[0]=f,r[1]=T,n=!0):(r[0]=c,r[1]=s,n=!0):p===y&&(l>u?(r[0]=o,r[1]=s,n=!0):(r[0]=g,r[1]=T,n=!0)),-E===y?u>l?(r[2]=q,r[3]=Y,m=!0):(r[2]=P,r[3]=A,m=!0):E===y&&(u>l?(r[2]=b,r[3]=A,m=!0):(r[2]=j,r[3]=Y,m=!0)),n&&m)return!1;if(l>u?i>t?(R=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(E,y,2)):(R=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-E,y,1)):i>t?(R=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-E,y,3)):(R=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(E,y,4)),!n)switch(R){case 1:V=s,S=l+-L/y,r[0]=S,r[1]=V;break;case 2:S=g,V=i+d*y,r[0]=S,r[1]=V;break;case 3:V=T,S=l+L/y,r[0]=S,r[1]=V;break;case 4:S=f,V=i+-d*y,r[0]=S,r[1]=V;break}if(!m)switch(O){case 1:Q=A,I=u+-at/y,r[2]=I,r[3]=Q;break;case 2:I=j,Q=t+x*y,r[2]=I,r[3]=Q;break;case 3:Q=Y,I=u+at/y,r[2]=I,r[3]=Q;break;case 4:I=q,Q=t+-x*y,r[2]=I,r[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,r){return a>e?r:1+r%4},h.getIntersection=function(a,e,r,l){if(l==null)return this.getIntersection2(a,e,r);var i=a.x,u=a.y,t=e.x,o=e.y,s=r.x,c=r.y,f=l.x,T=l.y,g=void 0,d=void 0,L=void 0,b=void 0,A=void 0,P=void 0,q=void 0,Y=void 0,j=void 0;return L=o-u,A=i-t,q=t*u-i*o,b=T-c,P=s-f,Y=f*c-s*T,j=L*P-b*A,j===0?null:(g=(A*Y-P*q)/j,d=(b*q-L*Y)/j,new v(g,d))},h.angleOfVector=function(a,e,r,l){var i=void 0;return a!==r?(i=Math.atan((l-e)/(r-a)),r<a?i+=Math.PI:l<e&&(i+=this.TWO_PI)):l<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},h.doIntersect=function(a,e,r,l){var i=a.x,u=a.y,t=e.x,o=e.y,s=r.x,c=r.y,f=l.x,T=l.y,g=(t-i)*(T-c)-(f-s)*(o-u);if(g===0)return!1;var d=((T-c)*(f-i)+(s-f)*(T-u))/g,L=((u-o)*(f-i)+(t-i)*(T-u))/g;return 0<d&&d<1&&0<L&&L<1},h.findCircleLineIntersections=function(a,e,r,l,i,u,t){var o=(r-a)*(r-a)+(l-e)*(l-e),s=2*((a-i)*(r-a)+(e-u)*(l-e)),c=(a-i)*(a-i)+(e-u)*(e-u)-t*t,f=s*s-4*o*c;if(f>=0){var T=(-s+Math.sqrt(s*s-4*o*c))/(2*o),g=(-s-Math.sqrt(s*s-4*o*c))/(2*o),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,U,N){function v(){}w(v,"IMath"),v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=v}),(function(M,U,N){function v(){}w(v,"Integer"),v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,M.exports=v}),(function(M,U,N){var v=(function(){function i(u,t){for(var o=0;o<t.length;o++){var s=t[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(u,s.key,s)}}return w(i,"defineProperties"),function(u,t,o){return t&&i(u.prototype,t),o&&i(u,o),u}})();function h(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}w(h,"_classCallCheck");var a=w(function(u){return{value:u,next:null,prev:null}},"nodeFrom2"),e=w(function(u,t,o,s){return u!==null?u.next=t:s.head=t,o!==null?o.prev=t:s.tail=t,t.prev=u,t.next=o,s.length++,t},"add2"),r=w(function(u,t){var o=u.prev,s=u.next;return o!==null?o.next=s:t.head=s,s!==null?s.prev=o:t.tail=o,u.prev=u.next=null,t.length--,u},"_remove2"),l=(function(){function i(u){var t=this;h(this,i),this.length=0,this.head=null,this.tail=null,u?.forEach(function(o){return t.push(o)})}return w(i,"LinkedList2"),v(i,[{key:"size",value:w(function(){return this.length},"size")},{key:"insertBefore",value:w(function(t,o){return e(o.prev,a(t),o,this)},"insertBefore")},{key:"insertAfter",value:w(function(t,o){return e(o,a(t),o.next,this)},"insertAfter")},{key:"insertNodeBefore",value:w(function(t,o){return e(o.prev,t,o,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:w(function(t,o){return e(o,t,o.next,this)},"insertNodeAfter")},{key:"push",value:w(function(t){return e(this.tail,a(t),null,this)},"push")},{key:"unshift",value:w(function(t){return e(null,a(t),this.head,this)},"unshift")},{key:"remove",value:w(function(t){return r(t,this)},"remove")},{key:"pop",value:w(function(){return r(this.tail,this).value},"pop")},{key:"popNode",value:w(function(){return r(this.tail,this)},"popNode")},{key:"shift",value:w(function(){return r(this.head,this).value},"shift")},{key:"shiftNode",value:w(function(){return r(this.head,this)},"shiftNode")},{key:"get_object_at",value:w(function(t){if(t<=this.length()){for(var o=1,s=this.head;o<t;)s=s.next,o++;return s.value}},"get_object_at")},{key:"set_object_at",value:w(function(t,o){if(t<=this.length()){for(var s=1,c=this.head;s<t;)c=c.next,s++;c.value=o}},"set_object_at")}]),i})();M.exports=l}),(function(M,U,N){function v(h,a,e){this.x=null,this.y=null,h==null&&a==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof a=="number"&&e==null?(this.x=h,this.y=a):h.constructor.name=="Point"&&a==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}w(v,"Point2"),v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(h,a,e){h.constructor.name=="Point"&&a==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof a=="number"&&e==null&&(parseInt(h)==h&&parseInt(a)==a?this.move(h,a):(this.x=Math.floor(h+.5),this.y=Math.floor(a+.5)))},v.prototype.move=function(h,a){this.x=h,this.y=a},v.prototype.translate=function(h,a){this.x+=h,this.y+=a},v.prototype.equals=function(h){if(h.constructor.name=="Point"){var a=h;return this.x==a.x&&this.y==a.y}return this==h},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},M.exports=v}),(function(M,U,N){function v(h,a,e,r){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&a!=null&&e!=null&&r!=null&&(this.x=h,this.y=a,this.width=e,this.height=r)}w(v,"RectangleD"),v.prototype.getX=function(){return this.x},v.prototype.setX=function(h){this.x=h},v.prototype.getY=function(){return this.y},v.prototype.setY=function(h){this.y=h},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},M.exports=v}),(function(M,U,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function h(){}w(h,"UniqueIDGeneretor"),h.lastID=0,h.createID=function(a){return h.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=h.getString(),h.lastID++),a.uniqueID)},h.getString=function(a){return a==null&&(a=h.lastID),"Object#"+a},h.isPrimitive=function(a){var e=typeof a>"u"?"undefined":v(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,U,N){function v(s){if(Array.isArray(s)){for(var c=0,f=Array(s.length);c<s.length;c++)f[c]=s[c];return f}else return Array.from(s)}w(v,"_toConsumableArray");var h=N(0),a=N(7),e=N(3),r=N(1),l=N(6),i=N(5),u=N(17),t=N(29);function o(s){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,s!=null&&(this.isRemoteUse=s)}w(o,"Layout2"),o.RANDOM_SEED=1,o.prototype=Object.create(t.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var s=new a(this);return this.graphManager=s,s},o.prototype.newGraph=function(s){return new l(null,this.graphManager,s)},o.prototype.newNode=function(s){return new e(this.graphManager,s)},o.prototype.newEdge=function(s){return new r(null,null,s)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var s;return this.checkLayoutSuccess()?s=!1:s=this.layout(),h.ANIMATE==="during"?!1:(s&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,s)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.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 f=this.graphManager.getRoot().getNodes(),c=0;c<f.length;c++)f[c];this.update(this.graphManager.getRoot())}},o.prototype.update=function(s){if(s==null)this.update2();else if(s instanceof e){var c=s;if(c.getChild()!=null)for(var f=c.getChild().getNodes(),T=0;T<f.length;T++)update(f[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(s instanceof r){var d=s;if(d.vGraphObject!=null){var L=d.vGraphObject;L.update(d)}}else if(s instanceof l){var b=s;if(b.vGraphObject!=null){var A=b.vGraphObject;A.update(b)}}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(s){if(s==null)this.transform(new i(0,0));else{var c=new u,f=this.graphManager.getRoot().updateLeftTop();if(f!=null){c.setWorldOrgX(s.x),c.setWorldOrgY(s.y),c.setDeviceOrgX(f.x),c.setDeviceOrgY(f.y);for(var T=this.getAllNodes(),g,d=0;d<T.length;d++)g=T[d],g.transform(c)}}},o.prototype.positionNodesRandomly=function(s){if(s==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,f,T=s.getNodes(),g=0;g<T.length;g++)c=T[g],f=c.getChild(),f==null||f.getNodes().length==0?c.scatter():(this.positionNodesRandomly(f),c.updateBounds())},o.prototype.getFlatForest=function(){for(var s=[],c=!0,f=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<f.length;g++)f[g].getChild()!=null&&(T=!1);if(!T)return s;var d=new Set,L=[],b=new Map,A=[];for(A=A.concat(f);A.length>0&&c;){for(L.push(A[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var q=P.getEdges(),g=0;g<q.length;g++){var Y=q[g].getOtherEnd(P);if(b.get(P)!=Y)if(!d.has(Y))L.push(Y),b.set(Y,P);else{c=!1;break}}}if(!c)s=[];else{var j=[].concat(v(d));s.push(j);for(var g=0;g<j.length;g++){var x=j[g],at=A.indexOf(x);at>-1&&A.splice(at,1)}d=new Set,b=new Map}}return s},o.prototype.createDummyNodesForBendpoints=function(s){for(var c=[],f=s.source,T=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g<s.bendpoints.length;g++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var L=this.newEdge(null);this.graphManager.add(L,f,d),c.add(d),f=d}var L=this.newEdge(null);return this.graphManager.add(L,f,s.target),this.edgeToDummyNodes.set(s,c),s.isInterGraph()?this.graphManager.remove(s):T.remove(s),c},o.prototype.createBendpointsFromDummyNodes=function(){var s=[];s=s.concat(this.graphManager.getAllEdges()),s=[].concat(v(this.edgeToDummyNodes.keys())).concat(s);for(var c=0;c<s.length;c++){var f=s[c];if(f.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(f),g=0;g<T.length;g++){var d=T[g],L=new i(d.getCenterX(),d.getCenterY()),b=f.bendpoints.get(g);b.x=L.x,b.y=L.y,d.getOwner().remove(d)}this.graphManager.add(f,f.source,f.target)}}},o.transform=function(s,c,f,T){if(f!=null&&T!=null){var g=c;if(s<=50){var d=c/f;g-=(c-d)/50*(50-s)}else{var L=c*T;g+=(L-c)/50*(s-50)}return g}else{var b,A;return s<=50?(b=9*c/500,A=c/10):(b=9*c/50,A=-8*c),b*s+A}},o.findCenterOfTree=function(s){var c=[];c=c.concat(s);var f=[],T=new Map,g=!1,d=null;(c.length==1||c.length==2)&&(g=!0,d=c[0]);for(var L=0;L<c.length;L++){var b=c[L],A=b.getNeighborsList().size;T.set(b,b.getNeighborsList().size),A==1&&f.push(b)}var P=[];for(P=P.concat(f);!g;){var q=[];q=q.concat(P),P=[];for(var L=0;L<c.length;L++){var b=c[L],Y=c.indexOf(b);Y>=0&&c.splice(Y,1);var j=b.getNeighborsList();j.forEach(function(n){if(f.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&P.push(n),T.set(n,p)}})}f=f.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},o.prototype.setGraphManager=function(s){this.graphManager=s},M.exports=o}),(function(M,U,N){function v(){}w(v,"RandomSeed"),v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},M.exports=v}),(function(M,U,N){var v=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}w(h,"Transform"),h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/r),e},h.prototype.transformY=function(a){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/r),e},h.prototype.inverseTransformX=function(a){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/r),e},h.prototype.inverseTransformY=function(a){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/r),e},h.prototype.inverseTransformPoint=function(a){var e=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,U,N){function v(t){if(Array.isArray(t)){for(var o=0,s=Array(t.length);o<t.length;o++)s[o]=t[o];return s}else return Array.from(t)}w(v,"_toConsumableArray");var h=N(15),a=N(4),e=N(0),r=N(8),l=N(9);function i(){h.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}w(i,"FDLayout"),i.prototype=Object.create(h.prototype);for(var u in h)i[u]=h[u];i.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,o,s,c,f,T,g,d=this.getGraphManager().getAllEdges(),L=0;L<d.length;L++)t=d[L],o=t.idealLength,t.isInterGraph&&(c=t.getSource(),f=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),s=t.getLca().getInclusionTreeDepth(),t.idealLength+=o*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+f.getInclusionTreeDepth()-2*s))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),o,s=0;s<t.length;s++)o=t[s],this.calcSpringForce(o,o.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,c,f,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,s=0;s<g.length;s++)f=g[s],this.calculateRepulsionForceOfANode(f,d,t,o),d.add(f);else for(s=0;s<g.length;s++)for(f=g[s],c=s+1;c<g.length;c++)T=g[c],f.getOwner()==T.getOwner()&&this.calcRepulsionForce(f,T)},i.prototype.calcGravitationalForces=function(){for(var t,o=this.getAllNodesToApplyGravitation(),s=0;s<o.length;s++)t=o[s],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),o,s=0;s<t.length;s++)o=t[s],o.move()},i.prototype.calcSpringForce=function(t,o){var s=t.getSource(),c=t.getTarget(),f,T,g,d;if(this.uniformLeafNodeSizes&&s.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;f=t.getLength(),f!=0&&(T=t.edgeElasticity*(f-o),g=T*(t.lengthX/f),d=T*(t.lengthY/f),s.springForceX+=g,s.springForceY+=d,c.springForceX-=g,c.springForceY-=d)},i.prototype.calcRepulsionForce=function(t,o){var s=t.getRect(),c=o.getRect(),f=new Array(2),T=new Array(4),g,d,L,b,A,P,q;if(s.intersects(c)){r.calcSeparationAmount(s,c,f,a.DEFAULT_EDGE_LENGTH/2),P=2*f[0],q=2*f[1];var Y=t.noOfChildren*o.noOfChildren/(t.noOfChildren+o.noOfChildren);t.repulsionForceX-=Y*P,t.repulsionForceY-=Y*q,o.repulsionForceX+=Y*P,o.repulsionForceY+=Y*q}else this.uniformLeafNodeSizes&&t.getChild()==null&&o.getChild()==null?(g=c.getCenterX()-s.getCenterX(),d=c.getCenterY()-s.getCenterY()):(r.getIntersection(s,c,T),g=T[2]-T[0],d=T[3]-T[1]),Math.abs(g)<a.MIN_REPULSION_DIST&&(g=l.sign(g)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=l.sign(d)*a.MIN_REPULSION_DIST),L=g*g+d*d,b=Math.sqrt(L),A=(t.nodeRepulsion/2+o.nodeRepulsion/2)*t.noOfChildren*o.noOfChildren/L,P=A*g/b,q=A*d/b,t.repulsionForceX-=P,t.repulsionForceY-=q,o.repulsionForceX+=P,o.repulsionForceY+=q},i.prototype.calcGravitationalForce=function(t){var o,s,c,f,T,g,d,L;o=t.getOwner(),s=(o.getRight()+o.getLeft())/2,c=(o.getTop()+o.getBottom())/2,f=t.getCenterX()-s,T=t.getCenterY()-c,g=Math.abs(f)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=o.getEstimatedSize()*this.gravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*f,t.gravitationForceY=-this.gravityConstant*T)):(L=o.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||o},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,o=this.graphManager.getAllNodes(),s=0;s<o.length;s++)t=o[s],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var o=0,s=0;o=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(o),f=0;f<o;f++)c[f]=new Array(s);for(var f=0;f<o;f++)for(var T=0;T<s;T++)c[f][T]=new Array;return c},i.prototype.addNodeToGrid=function(t,o,s){var c=0,f=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-o)/this.repulsionRange)),f=parseInt(Math.floor((t.getRect().width+t.getRect().x-o)/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 d=c;d<=f;d++)for(var L=T;L<=g;L++)this.grid[d][L].push(t),t.setGridCoordinates(c,f,T,g)},i.prototype.updateGrid=function(){var t,o,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<s.length;t++)o=s[t],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,o,s,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&s||c){var f=new Set;t.surrounding=new Array;for(var T,g=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(d<0||L<0||d>=g.length||L>=g[0].length)){for(var b=0;b<g[d][L].length;b++)if(T=g[d][L][b],!(t.getOwner()!=T.getOwner()||t==T)&&!o.has(T)&&!f.has(T)){var A=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);A<=this.repulsionRange&&P<=this.repulsionRange&&f.add(T)}}t.surrounding=[].concat(v(f))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},i.prototype.calcRepulsionRange=function(){return 0},M.exports=i}),(function(M,U,N){var v=N(1),h=N(4);function a(r,l,i){v.call(this,r,l,i),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}w(a,"FDLayoutEdge"),a.prototype=Object.create(v.prototype);for(var e in v)a[e]=v[e];M.exports=a}),(function(M,U,N){var v=N(3),h=N(4);function a(r,l,i,u){v.call(this,r,l,i,u),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}w(a,"FDLayoutNode"),a.prototype=Object.create(v.prototype);for(var e in v)a[e]=v[e];a.prototype.setGridCoordinates=function(r,l,i,u){this.startX=r,this.finishX=l,this.startY=i,this.finishY=u},M.exports=a}),(function(M,U,N){function v(h,a){this.width=0,this.height=0,h!==null&&a!==null&&(this.height=a,this.width=h)}w(v,"DimensionD2"),v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},M.exports=v}),(function(M,U,N){var v=N(14);function h(){this.map={},this.keys=[]}w(h,"HashMap"),h.prototype.put=function(a,e){var r=v.createID(a);this.contains(r)||(this.map[r]=e,this.keys.push(a))},h.prototype.contains=function(a){return v.createID(a),this.map[a]!=null},h.prototype.get=function(a){var e=v.createID(a);return this.map[e]},h.prototype.keySet=function(){return this.keys},M.exports=h}),(function(M,U,N){var v=N(14);function h(){this.set={}}w(h,"HashSet"),h.prototype.add=function(a){var e=v.createID(a);this.contains(e)||(this.set[e]=a)},h.prototype.remove=function(a){delete this.set[v.createID(a)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(a){return this.set[v.createID(a)]==a},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),r=e.length,l=0;l<r;l++)a.push(this.set[e[l]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(a){for(var e=a.length,r=0;r<e;r++){var l=a[r];this.add(l)}},M.exports=h}),(function(M,U,N){function v(){}w(v,"Matrix"),v.multMat=function(h,a){for(var e=[],r=0;r<h.length;r++){e[r]=[];for(var l=0;l<a[0].length;l++){e[r][l]=0;for(var i=0;i<h[0].length;i++)e[r][l]+=h[r][i]*a[i][l]}}return e},v.transpose=function(h){for(var a=[],e=0;e<h[0].length;e++){a[e]=[];for(var r=0;r<h.length;r++)a[e][r]=h[r][e]}return a},v.multCons=function(h,a){for(var e=[],r=0;r<h.length;r++)e[r]=h[r]*a;return e},v.minusOp=function(h,a){for(var e=[],r=0;r<h.length;r++)e[r]=h[r]-a[r];return e},v.dotProduct=function(h,a){for(var e=0,r=0;r<h.length;r++)e+=h[r]*a[r];return e},v.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},v.normalize=function(h){for(var a=[],e=this.mag(h),r=0;r<h.length;r++)a[r]=h[r]/e;return a},v.multGamma=function(h){for(var a=[],e=0,r=0;r<h.length;r++)e+=h[r];e*=-1/h.length;for(var l=0;l<h.length;l++)a[l]=e+h[l];return a},v.multL=function(h,a,e){for(var r=[],l=[],i=[],u=0;u<a[0].length;u++){for(var t=0,o=0;o<a.length;o++)t+=-.5*a[o][u]*h[o];l[u]=t}for(var s=0;s<e.length;s++){for(var c=0,f=0;f<e.length;f++)c+=e[s][f]*l[f];i[s]=c}for(var T=0;T<a.length;T++){for(var g=0,d=0;d<a[0].length;d++)g+=a[T][d]*i[d];r[T]=g}return r},M.exports=v}),(function(M,U,N){var v=(function(){function r(l,i){for(var u=0;u<i.length;u++){var t=i[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(l,t.key,t)}}return w(r,"defineProperties"),function(l,i,u){return i&&r(l.prototype,i),u&&r(l,u),l}})();function h(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")}w(h,"_classCallCheck");var a=N(11),e=(function(){function r(l,i){h(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;l instanceof a?u=l.size():u=l.length,this._quicksort(l,0,u-1)}return w(r,"Quicksort2"),v(r,[{key:"_quicksort",value:w(function(i,u,t){if(u<t){var o=this._partition(i,u,t);this._quicksort(i,u,o),this._quicksort(i,o+1,t)}},"_quicksort")},{key:"_partition",value:w(function(i,u,t){for(var o=this._get(i,u),s=u,c=t;;){for(;this.compareFunction(o,this._get(i,c));)c--;for(;this.compareFunction(this._get(i,s),o);)s++;if(s<c)this._swap(i,s,c),s++,c--;else return c}},"_partition")},{key:"_get",value:w(function(i,u){return i instanceof a?i.get_object_at(u):i[u]},"_get")},{key:"_set",value:w(function(i,u,t){i instanceof a?i.set_object_at(u,t):i[u]=t},"_set")},{key:"_swap",value:w(function(i,u,t){var o=this._get(i,u);this._set(i,u,this._get(i,t)),this._set(i,t,o)},"_swap")},{key:"_defaultCompareFunction",value:w(function(i,u){return u>i},"_defaultCompareFunction")}]),r})();M.exports=e}),(function(M,U,N){function v(){}w(v,"SVD"),v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At})(Math.min(this.m+1,this.n)),this.U=(function(Nt){var At=w(function $t(Pt){if(Pt.length==0)return 0;for(var Bt=[],Ft=0;Ft<Pt[0];Ft++)Bt.push($t(Pt.slice(1)));return Bt},"allocate2");return At(Nt)})([this.m,a]),this.V=(function(Nt){var At=w(function $t(Pt){if(Pt.length==0)return 0;for(var Bt=[],Ft=0;Ft<Pt[0];Ft++)Bt.push($t(Pt.slice(1)));return Bt},"allocate2");return At(Nt)})([this.n,this.n]);for(var e=(function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At})(this.n),r=(function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At})(this.m),l=!0,i=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,u);t++){if(t<i){this.s[t]=0;for(var o=t;o<this.m;o++)this.s[t]=v.hypot(this.s[t],h[o][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var s=t;s<this.m;s++)h[s][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Nt,At){return Nt&&At})(t<i,this.s[t]!==0)){for(var f=0,T=t;T<this.m;T++)f+=h[T][t]*h[T][c];f=-f/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=f*h[g][t]}e[c]=h[t][c]}if((function(Nt,At){return At})(l,t<i))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<u){e[t]=0;for(var L=t+1;L<this.n;L++)e[t]=v.hypot(e[t],e[L]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var b=t+1;b<this.n;b++)e[b]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Nt,At){return Nt&&At})(t+1<this.m,e[t]!==0)){for(var A=t+1;A<this.m;A++)r[A]=0;for(var P=t+1;P<this.n;P++)for(var q=t+1;q<this.m;q++)r[q]+=e[P]*h[q][P];for(var Y=t+1;Y<this.n;Y++)for(var j=-e[Y]/e[t+1],x=t+1;x<this.m;x++)h[x][Y]+=j*r[x]}for(var at=t+1;at<this.n;at++)this.V[at][t]=e[at]}}var n=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=h[i][i]),this.m<n&&(this.s[n-1]=0),u+1<n&&(e[u]=h[u][n-1]),e[n-1]=0;{for(var m=i;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=i-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var R=0,O=E;O<this.m;O++)R+=this.U[O][E]*this.U[O][y];R=-R/this.U[E][E];for(var S=E;S<this.m;S++)this.U[S][y]+=R*this.U[S][E]}for(var V=E;V<this.m;V++)this.U[V][E]=-this.U[V][E];this.U[E][E]=1+this.U[E][E];for(var I=0;I<E-1;I++)this.U[I][E]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][E]=0;this.U[E][E]=1}}for(var z=this.n-1;z>=0;z--){if((function(Nt,At){return Nt&&At})(z<u,e[z]!==0))for(var X=z+1;X<a;X++){for(var rt=0,B=z+1;B<this.n;B++)rt+=this.V[B][z]*this.V[B][X];rt=-rt/this.V[z+1][z];for(var D=z+1;D<this.n;D++)this.V[D][X]+=rt*this.V[D][z]}for(var W=0;W<this.n;W++)this.V[W][z]=0;this.V[z][z]=1}for(var $=n-1,tt=Math.pow(2,-52),lt=Math.pow(2,-966);n>0;){var J=void 0,Rt=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=lt+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=J&&Lt!==J;Lt--){var pt=(Lt!==n?Math.abs(e[Lt]):0)+(Lt!==J+1?Math.abs(e[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+tt*pt){this.s[Lt]=0;break}}Lt===J?Rt=3:Lt===n-1?Rt=1:(Rt=2,J=Lt)}switch(J++,Rt){case 1:{var it=e[n-2];e[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Tt=v.hypot(this.s[ut],it),Mt=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==J&&(it=-Dt*e[ut-1],e[ut-1]=Mt*e[ut-1]);for(var mt=0;mt<this.n;mt++)Tt=Mt*this.V[mt][ut]+Dt*this.V[mt][n-1],this.V[mt][n-1]=-Dt*this.V[mt][ut]+Mt*this.V[mt][n-1],this.V[mt][ut]=Tt}}break;case 2:{var xt=e[J-1];e[J-1]=0;for(var St=J;St<n;St++){var Wt=v.hypot(this.s[St],xt),Yt=this.s[St]/Wt,Gt=xt/Wt;this.s[St]=Wt,xt=-Gt*e[St],e[St]=Yt*e[St];for(var bt=0;bt<this.m;bt++)Wt=Yt*this.U[bt][St]+Gt*this.U[bt][J-1],this.U[bt][J-1]=-Gt*this.U[bt][St]+Yt*this.U[bt][J-1],this.U[bt][St]=Wt}}break;case 3:{var Xt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[J])),Math.abs(e[J])),zt=this.s[n-1]/Xt,F=this.s[n-2]/Xt,G=e[n-2]/Xt,Z=this.s[J]/Xt,K=e[J]/Xt,k=((F+zt)*(F-zt)+G*G)/2,nt=zt*G*(zt*G),gt=0;(function(Nt,At){return Nt||At})(k!==0,nt!==0)&&(gt=Math.sqrt(k*k+nt),k<0&&(gt=-gt),gt=nt/(k+gt));for(var ot=(Z+zt)*(Z-zt)+gt,et=Z*K,_=J;_<n-1;_++){var vt=v.hypot(ot,et),wt=ot/vt,yt=et/vt;_!==J&&(e[_-1]=vt),ot=wt*this.s[_]+yt*e[_],e[_]=wt*e[_]-yt*this.s[_],et=yt*this.s[_+1],this.s[_+1]=wt*this.s[_+1];for(var It=0;It<this.n;It++)vt=wt*this.V[It][_]+yt*this.V[It][_+1],this.V[It][_+1]=-yt*this.V[It][_]+wt*this.V[It][_+1],this.V[It][_]=vt;if(vt=v.hypot(ot,et),wt=ot/vt,yt=et/vt,this.s[_]=vt,ot=wt*e[_]+yt*this.s[_+1],this.s[_+1]=-yt*e[_]+wt*this.s[_+1],et=yt*e[_+1],e[_+1]=wt*e[_+1],_<this.m-1)for(var ft=0;ft<this.m;ft++)vt=wt*this.U[ft][_]+yt*this.U[ft][_+1],this.U[ft][_+1]=-yt*this.U[ft][_]+wt*this.U[ft][_+1],this.U[ft][_]=vt}e[n-2]=ot}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var st=0;st<=$;st++)this.V[st][J]=-this.V[st][J]}for(;J<$&&!(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 ct=0;ct<this.n;ct++)Ct=this.V[ct][J+1],this.V[ct][J+1]=this.V[ct][J],this.V[ct][J]=Ct;if(J<this.m-1)for(var ht=0;ht<this.m;ht++)Ct=this.U[ht][J+1],this.U[ht][J+1]=this.U[ht][J],this.U[ht][J]=Ct;J++}n--}break}}var Ht={U:this.U,V:this.V,S:this.s};return Ht},v.hypot=function(h,a){var e=void 0;return Math.abs(h)>Math.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=v}),(function(M,U,N){var v=(function(){function e(r,l){for(var i=0;i<l.length;i++){var u=l[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,u.key,u)}}return w(e,"defineProperties"),function(r,l,i){return l&&e(r.prototype,l),i&&e(r,i),r}})();function h(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}w(h,"_classCallCheck");var a=(function(){function e(r,l){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=r,this.sequence2=l,this.match_score=i,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[o][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 f=0;f<this.jMax;f++)this.tracebackGrid[c][f]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return w(e,"NeedlemanWunsch2"),v(e,[{key:"getScore",value:w(function(){return this.score},"getScore")},{key:"getAlignments",value:w(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:w(function(){for(var l=1;l<this.jMax;l++)this.grid[0][l]=this.grid[0][l-1]+this.gap_penalty,this.tracebackGrid[0][l]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var t=1;t<this.jMax;t++){var o=void 0;this.sequence1[u-1]===this.sequence2[t-1]?o=this.grid[u-1][t-1]+this.match_score:o=this.grid[u-1][t-1]+this.mismatch_penalty;var s=this.grid[u-1][t]+this.gap_penalty,c=this.grid[u][t-1]+this.gap_penalty,f=[o,s,c],T=this.arrayAllMaxIndexes(f);this.grid[u][t]=f[T[0]],this.tracebackGrid[u][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:w(function(){var l=[];for(l.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});l[0];){var i=l[0],u=this.tracebackGrid[i.pos[0]][i.pos[1]];u[0]&&l.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),u[1]&&l.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),u[2]&&l.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),l.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:w(function(l,i){for(var u=[],t=-1;(t=l.indexOf(i,t+1))!==-1;)u.push(t);return u},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:w(function(l){return this.getAllIndexes(l,Math.max.apply(null,l))},"arrayAllMaxIndexes")}]),e})();M.exports=a}),(function(M,U,N){var v=w(function(){},"layoutBase2");v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),M.exports=v}),(function(M,U,N){function v(){this.listeners=[]}w(v,"Emitter");var h=v.prototype;h.addListener=function(a,e){this.listeners.push({event:a,callback:e})},h.removeListener=function(a,e){for(var r=this.listeners.length;r>=0;r--){var l=this.listeners[r];l.event===a&&l.callback===e&&this.listeners.splice(r,1)}},h.emit=function(a,e){for(var r=0;r<this.listeners.length;r++){var l=this.listeners[r];a===l.event&&l.callback(e)}},M.exports=v})])})})(fe)),fe.exports}w(vr,"requireLayoutBase");var dr=le.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,H){w((function(U,N){C.exports=N(vr())}),"webpackUniversalModuleDefinition")(dr,function(M){return(()=>{var U={45:((a,e,r)=>{var l={};l.layoutBase=r(551),l.CoSEConstants=r(806),l.CoSEEdge=r(767),l.CoSEGraph=r(880),l.CoSEGraphManager=r(578),l.CoSELayout=r(765),l.CoSENode=r(991),l.ConstraintHandler=r(902),a.exports=l}),806:((a,e,r)=>{var l=r(551).FDLayoutConstants;function i(){}w(i,"CoSEConstants");for(var u in l)i[u]=l[u];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i}),767:((a,e,r)=>{var l=r(551).FDLayoutEdge;function i(t,o,s){l.call(this,t,o,s)}w(i,"CoSEEdge"),i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),880:((a,e,r)=>{var l=r(551).LGraph;function i(t,o,s){l.call(this,t,o,s)}w(i,"CoSEGraph"),i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),578:((a,e,r)=>{var l=r(551).LGraphManager;function i(t){l.call(this,t)}w(i,"CoSEGraphManager"),i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),765:((a,e,r)=>{var l=r(551).FDLayout,i=r(578),u=r(880),t=r(991),o=r(767),s=r(806),c=r(902),f=r(551).FDLayoutConstants,T=r(551).LayoutConstants,g=r(551).Point,d=r(551).PointD,L=r(551).DimensionD,b=r(551).Layout,A=r(551).Integer,P=r(551).IGeometry,q=r(551).LGraph,Y=r(551).Transform,j=r(551).LinkedList;function x(){l.call(this),this.toBeTiled={},this.constraints={}}w(x,"CoSELayout"),x.prototype=Object.create(l.prototype);for(var at in l)x[at]=l[at];x.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},x.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},x.prototype.newNode=function(n){return new t(this.graphManager,n)},x.prototype.newEdge=function(n){return new o(null,null,n)},x.prototype.initParameters=function(){l.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=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.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 m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(R){return m.has(R)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.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%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=f.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=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},x.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=w(function D(W){for(var $=W.getChild().getNodes(),tt,lt=0,J=0;J<$.length;J++)tt=$[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(lt+=100):lt+=D(tt);return lt},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){n.fixedNodeSet.add($.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var R=y(E);R>0&&(E.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var O=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var V=this.constraints.alignmentConstraint.vertical,p=0;p<V.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),V[p].forEach(function(W){O.set(W,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(W),n.fixedNodeSet.has(W)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var I=this.constraints.alignmentConstraint.horizontal,p=0;p<I.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),I[p].forEach(function(W){S.set(W,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(W),n.fixedNodeSet.has(W)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var W,$,tt;for(tt=D.length-1;tt>=2*D.length/3;tt--)W=Math.floor(Math.random()*(tt+1)),$=D[tt],D[tt]=D[W],D[W]=$;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 W=O.has(D.left)?O.get(D.left):D.left,$=O.has(D.right)?O.get(D.right):D.right;n.nodesInRelativeHorizontal.includes(W)||(n.nodesInRelativeHorizontal.push(W),n.nodeToRelativeConstraintMapHorizontal.set(W,[]),n.dummyToNodeForVerticalAlignment.has(W)?n.nodeToTempPositionMapHorizontal.set(W,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(W)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(W,n.idToNodeMap.get(W).getCenterX())),n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(W).push({right:$,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get($).push({left:W,gap:D.gap})}else{var tt=S.has(D.top)?S.get(D.top):D.top,lt=S.has(D.bottom)?S.get(D.bottom):D.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:lt,gap:D.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var W=O.has(D.left)?O.get(D.left):D.left,$=O.has(D.right)?O.get(D.right):D.right;Q.has(W)?Q.get(W).push($):Q.set(W,[$]),Q.has($)?Q.get($).push(W):Q.set($,[W])}else{var tt=S.has(D.top)?S.get(D.top):D.top,lt=S.has(D.bottom)?S.get(D.bottom):D.bottom;z.has(tt)?z.get(tt).push(lt):z.set(tt,[lt]),z.has(lt)?z.get(lt).push(tt):z.set(lt,[tt])}});var X=w(function(W,$){var tt=[],lt=[],J=new j,Rt=new Set,Lt=0;return W.forEach(function(pt,it){if(!Rt.has(it)){tt[Lt]=[],lt[Lt]=!1;var ut=it;for(J.push(ut),Rt.add(ut),tt[Lt].push(ut);J.length!=0;){ut=J.shift(),$.has(ut)&&(lt[Lt]=!0);var Tt=W.get(ut);Tt.forEach(function(Mt){Rt.has(Mt)||(J.push(Mt),Rt.add(Mt),tt[Lt].push(Mt))})}Lt++}}),{components:tt,isFixed:lt}},"constructComponents"),rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},x.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var D=n.idToNodeMap.get(B.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var R=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,p=0;p<O.length;p++){for(var S=0,y=0;y<O[p].length;y++){if(this.fixedNodeSet.has(O[p][y])){S=0;break}S+=this.idToNodeMap.get(O[p][y]).displacementY}for(var V=S/O[p].length,y=0;y<O[p].length;y++)this.idToNodeMap.get(O[p][y]).displacementY=V}}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(B){if(!n.fixedNodesOnHorizontal.has(B)){var D=0;n.dummyToNodeForVerticalAlignment.has(B)?D=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).displacementX:D=n.idToNodeMap.get(B).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(B).forEach(function(W){if(W.right){var $=n.nodeToTempPositionMapHorizontal.get(W.right)-n.nodeToTempPositionMapHorizontal.get(B)-D;$<W.gap&&(D-=W.gap-$)}else{var $=n.nodeToTempPositionMapHorizontal.get(B)-n.nodeToTempPositionMapHorizontal.get(W.left)+D;$<W.gap&&(D+=W.gap-$)}}),n.nodeToTempPositionMapHorizontal.set(B,n.nodeToTempPositionMapHorizontal.get(B)+D),n.dummyToNodeForVerticalAlignment.has(B)?n.dummyToNodeForVerticalAlignment.get(B).forEach(function(W){n.idToNodeMap.get(W).displacementX=D}):n.idToNodeMap.get(B).displacementX=D}}),this.nodesInRelativeVertical.forEach(function(B){if(!n.fixedNodesOnHorizontal.has(B)){var D=0;n.dummyToNodeForHorizontalAlignment.has(B)?D=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(B)[0]).displacementY:D=n.idToNodeMap.get(B).displacementY,n.nodeToRelativeConstraintMapVertical.get(B).forEach(function(W){if(W.bottom){var $=n.nodeToTempPositionMapVertical.get(W.bottom)-n.nodeToTempPositionMapVertical.get(B)-D;$<W.gap&&(D-=W.gap-$)}else{var $=n.nodeToTempPositionMapVertical.get(B)-n.nodeToTempPositionMapVertical.get(W.top)+D;$<W.gap&&(D+=W.gap-$)}}),n.nodeToTempPositionMapVertical.set(B,n.nodeToTempPositionMapVertical.get(B)+D),n.dummyToNodeForHorizontalAlignment.has(B)?n.dummyToNodeForHorizontalAlignment.get(B).forEach(function(W){n.idToNodeMap.get(W).displacementY=D}):n.idToNodeMap.get(B).displacementY=D}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var I=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(W){n.idToNodeMap.get(W).displacementX=0}):this.idToNodeMap.get(I[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<I.length;y++)if(this.dummyToNodeForVerticalAlignment.has(I[y])){var X=this.dummyToNodeForVerticalAlignment.get(I[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(I[y]).displacementX,z++;for(var rt=Q/z,y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(W){n.idToNodeMap.get(W).displacementX=rt}):this.idToNodeMap.get(I[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var I=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function($){n.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(I[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<I.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(I[y])){var X=this.dummyToNodeForHorizontalAlignment.get(I[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(I[y]).displacementY,z++;for(var rt=Q/z,y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(I[y]).displacementY=rt}}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},x.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),R=E.getTarget();if(y==R)E.getBendpoints().push(new d),E.getBendpoints().push(new d),this.createDummyNodesForBendpoints(E),m.add(E);else{var O=[];if(O=O.concat(y.getEdgeListToNode(R)),O=O.concat(R.getEdgeListToNode(y)),!m.has(O[0])){if(O.length>1){var S;for(S=0;S<O.length;S++){var V=O[S];V.getBendpoints().push(new d),this.createDummyNodesForBendpoints(V)}}O.forEach(function(I){m.add(I)})}}}if(m.size==n.length)break}},x.prototype.positionNodesRadially=function(n){for(var m=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,R=0,O=new d(0,0),S=0;S<n.length;S++){S%p==0&&(R=0,y=E,S!=0&&(y+=s.DEFAULT_COMPONENT_SEPERATION),E=0);var V=n[S],I=b.findCenterOfTree(V);m.x=R,m.y=y,O=x.radialLayout(V,I,m),O.y>E&&(E=Math.floor(O.y)),R=Math.floor(O.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},x.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),s.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,E);var y=q.calculateBounds(n),R=new Y;R.setDeviceOrgX(y.getMinX()),R.setDeviceOrgY(y.getMinY()),R.setWorldOrgX(p.x),R.setWorldOrgY(p.y);for(var O=0;O<n.length;O++){var S=n[O];S.transform(R)}var V=new d(y.getMaxX(),y.getMaxY());return R.inverseTransformPoint(V)},x.branchRadialLayout=function(n,m,p,E,y,R){var O=(E-p+1)/2;O<0&&(O+=180);var S=(O+p)%360,V=S*P.TWO_PI/360,I=y*Math.cos(V),Q=y*Math.sin(V);n.setCenter(I,Q);var z=[];z=z.concat(n.getEdges());var X=z.length;m!=null&&X--;for(var rt=0,B=z.length,D,W=n.getEdgesBetween(m);W.length>1;){var $=W[0];W.splice(0,1);var tt=z.indexOf($);tt>=0&&z.splice(tt,1),B--,X--}m!=null?D=(z.indexOf(W[0])+1)%B:D=0;for(var lt=Math.abs(E-p)/X,J=D;rt!=X;J=++J%B){var Rt=z[J].getOtherEnd(n);if(Rt!=m){var Lt=(p+rt*lt)%360,pt=(Lt+lt)%360;x.branchRadialLayout(Rt,n,Lt,pt,y+R,R),rt++}}},x.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var R=E[y],O=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(O.id==null||!this.getToBeTiled(O))&&p.push(R)}for(var y=0;y<p.length;y++){var R=p[y],S=R.getParent().id;typeof m[S]>"u"&&(m[S]=[]),m[S]=m[S].concat(R)}Object.keys(m).forEach(function(V){if(m[V].length>1){var I="DummyCompound_"+V;n.memberGroups[I]=m[V];var Q=m[V][0].getParent(),z=new t(n.graphManager);z.id=I,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[I]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var B=0;B<m[V].length;B++){var D=m[V][B];rt.remove(D),X.add(D)}}})},x.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},x.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,R=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(R+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>R?(E.rect.y-=(E.labelHeight-R)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-R)/2):E.labelPosVertical=="bottom"&&E.setHeight(R+E.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,R=m.labelMarginLeft,O=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,R,O)}},x.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,R=E.paddingTop,O=E.labelMarginLeft,S=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,R,O,S)})},x.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var R=E[y];if(this.getNodeDegree(R)>0)return this.toBeTiled[m]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},x.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},x.prototype.adjustLocations=function(n,m,p,E,y,R,O){m+=E+R,p+=y+O;for(var S=m,V=0;V<n.rows.length;V++){var I=n.rows[V];m=S;for(var Q=0,z=0;z<I.length;z++){var X=I[z];X.rect.x=m,X.rect.y=p,m+=X.rect.width+n.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},x.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var R=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(R+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>R?(y.rect.x-=(y.labelWidth-R)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-R)/2):y.labelPosHorizontal=="right"&&y.setWidth(R+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},x.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),R=this.getOrgRatio(E),O;return R<y?O=E:O=p,O},x.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},x.prototype.calcIdealRowWidth=function(n,m){var p=s.TILING_PADDING_VERTICAL,E=s.TILING_PADDING_HORIZONTAL,y=n.length,R=0,O=0,S=0;n.forEach(function(B){R+=B.getWidth(),O+=B.getHeight(),B.getWidth()>S&&(S=B.getWidth())});var V=R/y,I=O/y,Q=Math.pow(p-E,2)+4*(V+E)*(I+p)*y,z=(E-p+Math.sqrt(Q))/(2*(V+E)),X;m?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(V+E)-E;return S>rt&&(rt=S),rt+=E*2,rt},x.prototype.tileNodesByFavoringDim=function(n,m,p){var E=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,R=s.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};R&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var S=w(function(D){return D.rect.width*D.rect.height},"getNodeArea"),V=w(function(D,W){return S(W)-S(D)},"areaCompareFcn");n.sort(function(B,D){var W=V;return O.idealRowWidth?(W=R,W(B.id,D.id)):W(B,D)});for(var I=0,Q=0,z=0;z<n.length;z++){var X=n[z];I+=X.getCenterX(),Q+=X.getCenterY()}O.centerX=I/n.length,O.centerY=Q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(O.rows.length==0)this.insertNodeToRow(O,X,0,m);else if(this.canAddHorizontal(O,X.rect.width,X.rect.height)){var rt=O.rows.length-1;O.idealRowWidth||(rt=this.getShortestRowIndex(O)),this.insertNodeToRow(O,X,rt,m)}else this.insertNodeToRow(O,X,O.rows.length,m);this.shiftToLastRow(O)}return O},x.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var R=[];n.rows.push(R),n.rowWidth.push(y),n.rowHeight.push(0)}var O=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width<O&&(n.width=O);var S=m.rect.height;p>0&&(S+=n.verticalPadding);var V=0;S>n.rowHeight[p]&&(V=n.rowHeight[p],n.rowHeight[p]=S,V=n.rowHeight[p]-V),n.height+=V,n.rows[p].push(m)},x.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},x.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},x.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var R=this.getShortestRowIndex(n);if(R<0)return!0;var O=n.rowWidth[R];if(O+n.horizontalPadding+m<=n.width)return!0;var S=0;n.rowHeight[R]<p&&R>0&&(S=p+n.verticalPadding-n.rowHeight[R]);var V;n.width-O>=m+n.horizontalPadding?V=(n.height+S)/(O+m+n.horizontalPadding):V=(n.height+S)/n.width,S=p+n.verticalPadding;var I;return n.width<m?I=(n.height+S)/m:I=(n.height+S)/n.width,I<1&&(I=1/I),V<1&&(V=1/V),V<I},x.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],R=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>R&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-R,n.rowWidth[p]=n.rowWidth[p]+R,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,S=0;S<E.length;S++)E[S].height>O&&(O=E[S].height);m>0&&(O+=n.verticalPadding);var V=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=O,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var I=n.rowHeight[m]+n.rowHeight[p];n.height+=I-V,this.shiftToLastRow(n)}},x.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var R=0;R<E.length;R++)if(p=E[R],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(s.PURE_INCREMENTAL){var O=p.getEdges()[0].getOtherEnd(p),S=new L(p.getCenterX()-O.getCenterX(),p.getCenterY()-O.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var V=[],I=0;I<y.length;I++)y[I][0].getEdges().length==1&&(V.push(y[I]),y[I][0].getOwner().remove(y[I][0]));n.push(V),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},x.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,s.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,R=p.finishX,O=p.startY,S=p.finishY,V=0,I=0,Q=0,z=0,X=[V,Q,I,z];if(O>0)for(var rt=y;rt<=R;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(R<this.grid.length-1)for(var rt=O;rt<=S;rt++)X[1]+=this.grid[R+1][rt].length+this.grid[R][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=R;rt++)X[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=O;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=A.MAX_VALUE,D,W,$=0;$<X.length;$++)X[$]<B?(B=X[$],D=1,W=$):X[$]==B&&D++;if(D==3&&B==0)X[0]==0&&X[1]==0&&X[2]==0?m=1:X[0]==0&&X[1]==0&&X[3]==0?m=0:X[0]==0&&X[2]==0&&X[3]==0?m=3:X[1]==0&&X[2]==0&&X[3]==0&&(m=2);else if(D==2&&B==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?m=0:m=1:X[0]==0&&X[2]==0?tt==0?m=0:m=2:X[0]==0&&X[3]==0?tt==0?m=0:m=3:X[1]==0&&X[2]==0?tt==0?m=1:m=2:X[1]==0&&X[3]==0?tt==0?m=1:m=3:tt==0?m=2:m=3}else if(D==4&&B==0){var tt=Math.floor(Math.random()*4);m=tt}else m=W;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-f.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+f.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+f.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-f.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=x}),991:((a,e,r)=>{var l=r(551).FDLayoutNode,i=r(551).IMath;function u(o,s,c,f){l.call(this,o,s,c,f)}w(u,"CoSENode"),u.prototype=Object.create(l.prototype);for(var t in l)u[t]=l[t];u.prototype.calculateDisplacement=function(){var o=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(o,s){for(var c=this.getChild().getNodes(),f,T=0;T<c.length;T++)f=c[T],f.getChild()==null?(f.displacementX+=o,f.displacementY+=s):f.propogateDisplacementToChildren(o,s)},u.prototype.move=function(){var o=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),o.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},u.prototype.setPred1=function(o){this.pred1=o},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(o){this.next=o},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(o){this.processed=o},u.prototype.isProcessed=function(){return processed},a.exports=u}),902:((a,e,r)=>{function l(c){if(Array.isArray(c)){for(var f=0,T=Array(c.length);f<c.length;f++)T[f]=c[f];return T}else return Array.from(c)}w(l,"_toConsumableArray");var i=r(806),u=r(551).LinkedList,t=r(551).Matrix,o=r(551).SVD;function s(){}w(s,"ConstraintHandler"),s.handleConstraints=function(c){var f={};f.fixedNodeConstraint=c.constraints.fixedNodeConstraint,f.alignmentConstraint=c.constraints.alignmentConstraint,f.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,d=[],L=[],b=c.getAllNodes(),A=0,P=0;P<b.length;P++){var q=b[P];q.getChild()==null&&(g.set(q.id,A++),d.push(q.getCenterX()),L.push(q.getCenterY()),T.set(q.id,q))}f.relativePlacementConstraint&&f.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var Y=w(function(G,Z){return{x:G.x-Z.x,y:G.y-Z.y}},"calculatePositionDiff"),j=w(function(G){var Z=0,K=0;return G.forEach(function(k){Z+=d[g.get(k)],K+=L[g.get(k)]}),{x:Z/G.size,y:K/G.size}},"calculateAvgPosition"),x=w(function(G,Z,K,k,nt){function gt(ft,st){var Ct=new Set(ft),ct=!0,ht=!1,Ht=void 0;try{for(var Nt=st[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var $t=At.value;Ct.add($t)}}catch(Pt){ht=!0,Ht=Pt}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Ht}}return Ct}w(gt,"setUnion");var ot=new Map;G.forEach(function(ft,st){ot.set(st,0)}),G.forEach(function(ft,st){ft.forEach(function(Ct){ot.set(Ct.id,ot.get(Ct.id)+1)})});var et=new Map,_=new Map,vt=new u;ot.forEach(function(ft,st){ft==0?(vt.push(st),K||(Z=="horizontal"?et.set(st,g.has(st)?d[g.get(st)]:k.get(st)):et.set(st,g.has(st)?L[g.get(st)]:k.get(st)))):et.set(st,Number.NEGATIVE_INFINITY),K&&_.set(st,new Set([st]))}),K&&nt.forEach(function(ft){var st=[];if(ft.forEach(function(ht){K.has(ht)&&st.push(ht)}),st.length>0){var Ct=0;st.forEach(function(ht){Z=="horizontal"?(et.set(ht,g.has(ht)?d[g.get(ht)]:k.get(ht)),Ct+=et.get(ht)):(et.set(ht,g.has(ht)?L[g.get(ht)]:k.get(ht)),Ct+=et.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){K.has(ht)||et.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){Z=="horizontal"?ct+=g.has(ht)?d[g.get(ht)]:k.get(ht):ct+=g.has(ht)?L[g.get(ht)]:k.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){et.set(ht,ct)})}});for(var wt=w(function(){var st=vt.shift(),Ct=G.get(st);Ct.forEach(function(ct){if(et.get(ct.id)<et.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if(Z=="horizontal"?ht=g.has(ct.id)?d[g.get(ct.id)]:k.get(ct.id):ht=g.has(ct.id)?L[g.get(ct.id)]:k.get(ct.id),et.set(ct.id,ht),ht<et.get(st)+ct.gap){var Ht=et.get(st)+ct.gap-ht;_.get(st).forEach(function(Nt){et.set(Nt,et.get(Nt)-Ht)})}}else et.set(ct.id,et.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&vt.push(ct.id),K&&_.set(ct.id,gt(_.get(st),_.get(ct.id)))})},"_loop");vt.length!=0;)wt();if(K){var yt=new Set;G.forEach(function(ft,st){ft.length==0&&yt.add(st)});var It=[];_.forEach(function(ft,st){if(yt.has(st)){var Ct=!1,ct=!0,ht=!1,Ht=void 0;try{for(var Nt=ft[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var $t=At.value;K.has($t)&&(Ct=!0)}}catch(Ft){ht=!0,Ht=Ft}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Ht}}if(!Ct){var Pt=!1,Bt=void 0;It.forEach(function(Ft,kt){Ft.has([].concat(l(ft))[0])&&(Pt=!0,Bt=kt)}),Pt?ft.forEach(function(Ft){It[Bt].add(Ft)}):It.push(new Set(ft))}}}),It.forEach(function(ft,st){var Ct=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.NEGATIVE_INFINITY,Ht=Number.NEGATIVE_INFINITY,Nt=!0,At=!1,$t=void 0;try{for(var Pt=ft[Symbol.iterator](),Bt;!(Nt=(Bt=Pt.next()).done);Nt=!0){var Ft=Bt.value,kt=void 0;Z=="horizontal"?kt=g.has(Ft)?d[g.get(Ft)]:k.get(Ft):kt=g.has(Ft)?L[g.get(Ft)]:k.get(Ft);var jt=et.get(Ft);kt<Ct&&(Ct=kt),kt>ht&&(ht=kt),jt<ct&&(ct=jt),jt>Ht&&(Ht=jt)}}catch(re){At=!0,$t=re}finally{try{!Nt&&Pt.return&&Pt.return()}finally{if(At)throw $t}}var ce=(Ct+ht)/2-(ct+Ht)/2,Jt=!0,_t=!1,te=void 0;try{for(var Kt=ft[Symbol.iterator](),oe;!(Jt=(oe=Kt.next()).done);Jt=!0){var ee=oe.value;et.set(ee,et.get(ee)+ce)}}catch(re){_t=!0,te=re}finally{try{!Jt&&Kt.return&&Kt.return()}finally{if(_t)throw te}}})}return et},"findAppropriatePositionForRelativePlacement"),at=w(function(G){var Z=0,K=0,k=0,nt=0;if(G.forEach(function(_){_.left?d[g.get(_.left)]-d[g.get(_.right)]>=0?Z++:K++:L[g.get(_.top)]-L[g.get(_.bottom)]>=0?k++:nt++}),Z>K&&k>nt)for(var gt=0;gt<g.size;gt++)d[gt]=-1*d[gt],L[gt]=-1*L[gt];else if(Z>K)for(var ot=0;ot<g.size;ot++)d[ot]=-1*d[ot];else if(k>nt)for(var et=0;et<g.size;et++)L[et]=-1*L[et]},"applyReflectionForRelativePlacement"),n=w(function(G){var Z=[],K=new u,k=new Set,nt=0;return G.forEach(function(gt,ot){if(!k.has(ot)){Z[nt]=[];var et=ot;for(K.push(et),k.add(et),Z[nt].push(et);K.length!=0;){et=K.shift();var _=G.get(et);_.forEach(function(vt){k.has(vt.id)||(K.push(vt.id),k.add(vt.id),Z[nt].push(vt.id))})}nt++}}),Z},"findComponents"),m=w(function(G){var Z=new Map;return G.forEach(function(K,k){Z.set(k,[])}),G.forEach(function(K,k){K.forEach(function(nt){Z.get(k).push(nt),Z.get(nt.id).push({id:k,gap:nt.gap,direction:nt.direction})})}),Z},"dagToUndirected"),p=w(function(G){var Z=new Map;return G.forEach(function(K,k){Z.set(k,[])}),G.forEach(function(K,k){K.forEach(function(nt){Z.get(nt.id).push({id:k,gap:nt.gap,direction:nt.direction})})}),Z},"dagToReversed"),E=[],y=[],R=!1,O=!1,S=new Set,V=new Map,I=new Map,Q=[];if(f.fixedNodeConstraint&&f.fixedNodeConstraint.forEach(function(F){S.add(F.nodeId)}),f.relativePlacementConstraint&&(f.relativePlacementConstraint.forEach(function(F){F.left?(V.has(F.left)?V.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):V.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),V.has(F.right)||V.set(F.right,[])):(V.has(F.top)?V.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):V.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),V.has(F.bottom)||V.set(F.bottom,[]))}),I=m(V),Q=n(I)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>1)f.fixedNodeConstraint.forEach(function(F,G){E[G]=[F.position.x,F.position.y],y[G]=[d[g.get(F.nodeId)],L[g.get(F.nodeId)]]}),R=!0;else if(f.alignmentConstraint)(function(){var F=0;if(f.alignmentConstraint.vertical){for(var G=f.alignmentConstraint.vertical,Z=w(function(et){var _=new Set;G[et].forEach(function(yt){_.add(yt)});var vt=new Set([].concat(l(_)).filter(function(yt){return S.has(yt)})),wt=void 0;vt.size>0?wt=d[g.get(vt.values().next().value)]:wt=j(_).x,G[et].forEach(function(yt){E[F]=[wt,L[g.get(yt)]],y[F]=[d[g.get(yt)],L[g.get(yt)]],F++})},"_loop2"),K=0;K<G.length;K++)Z(K);R=!0}if(f.alignmentConstraint.horizontal){for(var k=f.alignmentConstraint.horizontal,nt=w(function(et){var _=new Set;k[et].forEach(function(yt){_.add(yt)});var vt=new Set([].concat(l(_)).filter(function(yt){return S.has(yt)})),wt=void 0;vt.size>0?wt=d[g.get(vt.values().next().value)]:wt=j(_).y,k[et].forEach(function(yt){E[F]=[d[g.get(yt)],wt],y[F]=[d[g.get(yt)],L[g.get(yt)]],F++})},"_loop3"),gt=0;gt<k.length;gt++)nt(gt);R=!0}f.relativePlacementConstraint&&(O=!0)})();else if(f.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,X=rt);if(z<I.size/2)at(f.relativePlacementConstraint),R=!1,O=!1;else{var B=new Map,D=new Map,W=[];Q[X].forEach(function(F){V.get(F).forEach(function(G){G.direction=="horizontal"?(B.has(F)?B.get(F).push(G):B.set(F,[G]),B.has(G.id)||B.set(G.id,[]),W.push({left:F,right:G.id})):(D.has(F)?D.get(F).push(G):D.set(F,[G]),D.has(G.id)||D.set(G.id,[]),W.push({top:F,bottom:G.id}))})}),at(W),O=!1;var $=x(B,"horizontal"),tt=x(D,"vertical");Q[X].forEach(function(F,G){y[G]=[d[g.get(F)],L[g.get(F)]],E[G]=[],$.has(F)?E[G][0]=$.get(F):E[G][0]=d[g.get(F)],tt.has(F)?E[G][1]=tt.get(F):E[G][1]=L[g.get(F)]}),R=!0}}if(R){for(var lt=void 0,J=t.transpose(E),Rt=t.transpose(y),Lt=0;Lt<J.length;Lt++)J[Lt]=t.multGamma(J[Lt]),Rt[Lt]=t.multGamma(Rt[Lt]);var pt=t.multMat(J,t.transpose(Rt)),it=o.svd(pt);lt=t.multMat(it.V,t.transpose(it.U));for(var ut=0;ut<g.size;ut++){var Tt=[d[ut],L[ut]],Mt=[lt[0][0],lt[1][0]],Dt=[lt[0][1],lt[1][1]];d[ut]=t.dotProduct(Tt,Mt),L[ut]=t.dotProduct(Tt,Dt)}O&&at(f.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>0){var mt={x:0,y:0};f.fixedNodeConstraint.forEach(function(F,G){var Z={x:d[g.get(F.nodeId)],y:L[g.get(F.nodeId)]},K=F.position,k=Y(K,Z);mt.x+=k.x,mt.y+=k.y}),mt.x/=f.fixedNodeConstraint.length,mt.y/=f.fixedNodeConstraint.length,d.forEach(function(F,G){d[G]+=mt.x}),L.forEach(function(F,G){L[G]+=mt.y}),f.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,L[g.get(F.nodeId)]=F.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var xt=f.alignmentConstraint.vertical,St=w(function(G){var Z=new Set;xt[G].forEach(function(nt){Z.add(nt)});var K=new Set([].concat(l(Z)).filter(function(nt){return S.has(nt)})),k=void 0;K.size>0?k=d[g.get(K.values().next().value)]:k=j(Z).x,Z.forEach(function(nt){S.has(nt)||(d[g.get(nt)]=k)})},"_loop4"),Wt=0;Wt<xt.length;Wt++)St(Wt);if(f.alignmentConstraint.horizontal)for(var Yt=f.alignmentConstraint.horizontal,Gt=w(function(G){var Z=new Set;Yt[G].forEach(function(nt){Z.add(nt)});var K=new Set([].concat(l(Z)).filter(function(nt){return S.has(nt)})),k=void 0;K.size>0?k=L[g.get(K.values().next().value)]:k=j(Z).y,Z.forEach(function(nt){S.has(nt)||(L[g.get(nt)]=k)})},"_loop5"),bt=0;bt<Yt.length;bt++)Gt(bt)}f.relativePlacementConstraint&&(function(){var F=new Map,G=new Map,Z=new Map,K=new Map,k=new Map,nt=new Map,gt=new Set,ot=new Set;if(S.forEach(function(Ut){gt.add(Ut),ot.add(Ut)}),f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var et=f.alignmentConstraint.vertical,_=w(function(Et){Z.set("dummy"+Et,[]),et[Et].forEach(function(Ot){F.set(Ot,"dummy"+Et),Z.get("dummy"+Et).push(Ot),S.has(Ot)&>.add("dummy"+Et)}),k.set("dummy"+Et,d[g.get(et[Et][0])])},"_loop6"),vt=0;vt<et.length;vt++)_(vt);if(f.alignmentConstraint.horizontal)for(var wt=f.alignmentConstraint.horizontal,yt=w(function(Et){K.set("dummy"+Et,[]),wt[Et].forEach(function(Ot){G.set(Ot,"dummy"+Et),K.get("dummy"+Et).push(Ot),S.has(Ot)&&ot.add("dummy"+Et)}),nt.set("dummy"+Et,L[g.get(wt[Et][0])])},"_loop7"),It=0;It<wt.length;It++)yt(It)}var ft=new Map,st=new Map,Ct=w(function(Et){V.get(Et).forEach(function(Ot){var qt=void 0,Zt=void 0;Ot.direction=="horizontal"?(qt=F.get(Et)?F.get(Et):Et,F.get(Ot.id)?Zt={id:F.get(Ot.id),gap:Ot.gap,direction:Ot.direction}:Zt=Ot,ft.has(qt)?ft.get(qt).push(Zt):ft.set(qt,[Zt]),ft.has(Zt.id)||ft.set(Zt.id,[])):(qt=G.get(Et)?G.get(Et):Et,G.get(Ot.id)?Zt={id:G.get(Ot.id),gap:Ot.gap,direction:Ot.direction}:Zt=Ot,st.has(qt)?st.get(qt).push(Zt):st.set(qt,[Zt]),st.has(Zt.id)||st.set(Zt.id,[]))})},"_loop8"),ct=!0,ht=!1,Ht=void 0;try{for(var Nt=V.keys()[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var $t=At.value;Ct($t)}}catch(Ut){ht=!0,Ht=Ut}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Ht}}var Pt=m(ft),Bt=m(st),Ft=n(Pt),kt=n(Bt),jt=p(ft),ce=p(st),Jt=[],_t=[];Ft.forEach(function(Ut,Et){Jt[Et]=[],Ut.forEach(function(Ot){jt.get(Ot).length==0&&Jt[Et].push(Ot)})}),kt.forEach(function(Ut,Et){_t[Et]=[],Ut.forEach(function(Ot){ce.get(Ot).length==0&&_t[Et].push(Ot)})});var te=x(ft,"horizontal",gt,k,Jt),Kt=x(st,"vertical",ot,nt,_t),oe=w(function(Et){Z.get(Et)?Z.get(Et).forEach(function(Ot){d[g.get(Ot)]=te.get(Et)}):d[g.get(Et)]=te.get(Et)},"_loop9"),ee=!0,re=!1,Ne=void 0;try{for(var ge=te.keys()[Symbol.iterator](),Le;!(ee=(Le=ge.next()).done);ee=!0){var ue=Le.value;oe(ue)}}catch(Ut){re=!0,Ne=Ut}finally{try{!ee&&ge.return&&ge.return()}finally{if(re)throw Ne}}var $e=w(function(Et){K.get(Et)?K.get(Et).forEach(function(Ot){L[g.get(Ot)]=Kt.get(Et)}):L[g.get(Et)]=Kt.get(Et)},"_loop10"),ve=!0,Ce=!1,Ae=void 0;try{for(var de=Kt.keys()[Symbol.iterator](),Me;!(ve=(Me=de.next()).done);ve=!0){var ue=Me.value;$e(ue)}}catch(Ut){Ce=!0,Ae=Ut}finally{try{!ve&&de.return&&de.return()}finally{if(Ce)throw Ae}}})()}for(var Xt=0;Xt<b.length;Xt++){var zt=b[Xt];zt.getChild()==null&&zt.setCenter(d[g.get(zt.id)],L[g.get(zt.id)])}},a.exports=s}),551:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return U[a](r,r.exports,v),r.exports}w(v,"__webpack_require__");var h=v(45);return h})()})})(le)),le.exports}w(pr,"requireCoseBase");var yr=he.exports,De;function Er(){return De||(De=1,(function(C,H){w((function(U,N){C.exports=N(pr())}),"webpackUniversalModuleDefinition")(yr,function(M){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var r=arguments.length,l=Array(r>1?r-1:0),i=1;i<r;i++)l[i-1]=arguments[i];return l.forEach(function(u){Object.keys(u).forEach(function(t){return e[t]=u[t]})}),e}}),548:((a,e,r)=>{var l=(function(){function t(o,s){var c=[],f=!0,T=!1,g=void 0;try{for(var d=o[Symbol.iterator](),L;!(f=(L=d.next()).done)&&(c.push(L.value),!(s&&c.length===s));f=!0);}catch(b){T=!0,g=b}finally{try{!f&&d.return&&d.return()}finally{if(T)throw g}}return c}return w(t,"sliceIterator"),function(o,s){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return t(o,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=r(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var o={},s=0;s<t.length;s++)o[t[s].id()]=!0;var c=t.filter(function(f,T){typeof f=="number"&&(f=T);for(var g=f.parent()[0];g!=null;){if(o[g.id()])return!1;g=g.parent()[0]}return!0});return c},u.connectComponents=function(t,o,s,c){var f=new i,T=new Set,g=[],d=void 0,L=void 0,b=void 0,A=!1,P=1,q=[],Y=[],j=w(function(){var at=t.collection();Y.push(at);var n=s[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(o)),g.push(n),m.forEach(function(y){f.push(y),T.add(y),at.merge(y)});for(var p=w(function(){n=f.shift();var R=t.collection();n.neighborhood().nodes().forEach(function(I){o.intersection(n.edgesWith(I)).length>0&&R.merge(I)});for(var O=0;O<R.length;O++){var S=R[O];if(d=s.intersection(S.union(S.ancestors())),d!=null&&!T.has(d[0])){var V=d.union(d.descendants());V.forEach(function(I){f.push(I),T.add(I),at.merge(I),s.has(I)&&g.push(I)})}}},"_loop23");f.length!=0;)p();if(at.forEach(function(y){o.intersection(y.connectedEdges()).forEach(function(R){at.has(R.source())&&at.has(R.target())&&at.merge(R)})}),g.length==s.length&&(A=!0),!A||A&&P>1){L=g[0],b=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<b&&(b=y.connectedEdges().length,L=y)}),q.push(L.id());var E=t.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],s=s.difference(E),P++}},"_loop2");do j();while(!A);return c&&q.length>0&&c.set("dummy"+(c.size+1),q),Y},u.relocateComponent=function(t,o,s){if(!s.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var A=o.nodeIndexes[Symbol.iterator](),P;!(d=(P=A.next()).done);d=!0){var q=P.value,Y=l(q,2),j=Y[0],x=Y[1],at=s.cy.getElementById(j);if(at){var n=at.boundingBox(),m=o.xCoords[x]-n.w/2,p=o.xCoords[x]+n.w/2,E=o.yCoords[x]-n.h/2,y=o.yCoords[x]+n.h/2;m<c&&(c=m),p>f&&(f=p),E<T&&(T=E),y>g&&(g=y)}}}catch(I){L=!0,b=I}finally{try{!d&&A.return&&A.return()}finally{if(L)throw b}}var R=t.x-(f+c)/2,O=t.y-(g+T)/2;o.xCoords=o.xCoords.map(function(I){return I+R}),o.yCoords=o.yCoords.map(function(I){return I+O})}else{Object.keys(o).forEach(function(I){var Q=o[I],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,B=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>f&&(f=X),rt<T&&(T=rt),B>g&&(g=B)});var S=t.x-(f+c)/2,V=t.y-(g+T)/2;Object.keys(o).forEach(function(I){var Q=o[I];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+V)})}}},u.calcBoundingBox=function(t,o,s,c){for(var f=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,A=void 0,P=void 0,q=t.descendants().not(":parent"),Y=q.length,j=0;j<Y;j++){var x=q[j];L=o[c.get(x.id())]-x.width()/2,b=o[c.get(x.id())]+x.width()/2,A=s[c.get(x.id())]-x.height()/2,P=s[c.get(x.id())]+x.height()/2,f>L&&(f=L),T<b&&(T=b),g>A&&(g=A),d<P&&(d=P)}var at={};return at.topLeftX=f,at.topLeftY=g,at.width=T-f,at.height=d-g,at},u.calcParentsWithoutChildren=function(t,o){var s=t.collection();return o.nodes(":parent").forEach(function(c){var f=!1;c.children().forEach(function(T){T.css("display")!="none"&&(f=!0)}),f||s.merge(c)}),s},a.exports=u}),816:((a,e,r)=>{var l=r(548),i=r(140).CoSELayout,u=r(140).CoSENode,t=r(140).layoutBase.PointD,o=r(140).layoutBase.DimensionD,s=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,f=r(140).CoSEConstants,T=w(function(d,L){var b=d.cy,A=d.eles,P=A.nodes(),q=A.edges(),Y=void 0,j=void 0,x=void 0,at={};d.randomize&&(Y=L.nodeIndexes,j=L.xCoords,x=L.yCoords);var n=w(function(I){return typeof I=="function"},"isFn2"),m=w(function(I,Q){return n(I)?I(Q):I},"optFn2"),p=l.calcParentsWithoutChildren(b,A),E=w(function V(I,Q,z,X){for(var rt=Q.length,B=0;B<rt;B++){var D=Q[B],W=null;D.intersection(p).length==0&&(W=D.children());var $=void 0,tt=D.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(D.outerWidth()!=null&&D.outerHeight()!=null)if(X.randomize)if(!D.isParent())$=I.add(new u(z.graphManager,new t(j[Y.get(D.id())]-tt.w/2,x[Y.get(D.id())]-tt.h/2),new o(parseFloat(tt.w),parseFloat(tt.h))));else{var lt=l.calcBoundingBox(D,j,x,Y);D.intersection(p).length==0?$=I.add(new u(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new o(lt.width,lt.height))):$=I.add(new u(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new o(parseFloat(tt.w),parseFloat(tt.h))))}else $=I.add(new u(z.graphManager,new t(D.position("x")-tt.w/2,D.position("y")-tt.h/2),new o(parseFloat(tt.w),parseFloat(tt.h))));else $=I.add(new u(this.graphManager));if($.id=D.data("id"),$.nodeRepulsion=m(X.nodeRepulsion,D),$.paddingLeft=parseInt(D.css("padding")),$.paddingTop=parseInt(D.css("padding")),$.paddingRight=parseInt(D.css("padding")),$.paddingBottom=parseInt(D.css("padding")),X.nodeDimensionsIncludeLabels&&($.labelWidth=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=D.css("text-valign"),$.labelPosHorizontal=D.css("text-halign")),at[D.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),W!=null&&W.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),$),V(J,W,z,X)}}},"processChildrenList2"),y=w(function(I,Q,z){for(var X=0,rt=0,B=0;B<z.length;B++){var D=z[B],W=at[D.data("source")],$=at[D.data("target")];if(W&&$&&W!==$&&W.getEdgesBetween($).length==0){var tt=Q.add(I.newEdge(),W,$);tt.id=D.id(),tt.idealLength=m(d.idealEdgeLength,D),tt.edgeElasticity=m(d.edgeElasticity,D),X+=tt.idealLength,rt++}}d.idealEdgeLength!=null&&(rt>0?f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,f.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},"processEdges2"),R=w(function(I,Q){Q.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(I.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)},"processConstraints2");d.nestingFactor!=null&&(f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(f.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(f.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(f.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(f.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(f.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?s.QUALITY=2:s.QUALITY=0,f.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!d.randomize,f.ANIMATE=c.ANIMATE=s.ANIMATE=d.animate,f.TILE=d.tile,f.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!d.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1),d.step=="enforced"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1),d.step=="cose"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?f.TREE_REDUCTION_ON_INCREMENTAL=!1:f.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new i,S=O.newGraphManager();return E(S.addRoot(),l.getTopMostNodes(P),O,d),y(O,S,q),R(O,d),O.runLayout(),at},"coseLayout2");a.exports={coseLayout:T}}),212:((a,e,r)=>{var l=(function(){function d(L,b){for(var A=0;A<b.length;A++){var P=b[A];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return w(d,"defineProperties"),function(L,b,A){return b&&d(L.prototype,b),A&&d(L,A),L}})();function i(d,L){if(!(d instanceof L))throw new TypeError("Cannot call a class as a function")}w(i,"_classCallCheck");var u=r(658),t=r(548),o=r(657),s=o.spectralLayout,c=r(816),f=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:w(function(L){return 4500},"nodeRepulsion"),idealEdgeLength:w(function(L){return 50},"idealEdgeLength"),edgeElasticity:w(function(L){return .45},"edgeElasticity"),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:w(function(){},"ready"),stop:w(function(){},"stop")}),g=(function(){function d(L){i(this,d),this.options=u({},T,L)}return w(d,"Layout2"),l(d,[{key:"run",value:w(function(){var b=this,A=this.options,P=A.cy,q=A.eles,Y=[],j=[],x=void 0,at=[];A.fixedNodeConstraint&&(!Array.isArray(A.fixedNodeConstraint)||A.fixedNodeConstraint.length==0)&&(A.fixedNodeConstraint=void 0),A.alignmentConstraint&&(A.alignmentConstraint.vertical&&(!Array.isArray(A.alignmentConstraint.vertical)||A.alignmentConstraint.vertical.length==0)&&(A.alignmentConstraint.vertical=void 0),A.alignmentConstraint.horizontal&&(!Array.isArray(A.alignmentConstraint.horizontal)||A.alignmentConstraint.horizontal.length==0)&&(A.alignmentConstraint.horizontal=void 0)),A.relativePlacementConstraint&&(!Array.isArray(A.relativePlacementConstraint)||A.relativePlacementConstraint.length==0)&&(A.relativePlacementConstraint=void 0);var n=A.fixedNodeConstraint||A.alignmentConstraint||A.relativePlacementConstraint;n&&(A.tile=!1,A.packComponents=!1);var m=void 0,p=!1;if(P.layoutUtilities&&A.packComponents&&(m=P.layoutUtilities("get"),m||(m=P.layoutUtilities()),p=!0),q.nodes().length>0)if(p){var R=t.getTopMostNodes(A.eles.nodes());if(x=t.connectComponents(P,A.eles,R),x.forEach(function(pt){var it=pt.boundingBox();at.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&x.forEach(function(pt){A.eles=pt,Y.push(s(A))}),A.quality=="default"||A.quality=="proof"){var O=P.collection();if(A.tile){var S=new Map,V=[],I=[],Q=0,z={nodeIndexes:S,xCoords:V,yCoords:I},X=[];if(x.forEach(function(pt,it){pt.edges().length==0&&(pt.nodes().forEach(function(ut,Tt){O.merge(pt.nodes()[Tt]),ut.isParent()||(z.nodeIndexes.set(pt.nodes()[Tt].id(),Q++),z.xCoords.push(pt.nodes()[0].position().x),z.yCoords.push(pt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();at.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),x.push(O),Y.push(z);for(var B=X.length-1;B>=0;B--)x.splice(X[B],1),Y.splice(X[B],1),at.splice(X[B],1)}}x.forEach(function(pt,it){A.eles=pt,j.push(f(A,Y[it])),t.relocateComponent(at[it],j[it],A)})}else x.forEach(function(pt,it){t.relocateComponent(at[it],Y[it],A)});var D=new Set;if(x.length>1){var W=[],$=q.filter(function(pt){return pt.css("display")=="none"});x.forEach(function(pt,it){var ut=void 0;if(A.quality=="draft"&&(ut=Y[it].nodeIndexes),pt.nodes().not($).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var Mt=void 0;pt.nodes().not($).forEach(function(Dt){if(A.quality=="draft")if(!Dt.isParent())Mt=ut.get(Dt.id()),Tt.nodes.push({x:Y[it].xCoords[Mt]-Dt.boundingbox().w/2,y:Y[it].yCoords[Mt]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else j[it][Dt.id()]&&Tt.nodes.push({x:j[it][Dt.id()].getLeft(),y:j[it][Dt.id()].getTop(),width:j[it][Dt.id()].getWidth(),height:j[it][Dt.id()].getHeight()})}),pt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(A.quality=="draft"){var St=ut.get(mt.id()),Wt=ut.get(xt.id()),Yt=[],Gt=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Yt.push(bt.topLeftX+bt.width/2),Yt.push(bt.topLeftY+bt.height/2)}else Yt.push(Y[it].xCoords[St]),Yt.push(Y[it].yCoords[St]);if(xt.isParent()){var Xt=t.calcBoundingBox(xt,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Xt.topLeftX+Xt.width/2),Gt.push(Xt.topLeftY+Xt.height/2)}else Gt.push(Y[it].xCoords[Wt]),Gt.push(Y[it].yCoords[Wt]);Tt.edges.push({startX:Yt[0],startY:Yt[1],endX:Gt[0],endY:Gt[1]})}else j[it][mt.id()]&&j[it][xt.id()]&&Tt.edges.push({startX:j[it][mt.id()].getCenterX(),startY:j[it][mt.id()].getCenterY(),endX:j[it][xt.id()].getCenterX(),endY:j[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(W.push(Tt),D.add(it))}});var tt=m.packComponents(W,A.randomize).shifts;if(A.quality=="draft")Y.forEach(function(pt,it){var ut=pt.xCoords.map(function(Mt){return Mt+tt[it].dx}),Tt=pt.yCoords.map(function(Mt){return Mt+tt[it].dy});pt.xCoords=ut,pt.yCoords=Tt});else{var lt=0;D.forEach(function(pt){Object.keys(j[pt]).forEach(function(it){var ut=j[pt][it];ut.setCenter(ut.getCenterX()+tt[lt].dx,ut.getCenterY()+tt[lt].dy)}),lt++})}}}else{var E=A.eles.boundingBox();if(at.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=s(A);Y.push(y)}A.quality=="default"||A.quality=="proof"?(j.push(f(A,Y[0])),t.relocateComponent(at[0],j[0],A)):t.relocateComponent(at[0],Y[0],A)}var J=w(function(it,ut){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,Mt=void 0,Dt=it.data("id");return j.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},Mt=xt[Dt])}),A.nodeDimensionsIncludeLabels&&(Mt.labelWidth&&(Mt.labelPosHorizontal=="left"?Tt.x+=Mt.labelWidth/2:Mt.labelPosHorizontal=="right"&&(Tt.x-=Mt.labelWidth/2)),Mt.labelHeight&&(Mt.labelPosVertical=="top"?Tt.y+=Mt.labelHeight/2:Mt.labelPosVertical=="bottom"&&(Tt.y-=Mt.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return Y.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}},"getPositions2");if(A.quality=="default"||A.quality=="proof"||A.randomize){var Rt=t.calcParentsWithoutChildren(P,q),Lt=q.filter(function(pt){return pt.css("display")=="none"});A.eles=q.not(Lt),q.nodes().not(":parent").not(Lt).layoutPositions(b,A,J),Rt.length>0&&Rt.forEach(function(pt){pt.position(J(pt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}]),d})();a.exports=g}),657:((a,e,r)=>{var l=r(548),i=r(140).layoutBase.Matrix,u=r(140).layoutBase.SVD,t=w(function(s){var c=s.cy,f=s.eles,T=f.nodes(),g=f.nodes(":parent"),d=new Map,L=new Map,b=new Map,A=[],P=[],q=[],Y=[],j=[],x=[],at=[],n=[],m=void 0,p=1e8,E=1e-9,y=s.piTol,R=s.samplingType,O=s.nodeSeparation,S=void 0,V=w(function(){for(var G=0,Z=0,K=!1;Z<S;){G=Math.floor(Math.random()*m),K=!1;for(var k=0;k<Z;k++)if(Y[k]==G){K=!0;break}if(!K)Y[Z]=G,Z++;else continue}},"randomSampleCR2"),I=w(function(G,Z,K){for(var k=[],nt=0,gt=0,ot=0,et=void 0,_=[],vt=0,wt=1,yt=0;yt<m;yt++)_[yt]=p;for(k[gt]=G,_[G]=0;gt>=nt;){ot=k[nt++];for(var It=A[ot],ft=0;ft<It.length;ft++)et=L.get(It[ft]),_[et]==p&&(_[et]=_[ot]+1,k[++gt]=et);x[ot][Z]=_[ot]*O}if(K){for(var st=0;st<m;st++)x[st][Z]<j[st]&&(j[st]=x[st][Z]);for(var Ct=0;Ct<m;Ct++)j[Ct]>vt&&(vt=j[Ct],wt=Ct)}return wt},"BFS2"),Q=w(function(G){var Z=void 0;if(G){Z=Math.floor(Math.random()*m);for(var k=0;k<m;k++)j[k]=p;for(var nt=0;nt<S;nt++)Y[nt]=Z,Z=I(Z,nt,G)}else{V();for(var K=0;K<S;K++)I(Y[K],K,G)}for(var gt=0;gt<m;gt++)for(var ot=0;ot<S;ot++)x[gt][ot]*=x[gt][ot];for(var et=0;et<S;et++)at[et]=[];for(var _=0;_<S;_++)for(var vt=0;vt<S;vt++)at[_][vt]=x[Y[vt]][_]},"allBFS2"),z=w(function(){for(var G=u.svd(at),Z=G.S,K=G.U,k=G.V,nt=Z[0]*Z[0]*Z[0],gt=[],ot=0;ot<S;ot++){gt[ot]=[];for(var et=0;et<S;et++)gt[ot][et]=0,ot==et&&(gt[ot][et]=Z[ot]/(Z[ot]*Z[ot]+nt/(Z[ot]*Z[ot])))}n=i.multMat(i.multMat(k,gt),i.transpose(K))},"sample2"),X=w(function(){for(var G=void 0,Z=void 0,K=[],k=[],nt=[],gt=[],ot=0;ot<m;ot++)K[ot]=Math.random(),k[ot]=Math.random();K=i.normalize(K),k=i.normalize(k);for(var et=E,_=E,vt=void 0;;){for(var wt=0;wt<m;wt++)nt[wt]=K[wt];if(K=i.multGamma(i.multL(i.multGamma(nt),x,n)),G=i.dotProduct(nt,K),K=i.normalize(K),et=i.dotProduct(nt,K),vt=Math.abs(et/_),vt<=1+y&&vt>=1)break;_=et}for(var yt=0;yt<m;yt++)nt[yt]=K[yt];for(_=E;;){for(var It=0;It<m;It++)gt[It]=k[It];if(gt=i.minusOp(gt,i.multCons(nt,i.dotProduct(nt,gt))),k=i.multGamma(i.multL(i.multGamma(gt),x,n)),Z=i.dotProduct(gt,k),k=i.normalize(k),et=i.dotProduct(gt,k),vt=Math.abs(et/_),vt<=1+y&&vt>=1)break;_=et}for(var ft=0;ft<m;ft++)gt[ft]=k[ft];P=i.multCons(nt,Math.sqrt(Math.abs(G))),q=i.multCons(gt,Math.sqrt(Math.abs(Z)))},"powerIteration2");l.connectComponents(c,f,l.getTopMostNodes(T),d),g.forEach(function(F){l.connectComponents(c,f,l.getTopMostNodes(F.descendants().intersection(f)),d)});for(var rt=0,B=0;B<T.length;B++)T[B].isParent()||L.set(T[B].id(),rt++);var D=!0,W=!1,$=void 0;try{for(var tt=d.keys()[Symbol.iterator](),lt;!(D=(lt=tt.next()).done);D=!0){var J=lt.value;L.set(J,rt++)}}catch(F){W=!0,$=F}finally{try{!D&&tt.return&&tt.return()}finally{if(W)throw $}}for(var Rt=0;Rt<L.size;Rt++)A[Rt]=[];g.forEach(function(F){for(var G=F.children().intersection(f);G.nodes(":childless").length==0;)G=G.nodes()[0].children().intersection(f);var Z=0,K=G.nodes(":childless")[0].connectedEdges().length;G.nodes(":childless").forEach(function(k,nt){k.connectedEdges().length<K&&(K=k.connectedEdges().length,Z=nt)}),b.set(F.id(),G.nodes(":childless")[Z].id())}),T.forEach(function(F){var G=void 0;F.isParent()?G=L.get(b.get(F.id())):G=L.get(F.id()),F.neighborhood().nodes().forEach(function(Z){f.intersection(F.edgesWith(Z)).length>0&&(Z.isParent()?A[G].push(b.get(Z.id())):A[G].push(Z.id()))})});var Lt=w(function(G){var Z=L.get(G),K=void 0;d.get(G).forEach(function(k){c.getElementById(k).isParent()?K=b.get(k):K=k,A[Z].push(K),A[L.get(K)].push(G)})},"_loop2"),pt=!0,it=!1,ut=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),Mt;!(pt=(Mt=Tt.next()).done);pt=!0){var Dt=Mt.value;Lt(Dt)}}catch(F){it=!0,ut=F}finally{try{!pt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=L.size;var mt=void 0;if(m>2){S=m<s.sampleSize?m:s.sampleSize;for(var xt=0;xt<m;xt++)x[xt]=[];for(var St=0;St<S;St++)n[St]=[];return s.quality=="draft"||s.step=="all"?(Q(R),z(),X(),mt={nodeIndexes:L,xCoords:P,yCoords:q}):(L.forEach(function(F,G){P.push(c.getElementById(G).position("x")),q.push(c.getElementById(G).position("y"))}),mt={nodeIndexes:L,xCoords:P,yCoords:q}),mt}else{var Wt=L.keys(),Yt=c.getElementById(Wt.next().value),Gt=Yt.position(),bt=Yt.outerWidth();if(P.push(Gt.x),q.push(Gt.y),m==2){var Xt=c.getElementById(Wt.next().value),zt=Xt.outerWidth();P.push(Gt.x+bt/2+zt/2+s.idealEdgeLength),q.push(Gt.y)}return mt={nodeIndexes:L,xCoords:P,yCoords:q},mt}},"spectralLayout2");a.exports={spectralLayout:t}}),579:((a,e,r)=>{var l=r(212),i=w(function(t){t&&t("layout","fcose",l)},"register2");typeof cytoscape<"u"&&i(cytoscape),a.exports=i}),140:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return U[a](r,r.exports,v),r.exports}w(v,"__webpack_require__");var h=v(579);return h})()})})(he)),he.exports}w(Er,"requireCytoscapeFcose");var mr=Er();const Tr=gr(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},se={L:dt((C,H)=>C-H+2,"L"),R:dt((C,H)=>C-2,"R"),T:dt((C,H)=>C-H+2,"T"),B:dt((C,H)=>C-2,"B")},Nr=dt(function(C){return Vt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=dt(function(C){const H=C;return H==="L"||H==="R"||H==="T"||H==="B"},"isArchitectureDirection"),Vt=dt(function(C){const H=C;return H==="L"||H==="R"},"isArchitectureDirectionX"),Qt=dt(function(C){const H=C;return H==="T"||H==="B"},"isArchitectureDirectionY"),Te=dt(function(C,H){const M=Vt(C)&&Qt(H),U=Qt(C)&&Vt(H);return M||U},"isArchitectureDirectionXY"),Lr=dt(function(C){const H=C[0],M=C[1],U=Vt(H)&&Qt(M),N=Qt(H)&&Vt(M);return U||N},"isArchitecturePairXY"),Cr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),ye=dt(function(C,H){const M=`${C}${H}`;return Cr(M)?M:void 0},"getArchitectureDirectionPair"),Ar=dt(function([C,H],M){const U=M[0],N=M[1];return Vt(U)?Qt(N)?[C+(U==="L"?-1:1),H+(N==="T"?1:-1)]:[C+(U==="L"?-1:1),H]:Vt(N)?[C+(N==="L"?1:-1),H+(U==="T"?1:-1)]:[C,H+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Mr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=dt(function(C,H){return Te(C,H)?"bend":Vt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Or=dt(function(C){return C.type==="service"},"isArchitectureService"),Dr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),be=dt(C=>C.data(),"edgeData"),ae=dt(C=>C.data(),"nodeData"),xr=ar.architecture,Pe=class{static{w(this,"ArchitectureDB")}constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}static{dt(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},er()}addService({id:C,icon:H,in:M,title:U,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(M!==void 0){if(C===M)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[M]===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[M]==="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:U,edges:[],in:M}}getServices(){return Object.values(this.nodes).filter(Or)}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(Dr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:H,in:M,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(M!==void 0){if(C===M)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[M]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[M]==="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:U,in:M}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:H,lhsDir:M,rhsDir:U,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:a,title:e}){if(!Re(M))throw new Error(`Invalid direction given for left hand side of edge ${C}--${H}. Expected (L,R,T,B) got ${String(M)}`);if(!Re(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${H}. Expected (L,R,T,B) got ${String(U)}`);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 r=this.nodes[C].in,l=this.nodes[H].in;if(h&&r&&l&&r==l)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(a&&r&&l&&r==l)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 i={lhsId:C,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:H,rhsDir:U,rhsInto:v,rhsGroup:a,title:e};this.edges.push(i),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((a,[e,r])=>(a[e]=r.edges.reduce((l,i)=>{const u=this.getNode(i.lhsId)?.in,t=this.getNode(i.rhsId)?.in;if(u&&t&&u!==t){const o=wr(i.lhsDir,i.rhsDir);o!=="bend"&&(C[u]??={},C[u][t]=o,C[t]??={},C[t][u]=o)}if(i.lhsId===e){const o=ye(i.lhsDir,i.rhsDir);o&&(l[o]=i.rhsId)}else{const o=ye(i.rhsDir,i.lhsDir);o&&(l[o]=i.lhsId)}return l},{}),a),{}),M=Object.keys(H)[0],U={[M]:1},N=Object.keys(H).reduce((a,e)=>e===M?a:{...a,[e]:1},{}),v=dt(a=>{const e={[a]:[0,0]},r=[a];for(;r.length>0;){const l=r.shift();if(l){U[l]=1,delete N[l];const i=H[l],[u,t]=e[l];Object.entries(i).forEach(([o,s])=>{U[s]||(e[s]=Ar([u,t],o),r.push(s))})}}return e},"BFS"),h=[v(M)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:H,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,H){this.elements[C]=H}getElementById(C){return this.elements[C]}getConfig(){return rr({...xr,...ir().architecture})}getConfigField(C){return this.getConfig()[C]}},Ir=dt((C,H)=>{fr(C,H),C.groups.map(M=>H.addGroup(M)),C.services.map(M=>H.addService({...M,type:"service"})),C.junctions.map(M=>H.addJunction({...M,type:"junction"})),C.edges.map(M=>H.addEdge(M))},"populateDb"),Ge={parser:{yy:void 0},parse:dt(async C=>{const H=await cr("architecture",C);Se.debug(H);const M=Ge.parser?.yy;if(!(M 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.");Ir(H,M)},"parse")},Rr=dt(C=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${C.archEdgeWidth};
|
|
4
4
|
stroke: ${C.archEdgeColor};
|
|
@@ -34,4 +34,4 @@ var Ze=Object.defineProperty;var w=(C,H)=>Ze(C,"name",{value:H,configurable:!0})
|
|
|
34
34
|
translate(${m*E.width/2}, ${p*E.height/2})
|
|
35
35
|
rotate(${-1*m*p*45}, 0, ${n.height/2})
|
|
36
36
|
`)}}}}}))},"drawEdges"),br=dt(async function(C,H,M){const N=M.getConfigField("padding")*.75,v=M.getConfigField("fontSize"),a=M.getConfigField("iconSize")/2;await Promise.all(H.nodes().map(async e=>{const r=ae(e);if(r.type==="group"){const{h:l,w:i,x1:u,y1:t}=e.boundingBox(),o=C.append("rect");o.attr("id",`group-${r.id}`).attr("x",u+a).attr("y",t+a).attr("width",i).attr("height",l).attr("class","node-bkg");const s=C.append("g");let c=u,f=t;if(r.icon){const T=s.append("g");T.html(`<g>${await pe(r.icon,{height:N,width:N,fallbackPrefix:ne.prefix})}</g>`),T.attr("transform","translate("+(c+a+1)+", "+(f+a+1)+")"),c+=N,f+=v/2-1-2}if(r.label){const T=s.append("g");await me(T,r.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},Ee()),T.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),T.attr("transform","translate("+(c+a+4)+", "+(f+a+2)+")")}M.setElementForId(r.id,o)}}))},"drawGroups"),Pr=dt(async function(C,H,M){const U=Ee();for(const N of M){const v=H.append("g"),h=C.getConfigField("iconSize");if(N.title){const l=v.append("g");await me(l,N.title,{useHtmlLabels:!1,width:h*1.5,classes:"architecture-service-label"},U),l.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),l.attr("transform","translate("+h/2+", "+h+")")}const a=v.append("g");if(N.icon)a.html(`<g>${await pe(N.icon,{height:h,width:h,fallbackPrefix:ne.prefix})}</g>`);else if(N.iconText){a.html(`<g>${await pe("blank",{height:h,width:h,fallbackPrefix:ne.prefix})}</g>`);const u=a.append("g").append("foreignObject").attr("width",h).attr("height",h).append("div").attr("class","node-icon-text").attr("style",`height: ${h}px;`).append("div").html(nr(N.iconText,U)),t=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((h-2)/t)};`)}else a.append("path").attr("class","node-bkg").attr("id","node-"+N.id).attr("d",`M0 ${h} v${-h} q0,-5 5,-5 h${h} q5,0 5,5 v${h} H0 Z`);v.attr("id",`service-${N.id}`).attr("class","architecture-service");const{width:e,height:r}=v.node().getBBox();N.width=e,N.height=r,C.setElementForId(N.id,v)}return 0},"drawServices"),Gr=dt(function(C,H,M){M.forEach(U=>{const N=H.append("g"),v=C.getConfigField("iconSize");N.append("g").append("rect").attr("id","node-"+U.id).attr("fill-opacity","0").attr("width",v).attr("height",v),N.attr("class","architecture-junction");const{width:a,height:e}=N._groups[0][0].getBBox();N.width=a,N.height=e,C.setElementForId(U.id,N)})},"drawJunctions");hr([{name:ne.prefix,icons:ne}]);Fe.use(Tr);function Ue(C,H,M){C.forEach(U=>{H.add({group:"nodes",data:{type:"service",id:U.id,icon:U.icon,label:U.title,parent:U.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-service"})})}w(Ue,"addServices");dt(Ue,"addServices");function Ye(C,H,M){C.forEach(U=>{H.add({group:"nodes",data:{type:"junction",id:U.id,parent:U.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-junction"})})}w(Ye,"addJunctions");dt(Ye,"addJunctions");function Xe(C,H){H.nodes().map(M=>{const U=ae(M);if(U.type==="group")return;U.x=M.position().x,U.y=M.position().y,C.getElementById(U.id).attr("transform","translate("+(U.x||0)+","+(U.y||0)+")")})}w(Xe,"positionNodes");dt(Xe,"positionNodes");function He(C,H){C.forEach(M=>{H.add({group:"nodes",data:{type:"group",id:M.id,icon:M.icon,label:M.title,parent:M.in},classes:"node-group"})})}w(He,"addGroups");dt(He,"addGroups");function We(C,H){C.forEach(M=>{const{lhsId:U,rhsId:N,lhsInto:v,lhsGroup:h,rhsInto:a,lhsDir:e,rhsDir:r,rhsGroup:l,title:i}=M,u=Te(M.lhsDir,M.rhsDir)?"segments":"straight",t={id:`${U}-${N}`,label:i,source:U,sourceDir:e,sourceArrow:v,sourceGroup:h,sourceEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%",target:N,targetDir:r,targetArrow:a,targetGroup:l,targetEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%"};H.add({group:"edges",data:t,classes:u})})}w(We,"addEdges");dt(We,"addEdges");function Ve(C,H,M){const U=dt((a,e)=>Object.entries(a).reduce((r,[l,i])=>{let u=0;const t=Object.entries(i);if(t.length===1)return r[l]=t[0][1],r;for(let o=0;o<t.length-1;o++)for(let s=o+1;s<t.length;s++){const[c,f]=t[o],[T,g]=t[s];if(M[c]?.[T]===e)r[l]??=[],r[l]=[...r[l],...f,...g];else if(c==="default"||T==="default")r[l]??=[],r[l]=[...r[l],...f,...g];else{const L=`${l}-${u++}`;r[L]=f;const b=`${l}-${u++}`;r[b]=g}}return r},{}),"flattenAlignments"),N=H.map(a=>{const e={},r={};return Object.entries(a).forEach(([l,[i,u]])=>{const t=C.getNode(l)?.in??"default";e[u]??={},e[u][t]??=[],e[u][t].push(l),r[i]??={},r[i][t]??=[],r[i][t].push(l)}),{horiz:Object.values(U(e,"horizontal")).filter(l=>l.length>1),vert:Object.values(U(r,"vertical")).filter(l=>l.length>1)}}),[v,h]=N.reduce(([a,e],{horiz:r,vert:l})=>[[...a,...r],[...e,...l]],[[],[]]);return{horizontal:v,vertical:h}}w(Ve,"getAlignments");dt(Ve,"getAlignments");function ze(C,H){const M=[],U=dt(v=>`${v[0]},${v[1]}`,"posToStr"),N=dt(v=>v.split(",").map(h=>parseInt(h)),"strToPos");return C.forEach(v=>{const h=Object.fromEntries(Object.entries(v).map(([l,i])=>[U(i),l])),a=[U([0,0])],e={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){const l=a.shift();if(l){e[l]=1;const i=h[l];if(i){const u=N(l);Object.entries(r).forEach(([t,o])=>{const s=U([u[0]+o[0],u[1]+o[1]]),c=h[s];c&&!e[s]&&(a.push(s),M.push({[xe[t]]:c,[xe[Nr(t)]]:i,gap:1.5*H.getConfigField("iconSize")}))})}}}}),M}w(ze,"getRelativeConstraints");dt(ze,"getRelativeConstraints");function Be(C,H,M,U,N,{spatialMaps:v,groupAlignments:h}){return new Promise(a=>{const e=or("body").append("div").attr("id","cy").attr("style","display:none"),r=Fe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${N.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${N.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});e.remove(),He(M,r),Ue(C,r,N),Ye(H,r,N),We(U,r);const l=Ve(N,v,h),i=ze(v,N),u=r.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[o,s]=t.connectedNodes(),{parent:c}=ae(o),{parent:f}=ae(s);return c===f?1.5*N.getConfigField("iconSize"):.5*N.getConfigField("iconSize")},edgeElasticity(t){const[o,s]=t.connectedNodes(),{parent:c}=ae(o),{parent:f}=ae(s);return c===f?.45:.001},alignmentConstraint:l,relativePlacementConstraint:i});u.one("layoutstop",()=>{function t(o,s,c,f){let T,g;const{x:d,y:L}=o,{x:b,y:A}=s;g=(f-L+(d-c)*(L-A)/(d-b))/Math.sqrt(1+Math.pow((L-A)/(d-b),2)),T=Math.sqrt(Math.pow(f-L,2)+Math.pow(c-d,2)-Math.pow(g,2));const P=Math.sqrt(Math.pow(b-d,2)+Math.pow(A-L,2));T=T/P;let q=(b-d)*(f-L)-(A-L)*(c-d);switch(!0){case q>=0:q=1;break;case q<0:q=-1;break}let Y=(b-d)*(c-d)+(A-L)*(f-L);switch(!0){case Y>=0:Y=1;break;case Y<0:Y=-1;break}return g=Math.abs(g)*q,T=T*Y,{distances:g,weights:T}}w(t,"getSegmentWeights"),dt(t,"getSegmentWeights"),r.startBatch();for(const o of Object.values(r.edges()))if(o.data?.()){const{x:s,y:c}=o.source().position(),{x:f,y:T}=o.target().position();if(s!==f&&c!==T){const g=o.sourceEndpoint(),d=o.targetEndpoint(),{sourceDir:L}=be(o),[b,A]=Qt(L)?[g.x,d.y]:[d.x,g.y],{weights:P,distances:q}=t(g,d,b,A);o.style("segment-distances",q),o.style("segment-weights",P)}}r.endBatch(),u.run()}),u.run(),r.ready(t=>{Se.info("Ready",t),a(r)})})}w(Be,"layoutArchitecture");dt(Be,"layoutArchitecture");var Ur=dt(async(C,H,M,U)=>{const N=U.db,v=N.getServices(),h=N.getJunctions(),a=N.getGroups(),e=N.getEdges(),r=N.getDataStructures(),l=ke(H),i=l.append("g");i.attr("class","architecture-edges");const u=l.append("g");u.attr("class","architecture-services");const t=l.append("g");t.attr("class","architecture-groups"),await Pr(N,u,v),Gr(N,u,h);const o=await Be(v,h,a,e,N,r);await Fr(i,o,N),await br(t,o,N),Xe(N,o),qe(void 0,l,N.getConfigField("padding"),N.getConfigField("useMaxWidth"))},"draw"),Yr={draw:Ur},Kr={parser:Ge,get db(){return new Pe},renderer:Yr,styles:Sr};export{Kr as diagram};
|
|
37
|
-
//# sourceMappingURL=architectureDiagram-VXUJARFQ-
|
|
37
|
+
//# sourceMappingURL=architectureDiagram-VXUJARFQ-CSo1yn8K.js.map
|