@marimo-team/frontend 0.14.18-dev7 → 0.14.18-dev9

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.
Files changed (96) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-BaIUQrIX.js → ConnectedDataExplorerComponent-B6NVG7Fy.js} +1 -1
  2. package/dist/assets/{ImageComparisonComponent-CxZdG2CC.js → ImageComparisonComponent-3KcZa9Ym.js} +1 -1
  3. package/dist/assets/{VegaLite-Z6SyB7W8.js → VegaLite-CtkqxS0X.js} +1 -1
  4. package/dist/assets/{_baseEach-7sRlJIgH.js → _baseEach-CjvI0y7T.js} +1 -1
  5. package/dist/assets/_baseMap-DI8H5mdU.js +1 -0
  6. package/dist/assets/{_baseUniq-Dy351lYO.js → _baseUniq-Ds9S94xv.js} +1 -1
  7. package/dist/assets/{_createAggregator-tuCWwlfU.js → _createAggregator-Bqe-A14O.js} +1 -1
  8. package/dist/assets/{any-language-editor-BamaSKY2.js → any-language-editor-CGmtjfJH.js} +1 -1
  9. package/dist/assets/{architectureDiagram-SUXI7LT5-DyHBZ4NO.js → architectureDiagram-SUXI7LT5-BEcV3kj8.js} +1 -1
  10. package/dist/assets/{blockDiagram-6J76NXCF-P-kXumuw.js → blockDiagram-6J76NXCF-BUxeo5Pp.js} +1 -1
  11. package/dist/assets/{c4Diagram-6F6E4RAY-eOHn2Imb.js → c4Diagram-6F6E4RAY-CvGMgd-R.js} +1 -1
  12. package/dist/assets/channel-BgIIdDsO.js +1 -0
  13. package/dist/assets/{chunk-353BL4L5-CFzyuLAq.js → chunk-353BL4L5-BJhgRHK-.js} +1 -1
  14. package/dist/assets/{chunk-67H74DCK-CIWqUdmL.js → chunk-67H74DCK-BWX3D-qq.js} +1 -1
  15. package/dist/assets/{chunk-AACKK3MU-CxGtIeNv.js → chunk-AACKK3MU-tA3KIhd1.js} +1 -1
  16. package/dist/assets/{chunk-BFAMUDN2-DkmobNj4.js → chunk-BFAMUDN2-CY30V5X_.js} +1 -1
  17. package/dist/assets/{chunk-E2GYISFI-WlMag73Q.js → chunk-E2GYISFI-uWIZ1Jhx.js} +1 -1
  18. package/dist/assets/{chunk-OW32GOEJ-CC0tAzcX.js → chunk-OW32GOEJ-B-QB95S1.js} +1 -1
  19. package/dist/assets/{chunk-SKB7J2MH-B0sWSuN_.js → chunk-SKB7J2MH-DPsXY34k.js} +1 -1
  20. package/dist/assets/{chunk-SZ463SBG-CyziA54m.js → chunk-SZ463SBG-DHkdo7UI.js} +1 -1
  21. package/dist/assets/{circle-play-Dwg09kFs.js → circle-play-DvNUYBOa.js} +1 -1
  22. package/dist/assets/classDiagram-M3E45YP4-CocoijMx.js +1 -0
  23. package/dist/assets/classDiagram-v2-YAWTLIQI-CocoijMx.js +1 -0
  24. package/dist/assets/clone-CkywUQE5.js +1 -0
  25. package/dist/assets/{compile-BVDfJQ_9.js → compile-yfBBBvDb.js} +1 -1
  26. package/dist/assets/{dagre-JOIXM2OF-BRUYxN-i.js → dagre-JOIXM2OF-CGKrq8GI.js} +1 -1
  27. package/dist/assets/{data-grid-overlay-editor-DevNFsss.js → data-grid-overlay-editor-BeUIwx4E.js} +1 -1
  28. package/dist/assets/{diagram-5UYTHUR4-D1ebkB7c.js → diagram-5UYTHUR4-CaEJdB-c.js} +1 -1
  29. package/dist/assets/{diagram-VMROVX33-CMHIBUYK.js → diagram-VMROVX33-BAO1guE0.js} +1 -1
  30. package/dist/assets/{diagram-ZTM2IBQH-CQeNhQ3t.js → diagram-ZTM2IBQH-B4LQUmZH.js} +1 -1
  31. package/dist/assets/{edit-page-51DFvYwH.js → edit-page-0aVIqkPG.js} +38 -38
  32. package/dist/assets/{erDiagram-3M52JZNH-C6F3DP0R.js → erDiagram-3M52JZNH-D3kcrriI.js} +1 -1
  33. package/dist/assets/{flowDiagram-KYDEHFYC-DQWcSkX7.js → flowDiagram-KYDEHFYC-COI3Wlzg.js} +1 -1
  34. package/dist/assets/{ganttDiagram-EK5VF46D-CNQfbuW1.js → ganttDiagram-EK5VF46D-T8K8LZXH.js} +1 -1
  35. package/dist/assets/{gitGraphDiagram-GW3U2K7C-BZfR2Xfl.js → gitGraphDiagram-GW3U2K7C-Q9Tu2K8y.js} +1 -1
  36. package/dist/assets/{glide-data-editor-DwzS3TXg.js → glide-data-editor-ceB8jin-.js} +4 -4
  37. package/dist/assets/{graph-Bq0vR64m.js → graph-mQaQlEC0.js} +1 -1
  38. package/dist/assets/{home-page-CJQ1VMV9.js → home-page-DfH28tMw.js} +1 -1
  39. package/dist/assets/{index-Wwj7K0Ee.js → index-6r7UeFlf.js} +1 -1
  40. package/dist/assets/{index-Cwzb6z71.js → index-BS0ZXaCb.js} +1 -1
  41. package/dist/assets/{index-BZpbzPMT.js → index-BbKaEGro.js} +1 -1
  42. package/dist/assets/{index-DdtsvxKy.js → index-Bbz-vY_t.js} +1 -1
  43. package/dist/assets/{index-HpWIL4KJ.js → index-Bh4jjeua.js} +1 -1
  44. package/dist/assets/{index-CjybibWu.js → index-Bl0C1eEM.js} +1 -1
  45. package/dist/assets/{index-BR-cyQhp.js → index-CKe-VV4U.js} +1 -1
  46. package/dist/assets/{index-DS7XqCVi.js → index-CbFuBnKK.js} +1 -1
  47. package/dist/assets/{index-DaY4V8PZ.js → index-Cd25JFtC.js} +1 -1
  48. package/dist/assets/{index-f0yOktee.js → index-CoLaKlH0.js} +1 -1
  49. package/dist/assets/{index-CXqV8V8P.js → index-Cs6LYSt0.js} +1 -1
  50. package/dist/assets/{index-DeUqVCzl.js → index-Cz8VHSaF.js} +1 -1
  51. package/dist/assets/{index-BeZw0eoM.js → index-D1qx1y0C.js} +1 -1
  52. package/dist/assets/{index-B7GtZujm.js → index-DF_6z97_.js} +1 -1
  53. package/dist/assets/{index-BefWY6Ah.js → index-DPzEQsyf.js} +11 -11
  54. package/dist/assets/{index-CsWPsy1S.js → index-DZeLh41D.js} +1 -1
  55. package/dist/assets/{index-Dfp21l4o.js → index-DdiulcY3.js} +1 -1
  56. package/dist/assets/{index-BZaudNa5.js → index-j8KhNyAD.js} +1 -1
  57. package/dist/assets/{index-C1UTEtg5.js → index-ynTLoSgO.js} +1 -1
  58. package/dist/assets/infoDiagram-LHK5PUON-DIh9EeeW.js +2 -0
  59. package/dist/assets/{journeyDiagram-EWQZEKCU-Kvt5RCTL.js → journeyDiagram-EWQZEKCU-DHnUk6vv.js} +1 -1
  60. package/dist/assets/{kanban-definition-ZSS6B67P-DDnLQNJd.js → kanban-definition-ZSS6B67P-G4X25rf5.js} +1 -1
  61. package/dist/assets/{layout-8KGiWycv.js → layout-Ovgg_XTL.js} +1 -1
  62. package/dist/assets/{linear-DMCrL16N.js → linear-DT2F5lCA.js} +1 -1
  63. package/dist/assets/{links-C-BM-9mf.js → links-Co7kZnDQ.js} +1 -1
  64. package/dist/assets/{mermaid-As26tMDi.js → mermaid-sbM5kvPX.js} +4 -4
  65. package/dist/assets/{min-CLUKABrS.js → min-ClcSmngt.js} +1 -1
  66. package/dist/assets/{mindmap-definition-6CBA2TL7-BDzdyrL1.js → mindmap-definition-6CBA2TL7-DNdqOjtw.js} +1 -1
  67. package/dist/assets/{number-overlay-editor-BAKmMwQp.js → number-overlay-editor-BNl24tu6.js} +1 -1
  68. package/dist/assets/{pieDiagram-NIOCPIFQ-C6Ov7bWT.js → pieDiagram-NIOCPIFQ-ClBSTDHM.js} +1 -1
  69. package/dist/assets/{quadrantDiagram-2OG54O6I-B-cbhhfv.js → quadrantDiagram-2OG54O6I--dNkbIMK.js} +1 -1
  70. package/dist/assets/{react-plotly-Bpp34INM.js → react-plotly-bwK_a_t1.js} +1 -1
  71. package/dist/assets/{requirementDiagram-QOLK2EJ7-Btb77dUe.js → requirementDiagram-QOLK2EJ7-28ZDvOK8.js} +1 -1
  72. package/dist/assets/{run-page-pWqG7b1Y.js → run-page-CJW1v8wr.js} +1 -1
  73. package/dist/assets/{sankeyDiagram-4UZDY2LN-BhR2psVm.js → sankeyDiagram-4UZDY2LN-XAKiDU7c.js} +1 -1
  74. package/dist/assets/{sequenceDiagram-SKLFT4DO-C_xr2yQx.js → sequenceDiagram-SKLFT4DO-DDCNXI_B.js} +1 -1
  75. package/dist/assets/{slides-component-HN-Xdqlh.js → slides-component-2aF-KcfL.js} +1 -1
  76. package/dist/assets/{sortBy-BcgFdWkG.js → sortBy-BPqL9Az6.js} +1 -1
  77. package/dist/assets/{stateDiagram-MI5ZYTHO-Dv5riPA-.js → stateDiagram-MI5ZYTHO-D1_v1n0T.js} +1 -1
  78. package/dist/assets/stateDiagram-v2-5AN5P6BG-Ch96oS1p.js +1 -0
  79. package/dist/assets/{storage-Jq21wW_t.js → storage-6bL26f8J.js} +3 -3
  80. package/dist/assets/{terminal-D2VHCbrK.js → terminal-BmZY9sKi.js} +1 -1
  81. package/dist/assets/{time-CPWP6Rno.js → time--ds3HCGk.js} +1 -1
  82. package/dist/assets/{timeline-definition-MYPXXCX6-BRcGCjFD.js → timeline-definition-MYPXXCX6-BLXFJK2J.js} +1 -1
  83. package/dist/assets/{tracing-DQ_UQfpK.js → tracing-DAOqNENE.js} +2 -2
  84. package/dist/assets/{trash-nR7lDHRj.js → trash-DJ39k3RZ.js} +1 -1
  85. package/dist/assets/{treemap-75Q7IDZK-DipLl6qz.js → treemap-75Q7IDZK-CRVQqKgI.js} +1 -1
  86. package/dist/assets/{vega-component-DuBlubLU.js → vega-component-C-duuyA7.js} +1 -1
  87. package/dist/assets/{xychartDiagram-H2YORKM3-DU8wjog4.js → xychartDiagram-H2YORKM3-tbgrOMTu.js} +1 -1
  88. package/dist/index.html +1 -1
  89. package/package.json +1 -1
  90. package/dist/assets/_baseMap-BWr-cWt7.js +0 -1
  91. package/dist/assets/channel-DIjHgQnY.js +0 -1
  92. package/dist/assets/classDiagram-M3E45YP4-C4U43lIZ.js +0 -1
  93. package/dist/assets/classDiagram-v2-YAWTLIQI-C4U43lIZ.js +0 -1
  94. package/dist/assets/clone-ikcipny_.js +0 -1
  95. package/dist/assets/infoDiagram-LHK5PUON-CJFL3yFq.js +0 -2
  96. package/dist/assets/stateDiagram-v2-5AN5P6BG-hUS9gcoI.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as Z,g as Be,s as je,a as qe,b as $e,q as Ze,p as Qe,I as Je,T as Ke,E as tr,F as er,G as rr,y as nr,l as Te,a4 as he,c as le,am as de,an as or,ao as ir}from"./mermaid-As26tMDi.js";import{p as ar}from"./chunk-353BL4L5-CFzyuLAq.js";import{I as sr}from"./chunk-AACKK3MU-CxGtIeNv.js";import{p as hr}from"./treemap-75Q7IDZK-DipLl6qz.js";import{c as Ae}from"./cytoscape.esm-CzSnbbKZ.js";import{z as lr}from"./index-BefWY6Ah.js";import{s as dr}from"./transform-B8bpuzxV.js";import"./step-BwsUM5iJ.js";import"./_baseEach-7sRlJIgH.js";import"./_baseUniq-Dy351lYO.js";import"./min-CLUKABrS.js";import"./_baseMap-BWr-cWt7.js";import"./clone-ikcipny_.js";import"./_createAggregator-tuCWwlfU.js";import"./timer-BwIYMJWC.js";var we,Le={exports:{}},Ie={exports:{}},_e={exports:{}};function cr(){return we?_e.exports:(we=1,T=function(){return function(L){var _={};function N(c){if(_[c])return _[c].exports;var o=_[c]={i:c,l:!1,exports:{}};return L[c].call(o.exports,o,o.exports,N),o.l=!0,o.exports}return N.m=L,N.c=_,N.i=function(c){return c},N.d=function(c,o,s){N.o(c,o)||Object.defineProperty(c,o,{configurable:!1,enumerable:!0,get:s})},N.n=function(c){var o=c&&c.__esModule?function(){return c.default}:function(){return c};return N.d(o,"a",o),o},N.o=function(c,o){return Object.prototype.hasOwnProperty.call(c,o)},N.p="",N(N.s=28)}([function(L,_,N){function c(){}c.QUALITY=1,c.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,c.DEFAULT_INCREMENTAL=!1,c.DEFAULT_ANIMATION_ON_LAYOUT=!0,c.DEFAULT_ANIMATION_DURING_LAYOUT=!1,c.DEFAULT_ANIMATION_PERIOD=50,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,c.DEFAULT_GRAPH_MARGIN=15,c.NODE_DIMENSIONS_INCLUDE_LABELS=!1,c.SIMPLE_NODE_SIZE=40,c.SIMPLE_NODE_HALF_SIZE=c.SIMPLE_NODE_SIZE/2,c.EMPTY_COMPOUND_NODE_SIZE=40,c.MIN_EDGE_LENGTH=1,c.WORLD_BOUNDARY=1e6,c.INITIAL_WORLD_BOUNDARY=c.WORLD_BOUNDARY/1e3,c.WORLD_CENTER_X=1200,c.WORLD_CENTER_Y=900,L.exports=c},function(L,_,N){var c=N(2),o=N(8),s=N(9);function e(n,i,t){c.call(this,t),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=t,this.bendpoints=[],this.source=n,this.target=i}for(var r in e.prototype=Object.create(c.prototype),c)e[r]=c[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(n){if(this.source===n)return this.target;if(this.target===n)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(n,i){for(var t=this.getOtherEnd(n),h=i.getGraphManager().getRoot();;){if(t.getOwner()==i)return t;if(t.getOwner()==h)break;t=t.getOwner().getParent()}return null},e.prototype.updateLength=function(){var n=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),n),this.isOverlapingSourceAndTarget||(this.lengthX=n[0]-n[2],this.lengthY=n[1]-n[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=e},function(L,_,N){L.exports=function(c){this.vGraphObject=c}},function(L,_,N){var c=N(2),o=N(10),s=N(13),e=N(0),r=N(16),n=N(5);function i(h,l,g,d){g==null&&d==null&&(d=l),c.call(this,d),h.graphManager!=null&&(h=h.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=h,this.rect=g!=null&&l!=null?new s(l.x,l.y,g.width,g.height):new s}for(var t in i.prototype=Object.create(c.prototype),c)i[t]=c[t];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(h){this.rect.width=h},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(h){this.rect.height=h},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 n(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new n(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(h,l){this.rect.x=h.x,this.rect.y=h.y,this.rect.width=l.width,this.rect.height=l.height},i.prototype.setCenter=function(h,l){this.rect.x=h-this.rect.width/2,this.rect.y=l-this.rect.height/2},i.prototype.setLocation=function(h,l){this.rect.x=h,this.rect.y=l},i.prototype.moveBy=function(h,l){this.rect.x+=h,this.rect.y+=l},i.prototype.getEdgeListToNode=function(h){var l=[],g=this;return g.edges.forEach(function(d){if(d.target==h){if(d.source!=g)throw"Incorrect edge source!";l.push(d)}}),l},i.prototype.getEdgesBetween=function(h){var l=[],g=this;return g.edges.forEach(function(d){if(d.source!=g&&d.target!=g)throw"Incorrect edge source and/or target";d.target!=h&&d.source!=h||l.push(d)}),l},i.prototype.getNeighborsList=function(){var h=new Set,l=this;return l.edges.forEach(function(g){if(g.source==l)h.add(g.target);else{if(g.target!=l)throw"Incorrect incidency!";h.add(g.source)}}),h},i.prototype.withChildren=function(){var h=new Set;if(h.add(this),this.child!=null)for(var l=this.child.getNodes(),g=0;g<l.length;g++)l[g].withChildren().forEach(function(d){h.add(d)});return h},i.prototype.getNoOfChildren=function(){var h=0;if(this.child==null)h=1;else for(var l=this.child.getNodes(),g=0;g<l.length;g++)h+=l[g].getNoOfChildren();return h==0&&(h=1),h},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.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 h,l,g=-e.INITIAL_WORLD_BOUNDARY,d=e.INITIAL_WORLD_BOUNDARY;h=e.WORLD_CENTER_X+r.nextDouble()*(d-g)+g;var y=-e.INITIAL_WORLD_BOUNDARY,v=e.INITIAL_WORLD_BOUNDARY;l=e.WORLD_CENTER_Y+r.nextDouble()*(v-y)+y,this.rect.x=h,this.rect.y=l},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var h=this.getChild();if(h.updateBounds(!0),this.rect.x=h.getLeft(),this.rect.y=h.getTop(),this.setWidth(h.getRight()-h.getLeft()),this.setHeight(h.getBottom()-h.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var l=h.getRight()-h.getLeft(),g=h.getBottom()-h.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(l+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>l?(this.rect.x-=(this.labelWidth-l)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(l+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>g?(this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(g+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(h){var l=this.rect.x;l>e.WORLD_BOUNDARY?l=e.WORLD_BOUNDARY:l<-e.WORLD_BOUNDARY&&(l=-e.WORLD_BOUNDARY);var g=this.rect.y;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var d=new n(l,g),y=h.inverseTransformPoint(d);this.setLocation(y.x,y.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()},L.exports=i},function(L,_,N){var c=N(0);function o(){}for(var s in c)o[s]=c[s];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=3*o.MAX_NODE_DISPLACEMENT_INCREMENTAL,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,L.exports=o},function(L,_,N){function c(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.setX=function(o){this.x=o},c.prototype.setY=function(o){this.y=o},c.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},c.prototype.getCopy=function(){return new c(this.x,this.y)},c.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},L.exports=c},function(L,_,N){var c=N(2),o=N(10),s=N(0),e=N(7),r=N(3),n=N(1),i=N(13),t=N(12),h=N(11);function l(d,y,v){c.call(this,v),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var g in l.prototype=Object.create(c.prototype),c)l[g]=c[g];l.prototype.getNodes=function(){return this.nodes},l.prototype.getEdges=function(){return this.edges},l.prototype.getGraphManager=function(){return this.graphManager},l.prototype.getParent=function(){return this.parent},l.prototype.getLeft=function(){return this.left},l.prototype.getRight=function(){return this.right},l.prototype.getTop=function(){return this.top},l.prototype.getBottom=function(){return this.bottom},l.prototype.isConnected=function(){return this.isConnected},l.prototype.add=function(d,y,v){if(y==null&&v==null){var E=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(E)>-1)throw"Node already in graph!";return E.owner=this,this.getNodes().push(E),E}var A=d;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(y.owner!=v.owner||y.owner!=this)throw"Both owners must be this graph!";return y.owner!=v.owner?null:(A.source=y,A.target=v,A.isInterGraph=!1,this.getEdges().push(A),y.edges.push(A),v!=y&&v.edges.push(A),A)},l.prototype.remove=function(d){var y=d;if(d instanceof r){if(y==null)throw"Node is null!";if(y.owner==null||y.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),E=v.length,A=0;A<E;A++)(M=v[A]).isInterGraph?this.graphManager.remove(M):M.source.owner.remove(M);if((F=this.nodes.indexOf(y))==-1)throw"Node not in owner node list!";this.nodes.splice(F,1)}else if(d instanceof n){var M;if((M=d)==null)throw"Edge is null!";if(M.source==null||M.target==null)throw"Source and/or target is null!";if(M.source.owner==null||M.target.owner==null||M.source.owner!=this||M.target.owner!=this)throw"Source and/or target owner is invalid!";var F,b=M.source.edges.indexOf(M),Y=M.target.edges.indexOf(M);if(!(b>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";if(M.source.edges.splice(b,1),M.target!=M.source&&M.target.edges.splice(Y,1),(F=M.source.owner.getEdges().indexOf(M))==-1)throw"Not in owner's edge list!";M.source.owner.getEdges().splice(F,1)}},l.prototype.updateLeftTop=function(){for(var d,y,v,E=o.MAX_VALUE,A=o.MAX_VALUE,M=this.getNodes(),F=M.length,b=0;b<F;b++){var Y=M[b];E>(d=Y.getTop())&&(E=d),A>(y=Y.getLeft())&&(A=y)}return E==o.MAX_VALUE?null:(v=M[0].getParent().paddingLeft!=null?M[0].getParent().paddingLeft:this.margin,this.left=A-v,this.top=E-v,new t(this.left,this.top))},l.prototype.updateBounds=function(d){for(var y,v,E,A,M,F=o.MAX_VALUE,b=-o.MAX_VALUE,Y=o.MAX_VALUE,H=-o.MAX_VALUE,q=this.nodes,x=q.length,B=0;B<x;B++){var a=q[B];d&&a.child!=null&&a.updateBounds(),F>(y=a.getLeft())&&(F=y),b<(v=a.getRight())&&(b=v),Y>(E=a.getTop())&&(Y=E),H<(A=a.getBottom())&&(H=A)}var m=new i(F,Y,b-F,H-Y);F==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),M=q[0].getParent().paddingLeft!=null?q[0].getParent().paddingLeft:this.margin,this.left=m.x-M,this.right=m.x+m.width+M,this.top=m.y-M,this.bottom=m.y+m.height+M},l.calculateBounds=function(d){for(var y,v,E,A,M=o.MAX_VALUE,F=-o.MAX_VALUE,b=o.MAX_VALUE,Y=-o.MAX_VALUE,H=d.length,q=0;q<H;q++){var x=d[q];M>(y=x.getLeft())&&(M=y),F<(v=x.getRight())&&(F=v),b>(E=x.getTop())&&(b=E),Y<(A=x.getBottom())&&(Y=A)}return new i(M,b,F-M,Y-b)},l.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){for(var d=0,y=this.nodes,v=y.length,E=0;E<v;E++)d+=y[E].calcEstimatedSize();return this.estimatedSize=d==0?s.EMPTY_COMPOUND_NODE_SIZE:d/Math.sqrt(this.nodes.length),this.estimatedSize},l.prototype.updateConnected=function(){var d=this;if(this.nodes.length!=0){var y,v,E=new h,A=new Set,M=this.nodes[0];for(M.withChildren().forEach(function(H){E.push(H),A.add(H)});E.length!==0;)for(var F=(y=(M=E.shift()).getEdges()).length,b=0;b<F;b++)(v=y[b].getOtherEndInGraph(M,this))==null||A.has(v)||v.withChildren().forEach(function(H){E.push(H),A.add(H)});if(this.isConnected=!1,A.size>=this.nodes.length){var Y=0;A.forEach(function(H){H.owner==d&&Y++}),Y==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},L.exports=l},function(L,_,N){var c,o=N(1);function s(e){c=N(6),this.layout=e,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),n=this.add(e,r);return this.setRootGraph(n),this.rootGraph},s.prototype.add=function(e,r,n,i,t){if(n==null&&i==null&&t==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}t=n,n=e;var h=(i=r).getOwner(),l=t.getOwner();if(h==null||h.getGraphManager()!=this)throw"Source not in this graph mgr!";if(l==null||l.getGraphManager()!=this)throw"Target not in this graph mgr!";if(h==l)return n.isInterGraph=!1,h.add(n,i,t);if(n.isInterGraph=!0,n.source=i,n.target=t,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),n.source==null||n.target==null)throw"Edge source and/or target is null!";if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},s.prototype.remove=function(e){if(e instanceof c){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!";for(var n,i=[],t=(i=i.concat(r.getEdges())).length,h=0;h<t;h++)n=i[h],r.remove(n);var l,g=[];for(t=(g=g.concat(r.getNodes())).length,h=0;h<t;h++)l=g[h],r.remove(l);r==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(r);this.graphs.splice(d,1),r.parent=null}else if(e instanceof o){if((n=e)==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(n.source==null||n.target==null)throw"Source and/or target is null!";if(n.source.edges.indexOf(n)==-1||n.target.edges.indexOf(n)==-1)throw"Source and/or target doesn't know this edge!";if(d=n.source.edges.indexOf(n),n.source.edges.splice(d,1),d=n.target.edges.indexOf(n),n.target.edges.splice(d,1),n.source.owner==null||n.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";d=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(d,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),n=r.length,i=0;i<n;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var n=0;n<r.length;n++)e=e.concat(r[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},s.prototype.getRoot=function(){return this.rootGraph},s.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"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(e,r){if(e==null||r==null)throw"assert failed";if(e==r)return!0;for(var n,i=e.getOwner();(n=i.getParent())!=null;){if(n==r)return!0;if((i=n.getOwner())==null)break}for(i=r.getOwner();(n=i.getParent())!=null;){if(n==e)return!0;if((i=n.getOwner())==null)break}return!1},s.prototype.calcLowestCommonAncestors=function(){for(var e,r,n,i,t,h=this.getAllEdges(),l=h.length,g=0;g<l;g++)if(r=(e=h[g]).source,n=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=n,r!=n){for(i=r.getOwner();e.lca==null;){for(e.targetInLca=n,t=n.getOwner();e.lca==null;){if(t==i){e.lca=t;break}if(t==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=t.getParent(),t=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"}else e.lca=r.getOwner()},s.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();for(var n=e.getOwner();n!=null;){for(var i=r.getOwner();i!=null;){if(i==n)return i;i=i.getParent().getOwner()}n=n.getParent().getOwner()}return n},s.prototype.calcInclusionTreeDepths=function(e,r){var n;e==null&&r==null&&(e=this.rootGraph,r=1);for(var i=e.getNodes(),t=i.length,h=0;h<t;h++)(n=i[h]).inclusionTreeDepth=r,n.child!=null&&this.calcInclusionTreeDepths(n.child,r+1)},s.prototype.includesInvalidEdge=function(){for(var e,r=[],n=this.edges.length,i=0;i<n;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(i=0;i<r.length;i++)this.remove(r[i]);return!1},L.exports=s},function(L,_,N){var c=N(12);function o(){}o.calcSeparationAmount=function(s,e,r,n){if(!s.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(s,e,i),r[0]=Math.min(s.getRight(),e.getRight())-Math.max(s.x,e.x),r[1]=Math.min(s.getBottom(),e.getBottom())-Math.max(s.y,e.y),s.getX()<=e.getX()&&s.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-s.getX(),s.getRight()-e.getRight()):e.getX()<=s.getX()&&e.getRight()>=s.getRight()&&(r[0]+=Math.min(s.getX()-e.getX(),e.getRight()-s.getRight())),s.getY()<=e.getY()&&s.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-s.getY(),s.getBottom()-e.getBottom()):e.getY()<=s.getY()&&e.getBottom()>=s.getBottom()&&(r[1]+=Math.min(s.getY()-e.getY(),e.getBottom()-s.getBottom()));var t=Math.abs((e.getCenterY()-s.getCenterY())/(e.getCenterX()-s.getCenterX()));e.getCenterY()===s.getCenterY()&&e.getCenterX()===s.getCenterX()&&(t=1);var h=t*r[0],l=r[1]/t;r[0]<l?l=r[0]:h=r[1],r[0]=-1*i[0]*(l/2+n),r[1]=-1*i[1]*(h/2+n)},o.decideDirectionsForOverlappingNodes=function(s,e,r){s.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,s.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},o.getIntersection2=function(s,e,r){var n=s.getCenterX(),i=s.getCenterY(),t=e.getCenterX(),h=e.getCenterY();if(s.intersects(e))return r[0]=n,r[1]=i,r[2]=t,r[3]=h,!0;var l=s.getX(),g=s.getY(),d=s.getRight(),y=s.getX(),v=s.getBottom(),E=s.getRight(),A=s.getWidthHalf(),M=s.getHeightHalf(),F=e.getX(),b=e.getY(),Y=e.getRight(),H=e.getX(),q=e.getBottom(),x=e.getRight(),B=e.getWidthHalf(),a=e.getHeightHalf(),m=!1,u=!1;if(n===t){if(i>h)return r[0]=n,r[1]=g,r[2]=t,r[3]=q,!1;if(i<h)return r[0]=n,r[1]=v,r[2]=t,r[3]=b,!1}else if(i===h){if(n>t)return r[0]=l,r[1]=i,r[2]=Y,r[3]=h,!1;if(n<t)return r[0]=d,r[1]=i,r[2]=F,r[3]=h,!1}else{var f=s.height/s.width,p=e.height/e.width,w=(h-i)/(t-n),I=void 0,C=void 0,G=void 0,S=void 0,P=void 0,D=void 0;if(-f===w?n>t?(r[0]=y,r[1]=v,m=!0):(r[0]=d,r[1]=g,m=!0):f===w&&(n>t?(r[0]=l,r[1]=g,m=!0):(r[0]=E,r[1]=v,m=!0)),-p===w?t>n?(r[2]=H,r[3]=q,u=!0):(r[2]=Y,r[3]=b,u=!0):p===w&&(t>n?(r[2]=F,r[3]=b,u=!0):(r[2]=x,r[3]=q,u=!0)),m&&u)return!1;if(n>t?i>h?(I=this.getCardinalDirection(f,w,4),C=this.getCardinalDirection(p,w,2)):(I=this.getCardinalDirection(-f,w,3),C=this.getCardinalDirection(-p,w,1)):i>h?(I=this.getCardinalDirection(-f,w,1),C=this.getCardinalDirection(-p,w,3)):(I=this.getCardinalDirection(f,w,2),C=this.getCardinalDirection(p,w,4)),!m)switch(I){case 1:S=g,G=n+-M/w,r[0]=G,r[1]=S;break;case 2:G=E,S=i+A*w,r[0]=G,r[1]=S;break;case 3:S=v,G=n+M/w,r[0]=G,r[1]=S;break;case 4:G=y,S=i+-A*w,r[0]=G,r[1]=S}if(!u)switch(C){case 1:D=b,P=t+-a/w,r[2]=P,r[3]=D;break;case 2:P=x,D=h+B*w,r[2]=P,r[3]=D;break;case 3:D=q,P=t+a/w,r[2]=P,r[3]=D;break;case 4:P=H,D=h+-B*w,r[2]=P,r[3]=D}}return!1},o.getCardinalDirection=function(s,e,r){return s>e?r:1+r%4},o.getIntersection=function(s,e,r,n){if(n==null)return this.getIntersection2(s,e,r);var i,t,h,l,g,d,y,v=s.x,E=s.y,A=e.x,M=e.y,F=r.x,b=r.y,Y=n.x,H=n.y;return(y=(i=M-E)*(l=F-Y)-(t=H-b)*(h=v-A))===0?null:new c((h*(d=Y*b-F*H)-l*(g=A*E-v*M))/y,(t*g-i*d)/y)},o.angleOfVector=function(s,e,r,n){var i=void 0;return s!==r?(i=Math.atan((n-e)/(r-s)),r<s?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},o.doIntersect=function(s,e,r,n){var i=s.x,t=s.y,h=e.x,l=e.y,g=r.x,d=r.y,y=n.x,v=n.y,E=(h-i)*(v-d)-(y-g)*(l-t);if(E===0)return!1;var A=((v-d)*(y-i)+(g-y)*(v-t))/E,M=((t-l)*(y-i)+(h-i)*(v-t))/E;return 0<A&&A<1&&0<M&&M<1},o.findCircleLineIntersections=function(s,e,r,n,i,t,h){var l=(r-s)*(r-s)+(n-e)*(n-e),g=2*((s-i)*(r-s)+(e-t)*(n-e)),d=(s-i)*(s-i)+(e-t)*(e-t)-h*h;if(g*g-4*l*d>=0){var y=(-g+Math.sqrt(g*g-4*l*d))/(2*l),v=(-g-Math.sqrt(g*g-4*l*d))/(2*l);return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:null}return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,L.exports=o},function(L,_,N){function c(){}c.sign=function(o){return o>0?1:o<0?-1:0},c.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},c.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},L.exports=c},function(L,_,N){function c(){}c.MAX_VALUE=2147483647,c.MIN_VALUE=-2147483648,L.exports=c},function(L,_,N){var c=function(){function n(i,t){for(var h=0;h<t.length;h++){var l=t[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(i,l.key,l)}}return function(i,t,h){return t&&n(i.prototype,t),h&&n(i,h),i}}(),o=function(n){return{value:n,next:null,prev:null}},s=function(n,i,t,h){return n!==null?n.next=i:h.head=i,t!==null?t.prev=i:h.tail=i,i.prev=n,i.next=t,h.length++,i},e=function(n,i){var t=n.prev,h=n.next;return t!==null?t.next=h:i.head=h,h!==null?h.prev=t:i.tail=t,n.prev=n.next=null,i.length--,n},r=function(){function n(i){var t=this;(function(h,l){if(!(h instanceof l))throw new TypeError("Cannot call a class as a function")})(this,n),this.length=0,this.head=null,this.tail=null,i!=null&&i.forEach(function(h){return t.push(h)})}return c(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,t){return s(t.prev,o(i),t,this)}},{key:"insertAfter",value:function(i,t){return s(t,o(i),t.next,this)}},{key:"insertNodeBefore",value:function(i,t){return s(t.prev,i,t,this)}},{key:"insertNodeAfter",value:function(i,t){return s(t,i,t.next,this)}},{key:"push",value:function(i){return s(this.tail,o(i),null,this)}},{key:"unshift",value:function(i){return s(null,o(i),this.head,this)}},{key:"remove",value:function(i){return e(i,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){for(var t=1,h=this.head;t<i;)h=h.next,t++;return h.value}}},{key:"set_object_at",value:function(i,t){if(i<=this.length()){for(var h=1,l=this.head;h<i;)l=l.next,h++;l.value=t}}}]),n}();L.exports=r},function(L,_,N){function c(o,s,e){this.x=null,this.y=null,o==null&&s==null&&e==null?(this.x=0,this.y=0):typeof o=="number"&&typeof s=="number"&&e==null?(this.x=o,this.y=s):o.constructor.name=="Point"&&s==null&&e==null&&(e=o,this.x=e.x,this.y=e.y)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.getLocation=function(){return new c(this.x,this.y)},c.prototype.setLocation=function(o,s,e){o.constructor.name=="Point"&&s==null&&e==null?(e=o,this.setLocation(e.x,e.y)):typeof o=="number"&&typeof s=="number"&&e==null&&(parseInt(o)==o&&parseInt(s)==s?this.move(o,s):(this.x=Math.floor(o+.5),this.y=Math.floor(s+.5)))},c.prototype.move=function(o,s){this.x=o,this.y=s},c.prototype.translate=function(o,s){this.x+=o,this.y+=s},c.prototype.equals=function(o){if(o.constructor.name=="Point"){var s=o;return this.x==s.x&&this.y==s.y}return this==o},c.prototype.toString=function(){return new c().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=c},function(L,_,N){function c(o,s,e,r){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&s!=null&&e!=null&&r!=null&&(this.x=o,this.y=s,this.width=e,this.height=r)}c.prototype.getX=function(){return this.x},c.prototype.setX=function(o){this.x=o},c.prototype.getY=function(){return this.y},c.prototype.setY=function(o){this.y=o},c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(o){this.width=o},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(o){this.height=o},c.prototype.getRight=function(){return this.x+this.width},c.prototype.getBottom=function(){return this.y+this.height},c.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},c.prototype.getCenterX=function(){return this.x+this.width/2},c.prototype.getMinX=function(){return this.getX()},c.prototype.getMaxX=function(){return this.getX()+this.width},c.prototype.getCenterY=function(){return this.y+this.height/2},c.prototype.getMinY=function(){return this.getY()},c.prototype.getMaxY=function(){return this.getY()+this.height},c.prototype.getWidthHalf=function(){return this.width/2},c.prototype.getHeightHalf=function(){return this.height/2},L.exports=c},function(L,_,N){var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(){}o.lastID=0,o.createID=function(s){return o.isPrimitive(s)?s:(s.uniqueID!=null||(s.uniqueID=o.getString(),o.lastID++),s.uniqueID)},o.getString=function(s){return s==null&&(s=o.lastID),"Object#"+s},o.isPrimitive=function(s){var e=s===void 0?"undefined":c(s);return s==null||e!="object"&&e!="function"},L.exports=o},function(L,_,N){function c(g){if(Array.isArray(g)){for(var d=0,y=Array(g.length);d<g.length;d++)y[d]=g[d];return y}return Array.from(g)}var o=N(0),s=N(7),e=N(3),r=N(1),n=N(6),i=N(5),t=N(17),h=N(29);function l(g){h.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}l.RANDOM_SEED=1,l.prototype=Object.create(h.prototype),l.prototype.getGraphManager=function(){return this.graphManager},l.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},l.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},l.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},l.prototype.newGraphManager=function(){var g=new s(this);return this.graphManager=g,g},l.prototype.newGraph=function(g){return new n(null,this.graphManager,g)},l.prototype.newNode=function(g){return new e(this.graphManager,g)},l.prototype.newEdge=function(g){return new r(null,null,g)},l.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},l.prototype.runLayout=function(){var g;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),g=!this.checkLayoutSuccess()&&this.layout(),o.ANIMATE!=="during"&&(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},l.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},l.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),d=0;d<g.length;d++)g[d];var y=this.graphManager.getRoot().getNodes();for(d=0;d<y.length;d++)y[d];this.update(this.graphManager.getRoot())}},l.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof e){var d=g;if(d.getChild()!=null)for(var y=d.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);d.vGraphObject!=null&&d.vGraphObject.update(d)}else if(g instanceof r){var E=g;E.vGraphObject!=null&&E.vGraphObject.update(E)}else if(g instanceof n){var A=g;A.vGraphObject!=null&&A.vGraphObject.update(A)}},l.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},l.prototype.transform=function(g){if(g==null)this.transform(new i(0,0));else{var d=new t,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){d.setWorldOrgX(g.x),d.setWorldOrgY(g.y),d.setDeviceOrgX(y.x),d.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),E=0;E<v.length;E++)v[E].transform(d)}}},l.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var d,y,v=g.getNodes(),E=0;E<v.length;E++)(y=(d=v[E]).getChild())==null||y.getNodes().length==0?d.scatter():(this.positionNodesRandomly(y),d.updateBounds())},l.prototype.getFlatForest=function(){for(var g=[],d=!0,y=this.graphManager.getRoot().getNodes(),v=!0,E=0;E<y.length;E++)y[E].getChild()!=null&&(v=!1);if(!v)return g;var A=new Set,M=[],F=new Map,b=[];for(b=b.concat(y);b.length>0&&d;){for(M.push(b[0]);M.length>0&&d;){var Y=M[0];M.splice(0,1),A.add(Y);var H=Y.getEdges();for(E=0;E<H.length;E++){var q=H[E].getOtherEnd(Y);if(F.get(Y)!=q){if(A.has(q)){d=!1;break}M.push(q),F.set(q,Y)}}}if(d){var x=[].concat(c(A));for(g.push(x),E=0;E<x.length;E++){var B=x[E],a=b.indexOf(B);a>-1&&b.splice(a,1)}A=new Set,F=new Map}else g=[]}return g},l.prototype.createDummyNodesForBendpoints=function(g){for(var d=[],y=g.source,v=this.graphManager.calcLowestCommonAncestor(g.source,g.target),E=0;E<g.bendpoints.length;E++){var A=this.newNode(null);A.setRect(new Point(0,0),new Dimension(1,1)),v.add(A);var M=this.newEdge(null);this.graphManager.add(M,y,A),d.add(A),y=A}return M=this.newEdge(null),this.graphManager.add(M,y,g.target),this.edgeToDummyNodes.set(g,d),g.isInterGraph()?this.graphManager.remove(g):v.remove(g),d},l.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(c(this.edgeToDummyNodes.keys())).concat(g);for(var d=0;d<g.length;d++){var y=g[d];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),E=0;E<v.length;E++){var A=v[E],M=new i(A.getCenterX(),A.getCenterY()),F=y.bendpoints.get(E);F.x=M.x,F.y=M.y,A.getOwner().remove(A)}this.graphManager.add(y,y.source,y.target)}}},l.transform=function(g,d,y,v){if(y!=null&&v!=null){var E=d;return g<=50?E-=(d-d/y)/50*(50-g):E+=(d*v-d)/50*(g-50),E}var A,M;return g<=50?(A=9*d/500,M=d/10):(A=9*d/50,M=-8*d),A*g+M},l.findCenterOfTree=function(g){var d=[];d=d.concat(g);var y=[],v=new Map,E=!1,A=null;d.length!=1&&d.length!=2||(E=!0,A=d[0]);for(var M=0;M<d.length;M++){var F=(H=d[M]).getNeighborsList().size;v.set(H,H.getNeighborsList().size),F==1&&y.push(H)}var b=[];for(b=b.concat(y);!E;){var Y=[];for(Y=Y.concat(b),b=[],M=0;M<d.length;M++){var H=d[M],q=d.indexOf(H);q>=0&&d.splice(q,1),H.getNeighborsList().forEach(function(x){if(y.indexOf(x)<0){var B=v.get(x)-1;B==1&&b.push(x),v.set(x,B)}})}y=y.concat(b),d.length!=1&&d.length!=2||(E=!0,A=d[0])}return A},l.prototype.setGraphManager=function(g){this.graphManager=g},L.exports=l},function(L,_,N){function c(){}c.seed=1,c.x=0,c.nextDouble=function(){return c.x=1e4*Math.sin(c.seed++),c.x-Math.floor(c.x)},L.exports=c},function(L,_,N){var c=N(5);function o(s,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}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/r),e},o.prototype.transformY=function(s){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/r),e},o.prototype.inverseTransformX=function(s){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/r),e},o.prototype.inverseTransformY=function(s){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/r),e},o.prototype.inverseTransformPoint=function(s){return new c(this.inverseTransformX(s.x),this.inverseTransformY(s.y))},L.exports=o},function(L,_,N){var c=N(15),o=N(4),s=N(0),e=N(8),r=N(9);function n(){c.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}for(var i in n.prototype=Object.create(c.prototype),c)n[i]=c[i];n.prototype.initParameters=function(){c.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var t,h,l,g,d,y,v,E=this.getGraphManager().getAllEdges(),A=0;A<E.length;A++)h=(t=E[A]).idealLength,t.isInterGraph&&(g=t.getSource(),d=t.getTarget(),y=t.getSourceInLca().getEstimatedSize(),v=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=y+v-2*s.SIMPLE_NODE_SIZE),l=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*l))},n.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var t,h=this.getAllEdges(),l=0;l<h.length;l++)t=h[l],this.calcSpringForce(t,t.idealLength)},n.prototype.calcRepulsionForces=function(){var t,h,l,g,d,y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],v=arguments.length>1&&arguments[1]!==void 0&&arguments[1],E=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&y&&this.updateGrid(),d=new Set,t=0;t<E.length;t++)l=E[t],this.calculateRepulsionForceOfANode(l,d,y,v),d.add(l);else for(t=0;t<E.length;t++)for(l=E[t],h=t+1;h<E.length;h++)g=E[h],l.getOwner()==g.getOwner()&&this.calcRepulsionForce(l,g)},n.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),l=0;l<h.length;l++)t=h[l],this.calcGravitationalForce(t)},n.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h=0;h<t.length;h++)t[h].move()},n.prototype.calcSpringForce=function(t,h){var l,g,d,y,v=t.getSource(),E=t.getTarget();if(this.uniformLeafNodeSizes&&v.getChild()==null&&E.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;(l=t.getLength())!=0&&(d=(g=t.edgeElasticity*(l-h))*(t.lengthX/l),y=g*(t.lengthY/l),v.springForceX+=d,v.springForceY+=y,E.springForceX-=d,E.springForceY-=y)},n.prototype.calcRepulsionForce=function(t,h){var l,g,d,y,v,E,A,M=t.getRect(),F=h.getRect(),b=new Array(2),Y=new Array(4);if(M.intersects(F)){e.calcSeparationAmount(M,F,b,o.DEFAULT_EDGE_LENGTH/2),E=2*b[0],A=2*b[1];var H=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=H*E,t.repulsionForceY-=H*A,h.repulsionForceX+=H*E,h.repulsionForceY+=H*A}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(l=F.getCenterX()-M.getCenterX(),g=F.getCenterY()-M.getCenterY()):(e.getIntersection(M,F,Y),l=Y[2]-Y[0],g=Y[3]-Y[1]),Math.abs(l)<o.MIN_REPULSION_DIST&&(l=r.sign(l)*o.MIN_REPULSION_DIST),Math.abs(g)<o.MIN_REPULSION_DIST&&(g=r.sign(g)*o.MIN_REPULSION_DIST),d=l*l+g*g,y=Math.sqrt(d),E=(v=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/d)*l/y,A=v*g/y,t.repulsionForceX-=E,t.repulsionForceY-=A,h.repulsionForceX+=E,h.repulsionForceY+=A},n.prototype.calcGravitationalForce=function(t){var h,l,g,d,y,v,E,A;l=((h=t.getOwner()).getRight()+h.getLeft())/2,g=(h.getTop()+h.getBottom())/2,d=t.getCenterX()-l,y=t.getCenterY()-g,v=Math.abs(d)+t.getWidth()/2,E=Math.abs(y)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(v>(A=h.getEstimatedSize()*this.gravityRangeFactor)||E>A)&&(t.gravitationForceX=-this.gravityConstant*d,t.gravitationForceY=-this.gravityConstant*y):(v>(A=h.getEstimatedSize()*this.compoundGravityRangeFactor)||E>A)&&(t.gravitationForceX=-this.gravityConstant*d*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant)},n.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,h=this.graphManager.getAllNodes(),l=0;l<h.length;l++)(t=h[l]).noOfChildren=t.getNoOfChildren()},n.prototype.calcGrid=function(t){var h,l;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var g=new Array(h),d=0;d<h;d++)g[d]=new Array(l);for(d=0;d<h;d++)for(var y=0;y<l;y++)g[d][y]=new Array;return g},n.prototype.addNodeToGrid=function(t,h,l){var g,d,y,v;g=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),d=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),y=parseInt(Math.floor((t.getRect().y-l)/this.repulsionRange)),v=parseInt(Math.floor((t.getRect().height+t.getRect().y-l)/this.repulsionRange));for(var E=g;E<=d;E++)for(var A=y;A<=v;A++)this.grid[E][A].push(t),t.setGridCoordinates(g,d,y,v)},n.prototype.updateGrid=function(){var t,h,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<l.length;t++)h=l[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(t,h,l,g){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&l||g){var d,y=new Set;t.surrounding=new Array;for(var v=this.grid,E=t.startX-1;E<t.finishX+2;E++)for(var A=t.startY-1;A<t.finishY+2;A++)if(!(E<0||A<0||E>=v.length||A>=v[0].length)){for(var M=0;M<v[E][A].length;M++)if(d=v[E][A][M],t.getOwner()==d.getOwner()&&t!=d&&!h.has(d)&&!y.has(d)){var F=Math.abs(t.getCenterX()-d.getCenterX())-(t.getWidth()/2+d.getWidth()/2),b=Math.abs(t.getCenterY()-d.getCenterY())-(t.getHeight()/2+d.getHeight()/2);F<=this.repulsionRange&&b<=this.repulsionRange&&y.add(d)}}t.surrounding=[].concat(function(Y){if(Array.isArray(Y)){for(var H=0,q=Array(Y.length);H<Y.length;H++)q[H]=Y[H];return q}return Array.from(Y)}(y))}for(E=0;E<t.surrounding.length;E++)this.calcRepulsionForce(t,t.surrounding[E])},n.prototype.calcRepulsionRange=function(){return 0},L.exports=n},function(L,_,N){var c=N(1),o=N(4);function s(r,n,i){c.call(this,r,n,i),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}for(var e in s.prototype=Object.create(c.prototype),c)s[e]=c[e];L.exports=s},function(L,_,N){var c=N(3),o=N(4);function s(r,n,i,t){c.call(this,r,n,i,t),this.nodeRepulsion=o.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=[]}for(var e in s.prototype=Object.create(c.prototype),c)s[e]=c[e];s.prototype.setGridCoordinates=function(r,n,i,t){this.startX=r,this.finishX=n,this.startY=i,this.finishY=t},L.exports=s},function(L,_,N){function c(o,s){this.width=0,this.height=0,o!==null&&s!==null&&(this.height=s,this.width=o)}c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(o){this.width=o},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(o){this.height=o},L.exports=c},function(L,_,N){var c=N(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(s,e){var r=c.createID(s);this.contains(r)||(this.map[r]=e,this.keys.push(s))},o.prototype.contains=function(s){return c.createID(s),this.map[s]!=null},o.prototype.get=function(s){var e=c.createID(s);return this.map[e]},o.prototype.keySet=function(){return this.keys},L.exports=o},function(L,_,N){var c=N(14);function o(){this.set={}}o.prototype.add=function(s){var e=c.createID(s);this.contains(e)||(this.set[e]=s)},o.prototype.remove=function(s){delete this.set[c.createID(s)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(s){return this.set[c.createID(s)]==s},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(s){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)s.push(this.set[e[n]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(s){for(var e=s.length,r=0;r<e;r++){var n=s[r];this.add(n)}},L.exports=o},function(L,_,N){function c(){}c.multMat=function(o,s){for(var e=[],r=0;r<o.length;r++){e[r]=[];for(var n=0;n<s[0].length;n++){e[r][n]=0;for(var i=0;i<o[0].length;i++)e[r][n]+=o[r][i]*s[i][n]}}return e},c.transpose=function(o){for(var s=[],e=0;e<o[0].length;e++){s[e]=[];for(var r=0;r<o.length;r++)s[e][r]=o[r][e]}return s},c.multCons=function(o,s){for(var e=[],r=0;r<o.length;r++)e[r]=o[r]*s;return e},c.minusOp=function(o,s){for(var e=[],r=0;r<o.length;r++)e[r]=o[r]-s[r];return e},c.dotProduct=function(o,s){for(var e=0,r=0;r<o.length;r++)e+=o[r]*s[r];return e},c.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},c.normalize=function(o){for(var s=[],e=this.mag(o),r=0;r<o.length;r++)s[r]=o[r]/e;return s},c.multGamma=function(o){for(var s=[],e=0,r=0;r<o.length;r++)e+=o[r];e*=-1/o.length;for(var n=0;n<o.length;n++)s[n]=e+o[n];return s},c.multL=function(o,s,e){for(var r=[],n=[],i=[],t=0;t<s[0].length;t++){for(var h=0,l=0;l<s.length;l++)h+=-.5*s[l][t]*o[l];n[t]=h}for(var g=0;g<e.length;g++){for(var d=0,y=0;y<e.length;y++)d+=e[g][y]*n[y];i[g]=d}for(var v=0;v<s.length;v++){for(var E=0,A=0;A<s[0].length;A++)E+=s[v][A]*i[A];r[v]=E}return r},L.exports=c},function(L,_,N){var c=function(){function e(r,n){for(var i=0;i<n.length;i++){var t=n[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}return function(r,n,i){return n&&e(r.prototype,n),i&&e(r,i),r}}(),o=N(11),s=function(){function e(r,n){(function(t,h){if(!(t instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),n===null&&n===void 0||(this.compareFunction=this._defaultCompareFunction);var i=void 0;i=r instanceof o?r.size():r.length,this._quicksort(r,0,i-1)}return c(e,[{key:"_quicksort",value:function(r,n,i){if(n<i){var t=this._partition(r,n,i);this._quicksort(r,n,t),this._quicksort(r,t+1,i)}}},{key:"_partition",value:function(r,n,i){for(var t=this._get(r,n),h=n,l=i;;){for(;this.compareFunction(t,this._get(r,l));)l--;for(;this.compareFunction(this._get(r,h),t);)h++;if(!(h<l))return l;this._swap(r,h,l),h++,l--}}},{key:"_get",value:function(r,n){return r instanceof o?r.get_object_at(n):r[n]}},{key:"_set",value:function(r,n,i){r instanceof o?r.set_object_at(n,i):r[n]=i}},{key:"_swap",value:function(r,n,i){var t=this._get(r,n);this._set(r,n,this._get(r,i)),this._set(r,i,t)}},{key:"_defaultCompareFunction",value:function(r,n){return n>r}}]),e}();L.exports=s},function(L,_,N){function c(){}c.svd=function(o){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=o.length,this.n=o[0].length;var s=Math.min(this.m,this.n);this.s=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(Math.min(this.m+1,this.n)),this.U=function wt(ut){if(ut.length==0)return 0;for(var Pt=[],Mt=0;Mt<ut[0];Mt++)Pt.push(wt(ut.slice(1)));return Pt}([this.m,s]),this.V=function(wt){return function ut(Pt){if(Pt.length==0)return 0;for(var Mt=[],Ht=0;Ht<Pt[0];Ht++)Mt.push(ut(Pt.slice(1)));return Mt}(wt)}([this.n,this.n]);for(var e=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(this.n),r=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(this.m),n=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(n,i);t++){if(t<n){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=c.hypot(this.s[t],o[h][t]);if(this.s[t]!==0){o[t][t]<0&&(this.s[t]=-this.s[t]);for(var l=t;l<this.m;l++)o[l][t]/=this.s[t];o[t][t]+=1}this.s[t]=-this.s[t]}for(var g=t+1;g<this.n;g++){if(function(wt,ut){return wt&&ut}(t<n,this.s[t]!==0)){for(var d=0,y=t;y<this.m;y++)d+=o[y][t]*o[y][g];d=-d/o[t][t];for(var v=t;v<this.m;v++)o[v][g]+=d*o[v][t]}e[g]=o[t][g]}if(function(wt,ut){return ut}(0,t<n))for(var E=t;E<this.m;E++)this.U[E][t]=o[E][t];if(t<i){e[t]=0;for(var A=t+1;A<this.n;A++)e[t]=c.hypot(e[t],e[A]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var M=t+1;M<this.n;M++)e[M]/=e[t];e[t+1]+=1}if(e[t]=-e[t],function(wt,ut){return wt&&ut}(t+1<this.m,e[t]!==0)){for(var F=t+1;F<this.m;F++)r[F]=0;for(var b=t+1;b<this.n;b++)for(var Y=t+1;Y<this.m;Y++)r[Y]+=e[b]*o[Y][b];for(var H=t+1;H<this.n;H++)for(var q=-e[H]/e[t+1],x=t+1;x<this.m;x++)o[x][H]+=q*r[x]}for(var B=t+1;B<this.n;B++)this.V[B][t]=e[B]}}var a=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=o[n][n]),this.m<a&&(this.s[a-1]=0),i+1<a&&(e[i]=o[i][a-1]),e[a-1]=0;for(var m=n;m<s;m++){for(var u=0;u<this.m;u++)this.U[u][m]=0;this.U[m][m]=1}for(var f=n-1;f>=0;f--)if(this.s[f]!==0){for(var p=f+1;p<s;p++){for(var w=0,I=f;I<this.m;I++)w+=this.U[I][f]*this.U[I][p];w=-w/this.U[f][f];for(var C=f;C<this.m;C++)this.U[C][p]+=w*this.U[C][f]}for(var G=f;G<this.m;G++)this.U[G][f]=-this.U[G][f];this.U[f][f]=1+this.U[f][f];for(var S=0;S<f-1;S++)this.U[S][f]=0}else{for(var P=0;P<this.m;P++)this.U[P][f]=0;this.U[f][f]=1}for(var D=this.n-1;D>=0;D--){if(function(wt,ut){return wt&&ut}(D<i,e[D]!==0))for(var z=D+1;z<s;z++){for(var W=0,U=D+1;U<this.n;U++)W+=this.V[U][D]*this.V[U][z];W=-W/this.V[D+1][D];for(var O=D+1;O<this.n;O++)this.V[O][z]+=W*this.V[O][D]}for(var X=0;X<this.n;X++)this.V[X][D]=0;this.V[D][D]=1}for(var j=a-1,tt=Math.pow(2,-52),ot=Math.pow(2,-966);a>0;){var V=void 0,Et=void 0;for(V=a-2;V>=-1&&V!==-1;V--)if(Math.abs(e[V])<=ot+tt*(Math.abs(this.s[V])+Math.abs(this.s[V+1]))){e[V]=0;break}if(V===a-2)Et=4;else{var It=void 0;for(It=a-1;It>=V&&It!==V;It--){var kt=(It!==a?Math.abs(e[It]):0)+(It!==V+1?Math.abs(e[It-1]):0);if(Math.abs(this.s[It])<=ot+tt*kt){this.s[It]=0;break}}It===V?Et=3:It===a-1?Et=1:(Et=2,V=It)}switch(V++,Et){case 1:var bt=e[a-2];e[a-2]=0;for(var K=a-2;K>=V;K--){var it=c.hypot(this.s[K],bt),pt=this.s[K]/it,ct=bt/it;this.s[K]=it,K!==V&&(bt=-ct*e[K-1],e[K-1]=pt*e[K-1]);for(var yt=0;yt<this.n;yt++)it=pt*this.V[yt][K]+ct*this.V[yt][a-1],this.V[yt][a-1]=-ct*this.V[yt][K]+pt*this.V[yt][a-1],this.V[yt][K]=it}break;case 2:var Nt=e[V-1];e[V-1]=0;for(var ht=V;ht<a;ht++){var At=c.hypot(this.s[ht],Nt),Ot=this.s[ht]/At,Dt=Nt/At;this.s[ht]=At,Nt=-Dt*e[ht],e[ht]=Ot*e[ht];for(var xt=0;xt<this.m;xt++)At=Ot*this.U[xt][ht]+Dt*this.U[xt][V-1],this.U[xt][V-1]=-Dt*this.U[xt][ht]+Ot*this.U[xt][V-1],this.U[xt][ht]=At}break;case 3:var Ct=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[a-1]),Math.abs(this.s[a-2])),Math.abs(e[a-2])),Math.abs(this.s[V])),Math.abs(e[V])),R=this.s[a-1]/Ct,k=this.s[a-2]/Ct,J=e[a-2]/Ct,Q=this.s[V]/Ct,at=e[V]/Ct,_t=((k+R)*(k-R)+J*J)/2,nt=R*J*(R*J),vt=0;(function(wt,ut){return wt||ut})(_t!==0,nt!==0)&&(vt=Math.sqrt(_t*_t+nt),_t<0&&(vt=-vt),vt=nt/(_t+vt));for(var ft=(Q+R)*(Q-R)+vt,Ut=Q*at,rt=V;rt<a-1;rt++){var mt=c.hypot(ft,Ut),lt=ft/mt,$=Ut/mt;rt!==V&&(e[rt-1]=mt),ft=lt*this.s[rt]+$*e[rt],e[rt]=lt*e[rt]-$*this.s[rt],Ut=$*this.s[rt+1],this.s[rt+1]=lt*this.s[rt+1];for(var gt=0;gt<this.n;gt++)mt=lt*this.V[gt][rt]+$*this.V[gt][rt+1],this.V[gt][rt+1]=-$*this.V[gt][rt]+lt*this.V[gt][rt+1],this.V[gt][rt]=mt;if(lt=ft/(mt=c.hypot(ft,Ut)),$=Ut/mt,this.s[rt]=mt,ft=lt*e[rt]+$*this.s[rt+1],this.s[rt+1]=-$*e[rt]+lt*this.s[rt+1],Ut=$*e[rt+1],e[rt+1]=lt*e[rt+1],rt<this.m-1)for(var Tt=0;Tt<this.m;Tt++)mt=lt*this.U[Tt][rt]+$*this.U[Tt][rt+1],this.U[Tt][rt+1]=-$*this.U[Tt][rt]+lt*this.U[Tt][rt+1],this.U[Tt][rt]=mt}e[a-2]=ft;break;case 4:if(this.s[V]<=0){this.s[V]=this.s[V]<0?-this.s[V]:0;for(var st=0;st<=j;st++)this.V[st][V]=-this.V[st][V]}for(;V<j&&!(this.s[V]>=this.s[V+1]);){var Ft=this.s[V];if(this.s[V]=this.s[V+1],this.s[V+1]=Ft,V<this.n-1)for(var Gt=0;Gt<this.n;Gt++)Ft=this.V[Gt][V+1],this.V[Gt][V+1]=this.V[Gt][V],this.V[Gt][V]=Ft;if(V<this.m-1)for(var Rt=0;Rt<this.m;Rt++)Ft=this.U[Rt][V+1],this.U[Rt][V+1]=this.U[Rt][V],this.U[Rt][V]=Ft;V++}a--}}return{U:this.U,V:this.V,S:this.s}},c.hypot=function(o,s){var e=void 0;return Math.abs(o)>Math.abs(s)?(e=s/o,e=Math.abs(o)*Math.sqrt(1+e*e)):s!=0?(e=o/s,e=Math.abs(s)*Math.sqrt(1+e*e)):e=0,e},L.exports=c},function(L,_,N){var c=function(){function s(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&s(e.prototype,r),n&&s(e,n),e}}(),o=function(){function s(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")})(this,s),this.sequence1=e,this.sequence2=r,this.match_score=n,this.mismatch_penalty=i,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[h][l]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[g][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return c(s,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var i=1;i<this.jMax;i++){var t=[this.sequence1[n-1]===this.sequence2[i-1]?this.grid[n-1][i-1]+this.match_score:this.grid[n-1][i-1]+this.mismatch_penalty,this.grid[n-1][i]+this.gap_penalty,this.grid[n][i-1]+this.gap_penalty],h=this.arrayAllMaxIndexes(t);this.grid[n][i]=t[h[0]],this.tracebackGrid[n][i]=[h.includes(0),h.includes(1),h.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var r=e[0],n=this.tracebackGrid[r.pos[0]][r.pos[1]];n[0]&&e.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),n[1]&&e.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),n[2]&&e.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,r){for(var n=[],i=-1;(i=e.indexOf(r,i+1))!==-1;)n.push(i);return n}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),s}();L.exports=o},function(L,_,N){var c=function(){};c.FDLayout=N(18),c.FDLayoutConstants=N(4),c.FDLayoutEdge=N(19),c.FDLayoutNode=N(20),c.DimensionD=N(21),c.HashMap=N(22),c.HashSet=N(23),c.IGeometry=N(8),c.IMath=N(9),c.Integer=N(10),c.Point=N(12),c.PointD=N(5),c.RandomSeed=N(16),c.RectangleD=N(13),c.Transform=N(17),c.UniqueIDGeneretor=N(14),c.Quicksort=N(25),c.LinkedList=N(11),c.LGraphObject=N(2),c.LGraph=N(6),c.LEdge=N(1),c.LGraphManager=N(7),c.LNode=N(3),c.Layout=N(15),c.LayoutConstants=N(0),c.NeedlemanWunsch=N(27),c.Matrix=N(24),c.SVD=N(26),L.exports=c},function(L,_,N){function c(){this.listeners=[]}var o=c.prototype;o.addListener=function(s,e){this.listeners.push({event:s,callback:e})},o.removeListener=function(s,e){for(var r=this.listeners.length;r>=0;r--){var n=this.listeners[r];n.event===s&&n.callback===e&&this.listeners.splice(r,1)}},o.emit=function(s,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];s===n.event&&n.callback(e)}},L.exports=c}])},_e.exports=T());var T}var Me;function gr(){return Me?Ie.exports:(Me=1,T=function(L){return _={45:(o,s,e)=>{var r={};r.layoutBase=e(551),r.CoSEConstants=e(806),r.CoSEEdge=e(767),r.CoSEGraph=e(880),r.CoSEGraphManager=e(578),r.CoSELayout=e(765),r.CoSENode=e(991),r.ConstraintHandler=e(902),o.exports=r},806:(o,s,e)=>{var r=e(551).FDLayoutConstants;function n(){}for(var i in r)n[i]=r[i];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,o.exports=n},767:(o,s,e)=>{var r=e(551).FDLayoutEdge;function n(t,h,l){r.call(this,t,h,l)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},880:(o,s,e)=>{var r=e(551).LGraph;function n(t,h,l){r.call(this,t,h,l)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},578:(o,s,e)=>{var r=e(551).LGraphManager;function n(t){r.call(this,t)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},765:(o,s,e)=>{var r=e(551).FDLayout,n=e(578),i=e(880),t=e(991),h=e(767),l=e(806),g=e(902),d=e(551).FDLayoutConstants,y=e(551).LayoutConstants,v=e(551).Point,E=e(551).PointD,A=e(551).DimensionD,M=e(551).Layout,F=e(551).Integer,b=e(551).IGeometry,Y=e(551).LGraph,H=e(551).Transform,q=e(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var B in x.prototype=Object.create(r.prototype),r)x[B]=r[B];x.prototype.newGraphManager=function(){var a=new n(this);return this.graphManager=a,a},x.prototype.newGraph=function(a){return new i(null,this.graphManager,a)},x.prototype.newNode=function(a){return new t(this.graphManager,a)},x.prototype.newEdge=function(a){return new h(null,null,a)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return y.DEFAULT_CREATE_BENDS_AS_NEEDED&&(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)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(f){return m.has(f)}),this.graphManager.setAllNodesToApplyGravitation(u));else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(f){return m.has(f)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.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))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return a.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),l.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),l.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,f=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,f),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),m={},u=0;u<a.length;u++){var f=a[u].rect,p=a[u].id;m[p]={id:p,x:f.getCenterX(),y:f.getCenterY(),w:f.width,h:f.height}}return m},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var a=this.getAllNodes(),m=0;m<a.length;m++)a[m].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),m=0;m<a.length;m++)a[m].move()},x.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),u=0;u<m.length;u++){var f=m[u];this.idToNodeMap.set(f.id,f)}var p=function O(X){for(var j,tt=X.getChild().getNodes(),ot=0,V=0;V<tt.length;V++)(j=tt[V]).getChild()==null?a.fixedNodeSet.has(j.id)&&(ot+=100):ot+=O(j);return ot};if(this.constraints.fixedNodeConstraint){for(this.constraints.fixedNodeConstraint.forEach(function(O){a.fixedNodeSet.add(O.nodeId)}),m=this.graphManager.getAllNodes(),u=0;u<m.length;u++)if((f=m[u]).getChild()!=null){var w=p(f);w>0&&(f.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var I=new Map,C=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var G=this.constraints.alignmentConstraint.vertical;for(u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(O){I.set(O,"dummy"+u),a.dummyToNodeForVerticalAlignment.get("dummy"+u).push(O),a.fixedNodeSet.has(O)&&a.fixedNodesOnHorizontal.add("dummy"+u)})}if(this.constraints.alignmentConstraint.horizontal){var S=this.constraints.alignmentConstraint.horizontal;for(u=0;u<S.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),S[u].forEach(function(O){C.set(O,"dummy"+u),a.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(O),a.fixedNodeSet.has(O)&&a.fixedNodesOnVertical.add("dummy"+u)})}}if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var X,j,tt;for(tt=O.length-1;tt>=2*O.length/3;tt--)X=Math.floor(Math.random()*(tt+1)),j=O[tt],O[tt]=O[X],O[X]=j;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(X)||(a.nodesInRelativeHorizontal.push(X),a.nodeToRelativeConstraintMapHorizontal.set(X,[]),a.dummyToNodeForVerticalAlignment.has(X)?a.nodeToTempPositionMapHorizontal.set(X,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(X,a.idToNodeMap.get(X).getCenterX())),a.nodesInRelativeHorizontal.includes(j)||(a.nodesInRelativeHorizontal.push(j),a.nodeToRelativeConstraintMapHorizontal.set(j,[]),a.dummyToNodeForVerticalAlignment.has(j)?a.nodeToTempPositionMapHorizontal.set(j,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(j)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(j,a.idToNodeMap.get(j).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(X).push({right:j,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(j).push({left:X,gap:O.gap})}else{var tt=C.has(O.top)?C.get(O.top):O.top,ot=C.has(O.bottom)?C.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(tt)||(a.nodesInRelativeVertical.push(tt),a.nodeToRelativeConstraintMapVertical.set(tt,[]),a.dummyToNodeForHorizontalAlignment.has(tt)?a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(tt).getCenterY())),a.nodesInRelativeVertical.includes(ot)||(a.nodesInRelativeVertical.push(ot),a.nodeToRelativeConstraintMapVertical.set(ot,[]),a.dummyToNodeForHorizontalAlignment.has(ot)?a.nodeToTempPositionMapVertical.set(ot,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(ot)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(ot,a.idToNodeMap.get(ot).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ot,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(ot).push({top:tt,gap:O.gap})}});else{var P=new Map,D=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;P.has(X)?P.get(X).push(j):P.set(X,[j]),P.has(j)?P.get(j).push(X):P.set(j,[X])}else{var tt=C.has(O.top)?C.get(O.top):O.top,ot=C.has(O.bottom)?C.get(O.bottom):O.bottom;D.has(tt)?D.get(tt).push(ot):D.set(tt,[ot]),D.has(ot)?D.get(ot).push(tt):D.set(ot,[tt])}});var z=function(O,X){var j=[],tt=[],ot=new q,V=new Set,Et=0;return O.forEach(function(It,kt){if(!V.has(kt)){j[Et]=[],tt[Et]=!1;var bt=kt;for(ot.push(bt),V.add(bt),j[Et].push(bt);ot.length!=0;)bt=ot.shift(),X.has(bt)&&(tt[Et]=!0),O.get(bt).forEach(function(K){V.has(K)||(ot.push(K),V.add(K),j[Et].push(K))});Et++}}),{components:j,isFixed:tt}},W=z(P,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=W.components,this.fixedComponentsOnHorizontal=W.isFixed;var U=z(D,a.fixedNodesOnVertical);this.componentsOnVertical=U.components,this.fixedComponentsOnVertical=U.isFixed}}},x.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(U){var O=a.idToNodeMap.get(U.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,u=0;u<m.length;u++){for(var f=0,p=0;p<m[u].length;p++){if(this.fixedNodeSet.has(m[u][p])){f=0;break}f+=this.idToNodeMap.get(m[u][p]).displacementX}var w=f/m[u].length;for(p=0;p<m[u].length;p++)this.idToNodeMap.get(m[u][p]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal){var I=this.constraints.alignmentConstraint.horizontal;for(u=0;u<I.length;u++){var C=0;for(p=0;p<I[u].length;p++){if(this.fixedNodeSet.has(I[u][p])){C=0;break}C+=this.idToNodeMap.get(I[u][p]).displacementY}var G=C/I[u].length;for(p=0;p<I[u].length;p++)this.idToNodeMap.get(I[u][p]).displacementY=G}}}if(this.constraints.relativePlacementConstraint)if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(U){if(!a.fixedNodesOnHorizontal.has(U)){var O=0;O=a.dummyToNodeForVerticalAlignment.has(U)?a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(U)[0]).displacementX:a.idToNodeMap.get(U).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(U).forEach(function(X){var j;X.right?(j=a.nodeToTempPositionMapHorizontal.get(X.right)-a.nodeToTempPositionMapHorizontal.get(U)-O)<X.gap&&(O-=X.gap-j):(j=a.nodeToTempPositionMapHorizontal.get(U)-a.nodeToTempPositionMapHorizontal.get(X.left)+O)<X.gap&&(O+=X.gap-j)}),a.nodeToTempPositionMapHorizontal.set(U,a.nodeToTempPositionMapHorizontal.get(U)+O),a.dummyToNodeForVerticalAlignment.has(U)?a.dummyToNodeForVerticalAlignment.get(U).forEach(function(X){a.idToNodeMap.get(X).displacementX=O}):a.idToNodeMap.get(U).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(U){if(!a.fixedNodesOnHorizontal.has(U)){var O=0;O=a.dummyToNodeForHorizontalAlignment.has(U)?a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(U)[0]).displacementY:a.idToNodeMap.get(U).displacementY,a.nodeToRelativeConstraintMapVertical.get(U).forEach(function(X){var j;X.bottom?(j=a.nodeToTempPositionMapVertical.get(X.bottom)-a.nodeToTempPositionMapVertical.get(U)-O)<X.gap&&(O-=X.gap-j):(j=a.nodeToTempPositionMapVertical.get(U)-a.nodeToTempPositionMapVertical.get(X.top)+O)<X.gap&&(O+=X.gap-j)}),a.nodeToTempPositionMapVertical.set(U,a.nodeToTempPositionMapVertical.get(U)+O),a.dummyToNodeForHorizontalAlignment.has(U)?a.dummyToNodeForHorizontalAlignment.get(U).forEach(function(X){a.idToNodeMap.get(X).displacementY=O}):a.idToNodeMap.get(U).displacementY=O}});else{for(u=0;u<this.componentsOnHorizontal.length;u++){var S=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?this.dummyToNodeForVerticalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementX=0}):this.idToNodeMap.get(S[p]).displacementX=0;else{var P=0,D=0;for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?(P+=(W=this.dummyToNodeForVerticalAlignment.get(S[p])).length*this.idToNodeMap.get(W[0]).displacementX,D+=W.length):(P+=this.idToNodeMap.get(S[p]).displacementX,D++);var z=P/D;for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?this.dummyToNodeForVerticalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementX=z}):this.idToNodeMap.get(S[p]).displacementX=z}}for(u=0;u<this.componentsOnVertical.length;u++)if(S=this.componentsOnVertical[u],this.fixedComponentsOnVertical[u])for(p=0;p<S.length;p++)this.dummyToNodeForHorizontalAlignment.has(S[p])?this.dummyToNodeForHorizontalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementY=0}):this.idToNodeMap.get(S[p]).displacementY=0;else{for(P=0,D=0,p=0;p<S.length;p++){var W;this.dummyToNodeForHorizontalAlignment.has(S[p])?(P+=(W=this.dummyToNodeForHorizontalAlignment.get(S[p])).length*this.idToNodeMap.get(W[0]).displacementY,D+=W.length):(P+=this.idToNodeMap.get(S[p]).displacementY,D++)}for(z=P/D,p=0;p<S.length;p++)this.dummyToNodeForHorizontalAlignment.has(S[p])?this.dummyToNodeForHorizontalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementY=z}):this.idToNodeMap.get(S[p]).displacementY=z}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var a,m,u=[],f=this.graphManager.getGraphs(),p=f.length;for(m=0;m<p;m++)(a=f[m]).updateConnected(),a.isConnected||(u=u.concat(a.getNodes()));return u},x.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var m,u=new Set;for(m=0;m<a.length;m++){var f=a[m];if(!u.has(f)){var p=f.getSource(),w=f.getTarget();if(p==w)f.getBendpoints().push(new E),f.getBendpoints().push(new E),this.createDummyNodesForBendpoints(f),u.add(f);else{var I=[];if(I=(I=I.concat(p.getEdgeListToNode(w))).concat(w.getEdgeListToNode(p)),!u.has(I[0])){var C;if(I.length>1)for(C=0;C<I.length;C++){var G=I[C];G.getBendpoints().push(new E),this.createDummyNodesForBendpoints(G)}I.forEach(function(S){u.add(S)})}}}if(u.size==a.length)break}},x.prototype.positionNodesRadially=function(a){for(var m=new v(0,0),u=Math.ceil(Math.sqrt(a.length)),f=0,p=0,w=0,I=new E(0,0),C=0;C<a.length;C++){C%u==0&&(w=0,p=f,C!=0&&(p+=l.DEFAULT_COMPONENT_SEPERATION),f=0);var G=a[C],S=M.findCenterOfTree(G);m.x=w,m.y=p,(I=x.radialLayout(G,S,m)).y>f&&(f=Math.floor(I.y)),w=Math.floor(I.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new E(y.WORLD_CENTER_X-I.x/2,y.WORLD_CENTER_Y-I.y/2))},x.radialLayout=function(a,m,u){var f=Math.max(this.maxDiagonalInTree(a),l.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,f);var p=Y.calculateBounds(a),w=new H;w.setDeviceOrgX(p.getMinX()),w.setDeviceOrgY(p.getMinY()),w.setWorldOrgX(u.x),w.setWorldOrgY(u.y);for(var I=0;I<a.length;I++)a[I].transform(w);var C=new E(p.getMaxX(),p.getMaxY());return w.inverseTransformPoint(C)},x.branchRadialLayout=function(a,m,u,f,p,w){var I=(f-u+1)/2;I<0&&(I+=180);var C=(I+u)%360*b.TWO_PI/360,G=p*Math.cos(C),S=p*Math.sin(C);a.setCenter(G,S);var P=[],D=(P=P.concat(a.getEdges())).length;m!=null&&D--;for(var z,W=0,U=P.length,O=a.getEdgesBetween(m);O.length>1;){var X=O[0];O.splice(0,1);var j=P.indexOf(X);j>=0&&P.splice(j,1),U--,D--}z=m!=null?(P.indexOf(O[0])+1)%U:0;for(var tt=Math.abs(f-u)/D,ot=z;W!=D;ot=++ot%U){var V=P[ot].getOtherEnd(a);if(V!=m){var Et=(u+W*tt)%360,It=(Et+tt)%360;x.branchRadialLayout(V,a,Et,It,p+w,w),W++}}},x.maxDiagonalInTree=function(a){for(var m=F.MIN_VALUE,u=0;u<a.length;u++){var f=a[u].getDiagonal();f>m&&(m=f)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var a=this,m={};this.memberGroups={},this.idToDummyNode={};for(var u=[],f=this.graphManager.getAllNodes(),p=0;p<f.length;p++){var w=(I=f[p]).getParent();this.getNodeDegreeWithChildren(I)!==0||w.id!=null&&this.getToBeTiled(w)||u.push(I)}for(p=0;p<u.length;p++){var I,C=(I=u[p]).getParent().id;m[C]===void 0&&(m[C]=[]),m[C]=m[C].concat(I)}Object.keys(m).forEach(function(G){if(m[G].length>1){var S="DummyCompound_"+G;a.memberGroups[S]=m[G];var P=m[G][0].getParent(),D=new t(a.graphManager);D.id=S,D.paddingLeft=P.paddingLeft||0,D.paddingRight=P.paddingRight||0,D.paddingBottom=P.paddingBottom||0,D.paddingTop=P.paddingTop||0,a.idToDummyNode[S]=D;var z=a.getGraphManager().add(a.newGraph(),D),W=P.getChild();W.add(D);for(var U=0;U<m[G].length;U++){var O=m[G][U];W.remove(O),z.add(O)}}})},x.prototype.clearCompounds=function(){var a={},m={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)m[this.compoundOrder[u].id]=this.compoundOrder[u],a[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,m)},x.prototype.clearZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var f=a.idToDummyNode[u];if(m[u]=a.tileNodes(a.memberGroups[u],f.paddingLeft+f.paddingRight),f.rect.width=m[u].width,f.rect.height=m[u].height,f.setCenter(m[u].centerX,m[u].centerY),f.labelMarginLeft=0,f.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var p=f.rect.width,w=f.rect.height;f.labelWidth&&(f.labelPosHorizontal=="left"?(f.rect.x-=f.labelWidth,f.setWidth(p+f.labelWidth),f.labelMarginLeft=f.labelWidth):f.labelPosHorizontal=="center"&&f.labelWidth>p?(f.rect.x-=(f.labelWidth-p)/2,f.setWidth(f.labelWidth),f.labelMarginLeft=(f.labelWidth-p)/2):f.labelPosHorizontal=="right"&&f.setWidth(p+f.labelWidth)),f.labelHeight&&(f.labelPosVertical=="top"?(f.rect.y-=f.labelHeight,f.setHeight(w+f.labelHeight),f.labelMarginTop=f.labelHeight):f.labelPosVertical=="center"&&f.labelHeight>w?(f.rect.y-=(f.labelHeight-w)/2,f.setHeight(f.labelHeight),f.labelMarginTop=(f.labelHeight-w)/2):f.labelPosVertical=="bottom"&&f.setHeight(w+f.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var m=this.compoundOrder[a],u=m.id,f=m.paddingLeft,p=m.paddingTop,w=m.labelMarginLeft,I=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],m.rect.x,m.rect.y,f,p,w,I)}},x.prototype.repopulateZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(u){var f=a.idToDummyNode[u],p=f.paddingLeft,w=f.paddingTop,I=f.labelMarginLeft,C=f.labelMarginTop;a.adjustLocations(m[u],f.rect.x,f.rect.y,p,w,I,C)})},x.prototype.getToBeTiled=function(a){var m=a.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var u=a.getChild();if(u==null)return this.toBeTiled[m]=!1,!1;for(var f=u.getNodes(),p=0;p<f.length;p++){var w=f[p];if(this.getNodeDegree(w)>0)return this.toBeTiled[m]=!1,!1;if(w.getChild()!=null){if(!this.getToBeTiled(w))return this.toBeTiled[m]=!1,!1}else this.toBeTiled[w.id]=!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(a){a.id;for(var m=a.getEdges(),u=0,f=0;f<m.length;f++){var p=m[f];p.getSource().id!==p.getTarget().id&&(u+=1)}return u},x.prototype.getNodeDegreeWithChildren=function(a){var m=this.getNodeDegree(a);if(a.getChild()==null)return m;for(var u=a.getChild().getNodes(),f=0;f<u.length;f++){var p=u[f];m+=this.getNodeDegreeWithChildren(p)}return m},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(a){for(var m=0;m<a.length;m++){var u=a[m];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},x.prototype.adjustLocations=function(a,m,u,f,p,w,I){u+=p+I;for(var C=m+=f+w,G=0;G<a.rows.length;G++){var S=a.rows[G];m=C;for(var P=0,D=0;D<S.length;D++){var z=S[D];z.rect.x=m,z.rect.y=u,m+=z.rect.width+a.horizontalPadding,z.rect.height>P&&(P=z.rect.height)}u+=P+a.verticalPadding}},x.prototype.tileCompoundMembers=function(a,m){var u=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(f){var p=m[f];if(u.tiledMemberPack[f]=u.tileNodes(a[f],p.paddingLeft+p.paddingRight),p.rect.width=u.tiledMemberPack[f].width,p.rect.height=u.tiledMemberPack[f].height,p.setCenter(u.tiledMemberPack[f].centerX,u.tiledMemberPack[f].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var w=p.rect.width,I=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(w+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>w?(p.rect.x-=(p.labelWidth-w)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-w)/2):p.labelPosHorizontal=="right"&&p.setWidth(w+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(I+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>I?(p.rect.y-=(p.labelHeight-I)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-I)/2):p.labelPosVertical=="bottom"&&p.setHeight(I+p.labelHeight))}})},x.prototype.tileNodes=function(a,m){var u=this.tileNodesByFavoringDim(a,m,!0),f=this.tileNodesByFavoringDim(a,m,!1),p=this.getOrgRatio(u);return this.getOrgRatio(f)<p?f:u},x.prototype.getOrgRatio=function(a){var m=a.width/a.height;return m<1&&(m=1/m),m},x.prototype.calcIdealRowWidth=function(a,m){var u=l.TILING_PADDING_VERTICAL,f=l.TILING_PADDING_HORIZONTAL,p=a.length,w=0,I=0,C=0;a.forEach(function(U){w+=U.getWidth(),I+=U.getHeight(),U.getWidth()>C&&(C=U.getWidth())});var G,S=w/p,P=I/p,D=Math.pow(u-f,2)+4*(S+f)*(P+u)*p,z=(f-u+Math.sqrt(D))/(2*(S+f));m?(G=Math.ceil(z))==z&&G++:G=Math.floor(z);var W=G*(S+f)-f;return C>W&&(W=C),W+=2*f},x.prototype.tileNodesByFavoringDim=function(a,m,u){var f=l.TILING_PADDING_VERTICAL,p=l.TILING_PADDING_HORIZONTAL,w=l.TILING_COMPARE_BY,I={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:f,horizontalPadding:p,centerX:0,centerY:0};w&&(I.idealRowWidth=this.calcIdealRowWidth(a,u));var C=function(U){return U.rect.width*U.rect.height},G=function(U,O){return C(O)-C(U)};a.sort(function(U,O){var X=G;return I.idealRowWidth?(X=w)(U.id,O.id):X(U,O)});for(var S=0,P=0,D=0;D<a.length;D++)S+=(z=a[D]).getCenterX(),P+=z.getCenterY();for(I.centerX=S/a.length,I.centerY=P/a.length,D=0;D<a.length;D++){var z=a[D];if(I.rows.length==0)this.insertNodeToRow(I,z,0,m);else if(this.canAddHorizontal(I,z.rect.width,z.rect.height)){var W=I.rows.length-1;I.idealRowWidth||(W=this.getShortestRowIndex(I)),this.insertNodeToRow(I,z,W,m)}else this.insertNodeToRow(I,z,I.rows.length,m);this.shiftToLastRow(I)}return I},x.prototype.insertNodeToRow=function(a,m,u,f){var p=f;u==a.rows.length&&(a.rows.push([]),a.rowWidth.push(p),a.rowHeight.push(0));var w=a.rowWidth[u]+m.rect.width;a.rows[u].length>0&&(w+=a.horizontalPadding),a.rowWidth[u]=w,a.width<w&&(a.width=w);var I=m.rect.height;u>0&&(I+=a.verticalPadding);var C=0;I>a.rowHeight[u]&&(C=a.rowHeight[u],a.rowHeight[u]=I,C=a.rowHeight[u]-C),a.height+=C,a.rows[u].push(m)},x.prototype.getShortestRowIndex=function(a){for(var m=-1,u=Number.MAX_VALUE,f=0;f<a.rows.length;f++)a.rowWidth[f]<u&&(m=f,u=a.rowWidth[f]);return m},x.prototype.getLongestRowIndex=function(a){for(var m=-1,u=Number.MIN_VALUE,f=0;f<a.rows.length;f++)a.rowWidth[f]>u&&(m=f,u=a.rowWidth[f]);return m},x.prototype.canAddHorizontal=function(a,m,u){if(a.idealRowWidth){var f=a.rows.length-1;return a.rowWidth[f]+m+a.horizontalPadding<=a.idealRowWidth}var p=this.getShortestRowIndex(a);if(p<0)return!0;var w=a.rowWidth[p];if(w+a.horizontalPadding+m<=a.width)return!0;var I,C,G=0;return a.rowHeight[p]<u&&p>0&&(G=u+a.verticalPadding-a.rowHeight[p]),I=a.width-w>=m+a.horizontalPadding?(a.height+G)/(w+m+a.horizontalPadding):(a.height+G)/a.width,G=u+a.verticalPadding,(C=a.width<m?(a.height+G)/m:(a.height+G)/a.width)<1&&(C=1/C),I<1&&(I=1/I),I<C},x.prototype.shiftToLastRow=function(a){var m=this.getLongestRowIndex(a),u=a.rowWidth.length-1,f=a.rows[m],p=f[f.length-1],w=p.width+a.horizontalPadding;if(a.width-a.rowWidth[u]>w&&m!=u){f.splice(-1,1),a.rows[u].push(p),a.rowWidth[m]=a.rowWidth[m]-w,a.rowWidth[u]=a.rowWidth[u]+w,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var I=Number.MIN_VALUE,C=0;C<f.length;C++)f[C].height>I&&(I=f[C].height);m>0&&(I+=a.verticalPadding);var G=a.rowHeight[m]+a.rowHeight[u];a.rowHeight[m]=I,a.rowHeight[u]<p.height+a.verticalPadding&&(a.rowHeight[u]=p.height+a.verticalPadding);var S=a.rowHeight[m]+a.rowHeight[u];a.height+=S-G,this.shiftToLastRow(a)}},x.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var a,m=[],u=!0;u;){var f=this.graphManager.getAllNodes(),p=[];u=!1;for(var w=0;w<f.length;w++)if((a=f[w]).getEdges().length==1&&!a.getEdges()[0].isInterGraph&&a.getChild()==null){if(l.PURE_INCREMENTAL){var I=a.getEdges()[0].getOtherEnd(a),C=new A(a.getCenterX()-I.getCenterX(),a.getCenterY()-I.getCenterY());p.push([a,a.getEdges()[0],a.getOwner(),C])}else p.push([a,a.getEdges()[0],a.getOwner()]);u=!0}if(u==1){for(var G=[],S=0;S<p.length;S++)p[S][0].getEdges().length==1&&(G.push(p[S]),p[S][0].getOwner().remove(p[S][0]));m.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=m},x.prototype.growTree=function(a){for(var m,u=a[a.length-1],f=0;f<u.length;f++)m=u[f],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(a){var m,u,f=a[0];if(u=f==a[1].source?a[1].target:a[1].source,l.PURE_INCREMENTAL)f.setCenter(u.getCenterX()+a[3].getWidth(),u.getCenterY()+a[3].getHeight());else{var p=u.startX,w=u.finishX,I=u.startY,C=u.finishY,G=[0,0,0,0];if(I>0)for(var S=p;S<=w;S++)G[0]+=this.grid[S][I-1].length+this.grid[S][I].length-1;if(w<this.grid.length-1)for(S=I;S<=C;S++)G[1]+=this.grid[w+1][S].length+this.grid[w][S].length-1;if(C<this.grid[0].length-1)for(S=p;S<=w;S++)G[2]+=this.grid[S][C+1].length+this.grid[S][C].length-1;if(p>0)for(S=I;S<=C;S++)G[3]+=this.grid[p-1][S].length+this.grid[p][S].length-1;for(var P,D,z=F.MAX_VALUE,W=0;W<G.length;W++)G[W]<z?(z=G[W],P=1,D=W):G[W]==z&&P++;if(P==3&&z==0)G[0]==0&&G[1]==0&&G[2]==0?m=1:G[0]==0&&G[1]==0&&G[3]==0?m=0:G[0]==0&&G[2]==0&&G[3]==0?m=3:G[1]==0&&G[2]==0&&G[3]==0&&(m=2);else if(P==2&&z==0){var U=Math.floor(2*Math.random());m=G[0]==0&&G[1]==0?U==0?0:1:G[0]==0&&G[2]==0?U==0?0:2:G[0]==0&&G[3]==0?U==0?0:3:G[1]==0&&G[2]==0?U==0?1:2:G[1]==0&&G[3]==0?U==0?1:3:U==0?2:3}else m=P==4&&z==0?U=Math.floor(4*Math.random()):D;m==0?f.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-d.DEFAULT_EDGE_LENGTH-f.getHeight()/2):m==1?f.setCenter(u.getCenterX()+u.getWidth()/2+d.DEFAULT_EDGE_LENGTH+f.getWidth()/2,u.getCenterY()):m==2?f.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+d.DEFAULT_EDGE_LENGTH+f.getHeight()/2):f.setCenter(u.getCenterX()-u.getWidth()/2-d.DEFAULT_EDGE_LENGTH-f.getWidth()/2,u.getCenterY())}},o.exports=x},991:(o,s,e)=>{var r=e(551).FDLayoutNode,n=e(551).IMath;function i(h,l,g,d){r.call(this,h,l,g,d)}for(var t in i.prototype=Object.create(r.prototype),r)i[t]=r[t];i.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},i.prototype.propogateDisplacementToChildren=function(h,l){for(var g,d=this.getChild().getNodes(),y=0;y<d.length;y++)(g=d[y]).getChild()==null?(g.displacementX+=h,g.displacementY+=l):g.propogateDisplacementToChildren(h,l)},i.prototype.move=function(){var h=this.graphManager.getLayout();this.child!=null&&this.child.getNodes().length!=0||(this.moveBy(this.displacementX,this.displacementY),h.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.setPred1=function(h){this.pred1=h},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(h){this.next=h},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(h){this.processed=h},i.prototype.isProcessed=function(){return processed},o.exports=i},902:(o,s,e)=>{function r(g){if(Array.isArray(g)){for(var d=0,y=Array(g.length);d<g.length;d++)y[d]=g[d];return y}return Array.from(g)}var n=e(806),i=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function l(){}l.handleConstraints=function(g){var d={};d.fixedNodeConstraint=g.constraints.fixedNodeConstraint,d.alignmentConstraint=g.constraints.alignmentConstraint,d.relativePlacementConstraint=g.constraints.relativePlacementConstraint;for(var y=new Map,v=new Map,E=[],A=[],M=g.getAllNodes(),F=0,b=0;b<M.length;b++){var Y=M[b];Y.getChild()==null&&(v.set(Y.id,F++),E.push(Y.getCenterX()),A.push(Y.getCenterY()),y.set(Y.id,Y))}d.relativePlacementConstraint&&d.relativePlacementConstraint.forEach(function(R){R.gap||R.gap==0||(R.left?R.gap=n.DEFAULT_EDGE_LENGTH+y.get(R.left).getWidth()/2+y.get(R.right).getWidth()/2:R.gap=n.DEFAULT_EDGE_LENGTH+y.get(R.top).getHeight()/2+y.get(R.bottom).getHeight()/2)});var H=function(R){var k=0,J=0;return R.forEach(function(Q){k+=E[v.get(Q)],J+=A[v.get(Q)]}),{x:k/R.size,y:J/R.size}},q=function(R,k,J,Q,at){var _t=new Map;R.forEach(function(lt,$){_t.set($,0)}),R.forEach(function(lt,$){lt.forEach(function(gt){_t.set(gt.id,_t.get(gt.id)+1)})});var nt=new Map,vt=new Map,ft=new i;_t.forEach(function(lt,$){lt==0?(ft.push($),J||(k=="horizontal"?nt.set($,v.has($)?E[v.get($)]:Q.get($)):nt.set($,v.has($)?A[v.get($)]:Q.get($)))):nt.set($,Number.NEGATIVE_INFINITY),J&&vt.set($,new Set([$]))}),J&&at.forEach(function(lt){var $=[];if(lt.forEach(function(st){J.has(st)&&$.push(st)}),$.length>0){var gt=0;$.forEach(function(st){k=="horizontal"?(nt.set(st,v.has(st)?E[v.get(st)]:Q.get(st)),gt+=nt.get(st)):(nt.set(st,v.has(st)?A[v.get(st)]:Q.get(st)),gt+=nt.get(st))}),gt/=$.length,lt.forEach(function(st){J.has(st)||nt.set(st,gt)})}else{var Tt=0;lt.forEach(function(st){Tt+=k=="horizontal"?v.has(st)?E[v.get(st)]:Q.get(st):v.has(st)?A[v.get(st)]:Q.get(st)}),Tt/=lt.length,lt.forEach(function(st){nt.set(st,Tt)})}});for(var Ut=function(){var lt=ft.shift();R.get(lt).forEach(function($){if(nt.get($.id)<nt.get(lt)+$.gap)if(J&&J.has($.id)){var gt=void 0;if(gt=k=="horizontal"?v.has($.id)?E[v.get($.id)]:Q.get($.id):v.has($.id)?A[v.get($.id)]:Q.get($.id),nt.set($.id,gt),gt<nt.get(lt)+$.gap){var Tt=nt.get(lt)+$.gap-gt;vt.get(lt).forEach(function(st){nt.set(st,nt.get(st)-Tt)})}}else nt.set($.id,nt.get(lt)+$.gap);_t.set($.id,_t.get($.id)-1),_t.get($.id)==0&&ft.push($.id),J&&vt.set($.id,function(st,Ft){var Gt=new Set(st),Rt=!0,wt=!1,ut=void 0;try{for(var Pt,Mt=Ft[Symbol.iterator]();!(Rt=(Pt=Mt.next()).done);Rt=!0){var Ht=Pt.value;Gt.add(Ht)}}catch(Vt){wt=!0,ut=Vt}finally{try{!Rt&&Mt.return&&Mt.return()}finally{if(wt)throw ut}}return Gt}(vt.get(lt),vt.get($.id)))})};ft.length!=0;)Ut();if(J){var rt=new Set;R.forEach(function(lt,$){lt.length==0&&rt.add($)});var mt=[];vt.forEach(function(lt,$){if(rt.has($)){var gt=!1,Tt=!0,st=!1,Ft=void 0;try{for(var Gt,Rt=lt[Symbol.iterator]();!(Tt=(Gt=Rt.next()).done);Tt=!0){var wt=Gt.value;J.has(wt)&&(gt=!0)}}catch(Mt){st=!0,Ft=Mt}finally{try{!Tt&&Rt.return&&Rt.return()}finally{if(st)throw Ft}}if(!gt){var ut=!1,Pt=void 0;mt.forEach(function(Mt,Ht){Mt.has([].concat(r(lt))[0])&&(ut=!0,Pt=Ht)}),ut?lt.forEach(function(Mt){mt[Pt].add(Mt)}):mt.push(new Set(lt))}}}),mt.forEach(function(lt,$){var gt=Number.POSITIVE_INFINITY,Tt=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Ft=Number.NEGATIVE_INFINITY,Gt=!0,Rt=!1,wt=void 0;try{for(var ut,Pt=lt[Symbol.iterator]();!(Gt=(ut=Pt.next()).done);Gt=!0){var Mt=ut.value,Ht=void 0;Ht=k=="horizontal"?v.has(Mt)?E[v.get(Mt)]:Q.get(Mt):v.has(Mt)?A[v.get(Mt)]:Q.get(Mt);var Vt=nt.get(Mt);Ht<gt&&(gt=Ht),Ht>st&&(st=Ht),Vt<Tt&&(Tt=Vt),Vt>Ft&&(Ft=Vt)}}catch(jt){Rt=!0,wt=jt}finally{try{!Gt&&Pt.return&&Pt.return()}finally{if(Rt)throw wt}}var oe=(gt+st)/2-(Tt+Ft)/2,Kt=!0,qt=!1,$t=void 0;try{for(var Zt,Bt=lt[Symbol.iterator]();!(Kt=(Zt=Bt.next()).done);Kt=!0){var ee=Zt.value;nt.set(ee,nt.get(ee)+oe)}}catch(jt){qt=!0,$t=jt}finally{try{!Kt&&Bt.return&&Bt.return()}finally{if(qt)throw $t}}})}return nt},x=function(R){var k=0,J=0,Q=0,at=0;if(R.forEach(function(ft){ft.left?E[v.get(ft.left)]-E[v.get(ft.right)]>=0?k++:J++:A[v.get(ft.top)]-A[v.get(ft.bottom)]>=0?Q++:at++}),k>J&&Q>at)for(var _t=0;_t<v.size;_t++)E[_t]=-1*E[_t],A[_t]=-1*A[_t];else if(k>J)for(var nt=0;nt<v.size;nt++)E[nt]=-1*E[nt];else if(Q>at)for(var vt=0;vt<v.size;vt++)A[vt]=-1*A[vt]},B=function(R){var k=[],J=new i,Q=new Set,at=0;return R.forEach(function(_t,nt){if(!Q.has(nt)){k[at]=[];var vt=nt;for(J.push(vt),Q.add(vt),k[at].push(vt);J.length!=0;)vt=J.shift(),R.get(vt).forEach(function(ft){Q.has(ft.id)||(J.push(ft.id),Q.add(ft.id),k[at].push(ft.id))});at++}}),k},a=function(R){var k=new Map;return R.forEach(function(J,Q){k.set(Q,[])}),R.forEach(function(J,Q){J.forEach(function(at){k.get(Q).push(at),k.get(at.id).push({id:Q,gap:at.gap,direction:at.direction})})}),k},m=function(R){var k=new Map;return R.forEach(function(J,Q){k.set(Q,[])}),R.forEach(function(J,Q){J.forEach(function(at){k.get(at.id).push({id:Q,gap:at.gap,direction:at.direction})})}),k},u=[],f=[],p=!1,w=!1,I=new Set,C=new Map,G=new Map,S=[];if(d.fixedNodeConstraint&&d.fixedNodeConstraint.forEach(function(R){I.add(R.nodeId)}),d.relativePlacementConstraint&&(d.relativePlacementConstraint.forEach(function(R){R.left?(C.has(R.left)?C.get(R.left).push({id:R.right,gap:R.gap,direction:"horizontal"}):C.set(R.left,[{id:R.right,gap:R.gap,direction:"horizontal"}]),C.has(R.right)||C.set(R.right,[])):(C.has(R.top)?C.get(R.top).push({id:R.bottom,gap:R.gap,direction:"vertical"}):C.set(R.top,[{id:R.bottom,gap:R.gap,direction:"vertical"}]),C.has(R.bottom)||C.set(R.bottom,[]))}),G=a(C),S=B(G)),n.TRANSFORM_ON_CONSTRAINT_HANDLING){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>1)d.fixedNodeConstraint.forEach(function(R,k){u[k]=[R.position.x,R.position.y],f[k]=[E[v.get(R.nodeId)],A[v.get(R.nodeId)]]}),p=!0;else if(d.alignmentConstraint)(function(){var R=0;if(d.alignmentConstraint.vertical){for(var k=d.alignmentConstraint.vertical,J=function(vt){var ft=new Set;k[vt].forEach(function(mt){ft.add(mt)});var Ut=new Set([].concat(r(ft)).filter(function(mt){return I.has(mt)})),rt=void 0;rt=Ut.size>0?E[v.get(Ut.values().next().value)]:H(ft).x,k[vt].forEach(function(mt){u[R]=[rt,A[v.get(mt)]],f[R]=[E[v.get(mt)],A[v.get(mt)]],R++})},Q=0;Q<k.length;Q++)J(Q);p=!0}if(d.alignmentConstraint.horizontal){for(var at=d.alignmentConstraint.horizontal,_t=function(vt){var ft=new Set;at[vt].forEach(function(mt){ft.add(mt)});var Ut=new Set([].concat(r(ft)).filter(function(mt){return I.has(mt)})),rt=void 0;rt=Ut.size>0?E[v.get(Ut.values().next().value)]:H(ft).y,at[vt].forEach(function(mt){u[R]=[E[v.get(mt)],rt],f[R]=[E[v.get(mt)],A[v.get(mt)]],R++})},nt=0;nt<at.length;nt++)_t(nt);p=!0}d.relativePlacementConstraint&&(w=!0)})();else if(d.relativePlacementConstraint){for(var P=0,D=0,z=0;z<S.length;z++)S[z].length>P&&(P=S[z].length,D=z);if(P<G.size/2)x(d.relativePlacementConstraint),p=!1,w=!1;else{var W=new Map,U=new Map,O=[];S[D].forEach(function(R){C.get(R).forEach(function(k){k.direction=="horizontal"?(W.has(R)?W.get(R).push(k):W.set(R,[k]),W.has(k.id)||W.set(k.id,[]),O.push({left:R,right:k.id})):(U.has(R)?U.get(R).push(k):U.set(R,[k]),U.has(k.id)||U.set(k.id,[]),O.push({top:R,bottom:k.id}))})}),x(O),w=!1;var X=q(W,"horizontal"),j=q(U,"vertical");S[D].forEach(function(R,k){f[k]=[E[v.get(R)],A[v.get(R)]],u[k]=[],X.has(R)?u[k][0]=X.get(R):u[k][0]=E[v.get(R)],j.has(R)?u[k][1]=j.get(R):u[k][1]=A[v.get(R)]}),p=!0}}if(p){for(var tt,ot=t.transpose(u),V=t.transpose(f),Et=0;Et<ot.length;Et++)ot[Et]=t.multGamma(ot[Et]),V[Et]=t.multGamma(V[Et]);var It=t.multMat(ot,t.transpose(V)),kt=h.svd(It);tt=t.multMat(kt.V,t.transpose(kt.U));for(var bt=0;bt<v.size;bt++){var K=[E[bt],A[bt]],it=[tt[0][0],tt[1][0]],pt=[tt[0][1],tt[1][1]];E[bt]=t.dotProduct(K,it),A[bt]=t.dotProduct(K,pt)}w&&x(d.relativePlacementConstraint)}}if(n.ENFORCE_CONSTRAINTS){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>0){var ct={x:0,y:0};d.fixedNodeConstraint.forEach(function(R,k){var J,Q,at={x:E[v.get(R.nodeId)],y:A[v.get(R.nodeId)]},_t=R.position,nt=(Q=at,{x:(J=_t).x-Q.x,y:J.y-Q.y});ct.x+=nt.x,ct.y+=nt.y}),ct.x/=d.fixedNodeConstraint.length,ct.y/=d.fixedNodeConstraint.length,E.forEach(function(R,k){E[k]+=ct.x}),A.forEach(function(R,k){A[k]+=ct.y}),d.fixedNodeConstraint.forEach(function(R){E[v.get(R.nodeId)]=R.position.x,A[v.get(R.nodeId)]=R.position.y})}if(d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var yt=d.alignmentConstraint.vertical,Nt=function(R){var k=new Set;yt[R].forEach(function(at){k.add(at)});var J=new Set([].concat(r(k)).filter(function(at){return I.has(at)})),Q=void 0;Q=J.size>0?E[v.get(J.values().next().value)]:H(k).x,k.forEach(function(at){I.has(at)||(E[v.get(at)]=Q)})},ht=0;ht<yt.length;ht++)Nt(ht);if(d.alignmentConstraint.horizontal)for(var At=d.alignmentConstraint.horizontal,Ot=function(R){var k=new Set;At[R].forEach(function(at){k.add(at)});var J=new Set([].concat(r(k)).filter(function(at){return I.has(at)})),Q=void 0;Q=J.size>0?A[v.get(J.values().next().value)]:H(k).y,k.forEach(function(at){I.has(at)||(A[v.get(at)]=Q)})},Dt=0;Dt<At.length;Dt++)Ot(Dt)}d.relativePlacementConstraint&&function(){var R=new Map,k=new Map,J=new Map,Q=new Map,at=new Map,_t=new Map,nt=new Set,vt=new Set;if(I.forEach(function(et){nt.add(et),vt.add(et)}),d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var ft=d.alignmentConstraint.vertical,Ut=function(et){J.set("dummy"+et,[]),ft[et].forEach(function(Lt){R.set(Lt,"dummy"+et),J.get("dummy"+et).push(Lt),I.has(Lt)&&nt.add("dummy"+et)}),at.set("dummy"+et,E[v.get(ft[et][0])])},rt=0;rt<ft.length;rt++)Ut(rt);if(d.alignmentConstraint.horizontal)for(var mt=d.alignmentConstraint.horizontal,lt=function(et){Q.set("dummy"+et,[]),mt[et].forEach(function(Lt){k.set(Lt,"dummy"+et),Q.get("dummy"+et).push(Lt),I.has(Lt)&&vt.add("dummy"+et)}),_t.set("dummy"+et,A[v.get(mt[et][0])])},$=0;$<mt.length;$++)lt($)}var gt=new Map,Tt=new Map,st=function(et){C.get(et).forEach(function(Lt){var Xt=void 0,zt=void 0;Lt.direction=="horizontal"?(Xt=R.get(et)?R.get(et):et,zt=R.get(Lt.id)?{id:R.get(Lt.id),gap:Lt.gap,direction:Lt.direction}:Lt,gt.has(Xt)?gt.get(Xt).push(zt):gt.set(Xt,[zt]),gt.has(zt.id)||gt.set(zt.id,[])):(Xt=k.get(et)?k.get(et):et,zt=k.get(Lt.id)?{id:k.get(Lt.id),gap:Lt.gap,direction:Lt.direction}:Lt,Tt.has(Xt)?Tt.get(Xt).push(zt):Tt.set(Xt,[zt]),Tt.has(zt.id)||Tt.set(zt.id,[]))})},Ft=!0,Gt=!1,Rt=void 0;try{for(var wt,ut=C.keys()[Symbol.iterator]();!(Ft=(wt=ut.next()).done);Ft=!0)st(wt.value)}catch(et){Gt=!0,Rt=et}finally{try{!Ft&&ut.return&&ut.return()}finally{if(Gt)throw Rt}}var Pt=a(gt),Mt=a(Tt),Ht=B(Pt),Vt=B(Mt),oe=m(gt),Kt=m(Tt),qt=[],$t=[];Ht.forEach(function(et,Lt){qt[Lt]=[],et.forEach(function(Xt){oe.get(Xt).length==0&&qt[Lt].push(Xt)})}),Vt.forEach(function(et,Lt){$t[Lt]=[],et.forEach(function(Xt){Kt.get(Xt).length==0&&$t[Lt].push(Xt)})});var Zt=q(gt,"horizontal",nt,at,qt),Bt=q(Tt,"vertical",vt,_t,$t),ee=function(et){J.get(et)?J.get(et).forEach(function(Lt){E[v.get(Lt)]=Zt.get(et)}):E[v.get(et)]=Zt.get(et)},jt=!0,fe=!1,me=void 0;try{for(var ve,ie=Zt.keys()[Symbol.iterator]();!(jt=(ve=ie.next()).done);jt=!0)ee(ve.value)}catch(et){fe=!0,me=et}finally{try{!jt&&ie.return&&ie.return()}finally{if(fe)throw me}}var We=function(et){Q.get(et)?Q.get(et).forEach(function(Lt){A[v.get(Lt)]=Bt.get(et)}):A[v.get(et)]=Bt.get(et)},ae=!0,ye=!1,Ee=void 0;try{for(var Ne,se=Bt.keys()[Symbol.iterator]();!(ae=(Ne=se.next()).done);ae=!0)We(Ne.value)}catch(et){ye=!0,Ee=et}finally{try{!ae&&se.return&&se.return()}finally{if(ye)throw Ee}}}()}for(var xt=0;xt<M.length;xt++){var Ct=M[xt];Ct.getChild()==null&&Ct.setCenter(E[v.get(Ct.id)],A[v.get(Ct.id)])}},o.exports=l},551:o=>{o.exports=L}},N={},c=function o(s){var e=N[s];if(e!==void 0)return e.exports;var r=N[s]={exports:{}};return _[s](r,r.exports,o),r.exports}(45),c;var _,N,c},Ie.exports=T(cr()));var T}var xe,Ce,Oe,ce;const ur=lr(xe?Le.exports:(xe=1,Le.exports=(Ce=gr(),Oe={658:T=>{T.exports=Object.assign!=null?Object.assign.bind(Object):function(L){for(var _=arguments.length,N=Array(_>1?_-1:0),c=1;c<_;c++)N[c-1]=arguments[c];return N.forEach(function(o){Object.keys(o).forEach(function(s){return L[s]=o[s]})}),L}},548:(T,L,_)=>{var N=function(s,e){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return function(r,n){var i=[],t=!0,h=!1,l=void 0;try{for(var g,d=r[Symbol.iterator]();!(t=(g=d.next()).done)&&(i.push(g.value),!n||i.length!==n);t=!0);}catch(y){h=!0,l=y}finally{try{!t&&d.return&&d.return()}finally{if(h)throw l}}return i}(s,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=_(140).layoutBase.LinkedList,o={getTopMostNodes:function(s){for(var e={},r=0;r<s.length;r++)e[s[r].id()]=!0;var n=s.filter(function(i,t){typeof i=="number"&&(i=t);for(var h=i.parent()[0];h!=null;){if(e[h.id()])return!1;h=h.parent()[0]}return!0});return n},connectComponents:function(s,e,r,n){var i=new c,t=new Set,h=[],l=void 0,g=void 0,d=void 0,y=!1,v=1,E=[],A=[],M=function(){var F=s.collection();A.push(F);var b=r[0],Y=s.collection();Y.merge(b).merge(b.descendants().intersection(e)),h.push(b),Y.forEach(function(x){i.push(x),t.add(x),F.merge(x)});for(var H=function(){b=i.shift();var x=s.collection();b.neighborhood().nodes().forEach(function(m){e.intersection(b.edgesWith(m)).length>0&&x.merge(m)});for(var B=0;B<x.length;B++){var a=x[B];(l=r.intersection(a.union(a.ancestors())))==null||t.has(l[0])||l.union(l.descendants()).forEach(function(m){i.push(m),t.add(m),F.merge(m),r.has(m)&&h.push(m)})}};i.length!=0;)H();if(F.forEach(function(x){e.intersection(x.connectedEdges()).forEach(function(B){F.has(B.source())&&F.has(B.target())&&F.merge(B)})}),h.length==r.length&&(y=!0),!y||y&&v>1){g=h[0],d=g.connectedEdges().length,h.forEach(function(x){x.connectedEdges().length<d&&(d=x.connectedEdges().length,g=x)}),E.push(g.id());var q=s.collection();q.merge(h[0]),h.forEach(function(x){q.merge(x)}),h=[],r=r.difference(q),v++}};do M();while(!y);return n&&E.length>0&&n.set("dummy"+(n.size+1),E),A},relocateComponent:function(s,e,r){if(!r.fixedNodeConstraint){var n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(r.quality=="draft"){var l=!0,g=!1,d=void 0;try{for(var y,v=e.nodeIndexes[Symbol.iterator]();!(l=(y=v.next()).done);l=!0){var E=y.value,A=N(E,2),M=A[0],F=A[1],b=r.cy.getElementById(M);if(b){var Y=b.boundingBox(),H=e.xCoords[F]-Y.w/2,q=e.xCoords[F]+Y.w/2,x=e.yCoords[F]-Y.h/2,B=e.yCoords[F]+Y.h/2;H<n&&(n=H),q>i&&(i=q),x<t&&(t=x),B>h&&(h=B)}}}catch(p){g=!0,d=p}finally{try{!l&&v.return&&v.return()}finally{if(g)throw d}}var a=s.x-(i+n)/2,m=s.y-(h+t)/2;e.xCoords=e.xCoords.map(function(p){return p+a}),e.yCoords=e.yCoords.map(function(p){return p+m})}else{Object.keys(e).forEach(function(p){var w=e[p],I=w.getRect().x,C=w.getRect().x+w.getRect().width,G=w.getRect().y,S=w.getRect().y+w.getRect().height;I<n&&(n=I),C>i&&(i=C),G<t&&(t=G),S>h&&(h=S)});var u=s.x-(i+n)/2,f=s.y-(h+t)/2;Object.keys(e).forEach(function(p){var w=e[p];w.setCenter(w.getCenterX()+u,w.getCenterY()+f)})}}},calcBoundingBox:function(s,e,r,n){for(var i=Number.MAX_SAFE_INTEGER,t=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,g=void 0,d=void 0,y=void 0,v=void 0,E=s.descendants().not(":parent"),A=E.length,M=0;M<A;M++){var F=E[M];i>(g=e[n.get(F.id())]-F.width()/2)&&(i=g),t<(d=e[n.get(F.id())]+F.width()/2)&&(t=d),h>(y=r[n.get(F.id())]-F.height()/2)&&(h=y),l<(v=r[n.get(F.id())]+F.height()/2)&&(l=v)}var b={};return b.topLeftX=i,b.topLeftY=h,b.width=t-i,b.height=l-h,b},calcParentsWithoutChildren:function(s,e){var r=s.collection();return e.nodes(":parent").forEach(function(n){var i=!1;n.children().forEach(function(t){t.css("display")!="none"&&(i=!0)}),i||r.merge(n)}),r}};T.exports=o},816:(T,L,_)=>{var N=_(548),c=_(140).CoSELayout,o=_(140).CoSENode,s=_(140).layoutBase.PointD,e=_(140).layoutBase.DimensionD,r=_(140).layoutBase.LayoutConstants,n=_(140).layoutBase.FDLayoutConstants,i=_(140).CoSEConstants;T.exports={coseLayout:function(t,h){var l=t.cy,g=t.eles,d=g.nodes(),y=g.edges(),v=void 0,E=void 0,A=void 0,M={};t.randomize&&(v=h.nodeIndexes,E=h.xCoords,A=h.yCoords);var F=function(x){return typeof x=="function"},b=function(x,B){return F(x)?x(B):x},Y=N.calcParentsWithoutChildren(l,g);t.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),t.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=t.gravity),t.numIter!=null&&(i.MAX_ITERATIONS=n.MAX_ITERATIONS=t.numIter),t.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),t.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),t.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),t.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),t.tilingCompareBy!=null&&(i.TILING_COMPARE_BY=t.tilingCompareBy),t.quality=="proof"?r.QUALITY=2:r.QUALITY=0,i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!t.randomize,i.ANIMATE=n.ANIMATE=r.ANIMATE=t.animate,i.TILE=t.tile,i.TILING_PADDING_VERTICAL=typeof t.tilingPaddingVertical=="function"?t.tilingPaddingVertical.call():t.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof t.tilingPaddingHorizontal=="function"?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!0,i.PURE_INCREMENTAL=!t.randomize,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,t.step=="transformed"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!1),t.step=="enforced"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!1),t.step=="cose"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!0),t.step=="all"&&(t.randomize?i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?i.TREE_REDUCTION_ON_INCREMENTAL=!1:i.TREE_REDUCTION_ON_INCREMENTAL=!0;var H=new c,q=H.newGraphManager();return function x(B,a,m,u){for(var f=a.length,p=0;p<f;p++){var w=a[p],I=null;w.intersection(Y).length==0&&(I=w.children());var C=void 0,G=w.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null)if(u.randomize)if(w.isParent()){var S=N.calcBoundingBox(w,E,A,v);C=w.intersection(Y).length==0?B.add(new o(m.graphManager,new s(S.topLeftX,S.topLeftY),new e(S.width,S.height))):B.add(new o(m.graphManager,new s(S.topLeftX,S.topLeftY),new e(parseFloat(G.w),parseFloat(G.h))))}else C=B.add(new o(m.graphManager,new s(E[v.get(w.id())]-G.w/2,A[v.get(w.id())]-G.h/2),new e(parseFloat(G.w),parseFloat(G.h))));else C=B.add(new o(m.graphManager,new s(w.position("x")-G.w/2,w.position("y")-G.h/2),new e(parseFloat(G.w),parseFloat(G.h))));else C=B.add(new o(this.graphManager));C.id=w.data("id"),C.nodeRepulsion=b(u.nodeRepulsion,w),C.paddingLeft=parseInt(w.css("padding")),C.paddingTop=parseInt(w.css("padding")),C.paddingRight=parseInt(w.css("padding")),C.paddingBottom=parseInt(w.css("padding")),u.nodeDimensionsIncludeLabels&&(C.labelWidth=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,C.labelHeight=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,C.labelPosVertical=w.css("text-valign"),C.labelPosHorizontal=w.css("text-halign")),M[w.data("id")]=C,isNaN(C.rect.x)&&(C.rect.x=0),isNaN(C.rect.y)&&(C.rect.y=0),I!=null&&I.length>0&&x(m.getGraphManager().add(m.newGraph(),C),I,m,u)}}(q.addRoot(),N.getTopMostNodes(d),H,t),function(x,B,a){for(var m=0,u=0,f=0;f<a.length;f++){var p=a[f],w=M[p.data("source")],I=M[p.data("target")];if(w&&I&&w!==I&&w.getEdgesBetween(I).length==0){var C=B.add(x.newEdge(),w,I);C.id=p.id(),C.idealLength=b(t.idealEdgeLength,p),C.edgeElasticity=b(t.edgeElasticity,p),m+=C.idealLength,u++}}t.idealEdgeLength!=null&&(u>0?i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=m/u:F(t.idealEdgeLength)?i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=50:i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,i.MIN_REPULSION_DIST=n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,i.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH)}(H,q,y),function(x,B){B.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=B.fixedNodeConstraint),B.alignmentConstraint&&(x.constraints.alignmentConstraint=B.alignmentConstraint),B.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=B.relativePlacementConstraint)}(H,t),H.runLayout(),M}}},212:(T,L,_)=>{var N=function(){function i(t,h){for(var l=0;l<h.length;l++){var g=h[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(t,g.key,g)}}return function(t,h,l){return h&&i(t.prototype,h),l&&i(t,l),t}}(),c=_(658),o=_(548),s=_(657).spectralLayout,e=_(816).coseLayout,r=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(i){return 4500},idealEdgeLength:function(i){return 50},edgeElasticity:function(i){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),n=function(){function i(t){(function(h,l){if(!(h instanceof l))throw new TypeError("Cannot call a class as a function")})(this,i),this.options=c({},r,t)}return N(i,[{key:"run",value:function(){var t=this.options,h=t.cy,l=t.eles,g=[],d=[],y=void 0,v=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&t.fixedNodeConstraint.length!=0||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&t.alignmentConstraint.vertical.length!=0||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&t.alignmentConstraint.horizontal.length!=0||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&t.relativePlacementConstraint.length!=0||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var E=void 0,A=!1;if(h.layoutUtilities&&t.packComponents&&((E=h.layoutUtilities("get"))||(E=h.layoutUtilities()),A=!0),l.nodes().length>0)if(A){var M=o.getTopMostNodes(t.eles.nodes());if((y=o.connectComponents(h,t.eles,M)).forEach(function(P){var D=P.boundingBox();v.push({x:D.x1+D.w/2,y:D.y1+D.h/2})}),t.randomize&&y.forEach(function(P){t.eles=P,g.push(s(t))}),t.quality=="default"||t.quality=="proof"){var F=h.collection();if(t.tile){var b=new Map,Y=0,H={nodeIndexes:b,xCoords:[],yCoords:[]},q=[];if(y.forEach(function(P,D){P.edges().length==0&&(P.nodes().forEach(function(z,W){F.merge(P.nodes()[W]),z.isParent()||(H.nodeIndexes.set(P.nodes()[W].id(),Y++),H.xCoords.push(P.nodes()[0].position().x),H.yCoords.push(P.nodes()[0].position().y))}),q.push(D))}),F.length>1){var x=F.boundingBox();v.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),y.push(F),g.push(H);for(var B=q.length-1;B>=0;B--)y.splice(q[B],1),g.splice(q[B],1),v.splice(q[B],1)}}y.forEach(function(P,D){t.eles=P,d.push(e(t,g[D])),o.relocateComponent(v[D],d[D],t)})}else y.forEach(function(P,D){o.relocateComponent(v[D],g[D],t)});var a=new Set;if(y.length>1){var m=[],u=l.filter(function(P){return P.css("display")=="none"});y.forEach(function(P,D){var z=void 0;if(t.quality=="draft"&&(z=g[D].nodeIndexes),P.nodes().not(u).length>0){var W={edges:[],nodes:[]},U=void 0;P.nodes().not(u).forEach(function(O){if(t.quality=="draft")if(O.isParent()){var X=o.calcBoundingBox(O,g[D].xCoords,g[D].yCoords,z);W.nodes.push({x:X.topLeftX,y:X.topLeftY,width:X.width,height:X.height})}else U=z.get(O.id()),W.nodes.push({x:g[D].xCoords[U]-O.boundingbox().w/2,y:g[D].yCoords[U]-O.boundingbox().h/2,width:O.boundingbox().w,height:O.boundingbox().h});else d[D][O.id()]&&W.nodes.push({x:d[D][O.id()].getLeft(),y:d[D][O.id()].getTop(),width:d[D][O.id()].getWidth(),height:d[D][O.id()].getHeight()})}),P.edges().forEach(function(O){var X=O.source(),j=O.target();if(X.css("display")!="none"&&j.css("display")!="none")if(t.quality=="draft"){var tt=z.get(X.id()),ot=z.get(j.id()),V=[],Et=[];if(X.isParent()){var It=o.calcBoundingBox(X,g[D].xCoords,g[D].yCoords,z);V.push(It.topLeftX+It.width/2),V.push(It.topLeftY+It.height/2)}else V.push(g[D].xCoords[tt]),V.push(g[D].yCoords[tt]);if(j.isParent()){var kt=o.calcBoundingBox(j,g[D].xCoords,g[D].yCoords,z);Et.push(kt.topLeftX+kt.width/2),Et.push(kt.topLeftY+kt.height/2)}else Et.push(g[D].xCoords[ot]),Et.push(g[D].yCoords[ot]);W.edges.push({startX:V[0],startY:V[1],endX:Et[0],endY:Et[1]})}else d[D][X.id()]&&d[D][j.id()]&&W.edges.push({startX:d[D][X.id()].getCenterX(),startY:d[D][X.id()].getCenterY(),endX:d[D][j.id()].getCenterX(),endY:d[D][j.id()].getCenterY()})}),W.nodes.length>0&&(m.push(W),a.add(D))}});var f=E.packComponents(m,t.randomize).shifts;if(t.quality=="draft")g.forEach(function(P,D){var z=P.xCoords.map(function(U){return U+f[D].dx}),W=P.yCoords.map(function(U){return U+f[D].dy});P.xCoords=z,P.yCoords=W});else{var p=0;a.forEach(function(P){Object.keys(d[P]).forEach(function(D){var z=d[P][D];z.setCenter(z.getCenterX()+f[p].dx,z.getCenterY()+f[p].dy)}),p++})}}}else{var w=t.eles.boundingBox();if(v.push({x:w.x1+w.w/2,y:w.y1+w.h/2}),t.randomize){var I=s(t);g.push(I)}t.quality=="default"||t.quality=="proof"?(d.push(e(t,g[0])),o.relocateComponent(v[0],d[0],t)):o.relocateComponent(v[0],g[0],t)}var C=function(P,D){if(t.quality=="default"||t.quality=="proof"){typeof P=="number"&&(P=D);var z=void 0,W=void 0,U=P.data("id");return d.forEach(function(X){U in X&&(z={x:X[U].getRect().getCenterX(),y:X[U].getRect().getCenterY()},W=X[U])}),t.nodeDimensionsIncludeLabels&&(W.labelWidth&&(W.labelPosHorizontal=="left"?z.x+=W.labelWidth/2:W.labelPosHorizontal=="right"&&(z.x-=W.labelWidth/2)),W.labelHeight&&(W.labelPosVertical=="top"?z.y+=W.labelHeight/2:W.labelPosVertical=="bottom"&&(z.y-=W.labelHeight/2))),z==null&&(z={x:P.position("x"),y:P.position("y")}),{x:z.x,y:z.y}}var O=void 0;return g.forEach(function(X){var j=X.nodeIndexes.get(P.id());j!=null&&(O={x:X.xCoords[j],y:X.yCoords[j]})}),O==null&&(O={x:P.position("x"),y:P.position("y")}),{x:O.x,y:O.y}};if(t.quality=="default"||t.quality=="proof"||t.randomize){var G=o.calcParentsWithoutChildren(h,l),S=l.filter(function(P){return P.css("display")=="none"});t.eles=l.not(S),l.nodes().not(":parent").not(S).layoutPositions(this,t,C),G.length>0&&G.forEach(function(P){P.position(C(P))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),i}();T.exports=n},657:(T,L,_)=>{var N=_(548),c=_(140).layoutBase.Matrix,o=_(140).layoutBase.SVD;T.exports={spectralLayout:function(s){var e=s.cy,r=s.eles,n=r.nodes(),i=r.nodes(":parent"),t=new Map,h=new Map,l=new Map,g=[],d=[],y=[],v=[],E=[],A=[],M=[],F=[],b=void 0,Y=1e8,H=1e-9,q=s.piTol,x=s.samplingType,B=s.nodeSeparation,a=void 0,m=function(K,it,pt){for(var ct=[],yt=0,Nt=0,ht=0,At=void 0,Ot=[],Dt=0,xt=1,Ct=0;Ct<b;Ct++)Ot[Ct]=Y;for(ct[Nt]=K,Ot[K]=0;Nt>=yt;){ht=ct[yt++];for(var R=g[ht],k=0;k<R.length;k++)Ot[At=h.get(R[k])]==Y&&(Ot[At]=Ot[ht]+1,ct[++Nt]=At);A[ht][it]=Ot[ht]*B}if(pt){for(var J=0;J<b;J++)A[J][it]<E[J]&&(E[J]=A[J][it]);for(var Q=0;Q<b;Q++)E[Q]>Dt&&(Dt=E[Q],xt=Q)}return xt};N.connectComponents(e,r,N.getTopMostNodes(n),t),i.forEach(function(K){N.connectComponents(e,r,N.getTopMostNodes(K.descendants().intersection(r)),t)});for(var u=0,f=0;f<n.length;f++)n[f].isParent()||h.set(n[f].id(),u++);var p=!0,w=!1,I=void 0;try{for(var C,G=t.keys()[Symbol.iterator]();!(p=(C=G.next()).done);p=!0){var S=C.value;h.set(S,u++)}}catch(K){w=!0,I=K}finally{try{!p&&G.return&&G.return()}finally{if(w)throw I}}for(var P=0;P<h.size;P++)g[P]=[];i.forEach(function(K){for(var it=K.children().intersection(r);it.nodes(":childless").length==0;)it=it.nodes()[0].children().intersection(r);var pt=0,ct=it.nodes(":childless")[0].connectedEdges().length;it.nodes(":childless").forEach(function(yt,Nt){yt.connectedEdges().length<ct&&(ct=yt.connectedEdges().length,pt=Nt)}),l.set(K.id(),it.nodes(":childless")[pt].id())}),n.forEach(function(K){var it=void 0;it=K.isParent()?h.get(l.get(K.id())):h.get(K.id()),K.neighborhood().nodes().forEach(function(pt){r.intersection(K.edgesWith(pt)).length>0&&(pt.isParent()?g[it].push(l.get(pt.id())):g[it].push(pt.id()))})});var D=function(K){var it=h.get(K),pt=void 0;t.get(K).forEach(function(ct){pt=e.getElementById(ct).isParent()?l.get(ct):ct,g[it].push(pt),g[h.get(pt)].push(K)})},z=!0,W=!1,U=void 0;try{for(var O,X=t.keys()[Symbol.iterator]();!(z=(O=X.next()).done);z=!0)D(O.value)}catch(K){W=!0,U=K}finally{try{!z&&X.return&&X.return()}finally{if(W)throw U}}var j=void 0;if((b=h.size)>2){a=b<s.sampleSize?b:s.sampleSize;for(var tt=0;tt<b;tt++)A[tt]=[];for(var ot=0;ot<a;ot++)F[ot]=[];return s.quality=="draft"||s.step=="all"?(function(K){var it=void 0;if(K){it=Math.floor(Math.random()*b);for(var pt=0;pt<b;pt++)E[pt]=Y;for(var ct=0;ct<a;ct++)v[ct]=it,it=m(it,ct,K)}else{(function(){for(var xt=0,Ct=0,R=!1;Ct<a;){xt=Math.floor(Math.random()*b),R=!1;for(var k=0;k<Ct;k++)if(v[k]==xt){R=!0;break}R||(v[Ct]=xt,Ct++)}})();for(var yt=0;yt<a;yt++)m(v[yt],yt,K)}for(var Nt=0;Nt<b;Nt++)for(var ht=0;ht<a;ht++)A[Nt][ht]*=A[Nt][ht];for(var At=0;At<a;At++)M[At]=[];for(var Ot=0;Ot<a;Ot++)for(var Dt=0;Dt<a;Dt++)M[Ot][Dt]=A[v[Dt]][Ot]}(x),function(){for(var K=o.svd(M),it=K.S,pt=K.U,ct=K.V,yt=it[0]*it[0]*it[0],Nt=[],ht=0;ht<a;ht++){Nt[ht]=[];for(var At=0;At<a;At++)Nt[ht][At]=0,ht==At&&(Nt[ht][At]=it[ht]/(it[ht]*it[ht]+yt/(it[ht]*it[ht])))}F=c.multMat(c.multMat(ct,Nt),c.transpose(pt))}(),function(){for(var K=void 0,it=void 0,pt=[],ct=[],yt=[],Nt=[],ht=0;ht<b;ht++)pt[ht]=Math.random(),ct[ht]=Math.random();pt=c.normalize(pt),ct=c.normalize(ct);for(var At=H,Ot=H,Dt=void 0;;){for(var xt=0;xt<b;xt++)yt[xt]=pt[xt];if(pt=c.multGamma(c.multL(c.multGamma(yt),A,F)),K=c.dotProduct(yt,pt),pt=c.normalize(pt),At=c.dotProduct(yt,pt),(Dt=Math.abs(At/Ot))<=1+q&&Dt>=1)break;Ot=At}for(var Ct=0;Ct<b;Ct++)yt[Ct]=pt[Ct];for(Ot=H;;){for(var R=0;R<b;R++)Nt[R]=ct[R];if(Nt=c.minusOp(Nt,c.multCons(yt,c.dotProduct(yt,Nt))),ct=c.multGamma(c.multL(c.multGamma(Nt),A,F)),it=c.dotProduct(Nt,ct),ct=c.normalize(ct),At=c.dotProduct(Nt,ct),(Dt=Math.abs(At/Ot))<=1+q&&Dt>=1)break;Ot=At}for(var k=0;k<b;k++)Nt[k]=ct[k];d=c.multCons(yt,Math.sqrt(Math.abs(K))),y=c.multCons(Nt,Math.sqrt(Math.abs(it)))}(),j={nodeIndexes:h,xCoords:d,yCoords:y}):(h.forEach(function(K,it){d.push(e.getElementById(it).position("x")),y.push(e.getElementById(it).position("y"))}),j={nodeIndexes:h,xCoords:d,yCoords:y}),j}var V=h.keys(),Et=e.getElementById(V.next().value),It=Et.position(),kt=Et.outerWidth();if(d.push(It.x),y.push(It.y),b==2){var bt=e.getElementById(V.next().value).outerWidth();d.push(It.x+kt/2+bt/2+s.idealEdgeLength),y.push(It.y)}return j={nodeIndexes:h,xCoords:d,yCoords:y}}}},579:(T,L,_)=>{var N=_(212),c=function(o){o&&o("layout","fcose",N)};typeof cytoscape<"u"&&c(cytoscape),T.exports=c},140:T=>{T.exports=Ce}},ce={},function T(L){var _=ce[L];if(_!==void 0)return _.exports;var N=ce[L]={exports:{}};return Oe[L](N,N.exports,T),N.exports}(579))));var De={L:"left",R:"right",T:"top",B:"bottom"},Re={L:Z(T=>`${T},${T/2} 0,${T} 0,0`,"L"),R:Z(T=>`0,${T/2} ${T},0 ${T},${T}`,"R"),T:Z(T=>`0,0 ${T},0 ${T/2},${T}`,"T"),B:Z(T=>`${T/2},0 ${T},${T} 0,${T}`,"B")},re={L:Z((T,L)=>T-L+2,"L"),R:Z((T,L)=>T-2,"R"),T:Z((T,L)=>T-L+2,"T"),B:Z((T,L)=>T-2,"B")},pr=Z(function(T){return Yt(T)?T==="L"?"R":"L":T==="T"?"B":"T"},"getOppositeArchitectureDirection"),be=Z(function(T){return T==="L"||T==="R"||T==="T"||T==="B"},"isArchitectureDirection"),Yt=Z(function(T){return T==="L"||T==="R"},"isArchitectureDirectionX"),Wt=Z(function(T){return T==="T"||T==="B"},"isArchitectureDirectionY"),ge=Z(function(T,L){const _=Yt(T)&&Wt(L),N=Wt(T)&&Yt(L);return _||N},"isArchitectureDirectionXY"),fr=Z(function(T){const L=T[0],_=T[1],N=Yt(L)&&Wt(_),c=Wt(L)&&Yt(_);return N||c},"isArchitecturePairXY"),mr=Z(function(T){return T!=="LL"&&T!=="RR"&&T!=="TT"&&T!=="BB"},"isValidArchitectureDirectionPair"),ue=Z(function(T,L){const _=`${T}${L}`;return mr(_)?_:void 0},"getArchitectureDirectionPair"),vr=Z(function([T,L],_){const N=_[0],c=_[1];return Yt(N)?Wt(c)?[T+(N==="L"?-1:1),L+(c==="T"?1:-1)]:[T+(N==="L"?-1:1),L]:Yt(c)?[T+(c==="L"?1:-1),L+(N==="T"?1:-1)]:[T,L+(N==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),yr=Z(function(T){return T==="LT"||T==="TL"?[1,1]:T==="BL"||T==="LB"?[1,-1]:T==="BR"||T==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Er=Z(function(T,L){return ge(T,L)?"bend":Yt(T)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Nr=Z(function(T){return T.type==="service"},"isArchitectureService"),Tr=Z(function(T){return T.type==="junction"},"isArchitectureJunction"),Ge=Z(T=>T.data(),"edgeData"),Qt=Z(T=>T.data(),"nodeData"),Se=rr.architecture,dt=new sr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Se,dataStructures:void 0,elements:{}})),Ar=Z(()=>{dt.reset(),nr()},"clear"),wr=Z(function({id:T,icon:L,in:_,title:N,iconText:c}){if(dt.records.registeredIds[T]!==void 0)throw new Error(`The service id [${T}] is already in use by another ${dt.records.registeredIds[T]}`);if(_!==void 0){if(T===_)throw new Error(`The service [${T}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The service [${T}]'s parent does not exist. Please make sure the parent is created before this service`);if(dt.records.registeredIds[_]==="node")throw new Error(`The service [${T}]'s parent is not a group`)}dt.records.registeredIds[T]="node",dt.records.nodes[T]={id:T,type:"service",icon:L,iconText:c,title:N,edges:[],in:_}},"addService"),Lr=Z(()=>Object.values(dt.records.nodes).filter(Nr),"getServices"),Ir=Z(function({id:T,in:L}){dt.records.registeredIds[T]="node",dt.records.nodes[T]={id:T,type:"junction",edges:[],in:L}},"addJunction"),_r=Z(()=>Object.values(dt.records.nodes).filter(Tr),"getJunctions"),Mr=Z(()=>Object.values(dt.records.nodes),"getNodes"),pe=Z(T=>dt.records.nodes[T],"getNode"),xr=Z(function({id:T,icon:L,in:_,title:N}){if(dt.records.registeredIds[T]!==void 0)throw new Error(`The group id [${T}] is already in use by another ${dt.records.registeredIds[T]}`);if(_!==void 0){if(T===_)throw new Error(`The group [${T}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The group [${T}]'s parent does not exist. Please make sure the parent is created before this group`);if(dt.records.registeredIds[_]==="node")throw new Error(`The group [${T}]'s parent is not a group`)}dt.records.registeredIds[T]="group",dt.records.groups[T]={id:T,icon:L,title:N,in:_}},"addGroup"),Cr=Z(()=>Object.values(dt.records.groups),"getGroups"),Or=Z(function({lhsId:T,rhsId:L,lhsDir:_,rhsDir:N,lhsInto:c,rhsInto:o,lhsGroup:s,rhsGroup:e,title:r}){if(!be(_))throw new Error(`Invalid direction given for left hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${_}`);if(!be(N))throw new Error(`Invalid direction given for right hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${N}`);if(dt.records.nodes[T]===void 0&&dt.records.groups[T]===void 0)throw new Error(`The left-hand id [${T}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(dt.records.nodes[L]===void 0&&dt.records.groups[T]===void 0)throw new Error(`The right-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);const n=dt.records.nodes[T].in,i=dt.records.nodes[L].in;if(s&&n&&i&&n==i)throw new Error(`The left-hand id [${T}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&n&&i&&n==i)throw new Error(`The right-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const t={lhsId:T,lhsDir:_,lhsInto:c,lhsGroup:s,rhsId:L,rhsDir:N,rhsInto:o,rhsGroup:e,title:r};dt.records.edges.push(t),dt.records.nodes[T]&&dt.records.nodes[L]&&(dt.records.nodes[T].edges.push(dt.records.edges[dt.records.edges.length-1]),dt.records.nodes[L].edges.push(dt.records.edges[dt.records.edges.length-1]))},"addEdge"),Dr=Z(()=>dt.records.edges,"getEdges"),Rr=Z(()=>{if(dt.records.dataStructures===void 0){const T={},L=Object.entries(dt.records.nodes).reduce((e,[r,n])=>(e[r]=n.edges.reduce((i,t)=>{var g,d;const h=(g=pe(t.lhsId))==null?void 0:g.in,l=(d=pe(t.rhsId))==null?void 0:d.in;if(h&&l&&h!==l){const y=Er(t.lhsDir,t.rhsDir);y!=="bend"&&(T[h]??(T[h]={}),T[h][l]=y,T[l]??(T[l]={}),T[l][h]=y)}if(t.lhsId===r){const y=ue(t.lhsDir,t.rhsDir);y&&(i[y]=t.rhsId)}else{const y=ue(t.rhsDir,t.lhsDir);y&&(i[y]=t.lhsId)}return i},{}),e),{}),_=Object.keys(L)[0],N={[_]:1},c=Object.keys(L).reduce((e,r)=>r===_?e:{...e,[r]:1},{}),o=Z(e=>{const r={[e]:[0,0]},n=[e];for(;n.length>0;){const i=n.shift();if(i){N[i]=1,delete c[i];const t=L[i],[h,l]=r[i];Object.entries(t).forEach(([g,d])=>{N[d]||(r[d]=vr([h,l],g),n.push(d))})}}return r},"BFS"),s=[o(_)];for(;Object.keys(c).length>0;)s.push(o(Object.keys(c)[0]));dt.records.dataStructures={adjList:L,spatialMaps:s,groupAlignments:T}}return dt.records.dataStructures},"getDataStructures"),br=Z((T,L)=>{dt.records.elements[T]=L},"setElementForId"),Gr=Z(T=>dt.records.elements[T],"getElementById"),Fe=Z(()=>tr({...Se,...er().architecture}),"getConfig"),ne={clear:Ar,setDiagramTitle:Qe,getDiagramTitle:Ze,setAccTitle:$e,getAccTitle:qe,setAccDescription:je,getAccDescription:Be,getConfig:Fe,addService:wr,getServices:Lr,addJunction:Ir,getJunctions:_r,getNodes:Mr,getNode:pe,addGroup:xr,getGroups:Cr,addEdge:Or,getEdges:Dr,setElementForId:br,getElementById:Gr,getDataStructures:Rr};function St(T){return Fe()[T]}Z(St,"getConfigField");var Sr=Z((T,L)=>{ar(T,L),T.groups.map(L.addGroup),T.services.map(_=>L.addService({..._,type:"service"})),T.junctions.map(_=>L.addJunction({..._,type:"junction"})),T.edges.map(L.addEdge)},"populateDb"),Fr={parse:Z(async T=>{const L=await hr("architecture",T);Te.debug(L),Sr(L,ne)},"parse")},Pr=Z(T=>`
1
+ import{_ as Z,g as Be,s as je,a as qe,b as $e,q as Ze,p as Qe,I as Je,T as Ke,E as tr,F as er,G as rr,y as nr,l as Te,a4 as he,c as le,am as de,an as or,ao as ir}from"./mermaid-sbM5kvPX.js";import{p as ar}from"./chunk-353BL4L5-BJhgRHK-.js";import{I as sr}from"./chunk-AACKK3MU-tA3KIhd1.js";import{p as hr}from"./treemap-75Q7IDZK-CRVQqKgI.js";import{c as Ae}from"./cytoscape.esm-CzSnbbKZ.js";import{z as lr}from"./index-DPzEQsyf.js";import{s as dr}from"./transform-B8bpuzxV.js";import"./step-BwsUM5iJ.js";import"./_baseEach-CjvI0y7T.js";import"./_baseUniq-Ds9S94xv.js";import"./min-ClcSmngt.js";import"./_baseMap-DI8H5mdU.js";import"./clone-CkywUQE5.js";import"./_createAggregator-Bqe-A14O.js";import"./timer-BwIYMJWC.js";var we,Le={exports:{}},Ie={exports:{}},_e={exports:{}};function cr(){return we?_e.exports:(we=1,T=function(){return function(L){var _={};function N(c){if(_[c])return _[c].exports;var o=_[c]={i:c,l:!1,exports:{}};return L[c].call(o.exports,o,o.exports,N),o.l=!0,o.exports}return N.m=L,N.c=_,N.i=function(c){return c},N.d=function(c,o,s){N.o(c,o)||Object.defineProperty(c,o,{configurable:!1,enumerable:!0,get:s})},N.n=function(c){var o=c&&c.__esModule?function(){return c.default}:function(){return c};return N.d(o,"a",o),o},N.o=function(c,o){return Object.prototype.hasOwnProperty.call(c,o)},N.p="",N(N.s=28)}([function(L,_,N){function c(){}c.QUALITY=1,c.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,c.DEFAULT_INCREMENTAL=!1,c.DEFAULT_ANIMATION_ON_LAYOUT=!0,c.DEFAULT_ANIMATION_DURING_LAYOUT=!1,c.DEFAULT_ANIMATION_PERIOD=50,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,c.DEFAULT_GRAPH_MARGIN=15,c.NODE_DIMENSIONS_INCLUDE_LABELS=!1,c.SIMPLE_NODE_SIZE=40,c.SIMPLE_NODE_HALF_SIZE=c.SIMPLE_NODE_SIZE/2,c.EMPTY_COMPOUND_NODE_SIZE=40,c.MIN_EDGE_LENGTH=1,c.WORLD_BOUNDARY=1e6,c.INITIAL_WORLD_BOUNDARY=c.WORLD_BOUNDARY/1e3,c.WORLD_CENTER_X=1200,c.WORLD_CENTER_Y=900,L.exports=c},function(L,_,N){var c=N(2),o=N(8),s=N(9);function e(n,i,t){c.call(this,t),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=t,this.bendpoints=[],this.source=n,this.target=i}for(var r in e.prototype=Object.create(c.prototype),c)e[r]=c[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(n){if(this.source===n)return this.target;if(this.target===n)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(n,i){for(var t=this.getOtherEnd(n),h=i.getGraphManager().getRoot();;){if(t.getOwner()==i)return t;if(t.getOwner()==h)break;t=t.getOwner().getParent()}return null},e.prototype.updateLength=function(){var n=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),n),this.isOverlapingSourceAndTarget||(this.lengthX=n[0]-n[2],this.lengthY=n[1]-n[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=e},function(L,_,N){L.exports=function(c){this.vGraphObject=c}},function(L,_,N){var c=N(2),o=N(10),s=N(13),e=N(0),r=N(16),n=N(5);function i(h,l,g,d){g==null&&d==null&&(d=l),c.call(this,d),h.graphManager!=null&&(h=h.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=h,this.rect=g!=null&&l!=null?new s(l.x,l.y,g.width,g.height):new s}for(var t in i.prototype=Object.create(c.prototype),c)i[t]=c[t];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(h){this.rect.width=h},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(h){this.rect.height=h},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 n(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new n(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(h,l){this.rect.x=h.x,this.rect.y=h.y,this.rect.width=l.width,this.rect.height=l.height},i.prototype.setCenter=function(h,l){this.rect.x=h-this.rect.width/2,this.rect.y=l-this.rect.height/2},i.prototype.setLocation=function(h,l){this.rect.x=h,this.rect.y=l},i.prototype.moveBy=function(h,l){this.rect.x+=h,this.rect.y+=l},i.prototype.getEdgeListToNode=function(h){var l=[],g=this;return g.edges.forEach(function(d){if(d.target==h){if(d.source!=g)throw"Incorrect edge source!";l.push(d)}}),l},i.prototype.getEdgesBetween=function(h){var l=[],g=this;return g.edges.forEach(function(d){if(d.source!=g&&d.target!=g)throw"Incorrect edge source and/or target";d.target!=h&&d.source!=h||l.push(d)}),l},i.prototype.getNeighborsList=function(){var h=new Set,l=this;return l.edges.forEach(function(g){if(g.source==l)h.add(g.target);else{if(g.target!=l)throw"Incorrect incidency!";h.add(g.source)}}),h},i.prototype.withChildren=function(){var h=new Set;if(h.add(this),this.child!=null)for(var l=this.child.getNodes(),g=0;g<l.length;g++)l[g].withChildren().forEach(function(d){h.add(d)});return h},i.prototype.getNoOfChildren=function(){var h=0;if(this.child==null)h=1;else for(var l=this.child.getNodes(),g=0;g<l.length;g++)h+=l[g].getNoOfChildren();return h==0&&(h=1),h},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.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 h,l,g=-e.INITIAL_WORLD_BOUNDARY,d=e.INITIAL_WORLD_BOUNDARY;h=e.WORLD_CENTER_X+r.nextDouble()*(d-g)+g;var y=-e.INITIAL_WORLD_BOUNDARY,v=e.INITIAL_WORLD_BOUNDARY;l=e.WORLD_CENTER_Y+r.nextDouble()*(v-y)+y,this.rect.x=h,this.rect.y=l},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var h=this.getChild();if(h.updateBounds(!0),this.rect.x=h.getLeft(),this.rect.y=h.getTop(),this.setWidth(h.getRight()-h.getLeft()),this.setHeight(h.getBottom()-h.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var l=h.getRight()-h.getLeft(),g=h.getBottom()-h.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(l+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>l?(this.rect.x-=(this.labelWidth-l)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(l+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>g?(this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(g+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(h){var l=this.rect.x;l>e.WORLD_BOUNDARY?l=e.WORLD_BOUNDARY:l<-e.WORLD_BOUNDARY&&(l=-e.WORLD_BOUNDARY);var g=this.rect.y;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var d=new n(l,g),y=h.inverseTransformPoint(d);this.setLocation(y.x,y.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()},L.exports=i},function(L,_,N){var c=N(0);function o(){}for(var s in c)o[s]=c[s];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=3*o.MAX_NODE_DISPLACEMENT_INCREMENTAL,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,L.exports=o},function(L,_,N){function c(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.setX=function(o){this.x=o},c.prototype.setY=function(o){this.y=o},c.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},c.prototype.getCopy=function(){return new c(this.x,this.y)},c.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},L.exports=c},function(L,_,N){var c=N(2),o=N(10),s=N(0),e=N(7),r=N(3),n=N(1),i=N(13),t=N(12),h=N(11);function l(d,y,v){c.call(this,v),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var g in l.prototype=Object.create(c.prototype),c)l[g]=c[g];l.prototype.getNodes=function(){return this.nodes},l.prototype.getEdges=function(){return this.edges},l.prototype.getGraphManager=function(){return this.graphManager},l.prototype.getParent=function(){return this.parent},l.prototype.getLeft=function(){return this.left},l.prototype.getRight=function(){return this.right},l.prototype.getTop=function(){return this.top},l.prototype.getBottom=function(){return this.bottom},l.prototype.isConnected=function(){return this.isConnected},l.prototype.add=function(d,y,v){if(y==null&&v==null){var E=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(E)>-1)throw"Node already in graph!";return E.owner=this,this.getNodes().push(E),E}var A=d;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(y.owner!=v.owner||y.owner!=this)throw"Both owners must be this graph!";return y.owner!=v.owner?null:(A.source=y,A.target=v,A.isInterGraph=!1,this.getEdges().push(A),y.edges.push(A),v!=y&&v.edges.push(A),A)},l.prototype.remove=function(d){var y=d;if(d instanceof r){if(y==null)throw"Node is null!";if(y.owner==null||y.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),E=v.length,A=0;A<E;A++)(M=v[A]).isInterGraph?this.graphManager.remove(M):M.source.owner.remove(M);if((F=this.nodes.indexOf(y))==-1)throw"Node not in owner node list!";this.nodes.splice(F,1)}else if(d instanceof n){var M;if((M=d)==null)throw"Edge is null!";if(M.source==null||M.target==null)throw"Source and/or target is null!";if(M.source.owner==null||M.target.owner==null||M.source.owner!=this||M.target.owner!=this)throw"Source and/or target owner is invalid!";var F,b=M.source.edges.indexOf(M),Y=M.target.edges.indexOf(M);if(!(b>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";if(M.source.edges.splice(b,1),M.target!=M.source&&M.target.edges.splice(Y,1),(F=M.source.owner.getEdges().indexOf(M))==-1)throw"Not in owner's edge list!";M.source.owner.getEdges().splice(F,1)}},l.prototype.updateLeftTop=function(){for(var d,y,v,E=o.MAX_VALUE,A=o.MAX_VALUE,M=this.getNodes(),F=M.length,b=0;b<F;b++){var Y=M[b];E>(d=Y.getTop())&&(E=d),A>(y=Y.getLeft())&&(A=y)}return E==o.MAX_VALUE?null:(v=M[0].getParent().paddingLeft!=null?M[0].getParent().paddingLeft:this.margin,this.left=A-v,this.top=E-v,new t(this.left,this.top))},l.prototype.updateBounds=function(d){for(var y,v,E,A,M,F=o.MAX_VALUE,b=-o.MAX_VALUE,Y=o.MAX_VALUE,H=-o.MAX_VALUE,q=this.nodes,x=q.length,B=0;B<x;B++){var a=q[B];d&&a.child!=null&&a.updateBounds(),F>(y=a.getLeft())&&(F=y),b<(v=a.getRight())&&(b=v),Y>(E=a.getTop())&&(Y=E),H<(A=a.getBottom())&&(H=A)}var m=new i(F,Y,b-F,H-Y);F==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),M=q[0].getParent().paddingLeft!=null?q[0].getParent().paddingLeft:this.margin,this.left=m.x-M,this.right=m.x+m.width+M,this.top=m.y-M,this.bottom=m.y+m.height+M},l.calculateBounds=function(d){for(var y,v,E,A,M=o.MAX_VALUE,F=-o.MAX_VALUE,b=o.MAX_VALUE,Y=-o.MAX_VALUE,H=d.length,q=0;q<H;q++){var x=d[q];M>(y=x.getLeft())&&(M=y),F<(v=x.getRight())&&(F=v),b>(E=x.getTop())&&(b=E),Y<(A=x.getBottom())&&(Y=A)}return new i(M,b,F-M,Y-b)},l.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){for(var d=0,y=this.nodes,v=y.length,E=0;E<v;E++)d+=y[E].calcEstimatedSize();return this.estimatedSize=d==0?s.EMPTY_COMPOUND_NODE_SIZE:d/Math.sqrt(this.nodes.length),this.estimatedSize},l.prototype.updateConnected=function(){var d=this;if(this.nodes.length!=0){var y,v,E=new h,A=new Set,M=this.nodes[0];for(M.withChildren().forEach(function(H){E.push(H),A.add(H)});E.length!==0;)for(var F=(y=(M=E.shift()).getEdges()).length,b=0;b<F;b++)(v=y[b].getOtherEndInGraph(M,this))==null||A.has(v)||v.withChildren().forEach(function(H){E.push(H),A.add(H)});if(this.isConnected=!1,A.size>=this.nodes.length){var Y=0;A.forEach(function(H){H.owner==d&&Y++}),Y==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},L.exports=l},function(L,_,N){var c,o=N(1);function s(e){c=N(6),this.layout=e,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),n=this.add(e,r);return this.setRootGraph(n),this.rootGraph},s.prototype.add=function(e,r,n,i,t){if(n==null&&i==null&&t==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}t=n,n=e;var h=(i=r).getOwner(),l=t.getOwner();if(h==null||h.getGraphManager()!=this)throw"Source not in this graph mgr!";if(l==null||l.getGraphManager()!=this)throw"Target not in this graph mgr!";if(h==l)return n.isInterGraph=!1,h.add(n,i,t);if(n.isInterGraph=!0,n.source=i,n.target=t,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),n.source==null||n.target==null)throw"Edge source and/or target is null!";if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},s.prototype.remove=function(e){if(e instanceof c){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!";for(var n,i=[],t=(i=i.concat(r.getEdges())).length,h=0;h<t;h++)n=i[h],r.remove(n);var l,g=[];for(t=(g=g.concat(r.getNodes())).length,h=0;h<t;h++)l=g[h],r.remove(l);r==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(r);this.graphs.splice(d,1),r.parent=null}else if(e instanceof o){if((n=e)==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(n.source==null||n.target==null)throw"Source and/or target is null!";if(n.source.edges.indexOf(n)==-1||n.target.edges.indexOf(n)==-1)throw"Source and/or target doesn't know this edge!";if(d=n.source.edges.indexOf(n),n.source.edges.splice(d,1),d=n.target.edges.indexOf(n),n.target.edges.splice(d,1),n.source.owner==null||n.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";d=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(d,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),n=r.length,i=0;i<n;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var n=0;n<r.length;n++)e=e.concat(r[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},s.prototype.getRoot=function(){return this.rootGraph},s.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"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(e,r){if(e==null||r==null)throw"assert failed";if(e==r)return!0;for(var n,i=e.getOwner();(n=i.getParent())!=null;){if(n==r)return!0;if((i=n.getOwner())==null)break}for(i=r.getOwner();(n=i.getParent())!=null;){if(n==e)return!0;if((i=n.getOwner())==null)break}return!1},s.prototype.calcLowestCommonAncestors=function(){for(var e,r,n,i,t,h=this.getAllEdges(),l=h.length,g=0;g<l;g++)if(r=(e=h[g]).source,n=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=n,r!=n){for(i=r.getOwner();e.lca==null;){for(e.targetInLca=n,t=n.getOwner();e.lca==null;){if(t==i){e.lca=t;break}if(t==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=t.getParent(),t=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"}else e.lca=r.getOwner()},s.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();for(var n=e.getOwner();n!=null;){for(var i=r.getOwner();i!=null;){if(i==n)return i;i=i.getParent().getOwner()}n=n.getParent().getOwner()}return n},s.prototype.calcInclusionTreeDepths=function(e,r){var n;e==null&&r==null&&(e=this.rootGraph,r=1);for(var i=e.getNodes(),t=i.length,h=0;h<t;h++)(n=i[h]).inclusionTreeDepth=r,n.child!=null&&this.calcInclusionTreeDepths(n.child,r+1)},s.prototype.includesInvalidEdge=function(){for(var e,r=[],n=this.edges.length,i=0;i<n;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(i=0;i<r.length;i++)this.remove(r[i]);return!1},L.exports=s},function(L,_,N){var c=N(12);function o(){}o.calcSeparationAmount=function(s,e,r,n){if(!s.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(s,e,i),r[0]=Math.min(s.getRight(),e.getRight())-Math.max(s.x,e.x),r[1]=Math.min(s.getBottom(),e.getBottom())-Math.max(s.y,e.y),s.getX()<=e.getX()&&s.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-s.getX(),s.getRight()-e.getRight()):e.getX()<=s.getX()&&e.getRight()>=s.getRight()&&(r[0]+=Math.min(s.getX()-e.getX(),e.getRight()-s.getRight())),s.getY()<=e.getY()&&s.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-s.getY(),s.getBottom()-e.getBottom()):e.getY()<=s.getY()&&e.getBottom()>=s.getBottom()&&(r[1]+=Math.min(s.getY()-e.getY(),e.getBottom()-s.getBottom()));var t=Math.abs((e.getCenterY()-s.getCenterY())/(e.getCenterX()-s.getCenterX()));e.getCenterY()===s.getCenterY()&&e.getCenterX()===s.getCenterX()&&(t=1);var h=t*r[0],l=r[1]/t;r[0]<l?l=r[0]:h=r[1],r[0]=-1*i[0]*(l/2+n),r[1]=-1*i[1]*(h/2+n)},o.decideDirectionsForOverlappingNodes=function(s,e,r){s.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,s.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},o.getIntersection2=function(s,e,r){var n=s.getCenterX(),i=s.getCenterY(),t=e.getCenterX(),h=e.getCenterY();if(s.intersects(e))return r[0]=n,r[1]=i,r[2]=t,r[3]=h,!0;var l=s.getX(),g=s.getY(),d=s.getRight(),y=s.getX(),v=s.getBottom(),E=s.getRight(),A=s.getWidthHalf(),M=s.getHeightHalf(),F=e.getX(),b=e.getY(),Y=e.getRight(),H=e.getX(),q=e.getBottom(),x=e.getRight(),B=e.getWidthHalf(),a=e.getHeightHalf(),m=!1,u=!1;if(n===t){if(i>h)return r[0]=n,r[1]=g,r[2]=t,r[3]=q,!1;if(i<h)return r[0]=n,r[1]=v,r[2]=t,r[3]=b,!1}else if(i===h){if(n>t)return r[0]=l,r[1]=i,r[2]=Y,r[3]=h,!1;if(n<t)return r[0]=d,r[1]=i,r[2]=F,r[3]=h,!1}else{var f=s.height/s.width,p=e.height/e.width,w=(h-i)/(t-n),I=void 0,C=void 0,G=void 0,S=void 0,P=void 0,D=void 0;if(-f===w?n>t?(r[0]=y,r[1]=v,m=!0):(r[0]=d,r[1]=g,m=!0):f===w&&(n>t?(r[0]=l,r[1]=g,m=!0):(r[0]=E,r[1]=v,m=!0)),-p===w?t>n?(r[2]=H,r[3]=q,u=!0):(r[2]=Y,r[3]=b,u=!0):p===w&&(t>n?(r[2]=F,r[3]=b,u=!0):(r[2]=x,r[3]=q,u=!0)),m&&u)return!1;if(n>t?i>h?(I=this.getCardinalDirection(f,w,4),C=this.getCardinalDirection(p,w,2)):(I=this.getCardinalDirection(-f,w,3),C=this.getCardinalDirection(-p,w,1)):i>h?(I=this.getCardinalDirection(-f,w,1),C=this.getCardinalDirection(-p,w,3)):(I=this.getCardinalDirection(f,w,2),C=this.getCardinalDirection(p,w,4)),!m)switch(I){case 1:S=g,G=n+-M/w,r[0]=G,r[1]=S;break;case 2:G=E,S=i+A*w,r[0]=G,r[1]=S;break;case 3:S=v,G=n+M/w,r[0]=G,r[1]=S;break;case 4:G=y,S=i+-A*w,r[0]=G,r[1]=S}if(!u)switch(C){case 1:D=b,P=t+-a/w,r[2]=P,r[3]=D;break;case 2:P=x,D=h+B*w,r[2]=P,r[3]=D;break;case 3:D=q,P=t+a/w,r[2]=P,r[3]=D;break;case 4:P=H,D=h+-B*w,r[2]=P,r[3]=D}}return!1},o.getCardinalDirection=function(s,e,r){return s>e?r:1+r%4},o.getIntersection=function(s,e,r,n){if(n==null)return this.getIntersection2(s,e,r);var i,t,h,l,g,d,y,v=s.x,E=s.y,A=e.x,M=e.y,F=r.x,b=r.y,Y=n.x,H=n.y;return(y=(i=M-E)*(l=F-Y)-(t=H-b)*(h=v-A))===0?null:new c((h*(d=Y*b-F*H)-l*(g=A*E-v*M))/y,(t*g-i*d)/y)},o.angleOfVector=function(s,e,r,n){var i=void 0;return s!==r?(i=Math.atan((n-e)/(r-s)),r<s?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},o.doIntersect=function(s,e,r,n){var i=s.x,t=s.y,h=e.x,l=e.y,g=r.x,d=r.y,y=n.x,v=n.y,E=(h-i)*(v-d)-(y-g)*(l-t);if(E===0)return!1;var A=((v-d)*(y-i)+(g-y)*(v-t))/E,M=((t-l)*(y-i)+(h-i)*(v-t))/E;return 0<A&&A<1&&0<M&&M<1},o.findCircleLineIntersections=function(s,e,r,n,i,t,h){var l=(r-s)*(r-s)+(n-e)*(n-e),g=2*((s-i)*(r-s)+(e-t)*(n-e)),d=(s-i)*(s-i)+(e-t)*(e-t)-h*h;if(g*g-4*l*d>=0){var y=(-g+Math.sqrt(g*g-4*l*d))/(2*l),v=(-g-Math.sqrt(g*g-4*l*d))/(2*l);return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:null}return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,L.exports=o},function(L,_,N){function c(){}c.sign=function(o){return o>0?1:o<0?-1:0},c.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},c.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},L.exports=c},function(L,_,N){function c(){}c.MAX_VALUE=2147483647,c.MIN_VALUE=-2147483648,L.exports=c},function(L,_,N){var c=function(){function n(i,t){for(var h=0;h<t.length;h++){var l=t[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(i,l.key,l)}}return function(i,t,h){return t&&n(i.prototype,t),h&&n(i,h),i}}(),o=function(n){return{value:n,next:null,prev:null}},s=function(n,i,t,h){return n!==null?n.next=i:h.head=i,t!==null?t.prev=i:h.tail=i,i.prev=n,i.next=t,h.length++,i},e=function(n,i){var t=n.prev,h=n.next;return t!==null?t.next=h:i.head=h,h!==null?h.prev=t:i.tail=t,n.prev=n.next=null,i.length--,n},r=function(){function n(i){var t=this;(function(h,l){if(!(h instanceof l))throw new TypeError("Cannot call a class as a function")})(this,n),this.length=0,this.head=null,this.tail=null,i!=null&&i.forEach(function(h){return t.push(h)})}return c(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,t){return s(t.prev,o(i),t,this)}},{key:"insertAfter",value:function(i,t){return s(t,o(i),t.next,this)}},{key:"insertNodeBefore",value:function(i,t){return s(t.prev,i,t,this)}},{key:"insertNodeAfter",value:function(i,t){return s(t,i,t.next,this)}},{key:"push",value:function(i){return s(this.tail,o(i),null,this)}},{key:"unshift",value:function(i){return s(null,o(i),this.head,this)}},{key:"remove",value:function(i){return e(i,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){for(var t=1,h=this.head;t<i;)h=h.next,t++;return h.value}}},{key:"set_object_at",value:function(i,t){if(i<=this.length()){for(var h=1,l=this.head;h<i;)l=l.next,h++;l.value=t}}}]),n}();L.exports=r},function(L,_,N){function c(o,s,e){this.x=null,this.y=null,o==null&&s==null&&e==null?(this.x=0,this.y=0):typeof o=="number"&&typeof s=="number"&&e==null?(this.x=o,this.y=s):o.constructor.name=="Point"&&s==null&&e==null&&(e=o,this.x=e.x,this.y=e.y)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.getLocation=function(){return new c(this.x,this.y)},c.prototype.setLocation=function(o,s,e){o.constructor.name=="Point"&&s==null&&e==null?(e=o,this.setLocation(e.x,e.y)):typeof o=="number"&&typeof s=="number"&&e==null&&(parseInt(o)==o&&parseInt(s)==s?this.move(o,s):(this.x=Math.floor(o+.5),this.y=Math.floor(s+.5)))},c.prototype.move=function(o,s){this.x=o,this.y=s},c.prototype.translate=function(o,s){this.x+=o,this.y+=s},c.prototype.equals=function(o){if(o.constructor.name=="Point"){var s=o;return this.x==s.x&&this.y==s.y}return this==o},c.prototype.toString=function(){return new c().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=c},function(L,_,N){function c(o,s,e,r){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&s!=null&&e!=null&&r!=null&&(this.x=o,this.y=s,this.width=e,this.height=r)}c.prototype.getX=function(){return this.x},c.prototype.setX=function(o){this.x=o},c.prototype.getY=function(){return this.y},c.prototype.setY=function(o){this.y=o},c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(o){this.width=o},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(o){this.height=o},c.prototype.getRight=function(){return this.x+this.width},c.prototype.getBottom=function(){return this.y+this.height},c.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},c.prototype.getCenterX=function(){return this.x+this.width/2},c.prototype.getMinX=function(){return this.getX()},c.prototype.getMaxX=function(){return this.getX()+this.width},c.prototype.getCenterY=function(){return this.y+this.height/2},c.prototype.getMinY=function(){return this.getY()},c.prototype.getMaxY=function(){return this.getY()+this.height},c.prototype.getWidthHalf=function(){return this.width/2},c.prototype.getHeightHalf=function(){return this.height/2},L.exports=c},function(L,_,N){var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(){}o.lastID=0,o.createID=function(s){return o.isPrimitive(s)?s:(s.uniqueID!=null||(s.uniqueID=o.getString(),o.lastID++),s.uniqueID)},o.getString=function(s){return s==null&&(s=o.lastID),"Object#"+s},o.isPrimitive=function(s){var e=s===void 0?"undefined":c(s);return s==null||e!="object"&&e!="function"},L.exports=o},function(L,_,N){function c(g){if(Array.isArray(g)){for(var d=0,y=Array(g.length);d<g.length;d++)y[d]=g[d];return y}return Array.from(g)}var o=N(0),s=N(7),e=N(3),r=N(1),n=N(6),i=N(5),t=N(17),h=N(29);function l(g){h.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}l.RANDOM_SEED=1,l.prototype=Object.create(h.prototype),l.prototype.getGraphManager=function(){return this.graphManager},l.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},l.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},l.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},l.prototype.newGraphManager=function(){var g=new s(this);return this.graphManager=g,g},l.prototype.newGraph=function(g){return new n(null,this.graphManager,g)},l.prototype.newNode=function(g){return new e(this.graphManager,g)},l.prototype.newEdge=function(g){return new r(null,null,g)},l.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},l.prototype.runLayout=function(){var g;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),g=!this.checkLayoutSuccess()&&this.layout(),o.ANIMATE!=="during"&&(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},l.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},l.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),d=0;d<g.length;d++)g[d];var y=this.graphManager.getRoot().getNodes();for(d=0;d<y.length;d++)y[d];this.update(this.graphManager.getRoot())}},l.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof e){var d=g;if(d.getChild()!=null)for(var y=d.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);d.vGraphObject!=null&&d.vGraphObject.update(d)}else if(g instanceof r){var E=g;E.vGraphObject!=null&&E.vGraphObject.update(E)}else if(g instanceof n){var A=g;A.vGraphObject!=null&&A.vGraphObject.update(A)}},l.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},l.prototype.transform=function(g){if(g==null)this.transform(new i(0,0));else{var d=new t,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){d.setWorldOrgX(g.x),d.setWorldOrgY(g.y),d.setDeviceOrgX(y.x),d.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),E=0;E<v.length;E++)v[E].transform(d)}}},l.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var d,y,v=g.getNodes(),E=0;E<v.length;E++)(y=(d=v[E]).getChild())==null||y.getNodes().length==0?d.scatter():(this.positionNodesRandomly(y),d.updateBounds())},l.prototype.getFlatForest=function(){for(var g=[],d=!0,y=this.graphManager.getRoot().getNodes(),v=!0,E=0;E<y.length;E++)y[E].getChild()!=null&&(v=!1);if(!v)return g;var A=new Set,M=[],F=new Map,b=[];for(b=b.concat(y);b.length>0&&d;){for(M.push(b[0]);M.length>0&&d;){var Y=M[0];M.splice(0,1),A.add(Y);var H=Y.getEdges();for(E=0;E<H.length;E++){var q=H[E].getOtherEnd(Y);if(F.get(Y)!=q){if(A.has(q)){d=!1;break}M.push(q),F.set(q,Y)}}}if(d){var x=[].concat(c(A));for(g.push(x),E=0;E<x.length;E++){var B=x[E],a=b.indexOf(B);a>-1&&b.splice(a,1)}A=new Set,F=new Map}else g=[]}return g},l.prototype.createDummyNodesForBendpoints=function(g){for(var d=[],y=g.source,v=this.graphManager.calcLowestCommonAncestor(g.source,g.target),E=0;E<g.bendpoints.length;E++){var A=this.newNode(null);A.setRect(new Point(0,0),new Dimension(1,1)),v.add(A);var M=this.newEdge(null);this.graphManager.add(M,y,A),d.add(A),y=A}return M=this.newEdge(null),this.graphManager.add(M,y,g.target),this.edgeToDummyNodes.set(g,d),g.isInterGraph()?this.graphManager.remove(g):v.remove(g),d},l.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(c(this.edgeToDummyNodes.keys())).concat(g);for(var d=0;d<g.length;d++){var y=g[d];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),E=0;E<v.length;E++){var A=v[E],M=new i(A.getCenterX(),A.getCenterY()),F=y.bendpoints.get(E);F.x=M.x,F.y=M.y,A.getOwner().remove(A)}this.graphManager.add(y,y.source,y.target)}}},l.transform=function(g,d,y,v){if(y!=null&&v!=null){var E=d;return g<=50?E-=(d-d/y)/50*(50-g):E+=(d*v-d)/50*(g-50),E}var A,M;return g<=50?(A=9*d/500,M=d/10):(A=9*d/50,M=-8*d),A*g+M},l.findCenterOfTree=function(g){var d=[];d=d.concat(g);var y=[],v=new Map,E=!1,A=null;d.length!=1&&d.length!=2||(E=!0,A=d[0]);for(var M=0;M<d.length;M++){var F=(H=d[M]).getNeighborsList().size;v.set(H,H.getNeighborsList().size),F==1&&y.push(H)}var b=[];for(b=b.concat(y);!E;){var Y=[];for(Y=Y.concat(b),b=[],M=0;M<d.length;M++){var H=d[M],q=d.indexOf(H);q>=0&&d.splice(q,1),H.getNeighborsList().forEach(function(x){if(y.indexOf(x)<0){var B=v.get(x)-1;B==1&&b.push(x),v.set(x,B)}})}y=y.concat(b),d.length!=1&&d.length!=2||(E=!0,A=d[0])}return A},l.prototype.setGraphManager=function(g){this.graphManager=g},L.exports=l},function(L,_,N){function c(){}c.seed=1,c.x=0,c.nextDouble=function(){return c.x=1e4*Math.sin(c.seed++),c.x-Math.floor(c.x)},L.exports=c},function(L,_,N){var c=N(5);function o(s,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}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/r),e},o.prototype.transformY=function(s){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/r),e},o.prototype.inverseTransformX=function(s){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/r),e},o.prototype.inverseTransformY=function(s){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/r),e},o.prototype.inverseTransformPoint=function(s){return new c(this.inverseTransformX(s.x),this.inverseTransformY(s.y))},L.exports=o},function(L,_,N){var c=N(15),o=N(4),s=N(0),e=N(8),r=N(9);function n(){c.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}for(var i in n.prototype=Object.create(c.prototype),c)n[i]=c[i];n.prototype.initParameters=function(){c.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var t,h,l,g,d,y,v,E=this.getGraphManager().getAllEdges(),A=0;A<E.length;A++)h=(t=E[A]).idealLength,t.isInterGraph&&(g=t.getSource(),d=t.getTarget(),y=t.getSourceInLca().getEstimatedSize(),v=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=y+v-2*s.SIMPLE_NODE_SIZE),l=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*l))},n.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var t,h=this.getAllEdges(),l=0;l<h.length;l++)t=h[l],this.calcSpringForce(t,t.idealLength)},n.prototype.calcRepulsionForces=function(){var t,h,l,g,d,y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],v=arguments.length>1&&arguments[1]!==void 0&&arguments[1],E=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&y&&this.updateGrid(),d=new Set,t=0;t<E.length;t++)l=E[t],this.calculateRepulsionForceOfANode(l,d,y,v),d.add(l);else for(t=0;t<E.length;t++)for(l=E[t],h=t+1;h<E.length;h++)g=E[h],l.getOwner()==g.getOwner()&&this.calcRepulsionForce(l,g)},n.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),l=0;l<h.length;l++)t=h[l],this.calcGravitationalForce(t)},n.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h=0;h<t.length;h++)t[h].move()},n.prototype.calcSpringForce=function(t,h){var l,g,d,y,v=t.getSource(),E=t.getTarget();if(this.uniformLeafNodeSizes&&v.getChild()==null&&E.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;(l=t.getLength())!=0&&(d=(g=t.edgeElasticity*(l-h))*(t.lengthX/l),y=g*(t.lengthY/l),v.springForceX+=d,v.springForceY+=y,E.springForceX-=d,E.springForceY-=y)},n.prototype.calcRepulsionForce=function(t,h){var l,g,d,y,v,E,A,M=t.getRect(),F=h.getRect(),b=new Array(2),Y=new Array(4);if(M.intersects(F)){e.calcSeparationAmount(M,F,b,o.DEFAULT_EDGE_LENGTH/2),E=2*b[0],A=2*b[1];var H=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=H*E,t.repulsionForceY-=H*A,h.repulsionForceX+=H*E,h.repulsionForceY+=H*A}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(l=F.getCenterX()-M.getCenterX(),g=F.getCenterY()-M.getCenterY()):(e.getIntersection(M,F,Y),l=Y[2]-Y[0],g=Y[3]-Y[1]),Math.abs(l)<o.MIN_REPULSION_DIST&&(l=r.sign(l)*o.MIN_REPULSION_DIST),Math.abs(g)<o.MIN_REPULSION_DIST&&(g=r.sign(g)*o.MIN_REPULSION_DIST),d=l*l+g*g,y=Math.sqrt(d),E=(v=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/d)*l/y,A=v*g/y,t.repulsionForceX-=E,t.repulsionForceY-=A,h.repulsionForceX+=E,h.repulsionForceY+=A},n.prototype.calcGravitationalForce=function(t){var h,l,g,d,y,v,E,A;l=((h=t.getOwner()).getRight()+h.getLeft())/2,g=(h.getTop()+h.getBottom())/2,d=t.getCenterX()-l,y=t.getCenterY()-g,v=Math.abs(d)+t.getWidth()/2,E=Math.abs(y)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(v>(A=h.getEstimatedSize()*this.gravityRangeFactor)||E>A)&&(t.gravitationForceX=-this.gravityConstant*d,t.gravitationForceY=-this.gravityConstant*y):(v>(A=h.getEstimatedSize()*this.compoundGravityRangeFactor)||E>A)&&(t.gravitationForceX=-this.gravityConstant*d*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant)},n.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,h=this.graphManager.getAllNodes(),l=0;l<h.length;l++)(t=h[l]).noOfChildren=t.getNoOfChildren()},n.prototype.calcGrid=function(t){var h,l;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var g=new Array(h),d=0;d<h;d++)g[d]=new Array(l);for(d=0;d<h;d++)for(var y=0;y<l;y++)g[d][y]=new Array;return g},n.prototype.addNodeToGrid=function(t,h,l){var g,d,y,v;g=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),d=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),y=parseInt(Math.floor((t.getRect().y-l)/this.repulsionRange)),v=parseInt(Math.floor((t.getRect().height+t.getRect().y-l)/this.repulsionRange));for(var E=g;E<=d;E++)for(var A=y;A<=v;A++)this.grid[E][A].push(t),t.setGridCoordinates(g,d,y,v)},n.prototype.updateGrid=function(){var t,h,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<l.length;t++)h=l[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(t,h,l,g){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&l||g){var d,y=new Set;t.surrounding=new Array;for(var v=this.grid,E=t.startX-1;E<t.finishX+2;E++)for(var A=t.startY-1;A<t.finishY+2;A++)if(!(E<0||A<0||E>=v.length||A>=v[0].length)){for(var M=0;M<v[E][A].length;M++)if(d=v[E][A][M],t.getOwner()==d.getOwner()&&t!=d&&!h.has(d)&&!y.has(d)){var F=Math.abs(t.getCenterX()-d.getCenterX())-(t.getWidth()/2+d.getWidth()/2),b=Math.abs(t.getCenterY()-d.getCenterY())-(t.getHeight()/2+d.getHeight()/2);F<=this.repulsionRange&&b<=this.repulsionRange&&y.add(d)}}t.surrounding=[].concat(function(Y){if(Array.isArray(Y)){for(var H=0,q=Array(Y.length);H<Y.length;H++)q[H]=Y[H];return q}return Array.from(Y)}(y))}for(E=0;E<t.surrounding.length;E++)this.calcRepulsionForce(t,t.surrounding[E])},n.prototype.calcRepulsionRange=function(){return 0},L.exports=n},function(L,_,N){var c=N(1),o=N(4);function s(r,n,i){c.call(this,r,n,i),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}for(var e in s.prototype=Object.create(c.prototype),c)s[e]=c[e];L.exports=s},function(L,_,N){var c=N(3),o=N(4);function s(r,n,i,t){c.call(this,r,n,i,t),this.nodeRepulsion=o.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=[]}for(var e in s.prototype=Object.create(c.prototype),c)s[e]=c[e];s.prototype.setGridCoordinates=function(r,n,i,t){this.startX=r,this.finishX=n,this.startY=i,this.finishY=t},L.exports=s},function(L,_,N){function c(o,s){this.width=0,this.height=0,o!==null&&s!==null&&(this.height=s,this.width=o)}c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(o){this.width=o},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(o){this.height=o},L.exports=c},function(L,_,N){var c=N(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(s,e){var r=c.createID(s);this.contains(r)||(this.map[r]=e,this.keys.push(s))},o.prototype.contains=function(s){return c.createID(s),this.map[s]!=null},o.prototype.get=function(s){var e=c.createID(s);return this.map[e]},o.prototype.keySet=function(){return this.keys},L.exports=o},function(L,_,N){var c=N(14);function o(){this.set={}}o.prototype.add=function(s){var e=c.createID(s);this.contains(e)||(this.set[e]=s)},o.prototype.remove=function(s){delete this.set[c.createID(s)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(s){return this.set[c.createID(s)]==s},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(s){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)s.push(this.set[e[n]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(s){for(var e=s.length,r=0;r<e;r++){var n=s[r];this.add(n)}},L.exports=o},function(L,_,N){function c(){}c.multMat=function(o,s){for(var e=[],r=0;r<o.length;r++){e[r]=[];for(var n=0;n<s[0].length;n++){e[r][n]=0;for(var i=0;i<o[0].length;i++)e[r][n]+=o[r][i]*s[i][n]}}return e},c.transpose=function(o){for(var s=[],e=0;e<o[0].length;e++){s[e]=[];for(var r=0;r<o.length;r++)s[e][r]=o[r][e]}return s},c.multCons=function(o,s){for(var e=[],r=0;r<o.length;r++)e[r]=o[r]*s;return e},c.minusOp=function(o,s){for(var e=[],r=0;r<o.length;r++)e[r]=o[r]-s[r];return e},c.dotProduct=function(o,s){for(var e=0,r=0;r<o.length;r++)e+=o[r]*s[r];return e},c.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},c.normalize=function(o){for(var s=[],e=this.mag(o),r=0;r<o.length;r++)s[r]=o[r]/e;return s},c.multGamma=function(o){for(var s=[],e=0,r=0;r<o.length;r++)e+=o[r];e*=-1/o.length;for(var n=0;n<o.length;n++)s[n]=e+o[n];return s},c.multL=function(o,s,e){for(var r=[],n=[],i=[],t=0;t<s[0].length;t++){for(var h=0,l=0;l<s.length;l++)h+=-.5*s[l][t]*o[l];n[t]=h}for(var g=0;g<e.length;g++){for(var d=0,y=0;y<e.length;y++)d+=e[g][y]*n[y];i[g]=d}for(var v=0;v<s.length;v++){for(var E=0,A=0;A<s[0].length;A++)E+=s[v][A]*i[A];r[v]=E}return r},L.exports=c},function(L,_,N){var c=function(){function e(r,n){for(var i=0;i<n.length;i++){var t=n[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}return function(r,n,i){return n&&e(r.prototype,n),i&&e(r,i),r}}(),o=N(11),s=function(){function e(r,n){(function(t,h){if(!(t instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),n===null&&n===void 0||(this.compareFunction=this._defaultCompareFunction);var i=void 0;i=r instanceof o?r.size():r.length,this._quicksort(r,0,i-1)}return c(e,[{key:"_quicksort",value:function(r,n,i){if(n<i){var t=this._partition(r,n,i);this._quicksort(r,n,t),this._quicksort(r,t+1,i)}}},{key:"_partition",value:function(r,n,i){for(var t=this._get(r,n),h=n,l=i;;){for(;this.compareFunction(t,this._get(r,l));)l--;for(;this.compareFunction(this._get(r,h),t);)h++;if(!(h<l))return l;this._swap(r,h,l),h++,l--}}},{key:"_get",value:function(r,n){return r instanceof o?r.get_object_at(n):r[n]}},{key:"_set",value:function(r,n,i){r instanceof o?r.set_object_at(n,i):r[n]=i}},{key:"_swap",value:function(r,n,i){var t=this._get(r,n);this._set(r,n,this._get(r,i)),this._set(r,i,t)}},{key:"_defaultCompareFunction",value:function(r,n){return n>r}}]),e}();L.exports=s},function(L,_,N){function c(){}c.svd=function(o){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=o.length,this.n=o[0].length;var s=Math.min(this.m,this.n);this.s=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(Math.min(this.m+1,this.n)),this.U=function wt(ut){if(ut.length==0)return 0;for(var Pt=[],Mt=0;Mt<ut[0];Mt++)Pt.push(wt(ut.slice(1)));return Pt}([this.m,s]),this.V=function(wt){return function ut(Pt){if(Pt.length==0)return 0;for(var Mt=[],Ht=0;Ht<Pt[0];Ht++)Mt.push(ut(Pt.slice(1)));return Mt}(wt)}([this.n,this.n]);for(var e=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(this.n),r=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(this.m),n=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(n,i);t++){if(t<n){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=c.hypot(this.s[t],o[h][t]);if(this.s[t]!==0){o[t][t]<0&&(this.s[t]=-this.s[t]);for(var l=t;l<this.m;l++)o[l][t]/=this.s[t];o[t][t]+=1}this.s[t]=-this.s[t]}for(var g=t+1;g<this.n;g++){if(function(wt,ut){return wt&&ut}(t<n,this.s[t]!==0)){for(var d=0,y=t;y<this.m;y++)d+=o[y][t]*o[y][g];d=-d/o[t][t];for(var v=t;v<this.m;v++)o[v][g]+=d*o[v][t]}e[g]=o[t][g]}if(function(wt,ut){return ut}(0,t<n))for(var E=t;E<this.m;E++)this.U[E][t]=o[E][t];if(t<i){e[t]=0;for(var A=t+1;A<this.n;A++)e[t]=c.hypot(e[t],e[A]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var M=t+1;M<this.n;M++)e[M]/=e[t];e[t+1]+=1}if(e[t]=-e[t],function(wt,ut){return wt&&ut}(t+1<this.m,e[t]!==0)){for(var F=t+1;F<this.m;F++)r[F]=0;for(var b=t+1;b<this.n;b++)for(var Y=t+1;Y<this.m;Y++)r[Y]+=e[b]*o[Y][b];for(var H=t+1;H<this.n;H++)for(var q=-e[H]/e[t+1],x=t+1;x<this.m;x++)o[x][H]+=q*r[x]}for(var B=t+1;B<this.n;B++)this.V[B][t]=e[B]}}var a=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=o[n][n]),this.m<a&&(this.s[a-1]=0),i+1<a&&(e[i]=o[i][a-1]),e[a-1]=0;for(var m=n;m<s;m++){for(var u=0;u<this.m;u++)this.U[u][m]=0;this.U[m][m]=1}for(var f=n-1;f>=0;f--)if(this.s[f]!==0){for(var p=f+1;p<s;p++){for(var w=0,I=f;I<this.m;I++)w+=this.U[I][f]*this.U[I][p];w=-w/this.U[f][f];for(var C=f;C<this.m;C++)this.U[C][p]+=w*this.U[C][f]}for(var G=f;G<this.m;G++)this.U[G][f]=-this.U[G][f];this.U[f][f]=1+this.U[f][f];for(var S=0;S<f-1;S++)this.U[S][f]=0}else{for(var P=0;P<this.m;P++)this.U[P][f]=0;this.U[f][f]=1}for(var D=this.n-1;D>=0;D--){if(function(wt,ut){return wt&&ut}(D<i,e[D]!==0))for(var z=D+1;z<s;z++){for(var W=0,U=D+1;U<this.n;U++)W+=this.V[U][D]*this.V[U][z];W=-W/this.V[D+1][D];for(var O=D+1;O<this.n;O++)this.V[O][z]+=W*this.V[O][D]}for(var X=0;X<this.n;X++)this.V[X][D]=0;this.V[D][D]=1}for(var j=a-1,tt=Math.pow(2,-52),ot=Math.pow(2,-966);a>0;){var V=void 0,Et=void 0;for(V=a-2;V>=-1&&V!==-1;V--)if(Math.abs(e[V])<=ot+tt*(Math.abs(this.s[V])+Math.abs(this.s[V+1]))){e[V]=0;break}if(V===a-2)Et=4;else{var It=void 0;for(It=a-1;It>=V&&It!==V;It--){var kt=(It!==a?Math.abs(e[It]):0)+(It!==V+1?Math.abs(e[It-1]):0);if(Math.abs(this.s[It])<=ot+tt*kt){this.s[It]=0;break}}It===V?Et=3:It===a-1?Et=1:(Et=2,V=It)}switch(V++,Et){case 1:var bt=e[a-2];e[a-2]=0;for(var K=a-2;K>=V;K--){var it=c.hypot(this.s[K],bt),pt=this.s[K]/it,ct=bt/it;this.s[K]=it,K!==V&&(bt=-ct*e[K-1],e[K-1]=pt*e[K-1]);for(var yt=0;yt<this.n;yt++)it=pt*this.V[yt][K]+ct*this.V[yt][a-1],this.V[yt][a-1]=-ct*this.V[yt][K]+pt*this.V[yt][a-1],this.V[yt][K]=it}break;case 2:var Nt=e[V-1];e[V-1]=0;for(var ht=V;ht<a;ht++){var At=c.hypot(this.s[ht],Nt),Ot=this.s[ht]/At,Dt=Nt/At;this.s[ht]=At,Nt=-Dt*e[ht],e[ht]=Ot*e[ht];for(var xt=0;xt<this.m;xt++)At=Ot*this.U[xt][ht]+Dt*this.U[xt][V-1],this.U[xt][V-1]=-Dt*this.U[xt][ht]+Ot*this.U[xt][V-1],this.U[xt][ht]=At}break;case 3:var Ct=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[a-1]),Math.abs(this.s[a-2])),Math.abs(e[a-2])),Math.abs(this.s[V])),Math.abs(e[V])),R=this.s[a-1]/Ct,k=this.s[a-2]/Ct,J=e[a-2]/Ct,Q=this.s[V]/Ct,at=e[V]/Ct,_t=((k+R)*(k-R)+J*J)/2,nt=R*J*(R*J),vt=0;(function(wt,ut){return wt||ut})(_t!==0,nt!==0)&&(vt=Math.sqrt(_t*_t+nt),_t<0&&(vt=-vt),vt=nt/(_t+vt));for(var ft=(Q+R)*(Q-R)+vt,Ut=Q*at,rt=V;rt<a-1;rt++){var mt=c.hypot(ft,Ut),lt=ft/mt,$=Ut/mt;rt!==V&&(e[rt-1]=mt),ft=lt*this.s[rt]+$*e[rt],e[rt]=lt*e[rt]-$*this.s[rt],Ut=$*this.s[rt+1],this.s[rt+1]=lt*this.s[rt+1];for(var gt=0;gt<this.n;gt++)mt=lt*this.V[gt][rt]+$*this.V[gt][rt+1],this.V[gt][rt+1]=-$*this.V[gt][rt]+lt*this.V[gt][rt+1],this.V[gt][rt]=mt;if(lt=ft/(mt=c.hypot(ft,Ut)),$=Ut/mt,this.s[rt]=mt,ft=lt*e[rt]+$*this.s[rt+1],this.s[rt+1]=-$*e[rt]+lt*this.s[rt+1],Ut=$*e[rt+1],e[rt+1]=lt*e[rt+1],rt<this.m-1)for(var Tt=0;Tt<this.m;Tt++)mt=lt*this.U[Tt][rt]+$*this.U[Tt][rt+1],this.U[Tt][rt+1]=-$*this.U[Tt][rt]+lt*this.U[Tt][rt+1],this.U[Tt][rt]=mt}e[a-2]=ft;break;case 4:if(this.s[V]<=0){this.s[V]=this.s[V]<0?-this.s[V]:0;for(var st=0;st<=j;st++)this.V[st][V]=-this.V[st][V]}for(;V<j&&!(this.s[V]>=this.s[V+1]);){var Ft=this.s[V];if(this.s[V]=this.s[V+1],this.s[V+1]=Ft,V<this.n-1)for(var Gt=0;Gt<this.n;Gt++)Ft=this.V[Gt][V+1],this.V[Gt][V+1]=this.V[Gt][V],this.V[Gt][V]=Ft;if(V<this.m-1)for(var Rt=0;Rt<this.m;Rt++)Ft=this.U[Rt][V+1],this.U[Rt][V+1]=this.U[Rt][V],this.U[Rt][V]=Ft;V++}a--}}return{U:this.U,V:this.V,S:this.s}},c.hypot=function(o,s){var e=void 0;return Math.abs(o)>Math.abs(s)?(e=s/o,e=Math.abs(o)*Math.sqrt(1+e*e)):s!=0?(e=o/s,e=Math.abs(s)*Math.sqrt(1+e*e)):e=0,e},L.exports=c},function(L,_,N){var c=function(){function s(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&s(e.prototype,r),n&&s(e,n),e}}(),o=function(){function s(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")})(this,s),this.sequence1=e,this.sequence2=r,this.match_score=n,this.mismatch_penalty=i,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[h][l]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[g][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return c(s,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var i=1;i<this.jMax;i++){var t=[this.sequence1[n-1]===this.sequence2[i-1]?this.grid[n-1][i-1]+this.match_score:this.grid[n-1][i-1]+this.mismatch_penalty,this.grid[n-1][i]+this.gap_penalty,this.grid[n][i-1]+this.gap_penalty],h=this.arrayAllMaxIndexes(t);this.grid[n][i]=t[h[0]],this.tracebackGrid[n][i]=[h.includes(0),h.includes(1),h.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var r=e[0],n=this.tracebackGrid[r.pos[0]][r.pos[1]];n[0]&&e.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),n[1]&&e.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),n[2]&&e.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,r){for(var n=[],i=-1;(i=e.indexOf(r,i+1))!==-1;)n.push(i);return n}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),s}();L.exports=o},function(L,_,N){var c=function(){};c.FDLayout=N(18),c.FDLayoutConstants=N(4),c.FDLayoutEdge=N(19),c.FDLayoutNode=N(20),c.DimensionD=N(21),c.HashMap=N(22),c.HashSet=N(23),c.IGeometry=N(8),c.IMath=N(9),c.Integer=N(10),c.Point=N(12),c.PointD=N(5),c.RandomSeed=N(16),c.RectangleD=N(13),c.Transform=N(17),c.UniqueIDGeneretor=N(14),c.Quicksort=N(25),c.LinkedList=N(11),c.LGraphObject=N(2),c.LGraph=N(6),c.LEdge=N(1),c.LGraphManager=N(7),c.LNode=N(3),c.Layout=N(15),c.LayoutConstants=N(0),c.NeedlemanWunsch=N(27),c.Matrix=N(24),c.SVD=N(26),L.exports=c},function(L,_,N){function c(){this.listeners=[]}var o=c.prototype;o.addListener=function(s,e){this.listeners.push({event:s,callback:e})},o.removeListener=function(s,e){for(var r=this.listeners.length;r>=0;r--){var n=this.listeners[r];n.event===s&&n.callback===e&&this.listeners.splice(r,1)}},o.emit=function(s,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];s===n.event&&n.callback(e)}},L.exports=c}])},_e.exports=T());var T}var Me;function gr(){return Me?Ie.exports:(Me=1,T=function(L){return _={45:(o,s,e)=>{var r={};r.layoutBase=e(551),r.CoSEConstants=e(806),r.CoSEEdge=e(767),r.CoSEGraph=e(880),r.CoSEGraphManager=e(578),r.CoSELayout=e(765),r.CoSENode=e(991),r.ConstraintHandler=e(902),o.exports=r},806:(o,s,e)=>{var r=e(551).FDLayoutConstants;function n(){}for(var i in r)n[i]=r[i];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,o.exports=n},767:(o,s,e)=>{var r=e(551).FDLayoutEdge;function n(t,h,l){r.call(this,t,h,l)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},880:(o,s,e)=>{var r=e(551).LGraph;function n(t,h,l){r.call(this,t,h,l)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},578:(o,s,e)=>{var r=e(551).LGraphManager;function n(t){r.call(this,t)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},765:(o,s,e)=>{var r=e(551).FDLayout,n=e(578),i=e(880),t=e(991),h=e(767),l=e(806),g=e(902),d=e(551).FDLayoutConstants,y=e(551).LayoutConstants,v=e(551).Point,E=e(551).PointD,A=e(551).DimensionD,M=e(551).Layout,F=e(551).Integer,b=e(551).IGeometry,Y=e(551).LGraph,H=e(551).Transform,q=e(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var B in x.prototype=Object.create(r.prototype),r)x[B]=r[B];x.prototype.newGraphManager=function(){var a=new n(this);return this.graphManager=a,a},x.prototype.newGraph=function(a){return new i(null,this.graphManager,a)},x.prototype.newNode=function(a){return new t(this.graphManager,a)},x.prototype.newEdge=function(a){return new h(null,null,a)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return y.DEFAULT_CREATE_BENDS_AS_NEEDED&&(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)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(f){return m.has(f)}),this.graphManager.setAllNodesToApplyGravitation(u));else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(f){return m.has(f)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.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))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return a.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),l.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),l.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,f=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,f),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),m={},u=0;u<a.length;u++){var f=a[u].rect,p=a[u].id;m[p]={id:p,x:f.getCenterX(),y:f.getCenterY(),w:f.width,h:f.height}}return m},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var a=this.getAllNodes(),m=0;m<a.length;m++)a[m].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),m=0;m<a.length;m++)a[m].move()},x.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),u=0;u<m.length;u++){var f=m[u];this.idToNodeMap.set(f.id,f)}var p=function O(X){for(var j,tt=X.getChild().getNodes(),ot=0,V=0;V<tt.length;V++)(j=tt[V]).getChild()==null?a.fixedNodeSet.has(j.id)&&(ot+=100):ot+=O(j);return ot};if(this.constraints.fixedNodeConstraint){for(this.constraints.fixedNodeConstraint.forEach(function(O){a.fixedNodeSet.add(O.nodeId)}),m=this.graphManager.getAllNodes(),u=0;u<m.length;u++)if((f=m[u]).getChild()!=null){var w=p(f);w>0&&(f.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var I=new Map,C=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var G=this.constraints.alignmentConstraint.vertical;for(u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(O){I.set(O,"dummy"+u),a.dummyToNodeForVerticalAlignment.get("dummy"+u).push(O),a.fixedNodeSet.has(O)&&a.fixedNodesOnHorizontal.add("dummy"+u)})}if(this.constraints.alignmentConstraint.horizontal){var S=this.constraints.alignmentConstraint.horizontal;for(u=0;u<S.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),S[u].forEach(function(O){C.set(O,"dummy"+u),a.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(O),a.fixedNodeSet.has(O)&&a.fixedNodesOnVertical.add("dummy"+u)})}}if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var X,j,tt;for(tt=O.length-1;tt>=2*O.length/3;tt--)X=Math.floor(Math.random()*(tt+1)),j=O[tt],O[tt]=O[X],O[X]=j;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(X)||(a.nodesInRelativeHorizontal.push(X),a.nodeToRelativeConstraintMapHorizontal.set(X,[]),a.dummyToNodeForVerticalAlignment.has(X)?a.nodeToTempPositionMapHorizontal.set(X,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(X,a.idToNodeMap.get(X).getCenterX())),a.nodesInRelativeHorizontal.includes(j)||(a.nodesInRelativeHorizontal.push(j),a.nodeToRelativeConstraintMapHorizontal.set(j,[]),a.dummyToNodeForVerticalAlignment.has(j)?a.nodeToTempPositionMapHorizontal.set(j,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(j)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(j,a.idToNodeMap.get(j).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(X).push({right:j,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(j).push({left:X,gap:O.gap})}else{var tt=C.has(O.top)?C.get(O.top):O.top,ot=C.has(O.bottom)?C.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(tt)||(a.nodesInRelativeVertical.push(tt),a.nodeToRelativeConstraintMapVertical.set(tt,[]),a.dummyToNodeForHorizontalAlignment.has(tt)?a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(tt).getCenterY())),a.nodesInRelativeVertical.includes(ot)||(a.nodesInRelativeVertical.push(ot),a.nodeToRelativeConstraintMapVertical.set(ot,[]),a.dummyToNodeForHorizontalAlignment.has(ot)?a.nodeToTempPositionMapVertical.set(ot,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(ot)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(ot,a.idToNodeMap.get(ot).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ot,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(ot).push({top:tt,gap:O.gap})}});else{var P=new Map,D=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;P.has(X)?P.get(X).push(j):P.set(X,[j]),P.has(j)?P.get(j).push(X):P.set(j,[X])}else{var tt=C.has(O.top)?C.get(O.top):O.top,ot=C.has(O.bottom)?C.get(O.bottom):O.bottom;D.has(tt)?D.get(tt).push(ot):D.set(tt,[ot]),D.has(ot)?D.get(ot).push(tt):D.set(ot,[tt])}});var z=function(O,X){var j=[],tt=[],ot=new q,V=new Set,Et=0;return O.forEach(function(It,kt){if(!V.has(kt)){j[Et]=[],tt[Et]=!1;var bt=kt;for(ot.push(bt),V.add(bt),j[Et].push(bt);ot.length!=0;)bt=ot.shift(),X.has(bt)&&(tt[Et]=!0),O.get(bt).forEach(function(K){V.has(K)||(ot.push(K),V.add(K),j[Et].push(K))});Et++}}),{components:j,isFixed:tt}},W=z(P,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=W.components,this.fixedComponentsOnHorizontal=W.isFixed;var U=z(D,a.fixedNodesOnVertical);this.componentsOnVertical=U.components,this.fixedComponentsOnVertical=U.isFixed}}},x.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(U){var O=a.idToNodeMap.get(U.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,u=0;u<m.length;u++){for(var f=0,p=0;p<m[u].length;p++){if(this.fixedNodeSet.has(m[u][p])){f=0;break}f+=this.idToNodeMap.get(m[u][p]).displacementX}var w=f/m[u].length;for(p=0;p<m[u].length;p++)this.idToNodeMap.get(m[u][p]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal){var I=this.constraints.alignmentConstraint.horizontal;for(u=0;u<I.length;u++){var C=0;for(p=0;p<I[u].length;p++){if(this.fixedNodeSet.has(I[u][p])){C=0;break}C+=this.idToNodeMap.get(I[u][p]).displacementY}var G=C/I[u].length;for(p=0;p<I[u].length;p++)this.idToNodeMap.get(I[u][p]).displacementY=G}}}if(this.constraints.relativePlacementConstraint)if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(U){if(!a.fixedNodesOnHorizontal.has(U)){var O=0;O=a.dummyToNodeForVerticalAlignment.has(U)?a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(U)[0]).displacementX:a.idToNodeMap.get(U).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(U).forEach(function(X){var j;X.right?(j=a.nodeToTempPositionMapHorizontal.get(X.right)-a.nodeToTempPositionMapHorizontal.get(U)-O)<X.gap&&(O-=X.gap-j):(j=a.nodeToTempPositionMapHorizontal.get(U)-a.nodeToTempPositionMapHorizontal.get(X.left)+O)<X.gap&&(O+=X.gap-j)}),a.nodeToTempPositionMapHorizontal.set(U,a.nodeToTempPositionMapHorizontal.get(U)+O),a.dummyToNodeForVerticalAlignment.has(U)?a.dummyToNodeForVerticalAlignment.get(U).forEach(function(X){a.idToNodeMap.get(X).displacementX=O}):a.idToNodeMap.get(U).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(U){if(!a.fixedNodesOnHorizontal.has(U)){var O=0;O=a.dummyToNodeForHorizontalAlignment.has(U)?a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(U)[0]).displacementY:a.idToNodeMap.get(U).displacementY,a.nodeToRelativeConstraintMapVertical.get(U).forEach(function(X){var j;X.bottom?(j=a.nodeToTempPositionMapVertical.get(X.bottom)-a.nodeToTempPositionMapVertical.get(U)-O)<X.gap&&(O-=X.gap-j):(j=a.nodeToTempPositionMapVertical.get(U)-a.nodeToTempPositionMapVertical.get(X.top)+O)<X.gap&&(O+=X.gap-j)}),a.nodeToTempPositionMapVertical.set(U,a.nodeToTempPositionMapVertical.get(U)+O),a.dummyToNodeForHorizontalAlignment.has(U)?a.dummyToNodeForHorizontalAlignment.get(U).forEach(function(X){a.idToNodeMap.get(X).displacementY=O}):a.idToNodeMap.get(U).displacementY=O}});else{for(u=0;u<this.componentsOnHorizontal.length;u++){var S=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?this.dummyToNodeForVerticalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementX=0}):this.idToNodeMap.get(S[p]).displacementX=0;else{var P=0,D=0;for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?(P+=(W=this.dummyToNodeForVerticalAlignment.get(S[p])).length*this.idToNodeMap.get(W[0]).displacementX,D+=W.length):(P+=this.idToNodeMap.get(S[p]).displacementX,D++);var z=P/D;for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?this.dummyToNodeForVerticalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementX=z}):this.idToNodeMap.get(S[p]).displacementX=z}}for(u=0;u<this.componentsOnVertical.length;u++)if(S=this.componentsOnVertical[u],this.fixedComponentsOnVertical[u])for(p=0;p<S.length;p++)this.dummyToNodeForHorizontalAlignment.has(S[p])?this.dummyToNodeForHorizontalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementY=0}):this.idToNodeMap.get(S[p]).displacementY=0;else{for(P=0,D=0,p=0;p<S.length;p++){var W;this.dummyToNodeForHorizontalAlignment.has(S[p])?(P+=(W=this.dummyToNodeForHorizontalAlignment.get(S[p])).length*this.idToNodeMap.get(W[0]).displacementY,D+=W.length):(P+=this.idToNodeMap.get(S[p]).displacementY,D++)}for(z=P/D,p=0;p<S.length;p++)this.dummyToNodeForHorizontalAlignment.has(S[p])?this.dummyToNodeForHorizontalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementY=z}):this.idToNodeMap.get(S[p]).displacementY=z}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var a,m,u=[],f=this.graphManager.getGraphs(),p=f.length;for(m=0;m<p;m++)(a=f[m]).updateConnected(),a.isConnected||(u=u.concat(a.getNodes()));return u},x.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var m,u=new Set;for(m=0;m<a.length;m++){var f=a[m];if(!u.has(f)){var p=f.getSource(),w=f.getTarget();if(p==w)f.getBendpoints().push(new E),f.getBendpoints().push(new E),this.createDummyNodesForBendpoints(f),u.add(f);else{var I=[];if(I=(I=I.concat(p.getEdgeListToNode(w))).concat(w.getEdgeListToNode(p)),!u.has(I[0])){var C;if(I.length>1)for(C=0;C<I.length;C++){var G=I[C];G.getBendpoints().push(new E),this.createDummyNodesForBendpoints(G)}I.forEach(function(S){u.add(S)})}}}if(u.size==a.length)break}},x.prototype.positionNodesRadially=function(a){for(var m=new v(0,0),u=Math.ceil(Math.sqrt(a.length)),f=0,p=0,w=0,I=new E(0,0),C=0;C<a.length;C++){C%u==0&&(w=0,p=f,C!=0&&(p+=l.DEFAULT_COMPONENT_SEPERATION),f=0);var G=a[C],S=M.findCenterOfTree(G);m.x=w,m.y=p,(I=x.radialLayout(G,S,m)).y>f&&(f=Math.floor(I.y)),w=Math.floor(I.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new E(y.WORLD_CENTER_X-I.x/2,y.WORLD_CENTER_Y-I.y/2))},x.radialLayout=function(a,m,u){var f=Math.max(this.maxDiagonalInTree(a),l.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,f);var p=Y.calculateBounds(a),w=new H;w.setDeviceOrgX(p.getMinX()),w.setDeviceOrgY(p.getMinY()),w.setWorldOrgX(u.x),w.setWorldOrgY(u.y);for(var I=0;I<a.length;I++)a[I].transform(w);var C=new E(p.getMaxX(),p.getMaxY());return w.inverseTransformPoint(C)},x.branchRadialLayout=function(a,m,u,f,p,w){var I=(f-u+1)/2;I<0&&(I+=180);var C=(I+u)%360*b.TWO_PI/360,G=p*Math.cos(C),S=p*Math.sin(C);a.setCenter(G,S);var P=[],D=(P=P.concat(a.getEdges())).length;m!=null&&D--;for(var z,W=0,U=P.length,O=a.getEdgesBetween(m);O.length>1;){var X=O[0];O.splice(0,1);var j=P.indexOf(X);j>=0&&P.splice(j,1),U--,D--}z=m!=null?(P.indexOf(O[0])+1)%U:0;for(var tt=Math.abs(f-u)/D,ot=z;W!=D;ot=++ot%U){var V=P[ot].getOtherEnd(a);if(V!=m){var Et=(u+W*tt)%360,It=(Et+tt)%360;x.branchRadialLayout(V,a,Et,It,p+w,w),W++}}},x.maxDiagonalInTree=function(a){for(var m=F.MIN_VALUE,u=0;u<a.length;u++){var f=a[u].getDiagonal();f>m&&(m=f)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var a=this,m={};this.memberGroups={},this.idToDummyNode={};for(var u=[],f=this.graphManager.getAllNodes(),p=0;p<f.length;p++){var w=(I=f[p]).getParent();this.getNodeDegreeWithChildren(I)!==0||w.id!=null&&this.getToBeTiled(w)||u.push(I)}for(p=0;p<u.length;p++){var I,C=(I=u[p]).getParent().id;m[C]===void 0&&(m[C]=[]),m[C]=m[C].concat(I)}Object.keys(m).forEach(function(G){if(m[G].length>1){var S="DummyCompound_"+G;a.memberGroups[S]=m[G];var P=m[G][0].getParent(),D=new t(a.graphManager);D.id=S,D.paddingLeft=P.paddingLeft||0,D.paddingRight=P.paddingRight||0,D.paddingBottom=P.paddingBottom||0,D.paddingTop=P.paddingTop||0,a.idToDummyNode[S]=D;var z=a.getGraphManager().add(a.newGraph(),D),W=P.getChild();W.add(D);for(var U=0;U<m[G].length;U++){var O=m[G][U];W.remove(O),z.add(O)}}})},x.prototype.clearCompounds=function(){var a={},m={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)m[this.compoundOrder[u].id]=this.compoundOrder[u],a[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,m)},x.prototype.clearZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var f=a.idToDummyNode[u];if(m[u]=a.tileNodes(a.memberGroups[u],f.paddingLeft+f.paddingRight),f.rect.width=m[u].width,f.rect.height=m[u].height,f.setCenter(m[u].centerX,m[u].centerY),f.labelMarginLeft=0,f.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var p=f.rect.width,w=f.rect.height;f.labelWidth&&(f.labelPosHorizontal=="left"?(f.rect.x-=f.labelWidth,f.setWidth(p+f.labelWidth),f.labelMarginLeft=f.labelWidth):f.labelPosHorizontal=="center"&&f.labelWidth>p?(f.rect.x-=(f.labelWidth-p)/2,f.setWidth(f.labelWidth),f.labelMarginLeft=(f.labelWidth-p)/2):f.labelPosHorizontal=="right"&&f.setWidth(p+f.labelWidth)),f.labelHeight&&(f.labelPosVertical=="top"?(f.rect.y-=f.labelHeight,f.setHeight(w+f.labelHeight),f.labelMarginTop=f.labelHeight):f.labelPosVertical=="center"&&f.labelHeight>w?(f.rect.y-=(f.labelHeight-w)/2,f.setHeight(f.labelHeight),f.labelMarginTop=(f.labelHeight-w)/2):f.labelPosVertical=="bottom"&&f.setHeight(w+f.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var m=this.compoundOrder[a],u=m.id,f=m.paddingLeft,p=m.paddingTop,w=m.labelMarginLeft,I=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],m.rect.x,m.rect.y,f,p,w,I)}},x.prototype.repopulateZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(u){var f=a.idToDummyNode[u],p=f.paddingLeft,w=f.paddingTop,I=f.labelMarginLeft,C=f.labelMarginTop;a.adjustLocations(m[u],f.rect.x,f.rect.y,p,w,I,C)})},x.prototype.getToBeTiled=function(a){var m=a.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var u=a.getChild();if(u==null)return this.toBeTiled[m]=!1,!1;for(var f=u.getNodes(),p=0;p<f.length;p++){var w=f[p];if(this.getNodeDegree(w)>0)return this.toBeTiled[m]=!1,!1;if(w.getChild()!=null){if(!this.getToBeTiled(w))return this.toBeTiled[m]=!1,!1}else this.toBeTiled[w.id]=!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(a){a.id;for(var m=a.getEdges(),u=0,f=0;f<m.length;f++){var p=m[f];p.getSource().id!==p.getTarget().id&&(u+=1)}return u},x.prototype.getNodeDegreeWithChildren=function(a){var m=this.getNodeDegree(a);if(a.getChild()==null)return m;for(var u=a.getChild().getNodes(),f=0;f<u.length;f++){var p=u[f];m+=this.getNodeDegreeWithChildren(p)}return m},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(a){for(var m=0;m<a.length;m++){var u=a[m];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},x.prototype.adjustLocations=function(a,m,u,f,p,w,I){u+=p+I;for(var C=m+=f+w,G=0;G<a.rows.length;G++){var S=a.rows[G];m=C;for(var P=0,D=0;D<S.length;D++){var z=S[D];z.rect.x=m,z.rect.y=u,m+=z.rect.width+a.horizontalPadding,z.rect.height>P&&(P=z.rect.height)}u+=P+a.verticalPadding}},x.prototype.tileCompoundMembers=function(a,m){var u=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(f){var p=m[f];if(u.tiledMemberPack[f]=u.tileNodes(a[f],p.paddingLeft+p.paddingRight),p.rect.width=u.tiledMemberPack[f].width,p.rect.height=u.tiledMemberPack[f].height,p.setCenter(u.tiledMemberPack[f].centerX,u.tiledMemberPack[f].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var w=p.rect.width,I=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(w+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>w?(p.rect.x-=(p.labelWidth-w)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-w)/2):p.labelPosHorizontal=="right"&&p.setWidth(w+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(I+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>I?(p.rect.y-=(p.labelHeight-I)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-I)/2):p.labelPosVertical=="bottom"&&p.setHeight(I+p.labelHeight))}})},x.prototype.tileNodes=function(a,m){var u=this.tileNodesByFavoringDim(a,m,!0),f=this.tileNodesByFavoringDim(a,m,!1),p=this.getOrgRatio(u);return this.getOrgRatio(f)<p?f:u},x.prototype.getOrgRatio=function(a){var m=a.width/a.height;return m<1&&(m=1/m),m},x.prototype.calcIdealRowWidth=function(a,m){var u=l.TILING_PADDING_VERTICAL,f=l.TILING_PADDING_HORIZONTAL,p=a.length,w=0,I=0,C=0;a.forEach(function(U){w+=U.getWidth(),I+=U.getHeight(),U.getWidth()>C&&(C=U.getWidth())});var G,S=w/p,P=I/p,D=Math.pow(u-f,2)+4*(S+f)*(P+u)*p,z=(f-u+Math.sqrt(D))/(2*(S+f));m?(G=Math.ceil(z))==z&&G++:G=Math.floor(z);var W=G*(S+f)-f;return C>W&&(W=C),W+=2*f},x.prototype.tileNodesByFavoringDim=function(a,m,u){var f=l.TILING_PADDING_VERTICAL,p=l.TILING_PADDING_HORIZONTAL,w=l.TILING_COMPARE_BY,I={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:f,horizontalPadding:p,centerX:0,centerY:0};w&&(I.idealRowWidth=this.calcIdealRowWidth(a,u));var C=function(U){return U.rect.width*U.rect.height},G=function(U,O){return C(O)-C(U)};a.sort(function(U,O){var X=G;return I.idealRowWidth?(X=w)(U.id,O.id):X(U,O)});for(var S=0,P=0,D=0;D<a.length;D++)S+=(z=a[D]).getCenterX(),P+=z.getCenterY();for(I.centerX=S/a.length,I.centerY=P/a.length,D=0;D<a.length;D++){var z=a[D];if(I.rows.length==0)this.insertNodeToRow(I,z,0,m);else if(this.canAddHorizontal(I,z.rect.width,z.rect.height)){var W=I.rows.length-1;I.idealRowWidth||(W=this.getShortestRowIndex(I)),this.insertNodeToRow(I,z,W,m)}else this.insertNodeToRow(I,z,I.rows.length,m);this.shiftToLastRow(I)}return I},x.prototype.insertNodeToRow=function(a,m,u,f){var p=f;u==a.rows.length&&(a.rows.push([]),a.rowWidth.push(p),a.rowHeight.push(0));var w=a.rowWidth[u]+m.rect.width;a.rows[u].length>0&&(w+=a.horizontalPadding),a.rowWidth[u]=w,a.width<w&&(a.width=w);var I=m.rect.height;u>0&&(I+=a.verticalPadding);var C=0;I>a.rowHeight[u]&&(C=a.rowHeight[u],a.rowHeight[u]=I,C=a.rowHeight[u]-C),a.height+=C,a.rows[u].push(m)},x.prototype.getShortestRowIndex=function(a){for(var m=-1,u=Number.MAX_VALUE,f=0;f<a.rows.length;f++)a.rowWidth[f]<u&&(m=f,u=a.rowWidth[f]);return m},x.prototype.getLongestRowIndex=function(a){for(var m=-1,u=Number.MIN_VALUE,f=0;f<a.rows.length;f++)a.rowWidth[f]>u&&(m=f,u=a.rowWidth[f]);return m},x.prototype.canAddHorizontal=function(a,m,u){if(a.idealRowWidth){var f=a.rows.length-1;return a.rowWidth[f]+m+a.horizontalPadding<=a.idealRowWidth}var p=this.getShortestRowIndex(a);if(p<0)return!0;var w=a.rowWidth[p];if(w+a.horizontalPadding+m<=a.width)return!0;var I,C,G=0;return a.rowHeight[p]<u&&p>0&&(G=u+a.verticalPadding-a.rowHeight[p]),I=a.width-w>=m+a.horizontalPadding?(a.height+G)/(w+m+a.horizontalPadding):(a.height+G)/a.width,G=u+a.verticalPadding,(C=a.width<m?(a.height+G)/m:(a.height+G)/a.width)<1&&(C=1/C),I<1&&(I=1/I),I<C},x.prototype.shiftToLastRow=function(a){var m=this.getLongestRowIndex(a),u=a.rowWidth.length-1,f=a.rows[m],p=f[f.length-1],w=p.width+a.horizontalPadding;if(a.width-a.rowWidth[u]>w&&m!=u){f.splice(-1,1),a.rows[u].push(p),a.rowWidth[m]=a.rowWidth[m]-w,a.rowWidth[u]=a.rowWidth[u]+w,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var I=Number.MIN_VALUE,C=0;C<f.length;C++)f[C].height>I&&(I=f[C].height);m>0&&(I+=a.verticalPadding);var G=a.rowHeight[m]+a.rowHeight[u];a.rowHeight[m]=I,a.rowHeight[u]<p.height+a.verticalPadding&&(a.rowHeight[u]=p.height+a.verticalPadding);var S=a.rowHeight[m]+a.rowHeight[u];a.height+=S-G,this.shiftToLastRow(a)}},x.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var a,m=[],u=!0;u;){var f=this.graphManager.getAllNodes(),p=[];u=!1;for(var w=0;w<f.length;w++)if((a=f[w]).getEdges().length==1&&!a.getEdges()[0].isInterGraph&&a.getChild()==null){if(l.PURE_INCREMENTAL){var I=a.getEdges()[0].getOtherEnd(a),C=new A(a.getCenterX()-I.getCenterX(),a.getCenterY()-I.getCenterY());p.push([a,a.getEdges()[0],a.getOwner(),C])}else p.push([a,a.getEdges()[0],a.getOwner()]);u=!0}if(u==1){for(var G=[],S=0;S<p.length;S++)p[S][0].getEdges().length==1&&(G.push(p[S]),p[S][0].getOwner().remove(p[S][0]));m.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=m},x.prototype.growTree=function(a){for(var m,u=a[a.length-1],f=0;f<u.length;f++)m=u[f],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(a){var m,u,f=a[0];if(u=f==a[1].source?a[1].target:a[1].source,l.PURE_INCREMENTAL)f.setCenter(u.getCenterX()+a[3].getWidth(),u.getCenterY()+a[3].getHeight());else{var p=u.startX,w=u.finishX,I=u.startY,C=u.finishY,G=[0,0,0,0];if(I>0)for(var S=p;S<=w;S++)G[0]+=this.grid[S][I-1].length+this.grid[S][I].length-1;if(w<this.grid.length-1)for(S=I;S<=C;S++)G[1]+=this.grid[w+1][S].length+this.grid[w][S].length-1;if(C<this.grid[0].length-1)for(S=p;S<=w;S++)G[2]+=this.grid[S][C+1].length+this.grid[S][C].length-1;if(p>0)for(S=I;S<=C;S++)G[3]+=this.grid[p-1][S].length+this.grid[p][S].length-1;for(var P,D,z=F.MAX_VALUE,W=0;W<G.length;W++)G[W]<z?(z=G[W],P=1,D=W):G[W]==z&&P++;if(P==3&&z==0)G[0]==0&&G[1]==0&&G[2]==0?m=1:G[0]==0&&G[1]==0&&G[3]==0?m=0:G[0]==0&&G[2]==0&&G[3]==0?m=3:G[1]==0&&G[2]==0&&G[3]==0&&(m=2);else if(P==2&&z==0){var U=Math.floor(2*Math.random());m=G[0]==0&&G[1]==0?U==0?0:1:G[0]==0&&G[2]==0?U==0?0:2:G[0]==0&&G[3]==0?U==0?0:3:G[1]==0&&G[2]==0?U==0?1:2:G[1]==0&&G[3]==0?U==0?1:3:U==0?2:3}else m=P==4&&z==0?U=Math.floor(4*Math.random()):D;m==0?f.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-d.DEFAULT_EDGE_LENGTH-f.getHeight()/2):m==1?f.setCenter(u.getCenterX()+u.getWidth()/2+d.DEFAULT_EDGE_LENGTH+f.getWidth()/2,u.getCenterY()):m==2?f.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+d.DEFAULT_EDGE_LENGTH+f.getHeight()/2):f.setCenter(u.getCenterX()-u.getWidth()/2-d.DEFAULT_EDGE_LENGTH-f.getWidth()/2,u.getCenterY())}},o.exports=x},991:(o,s,e)=>{var r=e(551).FDLayoutNode,n=e(551).IMath;function i(h,l,g,d){r.call(this,h,l,g,d)}for(var t in i.prototype=Object.create(r.prototype),r)i[t]=r[t];i.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},i.prototype.propogateDisplacementToChildren=function(h,l){for(var g,d=this.getChild().getNodes(),y=0;y<d.length;y++)(g=d[y]).getChild()==null?(g.displacementX+=h,g.displacementY+=l):g.propogateDisplacementToChildren(h,l)},i.prototype.move=function(){var h=this.graphManager.getLayout();this.child!=null&&this.child.getNodes().length!=0||(this.moveBy(this.displacementX,this.displacementY),h.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.setPred1=function(h){this.pred1=h},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(h){this.next=h},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(h){this.processed=h},i.prototype.isProcessed=function(){return processed},o.exports=i},902:(o,s,e)=>{function r(g){if(Array.isArray(g)){for(var d=0,y=Array(g.length);d<g.length;d++)y[d]=g[d];return y}return Array.from(g)}var n=e(806),i=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function l(){}l.handleConstraints=function(g){var d={};d.fixedNodeConstraint=g.constraints.fixedNodeConstraint,d.alignmentConstraint=g.constraints.alignmentConstraint,d.relativePlacementConstraint=g.constraints.relativePlacementConstraint;for(var y=new Map,v=new Map,E=[],A=[],M=g.getAllNodes(),F=0,b=0;b<M.length;b++){var Y=M[b];Y.getChild()==null&&(v.set(Y.id,F++),E.push(Y.getCenterX()),A.push(Y.getCenterY()),y.set(Y.id,Y))}d.relativePlacementConstraint&&d.relativePlacementConstraint.forEach(function(R){R.gap||R.gap==0||(R.left?R.gap=n.DEFAULT_EDGE_LENGTH+y.get(R.left).getWidth()/2+y.get(R.right).getWidth()/2:R.gap=n.DEFAULT_EDGE_LENGTH+y.get(R.top).getHeight()/2+y.get(R.bottom).getHeight()/2)});var H=function(R){var k=0,J=0;return R.forEach(function(Q){k+=E[v.get(Q)],J+=A[v.get(Q)]}),{x:k/R.size,y:J/R.size}},q=function(R,k,J,Q,at){var _t=new Map;R.forEach(function(lt,$){_t.set($,0)}),R.forEach(function(lt,$){lt.forEach(function(gt){_t.set(gt.id,_t.get(gt.id)+1)})});var nt=new Map,vt=new Map,ft=new i;_t.forEach(function(lt,$){lt==0?(ft.push($),J||(k=="horizontal"?nt.set($,v.has($)?E[v.get($)]:Q.get($)):nt.set($,v.has($)?A[v.get($)]:Q.get($)))):nt.set($,Number.NEGATIVE_INFINITY),J&&vt.set($,new Set([$]))}),J&&at.forEach(function(lt){var $=[];if(lt.forEach(function(st){J.has(st)&&$.push(st)}),$.length>0){var gt=0;$.forEach(function(st){k=="horizontal"?(nt.set(st,v.has(st)?E[v.get(st)]:Q.get(st)),gt+=nt.get(st)):(nt.set(st,v.has(st)?A[v.get(st)]:Q.get(st)),gt+=nt.get(st))}),gt/=$.length,lt.forEach(function(st){J.has(st)||nt.set(st,gt)})}else{var Tt=0;lt.forEach(function(st){Tt+=k=="horizontal"?v.has(st)?E[v.get(st)]:Q.get(st):v.has(st)?A[v.get(st)]:Q.get(st)}),Tt/=lt.length,lt.forEach(function(st){nt.set(st,Tt)})}});for(var Ut=function(){var lt=ft.shift();R.get(lt).forEach(function($){if(nt.get($.id)<nt.get(lt)+$.gap)if(J&&J.has($.id)){var gt=void 0;if(gt=k=="horizontal"?v.has($.id)?E[v.get($.id)]:Q.get($.id):v.has($.id)?A[v.get($.id)]:Q.get($.id),nt.set($.id,gt),gt<nt.get(lt)+$.gap){var Tt=nt.get(lt)+$.gap-gt;vt.get(lt).forEach(function(st){nt.set(st,nt.get(st)-Tt)})}}else nt.set($.id,nt.get(lt)+$.gap);_t.set($.id,_t.get($.id)-1),_t.get($.id)==0&&ft.push($.id),J&&vt.set($.id,function(st,Ft){var Gt=new Set(st),Rt=!0,wt=!1,ut=void 0;try{for(var Pt,Mt=Ft[Symbol.iterator]();!(Rt=(Pt=Mt.next()).done);Rt=!0){var Ht=Pt.value;Gt.add(Ht)}}catch(Vt){wt=!0,ut=Vt}finally{try{!Rt&&Mt.return&&Mt.return()}finally{if(wt)throw ut}}return Gt}(vt.get(lt),vt.get($.id)))})};ft.length!=0;)Ut();if(J){var rt=new Set;R.forEach(function(lt,$){lt.length==0&&rt.add($)});var mt=[];vt.forEach(function(lt,$){if(rt.has($)){var gt=!1,Tt=!0,st=!1,Ft=void 0;try{for(var Gt,Rt=lt[Symbol.iterator]();!(Tt=(Gt=Rt.next()).done);Tt=!0){var wt=Gt.value;J.has(wt)&&(gt=!0)}}catch(Mt){st=!0,Ft=Mt}finally{try{!Tt&&Rt.return&&Rt.return()}finally{if(st)throw Ft}}if(!gt){var ut=!1,Pt=void 0;mt.forEach(function(Mt,Ht){Mt.has([].concat(r(lt))[0])&&(ut=!0,Pt=Ht)}),ut?lt.forEach(function(Mt){mt[Pt].add(Mt)}):mt.push(new Set(lt))}}}),mt.forEach(function(lt,$){var gt=Number.POSITIVE_INFINITY,Tt=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Ft=Number.NEGATIVE_INFINITY,Gt=!0,Rt=!1,wt=void 0;try{for(var ut,Pt=lt[Symbol.iterator]();!(Gt=(ut=Pt.next()).done);Gt=!0){var Mt=ut.value,Ht=void 0;Ht=k=="horizontal"?v.has(Mt)?E[v.get(Mt)]:Q.get(Mt):v.has(Mt)?A[v.get(Mt)]:Q.get(Mt);var Vt=nt.get(Mt);Ht<gt&&(gt=Ht),Ht>st&&(st=Ht),Vt<Tt&&(Tt=Vt),Vt>Ft&&(Ft=Vt)}}catch(jt){Rt=!0,wt=jt}finally{try{!Gt&&Pt.return&&Pt.return()}finally{if(Rt)throw wt}}var oe=(gt+st)/2-(Tt+Ft)/2,Kt=!0,qt=!1,$t=void 0;try{for(var Zt,Bt=lt[Symbol.iterator]();!(Kt=(Zt=Bt.next()).done);Kt=!0){var ee=Zt.value;nt.set(ee,nt.get(ee)+oe)}}catch(jt){qt=!0,$t=jt}finally{try{!Kt&&Bt.return&&Bt.return()}finally{if(qt)throw $t}}})}return nt},x=function(R){var k=0,J=0,Q=0,at=0;if(R.forEach(function(ft){ft.left?E[v.get(ft.left)]-E[v.get(ft.right)]>=0?k++:J++:A[v.get(ft.top)]-A[v.get(ft.bottom)]>=0?Q++:at++}),k>J&&Q>at)for(var _t=0;_t<v.size;_t++)E[_t]=-1*E[_t],A[_t]=-1*A[_t];else if(k>J)for(var nt=0;nt<v.size;nt++)E[nt]=-1*E[nt];else if(Q>at)for(var vt=0;vt<v.size;vt++)A[vt]=-1*A[vt]},B=function(R){var k=[],J=new i,Q=new Set,at=0;return R.forEach(function(_t,nt){if(!Q.has(nt)){k[at]=[];var vt=nt;for(J.push(vt),Q.add(vt),k[at].push(vt);J.length!=0;)vt=J.shift(),R.get(vt).forEach(function(ft){Q.has(ft.id)||(J.push(ft.id),Q.add(ft.id),k[at].push(ft.id))});at++}}),k},a=function(R){var k=new Map;return R.forEach(function(J,Q){k.set(Q,[])}),R.forEach(function(J,Q){J.forEach(function(at){k.get(Q).push(at),k.get(at.id).push({id:Q,gap:at.gap,direction:at.direction})})}),k},m=function(R){var k=new Map;return R.forEach(function(J,Q){k.set(Q,[])}),R.forEach(function(J,Q){J.forEach(function(at){k.get(at.id).push({id:Q,gap:at.gap,direction:at.direction})})}),k},u=[],f=[],p=!1,w=!1,I=new Set,C=new Map,G=new Map,S=[];if(d.fixedNodeConstraint&&d.fixedNodeConstraint.forEach(function(R){I.add(R.nodeId)}),d.relativePlacementConstraint&&(d.relativePlacementConstraint.forEach(function(R){R.left?(C.has(R.left)?C.get(R.left).push({id:R.right,gap:R.gap,direction:"horizontal"}):C.set(R.left,[{id:R.right,gap:R.gap,direction:"horizontal"}]),C.has(R.right)||C.set(R.right,[])):(C.has(R.top)?C.get(R.top).push({id:R.bottom,gap:R.gap,direction:"vertical"}):C.set(R.top,[{id:R.bottom,gap:R.gap,direction:"vertical"}]),C.has(R.bottom)||C.set(R.bottom,[]))}),G=a(C),S=B(G)),n.TRANSFORM_ON_CONSTRAINT_HANDLING){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>1)d.fixedNodeConstraint.forEach(function(R,k){u[k]=[R.position.x,R.position.y],f[k]=[E[v.get(R.nodeId)],A[v.get(R.nodeId)]]}),p=!0;else if(d.alignmentConstraint)(function(){var R=0;if(d.alignmentConstraint.vertical){for(var k=d.alignmentConstraint.vertical,J=function(vt){var ft=new Set;k[vt].forEach(function(mt){ft.add(mt)});var Ut=new Set([].concat(r(ft)).filter(function(mt){return I.has(mt)})),rt=void 0;rt=Ut.size>0?E[v.get(Ut.values().next().value)]:H(ft).x,k[vt].forEach(function(mt){u[R]=[rt,A[v.get(mt)]],f[R]=[E[v.get(mt)],A[v.get(mt)]],R++})},Q=0;Q<k.length;Q++)J(Q);p=!0}if(d.alignmentConstraint.horizontal){for(var at=d.alignmentConstraint.horizontal,_t=function(vt){var ft=new Set;at[vt].forEach(function(mt){ft.add(mt)});var Ut=new Set([].concat(r(ft)).filter(function(mt){return I.has(mt)})),rt=void 0;rt=Ut.size>0?E[v.get(Ut.values().next().value)]:H(ft).y,at[vt].forEach(function(mt){u[R]=[E[v.get(mt)],rt],f[R]=[E[v.get(mt)],A[v.get(mt)]],R++})},nt=0;nt<at.length;nt++)_t(nt);p=!0}d.relativePlacementConstraint&&(w=!0)})();else if(d.relativePlacementConstraint){for(var P=0,D=0,z=0;z<S.length;z++)S[z].length>P&&(P=S[z].length,D=z);if(P<G.size/2)x(d.relativePlacementConstraint),p=!1,w=!1;else{var W=new Map,U=new Map,O=[];S[D].forEach(function(R){C.get(R).forEach(function(k){k.direction=="horizontal"?(W.has(R)?W.get(R).push(k):W.set(R,[k]),W.has(k.id)||W.set(k.id,[]),O.push({left:R,right:k.id})):(U.has(R)?U.get(R).push(k):U.set(R,[k]),U.has(k.id)||U.set(k.id,[]),O.push({top:R,bottom:k.id}))})}),x(O),w=!1;var X=q(W,"horizontal"),j=q(U,"vertical");S[D].forEach(function(R,k){f[k]=[E[v.get(R)],A[v.get(R)]],u[k]=[],X.has(R)?u[k][0]=X.get(R):u[k][0]=E[v.get(R)],j.has(R)?u[k][1]=j.get(R):u[k][1]=A[v.get(R)]}),p=!0}}if(p){for(var tt,ot=t.transpose(u),V=t.transpose(f),Et=0;Et<ot.length;Et++)ot[Et]=t.multGamma(ot[Et]),V[Et]=t.multGamma(V[Et]);var It=t.multMat(ot,t.transpose(V)),kt=h.svd(It);tt=t.multMat(kt.V,t.transpose(kt.U));for(var bt=0;bt<v.size;bt++){var K=[E[bt],A[bt]],it=[tt[0][0],tt[1][0]],pt=[tt[0][1],tt[1][1]];E[bt]=t.dotProduct(K,it),A[bt]=t.dotProduct(K,pt)}w&&x(d.relativePlacementConstraint)}}if(n.ENFORCE_CONSTRAINTS){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>0){var ct={x:0,y:0};d.fixedNodeConstraint.forEach(function(R,k){var J,Q,at={x:E[v.get(R.nodeId)],y:A[v.get(R.nodeId)]},_t=R.position,nt=(Q=at,{x:(J=_t).x-Q.x,y:J.y-Q.y});ct.x+=nt.x,ct.y+=nt.y}),ct.x/=d.fixedNodeConstraint.length,ct.y/=d.fixedNodeConstraint.length,E.forEach(function(R,k){E[k]+=ct.x}),A.forEach(function(R,k){A[k]+=ct.y}),d.fixedNodeConstraint.forEach(function(R){E[v.get(R.nodeId)]=R.position.x,A[v.get(R.nodeId)]=R.position.y})}if(d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var yt=d.alignmentConstraint.vertical,Nt=function(R){var k=new Set;yt[R].forEach(function(at){k.add(at)});var J=new Set([].concat(r(k)).filter(function(at){return I.has(at)})),Q=void 0;Q=J.size>0?E[v.get(J.values().next().value)]:H(k).x,k.forEach(function(at){I.has(at)||(E[v.get(at)]=Q)})},ht=0;ht<yt.length;ht++)Nt(ht);if(d.alignmentConstraint.horizontal)for(var At=d.alignmentConstraint.horizontal,Ot=function(R){var k=new Set;At[R].forEach(function(at){k.add(at)});var J=new Set([].concat(r(k)).filter(function(at){return I.has(at)})),Q=void 0;Q=J.size>0?A[v.get(J.values().next().value)]:H(k).y,k.forEach(function(at){I.has(at)||(A[v.get(at)]=Q)})},Dt=0;Dt<At.length;Dt++)Ot(Dt)}d.relativePlacementConstraint&&function(){var R=new Map,k=new Map,J=new Map,Q=new Map,at=new Map,_t=new Map,nt=new Set,vt=new Set;if(I.forEach(function(et){nt.add(et),vt.add(et)}),d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var ft=d.alignmentConstraint.vertical,Ut=function(et){J.set("dummy"+et,[]),ft[et].forEach(function(Lt){R.set(Lt,"dummy"+et),J.get("dummy"+et).push(Lt),I.has(Lt)&&nt.add("dummy"+et)}),at.set("dummy"+et,E[v.get(ft[et][0])])},rt=0;rt<ft.length;rt++)Ut(rt);if(d.alignmentConstraint.horizontal)for(var mt=d.alignmentConstraint.horizontal,lt=function(et){Q.set("dummy"+et,[]),mt[et].forEach(function(Lt){k.set(Lt,"dummy"+et),Q.get("dummy"+et).push(Lt),I.has(Lt)&&vt.add("dummy"+et)}),_t.set("dummy"+et,A[v.get(mt[et][0])])},$=0;$<mt.length;$++)lt($)}var gt=new Map,Tt=new Map,st=function(et){C.get(et).forEach(function(Lt){var Xt=void 0,zt=void 0;Lt.direction=="horizontal"?(Xt=R.get(et)?R.get(et):et,zt=R.get(Lt.id)?{id:R.get(Lt.id),gap:Lt.gap,direction:Lt.direction}:Lt,gt.has(Xt)?gt.get(Xt).push(zt):gt.set(Xt,[zt]),gt.has(zt.id)||gt.set(zt.id,[])):(Xt=k.get(et)?k.get(et):et,zt=k.get(Lt.id)?{id:k.get(Lt.id),gap:Lt.gap,direction:Lt.direction}:Lt,Tt.has(Xt)?Tt.get(Xt).push(zt):Tt.set(Xt,[zt]),Tt.has(zt.id)||Tt.set(zt.id,[]))})},Ft=!0,Gt=!1,Rt=void 0;try{for(var wt,ut=C.keys()[Symbol.iterator]();!(Ft=(wt=ut.next()).done);Ft=!0)st(wt.value)}catch(et){Gt=!0,Rt=et}finally{try{!Ft&&ut.return&&ut.return()}finally{if(Gt)throw Rt}}var Pt=a(gt),Mt=a(Tt),Ht=B(Pt),Vt=B(Mt),oe=m(gt),Kt=m(Tt),qt=[],$t=[];Ht.forEach(function(et,Lt){qt[Lt]=[],et.forEach(function(Xt){oe.get(Xt).length==0&&qt[Lt].push(Xt)})}),Vt.forEach(function(et,Lt){$t[Lt]=[],et.forEach(function(Xt){Kt.get(Xt).length==0&&$t[Lt].push(Xt)})});var Zt=q(gt,"horizontal",nt,at,qt),Bt=q(Tt,"vertical",vt,_t,$t),ee=function(et){J.get(et)?J.get(et).forEach(function(Lt){E[v.get(Lt)]=Zt.get(et)}):E[v.get(et)]=Zt.get(et)},jt=!0,fe=!1,me=void 0;try{for(var ve,ie=Zt.keys()[Symbol.iterator]();!(jt=(ve=ie.next()).done);jt=!0)ee(ve.value)}catch(et){fe=!0,me=et}finally{try{!jt&&ie.return&&ie.return()}finally{if(fe)throw me}}var We=function(et){Q.get(et)?Q.get(et).forEach(function(Lt){A[v.get(Lt)]=Bt.get(et)}):A[v.get(et)]=Bt.get(et)},ae=!0,ye=!1,Ee=void 0;try{for(var Ne,se=Bt.keys()[Symbol.iterator]();!(ae=(Ne=se.next()).done);ae=!0)We(Ne.value)}catch(et){ye=!0,Ee=et}finally{try{!ae&&se.return&&se.return()}finally{if(ye)throw Ee}}}()}for(var xt=0;xt<M.length;xt++){var Ct=M[xt];Ct.getChild()==null&&Ct.setCenter(E[v.get(Ct.id)],A[v.get(Ct.id)])}},o.exports=l},551:o=>{o.exports=L}},N={},c=function o(s){var e=N[s];if(e!==void 0)return e.exports;var r=N[s]={exports:{}};return _[s](r,r.exports,o),r.exports}(45),c;var _,N,c},Ie.exports=T(cr()));var T}var xe,Ce,Oe,ce;const ur=lr(xe?Le.exports:(xe=1,Le.exports=(Ce=gr(),Oe={658:T=>{T.exports=Object.assign!=null?Object.assign.bind(Object):function(L){for(var _=arguments.length,N=Array(_>1?_-1:0),c=1;c<_;c++)N[c-1]=arguments[c];return N.forEach(function(o){Object.keys(o).forEach(function(s){return L[s]=o[s]})}),L}},548:(T,L,_)=>{var N=function(s,e){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return function(r,n){var i=[],t=!0,h=!1,l=void 0;try{for(var g,d=r[Symbol.iterator]();!(t=(g=d.next()).done)&&(i.push(g.value),!n||i.length!==n);t=!0);}catch(y){h=!0,l=y}finally{try{!t&&d.return&&d.return()}finally{if(h)throw l}}return i}(s,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=_(140).layoutBase.LinkedList,o={getTopMostNodes:function(s){for(var e={},r=0;r<s.length;r++)e[s[r].id()]=!0;var n=s.filter(function(i,t){typeof i=="number"&&(i=t);for(var h=i.parent()[0];h!=null;){if(e[h.id()])return!1;h=h.parent()[0]}return!0});return n},connectComponents:function(s,e,r,n){var i=new c,t=new Set,h=[],l=void 0,g=void 0,d=void 0,y=!1,v=1,E=[],A=[],M=function(){var F=s.collection();A.push(F);var b=r[0],Y=s.collection();Y.merge(b).merge(b.descendants().intersection(e)),h.push(b),Y.forEach(function(x){i.push(x),t.add(x),F.merge(x)});for(var H=function(){b=i.shift();var x=s.collection();b.neighborhood().nodes().forEach(function(m){e.intersection(b.edgesWith(m)).length>0&&x.merge(m)});for(var B=0;B<x.length;B++){var a=x[B];(l=r.intersection(a.union(a.ancestors())))==null||t.has(l[0])||l.union(l.descendants()).forEach(function(m){i.push(m),t.add(m),F.merge(m),r.has(m)&&h.push(m)})}};i.length!=0;)H();if(F.forEach(function(x){e.intersection(x.connectedEdges()).forEach(function(B){F.has(B.source())&&F.has(B.target())&&F.merge(B)})}),h.length==r.length&&(y=!0),!y||y&&v>1){g=h[0],d=g.connectedEdges().length,h.forEach(function(x){x.connectedEdges().length<d&&(d=x.connectedEdges().length,g=x)}),E.push(g.id());var q=s.collection();q.merge(h[0]),h.forEach(function(x){q.merge(x)}),h=[],r=r.difference(q),v++}};do M();while(!y);return n&&E.length>0&&n.set("dummy"+(n.size+1),E),A},relocateComponent:function(s,e,r){if(!r.fixedNodeConstraint){var n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(r.quality=="draft"){var l=!0,g=!1,d=void 0;try{for(var y,v=e.nodeIndexes[Symbol.iterator]();!(l=(y=v.next()).done);l=!0){var E=y.value,A=N(E,2),M=A[0],F=A[1],b=r.cy.getElementById(M);if(b){var Y=b.boundingBox(),H=e.xCoords[F]-Y.w/2,q=e.xCoords[F]+Y.w/2,x=e.yCoords[F]-Y.h/2,B=e.yCoords[F]+Y.h/2;H<n&&(n=H),q>i&&(i=q),x<t&&(t=x),B>h&&(h=B)}}}catch(p){g=!0,d=p}finally{try{!l&&v.return&&v.return()}finally{if(g)throw d}}var a=s.x-(i+n)/2,m=s.y-(h+t)/2;e.xCoords=e.xCoords.map(function(p){return p+a}),e.yCoords=e.yCoords.map(function(p){return p+m})}else{Object.keys(e).forEach(function(p){var w=e[p],I=w.getRect().x,C=w.getRect().x+w.getRect().width,G=w.getRect().y,S=w.getRect().y+w.getRect().height;I<n&&(n=I),C>i&&(i=C),G<t&&(t=G),S>h&&(h=S)});var u=s.x-(i+n)/2,f=s.y-(h+t)/2;Object.keys(e).forEach(function(p){var w=e[p];w.setCenter(w.getCenterX()+u,w.getCenterY()+f)})}}},calcBoundingBox:function(s,e,r,n){for(var i=Number.MAX_SAFE_INTEGER,t=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,g=void 0,d=void 0,y=void 0,v=void 0,E=s.descendants().not(":parent"),A=E.length,M=0;M<A;M++){var F=E[M];i>(g=e[n.get(F.id())]-F.width()/2)&&(i=g),t<(d=e[n.get(F.id())]+F.width()/2)&&(t=d),h>(y=r[n.get(F.id())]-F.height()/2)&&(h=y),l<(v=r[n.get(F.id())]+F.height()/2)&&(l=v)}var b={};return b.topLeftX=i,b.topLeftY=h,b.width=t-i,b.height=l-h,b},calcParentsWithoutChildren:function(s,e){var r=s.collection();return e.nodes(":parent").forEach(function(n){var i=!1;n.children().forEach(function(t){t.css("display")!="none"&&(i=!0)}),i||r.merge(n)}),r}};T.exports=o},816:(T,L,_)=>{var N=_(548),c=_(140).CoSELayout,o=_(140).CoSENode,s=_(140).layoutBase.PointD,e=_(140).layoutBase.DimensionD,r=_(140).layoutBase.LayoutConstants,n=_(140).layoutBase.FDLayoutConstants,i=_(140).CoSEConstants;T.exports={coseLayout:function(t,h){var l=t.cy,g=t.eles,d=g.nodes(),y=g.edges(),v=void 0,E=void 0,A=void 0,M={};t.randomize&&(v=h.nodeIndexes,E=h.xCoords,A=h.yCoords);var F=function(x){return typeof x=="function"},b=function(x,B){return F(x)?x(B):x},Y=N.calcParentsWithoutChildren(l,g);t.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),t.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=t.gravity),t.numIter!=null&&(i.MAX_ITERATIONS=n.MAX_ITERATIONS=t.numIter),t.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),t.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),t.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),t.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),t.tilingCompareBy!=null&&(i.TILING_COMPARE_BY=t.tilingCompareBy),t.quality=="proof"?r.QUALITY=2:r.QUALITY=0,i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!t.randomize,i.ANIMATE=n.ANIMATE=r.ANIMATE=t.animate,i.TILE=t.tile,i.TILING_PADDING_VERTICAL=typeof t.tilingPaddingVertical=="function"?t.tilingPaddingVertical.call():t.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof t.tilingPaddingHorizontal=="function"?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!0,i.PURE_INCREMENTAL=!t.randomize,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,t.step=="transformed"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!1),t.step=="enforced"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!1),t.step=="cose"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!0),t.step=="all"&&(t.randomize?i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?i.TREE_REDUCTION_ON_INCREMENTAL=!1:i.TREE_REDUCTION_ON_INCREMENTAL=!0;var H=new c,q=H.newGraphManager();return function x(B,a,m,u){for(var f=a.length,p=0;p<f;p++){var w=a[p],I=null;w.intersection(Y).length==0&&(I=w.children());var C=void 0,G=w.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null)if(u.randomize)if(w.isParent()){var S=N.calcBoundingBox(w,E,A,v);C=w.intersection(Y).length==0?B.add(new o(m.graphManager,new s(S.topLeftX,S.topLeftY),new e(S.width,S.height))):B.add(new o(m.graphManager,new s(S.topLeftX,S.topLeftY),new e(parseFloat(G.w),parseFloat(G.h))))}else C=B.add(new o(m.graphManager,new s(E[v.get(w.id())]-G.w/2,A[v.get(w.id())]-G.h/2),new e(parseFloat(G.w),parseFloat(G.h))));else C=B.add(new o(m.graphManager,new s(w.position("x")-G.w/2,w.position("y")-G.h/2),new e(parseFloat(G.w),parseFloat(G.h))));else C=B.add(new o(this.graphManager));C.id=w.data("id"),C.nodeRepulsion=b(u.nodeRepulsion,w),C.paddingLeft=parseInt(w.css("padding")),C.paddingTop=parseInt(w.css("padding")),C.paddingRight=parseInt(w.css("padding")),C.paddingBottom=parseInt(w.css("padding")),u.nodeDimensionsIncludeLabels&&(C.labelWidth=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,C.labelHeight=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,C.labelPosVertical=w.css("text-valign"),C.labelPosHorizontal=w.css("text-halign")),M[w.data("id")]=C,isNaN(C.rect.x)&&(C.rect.x=0),isNaN(C.rect.y)&&(C.rect.y=0),I!=null&&I.length>0&&x(m.getGraphManager().add(m.newGraph(),C),I,m,u)}}(q.addRoot(),N.getTopMostNodes(d),H,t),function(x,B,a){for(var m=0,u=0,f=0;f<a.length;f++){var p=a[f],w=M[p.data("source")],I=M[p.data("target")];if(w&&I&&w!==I&&w.getEdgesBetween(I).length==0){var C=B.add(x.newEdge(),w,I);C.id=p.id(),C.idealLength=b(t.idealEdgeLength,p),C.edgeElasticity=b(t.edgeElasticity,p),m+=C.idealLength,u++}}t.idealEdgeLength!=null&&(u>0?i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=m/u:F(t.idealEdgeLength)?i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=50:i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,i.MIN_REPULSION_DIST=n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,i.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH)}(H,q,y),function(x,B){B.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=B.fixedNodeConstraint),B.alignmentConstraint&&(x.constraints.alignmentConstraint=B.alignmentConstraint),B.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=B.relativePlacementConstraint)}(H,t),H.runLayout(),M}}},212:(T,L,_)=>{var N=function(){function i(t,h){for(var l=0;l<h.length;l++){var g=h[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(t,g.key,g)}}return function(t,h,l){return h&&i(t.prototype,h),l&&i(t,l),t}}(),c=_(658),o=_(548),s=_(657).spectralLayout,e=_(816).coseLayout,r=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(i){return 4500},idealEdgeLength:function(i){return 50},edgeElasticity:function(i){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),n=function(){function i(t){(function(h,l){if(!(h instanceof l))throw new TypeError("Cannot call a class as a function")})(this,i),this.options=c({},r,t)}return N(i,[{key:"run",value:function(){var t=this.options,h=t.cy,l=t.eles,g=[],d=[],y=void 0,v=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&t.fixedNodeConstraint.length!=0||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&t.alignmentConstraint.vertical.length!=0||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&t.alignmentConstraint.horizontal.length!=0||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&t.relativePlacementConstraint.length!=0||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var E=void 0,A=!1;if(h.layoutUtilities&&t.packComponents&&((E=h.layoutUtilities("get"))||(E=h.layoutUtilities()),A=!0),l.nodes().length>0)if(A){var M=o.getTopMostNodes(t.eles.nodes());if((y=o.connectComponents(h,t.eles,M)).forEach(function(P){var D=P.boundingBox();v.push({x:D.x1+D.w/2,y:D.y1+D.h/2})}),t.randomize&&y.forEach(function(P){t.eles=P,g.push(s(t))}),t.quality=="default"||t.quality=="proof"){var F=h.collection();if(t.tile){var b=new Map,Y=0,H={nodeIndexes:b,xCoords:[],yCoords:[]},q=[];if(y.forEach(function(P,D){P.edges().length==0&&(P.nodes().forEach(function(z,W){F.merge(P.nodes()[W]),z.isParent()||(H.nodeIndexes.set(P.nodes()[W].id(),Y++),H.xCoords.push(P.nodes()[0].position().x),H.yCoords.push(P.nodes()[0].position().y))}),q.push(D))}),F.length>1){var x=F.boundingBox();v.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),y.push(F),g.push(H);for(var B=q.length-1;B>=0;B--)y.splice(q[B],1),g.splice(q[B],1),v.splice(q[B],1)}}y.forEach(function(P,D){t.eles=P,d.push(e(t,g[D])),o.relocateComponent(v[D],d[D],t)})}else y.forEach(function(P,D){o.relocateComponent(v[D],g[D],t)});var a=new Set;if(y.length>1){var m=[],u=l.filter(function(P){return P.css("display")=="none"});y.forEach(function(P,D){var z=void 0;if(t.quality=="draft"&&(z=g[D].nodeIndexes),P.nodes().not(u).length>0){var W={edges:[],nodes:[]},U=void 0;P.nodes().not(u).forEach(function(O){if(t.quality=="draft")if(O.isParent()){var X=o.calcBoundingBox(O,g[D].xCoords,g[D].yCoords,z);W.nodes.push({x:X.topLeftX,y:X.topLeftY,width:X.width,height:X.height})}else U=z.get(O.id()),W.nodes.push({x:g[D].xCoords[U]-O.boundingbox().w/2,y:g[D].yCoords[U]-O.boundingbox().h/2,width:O.boundingbox().w,height:O.boundingbox().h});else d[D][O.id()]&&W.nodes.push({x:d[D][O.id()].getLeft(),y:d[D][O.id()].getTop(),width:d[D][O.id()].getWidth(),height:d[D][O.id()].getHeight()})}),P.edges().forEach(function(O){var X=O.source(),j=O.target();if(X.css("display")!="none"&&j.css("display")!="none")if(t.quality=="draft"){var tt=z.get(X.id()),ot=z.get(j.id()),V=[],Et=[];if(X.isParent()){var It=o.calcBoundingBox(X,g[D].xCoords,g[D].yCoords,z);V.push(It.topLeftX+It.width/2),V.push(It.topLeftY+It.height/2)}else V.push(g[D].xCoords[tt]),V.push(g[D].yCoords[tt]);if(j.isParent()){var kt=o.calcBoundingBox(j,g[D].xCoords,g[D].yCoords,z);Et.push(kt.topLeftX+kt.width/2),Et.push(kt.topLeftY+kt.height/2)}else Et.push(g[D].xCoords[ot]),Et.push(g[D].yCoords[ot]);W.edges.push({startX:V[0],startY:V[1],endX:Et[0],endY:Et[1]})}else d[D][X.id()]&&d[D][j.id()]&&W.edges.push({startX:d[D][X.id()].getCenterX(),startY:d[D][X.id()].getCenterY(),endX:d[D][j.id()].getCenterX(),endY:d[D][j.id()].getCenterY()})}),W.nodes.length>0&&(m.push(W),a.add(D))}});var f=E.packComponents(m,t.randomize).shifts;if(t.quality=="draft")g.forEach(function(P,D){var z=P.xCoords.map(function(U){return U+f[D].dx}),W=P.yCoords.map(function(U){return U+f[D].dy});P.xCoords=z,P.yCoords=W});else{var p=0;a.forEach(function(P){Object.keys(d[P]).forEach(function(D){var z=d[P][D];z.setCenter(z.getCenterX()+f[p].dx,z.getCenterY()+f[p].dy)}),p++})}}}else{var w=t.eles.boundingBox();if(v.push({x:w.x1+w.w/2,y:w.y1+w.h/2}),t.randomize){var I=s(t);g.push(I)}t.quality=="default"||t.quality=="proof"?(d.push(e(t,g[0])),o.relocateComponent(v[0],d[0],t)):o.relocateComponent(v[0],g[0],t)}var C=function(P,D){if(t.quality=="default"||t.quality=="proof"){typeof P=="number"&&(P=D);var z=void 0,W=void 0,U=P.data("id");return d.forEach(function(X){U in X&&(z={x:X[U].getRect().getCenterX(),y:X[U].getRect().getCenterY()},W=X[U])}),t.nodeDimensionsIncludeLabels&&(W.labelWidth&&(W.labelPosHorizontal=="left"?z.x+=W.labelWidth/2:W.labelPosHorizontal=="right"&&(z.x-=W.labelWidth/2)),W.labelHeight&&(W.labelPosVertical=="top"?z.y+=W.labelHeight/2:W.labelPosVertical=="bottom"&&(z.y-=W.labelHeight/2))),z==null&&(z={x:P.position("x"),y:P.position("y")}),{x:z.x,y:z.y}}var O=void 0;return g.forEach(function(X){var j=X.nodeIndexes.get(P.id());j!=null&&(O={x:X.xCoords[j],y:X.yCoords[j]})}),O==null&&(O={x:P.position("x"),y:P.position("y")}),{x:O.x,y:O.y}};if(t.quality=="default"||t.quality=="proof"||t.randomize){var G=o.calcParentsWithoutChildren(h,l),S=l.filter(function(P){return P.css("display")=="none"});t.eles=l.not(S),l.nodes().not(":parent").not(S).layoutPositions(this,t,C),G.length>0&&G.forEach(function(P){P.position(C(P))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),i}();T.exports=n},657:(T,L,_)=>{var N=_(548),c=_(140).layoutBase.Matrix,o=_(140).layoutBase.SVD;T.exports={spectralLayout:function(s){var e=s.cy,r=s.eles,n=r.nodes(),i=r.nodes(":parent"),t=new Map,h=new Map,l=new Map,g=[],d=[],y=[],v=[],E=[],A=[],M=[],F=[],b=void 0,Y=1e8,H=1e-9,q=s.piTol,x=s.samplingType,B=s.nodeSeparation,a=void 0,m=function(K,it,pt){for(var ct=[],yt=0,Nt=0,ht=0,At=void 0,Ot=[],Dt=0,xt=1,Ct=0;Ct<b;Ct++)Ot[Ct]=Y;for(ct[Nt]=K,Ot[K]=0;Nt>=yt;){ht=ct[yt++];for(var R=g[ht],k=0;k<R.length;k++)Ot[At=h.get(R[k])]==Y&&(Ot[At]=Ot[ht]+1,ct[++Nt]=At);A[ht][it]=Ot[ht]*B}if(pt){for(var J=0;J<b;J++)A[J][it]<E[J]&&(E[J]=A[J][it]);for(var Q=0;Q<b;Q++)E[Q]>Dt&&(Dt=E[Q],xt=Q)}return xt};N.connectComponents(e,r,N.getTopMostNodes(n),t),i.forEach(function(K){N.connectComponents(e,r,N.getTopMostNodes(K.descendants().intersection(r)),t)});for(var u=0,f=0;f<n.length;f++)n[f].isParent()||h.set(n[f].id(),u++);var p=!0,w=!1,I=void 0;try{for(var C,G=t.keys()[Symbol.iterator]();!(p=(C=G.next()).done);p=!0){var S=C.value;h.set(S,u++)}}catch(K){w=!0,I=K}finally{try{!p&&G.return&&G.return()}finally{if(w)throw I}}for(var P=0;P<h.size;P++)g[P]=[];i.forEach(function(K){for(var it=K.children().intersection(r);it.nodes(":childless").length==0;)it=it.nodes()[0].children().intersection(r);var pt=0,ct=it.nodes(":childless")[0].connectedEdges().length;it.nodes(":childless").forEach(function(yt,Nt){yt.connectedEdges().length<ct&&(ct=yt.connectedEdges().length,pt=Nt)}),l.set(K.id(),it.nodes(":childless")[pt].id())}),n.forEach(function(K){var it=void 0;it=K.isParent()?h.get(l.get(K.id())):h.get(K.id()),K.neighborhood().nodes().forEach(function(pt){r.intersection(K.edgesWith(pt)).length>0&&(pt.isParent()?g[it].push(l.get(pt.id())):g[it].push(pt.id()))})});var D=function(K){var it=h.get(K),pt=void 0;t.get(K).forEach(function(ct){pt=e.getElementById(ct).isParent()?l.get(ct):ct,g[it].push(pt),g[h.get(pt)].push(K)})},z=!0,W=!1,U=void 0;try{for(var O,X=t.keys()[Symbol.iterator]();!(z=(O=X.next()).done);z=!0)D(O.value)}catch(K){W=!0,U=K}finally{try{!z&&X.return&&X.return()}finally{if(W)throw U}}var j=void 0;if((b=h.size)>2){a=b<s.sampleSize?b:s.sampleSize;for(var tt=0;tt<b;tt++)A[tt]=[];for(var ot=0;ot<a;ot++)F[ot]=[];return s.quality=="draft"||s.step=="all"?(function(K){var it=void 0;if(K){it=Math.floor(Math.random()*b);for(var pt=0;pt<b;pt++)E[pt]=Y;for(var ct=0;ct<a;ct++)v[ct]=it,it=m(it,ct,K)}else{(function(){for(var xt=0,Ct=0,R=!1;Ct<a;){xt=Math.floor(Math.random()*b),R=!1;for(var k=0;k<Ct;k++)if(v[k]==xt){R=!0;break}R||(v[Ct]=xt,Ct++)}})();for(var yt=0;yt<a;yt++)m(v[yt],yt,K)}for(var Nt=0;Nt<b;Nt++)for(var ht=0;ht<a;ht++)A[Nt][ht]*=A[Nt][ht];for(var At=0;At<a;At++)M[At]=[];for(var Ot=0;Ot<a;Ot++)for(var Dt=0;Dt<a;Dt++)M[Ot][Dt]=A[v[Dt]][Ot]}(x),function(){for(var K=o.svd(M),it=K.S,pt=K.U,ct=K.V,yt=it[0]*it[0]*it[0],Nt=[],ht=0;ht<a;ht++){Nt[ht]=[];for(var At=0;At<a;At++)Nt[ht][At]=0,ht==At&&(Nt[ht][At]=it[ht]/(it[ht]*it[ht]+yt/(it[ht]*it[ht])))}F=c.multMat(c.multMat(ct,Nt),c.transpose(pt))}(),function(){for(var K=void 0,it=void 0,pt=[],ct=[],yt=[],Nt=[],ht=0;ht<b;ht++)pt[ht]=Math.random(),ct[ht]=Math.random();pt=c.normalize(pt),ct=c.normalize(ct);for(var At=H,Ot=H,Dt=void 0;;){for(var xt=0;xt<b;xt++)yt[xt]=pt[xt];if(pt=c.multGamma(c.multL(c.multGamma(yt),A,F)),K=c.dotProduct(yt,pt),pt=c.normalize(pt),At=c.dotProduct(yt,pt),(Dt=Math.abs(At/Ot))<=1+q&&Dt>=1)break;Ot=At}for(var Ct=0;Ct<b;Ct++)yt[Ct]=pt[Ct];for(Ot=H;;){for(var R=0;R<b;R++)Nt[R]=ct[R];if(Nt=c.minusOp(Nt,c.multCons(yt,c.dotProduct(yt,Nt))),ct=c.multGamma(c.multL(c.multGamma(Nt),A,F)),it=c.dotProduct(Nt,ct),ct=c.normalize(ct),At=c.dotProduct(Nt,ct),(Dt=Math.abs(At/Ot))<=1+q&&Dt>=1)break;Ot=At}for(var k=0;k<b;k++)Nt[k]=ct[k];d=c.multCons(yt,Math.sqrt(Math.abs(K))),y=c.multCons(Nt,Math.sqrt(Math.abs(it)))}(),j={nodeIndexes:h,xCoords:d,yCoords:y}):(h.forEach(function(K,it){d.push(e.getElementById(it).position("x")),y.push(e.getElementById(it).position("y"))}),j={nodeIndexes:h,xCoords:d,yCoords:y}),j}var V=h.keys(),Et=e.getElementById(V.next().value),It=Et.position(),kt=Et.outerWidth();if(d.push(It.x),y.push(It.y),b==2){var bt=e.getElementById(V.next().value).outerWidth();d.push(It.x+kt/2+bt/2+s.idealEdgeLength),y.push(It.y)}return j={nodeIndexes:h,xCoords:d,yCoords:y}}}},579:(T,L,_)=>{var N=_(212),c=function(o){o&&o("layout","fcose",N)};typeof cytoscape<"u"&&c(cytoscape),T.exports=c},140:T=>{T.exports=Ce}},ce={},function T(L){var _=ce[L];if(_!==void 0)return _.exports;var N=ce[L]={exports:{}};return Oe[L](N,N.exports,T),N.exports}(579))));var De={L:"left",R:"right",T:"top",B:"bottom"},Re={L:Z(T=>`${T},${T/2} 0,${T} 0,0`,"L"),R:Z(T=>`0,${T/2} ${T},0 ${T},${T}`,"R"),T:Z(T=>`0,0 ${T},0 ${T/2},${T}`,"T"),B:Z(T=>`${T/2},0 ${T},${T} 0,${T}`,"B")},re={L:Z((T,L)=>T-L+2,"L"),R:Z((T,L)=>T-2,"R"),T:Z((T,L)=>T-L+2,"T"),B:Z((T,L)=>T-2,"B")},pr=Z(function(T){return Yt(T)?T==="L"?"R":"L":T==="T"?"B":"T"},"getOppositeArchitectureDirection"),be=Z(function(T){return T==="L"||T==="R"||T==="T"||T==="B"},"isArchitectureDirection"),Yt=Z(function(T){return T==="L"||T==="R"},"isArchitectureDirectionX"),Wt=Z(function(T){return T==="T"||T==="B"},"isArchitectureDirectionY"),ge=Z(function(T,L){const _=Yt(T)&&Wt(L),N=Wt(T)&&Yt(L);return _||N},"isArchitectureDirectionXY"),fr=Z(function(T){const L=T[0],_=T[1],N=Yt(L)&&Wt(_),c=Wt(L)&&Yt(_);return N||c},"isArchitecturePairXY"),mr=Z(function(T){return T!=="LL"&&T!=="RR"&&T!=="TT"&&T!=="BB"},"isValidArchitectureDirectionPair"),ue=Z(function(T,L){const _=`${T}${L}`;return mr(_)?_:void 0},"getArchitectureDirectionPair"),vr=Z(function([T,L],_){const N=_[0],c=_[1];return Yt(N)?Wt(c)?[T+(N==="L"?-1:1),L+(c==="T"?1:-1)]:[T+(N==="L"?-1:1),L]:Yt(c)?[T+(c==="L"?1:-1),L+(N==="T"?1:-1)]:[T,L+(N==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),yr=Z(function(T){return T==="LT"||T==="TL"?[1,1]:T==="BL"||T==="LB"?[1,-1]:T==="BR"||T==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Er=Z(function(T,L){return ge(T,L)?"bend":Yt(T)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Nr=Z(function(T){return T.type==="service"},"isArchitectureService"),Tr=Z(function(T){return T.type==="junction"},"isArchitectureJunction"),Ge=Z(T=>T.data(),"edgeData"),Qt=Z(T=>T.data(),"nodeData"),Se=rr.architecture,dt=new sr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Se,dataStructures:void 0,elements:{}})),Ar=Z(()=>{dt.reset(),nr()},"clear"),wr=Z(function({id:T,icon:L,in:_,title:N,iconText:c}){if(dt.records.registeredIds[T]!==void 0)throw new Error(`The service id [${T}] is already in use by another ${dt.records.registeredIds[T]}`);if(_!==void 0){if(T===_)throw new Error(`The service [${T}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The service [${T}]'s parent does not exist. Please make sure the parent is created before this service`);if(dt.records.registeredIds[_]==="node")throw new Error(`The service [${T}]'s parent is not a group`)}dt.records.registeredIds[T]="node",dt.records.nodes[T]={id:T,type:"service",icon:L,iconText:c,title:N,edges:[],in:_}},"addService"),Lr=Z(()=>Object.values(dt.records.nodes).filter(Nr),"getServices"),Ir=Z(function({id:T,in:L}){dt.records.registeredIds[T]="node",dt.records.nodes[T]={id:T,type:"junction",edges:[],in:L}},"addJunction"),_r=Z(()=>Object.values(dt.records.nodes).filter(Tr),"getJunctions"),Mr=Z(()=>Object.values(dt.records.nodes),"getNodes"),pe=Z(T=>dt.records.nodes[T],"getNode"),xr=Z(function({id:T,icon:L,in:_,title:N}){if(dt.records.registeredIds[T]!==void 0)throw new Error(`The group id [${T}] is already in use by another ${dt.records.registeredIds[T]}`);if(_!==void 0){if(T===_)throw new Error(`The group [${T}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The group [${T}]'s parent does not exist. Please make sure the parent is created before this group`);if(dt.records.registeredIds[_]==="node")throw new Error(`The group [${T}]'s parent is not a group`)}dt.records.registeredIds[T]="group",dt.records.groups[T]={id:T,icon:L,title:N,in:_}},"addGroup"),Cr=Z(()=>Object.values(dt.records.groups),"getGroups"),Or=Z(function({lhsId:T,rhsId:L,lhsDir:_,rhsDir:N,lhsInto:c,rhsInto:o,lhsGroup:s,rhsGroup:e,title:r}){if(!be(_))throw new Error(`Invalid direction given for left hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${_}`);if(!be(N))throw new Error(`Invalid direction given for right hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${N}`);if(dt.records.nodes[T]===void 0&&dt.records.groups[T]===void 0)throw new Error(`The left-hand id [${T}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(dt.records.nodes[L]===void 0&&dt.records.groups[T]===void 0)throw new Error(`The right-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);const n=dt.records.nodes[T].in,i=dt.records.nodes[L].in;if(s&&n&&i&&n==i)throw new Error(`The left-hand id [${T}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&n&&i&&n==i)throw new Error(`The right-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const t={lhsId:T,lhsDir:_,lhsInto:c,lhsGroup:s,rhsId:L,rhsDir:N,rhsInto:o,rhsGroup:e,title:r};dt.records.edges.push(t),dt.records.nodes[T]&&dt.records.nodes[L]&&(dt.records.nodes[T].edges.push(dt.records.edges[dt.records.edges.length-1]),dt.records.nodes[L].edges.push(dt.records.edges[dt.records.edges.length-1]))},"addEdge"),Dr=Z(()=>dt.records.edges,"getEdges"),Rr=Z(()=>{if(dt.records.dataStructures===void 0){const T={},L=Object.entries(dt.records.nodes).reduce((e,[r,n])=>(e[r]=n.edges.reduce((i,t)=>{var g,d;const h=(g=pe(t.lhsId))==null?void 0:g.in,l=(d=pe(t.rhsId))==null?void 0:d.in;if(h&&l&&h!==l){const y=Er(t.lhsDir,t.rhsDir);y!=="bend"&&(T[h]??(T[h]={}),T[h][l]=y,T[l]??(T[l]={}),T[l][h]=y)}if(t.lhsId===r){const y=ue(t.lhsDir,t.rhsDir);y&&(i[y]=t.rhsId)}else{const y=ue(t.rhsDir,t.lhsDir);y&&(i[y]=t.lhsId)}return i},{}),e),{}),_=Object.keys(L)[0],N={[_]:1},c=Object.keys(L).reduce((e,r)=>r===_?e:{...e,[r]:1},{}),o=Z(e=>{const r={[e]:[0,0]},n=[e];for(;n.length>0;){const i=n.shift();if(i){N[i]=1,delete c[i];const t=L[i],[h,l]=r[i];Object.entries(t).forEach(([g,d])=>{N[d]||(r[d]=vr([h,l],g),n.push(d))})}}return r},"BFS"),s=[o(_)];for(;Object.keys(c).length>0;)s.push(o(Object.keys(c)[0]));dt.records.dataStructures={adjList:L,spatialMaps:s,groupAlignments:T}}return dt.records.dataStructures},"getDataStructures"),br=Z((T,L)=>{dt.records.elements[T]=L},"setElementForId"),Gr=Z(T=>dt.records.elements[T],"getElementById"),Fe=Z(()=>tr({...Se,...er().architecture}),"getConfig"),ne={clear:Ar,setDiagramTitle:Qe,getDiagramTitle:Ze,setAccTitle:$e,getAccTitle:qe,setAccDescription:je,getAccDescription:Be,getConfig:Fe,addService:wr,getServices:Lr,addJunction:Ir,getJunctions:_r,getNodes:Mr,getNode:pe,addGroup:xr,getGroups:Cr,addEdge:Or,getEdges:Dr,setElementForId:br,getElementById:Gr,getDataStructures:Rr};function St(T){return Fe()[T]}Z(St,"getConfigField");var Sr=Z((T,L)=>{ar(T,L),T.groups.map(L.addGroup),T.services.map(_=>L.addService({..._,type:"service"})),T.junctions.map(_=>L.addJunction({..._,type:"junction"})),T.edges.map(L.addEdge)},"populateDb"),Fr={parse:Z(async T=>{const L=await hr("architecture",T);Te.debug(L),Sr(L,ne)},"parse")},Pr=Z(T=>`
2
2
  .edge {
3
3
  stroke-width: ${T.archEdgeWidth};
4
4
  stroke: ${T.archEdgeColor};