@kabmo-labs/kabmo 0.39.0 → 0.39.1

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 (99) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +270 -270
  3. package/dist/client/static/js/{CsvGrid-kfcp4sd6.js → CsvGrid-7synegzg.js} +1 -1
  4. package/dist/client/static/js/{DocxView-atff5w38.js → DocxView-v5d9n5yw.js} +1 -1
  5. package/dist/client/static/js/{DrawioView-yfnq4c99.js → DrawioView-ww7y98tt.js} +1 -1
  6. package/dist/client/static/js/{ImageView-nreh25s0.js → ImageView-t3rkypzs.js} +1 -1
  7. package/dist/client/static/js/{LayoutWrapper-0x1q1q5z.js → LayoutWrapper-th2pd4yt.js} +1 -1
  8. package/dist/client/static/js/{Modal-2xqd3sss.js → Modal-qj39shgb.js} +1 -1
  9. package/dist/client/static/js/{PdfView-mk8paxt1.js → PdfView-t9v4datp.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-ner25qxn.js → SessionsView-yqy0a1xg.js} +1 -1
  11. package/dist/client/static/js/{SheetView-s6n3fawm.js → SheetView-6zkxbjd4.js} +1 -1
  12. package/dist/client/static/js/{SvgPreview-8bxvz3ez.js → SvgPreview-7rt2p1y1.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-tvvz9fha.js → abnfDiagram-O67JEVCF-888zn5zg.js} +1 -1
  14. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-bybv3wg4.js → architectureDiagram-NJMV4G6O-b04e26rb.js} +1 -1
  15. package/dist/client/static/js/{blockDiagram-BEXU5L5S-h3fs79x6.js → blockDiagram-BEXU5L5S-32ph2m52.js} +1 -1
  16. package/dist/client/static/js/{c4Diagram-YGBWAQC7-h8p3h54v.js → c4Diagram-YGBWAQC7-hwnaa333.js} +1 -1
  17. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-q645r4q6.js → classDiagram-v2-NBCMYWYE-2kg7dqeb.js} +1 -1
  18. package/dist/client/static/js/{cose-bilkent-JH36ORCC-p4mm1zcv.js → cose-bilkent-JH36ORCC-tj2sbtyv.js} +1 -1
  19. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-v2hbc3aq.js → cynefinDiagram-VND7K2PF-wx2y8dhm.js} +1 -1
  20. package/dist/client/static/js/{dagre-6A5THRUB-4edpda33.js → dagre-6A5THRUB-5v3rzdxd.js} +1 -1
  21. package/dist/client/static/js/{diagram-22UHCM2B-b6gp813w.js → diagram-22UHCM2B-7er2jwy1.js} +1 -1
  22. package/dist/client/static/js/{diagram-3UASUU5V-s1f3b0ng.js → diagram-3UASUU5V-2b7nmdha.js} +1 -1
  23. package/dist/client/static/js/{diagram-ATOU4E4O-ga06kjp5.js → diagram-ATOU4E4O-yf61ftn0.js} +1 -1
  24. package/dist/client/static/js/{diagram-CDSNMT55-wdbmv4td.js → diagram-CDSNMT55-cn3rs9xn.js} +1 -1
  25. package/dist/client/static/js/{diagram-MLGK6HIB-fkntefcq.js → diagram-MLGK6HIB-7kvtsj6c.js} +1 -1
  26. package/dist/client/static/js/{diagram-MPIPVDR6-k2zh7edp.js → diagram-MPIPVDR6-g3zg3r5e.js} +1 -1
  27. package/dist/client/static/js/{dockerfile-srcym0bs.js → dockerfile-f9j396wm.js} +1 -1
  28. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-4vc4vz9c.js → ebnfDiagram-ZINNZB2B-ft02nzne.js} +1 -1
  29. package/dist/client/static/js/{elk-276RUBZZ-g2ppf1by.js → elk-276RUBZZ-87fvkn2k.js} +1 -1
  30. package/dist/client/static/js/{erDiagram-OPXOYQCR-rmnwkb5q.js → erDiagram-OPXOYQCR-gh9mp6j8.js} +1 -1
  31. package/dist/client/static/js/flowDiagram-KWPJA3E3-6gc6gd1d.js +1 -0
  32. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-ptfvae64.js → ganttDiagram-FUAMR5RP-227xs61z.js} +1 -1
  33. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-ne9n3cyf.js → gitGraphDiagram-X574FWY7-4671gdym.js} +1 -1
  34. package/dist/client/static/js/{index-a7qccdq2.js → index-28a5kf88.js} +1 -1
  35. package/dist/client/static/js/{index-ymp2wqtc.js → index-35mh9kbs.js} +1 -1
  36. package/dist/client/static/js/{index-3fw3sd10.js → index-4c2zcvem.js} +7 -7
  37. package/dist/client/static/js/{index-jkph8wqq.js → index-4ry8kz8h.js} +1 -1
  38. package/dist/client/static/js/{index-v8vjh5jj.js → index-668chrpq.js} +1 -1
  39. package/dist/client/static/js/{index-8qgwj6m8.js → index-6rs8e8ng.js} +1 -1
  40. package/dist/client/static/js/{index-56w8m083.js → index-7qc2avfy.js} +1 -1
  41. package/dist/client/static/js/{index-5kvvb0zm.js → index-87qandgr.js} +1 -1
  42. package/dist/client/static/js/{index-ntx3bbmb.js → index-8xasfxf3.js} +1 -1
  43. package/dist/client/static/js/{index-gvkc9e32.js → index-d3prrt2q.js} +1 -1
  44. package/dist/client/static/js/{index-4pehdq5h.js → index-f1nqk6z6.js} +1 -1
  45. package/dist/client/static/js/{index-pzqsp5jw.js → index-f73v86a3.js} +1 -1
  46. package/dist/client/static/js/{index-270y5r9k.js → index-fjqp03xe.js} +1 -1
  47. package/dist/client/static/js/{index-mmsszqvn.js → index-fs3pbqwn.js} +1 -1
  48. package/dist/client/static/js/{index-xdqsqhnn.js → index-h8rr48px.js} +1 -1
  49. package/dist/client/static/js/{index-dmd26a1y.js → index-hdd8nqz8.js} +1 -1
  50. package/dist/client/static/js/{index-me7m3516.js → index-j2g39xq7.js} +1 -1
  51. package/dist/client/static/js/{index-dt22v9ns.js → index-jze0zg3z.js} +1 -1
  52. package/dist/client/static/js/{index-m3r0j562.js → index-kkfbd1db.js} +1 -1
  53. package/dist/client/static/js/{index-7h5n5rz4.js → index-m847wafq.js} +1 -1
  54. package/dist/client/static/js/{index-y2prm0xm.js → index-mtadrbxt.js} +1 -1
  55. package/dist/client/static/js/{index-7z63xr1s.js → index-phm1zb8m.js} +1 -1
  56. package/dist/client/static/js/{index-p89z1qmj.js → index-qbnd827h.js} +1 -1
  57. package/dist/client/static/js/{index-8w2tx2k9.js → index-s80x8d58.js} +1 -1
  58. package/dist/client/static/js/{index-ywpdhntc.js → index-tmnnafht.js} +1 -1
  59. package/dist/client/static/js/{index-hh05xd1d.js → index-vb3srfyc.js} +1 -1
  60. package/dist/client/static/js/{index-k61tdd4a.js → index-w0rbyw47.js} +1 -1
  61. package/dist/client/static/js/{index-5a4w58r2.js → index-w0xvdda9.js} +1 -1
  62. package/dist/client/static/js/{index-878d61js.js → index-wfcgqjzr.js} +1 -1
  63. package/dist/client/static/js/{index-pr7gk5eq.js → index-wgvysmnr.js} +1 -1
  64. package/dist/client/static/js/{index-mdxnhndy.js → index-xfr6r539.js} +1 -1
  65. package/dist/client/static/js/{index-k3c3n69j.js → index-xnk1500f.js} +2 -2
  66. package/dist/client/static/js/{index-61qjr1k0.js → index-y5ymgp20.js} +2 -2
  67. package/dist/client/static/js/{index-k5a6r25s.js → index-y91j4t1q.js} +1 -1
  68. package/dist/client/static/js/{infoDiagram-VRGFBTTK-ctfwcm3n.js → infoDiagram-VRGFBTTK-k1jnhhbp.js} +1 -1
  69. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-b0b0pn4y.js → ishikawaDiagram-OU5B5YK6-ar94x2gr.js} +1 -1
  70. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kdq12drs.js → journeyDiagram-ZHPQQLJL-ntfp0w54.js} +1 -1
  71. package/dist/client/static/js/{kanban-definition-PNTS6WVX-65x6xn2q.js → kanban-definition-PNTS6WVX-q5rsr6j3.js} +1 -1
  72. package/dist/client/static/js/{mermaid.core-0fq63jpa.js → mermaid.core-0gafsqrm.js} +2 -2
  73. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-p86myex3.js → mindmap-definition-NLK3R4M7-jgz6nyhk.js} +1 -1
  74. package/dist/client/static/js/one-dark-pro-n0as47q7.js +1 -0
  75. package/dist/client/static/js/one-light-05nw3mzj.js +1 -0
  76. package/dist/client/static/js/{pegDiagram-GJSIUBJH-p2hkk9xb.js → pegDiagram-GJSIUBJH-b3e9ma2c.js} +1 -1
  77. package/dist/client/static/js/{pieDiagram-5QR66LMP-bza19wkx.js → pieDiagram-5QR66LMP-66mn2qnt.js} +1 -1
  78. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-bxqec9w1.js → quadrantDiagram-O4NWA36T-n7warg0e.js} +1 -1
  79. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-1g3hx3sm.js → railroadDiagram-XR7U4H2S-k8j43rxj.js} +1 -1
  80. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-qbjjm48v.js → requirementDiagram-PLB6GJNP-ef2v7nyq.js} +1 -1
  81. package/dist/client/static/js/{rust-jatm47v6.js → rust-jvkbr060.js} +1 -1
  82. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t2ythbh7.js → sankeyDiagram-IPEJSGJF-3njbd1yd.js} +1 -1
  83. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-mqsfek2j.js → sequenceDiagram-PO4LG4MO-k2wqc0qt.js} +1 -1
  84. package/dist/client/static/js/{sizeCapture-INFHLROL-xj67pgds.js → sizeCapture-INFHLROL-cpnd12ee.js} +1 -1
  85. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-gj4fezak.js → stateDiagram-v2-GCMORJYK-1ydpxaeg.js} +1 -1
  86. package/dist/client/static/js/{swimlanes-2SLR337P-pgtdd1pk.js → swimlanes-2SLR337P-4md43da2.js} +1 -1
  87. package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-zk37paj9.js → swimlanesDiagram-TC7HE7FX-d48g5gjf.js} +1 -1
  88. package/dist/client/static/js/{timeline-definition-EJHVYXUP-q013vdd1.js → timeline-definition-EJHVYXUP-sp32bf3e.js} +1 -1
  89. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-7swsbqnq.js → usecaseDiagram-POWQR4AR-p2ssettn.js} +1 -1
  90. package/dist/client/static/js/{vennDiagram-UO4OBE2U-9dygxdxf.js → vennDiagram-UO4OBE2U-ejqq8b82.js} +1 -1
  91. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-aaaa9kj3.js → wardleyDiagram-VNRHLVJA-tkk79rsn.js} +1 -1
  92. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-tamf39gx.js → xychartDiagram-PMCCYNJV-zhgrsqpb.js} +1 -1
  93. package/package.json +1 -1
  94. package/src/server/lib/terminal/attach-replay.test.ts +80 -17
  95. package/src/server/plugins/static.test.ts +23 -1
  96. package/src/server/plugins/static.ts +24 -1
  97. package/dist/client/static/js/flowDiagram-KWPJA3E3-jvrvhb9d.js +0 -1
  98. package/dist/client/static/js/one-dark-pro-c4q810z4.js +0 -1
  99. package/dist/client/static/js/one-light-czk9dzya.js +0 -1
@@ -1,4 +1,4 @@
1
- import{be}from"./index-dmd26a1y.js";import{t,l,V,C,X,Or,R,F,z,P,U,q,j,p,h,ue,_f,Di,sr,se,kn,an}from"./index-61qjr1k0.js";import{Te}from"./index-8egjccbq.js";import{Mr}from"./index-fjnkzk12.js";import{dn,Cn}from"./index-t6gznaxm.js";var Re=Cn(function(me,Ie){(function(I,A){if(typeof me==="object"&&typeof Ie==="object")Ie.exports=A();else if(typeof define==="function"&&define.amd)define([],A);else if(typeof me==="object")me.layoutBase=A();else I.layoutBase=A()})(me,function(){return function(w){var I={};function A(v){if(I[v])return I[v].exports;var f=I[v]={i:v,l:!1,exports:{}};return w[v].call(f.exports,f,f.exports,A),f.l=!0,f.exports}return A.m=w,A.c=I,A.i=function(v){return v},A.d=function(v,f,o){if(!A.o(v,f))Object.defineProperty(v,f,{configurable:!1,enumerable:!0,get:o})},A.n=function(v){var f=v&&v.__esModule?function(){return v.default}:function(){return v};return A.d(f,"a",f),f},A.o=function(v,f){return Object.prototype.hasOwnProperty.call(v,f)},A.p="",A(A.s=28)}([function(w,I,A){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1000,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,w.exports=v},function(w,I,A){var v=A(2),f=A(8),o=A(9);function n(u,r,y){v.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=u,this.target=r}n.prototype=Object.create(v.prototype);for(var a in v)n[a]=v[a];n.prototype.getSource=function(){return this.source},n.prototype.getTarget=function(){return this.target},n.prototype.isInterGraph=function(){return this.isInterGraph},n.prototype.getLength=function(){return this.length},n.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},n.prototype.getBendpoints=function(){return this.bendpoints},n.prototype.getLca=function(){return this.lca},n.prototype.getSourceInLca=function(){return this.sourceInLca},n.prototype.getTargetInLca=function(){return this.targetInLca},n.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;else if(this.target===u)return this.source;else throw"Node is not incident with this edge"},n.prototype.getOtherEndInGraph=function(u,r){var y=this.getOtherEnd(u),i=r.getGraphManager().getRoot();while(!0){if(y.getOwner()==r)return y;if(y.getOwner()==i)break;y=y.getOwner().getParent()}return null},n.prototype.updateLength=function(){var u=[,,,,];if(this.isOverlapingSourceAndTarget=f.getIntersection(this.target.getRect(),this.source.getRect(),u),!this.isOverlapingSourceAndTarget){if(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1)this.lengthX=o.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=o.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},n.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=o.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=o.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=n},function(w,I,A){function v(f){this.vGraphObject=f}w.exports=v},function(w,I,A){var v=A(2),f=A(10),o=A(13),n=A(0),a=A(16),u=A(5);function r(i,e,g,d){if(g==null&&d==null)d=e;if(v.call(this,d),i.graphManager!=null)i=i.graphManager;if(this.estimatedSize=f.MIN_VALUE,this.inclusionTreeDepth=f.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=i,g!=null&&e!=null)this.rect=new o(e.x,e.y,g.width,g.height);else this.rect=new o}r.prototype=Object.create(v.prototype);for(var y in v)r[y]=v[y];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(i){this.rect.width=i},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(i){this.rect.height=i},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(i,e){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=e.width,this.rect.height=e.height},r.prototype.setCenter=function(i,e){this.rect.x=i-this.rect.width/2,this.rect.y=e-this.rect.height/2},r.prototype.setLocation=function(i,e){this.rect.x=i,this.rect.y=e},r.prototype.moveBy=function(i,e){this.rect.x+=i,this.rect.y+=e},r.prototype.getEdgeListToNode=function(i){var e=[],g,d=this;return d.edges.forEach(function(c){if(c.target==i){if(c.source!=d)throw"Incorrect edge source!";e.push(c)}}),e},r.prototype.getEdgesBetween=function(i){var e=[],g,d=this;return d.edges.forEach(function(c){if(!(c.source==d||c.target==d))throw"Incorrect edge source and/or target";if(c.target==i||c.source==i)e.push(c)}),e},r.prototype.getNeighborsList=function(){var i=new Set,e=this;return e.edges.forEach(function(g){if(g.source==e)i.add(g.target);else{if(g.target!=e)throw"Incorrect incidency!";i.add(g.source)}}),i},r.prototype.withChildren=function(){var i=new Set,e,g;if(i.add(this),this.child!=null){var d=this.child.getNodes();for(var c=0;c<d.length;c++)e=d[c],g=e.withChildren(),g.forEach(function(O){i.add(O)})}return i},r.prototype.getNoOfChildren=function(){var i=0,e;if(this.child==null)i=1;else{var g=this.child.getNodes();for(var d=0;d<g.length;d++)e=g[d],i+=e.getNoOfChildren()}if(i==0)i=1;return i},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==f.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},r.prototype.scatter=function(){var i,e,g=-n.INITIAL_WORLD_BOUNDARY,d=n.INITIAL_WORLD_BOUNDARY;i=n.WORLD_CENTER_X+a.nextDouble()*(d-g)+g;var c=-n.INITIAL_WORLD_BOUNDARY,O=n.INITIAL_WORLD_BOUNDARY;e=n.WORLD_CENTER_Y+a.nextDouble()*(O-c)+c,this.rect.x=i,this.rect.y=e},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),n.NODE_DIMENSIONS_INCLUDE_LABELS){var e=i.getRight()-i.getLeft(),g=i.getBottom()-i.getTop();if(this.labelWidth){if(this.labelPosHorizontal=="left")this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth);else if(this.labelPosHorizontal=="center"&&this.labelWidth>e)this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth);else if(this.labelPosHorizontal=="right")this.setWidth(e+this.labelWidth)}if(this.labelHeight){if(this.labelPosVertical=="top")this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight);else if(this.labelPosVertical=="center"&&this.labelHeight>g)this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight);else if(this.labelPosVertical=="bottom")this.setHeight(g+this.labelHeight)}}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==f.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(i){var e=this.rect.x;if(e>n.WORLD_BOUNDARY)e=n.WORLD_BOUNDARY;else if(e<-n.WORLD_BOUNDARY)e=-n.WORLD_BOUNDARY;var g=this.rect.y;if(g>n.WORLD_BOUNDARY)g=n.WORLD_BOUNDARY;else if(g<-n.WORLD_BOUNDARY)g=-n.WORLD_BOUNDARY;var d=new u(e,g),c=i.inverseTransformPoint(d);this.setLocation(c.x,c.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},w.exports=r},function(w,I,A){var v=A(0);function f(){}for(var o in v)f[o]=v[o];f.MAX_ITERATIONS=2500,f.DEFAULT_EDGE_LENGTH=50,f.DEFAULT_SPRING_STRENGTH=0.45,f.DEFAULT_REPULSION_STRENGTH=4500,f.DEFAULT_GRAVITY_STRENGTH=0.4,f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,f.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,f.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,f.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,f.COOLING_ADAPTATION_FACTOR=0.33,f.ADAPTATION_LOWER_NODE_LIMIT=1000,f.ADAPTATION_UPPER_NODE_LIMIT=5000,f.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,f.MAX_NODE_DISPLACEMENT=f.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,f.CONVERGENCE_CHECK_PERIOD=100,f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,f.MIN_EDGE_LENGTH=1,f.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=f},function(w,I,A){function v(f,o){if(f==null&&o==null)this.x=0,this.y=0;else this.x=f,this.y=o}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(f){this.x=f},v.prototype.setY=function(f){this.y=f},v.prototype.getDifference=function(f){return new DimensionD(this.x-f.x,this.y-f.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(f){return this.x+=f.width,this.y+=f.height,this},w.exports=v},function(w,I,A){var v=A(2),f=A(10),o=A(0),n=A(7),a=A(3),u=A(1),r=A(13),y=A(12),i=A(11);function e(d,c,O){if(v.call(this,O),this.estimatedSize=f.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,c!=null&&c instanceof n)this.graphManager=c;else if(c!=null&&c instanceof Layout)this.graphManager=c.graphManager}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getNodes=function(){return this.nodes},e.prototype.getEdges=function(){return this.edges},e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getParent=function(){return this.parent},e.prototype.getLeft=function(){return this.left},e.prototype.getRight=function(){return this.right},e.prototype.getTop=function(){return this.top},e.prototype.getBottom=function(){return this.bottom},e.prototype.isConnected=function(){return this.isConnected},e.prototype.add=function(d,c,O){if(c==null&&O==null){var T=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(T)>-1)throw"Node already in graph!";return T.owner=this,this.getNodes().push(T),T}else{var N=d;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(O)>-1))throw"Source or target not in graph!";if(!(c.owner==O.owner&&c.owner==this))throw"Both owners must be this graph!";if(c.owner!=O.owner)return null;if(N.source=c,N.target=O,N.isInterGraph=!1,this.getEdges().push(N),c.edges.push(N),O!=c)O.edges.push(N);return N}},e.prototype.remove=function(d){var c=d;if(d instanceof a){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var O=c.edges.slice(),T,N=O.length;for(var D=0;D<N;D++)if(T=O[D],T.isInterGraph)this.graphManager.remove(T);else T.source.owner.remove(T);var H=this.nodes.indexOf(c);if(H==-1)throw"Node not in owner node list!";this.nodes.splice(H,1)}else if(d instanceof u){var T=d;if(T==null)throw"Edge is null!";if(!(T.source!=null&&T.target!=null))throw"Source and/or target is null!";if(!(T.source.owner!=null&&T.target.owner!=null&&T.source.owner==this&&T.target.owner==this))throw"Source and/or target owner is invalid!";var x=T.source.edges.indexOf(T),B=T.target.edges.indexOf(T);if(!(x>-1&&B>-1))throw"Source and/or target doesn't know this edge!";if(T.source.edges.splice(x,1),T.target!=T.source)T.target.edges.splice(B,1);var H=T.source.owner.getEdges().indexOf(T);if(H==-1)throw"Not in owner's edge list!";T.source.owner.getEdges().splice(H,1)}},e.prototype.updateLeftTop=function(){var{MAX_VALUE:d,MAX_VALUE:c}=f,O,T,N,D=this.getNodes(),H=D.length;for(var x=0;x<H;x++){var B=D[x];if(O=B.getTop(),T=B.getLeft(),d>O)d=O;if(c>T)c=T}if(d==f.MAX_VALUE)return null;if(D[0].getParent().paddingLeft!=null)N=D[0].getParent().paddingLeft;else N=this.margin;return this.left=c-N,this.top=d-N,new y(this.left,this.top)},e.prototype.updateBounds=function(d){var c=f.MAX_VALUE,O=-f.MAX_VALUE,T=f.MAX_VALUE,N=-f.MAX_VALUE,D,H,x,B,tt,J=this.nodes,ft=J.length;for(var G=0;G<ft;G++){var et=J[G];if(d&&et.child!=null)et.updateBounds();if(D=et.getLeft(),H=et.getRight(),x=et.getTop(),B=et.getBottom(),c>D)c=D;if(O<H)O=H;if(T>x)T=x;if(N<B)N=B}var s=new r(c,T,O-c,N-T);if(c==f.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(J[0].getParent().paddingLeft!=null)tt=J[0].getParent().paddingLeft;else tt=this.margin;this.left=s.x-tt,this.right=s.x+s.width+tt,this.top=s.y-tt,this.bottom=s.y+s.height+tt},e.calculateBounds=function(d){var c=f.MAX_VALUE,O=-f.MAX_VALUE,T=f.MAX_VALUE,N=-f.MAX_VALUE,D,H,x,B,tt=d.length;for(var J=0;J<tt;J++){var ft=d[J];if(D=ft.getLeft(),H=ft.getRight(),x=ft.getTop(),B=ft.getBottom(),c>D)c=D;if(O<H)O=H;if(T>x)T=x;if(N<B)N=B}var G=new r(c,T,O-c,N-T);return G},e.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==f.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){var d=0,c=this.nodes,O=c.length;for(var T=0;T<O;T++){var N=c[T];d+=N.calcEstimatedSize()}if(d==0)this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=d/Math.sqrt(this.nodes.length);return this.estimatedSize},e.prototype.updateConnected=function(){var d=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new i,O=new Set,T=this.nodes[0],N,D,H=T.withChildren();H.forEach(function(G){c.push(G),O.add(G)});while(c.length!==0){T=c.shift(),N=T.getEdges();var x=N.length;for(var B=0;B<x;B++){var tt=N[B];if(D=tt.getOtherEndInGraph(T,this),D!=null&&!O.has(D)){var J=D.withChildren();J.forEach(function(G){c.push(G),O.add(G)})}}}if(this.isConnected=!1,O.size>=this.nodes.length){var ft=0;if(O.forEach(function(G){if(G.owner==d)ft++}),ft==this.nodes.length)this.isConnected=!0}},w.exports=e},function(w,I,A){var v,f=A(1);function o(n){v=A(6),this.layout=n,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var n=this.layout.newGraph(),a=this.layout.newNode(null),u=this.add(n,a);return this.setRootGraph(u),this.rootGraph},o.prototype.add=function(n,a,u,r,y){if(u==null&&r==null&&y==null){if(n==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(n)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(n),n.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return n.parent=a,a.child=n,n}else{y=u,r=a,u=n;var i=r.getOwner(),e=y.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(e!=null&&e.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==e)return u.isInterGraph=!1,i.add(u,r,y);else{if(u.isInterGraph=!0,u.source=r,u.target=y,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}}},o.prototype.remove=function(n){if(n instanceof v){var a=n;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(a.getEdges());var r,y=u.length;for(var i=0;i<y;i++)r=u[i],a.remove(r);var e=[];e=e.concat(a.getNodes());var g;y=e.length;for(var i=0;i<y;i++)g=e[i],a.remove(g);if(a==this.rootGraph)this.setRootGraph(null);var d=this.graphs.indexOf(a);this.graphs.splice(d,1),a.parent=null}else if(n instanceof f){if(r=n,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var d=r.source.edges.indexOf(r);if(r.source.edges.splice(d,1),d=r.target.edges.indexOf(r),r.target.edges.splice(d,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var d=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(d,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){var n=[],a=this.getGraphs(),u=a.length;for(var r=0;r<u;r++)n=n.concat(a[r].getNodes());this.allNodes=n}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var n=[],a=this.getGraphs(),u=a.length;for(var r=0;r<a.length;r++)n=n.concat(a[r].getEdges());n=n.concat(this.edges),this.allEdges=n}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(n){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=n},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(n){if(n.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=n,n.parent==null)n.parent=this.layout.newNode("Root node")},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(n,a){if(!(n!=null&&a!=null))throw"assert failed";if(n==a)return!0;var u=n.getOwner(),r;do{if(r=u.getParent(),r==null)break;if(r==a)return!0;if(u=r.getOwner(),u==null)break}while(!0);u=a.getOwner();do{if(r=u.getParent(),r==null)break;if(r==n)return!0;if(u=r.getOwner(),u==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){var n,a,u,r,y,i=this.getAllEdges(),e=i.length;for(var g=0;g<e;g++){if(n=i[g],a=n.source,u=n.target,n.lca=null,n.sourceInLca=a,n.targetInLca=u,a==u){n.lca=a.getOwner();continue}r=a.getOwner();while(n.lca==null){n.targetInLca=u,y=u.getOwner();while(n.lca==null){if(y==r){n.lca=y;break}if(y==this.rootGraph)break;if(n.lca!=null)throw"assert failed";n.targetInLca=y.getParent(),y=n.targetInLca.getOwner()}if(r==this.rootGraph)break;if(n.lca==null)n.sourceInLca=r.getParent(),r=n.sourceInLca.getOwner()}if(n.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(n,a){if(n==a)return n.getOwner();var u=n.getOwner();do{if(u==null)break;var r=a.getOwner();do{if(r==null)break;if(r==u)return r;r=r.getParent().getOwner()}while(!0);u=u.getParent().getOwner()}while(!0);return u},o.prototype.calcInclusionTreeDepths=function(n,a){if(n==null&&a==null)n=this.rootGraph,a=1;var u,r=n.getNodes(),y=r.length;for(var i=0;i<y;i++)if(u=r[i],u.inclusionTreeDepth=a,u.child!=null)this.calcInclusionTreeDepths(u.child,a+1)},o.prototype.includesInvalidEdge=function(){var n,a=[],u=this.edges.length;for(var r=0;r<u;r++)if(n=this.edges[r],this.isOneAncestorOfOther(n.source,n.target))a.push(n);for(var r=0;r<a.length;r++)this.remove(a[r]);return!1},w.exports=o},function(w,I,A){var v=A(12);function f(){}f.calcSeparationAmount=function(o,n,a,u){if(!o.intersects(n))throw"assert failed";var r=[,,];if(this.decideDirectionsForOverlappingNodes(o,n,r),a[0]=Math.min(o.getRight(),n.getRight())-Math.max(o.x,n.x),a[1]=Math.min(o.getBottom(),n.getBottom())-Math.max(o.y,n.y),o.getX()<=n.getX()&&o.getRight()>=n.getRight())a[0]+=Math.min(n.getX()-o.getX(),o.getRight()-n.getRight());else if(n.getX()<=o.getX()&&n.getRight()>=o.getRight())a[0]+=Math.min(o.getX()-n.getX(),n.getRight()-o.getRight());if(o.getY()<=n.getY()&&o.getBottom()>=n.getBottom())a[1]+=Math.min(n.getY()-o.getY(),o.getBottom()-n.getBottom());else if(n.getY()<=o.getY()&&n.getBottom()>=o.getBottom())a[1]+=Math.min(o.getY()-n.getY(),n.getBottom()-o.getBottom());var y=Math.abs((n.getCenterY()-o.getCenterY())/(n.getCenterX()-o.getCenterX()));if(n.getCenterY()===o.getCenterY()&&n.getCenterX()===o.getCenterX())y=1;var i=y*a[0],e=a[1]/y;if(a[0]<e)e=a[0];else i=a[1];a[0]=-1*r[0]*(e/2+u),a[1]=-1*r[1]*(i/2+u)},f.decideDirectionsForOverlappingNodes=function(o,n,a){if(o.getCenterX()<n.getCenterX())a[0]=-1;else a[0]=1;if(o.getCenterY()<n.getCenterY())a[1]=-1;else a[1]=1},f.getIntersection2=function(o,n,a){var u=o.getCenterX(),r=o.getCenterY(),y=n.getCenterX(),i=n.getCenterY();if(o.intersects(n))return a[0]=u,a[1]=r,a[2]=y,a[3]=i,!0;var e=o.getX(),g=o.getY(),d=o.getRight(),c=o.getX(),O=o.getBottom(),T=o.getRight(),N=o.getWidthHalf(),D=o.getHeightHalf(),H=n.getX(),x=n.getY(),B=n.getRight(),tt=n.getX(),J=n.getBottom(),ft=n.getRight(),G=n.getWidthHalf(),et=n.getHeightHalf(),s=!1,L=!1;if(u===y){if(r>i)return a[0]=u,a[1]=g,a[2]=y,a[3]=J,!1;else if(r<i)return a[0]=u,a[1]=O,a[2]=y,a[3]=x,!1}else if(r===i){if(u>y)return a[0]=e,a[1]=r,a[2]=B,a[3]=i,!1;else if(u<y)return a[0]=d,a[1]=r,a[2]=H,a[3]=i,!1}else{var E=o.height/o.width,M=n.height/n.width,m=(i-r)/(y-u),Y=void 0,b=void 0,Q=void 0,Z=void 0,W=void 0,ht=void 0;if(-E===m)if(u>y)a[0]=c,a[1]=O,s=!0;else a[0]=d,a[1]=g,s=!0;else if(E===m)if(u>y)a[0]=e,a[1]=g,s=!0;else a[0]=T,a[1]=O,s=!0;if(-M===m)if(y>u)a[2]=tt,a[3]=J,L=!0;else a[2]=B,a[3]=x,L=!0;else if(M===m)if(y>u)a[2]=H,a[3]=x,L=!0;else a[2]=ft,a[3]=J,L=!0;if(s&&L)return!1;if(u>y)if(r>i)Y=this.getCardinalDirection(E,m,4),b=this.getCardinalDirection(M,m,2);else Y=this.getCardinalDirection(-E,m,3),b=this.getCardinalDirection(-M,m,1);else if(r>i)Y=this.getCardinalDirection(-E,m,1),b=this.getCardinalDirection(-M,m,3);else Y=this.getCardinalDirection(E,m,2),b=this.getCardinalDirection(M,m,4);if(!s)switch(Y){case 1:Z=g,Q=u+-D/m,a[0]=Q,a[1]=Z;break;case 2:Q=T,Z=r+N*m,a[0]=Q,a[1]=Z;break;case 3:Z=O,Q=u+D/m,a[0]=Q,a[1]=Z;break;case 4:Q=c,Z=r+-N*m,a[0]=Q,a[1]=Z;break}if(!L)switch(b){case 1:ht=x,W=y+-et/m,a[2]=W,a[3]=ht;break;case 2:W=ft,ht=i+G*m,a[2]=W,a[3]=ht;break;case 3:ht=J,W=y+et/m,a[2]=W,a[3]=ht;break;case 4:W=tt,ht=i+-G*m,a[2]=W,a[3]=ht;break}}return!1},f.getCardinalDirection=function(o,n,a){if(o>n)return a;else return 1+a%4},f.getIntersection=function(o,n,a,u){if(u==null)return this.getIntersection2(o,n,a);var{x:r,y}=o,{x:i,y:e}=n,{x:g,y:d}=a,{x:c,y:O}=u,T=void 0,N=void 0,D=void 0,H=void 0,x=void 0,B=void 0,tt=void 0,J=void 0,ft=void 0;if(D=e-y,x=r-i,tt=i*y-r*e,H=O-d,B=g-c,J=c*d-g*O,ft=D*B-H*x,ft===0)return null;return T=(x*J-B*tt)/ft,N=(H*tt-D*J)/ft,new v(T,N)},f.angleOfVector=function(o,n,a,u){var r=void 0;if(o!==a){if(r=Math.atan((u-n)/(a-o)),a<o)r+=Math.PI;else if(u<n)r+=this.TWO_PI}else if(u<n)r=this.ONE_AND_HALF_PI;else r=this.HALF_PI;return r},f.doIntersect=function(o,n,a,u){var{x:r,y}=o,{x:i,y:e}=n,{x:g,y:d}=a,{x:c,y:O}=u,T=(i-r)*(O-d)-(c-g)*(e-y);if(T===0)return!1;else{var N=((O-d)*(c-r)+(g-c)*(O-y))/T,D=((y-e)*(c-r)+(i-r)*(O-y))/T;return 0<N&&N<1&&0<D&&D<1}},f.findCircleLineIntersections=function(o,n,a,u,r,y,i){var e=(a-o)*(a-o)+(u-n)*(u-n),g=2*((o-r)*(a-o)+(n-y)*(u-n)),d=(o-r)*(o-r)+(n-y)*(n-y)-i*i,c=g*g-4*e*d;if(c>=0){var O=(-g+Math.sqrt(g*g-4*e*d))/(2*e),T=(-g-Math.sqrt(g*g-4*e*d))/(2*e),N=null;if(O>=0&&O<=1)return[O];if(T>=0&&T<=1)return[T];return N}else return null},f.HALF_PI=0.5*Math.PI,f.ONE_AND_HALF_PI=1.5*Math.PI,f.TWO_PI=2*Math.PI,f.THREE_PI=3*Math.PI,w.exports=f},function(w,I,A){function v(){}v.sign=function(f){if(f>0)return 1;else if(f<0)return-1;else return 0},v.floor=function(f){return f<0?Math.ceil(f):Math.floor(f)},v.ceil=function(f){return f<0?Math.floor(f):Math.ceil(f)},w.exports=v},function(w,I,A){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,w.exports=v},function(w,I,A){var v=function(){function r(y,i){for(var e=0;e<i.length;e++){var g=i[e];if(g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g)g.writable=!0;Object.defineProperty(y,g.key,g)}}return function(y,i,e){if(i)r(y.prototype,i);if(e)r(y,e);return y}}();function f(r,y){if(!(r instanceof y))throw TypeError("Cannot call a class as a function")}var o=function(y){return{value:y,next:null,prev:null}},n=function(y,i,e,g){if(y!==null)y.next=i;else g.head=i;if(e!==null)e.prev=i;else g.tail=i;return i.prev=y,i.next=e,g.length++,i},a=function(y,i){var{prev:e,next:g}=y;if(e!==null)e.next=g;else i.head=g;if(g!==null)g.prev=e;else i.tail=e;return y.prev=y.next=null,i.length--,y},u=function(){function r(y){var i=this;if(f(this,r),this.length=0,this.head=null,this.tail=null,y!=null)y.forEach(function(e){return i.push(e)})}return v(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,e){return n(e.prev,o(i),e,this)}},{key:"insertAfter",value:function(i,e){return n(e,o(i),e.next,this)}},{key:"insertNodeBefore",value:function(i,e){return n(e.prev,i,e,this)}},{key:"insertNodeAfter",value:function(i,e){return n(e,i,e.next,this)}},{key:"push",value:function(i){return n(this.tail,o(i),null,this)}},{key:"unshift",value:function(i){return n(null,o(i),this.head,this)}},{key:"remove",value:function(i){return a(i,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){var e=1,g=this.head;while(e<i)g=g.next,e++;return g.value}}},{key:"set_object_at",value:function(i,e){if(i<=this.length()){var g=1,d=this.head;while(g<i)d=d.next,g++;d.value=e}}}]),r}();w.exports=u},function(w,I,A){function v(f,o,n){if(this.x=null,this.y=null,f==null&&o==null&&n==null)this.x=0,this.y=0;else if(typeof f=="number"&&typeof o=="number"&&n==null)this.x=f,this.y=o;else if(f.constructor.name=="Point"&&o==null&&n==null)n=f,this.x=n.x,this.y=n.y}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(f,o,n){if(f.constructor.name=="Point"&&o==null&&n==null)n=f,this.setLocation(n.x,n.y);else if(typeof f=="number"&&typeof o=="number"&&n==null)if(parseInt(f)==f&&parseInt(o)==o)this.move(f,o);else this.x=Math.floor(f+0.5),this.y=Math.floor(o+0.5)},v.prototype.move=function(f,o){this.x=f,this.y=o},v.prototype.translate=function(f,o){this.x+=f,this.y+=o},v.prototype.equals=function(f){if(f.constructor.name=="Point"){var o=f;return this.x==o.x&&this.y==o.y}return this==f},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},w.exports=v},function(w,I,A){function v(f,o,n,a){if(this.x=0,this.y=0,this.width=0,this.height=0,f!=null&&o!=null&&n!=null&&a!=null)this.x=f,this.y=o,this.width=n,this.height=a}v.prototype.getX=function(){return this.x},v.prototype.setX=function(f){this.x=f},v.prototype.getY=function(){return this.y},v.prototype.setY=function(f){this.y=f},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(f){this.width=f},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(f){this.height=f},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(f){if(this.getRight()<f.x)return!1;if(this.getBottom()<f.y)return!1;if(f.getRight()<this.x)return!1;if(f.getBottom()<this.y)return!1;return!0},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},w.exports=v},function(w,I,A){var v=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol==="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function f(){}f.lastID=0,f.createID=function(o){if(f.isPrimitive(o))return o;if(o.uniqueID!=null)return o.uniqueID;return o.uniqueID=f.getString(),f.lastID++,o.uniqueID},f.getString=function(o){if(o==null)o=f.lastID;return"Object#"+o},f.isPrimitive=function(o){var n=typeof o>"u"?"undefined":v(o);return o==null||n!="object"&&n!="function"},w.exports=f},function(w,I,A){function v(g){if(Array.isArray(g)){for(var d=0,c=Array(g.length);d<g.length;d++)c[d]=g[d];return c}else return Array.from(g)}var f=A(0),o=A(7),n=A(3),a=A(1),u=A(6),r=A(5),y=A(17),i=A(29);function e(g){if(i.call(this),this.layoutQuality=f.QUALITY,this.createBendsAsNeeded=f.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=f.DEFAULT_INCREMENTAL,this.animationOnLayout=f.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=f.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=f.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=f.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null)this.isRemoteUse=g}e.RANDOM_SEED=1,e.prototype=Object.create(i.prototype),e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},e.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},e.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},e.prototype.newGraphManager=function(){var g=new o(this);return this.graphManager=g,g},e.prototype.newGraph=function(g){return new u(null,this.graphManager,g)},e.prototype.newNode=function(g){return new n(this.graphManager,g)},e.prototype.newEdge=function(g){return new a(null,null,g)},e.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},e.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var g;if(this.checkLayoutSuccess())g=!1;else g=this.layout();if(f.ANIMATE==="during")return!1;if(g){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,g},e.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},e.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var g,d=this.graphManager.getAllEdges();for(var c=0;c<d.length;c++)g=d[c];var O,T=this.graphManager.getRoot().getNodes();for(var c=0;c<T.length;c++)O=T[c];this.update(this.graphManager.getRoot())}},e.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof n){var d=g;if(d.getChild()!=null){var c=d.getChild().getNodes();for(var O=0;O<c.length;O++)update(c[O])}if(d.vGraphObject!=null){var T=d.vGraphObject;T.update(d)}}else if(g instanceof a){var N=g;if(N.vGraphObject!=null){var D=N.vGraphObject;D.update(N)}}else if(g instanceof u){var H=g;if(H.vGraphObject!=null){var x=H.vGraphObject;x.update(H)}}},e.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=f.QUALITY,this.animationDuringLayout=f.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=f.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=f.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=f.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=f.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=f.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},e.prototype.transform=function(g){if(g==null)this.transform(new r(0,0));else{var d=new y,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){d.setWorldOrgX(g.x),d.setWorldOrgY(g.y),d.setDeviceOrgX(c.x),d.setDeviceOrgY(c.y);var O=this.getAllNodes(),T;for(var N=0;N<O.length;N++)T=O[N],T.transform(d)}}},e.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var d,c,O=g.getNodes();for(var T=0;T<O.length;T++)if(d=O[T],c=d.getChild(),c==null)d.scatter();else if(c.getNodes().length==0)d.scatter();else this.positionNodesRandomly(c),d.updateBounds()}},e.prototype.getFlatForest=function(){var g=[],d=!0,c=this.graphManager.getRoot().getNodes(),O=!0;for(var T=0;T<c.length;T++)if(c[T].getChild()!=null)O=!1;if(!O)return g;var N=new Set,D=[],H=new Map,x=[];x=x.concat(c);while(x.length>0&&d){D.push(x[0]);while(D.length>0&&d){var B=D[0];D.splice(0,1),N.add(B);var tt=B.getEdges();for(var T=0;T<tt.length;T++){var J=tt[T].getOtherEnd(B);if(H.get(B)!=J)if(!N.has(J))D.push(J),H.set(J,B);else{d=!1;break}}}if(!d)g=[];else{var ft=[].concat(v(N));g.push(ft);for(var T=0;T<ft.length;T++){var G=ft[T],et=x.indexOf(G);if(et>-1)x.splice(et,1)}N=new Set,H=new Map}}return g},e.prototype.createDummyNodesForBendpoints=function(g){var d=[],c=g.source,O=this.graphManager.calcLowestCommonAncestor(g.source,g.target);for(var T=0;T<g.bendpoints.length;T++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),O.add(N);var D=this.newEdge(null);this.graphManager.add(D,c,N),d.add(N),c=N}var D=this.newEdge(null);if(this.graphManager.add(D,c,g.target),this.edgeToDummyNodes.set(g,d),g.isInterGraph())this.graphManager.remove(g);else O.remove(g);return d},e.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(v(this.edgeToDummyNodes.keys())).concat(g);for(var d=0;d<g.length;d++){var c=g[d];if(c.bendpoints.length>0){var O=this.edgeToDummyNodes.get(c);for(var T=0;T<O.length;T++){var N=O[T],D=new r(N.getCenterX(),N.getCenterY()),H=c.bendpoints.get(T);H.x=D.x,H.y=D.y,N.getOwner().remove(N)}this.graphManager.add(c,c.source,c.target)}}},e.transform=function(g,d,c,O){if(c!=null&&O!=null){var T=d;if(g<=50){var N=d/c;T-=(d-N)/50*(50-g)}else{var D=d*O;T+=(D-d)/50*(g-50)}return T}else{var H,x;if(g<=50)H=9*d/500,x=d/10;else H=9*d/50,x=-8*d;return H*g+x}},e.findCenterOfTree=function(g){var d=[];d=d.concat(g);var c=[],O=new Map,T=!1,N=null;if(d.length==1||d.length==2)T=!0,N=d[0];for(var D=0;D<d.length;D++){var H=d[D],x=H.getNeighborsList().size;if(O.set(H,H.getNeighborsList().size),x==1)c.push(H)}var B=[];B=B.concat(c);while(!T){var tt=[];tt=tt.concat(B),B=[];for(var D=0;D<d.length;D++){var H=d[D],J=d.indexOf(H);if(J>=0)d.splice(J,1);var ft=H.getNeighborsList();ft.forEach(function(s){if(c.indexOf(s)<0){var L=O.get(s),E=L-1;if(E==1)B.push(s);O.set(s,E)}})}if(c=c.concat(B),d.length==1||d.length==2)T=!0,N=d[0]}return N},e.prototype.setGraphManager=function(g){this.graphManager=g},w.exports=e},function(w,I,A){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},w.exports=v},function(w,I,A){var v=A(5);function f(o,n){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}f.prototype.getWorldOrgX=function(){return this.lworldOrgX},f.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},f.prototype.getWorldOrgY=function(){return this.lworldOrgY},f.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},f.prototype.getWorldExtX=function(){return this.lworldExtX},f.prototype.setWorldExtX=function(o){this.lworldExtX=o},f.prototype.getWorldExtY=function(){return this.lworldExtY},f.prototype.setWorldExtY=function(o){this.lworldExtY=o},f.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},f.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},f.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},f.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},f.prototype.getDeviceExtX=function(){return this.ldeviceExtX},f.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},f.prototype.getDeviceExtY=function(){return this.ldeviceExtY},f.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},f.prototype.transformX=function(o){var n=0,a=this.lworldExtX;if(a!=0)n=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/a;return n},f.prototype.transformY=function(o){var n=0,a=this.lworldExtY;if(a!=0)n=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/a;return n},f.prototype.inverseTransformX=function(o){var n=0,a=this.ldeviceExtX;if(a!=0)n=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/a;return n},f.prototype.inverseTransformY=function(o){var n=0,a=this.ldeviceExtY;if(a!=0)n=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/a;return n},f.prototype.inverseTransformPoint=function(o){var n=new v(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return n},w.exports=f},function(w,I,A){function v(i){if(Array.isArray(i)){for(var e=0,g=Array(i.length);e<i.length;e++)g[e]=i[e];return g}else return Array.from(i)}var f=A(15),o=A(4),n=A(0),a=A(8),u=A(9);function r(){f.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}r.prototype=Object.create(f.prototype);for(var y in f)r[y]=f[y];r.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){var i,e,g,d,c,O,T,N=this.getGraphManager().getAllEdges();for(var D=0;D<N.length;D++)if(i=N[D],e=i.idealLength,i.isInterGraph){if(d=i.getSource(),c=i.getTarget(),O=i.getSourceInLca().getEstimatedSize(),T=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)i.idealLength+=O+T-2*n.SIMPLE_NODE_SIZE;g=i.getLca().getInclusionTreeDepth(),i.idealLength+=e*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(d.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*g)}},r.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;if(this.incremental){if(i>o.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-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}else{if(i>o.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(i-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){var i=this.getAllEdges(),e;for(var g=0;g<i.length;g++)e=i[g],this.calcSpringForce(e,e.idealLength)},r.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,d,c,O,T=this.getAllNodes(),N;if(this.useFRGridVariant){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&i)this.updateGrid();N=new Set;for(g=0;g<T.length;g++)c=T[g],this.calculateRepulsionForceOfANode(c,N,i,e),N.add(c)}else for(g=0;g<T.length;g++){c=T[g];for(d=g+1;d<T.length;d++){if(O=T[d],c.getOwner()!=O.getOwner())continue;this.calcRepulsionForce(c,O)}}},r.prototype.calcGravitationalForces=function(){var i,e=this.getAllNodesToApplyGravitation();for(var g=0;g<e.length;g++)i=e[g],this.calcGravitationalForce(i)},r.prototype.moveNodes=function(){var i=this.getAllNodes(),e;for(var g=0;g<i.length;g++)e=i[g],e.move()},r.prototype.calcSpringForce=function(i,e){var g=i.getSource(),d=i.getTarget(),c,O,T,N;if(this.uniformLeafNodeSizes&&g.getChild()==null&&d.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;if(c=i.getLength(),c==0)return;O=i.edgeElasticity*(c-e),T=O*(i.lengthX/c),N=O*(i.lengthY/c),g.springForceX+=T,g.springForceY+=N,d.springForceX-=T,d.springForceY-=N},r.prototype.calcRepulsionForce=function(i,e){var g=i.getRect(),d=e.getRect(),c=[,,],O=[,,,,],T,N,D,H,x,B,tt;if(g.intersects(d)){a.calcSeparationAmount(g,d,c,o.DEFAULT_EDGE_LENGTH/2),B=2*c[0],tt=2*c[1];var J=i.noOfChildren*e.noOfChildren/(i.noOfChildren+e.noOfChildren);i.repulsionForceX-=J*B,i.repulsionForceY-=J*tt,e.repulsionForceX+=J*B,e.repulsionForceY+=J*tt}else{if(this.uniformLeafNodeSizes&&i.getChild()==null&&e.getChild()==null)T=d.getCenterX()-g.getCenterX(),N=d.getCenterY()-g.getCenterY();else a.getIntersection(g,d,O),T=O[2]-O[0],N=O[3]-O[1];if(Math.abs(T)<o.MIN_REPULSION_DIST)T=u.sign(T)*o.MIN_REPULSION_DIST;if(Math.abs(N)<o.MIN_REPULSION_DIST)N=u.sign(N)*o.MIN_REPULSION_DIST;D=T*T+N*N,H=Math.sqrt(D),x=(i.nodeRepulsion/2+e.nodeRepulsion/2)*i.noOfChildren*e.noOfChildren/D,B=x*T/H,tt=x*N/H,i.repulsionForceX-=B,i.repulsionForceY-=tt,e.repulsionForceX+=B,e.repulsionForceY+=tt}},r.prototype.calcGravitationalForce=function(i){var e,g,d,c,O,T,N,D;if(e=i.getOwner(),g=(e.getRight()+e.getLeft())/2,d=(e.getTop()+e.getBottom())/2,c=i.getCenterX()-g,O=i.getCenterY()-d,T=Math.abs(c)+i.getWidth()/2,N=Math.abs(O)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()){if(D=e.getEstimatedSize()*this.gravityRangeFactor,T>D||N>D)i.gravitationForceX=-this.gravityConstant*c,i.gravitationForceY=-this.gravityConstant*O}else if(D=e.getEstimatedSize()*this.compoundGravityRangeFactor,T>D||N>D)i.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*O*this.compoundGravityConstant},r.prototype.isConverged=function(){var i,e=!1;if(this.totalIterations>this.maxIterations/3)e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||e},r.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},r.prototype.calcNoOfChildrenForAllNodes=function(){var i,e=this.graphManager.getAllNodes();for(var g=0;g<e.length;g++)i=e[g],i.noOfChildren=i.getNoOfChildren()},r.prototype.calcGrid=function(i){var e=0,g=0;e=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));var d=Array(e);for(var c=0;c<e;c++)d[c]=Array(g);for(var c=0;c<e;c++)for(var O=0;O<g;O++)d[c][O]=[];return d},r.prototype.addNodeToGrid=function(i,e,g){var d=0,c=0,O=0,T=0;d=parseInt(Math.floor((i.getRect().x-e)/this.repulsionRange)),c=parseInt(Math.floor((i.getRect().width+i.getRect().x-e)/this.repulsionRange)),O=parseInt(Math.floor((i.getRect().y-g)/this.repulsionRange)),T=parseInt(Math.floor((i.getRect().height+i.getRect().y-g)/this.repulsionRange));for(var N=d;N<=c;N++)for(var D=O;D<=T;D++)this.grid[N][D].push(i),i.setGridCoordinates(d,c,O,T)},r.prototype.updateGrid=function(){var i,e,g=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(i=0;i<g.length;i++)e=g[i],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(i,e,g,d){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&g||d){var c=new Set;i.surrounding=[];var O,T=this.grid;for(var N=i.startX-1;N<i.finishX+2;N++)for(var D=i.startY-1;D<i.finishY+2;D++)if(!(N<0||D<0||N>=T.length||D>=T[0].length))for(var H=0;H<T[N][D].length;H++){if(O=T[N][D][H],i.getOwner()!=O.getOwner()||i==O)continue;if(!e.has(O)&&!c.has(O)){var x=Math.abs(i.getCenterX()-O.getCenterX())-(i.getWidth()/2+O.getWidth()/2),B=Math.abs(i.getCenterY()-O.getCenterY())-(i.getHeight()/2+O.getHeight()/2);if(x<=this.repulsionRange&&B<=this.repulsionRange)c.add(O)}}i.surrounding=[].concat(v(c))}for(N=0;N<i.surrounding.length;N++)this.calcRepulsionForce(i,i.surrounding[N])},r.prototype.calcRepulsionRange=function(){return 0},w.exports=r},function(w,I,A){var v=A(1),f=A(4);function o(a,u,r){v.call(this,a,u,r),this.idealLength=f.DEFAULT_EDGE_LENGTH,this.edgeElasticity=f.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(v.prototype);for(var n in v)o[n]=v[n];w.exports=o},function(w,I,A){var v=A(3),f=A(4);function o(a,u,r,y){v.call(this,a,u,r,y),this.nodeRepulsion=f.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}o.prototype=Object.create(v.prototype);for(var n in v)o[n]=v[n];o.prototype.setGridCoordinates=function(a,u,r,y){this.startX=a,this.finishX=u,this.startY=r,this.finishY=y},w.exports=o},function(w,I,A){function v(f,o){if(this.width=0,this.height=0,f!==null&&o!==null)this.height=o,this.width=f}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(f){this.width=f},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(f){this.height=f},w.exports=v},function(w,I,A){var v=A(14);function f(){this.map={},this.keys=[]}f.prototype.put=function(o,n){var a=v.createID(o);if(!this.contains(a))this.map[a]=n,this.keys.push(o)},f.prototype.contains=function(o){var n=v.createID(o);return this.map[o]!=null},f.prototype.get=function(o){var n=v.createID(o);return this.map[n]},f.prototype.keySet=function(){return this.keys},w.exports=f},function(w,I,A){var v=A(14);function f(){this.set={}}f.prototype.add=function(o){var n=v.createID(o);if(!this.contains(n))this.set[n]=o},f.prototype.remove=function(o){delete this.set[v.createID(o)]},f.prototype.clear=function(){this.set={}},f.prototype.contains=function(o){return this.set[v.createID(o)]==o},f.prototype.isEmpty=function(){return this.size()===0},f.prototype.size=function(){return Object.keys(this.set).length},f.prototype.addAllTo=function(o){var n=Object.keys(this.set),a=n.length;for(var u=0;u<a;u++)o.push(this.set[n[u]])},f.prototype.size=function(){return Object.keys(this.set).length},f.prototype.addAll=function(o){var n=o.length;for(var a=0;a<n;a++){var u=o[a];this.add(u)}},w.exports=f},function(w,I,A){function v(){}v.multMat=function(f,o){var n=[];for(var a=0;a<f.length;a++){n[a]=[];for(var u=0;u<o[0].length;u++){n[a][u]=0;for(var r=0;r<f[0].length;r++)n[a][u]+=f[a][r]*o[r][u]}}return n},v.transpose=function(f){var o=[];for(var n=0;n<f[0].length;n++){o[n]=[];for(var a=0;a<f.length;a++)o[n][a]=f[a][n]}return o},v.multCons=function(f,o){var n=[];for(var a=0;a<f.length;a++)n[a]=f[a]*o;return n},v.minusOp=function(f,o){var n=[];for(var a=0;a<f.length;a++)n[a]=f[a]-o[a];return n},v.dotProduct=function(f,o){var n=0;for(var a=0;a<f.length;a++)n+=f[a]*o[a];return n},v.mag=function(f){return Math.sqrt(this.dotProduct(f,f))},v.normalize=function(f){var o=[],n=this.mag(f);for(var a=0;a<f.length;a++)o[a]=f[a]/n;return o},v.multGamma=function(f){var o=[],n=0;for(var a=0;a<f.length;a++)n+=f[a];n*=-1/f.length;for(var u=0;u<f.length;u++)o[u]=n+f[u];return o},v.multL=function(f,o,n){var a=[],u=[],r=[];for(var y=0;y<o[0].length;y++){var i=0;for(var e=0;e<o.length;e++)i+=-0.5*o[e][y]*f[e];u[y]=i}for(var g=0;g<n.length;g++){var d=0;for(var c=0;c<n.length;c++)d+=n[g][c]*u[c];r[g]=d}for(var O=0;O<o.length;O++){var T=0;for(var N=0;N<o[0].length;N++)T+=o[O][N]*r[N];a[O]=T}return a},w.exports=v},function(w,I,A){var v=function(){function a(u,r){for(var y=0;y<r.length;y++){var i=r[y];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(u,i.key,i)}}return function(u,r,y){if(r)a(u.prototype,r);if(y)a(u,y);return u}}();function f(a,u){if(!(a instanceof u))throw TypeError("Cannot call a class as a function")}var o=A(11),n=function(){function a(u,r){if(f(this,a),r!==null||r!==void 0)this.compareFunction=this._defaultCompareFunction;var y=void 0;if(u instanceof o)y=u.size();else y=u.length;this._quicksort(u,0,y-1)}return v(a,[{key:"_quicksort",value:function(r,y,i){if(y<i){var e=this._partition(r,y,i);this._quicksort(r,y,e),this._quicksort(r,e+1,i)}}},{key:"_partition",value:function(r,y,i){var e=this._get(r,y),g=y,d=i;while(!0){while(this.compareFunction(e,this._get(r,d)))d--;while(this.compareFunction(this._get(r,g),e))g++;if(g<d)this._swap(r,g,d),g++,d--;else return d}}},{key:"_get",value:function(r,y){if(r instanceof o)return r.get_object_at(y);else return r[y]}},{key:"_set",value:function(r,y,i){if(r instanceof o)r.set_object_at(y,i);else r[y]=i}},{key:"_swap",value:function(r,y,i){var e=this._get(r,y);this._set(r,y,this._get(r,i)),this._set(r,i,e)}},{key:"_defaultCompareFunction",value:function(r,y){return y>r}}]),a}();w.exports=n},function(w,I,A){function v(){}v.svd=function(f){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=f.length,this.n=f[0].length;var o=Math.min(this.m,this.n);this.s=function(Vt){var Pt=[];while(Vt-- >0)Pt.push(0);return Pt}(Math.min(this.m+1,this.n)),this.U=function(Vt){var Pt=function ae(Bt){if(Bt.length==0)return 0;else{var _t=[];for(var ie=0;ie<Bt[0];ie++)_t.push(ae(Bt.slice(1)));return _t}};return Pt(Vt)}([this.m,o]),this.V=function(Vt){var Pt=function ae(Bt){if(Bt.length==0)return 0;else{var _t=[];for(var ie=0;ie<Bt[0];ie++)_t.push(ae(Bt.slice(1)));return _t}};return Pt(Vt)}([this.n,this.n]);var n=function(Vt){var Pt=[];while(Vt-- >0)Pt.push(0);return Pt}(this.n),a=function(Vt){var Pt=[];while(Vt-- >0)Pt.push(0);return Pt}(this.m),u=!0,r=!0,y=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m));for(var e=0;e<Math.max(y,i);e++){if(e<y){this.s[e]=0;for(var g=e;g<this.m;g++)this.s[e]=v.hypot(this.s[e],f[g][e]);if(this.s[e]!==0){if(f[e][e]<0)this.s[e]=-this.s[e];for(var d=e;d<this.m;d++)f[d][e]/=this.s[e];f[e][e]+=1}this.s[e]=-this.s[e]}for(var c=e+1;c<this.n;c++){if(function(Vt,Pt){return Vt&&Pt}(e<y,this.s[e]!==0)){var O=0;for(var T=e;T<this.m;T++)O+=f[T][e]*f[T][c];O=-O/f[e][e];for(var N=e;N<this.m;N++)f[N][c]+=O*f[N][e]}n[c]=f[e][c]}if(function(Vt,Pt){return Vt&&Pt}(u,e<y))for(var D=e;D<this.m;D++)this.U[D][e]=f[D][e];if(e<i){n[e]=0;for(var H=e+1;H<this.n;H++)n[e]=v.hypot(n[e],n[H]);if(n[e]!==0){if(n[e+1]<0)n[e]=-n[e];for(var x=e+1;x<this.n;x++)n[x]/=n[e];n[e+1]+=1}if(n[e]=-n[e],function(Vt,Pt){return Vt&&Pt}(e+1<this.m,n[e]!==0)){for(var B=e+1;B<this.m;B++)a[B]=0;for(var tt=e+1;tt<this.n;tt++)for(var J=e+1;J<this.m;J++)a[J]+=n[tt]*f[J][tt];for(var ft=e+1;ft<this.n;ft++){var G=-n[ft]/n[e+1];for(var et=e+1;et<this.m;et++)f[et][ft]+=G*a[et]}}if(r)for(var s=e+1;s<this.n;s++)this.V[s][e]=n[s]}}var L=Math.min(this.n,this.m+1);if(y<this.n)this.s[y]=f[y][y];if(this.m<L)this.s[L-1]=0;if(i+1<L)n[i]=f[i][L-1];if(n[L-1]=0,u){for(var E=y;E<o;E++){for(var M=0;M<this.m;M++)this.U[M][E]=0;this.U[E][E]=1}for(var m=y-1;m>=0;m--)if(this.s[m]!==0){for(var Y=m+1;Y<o;Y++){var b=0;for(var Q=m;Q<this.m;Q++)b+=this.U[Q][m]*this.U[Q][Y];b=-b/this.U[m][m];for(var Z=m;Z<this.m;Z++)this.U[Z][Y]+=b*this.U[Z][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var ht=0;ht<m-1;ht++)this.U[ht][m]=0}else{for(var vt=0;vt<this.m;vt++)this.U[vt][m]=0;this.U[m][m]=1}}if(r)for(var k=this.n-1;k>=0;k--){if(function(Vt,Pt){return Vt&&Pt}(k<i,n[k]!==0))for(var dt=k+1;dt<o;dt++){var at=0;for(var S=k+1;S<this.n;S++)at+=this.V[S][k]*this.V[S][dt];at=-at/this.V[k+1][k];for(var _=k+1;_<this.n;_++)this.V[_][dt]+=at*this.V[_][k]}for(var rt=0;rt<this.n;rt++)this.V[rt][k]=0;this.V[k][k]=1}var gt=L-1,Lt=0,Gt=Math.pow(2,-52),Zt=Math.pow(2,-966);while(L>0){var ct=void 0,Kt=void 0;for(ct=L-2;ct>=-1;ct--){if(ct===-1)break;if(Math.abs(n[ct])<=Zt+Gt*(Math.abs(this.s[ct])+Math.abs(this.s[ct+1]))){n[ct]=0;break}}if(ct===L-2)Kt=4;else{var Ht=void 0;for(Ht=L-1;Ht>=ct;Ht--){if(Ht===ct)break;var Tt=(Ht!==L?Math.abs(n[Ht]):0)+(Ht!==ct+1?Math.abs(n[Ht-1]):0);if(Math.abs(this.s[Ht])<=Zt+Gt*Tt){this.s[Ht]=0;break}}if(Ht===ct)Kt=3;else if(Ht===L-1)Kt=1;else Kt=2,ct=Ht}switch(ct++,Kt){case 1:{var pt=n[L-2];n[L-2]=0;for(var It=L-2;It>=ct;It--){var St=v.hypot(this.s[It],pt),Ut=this.s[It]/St,Ft=pt/St;if(this.s[It]=St,It!==ct)pt=-Ft*n[It-1],n[It-1]=Ut*n[It-1];if(r)for(var bt=0;bt<this.n;bt++)St=Ut*this.V[bt][It]+Ft*this.V[bt][L-1],this.V[bt][L-1]=-Ft*this.V[bt][It]+Ut*this.V[bt][L-1],this.V[bt][It]=St}}break;case 2:{var Wt=n[ct-1];n[ct-1]=0;for(var $t=ct;$t<L;$t++){var ee=v.hypot(this.s[$t],Wt),Qt=this.s[$t]/ee,jt=Wt/ee;if(this.s[$t]=ee,Wt=-jt*n[$t],n[$t]=Qt*n[$t],u)for(var qt=0;qt<this.m;qt++)ee=Qt*this.U[qt][$t]+jt*this.U[qt][ct-1],this.U[qt][ct-1]=-jt*this.U[qt][$t]+Qt*this.U[qt][ct-1],this.U[qt][$t]=ee}}break;case 3:{var K=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[L-1]),Math.abs(this.s[L-2])),Math.abs(n[L-2])),Math.abs(this.s[ct])),Math.abs(n[ct])),it=this.s[L-1]/K,nt=this.s[L-2]/K,ot=n[L-2]/K,st=this.s[ct]/K,ut=n[ct]/K,Dt=((nt+it)*(nt-it)+ot*ot)/2,Ct=it*ot*(it*ot),lt=0;if(function(Vt,Pt){return Vt||Pt}(Dt!==0,Ct!==0)){if(lt=Math.sqrt(Dt*Dt+Ct),Dt<0)lt=-lt;lt=Ct/(Dt+lt)}var wt=(st+it)*(st-it)+lt,At=st*ut;for(var yt=ct;yt<L-1;yt++){var xt=v.hypot(wt,At),Yt=wt/xt,Nt=At/xt;if(yt!==ct)n[yt-1]=xt;if(wt=Yt*this.s[yt]+Nt*n[yt],n[yt]=Yt*n[yt]-Nt*this.s[yt],At=Nt*this.s[yt+1],this.s[yt+1]=Yt*this.s[yt+1],r)for(var mt=0;mt<this.n;mt++)xt=Yt*this.V[mt][yt]+Nt*this.V[mt][yt+1],this.V[mt][yt+1]=-Nt*this.V[mt][yt]+Yt*this.V[mt][yt+1],this.V[mt][yt]=xt;if(xt=v.hypot(wt,At),Yt=wt/xt,Nt=At/xt,this.s[yt]=xt,wt=Yt*n[yt]+Nt*this.s[yt+1],this.s[yt+1]=-Nt*n[yt]+Yt*this.s[yt+1],At=Nt*n[yt+1],n[yt+1]=Yt*n[yt+1],u&&yt<this.m-1)for(var Ot=0;Ot<this.m;Ot++)xt=Yt*this.U[Ot][yt]+Nt*this.U[Ot][yt+1],this.U[Ot][yt+1]=-Nt*this.U[Ot][yt]+Yt*this.U[Ot][yt+1],this.U[Ot][yt]=xt}n[L-2]=wt,Lt=Lt+1}break;case 4:{if(this.s[ct]<=0){if(this.s[ct]=this.s[ct]<0?-this.s[ct]:0,r)for(var Et=0;Et<=gt;Et++)this.V[Et][ct]=-this.V[Et][ct]}while(ct<gt){if(this.s[ct]>=this.s[ct+1])break;var Mt=this.s[ct];if(this.s[ct]=this.s[ct+1],this.s[ct+1]=Mt,r&&ct<this.n-1)for(var kt=0;kt<this.n;kt++)Mt=this.V[kt][ct+1],this.V[kt][ct+1]=this.V[kt][ct],this.V[kt][ct]=Mt;if(u&&ct<this.m-1)for(var zt=0;zt<this.m;zt++)Mt=this.U[zt][ct+1],this.U[zt][ct+1]=this.U[zt][ct],this.U[zt][ct]=Mt;ct++}Lt=0,L--}break}}var re={U:this.U,V:this.V,S:this.s};return re},v.hypot=function(f,o){var n=void 0;if(Math.abs(f)>Math.abs(o))n=o/f,n=Math.abs(f)*Math.sqrt(1+n*n);else if(o!=0)n=f/o,n=Math.abs(o)*Math.sqrt(1+n*n);else n=0;return n},w.exports=v},function(w,I,A){var v=function(){function n(a,u){for(var r=0;r<u.length;r++){var y=u[r];if(y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y)y.writable=!0;Object.defineProperty(a,y.key,y)}}return function(a,u,r){if(u)n(a.prototype,u);if(r)n(a,r);return a}}();function f(n,a){if(!(n instanceof a))throw TypeError("Cannot call a class as a function")}var o=function(){function n(a,u){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;f(this,n),this.sequence1=a,this.sequence2=u,this.match_score=r,this.mismatch_penalty=y,this.gap_penalty=i,this.iMax=a.length+1,this.jMax=u.length+1,this.grid=Array(this.iMax);for(var e=0;e<this.iMax;e++){this.grid[e]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[e][g]=0}this.tracebackGrid=Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[d][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!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 y=1;y<this.iMax;y++)for(var i=1;i<this.jMax;i++){var e=void 0;if(this.sequence1[y-1]===this.sequence2[i-1])e=this.grid[y-1][i-1]+this.match_score;else e=this.grid[y-1][i-1]+this.mismatch_penalty;var g=this.grid[y-1][i]+this.gap_penalty,d=this.grid[y][i-1]+this.gap_penalty,c=[e,g,d],O=this.arrayAllMaxIndexes(c);this.grid[y][i]=c[O[0]],this.tracebackGrid[y][i]=[O.includes(0),O.includes(1),O.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var u=[];u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(u[0]){var r=u[0],y=this.tracebackGrid[r.pos[0]][r.pos[1]];if(y[0])u.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});if(y[1])u.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2});if(y[2])u.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(r.pos[0]===0&&r.pos[1]===0)this.alignments.push({sequence1:r.seq1,sequence2:r.seq2});u.shift()}return this.alignments}},{key:"getAllIndexes",value:function(u,r){var y=[],i=-1;while((i=u.indexOf(r,i+1))!==-1)y.push(i);return y}},{key:"arrayAllMaxIndexes",value:function(u){return this.getAllIndexes(u,Math.max.apply(null,u))}}]),n}();w.exports=o},function(w,I,A){var v=function(){return};v.FDLayout=A(18),v.FDLayoutConstants=A(4),v.FDLayoutEdge=A(19),v.FDLayoutNode=A(20),v.DimensionD=A(21),v.HashMap=A(22),v.HashSet=A(23),v.IGeometry=A(8),v.IMath=A(9),v.Integer=A(10),v.Point=A(12),v.PointD=A(5),v.RandomSeed=A(16),v.RectangleD=A(13),v.Transform=A(17),v.UniqueIDGeneretor=A(14),v.Quicksort=A(25),v.LinkedList=A(11),v.LGraphObject=A(2),v.LGraph=A(6),v.LEdge=A(1),v.LGraphManager=A(7),v.LNode=A(3),v.Layout=A(15),v.LayoutConstants=A(0),v.NeedlemanWunsch=A(27),v.Matrix=A(24),v.SVD=A(26),w.exports=v},function(w,I,A){function v(){this.listeners=[]}var f=v.prototype;f.addListener=function(o,n){this.listeners.push({event:o,callback:n})},f.removeListener=function(o,n){for(var a=this.listeners.length;a>=0;a--){var u=this.listeners[a];if(u.event===o&&u.callback===n)this.listeners.splice(a,1)}},f.emit=function(o,n){for(var a=0;a<this.listeners.length;a++){var u=this.listeners[a];if(o===u.event)u.callback(n)}},w.exports=v}])})});var Fe=Cn(function(Ee,Se){(function(I,A){if(typeof Ee==="object"&&typeof Se==="object")Se.exports=A(Re());else if(typeof define==="function"&&define.amd)define(["layout-base"],A);else if(typeof Ee==="object")Ee.coseBase=A(Re());else I.coseBase=A(I.layoutBase)})(Ee,function(w){return(()=>{var I={45:(o,n,a)=>{var u={};u.layoutBase=a(551),u.CoSEConstants=a(806),u.CoSEEdge=a(767),u.CoSEGraph=a(880),u.CoSEGraphManager=a(578),u.CoSELayout=a(765),u.CoSENode=a(991),u.ConstraintHandler=a(902),o.exports=u},806:(o,n,a)=>{var u=a(551).FDLayoutConstants;function r(){}for(var y in u)r[y]=u[y];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,o.exports=r},767:(o,n,a)=>{var u=a(551).FDLayoutEdge;function r(i,e,g){u.call(this,i,e,g)}r.prototype=Object.create(u.prototype);for(var y in u)r[y]=u[y];o.exports=r},880:(o,n,a)=>{var u=a(551).LGraph;function r(i,e,g){u.call(this,i,e,g)}r.prototype=Object.create(u.prototype);for(var y in u)r[y]=u[y];o.exports=r},578:(o,n,a)=>{var u=a(551).LGraphManager;function r(i){u.call(this,i)}r.prototype=Object.create(u.prototype);for(var y in u)r[y]=u[y];o.exports=r},765:(o,n,a)=>{var u=a(551).FDLayout,r=a(578),y=a(880),i=a(991),e=a(767),g=a(806),d=a(902),c=a(551).FDLayoutConstants,O=a(551).LayoutConstants,T=a(551).Point,N=a(551).PointD,D=a(551).DimensionD,H=a(551).Layout,x=a(551).Integer,B=a(551).IGeometry,tt=a(551).LGraph,J=a(551).Transform,ft=a(551).LinkedList;function G(){u.call(this),this.toBeTiled={},this.constraints={}}G.prototype=Object.create(u.prototype);for(var et in u)G[et]=u[et];G.prototype.newGraphManager=function(){var s=new r(this);return this.graphManager=s,s},G.prototype.newGraph=function(s){return new y(null,this.graphManager,s)},G.prototype.newNode=function(s){return new i(this.graphManager,s)},G.prototype.newEdge=function(s){return new e(null,null,s)},G.prototype.initParameters=function(){if(u.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(g.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=g.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=g.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1}},G.prototype.initSpringEmbedder=function(){u.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=0.04,this.coolingAdjuster=1},G.prototype.layout=function(){var s=O.DEFAULT_CREATE_BENDS_AS_NEEDED;if(s)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},G.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){var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(M){return L.has(M)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}else if(g.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(Y){return L.has(Y)});this.graphManager.setAllNodesToApplyGravitation(E)}if(Object.keys(this.constraints).length>0)d.handleConstraints(this),this.initConstraintVariables();if(this.initSpringEmbedder(),g.APPLY_LAYOUT)this.runSpringEmbedder();return!0},G.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%c.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(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 s=new Set(this.getAllNodes()),L=this.nodesWithGravity.filter(function(m){return s.has(m)});if(this.graphManager.setAllNodesToApplyGravitation(L),this.graphManager.updateBounds(),this.updateGrid(),g.PURE_INCREMENTAL)this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2;else this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();if(g.PURE_INCREMENTAL)this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100);else this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100);this.afterGrowthIterations++}var E=!this.isTreeGrowing&&!this.isGrowthFinished,M=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(E,M),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},G.prototype.getPositionsData=function(){var s=this.graphManager.getAllNodes(),L={};for(var E=0;E<s.length;E++){var M=s[E].rect,m=s[E].id;L[m]={id:m,x:M.getCenterX(),y:M.getCenterY(),w:M.width,h:M.height}}return L},G.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(c.ANIMATE==="during")this.emit("layoutstarted");else{while(!s)s=this.tick();this.graphManager.updateBounds()}},G.prototype.moveNodes=function(){var s=this.getAllNodes(),L;for(var E=0;E<s.length;E++)L=s[E],L.calculateDisplacement();if(Object.keys(this.constraints).length>0)this.updateDisplacements();for(var E=0;E<s.length;E++)L=s[E],L.move()},G.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;var L=this.graphManager.getAllNodes();for(var E=0;E<L.length;E++){var M=L[E];this.idToNodeMap.set(M.id,M)}var m=function S(_){var rt=_.getChild().getNodes(),gt,Lt=0;for(var Gt=0;Gt<rt.length;Gt++)if(gt=rt[Gt],gt.getChild()==null){if(s.fixedNodeSet.has(gt.id))Lt+=100}else Lt+=S(gt);return Lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(rt){s.fixedNodeSet.add(rt.nodeId)});var L=this.graphManager.getAllNodes(),M;for(var E=0;E<L.length;E++)if(M=L[E],M.getChild()!=null){var Y=m(M);if(Y>0)M.fixedNodeWeight=Y}}if(this.constraints.relativePlacementConstraint){var b=new Map,Q=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(S){s.fixedNodesOnHorizontal.add(S),s.fixedNodesOnVertical.add(S)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var Z=this.constraints.alignmentConstraint.vertical;for(var E=0;E<Z.length;E++)this.dummyToNodeForVerticalAlignment.set("dummy"+E,[]),Z[E].forEach(function(_){if(b.set(_,"dummy"+E),s.dummyToNodeForVerticalAlignment.get("dummy"+E).push(_),s.fixedNodeSet.has(_))s.fixedNodesOnHorizontal.add("dummy"+E)})}if(this.constraints.alignmentConstraint.horizontal){var W=this.constraints.alignmentConstraint.horizontal;for(var E=0;E<W.length;E++)this.dummyToNodeForHorizontalAlignment.set("dummy"+E,[]),W[E].forEach(function(_){if(Q.set(_,"dummy"+E),s.dummyToNodeForHorizontalAlignment.get("dummy"+E).push(_),s.fixedNodeSet.has(_))s.fixedNodesOnVertical.add("dummy"+E)})}}if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(S){var _,rt,gt;for(gt=S.length-1;gt>=2*S.length/3;gt--)_=Math.floor(Math.random()*(gt+1)),rt=S[gt],S[gt]=S[_],S[_]=rt;return S},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(S){if(S.left){var _=b.has(S.left)?b.get(S.left):S.left,rt=b.has(S.right)?b.get(S.right):S.right;if(!s.nodesInRelativeHorizontal.includes(_))if(s.nodesInRelativeHorizontal.push(_),s.nodeToRelativeConstraintMapHorizontal.set(_,[]),s.dummyToNodeForVerticalAlignment.has(_))s.nodeToTempPositionMapHorizontal.set(_,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(_)[0]).getCenterX());else s.nodeToTempPositionMapHorizontal.set(_,s.idToNodeMap.get(_).getCenterX());if(!s.nodesInRelativeHorizontal.includes(rt))if(s.nodesInRelativeHorizontal.push(rt),s.nodeToRelativeConstraintMapHorizontal.set(rt,[]),s.dummyToNodeForVerticalAlignment.has(rt))s.nodeToTempPositionMapHorizontal.set(rt,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(rt)[0]).getCenterX());else s.nodeToTempPositionMapHorizontal.set(rt,s.idToNodeMap.get(rt).getCenterX());s.nodeToRelativeConstraintMapHorizontal.get(_).push({right:rt,gap:S.gap}),s.nodeToRelativeConstraintMapHorizontal.get(rt).push({left:_,gap:S.gap})}else{var gt=Q.has(S.top)?Q.get(S.top):S.top,Lt=Q.has(S.bottom)?Q.get(S.bottom):S.bottom;if(!s.nodesInRelativeVertical.includes(gt))if(s.nodesInRelativeVertical.push(gt),s.nodeToRelativeConstraintMapVertical.set(gt,[]),s.dummyToNodeForHorizontalAlignment.has(gt))s.nodeToTempPositionMapVertical.set(gt,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(gt)[0]).getCenterY());else s.nodeToTempPositionMapVertical.set(gt,s.idToNodeMap.get(gt).getCenterY());if(!s.nodesInRelativeVertical.includes(Lt))if(s.nodesInRelativeVertical.push(Lt),s.nodeToRelativeConstraintMapVertical.set(Lt,[]),s.dummyToNodeForHorizontalAlignment.has(Lt))s.nodeToTempPositionMapVertical.set(Lt,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(Lt)[0]).getCenterY());else s.nodeToTempPositionMapVertical.set(Lt,s.idToNodeMap.get(Lt).getCenterY());s.nodeToRelativeConstraintMapVertical.get(gt).push({bottom:Lt,gap:S.gap}),s.nodeToRelativeConstraintMapVertical.get(Lt).push({top:gt,gap:S.gap})}});else{var ht=new Map,vt=new Map;this.constraints.relativePlacementConstraint.forEach(function(S){if(S.left){var _=b.has(S.left)?b.get(S.left):S.left,rt=b.has(S.right)?b.get(S.right):S.right;if(ht.has(_))ht.get(_).push(rt);else ht.set(_,[rt]);if(ht.has(rt))ht.get(rt).push(_);else ht.set(rt,[_])}else{var gt=Q.has(S.top)?Q.get(S.top):S.top,Lt=Q.has(S.bottom)?Q.get(S.bottom):S.bottom;if(vt.has(gt))vt.get(gt).push(Lt);else vt.set(gt,[Lt]);if(vt.has(Lt))vt.get(Lt).push(gt);else vt.set(Lt,[gt])}});var k=function(_,rt){var gt=[],Lt=[],Gt=new ft,Zt=new Set,ct=0;return _.forEach(function(Kt,Ht){if(!Zt.has(Ht)){gt[ct]=[],Lt[ct]=!1;var Tt=Ht;Gt.push(Tt),Zt.add(Tt),gt[ct].push(Tt);while(Gt.length!=0){if(Tt=Gt.shift(),rt.has(Tt))Lt[ct]=!0;var pt=_.get(Tt);pt.forEach(function(It){if(!Zt.has(It))Gt.push(It),Zt.add(It),gt[ct].push(It)})}ct++}}),{components:gt,isFixed:Lt}},dt=k(ht,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=dt.components,this.fixedComponentsOnHorizontal=dt.isFixed;var at=k(vt,s.fixedNodesOnVertical);this.componentsOnVertical=at.components,this.fixedComponentsOnVertical=at.isFixed}}},G.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint)this.constraints.fixedNodeConstraint.forEach(function(at){var S=s.idToNodeMap.get(at.nodeId);S.displacementX=0,S.displacementY=0});if(this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var L=this.constraints.alignmentConstraint.vertical;for(var E=0;E<L.length;E++){var M=0;for(var m=0;m<L[E].length;m++){if(this.fixedNodeSet.has(L[E][m])){M=0;break}M+=this.idToNodeMap.get(L[E][m]).displacementX}var Y=M/L[E].length;for(var m=0;m<L[E].length;m++)this.idToNodeMap.get(L[E][m]).displacementX=Y}}if(this.constraints.alignmentConstraint.horizontal){var b=this.constraints.alignmentConstraint.horizontal;for(var E=0;E<b.length;E++){var Q=0;for(var m=0;m<b[E].length;m++){if(this.fixedNodeSet.has(b[E][m])){Q=0;break}Q+=this.idToNodeMap.get(b[E][m]).displacementY}var Z=Q/b[E].length;for(var m=0;m<b[E].length;m++)this.idToNodeMap.get(b[E][m]).displacementY=Z}}}if(this.constraints.relativePlacementConstraint)if(g.RELAX_MOVEMENT_ON_CONSTRAINTS){if(this.totalIterations%10==0)this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical);this.nodesInRelativeHorizontal.forEach(function(at){if(!s.fixedNodesOnHorizontal.has(at)){var S=0;if(s.dummyToNodeForVerticalAlignment.has(at))S=s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(at)[0]).displacementX;else S=s.idToNodeMap.get(at).displacementX;if(s.nodeToRelativeConstraintMapHorizontal.get(at).forEach(function(_){if(_.right){var rt=s.nodeToTempPositionMapHorizontal.get(_.right)-s.nodeToTempPositionMapHorizontal.get(at)-S;if(rt<_.gap)S-=_.gap-rt}else{var rt=s.nodeToTempPositionMapHorizontal.get(at)-s.nodeToTempPositionMapHorizontal.get(_.left)+S;if(rt<_.gap)S+=_.gap-rt}}),s.nodeToTempPositionMapHorizontal.set(at,s.nodeToTempPositionMapHorizontal.get(at)+S),s.dummyToNodeForVerticalAlignment.has(at))s.dummyToNodeForVerticalAlignment.get(at).forEach(function(_){s.idToNodeMap.get(_).displacementX=S});else s.idToNodeMap.get(at).displacementX=S}}),this.nodesInRelativeVertical.forEach(function(at){if(!s.fixedNodesOnHorizontal.has(at)){var S=0;if(s.dummyToNodeForHorizontalAlignment.has(at))S=s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(at)[0]).displacementY;else S=s.idToNodeMap.get(at).displacementY;if(s.nodeToRelativeConstraintMapVertical.get(at).forEach(function(_){if(_.bottom){var rt=s.nodeToTempPositionMapVertical.get(_.bottom)-s.nodeToTempPositionMapVertical.get(at)-S;if(rt<_.gap)S-=_.gap-rt}else{var rt=s.nodeToTempPositionMapVertical.get(at)-s.nodeToTempPositionMapVertical.get(_.top)+S;if(rt<_.gap)S+=_.gap-rt}}),s.nodeToTempPositionMapVertical.set(at,s.nodeToTempPositionMapVertical.get(at)+S),s.dummyToNodeForHorizontalAlignment.has(at))s.dummyToNodeForHorizontalAlignment.get(at).forEach(function(_){s.idToNodeMap.get(_).displacementY=S});else s.idToNodeMap.get(at).displacementY=S}})}else{for(var E=0;E<this.componentsOnHorizontal.length;E++){var W=this.componentsOnHorizontal[E];if(this.fixedComponentsOnHorizontal[E])for(var m=0;m<W.length;m++)if(this.dummyToNodeForVerticalAlignment.has(W[m]))this.dummyToNodeForVerticalAlignment.get(W[m]).forEach(function(_){s.idToNodeMap.get(_).displacementX=0});else this.idToNodeMap.get(W[m]).displacementX=0;else{var ht=0,vt=0;for(var m=0;m<W.length;m++)if(this.dummyToNodeForVerticalAlignment.has(W[m])){var k=this.dummyToNodeForVerticalAlignment.get(W[m]);ht+=k.length*this.idToNodeMap.get(k[0]).displacementX,vt+=k.length}else ht+=this.idToNodeMap.get(W[m]).displacementX,vt++;var dt=ht/vt;for(var m=0;m<W.length;m++)if(this.dummyToNodeForVerticalAlignment.has(W[m]))this.dummyToNodeForVerticalAlignment.get(W[m]).forEach(function(_){s.idToNodeMap.get(_).displacementX=dt});else this.idToNodeMap.get(W[m]).displacementX=dt}}for(var E=0;E<this.componentsOnVertical.length;E++){var W=this.componentsOnVertical[E];if(this.fixedComponentsOnVertical[E])for(var m=0;m<W.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(W[m]))this.dummyToNodeForHorizontalAlignment.get(W[m]).forEach(function(rt){s.idToNodeMap.get(rt).displacementY=0});else this.idToNodeMap.get(W[m]).displacementY=0;else{var ht=0,vt=0;for(var m=0;m<W.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(W[m])){var k=this.dummyToNodeForHorizontalAlignment.get(W[m]);ht+=k.length*this.idToNodeMap.get(k[0]).displacementY,vt+=k.length}else ht+=this.idToNodeMap.get(W[m]).displacementY,vt++;var dt=ht/vt;for(var m=0;m<W.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(W[m]))this.dummyToNodeForHorizontalAlignment.get(W[m]).forEach(function(Gt){s.idToNodeMap.get(Gt).displacementY=dt});else this.idToNodeMap.get(W[m]).displacementY=dt}}}},G.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],L,E=this.graphManager.getGraphs(),M=E.length,m;for(m=0;m<M;m++)if(L=E[m],L.updateConnected(),!L.isConnected)s=s.concat(L.getNodes());return s},G.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var L=new Set,E;for(E=0;E<s.length;E++){var M=s[E];if(!L.has(M)){var m=M.getSource(),Y=M.getTarget();if(m==Y)M.getBendpoints().push(new N),M.getBendpoints().push(new N),this.createDummyNodesForBendpoints(M),L.add(M);else{var b=[];if(b=b.concat(m.getEdgeListToNode(Y)),b=b.concat(Y.getEdgeListToNode(m)),!L.has(b[0])){if(b.length>1){var Q;for(Q=0;Q<b.length;Q++){var Z=b[Q];Z.getBendpoints().push(new N),this.createDummyNodesForBendpoints(Z)}}b.forEach(function(W){L.add(W)})}}}if(L.size==s.length)break}},G.prototype.positionNodesRadially=function(s){var L=new T(0,0),E=Math.ceil(Math.sqrt(s.length)),M=0,m=0,Y=0,b=new N(0,0);for(var Q=0;Q<s.length;Q++){if(Q%E==0){if(Y=0,m=M,Q!=0)m+=g.DEFAULT_COMPONENT_SEPERATION;M=0}var Z=s[Q],W=H.findCenterOfTree(Z);if(L.x=Y,L.y=m,b=G.radialLayout(Z,W,L),b.y>M)M=Math.floor(b.y);Y=Math.floor(b.x+g.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(O.WORLD_CENTER_X-b.x/2,O.WORLD_CENTER_Y-b.y/2))},G.radialLayout=function(s,L,E){var M=Math.max(this.maxDiagonalInTree(s),g.DEFAULT_RADIAL_SEPARATION);G.branchRadialLayout(L,null,0,359,0,M);var m=tt.calculateBounds(s),Y=new J;Y.setDeviceOrgX(m.getMinX()),Y.setDeviceOrgY(m.getMinY()),Y.setWorldOrgX(E.x),Y.setWorldOrgY(E.y);for(var b=0;b<s.length;b++){var Q=s[b];Q.transform(Y)}var Z=new N(m.getMaxX(),m.getMaxY());return Y.inverseTransformPoint(Z)},G.branchRadialLayout=function(s,L,E,M,m,Y){var b=(M-E+1)/2;if(b<0)b+=180;var Q=(b+E)%360,Z=Q*B.TWO_PI/360,W=Math.cos(Z),ht=m*Math.cos(Z),vt=m*Math.sin(Z);s.setCenter(ht,vt);var k=[];k=k.concat(s.getEdges());var dt=k.length;if(L!=null)dt--;var at=0,S=k.length,_,rt=s.getEdgesBetween(L);while(rt.length>1){var gt=rt[0];rt.splice(0,1);var Lt=k.indexOf(gt);if(Lt>=0)k.splice(Lt,1);S--,dt--}if(L!=null)_=(k.indexOf(rt[0])+1)%S;else _=0;var Gt=Math.abs(M-E)/dt;for(var Zt=_;at!=dt;Zt=++Zt%S){var ct=k[Zt].getOtherEnd(s);if(ct==L)continue;var Kt=(E+at*Gt)%360,Ht=(Kt+Gt)%360;G.branchRadialLayout(ct,s,Kt,Ht,m+Y,Y),at++}},G.maxDiagonalInTree=function(s){var L=x.MIN_VALUE;for(var E=0;E<s.length;E++){var M=s[E],m=M.getDiagonal();if(m>L)L=m}return L},G.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},G.prototype.groupZeroDegreeMembers=function(){var s=this,L={};this.memberGroups={},this.idToDummyNode={};var E=[],M=this.graphManager.getAllNodes();for(var m=0;m<M.length;m++){var Y=M[m],b=Y.getParent();if(this.getNodeDegreeWithChildren(Y)===0&&(b.id==null||!this.getToBeTiled(b)))E.push(Y)}for(var m=0;m<E.length;m++){var Y=E[m],Q=Y.getParent().id;if(typeof L[Q]>"u")L[Q]=[];L[Q]=L[Q].concat(Y)}Object.keys(L).forEach(function(Z){if(L[Z].length>1){var W="DummyCompound_"+Z;s.memberGroups[W]=L[Z];var ht=L[Z][0].getParent(),vt=new i(s.graphManager);vt.id=W,vt.paddingLeft=ht.paddingLeft||0,vt.paddingRight=ht.paddingRight||0,vt.paddingBottom=ht.paddingBottom||0,vt.paddingTop=ht.paddingTop||0,s.idToDummyNode[W]=vt;var k=s.getGraphManager().add(s.newGraph(),vt),dt=ht.getChild();dt.add(vt);for(var at=0;at<L[Z].length;at++){var S=L[Z][at];dt.remove(S),k.add(S)}}})},G.prototype.clearCompounds=function(){var s={},L={};this.performDFSOnCompounds();for(var E=0;E<this.compoundOrder.length;E++)L[this.compoundOrder[E].id]=this.compoundOrder[E],s[this.compoundOrder[E].id]=[].concat(this.compoundOrder[E].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[E].getChild()),this.compoundOrder[E].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,L)},G.prototype.clearZeroDegreeMembers=function(){var s=this,L=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(E){var M=s.idToDummyNode[E];if(L[E]=s.tileNodes(s.memberGroups[E],M.paddingLeft+M.paddingRight),M.rect.width=L[E].width,M.rect.height=L[E].height,M.setCenter(L[E].centerX,L[E].centerY),M.labelMarginLeft=0,M.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var m=M.rect.width,Y=M.rect.height;if(M.labelWidth){if(M.labelPosHorizontal=="left")M.rect.x-=M.labelWidth,M.setWidth(m+M.labelWidth),M.labelMarginLeft=M.labelWidth;else if(M.labelPosHorizontal=="center"&&M.labelWidth>m)M.rect.x-=(M.labelWidth-m)/2,M.setWidth(M.labelWidth),M.labelMarginLeft=(M.labelWidth-m)/2;else if(M.labelPosHorizontal=="right")M.setWidth(m+M.labelWidth)}if(M.labelHeight){if(M.labelPosVertical=="top")M.rect.y-=M.labelHeight,M.setHeight(Y+M.labelHeight),M.labelMarginTop=M.labelHeight;else if(M.labelPosVertical=="center"&&M.labelHeight>Y)M.rect.y-=(M.labelHeight-Y)/2,M.setHeight(M.labelHeight),M.labelMarginTop=(M.labelHeight-Y)/2;else if(M.labelPosVertical=="bottom")M.setHeight(Y+M.labelHeight)}}})},G.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var L=this.compoundOrder[s],{id:E,paddingLeft:M,paddingTop:m,labelMarginLeft:Y,labelMarginTop:b}=L;this.adjustLocations(this.tiledMemberPack[E],L.rect.x,L.rect.y,M,m,Y,b)}},G.prototype.repopulateZeroDegreeMembers=function(){var s=this,L=this.tiledZeroDegreePack;Object.keys(L).forEach(function(E){var M=s.idToDummyNode[E],{paddingLeft:m,paddingTop:Y,labelMarginLeft:b,labelMarginTop:Q}=M;s.adjustLocations(L[E],M.rect.x,M.rect.y,m,Y,b,Q)})},G.prototype.getToBeTiled=function(s){var L=s.id;if(this.toBeTiled[L]!=null)return this.toBeTiled[L];var E=s.getChild();if(E==null)return this.toBeTiled[L]=!1,!1;var M=E.getNodes();for(var m=0;m<M.length;m++){var Y=M[m];if(this.getNodeDegree(Y)>0)return this.toBeTiled[L]=!1,!1;if(Y.getChild()==null){this.toBeTiled[Y.id]=!1;continue}if(!this.getToBeTiled(Y))return this.toBeTiled[L]=!1,!1}return this.toBeTiled[L]=!0,!0},G.prototype.getNodeDegree=function(s){var L=s.id,E=s.getEdges(),M=0;for(var m=0;m<E.length;m++){var Y=E[m];if(Y.getSource().id!==Y.getTarget().id)M=M+1}return M},G.prototype.getNodeDegreeWithChildren=function(s){var L=this.getNodeDegree(s);if(s.getChild()==null)return L;var E=s.getChild().getNodes();for(var M=0;M<E.length;M++){var m=E[M];L+=this.getNodeDegreeWithChildren(m)}return L},G.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},G.prototype.fillCompexOrderByDFS=function(s){for(var L=0;L<s.length;L++){var E=s[L];if(E.getChild()!=null)this.fillCompexOrderByDFS(E.getChild().getNodes());if(this.getToBeTiled(E))this.compoundOrder.push(E)}},G.prototype.adjustLocations=function(s,L,E,M,m,Y,b){L+=M+Y,E+=m+b;var Q=L;for(var Z=0;Z<s.rows.length;Z++){var W=s.rows[Z];L=Q;var ht=0;for(var vt=0;vt<W.length;vt++){var k=W[vt];if(k.rect.x=L,k.rect.y=E,L+=k.rect.width+s.horizontalPadding,k.rect.height>ht)ht=k.rect.height}E+=ht+s.verticalPadding}},G.prototype.tileCompoundMembers=function(s,L){var E=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(M){var m=L[M];if(E.tiledMemberPack[M]=E.tileNodes(s[M],m.paddingLeft+m.paddingRight),m.rect.width=E.tiledMemberPack[M].width,m.rect.height=E.tiledMemberPack[M].height,m.setCenter(E.tiledMemberPack[M].centerX,E.tiledMemberPack[M].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var Y=m.rect.width,b=m.rect.height;if(m.labelWidth){if(m.labelPosHorizontal=="left")m.rect.x-=m.labelWidth,m.setWidth(Y+m.labelWidth),m.labelMarginLeft=m.labelWidth;else if(m.labelPosHorizontal=="center"&&m.labelWidth>Y)m.rect.x-=(m.labelWidth-Y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-Y)/2;else if(m.labelPosHorizontal=="right")m.setWidth(Y+m.labelWidth)}if(m.labelHeight){if(m.labelPosVertical=="top")m.rect.y-=m.labelHeight,m.setHeight(b+m.labelHeight),m.labelMarginTop=m.labelHeight;else if(m.labelPosVertical=="center"&&m.labelHeight>b)m.rect.y-=(m.labelHeight-b)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-b)/2;else if(m.labelPosVertical=="bottom")m.setHeight(b+m.labelHeight)}}})},G.prototype.tileNodes=function(s,L){var E=this.tileNodesByFavoringDim(s,L,!0),M=this.tileNodesByFavoringDim(s,L,!1),m=this.getOrgRatio(E),Y=this.getOrgRatio(M),b;if(Y<m)b=M;else b=E;return b},G.prototype.getOrgRatio=function(s){var{width:L,height:E}=s,M=L/E;if(M<1)M=1/M;return M},G.prototype.calcIdealRowWidth=function(s,L){var{TILING_PADDING_VERTICAL:E,TILING_PADDING_HORIZONTAL:M}=g,m=s.length,Y=0,b=0,Q=0;s.forEach(function(at){if(Y+=at.getWidth(),b+=at.getHeight(),at.getWidth()>Q)Q=at.getWidth()});var Z=Y/m,W=b/m,ht=Math.pow(E-M,2)+4*(Z+M)*(W+E)*m,vt=(M-E+Math.sqrt(ht))/(2*(Z+M)),k;if(L){if(k=Math.ceil(vt),k==vt)k++}else k=Math.floor(vt);var dt=k*(Z+M)-M;if(Q>dt)dt=Q;return dt+=M*2,dt},G.prototype.tileNodesByFavoringDim=function(s,L,E){var{TILING_PADDING_VERTICAL:M,TILING_PADDING_HORIZONTAL:m,TILING_COMPARE_BY:Y}=g,b={rows:[],rowWidth:[],rowHeight:[],width:0,height:L,verticalPadding:M,horizontalPadding:m,centerX:0,centerY:0};if(Y)b.idealRowWidth=this.calcIdealRowWidth(s,E);var Q=function(S){return S.rect.width*S.rect.height},Z=function(S,_){return Q(_)-Q(S)};s.sort(function(at,S){var _=Z;if(b.idealRowWidth)return _=Y,_(at.id,S.id);return _(at,S)});var W=0,ht=0;for(var vt=0;vt<s.length;vt++){var k=s[vt];W+=k.getCenterX(),ht+=k.getCenterY()}b.centerX=W/s.length,b.centerY=ht/s.length;for(var vt=0;vt<s.length;vt++){var k=s[vt];if(b.rows.length==0)this.insertNodeToRow(b,k,0,L);else if(this.canAddHorizontal(b,k.rect.width,k.rect.height)){var dt=b.rows.length-1;if(!b.idealRowWidth)dt=this.getShortestRowIndex(b);this.insertNodeToRow(b,k,dt,L)}else this.insertNodeToRow(b,k,b.rows.length,L);this.shiftToLastRow(b)}return b},G.prototype.insertNodeToRow=function(s,L,E,M){var m=M;if(E==s.rows.length){var Y=[];s.rows.push(Y),s.rowWidth.push(m),s.rowHeight.push(0)}var b=s.rowWidth[E]+L.rect.width;if(s.rows[E].length>0)b+=s.horizontalPadding;if(s.rowWidth[E]=b,s.width<b)s.width=b;var Q=L.rect.height;if(E>0)Q+=s.verticalPadding;var Z=0;if(Q>s.rowHeight[E])Z=s.rowHeight[E],s.rowHeight[E]=Q,Z=s.rowHeight[E]-Z;s.height+=Z,s.rows[E].push(L)},G.prototype.getShortestRowIndex=function(s){var L=-1,E=Number.MAX_VALUE;for(var M=0;M<s.rows.length;M++)if(s.rowWidth[M]<E)L=M,E=s.rowWidth[M];return L},G.prototype.getLongestRowIndex=function(s){var L=-1,E=Number.MIN_VALUE;for(var M=0;M<s.rows.length;M++)if(s.rowWidth[M]>E)L=M,E=s.rowWidth[M];return L},G.prototype.canAddHorizontal=function(s,L,E){if(s.idealRowWidth){var M=s.rows.length-1,m=s.rowWidth[M];return m+L+s.horizontalPadding<=s.idealRowWidth}var Y=this.getShortestRowIndex(s);if(Y<0)return!0;var b=s.rowWidth[Y];if(b+s.horizontalPadding+L<=s.width)return!0;var Q=0;if(s.rowHeight[Y]<E){if(Y>0)Q=E+s.verticalPadding-s.rowHeight[Y]}var Z;if(s.width-b>=L+s.horizontalPadding)Z=(s.height+Q)/(b+L+s.horizontalPadding);else Z=(s.height+Q)/s.width;Q=E+s.verticalPadding;var W;if(s.width<L)W=(s.height+Q)/L;else W=(s.height+Q)/s.width;if(W<1)W=1/W;if(Z<1)Z=1/Z;return Z<W},G.prototype.shiftToLastRow=function(s){var L=this.getLongestRowIndex(s),E=s.rowWidth.length-1,M=s.rows[L],m=M[M.length-1],Y=m.width+s.horizontalPadding;if(s.width-s.rowWidth[E]>Y&&L!=E){M.splice(-1,1),s.rows[E].push(m),s.rowWidth[L]=s.rowWidth[L]-Y,s.rowWidth[E]=s.rowWidth[E]+Y,s.width=s.rowWidth[instance.getLongestRowIndex(s)];var b=Number.MIN_VALUE;for(var Q=0;Q<M.length;Q++)if(M[Q].height>b)b=M[Q].height;if(L>0)b+=s.verticalPadding;var Z=s.rowHeight[L]+s.rowHeight[E];if(s.rowHeight[L]=b,s.rowHeight[E]<m.height+s.verticalPadding)s.rowHeight[E]=m.height+s.verticalPadding;var W=s.rowHeight[L]+s.rowHeight[E];s.height+=W-Z,this.shiftToLastRow(s)}},G.prototype.tilingPreLayout=function(){if(g.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},G.prototype.tilingPostLayout=function(){if(g.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},G.prototype.reduceTrees=function(){var s=[],L=!0,E;while(L){var M=this.graphManager.getAllNodes(),m=[];L=!1;for(var Y=0;Y<M.length;Y++)if(E=M[Y],E.getEdges().length==1&&!E.getEdges()[0].isInterGraph&&E.getChild()==null){if(g.PURE_INCREMENTAL){var b=E.getEdges()[0].getOtherEnd(E),Q=new D(E.getCenterX()-b.getCenterX(),E.getCenterY()-b.getCenterY());m.push([E,E.getEdges()[0],E.getOwner(),Q])}else m.push([E,E.getEdges()[0],E.getOwner()]);L=!0}if(L==!0){var Z=[];for(var W=0;W<m.length;W++)if(m[W][0].getEdges().length==1)Z.push(m[W]),m[W][0].getOwner().remove(m[W][0]);s.push(Z),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},G.prototype.growTree=function(s){var L=s.length,E=s[L-1],M;for(var m=0;m<E.length;m++)M=E[m],this.findPlaceforPrunedNode(M),M[2].add(M[0]),M[2].add(M[1],M[1].source,M[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},G.prototype.findPlaceforPrunedNode=function(s){var L,E,M=s[0];if(M==s[1].source)E=s[1].target;else E=s[1].source;if(g.PURE_INCREMENTAL)M.setCenter(E.getCenterX()+s[3].getWidth(),E.getCenterY()+s[3].getHeight());else{var m=E.startX,Y=E.finishX,b=E.startY,Q=E.finishY,Z=0,W=0,ht=0,vt=0,k=[Z,ht,W,vt];if(b>0)for(var dt=m;dt<=Y;dt++)k[0]+=this.grid[dt][b-1].length+this.grid[dt][b].length-1;if(Y<this.grid.length-1)for(var dt=b;dt<=Q;dt++)k[1]+=this.grid[Y+1][dt].length+this.grid[Y][dt].length-1;if(Q<this.grid[0].length-1)for(var dt=m;dt<=Y;dt++)k[2]+=this.grid[dt][Q+1].length+this.grid[dt][Q].length-1;if(m>0)for(var dt=b;dt<=Q;dt++)k[3]+=this.grid[m-1][dt].length+this.grid[m][dt].length-1;var at=x.MAX_VALUE,S,_;for(var rt=0;rt<k.length;rt++)if(k[rt]<at)at=k[rt],S=1,_=rt;else if(k[rt]==at)S++;if(S==3&&at==0){if(k[0]==0&&k[1]==0&&k[2]==0)L=1;else if(k[0]==0&&k[1]==0&&k[3]==0)L=0;else if(k[0]==0&&k[2]==0&&k[3]==0)L=3;else if(k[1]==0&&k[2]==0&&k[3]==0)L=2}else if(S==2&&at==0){var gt=Math.floor(Math.random()*2);if(k[0]==0&&k[1]==0)if(gt==0)L=0;else L=1;else if(k[0]==0&&k[2]==0)if(gt==0)L=0;else L=2;else if(k[0]==0&&k[3]==0)if(gt==0)L=0;else L=3;else if(k[1]==0&&k[2]==0)if(gt==0)L=1;else L=2;else if(k[1]==0&&k[3]==0)if(gt==0)L=1;else L=3;else if(gt==0)L=2;else L=3}else if(S==4&&at==0){var gt=Math.floor(Math.random()*4);L=gt}else L=_;if(L==0)M.setCenter(E.getCenterX(),E.getCenterY()-E.getHeight()/2-c.DEFAULT_EDGE_LENGTH-M.getHeight()/2);else if(L==1)M.setCenter(E.getCenterX()+E.getWidth()/2+c.DEFAULT_EDGE_LENGTH+M.getWidth()/2,E.getCenterY());else if(L==2)M.setCenter(E.getCenterX(),E.getCenterY()+E.getHeight()/2+c.DEFAULT_EDGE_LENGTH+M.getHeight()/2);else M.setCenter(E.getCenterX()-E.getWidth()/2-c.DEFAULT_EDGE_LENGTH-M.getWidth()/2,E.getCenterY())}},o.exports=G},991:(o,n,a)=>{var u=a(551).FDLayoutNode,r=a(551).IMath;function y(e,g,d,c){u.call(this,e,g,d,c)}y.prototype=Object.create(u.prototype);for(var i in u)y[i]=u[i];y.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();if(this.getChild()!=null&&this.fixedNodeWeight)this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight;else this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren;if(Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement)this.displacementX=e.coolingFactor*e.maxNodeDisplacement*r.sign(this.displacementX);if(Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement)this.displacementY=e.coolingFactor*e.maxNodeDisplacement*r.sign(this.displacementY);if(this.child&&this.child.getNodes().length>0)this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(e,g){var d=this.getChild().getNodes(),c;for(var O=0;O<d.length;O++)if(c=d[O],c.getChild()==null)c.displacementX+=e,c.displacementY+=g;else c.propogateDisplacementToChildren(e,g)},y.prototype.move=function(){var e=this.graphManager.getLayout();if(this.child==null||this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY),e.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},y.prototype.setPred1=function(e){this.pred1=e},y.prototype.getPred1=function(){return pred1},y.prototype.getPred2=function(){return pred2},y.prototype.setNext=function(e){this.next=e},y.prototype.getNext=function(){return next},y.prototype.setProcessed=function(e){this.processed=e},y.prototype.isProcessed=function(){return processed},o.exports=y},902:(o,n,a)=>{function u(d){if(Array.isArray(d)){for(var c=0,O=Array(d.length);c<d.length;c++)O[c]=d[c];return O}else return Array.from(d)}var r=a(806),y=a(551).LinkedList,i=a(551).Matrix,e=a(551).SVD;function g(){}g.handleConstraints=function(d){var c={};c.fixedNodeConstraint=d.constraints.fixedNodeConstraint,c.alignmentConstraint=d.constraints.alignmentConstraint,c.relativePlacementConstraint=d.constraints.relativePlacementConstraint;var O=new Map,T=new Map,N=[],D=[],H=d.getAllNodes(),x=0;for(var B=0;B<H.length;B++){var tt=H[B];if(tt.getChild()==null)T.set(tt.id,x++),N.push(tt.getCenterX()),D.push(tt.getCenterY()),O.set(tt.id,tt)}if(c.relativePlacementConstraint)c.relativePlacementConstraint.forEach(function(K){if(!K.gap&&K.gap!=0)if(K.left)K.gap=r.DEFAULT_EDGE_LENGTH+O.get(K.left).getWidth()/2+O.get(K.right).getWidth()/2;else K.gap=r.DEFAULT_EDGE_LENGTH+O.get(K.top).getHeight()/2+O.get(K.bottom).getHeight()/2});var J=function(it,nt){return{x:it.x-nt.x,y:it.y-nt.y}},ft=function(it){var nt=0,ot=0;return it.forEach(function(st){nt+=N[T.get(st)],ot+=D[T.get(st)]}),{x:nt/it.size,y:ot/it.size}},G=function(it,nt,ot,st,ut){function Dt(Nt,mt){var Ot=new Set(Nt),Et=!0,Mt=!1,kt=void 0;try{for(var zt=mt[Symbol.iterator](),re;!(Et=(re=zt.next()).done);Et=!0){var Vt=re.value;Ot.add(Vt)}}catch(Pt){Mt=!0,kt=Pt}finally{try{if(!Et&&zt.return)zt.return()}finally{if(Mt)throw kt}}return Ot}var Ct=new Map;it.forEach(function(Nt,mt){Ct.set(mt,0)}),it.forEach(function(Nt,mt){Nt.forEach(function(Ot){Ct.set(Ot.id,Ct.get(Ot.id)+1)})});var lt=new Map,wt=new Map,At=new y;if(Ct.forEach(function(Nt,mt){if(Nt==0){if(At.push(mt),!ot)if(nt=="horizontal")lt.set(mt,T.has(mt)?N[T.get(mt)]:st.get(mt));else lt.set(mt,T.has(mt)?D[T.get(mt)]:st.get(mt))}else lt.set(mt,Number.NEGATIVE_INFINITY);if(ot)wt.set(mt,new Set([mt]))}),ot)ut.forEach(function(Nt){var mt=[];if(Nt.forEach(function(Mt){if(ot.has(Mt))mt.push(Mt)}),mt.length>0){var Ot=0;mt.forEach(function(Mt){if(nt=="horizontal")lt.set(Mt,T.has(Mt)?N[T.get(Mt)]:st.get(Mt)),Ot+=lt.get(Mt);else lt.set(Mt,T.has(Mt)?D[T.get(Mt)]:st.get(Mt)),Ot+=lt.get(Mt)}),Ot=Ot/mt.length,Nt.forEach(function(Mt){if(!ot.has(Mt))lt.set(Mt,Ot)})}else{var Et=0;Nt.forEach(function(Mt){if(nt=="horizontal")Et+=T.has(Mt)?N[T.get(Mt)]:st.get(Mt);else Et+=T.has(Mt)?D[T.get(Mt)]:st.get(Mt)}),Et=Et/Nt.length,Nt.forEach(function(Mt){lt.set(Mt,Et)})}});var yt=function(){var mt=At.shift(),Ot=it.get(mt);Ot.forEach(function(Et){if(lt.get(Et.id)<lt.get(mt)+Et.gap)if(ot&&ot.has(Et.id)){var Mt=void 0;if(nt=="horizontal")Mt=T.has(Et.id)?N[T.get(Et.id)]:st.get(Et.id);else Mt=T.has(Et.id)?D[T.get(Et.id)]:st.get(Et.id);if(lt.set(Et.id,Mt),Mt<lt.get(mt)+Et.gap){var kt=lt.get(mt)+Et.gap-Mt;wt.get(mt).forEach(function(zt){lt.set(zt,lt.get(zt)-kt)})}}else lt.set(Et.id,lt.get(mt)+Et.gap);if(Ct.set(Et.id,Ct.get(Et.id)-1),Ct.get(Et.id)==0)At.push(Et.id);if(ot)wt.set(Et.id,Dt(wt.get(mt),wt.get(Et.id)))})};while(At.length!=0)yt();if(ot){var xt=new Set;it.forEach(function(Nt,mt){if(Nt.length==0)xt.add(mt)});var Yt=[];wt.forEach(function(Nt,mt){if(xt.has(mt)){var Ot=!1,Et=!0,Mt=!1,kt=void 0;try{for(var zt=Nt[Symbol.iterator](),re;!(Et=(re=zt.next()).done);Et=!0){var Vt=re.value;if(ot.has(Vt))Ot=!0}}catch(Bt){Mt=!0,kt=Bt}finally{try{if(!Et&&zt.return)zt.return()}finally{if(Mt)throw kt}}if(!Ot){var Pt=!1,ae=void 0;if(Yt.forEach(function(Bt,_t){if(Bt.has([].concat(u(Nt))[0]))Pt=!0,ae=_t}),!Pt)Yt.push(new Set(Nt));else Nt.forEach(function(Bt){Yt[ae].add(Bt)})}}}),Yt.forEach(function(Nt,mt){var{POSITIVE_INFINITY:Ot,POSITIVE_INFINITY:Et,NEGATIVE_INFINITY:Mt,NEGATIVE_INFINITY:kt}=Number,zt=!0,re=!1,Vt=void 0;try{for(var Pt=Nt[Symbol.iterator](),ae;!(zt=(ae=Pt.next()).done);zt=!0){var Bt=ae.value,_t=void 0;if(nt=="horizontal")_t=T.has(Bt)?N[T.get(Bt)]:st.get(Bt);else _t=T.has(Bt)?D[T.get(Bt)]:st.get(Bt);var ie=lt.get(Bt);if(_t<Ot)Ot=_t;if(_t>Mt)Mt=_t;if(ie<Et)Et=ie;if(ie>kt)kt=ie}}catch(ve){re=!0,Vt=ve}finally{try{if(!zt&&Pt.return)Pt.return()}finally{if(re)throw Vt}}var Ce=(Ot+Mt)/2-(Et+kt)/2,le=!0,ce=!1,ge=void 0;try{for(var fe=Nt[Symbol.iterator](),we;!(le=(we=fe.next()).done);le=!0){var de=we.value;lt.set(de,lt.get(de)+Ce)}}catch(ve){ce=!0,ge=ve}finally{try{if(!le&&fe.return)fe.return()}finally{if(ce)throw ge}}})}return lt},et=function(it){var nt=0,ot=0,st=0,ut=0;if(it.forEach(function(wt){if(wt.left)N[T.get(wt.left)]-N[T.get(wt.right)]>=0?nt++:ot++;else D[T.get(wt.top)]-D[T.get(wt.bottom)]>=0?st++:ut++}),nt>ot&&st>ut)for(var Dt=0;Dt<T.size;Dt++)N[Dt]=-1*N[Dt],D[Dt]=-1*D[Dt];else if(nt>ot)for(var Ct=0;Ct<T.size;Ct++)N[Ct]=-1*N[Ct];else if(st>ut)for(var lt=0;lt<T.size;lt++)D[lt]=-1*D[lt]},s=function(it){var nt=[],ot=new y,st=new Set,ut=0;return it.forEach(function(Dt,Ct){if(!st.has(Ct)){nt[ut]=[];var lt=Ct;ot.push(lt),st.add(lt),nt[ut].push(lt);while(ot.length!=0){lt=ot.shift();var wt=it.get(lt);wt.forEach(function(At){if(!st.has(At.id))ot.push(At.id),st.add(At.id),nt[ut].push(At.id)})}ut++}}),nt},L=function(it){var nt=new Map;return it.forEach(function(ot,st){nt.set(st,[])}),it.forEach(function(ot,st){ot.forEach(function(ut){nt.get(st).push(ut),nt.get(ut.id).push({id:st,gap:ut.gap,direction:ut.direction})})}),nt},E=function(it){var nt=new Map;return it.forEach(function(ot,st){nt.set(st,[])}),it.forEach(function(ot,st){ot.forEach(function(ut){nt.get(ut.id).push({id:st,gap:ut.gap,direction:ut.direction})})}),nt},M=[],m=[],Y=!1,b=!1,Q=new Set,Z=new Map,W=new Map,ht=[];if(c.fixedNodeConstraint)c.fixedNodeConstraint.forEach(function(K){Q.add(K.nodeId)});if(c.relativePlacementConstraint)c.relativePlacementConstraint.forEach(function(K){if(K.left){if(Z.has(K.left))Z.get(K.left).push({id:K.right,gap:K.gap,direction:"horizontal"});else Z.set(K.left,[{id:K.right,gap:K.gap,direction:"horizontal"}]);if(!Z.has(K.right))Z.set(K.right,[])}else{if(Z.has(K.top))Z.get(K.top).push({id:K.bottom,gap:K.gap,direction:"vertical"});else Z.set(K.top,[{id:K.bottom,gap:K.gap,direction:"vertical"}]);if(!Z.has(K.bottom))Z.set(K.bottom,[])}}),W=L(Z),ht=s(W);if(r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(c.fixedNodeConstraint&&c.fixedNodeConstraint.length>1)c.fixedNodeConstraint.forEach(function(K,it){M[it]=[K.position.x,K.position.y],m[it]=[N[T.get(K.nodeId)],D[T.get(K.nodeId)]]}),Y=!0;else if(c.alignmentConstraint)(function(){var K=0;if(c.alignmentConstraint.vertical){var it=c.alignmentConstraint.vertical,nt=function(lt){var wt=new Set;it[lt].forEach(function(xt){wt.add(xt)});var At=new Set([].concat(u(wt)).filter(function(xt){return Q.has(xt)})),yt=void 0;if(At.size>0)yt=N[T.get(At.values().next().value)];else yt=ft(wt).x;it[lt].forEach(function(xt){M[K]=[yt,D[T.get(xt)]],m[K]=[N[T.get(xt)],D[T.get(xt)]],K++})};for(var ot=0;ot<it.length;ot++)nt(ot);Y=!0}if(c.alignmentConstraint.horizontal){var st=c.alignmentConstraint.horizontal,ut=function(lt){var wt=new Set;st[lt].forEach(function(xt){wt.add(xt)});var At=new Set([].concat(u(wt)).filter(function(xt){return Q.has(xt)})),yt=void 0;if(At.size>0)yt=N[T.get(At.values().next().value)];else yt=ft(wt).y;st[lt].forEach(function(xt){M[K]=[N[T.get(xt)],yt],m[K]=[N[T.get(xt)],D[T.get(xt)]],K++})};for(var Dt=0;Dt<st.length;Dt++)ut(Dt);Y=!0}if(c.relativePlacementConstraint)b=!0})();else if(c.relativePlacementConstraint){var vt=0,k=0;for(var dt=0;dt<ht.length;dt++)if(ht[dt].length>vt)vt=ht[dt].length,k=dt;if(vt<W.size/2)et(c.relativePlacementConstraint),Y=!1,b=!1;else{var at=new Map,S=new Map,_=[];ht[k].forEach(function(K){Z.get(K).forEach(function(it){if(it.direction=="horizontal"){if(at.has(K))at.get(K).push(it);else at.set(K,[it]);if(!at.has(it.id))at.set(it.id,[]);_.push({left:K,right:it.id})}else{if(S.has(K))S.get(K).push(it);else S.set(K,[it]);if(!S.has(it.id))S.set(it.id,[]);_.push({top:K,bottom:it.id})}})}),et(_),b=!1;var rt=G(at,"horizontal"),gt=G(S,"vertical");ht[k].forEach(function(K,it){if(m[it]=[N[T.get(K)],D[T.get(K)]],M[it]=[],rt.has(K))M[it][0]=rt.get(K);else M[it][0]=N[T.get(K)];if(gt.has(K))M[it][1]=gt.get(K);else M[it][1]=D[T.get(K)]}),Y=!0}}if(Y){var Lt=void 0,Gt=i.transpose(M),Zt=i.transpose(m);for(var ct=0;ct<Gt.length;ct++)Gt[ct]=i.multGamma(Gt[ct]),Zt[ct]=i.multGamma(Zt[ct]);var Kt=i.multMat(Gt,i.transpose(Zt)),Ht=e.svd(Kt);Lt=i.multMat(Ht.V,i.transpose(Ht.U));for(var Tt=0;Tt<T.size;Tt++){var pt=[N[Tt],D[Tt]],It=[Lt[0][0],Lt[1][0]],St=[Lt[0][1],Lt[1][1]];N[Tt]=i.dotProduct(pt,It),D[Tt]=i.dotProduct(pt,St)}if(b)et(c.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(c.fixedNodeConstraint&&c.fixedNodeConstraint.length>0){var Ut={x:0,y:0};c.fixedNodeConstraint.forEach(function(K,it){var nt={x:N[T.get(K.nodeId)],y:D[T.get(K.nodeId)]},ot=K.position,st=J(ot,nt);Ut.x+=st.x,Ut.y+=st.y}),Ut.x/=c.fixedNodeConstraint.length,Ut.y/=c.fixedNodeConstraint.length,N.forEach(function(K,it){N[it]+=Ut.x}),D.forEach(function(K,it){D[it]+=Ut.y}),c.fixedNodeConstraint.forEach(function(K){N[T.get(K.nodeId)]=K.position.x,D[T.get(K.nodeId)]=K.position.y})}if(c.alignmentConstraint){if(c.alignmentConstraint.vertical){var Ft=c.alignmentConstraint.vertical,bt=function(it){var nt=new Set;Ft[it].forEach(function(ut){nt.add(ut)});var ot=new Set([].concat(u(nt)).filter(function(ut){return Q.has(ut)})),st=void 0;if(ot.size>0)st=N[T.get(ot.values().next().value)];else st=ft(nt).x;nt.forEach(function(ut){if(!Q.has(ut))N[T.get(ut)]=st})};for(var Wt=0;Wt<Ft.length;Wt++)bt(Wt)}if(c.alignmentConstraint.horizontal){var $t=c.alignmentConstraint.horizontal,ee=function(it){var nt=new Set;$t[it].forEach(function(ut){nt.add(ut)});var ot=new Set([].concat(u(nt)).filter(function(ut){return Q.has(ut)})),st=void 0;if(ot.size>0)st=D[T.get(ot.values().next().value)];else st=ft(nt).y;nt.forEach(function(ut){if(!Q.has(ut))D[T.get(ut)]=st})};for(var Qt=0;Qt<$t.length;Qt++)ee(Qt)}}if(c.relativePlacementConstraint)(function(){var K=new Map,it=new Map,nt=new Map,ot=new Map,st=new Map,ut=new Map,Dt=new Set,Ct=new Set;if(Q.forEach(function(Jt){Dt.add(Jt),Ct.add(Jt)}),c.alignmentConstraint){if(c.alignmentConstraint.vertical){var lt=c.alignmentConstraint.vertical,wt=function(Rt){nt.set("dummy"+Rt,[]),lt[Rt].forEach(function(Xt){if(K.set(Xt,"dummy"+Rt),nt.get("dummy"+Rt).push(Xt),Q.has(Xt))Dt.add("dummy"+Rt)}),st.set("dummy"+Rt,N[T.get(lt[Rt][0])])};for(var At=0;At<lt.length;At++)wt(At)}if(c.alignmentConstraint.horizontal){var yt=c.alignmentConstraint.horizontal,xt=function(Rt){ot.set("dummy"+Rt,[]),yt[Rt].forEach(function(Xt){if(it.set(Xt,"dummy"+Rt),ot.get("dummy"+Rt).push(Xt),Q.has(Xt))Ct.add("dummy"+Rt)}),ut.set("dummy"+Rt,D[T.get(yt[Rt][0])])};for(var Yt=0;Yt<yt.length;Yt++)xt(Yt)}}var Nt=new Map,mt=new Map,Ot=function(Rt){Z.get(Rt).forEach(function(Xt){var oe=void 0,ne=void 0;if(Xt.direction=="horizontal"){if(oe=K.get(Rt)?K.get(Rt):Rt,K.get(Xt.id))ne={id:K.get(Xt.id),gap:Xt.gap,direction:Xt.direction};else ne=Xt;if(Nt.has(oe))Nt.get(oe).push(ne);else Nt.set(oe,[ne]);if(!Nt.has(ne.id))Nt.set(ne.id,[])}else{if(oe=it.get(Rt)?it.get(Rt):Rt,it.get(Xt.id))ne={id:it.get(Xt.id),gap:Xt.gap,direction:Xt.direction};else ne=Xt;if(mt.has(oe))mt.get(oe).push(ne);else mt.set(oe,[ne]);if(!mt.has(ne.id))mt.set(ne.id,[])}})},Et=!0,Mt=!1,kt=void 0;try{for(var zt=Z.keys()[Symbol.iterator](),re;!(Et=(re=zt.next()).done);Et=!0){var Vt=re.value;Ot(Vt)}}catch(Jt){Mt=!0,kt=Jt}finally{try{if(!Et&&zt.return)zt.return()}finally{if(Mt)throw kt}}var Pt=L(Nt),ae=L(mt),Bt=s(Pt),_t=s(ae),ie=E(Nt),Ce=E(mt),le=[],ce=[];Bt.forEach(function(Jt,Rt){le[Rt]=[],Jt.forEach(function(Xt){if(ie.get(Xt).length==0)le[Rt].push(Xt)})}),_t.forEach(function(Jt,Rt){ce[Rt]=[],Jt.forEach(function(Xt){if(Ce.get(Xt).length==0)ce[Rt].push(Xt)})});var ge=G(Nt,"horizontal",Dt,st,le),fe=G(mt,"vertical",Ct,ut,ce),we=function(Rt){if(nt.get(Rt))nt.get(Rt).forEach(function(Xt){N[T.get(Xt)]=ge.get(Rt)});else N[T.get(Rt)]=ge.get(Rt)},de=!0,ve=!1,Xe=void 0;try{for(var Ae=ge.keys()[Symbol.iterator](),He;!(de=(He=Ae.next()).done);de=!0){var De=He.value;we(De)}}catch(Jt){ve=!0,Xe=Jt}finally{try{if(!de&&Ae.return)Ae.return()}finally{if(ve)throw Xe}}var hr=function(Rt){if(ot.get(Rt))ot.get(Rt).forEach(function(Xt){D[T.get(Xt)]=fe.get(Rt)});else D[T.get(Rt)]=fe.get(Rt)},Oe=!0,We=!1,Ve=void 0;try{for(var xe=fe.keys()[Symbol.iterator](),ze;!(Oe=(ze=xe.next()).done);Oe=!0){var De=ze.value;hr(De)}}catch(Jt){We=!0,Ve=Jt}finally{try{if(!Oe&&xe.return)xe.return()}finally{if(We)throw Ve}}})()}for(var jt=0;jt<H.length;jt++){var qt=H[jt];if(qt.getChild()==null)qt.setCenter(N[T.get(qt.id)],D[T.get(qt.id)])}},o.exports=g},551:(o)=>{o.exports=w}},A={};function v(o){var n=A[o];if(n!==void 0)return n.exports;var a=A[o]={exports:{}};return I[o](a,a.exports,v),a.exports}var f=v(45);return f})()})});var $e=Cn(function(Ne,Pe){(function(I,A){if(typeof Ne==="object"&&typeof Pe==="object")Pe.exports=A(Fe());else if(typeof define==="function"&&define.amd)define(["cose-base"],A);else if(typeof Ne==="object")Ne.cytoscapeFcose=A(Fe());else I.cytoscapeFcose=A(I.coseBase)})(Ne,function(w){return(()=>{var I={658:(o)=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(n){for(var a=arguments.length,u=Array(a>1?a-1:0),r=1;r<a;r++)u[r-1]=arguments[r];return u.forEach(function(y){Object.keys(y).forEach(function(i){return n[i]=y[i]})}),n}},548:(o,n,a)=>{var u=function(){function i(e,g){var d=[],c=!0,O=!1,T=void 0;try{for(var N=e[Symbol.iterator](),D;!(c=(D=N.next()).done);c=!0)if(d.push(D.value),g&&d.length===g)break}catch(H){O=!0,T=H}finally{try{if(!c&&N.return)N.return()}finally{if(O)throw T}}return d}return function(e,g){if(Array.isArray(e))return e;else if(Symbol.iterator in Object(e))return i(e,g);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=a(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(i){var e={};for(var g=0;g<i.length;g++)e[i[g].id()]=!0;var d=i.filter(function(c,O){if(typeof c==="number")c=O;var T=c.parent()[0];while(T!=null){if(e[T.id()])return!1;T=T.parent()[0]}return!0});return d},y.connectComponents=function(i,e,g,d){var c=new r,O=new Set,T=[],N=void 0,D=void 0,H=void 0,x=!1,B=1,tt=[],J=[],ft=function(){var et=i.collection();J.push(et);var s=g[0],L=i.collection();L.merge(s).merge(s.descendants().intersection(e)),T.push(s),L.forEach(function(m){c.push(m),O.add(m),et.merge(m)});var E=function(){s=c.shift();var Y=i.collection();s.neighborhood().nodes().forEach(function(W){if(e.intersection(s.edgesWith(W)).length>0)Y.merge(W)});for(var b=0;b<Y.length;b++){var Q=Y[b];if(N=g.intersection(Q.union(Q.ancestors())),N!=null&&!O.has(N[0])){var Z=N.union(N.descendants());Z.forEach(function(W){if(c.push(W),O.add(W),et.merge(W),g.has(W))T.push(W)})}}};while(c.length!=0)E();if(et.forEach(function(m){e.intersection(m.connectedEdges()).forEach(function(Y){if(et.has(Y.source())&&et.has(Y.target()))et.merge(Y)})}),T.length==g.length)x=!0;if(!x||x&&B>1){D=T[0],H=D.connectedEdges().length,T.forEach(function(m){if(m.connectedEdges().length<H)H=m.connectedEdges().length,D=m}),tt.push(D.id());var M=i.collection();M.merge(T[0]),T.forEach(function(m){M.merge(m)}),T=[],g=g.difference(M),B++}};do ft();while(!x);if(d){if(tt.length>0)d.set("dummy"+(d.size+1),tt)}return J},y.relocateComponent=function(i,e,g){if(!g.fixedNodeConstraint){var{POSITIVE_INFINITY:d,NEGATIVE_INFINITY:c,POSITIVE_INFINITY:O,NEGATIVE_INFINITY:T}=Number;if(g.quality=="draft"){var N=!0,D=!1,H=void 0;try{for(var x=e.nodeIndexes[Symbol.iterator](),B;!(N=(B=x.next()).done);N=!0){var tt=B.value,J=u(tt,2),ft=J[0],G=J[1],et=g.cy.getElementById(ft);if(et){var s=et.boundingBox(),L=e.xCoords[G]-s.w/2,E=e.xCoords[G]+s.w/2,M=e.yCoords[G]-s.h/2,m=e.yCoords[G]+s.h/2;if(L<d)d=L;if(E>c)c=E;if(M<O)O=M;if(m>T)T=m}}}catch(W){D=!0,H=W}finally{try{if(!N&&x.return)x.return()}finally{if(D)throw H}}var Y=i.x-(c+d)/2,b=i.y-(T+O)/2;e.xCoords=e.xCoords.map(function(W){return W+Y}),e.yCoords=e.yCoords.map(function(W){return W+b})}else{Object.keys(e).forEach(function(W){var ht=e[W],vt=ht.getRect().x,k=ht.getRect().x+ht.getRect().width,dt=ht.getRect().y,at=ht.getRect().y+ht.getRect().height;if(vt<d)d=vt;if(k>c)c=k;if(dt<O)O=dt;if(at>T)T=at});var Q=i.x-(c+d)/2,Z=i.y-(T+O)/2;Object.keys(e).forEach(function(W){var ht=e[W];ht.setCenter(ht.getCenterX()+Q,ht.getCenterY()+Z)})}}},y.calcBoundingBox=function(i,e,g,d){var{MAX_SAFE_INTEGER:c,MIN_SAFE_INTEGER:O,MAX_SAFE_INTEGER:T,MIN_SAFE_INTEGER:N}=Number,D=void 0,H=void 0,x=void 0,B=void 0,tt=i.descendants().not(":parent"),J=tt.length;for(var ft=0;ft<J;ft++){var G=tt[ft];if(D=e[d.get(G.id())]-G.width()/2,H=e[d.get(G.id())]+G.width()/2,x=g[d.get(G.id())]-G.height()/2,B=g[d.get(G.id())]+G.height()/2,c>D)c=D;if(O<H)O=H;if(T>x)T=x;if(N<B)N=B}var et={};return et.topLeftX=c,et.topLeftY=T,et.width=O-c,et.height=N-T,et},y.calcParentsWithoutChildren=function(i,e){var g=i.collection();return e.nodes(":parent").forEach(function(d){var c=!1;if(d.children().forEach(function(O){if(O.css("display")!="none")c=!0}),!c)g.merge(d)}),g},o.exports=y},816:(o,n,a)=>{var u=a(548),r=a(140).CoSELayout,y=a(140).CoSENode,i=a(140).layoutBase.PointD,e=a(140).layoutBase.DimensionD,g=a(140).layoutBase.LayoutConstants,d=a(140).layoutBase.FDLayoutConstants,c=a(140).CoSEConstants,O=function(N,D){var{cy:H,eles:x}=N,B=x.nodes(),tt=x.edges(),J=void 0,ft=void 0,G=void 0,et={};if(N.randomize)J=D.nodeIndexes,ft=D.xCoords,G=D.yCoords;var s=function(W){return typeof W==="function"},L=function(W,ht){if(s(W))return W(ht);else return W},E=u.calcParentsWithoutChildren(H,x),M=function Z(W,ht,vt,k){var dt=ht.length;for(var at=0;at<dt;at++){var S=ht[at],_=null;if(S.intersection(E).length==0)_=S.children();var rt=void 0,gt=S.layoutDimensions({nodeDimensionsIncludeLabels:k.nodeDimensionsIncludeLabels});if(S.outerWidth()!=null&&S.outerHeight()!=null)if(k.randomize)if(!S.isParent())rt=W.add(new y(vt.graphManager,new i(ft[J.get(S.id())]-gt.w/2,G[J.get(S.id())]-gt.h/2),new e(parseFloat(gt.w),parseFloat(gt.h))));else{var Lt=u.calcBoundingBox(S,ft,G,J);if(S.intersection(E).length==0)rt=W.add(new y(vt.graphManager,new i(Lt.topLeftX,Lt.topLeftY),new e(Lt.width,Lt.height)));else rt=W.add(new y(vt.graphManager,new i(Lt.topLeftX,Lt.topLeftY),new e(parseFloat(gt.w),parseFloat(gt.h))))}else rt=W.add(new y(vt.graphManager,new i(S.position("x")-gt.w/2,S.position("y")-gt.h/2),new e(parseFloat(gt.w),parseFloat(gt.h))));else rt=W.add(new y(this.graphManager));if(rt.id=S.data("id"),rt.nodeRepulsion=L(k.nodeRepulsion,S),rt.paddingLeft=parseInt(S.css("padding")),rt.paddingTop=parseInt(S.css("padding")),rt.paddingRight=parseInt(S.css("padding")),rt.paddingBottom=parseInt(S.css("padding")),k.nodeDimensionsIncludeLabels)rt.labelWidth=S.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,rt.labelHeight=S.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,rt.labelPosVertical=S.css("text-valign"),rt.labelPosHorizontal=S.css("text-halign");if(et[S.data("id")]=rt,isNaN(rt.rect.x))rt.rect.x=0;if(isNaN(rt.rect.y))rt.rect.y=0;if(_!=null&&_.length>0){var Gt=void 0;Gt=vt.getGraphManager().add(vt.newGraph(),rt),Z(Gt,_,vt,k)}}},m=function(W,ht,vt){var k=0,dt=0;for(var at=0;at<vt.length;at++){var S=vt[at],_=et[S.data("source")],rt=et[S.data("target")];if(_&&rt&&_!==rt&&_.getEdgesBetween(rt).length==0){var gt=ht.add(W.newEdge(),_,rt);gt.id=S.id(),gt.idealLength=L(N.idealEdgeLength,S),gt.edgeElasticity=L(N.edgeElasticity,S),k+=gt.idealLength,dt++}}if(N.idealEdgeLength!=null){if(dt>0)c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=k/dt;else if(!s(N.idealEdgeLength))c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=N.idealEdgeLength;else c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50;c.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,c.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH}},Y=function(W,ht){if(ht.fixedNodeConstraint)W.constraints.fixedNodeConstraint=ht.fixedNodeConstraint;if(ht.alignmentConstraint)W.constraints.alignmentConstraint=ht.alignmentConstraint;if(ht.relativePlacementConstraint)W.constraints.relativePlacementConstraint=ht.relativePlacementConstraint};if(N.nestingFactor!=null)c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=N.nestingFactor;if(N.gravity!=null)c.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=N.gravity;if(N.numIter!=null)c.MAX_ITERATIONS=d.MAX_ITERATIONS=N.numIter;if(N.gravityRange!=null)c.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=N.gravityRange;if(N.gravityCompound!=null)c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=N.gravityCompound;if(N.gravityRangeCompound!=null)c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=N.gravityRangeCompound;if(N.initialEnergyOnIncremental!=null)c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=N.initialEnergyOnIncremental;if(N.tilingCompareBy!=null)c.TILING_COMPARE_BY=N.tilingCompareBy;if(N.quality=="proof")g.QUALITY=2;else g.QUALITY=0;if(c.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=N.nodeDimensionsIncludeLabels,c.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=!N.randomize,c.ANIMATE=d.ANIMATE=g.ANIMATE=N.animate,c.TILE=N.tile,c.TILING_PADDING_VERTICAL=typeof N.tilingPaddingVertical==="function"?N.tilingPaddingVertical.call():N.tilingPaddingVertical,c.TILING_PADDING_HORIZONTAL=typeof N.tilingPaddingHorizontal==="function"?N.tilingPaddingHorizontal.call():N.tilingPaddingHorizontal,c.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=!0,c.PURE_INCREMENTAL=!N.randomize,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=N.uniformNodeDimensions,N.step=="transformed")c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!1;if(N.step=="enforced")c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!1;if(N.step=="cose")c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!0;if(N.step=="all"){if(N.randomize)c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!0}if(N.fixedNodeConstraint||N.alignmentConstraint||N.relativePlacementConstraint)c.TREE_REDUCTION_ON_INCREMENTAL=!1;else c.TREE_REDUCTION_ON_INCREMENTAL=!0;var b=new r,Q=b.newGraphManager();return M(Q.addRoot(),u.getTopMostNodes(B),b,N),m(b,Q,tt),Y(b,N),b.runLayout(),et};o.exports={coseLayout:O}},212:(o,n,a)=>{var u=function(){function N(D,H){for(var x=0;x<H.length;x++){var B=H[x];if(B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B)B.writable=!0;Object.defineProperty(D,B.key,B)}}return function(D,H,x){if(H)N(D.prototype,H);if(x)N(D,x);return D}}();function r(N,D){if(!(N instanceof D))throw TypeError("Cannot call a class as a function")}var y=a(658),i=a(548),e=a(657),g=e.spectralLayout,d=a(816),c=d.coseLayout,O=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(D){return 4500},idealEdgeLength:function(D){return 50},edgeElasticity:function(D){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),T=function(){function N(D){r(this,N),this.options=y({},O,D)}return u(N,[{key:"run",value:function(){var H=this,x=this.options,{cy:B,eles:tt}=x,J=[],ft=void 0,G=void 0,et=[],s=void 0,L=[];if(x.fixedNodeConstraint&&(!Array.isArray(x.fixedNodeConstraint)||x.fixedNodeConstraint.length==0))x.fixedNodeConstraint=void 0;if(x.alignmentConstraint){if(x.alignmentConstraint.vertical&&(!Array.isArray(x.alignmentConstraint.vertical)||x.alignmentConstraint.vertical.length==0))x.alignmentConstraint.vertical=void 0;if(x.alignmentConstraint.horizontal&&(!Array.isArray(x.alignmentConstraint.horizontal)||x.alignmentConstraint.horizontal.length==0))x.alignmentConstraint.horizontal=void 0}if(x.relativePlacementConstraint&&(!Array.isArray(x.relativePlacementConstraint)||x.relativePlacementConstraint.length==0))x.relativePlacementConstraint=void 0;var E=x.fixedNodeConstraint||x.alignmentConstraint||x.relativePlacementConstraint;if(E)x.tile=!1,x.packComponents=!1;var M=void 0,m=!1;if(B.layoutUtilities&&x.packComponents){if(M=B.layoutUtilities("get"),!M)M=B.layoutUtilities();m=!0}if(tt.nodes().length>0)if(!m){var Y=x.eles.boundingBox();if(L.push({x:Y.x1+Y.w/2,y:Y.y1+Y.h/2}),x.randomize){var b=g(x);J.push(b)}if(x.quality=="default"||x.quality=="proof")et.push(c(x,J[0])),i.relocateComponent(L[0],et[0],x);else i.relocateComponent(L[0],J[0],x)}else{var Q=i.getTopMostNodes(x.eles.nodes());if(s=i.connectComponents(B,x.eles,Q),s.forEach(function(Tt){var pt=Tt.boundingBox();L.push({x:pt.x1+pt.w/2,y:pt.y1+pt.h/2})}),x.randomize)s.forEach(function(Tt){x.eles=Tt,J.push(g(x))});if(x.quality=="default"||x.quality=="proof"){var Z=B.collection();if(x.tile){var W=new Map,ht=[],vt=[],k=0,dt={nodeIndexes:W,xCoords:ht,yCoords:vt},at=[];if(s.forEach(function(Tt,pt){if(Tt.edges().length==0)Tt.nodes().forEach(function(It,St){if(Z.merge(Tt.nodes()[St]),!It.isParent())dt.nodeIndexes.set(Tt.nodes()[St].id(),k++),dt.xCoords.push(Tt.nodes()[0].position().x),dt.yCoords.push(Tt.nodes()[0].position().y)}),at.push(pt)}),Z.length>1){var S=Z.boundingBox();L.push({x:S.x1+S.w/2,y:S.y1+S.h/2}),s.push(Z),J.push(dt);for(var _=at.length-1;_>=0;_--)s.splice(at[_],1),J.splice(at[_],1),L.splice(at[_],1)}}s.forEach(function(Tt,pt){x.eles=Tt,et.push(c(x,J[pt])),i.relocateComponent(L[pt],et[pt],x)})}else s.forEach(function(Tt,pt){i.relocateComponent(L[pt],J[pt],x)});var rt=new Set;if(s.length>1){var gt=[],Lt=tt.filter(function(Tt){return Tt.css("display")=="none"});s.forEach(function(Tt,pt){var It=void 0;if(x.quality=="draft")It=J[pt].nodeIndexes;if(Tt.nodes().not(Lt).length>0){var St={};St.edges=[],St.nodes=[];var Ut=void 0;if(Tt.nodes().not(Lt).forEach(function(Ft){if(x.quality=="draft")if(!Ft.isParent())Ut=It.get(Ft.id()),St.nodes.push({x:J[pt].xCoords[Ut]-Ft.boundingbox().w/2,y:J[pt].yCoords[Ut]-Ft.boundingbox().h/2,width:Ft.boundingbox().w,height:Ft.boundingbox().h});else{var bt=i.calcBoundingBox(Ft,J[pt].xCoords,J[pt].yCoords,It);St.nodes.push({x:bt.topLeftX,y:bt.topLeftY,width:bt.width,height:bt.height})}else if(et[pt][Ft.id()])St.nodes.push({x:et[pt][Ft.id()].getLeft(),y:et[pt][Ft.id()].getTop(),width:et[pt][Ft.id()].getWidth(),height:et[pt][Ft.id()].getHeight()})}),Tt.edges().forEach(function(Ft){var bt=Ft.source(),Wt=Ft.target();if(bt.css("display")!="none"&&Wt.css("display")!="none"){if(x.quality=="draft"){var $t=It.get(bt.id()),ee=It.get(Wt.id()),Qt=[],jt=[];if(bt.isParent()){var qt=i.calcBoundingBox(bt,J[pt].xCoords,J[pt].yCoords,It);Qt.push(qt.topLeftX+qt.width/2),Qt.push(qt.topLeftY+qt.height/2)}else Qt.push(J[pt].xCoords[$t]),Qt.push(J[pt].yCoords[$t]);if(Wt.isParent()){var K=i.calcBoundingBox(Wt,J[pt].xCoords,J[pt].yCoords,It);jt.push(K.topLeftX+K.width/2),jt.push(K.topLeftY+K.height/2)}else jt.push(J[pt].xCoords[ee]),jt.push(J[pt].yCoords[ee]);St.edges.push({startX:Qt[0],startY:Qt[1],endX:jt[0],endY:jt[1]})}else if(et[pt][bt.id()]&&et[pt][Wt.id()])St.edges.push({startX:et[pt][bt.id()].getCenterX(),startY:et[pt][bt.id()].getCenterY(),endX:et[pt][Wt.id()].getCenterX(),endY:et[pt][Wt.id()].getCenterY()})}}),St.nodes.length>0)gt.push(St),rt.add(pt)}});var Gt=M.packComponents(gt,x.randomize).shifts;if(x.quality=="draft")J.forEach(function(Tt,pt){var It=Tt.xCoords.map(function(Ut){return Ut+Gt[pt].dx}),St=Tt.yCoords.map(function(Ut){return Ut+Gt[pt].dy});Tt.xCoords=It,Tt.yCoords=St});else{var Zt=0;rt.forEach(function(Tt){Object.keys(et[Tt]).forEach(function(pt){var It=et[Tt][pt];It.setCenter(It.getCenterX()+Gt[Zt].dx,It.getCenterY()+Gt[Zt].dy)}),Zt++})}}}var ct=function(pt,It){if(x.quality=="default"||x.quality=="proof"){if(typeof pt==="number")pt=It;var St=void 0,Ut=void 0,Ft=pt.data("id");if(et.forEach(function(Wt){if(Ft in Wt)St={x:Wt[Ft].getRect().getCenterX(),y:Wt[Ft].getRect().getCenterY()},Ut=Wt[Ft]}),x.nodeDimensionsIncludeLabels){if(Ut.labelWidth){if(Ut.labelPosHorizontal=="left")St.x+=Ut.labelWidth/2;else if(Ut.labelPosHorizontal=="right")St.x-=Ut.labelWidth/2}if(Ut.labelHeight){if(Ut.labelPosVertical=="top")St.y+=Ut.labelHeight/2;else if(Ut.labelPosVertical=="bottom")St.y-=Ut.labelHeight/2}}if(St==null)St={x:pt.position("x"),y:pt.position("y")};return{x:St.x,y:St.y}}else{var bt=void 0;if(J.forEach(function(Wt){var $t=Wt.nodeIndexes.get(pt.id());if($t!=null)bt={x:Wt.xCoords[$t],y:Wt.yCoords[$t]}}),bt==null)bt={x:pt.position("x"),y:pt.position("y")};return{x:bt.x,y:bt.y}}};if(x.quality=="default"||x.quality=="proof"||x.randomize){var Kt=i.calcParentsWithoutChildren(B,tt),Ht=tt.filter(function(Tt){return Tt.css("display")=="none"});if(x.eles=tt.not(Ht),tt.nodes().not(":parent").not(Ht).layoutPositions(H,x,ct),Kt.length>0)Kt.forEach(function(Tt){Tt.position(ct(Tt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),N}();o.exports=T},657:(o,n,a)=>{var u=a(548),r=a(140).layoutBase.Matrix,y=a(140).layoutBase.SVD,i=function(g){var{cy:d,eles:c}=g,O=c.nodes(),T=c.nodes(":parent"),N=new Map,D=new Map,H=new Map,x=[],B=[],tt=[],J=[],ft=[],G=[],et=[],s=[],L=void 0,E=void 0,M=1e8,m=0.000000001,{piTol:Y,samplingType:b,nodeSeparation:Q}=g,Z=void 0,W=function(){var nt=0,ot=0,st=!1;while(ot<Z){nt=Math.floor(Math.random()*E),st=!1;for(var ut=0;ut<ot;ut++)if(J[ut]==nt){st=!0;break}if(!st)J[ot]=nt,ot++;else continue}},ht=function(nt,ot,st){var ut=[],Dt=0,Ct=0,lt=0,wt=void 0,At=[],yt=0,xt=1;for(var Yt=0;Yt<E;Yt++)At[Yt]=M;ut[Ct]=nt,At[nt]=0;while(Ct>=Dt){lt=ut[Dt++];var Nt=x[lt];for(var mt=0;mt<Nt.length;mt++)if(wt=D.get(Nt[mt]),At[wt]==M)At[wt]=At[lt]+1,ut[++Ct]=wt;G[lt][ot]=At[lt]*Q}if(st){for(var Ot=0;Ot<E;Ot++)if(G[Ot][ot]<ft[Ot])ft[Ot]=G[Ot][ot];for(var Et=0;Et<E;Et++)if(ft[Et]>yt)yt=ft[Et],xt=Et}return xt},vt=function(nt){var ot=void 0;if(!nt){W();for(var st=0;st<Z;st++)ht(J[st],st,nt,!1)}else{ot=Math.floor(Math.random()*E),L=ot;for(var ut=0;ut<E;ut++)ft[ut]=M;for(var Dt=0;Dt<Z;Dt++)J[Dt]=ot,ot=ht(ot,Dt,nt)}for(var Ct=0;Ct<E;Ct++)for(var lt=0;lt<Z;lt++)G[Ct][lt]*=G[Ct][lt];for(var wt=0;wt<Z;wt++)et[wt]=[];for(var At=0;At<Z;At++)for(var yt=0;yt<Z;yt++)et[At][yt]=G[J[yt]][At]},k=function(){var nt=y.svd(et),{S:ot,U:st,V:ut}=nt,Dt=ot[0]*ot[0]*ot[0],Ct=[];for(var lt=0;lt<Z;lt++){Ct[lt]=[];for(var wt=0;wt<Z;wt++)if(Ct[lt][wt]=0,lt==wt)Ct[lt][wt]=ot[lt]/(ot[lt]*ot[lt]+Dt/(ot[lt]*ot[lt]))}s=r.multMat(r.multMat(ut,Ct),r.transpose(st))},dt=function(){var nt=void 0,ot=void 0,st=[],ut=[],Dt=[],Ct=[];for(var lt=0;lt<E;lt++)st[lt]=Math.random(),ut[lt]=Math.random();st=r.normalize(st),ut=r.normalize(ut);var wt=0,At=m,yt=m,xt=void 0;while(!0){wt++;for(var Yt=0;Yt<E;Yt++)Dt[Yt]=st[Yt];if(st=r.multGamma(r.multL(r.multGamma(Dt),G,s)),nt=r.dotProduct(Dt,st),st=r.normalize(st),At=r.dotProduct(Dt,st),xt=Math.abs(At/yt),xt<=1+Y&&xt>=1)break;yt=At}for(var Nt=0;Nt<E;Nt++)Dt[Nt]=st[Nt];wt=0,yt=m;while(!0){wt++;for(var mt=0;mt<E;mt++)Ct[mt]=ut[mt];if(Ct=r.minusOp(Ct,r.multCons(Dt,r.dotProduct(Dt,Ct))),ut=r.multGamma(r.multL(r.multGamma(Ct),G,s)),ot=r.dotProduct(Ct,ut),ut=r.normalize(ut),At=r.dotProduct(Ct,ut),xt=Math.abs(At/yt),xt<=1+Y&&xt>=1)break;yt=At}for(var Ot=0;Ot<E;Ot++)Ct[Ot]=ut[Ot];B=r.multCons(Dt,Math.sqrt(Math.abs(nt))),tt=r.multCons(Ct,Math.sqrt(Math.abs(ot)))};u.connectComponents(d,c,u.getTopMostNodes(O),N),T.forEach(function(it){u.connectComponents(d,c,u.getTopMostNodes(it.descendants().intersection(c)),N)});var at=0;for(var S=0;S<O.length;S++)if(!O[S].isParent())D.set(O[S].id(),at++);var _=!0,rt=!1,gt=void 0;try{for(var Lt=N.keys()[Symbol.iterator](),Gt;!(_=(Gt=Lt.next()).done);_=!0){var Zt=Gt.value;D.set(Zt,at++)}}catch(it){rt=!0,gt=it}finally{try{if(!_&&Lt.return)Lt.return()}finally{if(rt)throw gt}}for(var ct=0;ct<D.size;ct++)x[ct]=[];T.forEach(function(it){var nt=it.children().intersection(c);while(nt.nodes(":childless").length==0)nt=nt.nodes()[0].children().intersection(c);var ot=0,st=nt.nodes(":childless")[0].connectedEdges().length;nt.nodes(":childless").forEach(function(ut,Dt){if(ut.connectedEdges().length<st)st=ut.connectedEdges().length,ot=Dt}),H.set(it.id(),nt.nodes(":childless")[ot].id())}),O.forEach(function(it){var nt=void 0;if(it.isParent())nt=D.get(H.get(it.id()));else nt=D.get(it.id());it.neighborhood().nodes().forEach(function(ot){if(c.intersection(it.edgesWith(ot)).length>0)if(ot.isParent())x[nt].push(H.get(ot.id()));else x[nt].push(ot.id())})});var Kt=function(nt){var ot=D.get(nt),st=void 0;N.get(nt).forEach(function(ut){if(d.getElementById(ut).isParent())st=H.get(ut);else st=ut;x[ot].push(st),x[D.get(st)].push(nt)})},Ht=!0,Tt=!1,pt=void 0;try{for(var It=N.keys()[Symbol.iterator](),St;!(Ht=(St=It.next()).done);Ht=!0){var Ut=St.value;Kt(Ut)}}catch(it){Tt=!0,pt=it}finally{try{if(!Ht&&It.return)It.return()}finally{if(Tt)throw pt}}E=D.size;var Ft=void 0;if(E>2){Z=E<g.sampleSize?E:g.sampleSize;for(var bt=0;bt<E;bt++)G[bt]=[];for(var Wt=0;Wt<Z;Wt++)s[Wt]=[];if(g.quality=="draft"||g.step=="all")vt(b),k(),dt(),Ft={nodeIndexes:D,xCoords:B,yCoords:tt};else D.forEach(function(it,nt){B.push(d.getElementById(nt).position("x")),tt.push(d.getElementById(nt).position("y"))}),Ft={nodeIndexes:D,xCoords:B,yCoords:tt};return Ft}else{var $t=D.keys(),ee=d.getElementById($t.next().value),Qt=ee.position(),jt=ee.outerWidth();if(B.push(Qt.x),tt.push(Qt.y),E==2){var qt=d.getElementById($t.next().value),K=qt.outerWidth();B.push(Qt.x+jt/2+K/2+g.idealEdgeLength),tt.push(Qt.y)}return Ft={nodeIndexes:D,xCoords:B,yCoords:tt},Ft}};o.exports={spectralLayout:i}},579:(o,n,a)=>{var u=a(212),r=function(i){if(!i)return;i("layout","fcose",u)};if(typeof cytoscape<"u")r(cytoscape);o.exports=r},140:(o)=>{o.exports=w}},A={};function v(o){var n=A[o];if(n!==void 0)return n.exports;var a=A[o]={exports:{}};return I[o](a,a.exports,v),a.exports}var f=v(579);return f})()})});var je=dn($e(),1);var Be={L:"left",R:"right",T:"top",B:"bottom"},Ze={L:t((w)=>`${w},${w/2} 0,${w} 0,0`,"L"),R:t((w)=>`0,${w/2} ${w},0 ${w},${w}`,"R"),T:t((w)=>`0,0 ${w},0 ${w/2},${w}`,"T"),B:t((w)=>`${w/2},0 ${w},${w} 0,${w}`,"B")},Me={L:t((w,I)=>w-I+2,"L"),R:t((w,I)=>w-2,"R"),T:t((w,I)=>w-I+2,"T"),B:t((w,I)=>w-2,"B")},lr=t(function(w){if(te(w))return w==="L"?"R":"L";else return w==="T"?"B":"T"},"getOppositeArchitectureDirection"),ke=t(function(w){let I=w;return I==="L"||I==="R"||I==="T"||I==="B"},"isArchitectureDirection"),te=t(function(w){let I=w;return I==="L"||I==="R"},"isArchitectureDirectionX"),he=t(function(w){let I=w;return I==="T"||I==="B"},"isArchitectureDirectionY"),Ye=t(function(w,I){let A=te(w)&&he(I),v=he(w)&&te(I);return A||v},"isArchitectureDirectionXY"),fr=t(function(w){let I=w[0],A=w[1],v=te(I)&&he(A),f=he(I)&&te(A);return v||f},"isArchitecturePairXY"),cr=t(function(w){return w!=="LL"&&w!=="RR"&&w!=="TT"&&w!=="BB"},"isValidArchitectureDirectionPair"),Ge=t(function(w,I){let A=`${w}${I}`;return cr(A)?A:void 0},"getArchitectureDirectionPair"),gr=t(function([w,I],A){let v=A[0],f=A[1];if(te(v))if(he(f))return[w+(v==="L"?-1:1),I+(f==="T"?1:-1)];else return[w+(v==="L"?-1:1),I];else if(te(f))return[w+(f==="L"?1:-1),I+(v==="T"?1:-1)];else return[w,I+(v==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ur=t(function(w){if(w==="LT"||w==="TL")return[1,1];else if(w==="BL"||w==="LB")return[1,-1];else if(w==="BR"||w==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),dr=t(function(w,I){if(Ye(w,I))return"bend";else if(te(w))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),vr=t(function(w){return w.type==="service"},"isArchitectureService"),pr=t(function(w){return w.type==="junction"},"isArchitectureJunction"),qe=t((w,I)=>{let[A,v]=[w,I].sort();return`${JSON.stringify(A)}-${JSON.stringify(v)}`},"architectureGroupAlignmentKey"),Qe=t((w)=>w.data(),"edgeData"),ye=t((w)=>w.data(),"nodeData"),yr=V.architecture,Je=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=F,this.getAccTitle=z,this.setDiagramTitle=q,this.getDiagramTitle=j,this.getAccDescription=U,this.setAccDescription=P,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(w){this.diagramId=w}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",R()}addService({id:w,icon:I,in:A,title:v,iconText:f}){if(this.registeredIds.has(w))throw Error(`The service id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(A!==void 0){if(w===A)throw Error(`The service [${w}] cannot be placed within itself`);if(!this.registeredIds.has(A))throw Error(`The service [${w}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(A)==="node")throw Error(`The service [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"service",icon:I,iconText:f,title:v,edges:[],in:A})}getServices(){return[...this.nodes.values()].filter(vr)}addJunction({id:w,in:I}){if(this.registeredIds.has(w))throw Error(`The junction id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(I!==void 0){if(w===I)throw Error(`The junction [${w}] cannot be placed within itself`);if(!this.registeredIds.has(I))throw Error(`The junction [${w}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(I)==="node")throw Error(`The junction [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"junction",edges:[],in:I})}getJunctions(){return[...this.nodes.values()].filter(pr)}getNodes(){return[...this.nodes.values()]}getNode(w){return this.nodes.get(w)??null}addGroup({id:w,icon:I,in:A,title:v}){if(this.registeredIds.has(w))throw Error(`The group id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(A!==void 0){if(w===A)throw Error(`The group [${w}] cannot be placed within itself`);if(!this.registeredIds.has(A))throw Error(`The group [${w}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(A)==="node")throw Error(`The group [${w}]'s parent is not a group`)}this.registeredIds.set(w,"group"),this.groups.set(w,{id:w,icon:I,title:v,in:A})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:w,rhsId:I,lhsDir:A,rhsDir:v,lhsInto:f,rhsInto:o,lhsGroup:n,rhsGroup:a,title:u}){if(!ke(A))throw Error(`Invalid direction given for left hand side of edge ${w}--${I}. Expected (L,R,T,B) got ${String(A)}`);if(!ke(v))throw Error(`Invalid direction given for right hand side of edge ${w}--${I}. Expected (L,R,T,B) got ${String(v)}`);if(!this.nodes.has(w)&&!this.groups.has(w))throw Error(`The left-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(I)&&!this.groups.has(I))throw Error(`The right-hand id [${I}] does not yet exist. Please create the service/group before declaring an edge to it.`);let r=this.nodes.get(w).in,y=this.nodes.get(I).in;if(n&&r&&y&&r==y)throw Error(`The left-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&r&&y&&r==y)throw Error(`The right-hand id [${I}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let i={lhsId:w,lhsDir:A,lhsInto:f,lhsGroup:n,rhsId:I,rhsDir:v,rhsInto:o,rhsGroup:a,title:u};this.edges.push(i);let e=this.nodes.get(w),g=this.nodes.get(I);if(e&&g)e.edges.push(this.edges[this.edges.length-1]),g.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(w){if(w.members.length<2)throw Error(`An align directive requires at least two members; got ${w.members.length}`);let I=new Set;w.members.forEach((A)=>{if(this.registeredIds.get(A)!=="node")throw Error(`align ${w.direction} references [${A}], which is not a service or junction`);if(I.has(A))throw Error(`align ${w.direction} lists [${A}] more than once`);I.add(A)}),this.layoutHints.push(w)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let w=new Map,I=new Map;for(let[n,a]of this.nodes.entries()){let u=new Map;for(let r of a.edges){let y=this.getNode(r.lhsId)?.in,i=this.getNode(r.rhsId)?.in;if(y&&i&&y!==i){let e=dr(r.lhsDir,r.rhsDir);if(e!=="bend")w.set(qe(y,i),e)}if(r.lhsId===n){let e=Ge(r.lhsDir,r.rhsDir);if(e)u.set(e,r.rhsId)}else{let e=Ge(r.rhsDir,r.lhsDir);if(e)u.set(e,r.lhsId)}}I.set(n,u)}let A=new Set,v=new Set(I.keys()),f=t((n)=>{let a=new Map([[n,[0,0]]]),u=[n];while(u.length>0){let r=u.shift();if(r){A.add(r),v.delete(r);let y=I.get(r);if(!y)throw Error(`BFS error: adjacency list for id ${r} not found. Please report this as a bug.`);let i=a.get(r);if(!i)throw Error(`BFS error: position for id ${r} not found in spatial map. Please report this as a bug.`);let[e,g]=i;y.forEach((d,c)=>{if(!A.has(d))a.set(d,gr([e,g],c)),u.push(d)})}}return a},"BFS"),o=[];while(v.size>0){let n=v.values().next().value;o.push(f(n))}this.dataStructures={adjList:I,spatialMaps:o,groupAlignments:w}}return this.dataStructures}setElementForId(w,I){this.elements.set(w,I)}getElementById(w){return this.elements.get(w)}getConfig(){return se({...yr,...C().architecture})}getConfigField(w){return this.getConfig()[w]}},mr=t((w,I)=>{be(w,I),w.groups.map((A)=>I.addGroup(A)),w.services.map((A)=>I.addService({...A,type:"service"})),w.junctions.map((A)=>I.addJunction({...A,type:"junction"})),w.edges.map((A)=>I.addEdge(A)),w.alignments?.map((A)=>I.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ke={parser:{yy:void 0},parse:t(async(w)=>{let I=await Te("architecture",w);l.debug(I);let A=Ke.parser?.yy;if(!(A instanceof Je))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");mr(I,A)},"parse")},Er=t((w)=>`
1
+ import{be}from"./index-hdd8nqz8.js";import{t,l,V,C,X,Or,R,F,z,P,U,q,j,p,h,ue,_f,Di,sr,se,kn,an}from"./index-y5ymgp20.js";import{Te}from"./index-8egjccbq.js";import{Mr}from"./index-fjnkzk12.js";import{dn,Cn}from"./index-t6gznaxm.js";var Re=Cn(function(me,Ie){(function(I,A){if(typeof me==="object"&&typeof Ie==="object")Ie.exports=A();else if(typeof define==="function"&&define.amd)define([],A);else if(typeof me==="object")me.layoutBase=A();else I.layoutBase=A()})(me,function(){return function(w){var I={};function A(v){if(I[v])return I[v].exports;var f=I[v]={i:v,l:!1,exports:{}};return w[v].call(f.exports,f,f.exports,A),f.l=!0,f.exports}return A.m=w,A.c=I,A.i=function(v){return v},A.d=function(v,f,o){if(!A.o(v,f))Object.defineProperty(v,f,{configurable:!1,enumerable:!0,get:o})},A.n=function(v){var f=v&&v.__esModule?function(){return v.default}:function(){return v};return A.d(f,"a",f),f},A.o=function(v,f){return Object.prototype.hasOwnProperty.call(v,f)},A.p="",A(A.s=28)}([function(w,I,A){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1000,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,w.exports=v},function(w,I,A){var v=A(2),f=A(8),o=A(9);function n(u,r,y){v.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=u,this.target=r}n.prototype=Object.create(v.prototype);for(var a in v)n[a]=v[a];n.prototype.getSource=function(){return this.source},n.prototype.getTarget=function(){return this.target},n.prototype.isInterGraph=function(){return this.isInterGraph},n.prototype.getLength=function(){return this.length},n.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},n.prototype.getBendpoints=function(){return this.bendpoints},n.prototype.getLca=function(){return this.lca},n.prototype.getSourceInLca=function(){return this.sourceInLca},n.prototype.getTargetInLca=function(){return this.targetInLca},n.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;else if(this.target===u)return this.source;else throw"Node is not incident with this edge"},n.prototype.getOtherEndInGraph=function(u,r){var y=this.getOtherEnd(u),i=r.getGraphManager().getRoot();while(!0){if(y.getOwner()==r)return y;if(y.getOwner()==i)break;y=y.getOwner().getParent()}return null},n.prototype.updateLength=function(){var u=[,,,,];if(this.isOverlapingSourceAndTarget=f.getIntersection(this.target.getRect(),this.source.getRect(),u),!this.isOverlapingSourceAndTarget){if(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1)this.lengthX=o.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=o.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},n.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=o.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=o.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=n},function(w,I,A){function v(f){this.vGraphObject=f}w.exports=v},function(w,I,A){var v=A(2),f=A(10),o=A(13),n=A(0),a=A(16),u=A(5);function r(i,e,g,d){if(g==null&&d==null)d=e;if(v.call(this,d),i.graphManager!=null)i=i.graphManager;if(this.estimatedSize=f.MIN_VALUE,this.inclusionTreeDepth=f.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=i,g!=null&&e!=null)this.rect=new o(e.x,e.y,g.width,g.height);else this.rect=new o}r.prototype=Object.create(v.prototype);for(var y in v)r[y]=v[y];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(i){this.rect.width=i},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(i){this.rect.height=i},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(i,e){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=e.width,this.rect.height=e.height},r.prototype.setCenter=function(i,e){this.rect.x=i-this.rect.width/2,this.rect.y=e-this.rect.height/2},r.prototype.setLocation=function(i,e){this.rect.x=i,this.rect.y=e},r.prototype.moveBy=function(i,e){this.rect.x+=i,this.rect.y+=e},r.prototype.getEdgeListToNode=function(i){var e=[],g,d=this;return d.edges.forEach(function(c){if(c.target==i){if(c.source!=d)throw"Incorrect edge source!";e.push(c)}}),e},r.prototype.getEdgesBetween=function(i){var e=[],g,d=this;return d.edges.forEach(function(c){if(!(c.source==d||c.target==d))throw"Incorrect edge source and/or target";if(c.target==i||c.source==i)e.push(c)}),e},r.prototype.getNeighborsList=function(){var i=new Set,e=this;return e.edges.forEach(function(g){if(g.source==e)i.add(g.target);else{if(g.target!=e)throw"Incorrect incidency!";i.add(g.source)}}),i},r.prototype.withChildren=function(){var i=new Set,e,g;if(i.add(this),this.child!=null){var d=this.child.getNodes();for(var c=0;c<d.length;c++)e=d[c],g=e.withChildren(),g.forEach(function(O){i.add(O)})}return i},r.prototype.getNoOfChildren=function(){var i=0,e;if(this.child==null)i=1;else{var g=this.child.getNodes();for(var d=0;d<g.length;d++)e=g[d],i+=e.getNoOfChildren()}if(i==0)i=1;return i},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==f.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},r.prototype.scatter=function(){var i,e,g=-n.INITIAL_WORLD_BOUNDARY,d=n.INITIAL_WORLD_BOUNDARY;i=n.WORLD_CENTER_X+a.nextDouble()*(d-g)+g;var c=-n.INITIAL_WORLD_BOUNDARY,O=n.INITIAL_WORLD_BOUNDARY;e=n.WORLD_CENTER_Y+a.nextDouble()*(O-c)+c,this.rect.x=i,this.rect.y=e},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),n.NODE_DIMENSIONS_INCLUDE_LABELS){var e=i.getRight()-i.getLeft(),g=i.getBottom()-i.getTop();if(this.labelWidth){if(this.labelPosHorizontal=="left")this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth);else if(this.labelPosHorizontal=="center"&&this.labelWidth>e)this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth);else if(this.labelPosHorizontal=="right")this.setWidth(e+this.labelWidth)}if(this.labelHeight){if(this.labelPosVertical=="top")this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight);else if(this.labelPosVertical=="center"&&this.labelHeight>g)this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight);else if(this.labelPosVertical=="bottom")this.setHeight(g+this.labelHeight)}}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==f.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(i){var e=this.rect.x;if(e>n.WORLD_BOUNDARY)e=n.WORLD_BOUNDARY;else if(e<-n.WORLD_BOUNDARY)e=-n.WORLD_BOUNDARY;var g=this.rect.y;if(g>n.WORLD_BOUNDARY)g=n.WORLD_BOUNDARY;else if(g<-n.WORLD_BOUNDARY)g=-n.WORLD_BOUNDARY;var d=new u(e,g),c=i.inverseTransformPoint(d);this.setLocation(c.x,c.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},w.exports=r},function(w,I,A){var v=A(0);function f(){}for(var o in v)f[o]=v[o];f.MAX_ITERATIONS=2500,f.DEFAULT_EDGE_LENGTH=50,f.DEFAULT_SPRING_STRENGTH=0.45,f.DEFAULT_REPULSION_STRENGTH=4500,f.DEFAULT_GRAVITY_STRENGTH=0.4,f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,f.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,f.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,f.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,f.COOLING_ADAPTATION_FACTOR=0.33,f.ADAPTATION_LOWER_NODE_LIMIT=1000,f.ADAPTATION_UPPER_NODE_LIMIT=5000,f.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,f.MAX_NODE_DISPLACEMENT=f.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,f.CONVERGENCE_CHECK_PERIOD=100,f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,f.MIN_EDGE_LENGTH=1,f.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=f},function(w,I,A){function v(f,o){if(f==null&&o==null)this.x=0,this.y=0;else this.x=f,this.y=o}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(f){this.x=f},v.prototype.setY=function(f){this.y=f},v.prototype.getDifference=function(f){return new DimensionD(this.x-f.x,this.y-f.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(f){return this.x+=f.width,this.y+=f.height,this},w.exports=v},function(w,I,A){var v=A(2),f=A(10),o=A(0),n=A(7),a=A(3),u=A(1),r=A(13),y=A(12),i=A(11);function e(d,c,O){if(v.call(this,O),this.estimatedSize=f.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,c!=null&&c instanceof n)this.graphManager=c;else if(c!=null&&c instanceof Layout)this.graphManager=c.graphManager}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getNodes=function(){return this.nodes},e.prototype.getEdges=function(){return this.edges},e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getParent=function(){return this.parent},e.prototype.getLeft=function(){return this.left},e.prototype.getRight=function(){return this.right},e.prototype.getTop=function(){return this.top},e.prototype.getBottom=function(){return this.bottom},e.prototype.isConnected=function(){return this.isConnected},e.prototype.add=function(d,c,O){if(c==null&&O==null){var T=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(T)>-1)throw"Node already in graph!";return T.owner=this,this.getNodes().push(T),T}else{var N=d;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(O)>-1))throw"Source or target not in graph!";if(!(c.owner==O.owner&&c.owner==this))throw"Both owners must be this graph!";if(c.owner!=O.owner)return null;if(N.source=c,N.target=O,N.isInterGraph=!1,this.getEdges().push(N),c.edges.push(N),O!=c)O.edges.push(N);return N}},e.prototype.remove=function(d){var c=d;if(d instanceof a){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var O=c.edges.slice(),T,N=O.length;for(var D=0;D<N;D++)if(T=O[D],T.isInterGraph)this.graphManager.remove(T);else T.source.owner.remove(T);var H=this.nodes.indexOf(c);if(H==-1)throw"Node not in owner node list!";this.nodes.splice(H,1)}else if(d instanceof u){var T=d;if(T==null)throw"Edge is null!";if(!(T.source!=null&&T.target!=null))throw"Source and/or target is null!";if(!(T.source.owner!=null&&T.target.owner!=null&&T.source.owner==this&&T.target.owner==this))throw"Source and/or target owner is invalid!";var x=T.source.edges.indexOf(T),B=T.target.edges.indexOf(T);if(!(x>-1&&B>-1))throw"Source and/or target doesn't know this edge!";if(T.source.edges.splice(x,1),T.target!=T.source)T.target.edges.splice(B,1);var H=T.source.owner.getEdges().indexOf(T);if(H==-1)throw"Not in owner's edge list!";T.source.owner.getEdges().splice(H,1)}},e.prototype.updateLeftTop=function(){var{MAX_VALUE:d,MAX_VALUE:c}=f,O,T,N,D=this.getNodes(),H=D.length;for(var x=0;x<H;x++){var B=D[x];if(O=B.getTop(),T=B.getLeft(),d>O)d=O;if(c>T)c=T}if(d==f.MAX_VALUE)return null;if(D[0].getParent().paddingLeft!=null)N=D[0].getParent().paddingLeft;else N=this.margin;return this.left=c-N,this.top=d-N,new y(this.left,this.top)},e.prototype.updateBounds=function(d){var c=f.MAX_VALUE,O=-f.MAX_VALUE,T=f.MAX_VALUE,N=-f.MAX_VALUE,D,H,x,B,tt,J=this.nodes,ft=J.length;for(var G=0;G<ft;G++){var et=J[G];if(d&&et.child!=null)et.updateBounds();if(D=et.getLeft(),H=et.getRight(),x=et.getTop(),B=et.getBottom(),c>D)c=D;if(O<H)O=H;if(T>x)T=x;if(N<B)N=B}var s=new r(c,T,O-c,N-T);if(c==f.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(J[0].getParent().paddingLeft!=null)tt=J[0].getParent().paddingLeft;else tt=this.margin;this.left=s.x-tt,this.right=s.x+s.width+tt,this.top=s.y-tt,this.bottom=s.y+s.height+tt},e.calculateBounds=function(d){var c=f.MAX_VALUE,O=-f.MAX_VALUE,T=f.MAX_VALUE,N=-f.MAX_VALUE,D,H,x,B,tt=d.length;for(var J=0;J<tt;J++){var ft=d[J];if(D=ft.getLeft(),H=ft.getRight(),x=ft.getTop(),B=ft.getBottom(),c>D)c=D;if(O<H)O=H;if(T>x)T=x;if(N<B)N=B}var G=new r(c,T,O-c,N-T);return G},e.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==f.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){var d=0,c=this.nodes,O=c.length;for(var T=0;T<O;T++){var N=c[T];d+=N.calcEstimatedSize()}if(d==0)this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=d/Math.sqrt(this.nodes.length);return this.estimatedSize},e.prototype.updateConnected=function(){var d=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new i,O=new Set,T=this.nodes[0],N,D,H=T.withChildren();H.forEach(function(G){c.push(G),O.add(G)});while(c.length!==0){T=c.shift(),N=T.getEdges();var x=N.length;for(var B=0;B<x;B++){var tt=N[B];if(D=tt.getOtherEndInGraph(T,this),D!=null&&!O.has(D)){var J=D.withChildren();J.forEach(function(G){c.push(G),O.add(G)})}}}if(this.isConnected=!1,O.size>=this.nodes.length){var ft=0;if(O.forEach(function(G){if(G.owner==d)ft++}),ft==this.nodes.length)this.isConnected=!0}},w.exports=e},function(w,I,A){var v,f=A(1);function o(n){v=A(6),this.layout=n,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var n=this.layout.newGraph(),a=this.layout.newNode(null),u=this.add(n,a);return this.setRootGraph(u),this.rootGraph},o.prototype.add=function(n,a,u,r,y){if(u==null&&r==null&&y==null){if(n==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(n)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(n),n.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return n.parent=a,a.child=n,n}else{y=u,r=a,u=n;var i=r.getOwner(),e=y.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(e!=null&&e.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==e)return u.isInterGraph=!1,i.add(u,r,y);else{if(u.isInterGraph=!0,u.source=r,u.target=y,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}}},o.prototype.remove=function(n){if(n instanceof v){var a=n;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(a.getEdges());var r,y=u.length;for(var i=0;i<y;i++)r=u[i],a.remove(r);var e=[];e=e.concat(a.getNodes());var g;y=e.length;for(var i=0;i<y;i++)g=e[i],a.remove(g);if(a==this.rootGraph)this.setRootGraph(null);var d=this.graphs.indexOf(a);this.graphs.splice(d,1),a.parent=null}else if(n instanceof f){if(r=n,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var d=r.source.edges.indexOf(r);if(r.source.edges.splice(d,1),d=r.target.edges.indexOf(r),r.target.edges.splice(d,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var d=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(d,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){var n=[],a=this.getGraphs(),u=a.length;for(var r=0;r<u;r++)n=n.concat(a[r].getNodes());this.allNodes=n}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var n=[],a=this.getGraphs(),u=a.length;for(var r=0;r<a.length;r++)n=n.concat(a[r].getEdges());n=n.concat(this.edges),this.allEdges=n}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(n){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=n},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(n){if(n.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=n,n.parent==null)n.parent=this.layout.newNode("Root node")},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(n,a){if(!(n!=null&&a!=null))throw"assert failed";if(n==a)return!0;var u=n.getOwner(),r;do{if(r=u.getParent(),r==null)break;if(r==a)return!0;if(u=r.getOwner(),u==null)break}while(!0);u=a.getOwner();do{if(r=u.getParent(),r==null)break;if(r==n)return!0;if(u=r.getOwner(),u==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){var n,a,u,r,y,i=this.getAllEdges(),e=i.length;for(var g=0;g<e;g++){if(n=i[g],a=n.source,u=n.target,n.lca=null,n.sourceInLca=a,n.targetInLca=u,a==u){n.lca=a.getOwner();continue}r=a.getOwner();while(n.lca==null){n.targetInLca=u,y=u.getOwner();while(n.lca==null){if(y==r){n.lca=y;break}if(y==this.rootGraph)break;if(n.lca!=null)throw"assert failed";n.targetInLca=y.getParent(),y=n.targetInLca.getOwner()}if(r==this.rootGraph)break;if(n.lca==null)n.sourceInLca=r.getParent(),r=n.sourceInLca.getOwner()}if(n.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(n,a){if(n==a)return n.getOwner();var u=n.getOwner();do{if(u==null)break;var r=a.getOwner();do{if(r==null)break;if(r==u)return r;r=r.getParent().getOwner()}while(!0);u=u.getParent().getOwner()}while(!0);return u},o.prototype.calcInclusionTreeDepths=function(n,a){if(n==null&&a==null)n=this.rootGraph,a=1;var u,r=n.getNodes(),y=r.length;for(var i=0;i<y;i++)if(u=r[i],u.inclusionTreeDepth=a,u.child!=null)this.calcInclusionTreeDepths(u.child,a+1)},o.prototype.includesInvalidEdge=function(){var n,a=[],u=this.edges.length;for(var r=0;r<u;r++)if(n=this.edges[r],this.isOneAncestorOfOther(n.source,n.target))a.push(n);for(var r=0;r<a.length;r++)this.remove(a[r]);return!1},w.exports=o},function(w,I,A){var v=A(12);function f(){}f.calcSeparationAmount=function(o,n,a,u){if(!o.intersects(n))throw"assert failed";var r=[,,];if(this.decideDirectionsForOverlappingNodes(o,n,r),a[0]=Math.min(o.getRight(),n.getRight())-Math.max(o.x,n.x),a[1]=Math.min(o.getBottom(),n.getBottom())-Math.max(o.y,n.y),o.getX()<=n.getX()&&o.getRight()>=n.getRight())a[0]+=Math.min(n.getX()-o.getX(),o.getRight()-n.getRight());else if(n.getX()<=o.getX()&&n.getRight()>=o.getRight())a[0]+=Math.min(o.getX()-n.getX(),n.getRight()-o.getRight());if(o.getY()<=n.getY()&&o.getBottom()>=n.getBottom())a[1]+=Math.min(n.getY()-o.getY(),o.getBottom()-n.getBottom());else if(n.getY()<=o.getY()&&n.getBottom()>=o.getBottom())a[1]+=Math.min(o.getY()-n.getY(),n.getBottom()-o.getBottom());var y=Math.abs((n.getCenterY()-o.getCenterY())/(n.getCenterX()-o.getCenterX()));if(n.getCenterY()===o.getCenterY()&&n.getCenterX()===o.getCenterX())y=1;var i=y*a[0],e=a[1]/y;if(a[0]<e)e=a[0];else i=a[1];a[0]=-1*r[0]*(e/2+u),a[1]=-1*r[1]*(i/2+u)},f.decideDirectionsForOverlappingNodes=function(o,n,a){if(o.getCenterX()<n.getCenterX())a[0]=-1;else a[0]=1;if(o.getCenterY()<n.getCenterY())a[1]=-1;else a[1]=1},f.getIntersection2=function(o,n,a){var u=o.getCenterX(),r=o.getCenterY(),y=n.getCenterX(),i=n.getCenterY();if(o.intersects(n))return a[0]=u,a[1]=r,a[2]=y,a[3]=i,!0;var e=o.getX(),g=o.getY(),d=o.getRight(),c=o.getX(),O=o.getBottom(),T=o.getRight(),N=o.getWidthHalf(),D=o.getHeightHalf(),H=n.getX(),x=n.getY(),B=n.getRight(),tt=n.getX(),J=n.getBottom(),ft=n.getRight(),G=n.getWidthHalf(),et=n.getHeightHalf(),s=!1,L=!1;if(u===y){if(r>i)return a[0]=u,a[1]=g,a[2]=y,a[3]=J,!1;else if(r<i)return a[0]=u,a[1]=O,a[2]=y,a[3]=x,!1}else if(r===i){if(u>y)return a[0]=e,a[1]=r,a[2]=B,a[3]=i,!1;else if(u<y)return a[0]=d,a[1]=r,a[2]=H,a[3]=i,!1}else{var E=o.height/o.width,M=n.height/n.width,m=(i-r)/(y-u),Y=void 0,b=void 0,Q=void 0,Z=void 0,W=void 0,ht=void 0;if(-E===m)if(u>y)a[0]=c,a[1]=O,s=!0;else a[0]=d,a[1]=g,s=!0;else if(E===m)if(u>y)a[0]=e,a[1]=g,s=!0;else a[0]=T,a[1]=O,s=!0;if(-M===m)if(y>u)a[2]=tt,a[3]=J,L=!0;else a[2]=B,a[3]=x,L=!0;else if(M===m)if(y>u)a[2]=H,a[3]=x,L=!0;else a[2]=ft,a[3]=J,L=!0;if(s&&L)return!1;if(u>y)if(r>i)Y=this.getCardinalDirection(E,m,4),b=this.getCardinalDirection(M,m,2);else Y=this.getCardinalDirection(-E,m,3),b=this.getCardinalDirection(-M,m,1);else if(r>i)Y=this.getCardinalDirection(-E,m,1),b=this.getCardinalDirection(-M,m,3);else Y=this.getCardinalDirection(E,m,2),b=this.getCardinalDirection(M,m,4);if(!s)switch(Y){case 1:Z=g,Q=u+-D/m,a[0]=Q,a[1]=Z;break;case 2:Q=T,Z=r+N*m,a[0]=Q,a[1]=Z;break;case 3:Z=O,Q=u+D/m,a[0]=Q,a[1]=Z;break;case 4:Q=c,Z=r+-N*m,a[0]=Q,a[1]=Z;break}if(!L)switch(b){case 1:ht=x,W=y+-et/m,a[2]=W,a[3]=ht;break;case 2:W=ft,ht=i+G*m,a[2]=W,a[3]=ht;break;case 3:ht=J,W=y+et/m,a[2]=W,a[3]=ht;break;case 4:W=tt,ht=i+-G*m,a[2]=W,a[3]=ht;break}}return!1},f.getCardinalDirection=function(o,n,a){if(o>n)return a;else return 1+a%4},f.getIntersection=function(o,n,a,u){if(u==null)return this.getIntersection2(o,n,a);var{x:r,y}=o,{x:i,y:e}=n,{x:g,y:d}=a,{x:c,y:O}=u,T=void 0,N=void 0,D=void 0,H=void 0,x=void 0,B=void 0,tt=void 0,J=void 0,ft=void 0;if(D=e-y,x=r-i,tt=i*y-r*e,H=O-d,B=g-c,J=c*d-g*O,ft=D*B-H*x,ft===0)return null;return T=(x*J-B*tt)/ft,N=(H*tt-D*J)/ft,new v(T,N)},f.angleOfVector=function(o,n,a,u){var r=void 0;if(o!==a){if(r=Math.atan((u-n)/(a-o)),a<o)r+=Math.PI;else if(u<n)r+=this.TWO_PI}else if(u<n)r=this.ONE_AND_HALF_PI;else r=this.HALF_PI;return r},f.doIntersect=function(o,n,a,u){var{x:r,y}=o,{x:i,y:e}=n,{x:g,y:d}=a,{x:c,y:O}=u,T=(i-r)*(O-d)-(c-g)*(e-y);if(T===0)return!1;else{var N=((O-d)*(c-r)+(g-c)*(O-y))/T,D=((y-e)*(c-r)+(i-r)*(O-y))/T;return 0<N&&N<1&&0<D&&D<1}},f.findCircleLineIntersections=function(o,n,a,u,r,y,i){var e=(a-o)*(a-o)+(u-n)*(u-n),g=2*((o-r)*(a-o)+(n-y)*(u-n)),d=(o-r)*(o-r)+(n-y)*(n-y)-i*i,c=g*g-4*e*d;if(c>=0){var O=(-g+Math.sqrt(g*g-4*e*d))/(2*e),T=(-g-Math.sqrt(g*g-4*e*d))/(2*e),N=null;if(O>=0&&O<=1)return[O];if(T>=0&&T<=1)return[T];return N}else return null},f.HALF_PI=0.5*Math.PI,f.ONE_AND_HALF_PI=1.5*Math.PI,f.TWO_PI=2*Math.PI,f.THREE_PI=3*Math.PI,w.exports=f},function(w,I,A){function v(){}v.sign=function(f){if(f>0)return 1;else if(f<0)return-1;else return 0},v.floor=function(f){return f<0?Math.ceil(f):Math.floor(f)},v.ceil=function(f){return f<0?Math.floor(f):Math.ceil(f)},w.exports=v},function(w,I,A){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,w.exports=v},function(w,I,A){var v=function(){function r(y,i){for(var e=0;e<i.length;e++){var g=i[e];if(g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g)g.writable=!0;Object.defineProperty(y,g.key,g)}}return function(y,i,e){if(i)r(y.prototype,i);if(e)r(y,e);return y}}();function f(r,y){if(!(r instanceof y))throw TypeError("Cannot call a class as a function")}var o=function(y){return{value:y,next:null,prev:null}},n=function(y,i,e,g){if(y!==null)y.next=i;else g.head=i;if(e!==null)e.prev=i;else g.tail=i;return i.prev=y,i.next=e,g.length++,i},a=function(y,i){var{prev:e,next:g}=y;if(e!==null)e.next=g;else i.head=g;if(g!==null)g.prev=e;else i.tail=e;return y.prev=y.next=null,i.length--,y},u=function(){function r(y){var i=this;if(f(this,r),this.length=0,this.head=null,this.tail=null,y!=null)y.forEach(function(e){return i.push(e)})}return v(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,e){return n(e.prev,o(i),e,this)}},{key:"insertAfter",value:function(i,e){return n(e,o(i),e.next,this)}},{key:"insertNodeBefore",value:function(i,e){return n(e.prev,i,e,this)}},{key:"insertNodeAfter",value:function(i,e){return n(e,i,e.next,this)}},{key:"push",value:function(i){return n(this.tail,o(i),null,this)}},{key:"unshift",value:function(i){return n(null,o(i),this.head,this)}},{key:"remove",value:function(i){return a(i,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){var e=1,g=this.head;while(e<i)g=g.next,e++;return g.value}}},{key:"set_object_at",value:function(i,e){if(i<=this.length()){var g=1,d=this.head;while(g<i)d=d.next,g++;d.value=e}}}]),r}();w.exports=u},function(w,I,A){function v(f,o,n){if(this.x=null,this.y=null,f==null&&o==null&&n==null)this.x=0,this.y=0;else if(typeof f=="number"&&typeof o=="number"&&n==null)this.x=f,this.y=o;else if(f.constructor.name=="Point"&&o==null&&n==null)n=f,this.x=n.x,this.y=n.y}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(f,o,n){if(f.constructor.name=="Point"&&o==null&&n==null)n=f,this.setLocation(n.x,n.y);else if(typeof f=="number"&&typeof o=="number"&&n==null)if(parseInt(f)==f&&parseInt(o)==o)this.move(f,o);else this.x=Math.floor(f+0.5),this.y=Math.floor(o+0.5)},v.prototype.move=function(f,o){this.x=f,this.y=o},v.prototype.translate=function(f,o){this.x+=f,this.y+=o},v.prototype.equals=function(f){if(f.constructor.name=="Point"){var o=f;return this.x==o.x&&this.y==o.y}return this==f},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},w.exports=v},function(w,I,A){function v(f,o,n,a){if(this.x=0,this.y=0,this.width=0,this.height=0,f!=null&&o!=null&&n!=null&&a!=null)this.x=f,this.y=o,this.width=n,this.height=a}v.prototype.getX=function(){return this.x},v.prototype.setX=function(f){this.x=f},v.prototype.getY=function(){return this.y},v.prototype.setY=function(f){this.y=f},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(f){this.width=f},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(f){this.height=f},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(f){if(this.getRight()<f.x)return!1;if(this.getBottom()<f.y)return!1;if(f.getRight()<this.x)return!1;if(f.getBottom()<this.y)return!1;return!0},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},w.exports=v},function(w,I,A){var v=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol==="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function f(){}f.lastID=0,f.createID=function(o){if(f.isPrimitive(o))return o;if(o.uniqueID!=null)return o.uniqueID;return o.uniqueID=f.getString(),f.lastID++,o.uniqueID},f.getString=function(o){if(o==null)o=f.lastID;return"Object#"+o},f.isPrimitive=function(o){var n=typeof o>"u"?"undefined":v(o);return o==null||n!="object"&&n!="function"},w.exports=f},function(w,I,A){function v(g){if(Array.isArray(g)){for(var d=0,c=Array(g.length);d<g.length;d++)c[d]=g[d];return c}else return Array.from(g)}var f=A(0),o=A(7),n=A(3),a=A(1),u=A(6),r=A(5),y=A(17),i=A(29);function e(g){if(i.call(this),this.layoutQuality=f.QUALITY,this.createBendsAsNeeded=f.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=f.DEFAULT_INCREMENTAL,this.animationOnLayout=f.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=f.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=f.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=f.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null)this.isRemoteUse=g}e.RANDOM_SEED=1,e.prototype=Object.create(i.prototype),e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},e.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},e.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},e.prototype.newGraphManager=function(){var g=new o(this);return this.graphManager=g,g},e.prototype.newGraph=function(g){return new u(null,this.graphManager,g)},e.prototype.newNode=function(g){return new n(this.graphManager,g)},e.prototype.newEdge=function(g){return new a(null,null,g)},e.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},e.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var g;if(this.checkLayoutSuccess())g=!1;else g=this.layout();if(f.ANIMATE==="during")return!1;if(g){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,g},e.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},e.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var g,d=this.graphManager.getAllEdges();for(var c=0;c<d.length;c++)g=d[c];var O,T=this.graphManager.getRoot().getNodes();for(var c=0;c<T.length;c++)O=T[c];this.update(this.graphManager.getRoot())}},e.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof n){var d=g;if(d.getChild()!=null){var c=d.getChild().getNodes();for(var O=0;O<c.length;O++)update(c[O])}if(d.vGraphObject!=null){var T=d.vGraphObject;T.update(d)}}else if(g instanceof a){var N=g;if(N.vGraphObject!=null){var D=N.vGraphObject;D.update(N)}}else if(g instanceof u){var H=g;if(H.vGraphObject!=null){var x=H.vGraphObject;x.update(H)}}},e.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=f.QUALITY,this.animationDuringLayout=f.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=f.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=f.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=f.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=f.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=f.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},e.prototype.transform=function(g){if(g==null)this.transform(new r(0,0));else{var d=new y,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){d.setWorldOrgX(g.x),d.setWorldOrgY(g.y),d.setDeviceOrgX(c.x),d.setDeviceOrgY(c.y);var O=this.getAllNodes(),T;for(var N=0;N<O.length;N++)T=O[N],T.transform(d)}}},e.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var d,c,O=g.getNodes();for(var T=0;T<O.length;T++)if(d=O[T],c=d.getChild(),c==null)d.scatter();else if(c.getNodes().length==0)d.scatter();else this.positionNodesRandomly(c),d.updateBounds()}},e.prototype.getFlatForest=function(){var g=[],d=!0,c=this.graphManager.getRoot().getNodes(),O=!0;for(var T=0;T<c.length;T++)if(c[T].getChild()!=null)O=!1;if(!O)return g;var N=new Set,D=[],H=new Map,x=[];x=x.concat(c);while(x.length>0&&d){D.push(x[0]);while(D.length>0&&d){var B=D[0];D.splice(0,1),N.add(B);var tt=B.getEdges();for(var T=0;T<tt.length;T++){var J=tt[T].getOtherEnd(B);if(H.get(B)!=J)if(!N.has(J))D.push(J),H.set(J,B);else{d=!1;break}}}if(!d)g=[];else{var ft=[].concat(v(N));g.push(ft);for(var T=0;T<ft.length;T++){var G=ft[T],et=x.indexOf(G);if(et>-1)x.splice(et,1)}N=new Set,H=new Map}}return g},e.prototype.createDummyNodesForBendpoints=function(g){var d=[],c=g.source,O=this.graphManager.calcLowestCommonAncestor(g.source,g.target);for(var T=0;T<g.bendpoints.length;T++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),O.add(N);var D=this.newEdge(null);this.graphManager.add(D,c,N),d.add(N),c=N}var D=this.newEdge(null);if(this.graphManager.add(D,c,g.target),this.edgeToDummyNodes.set(g,d),g.isInterGraph())this.graphManager.remove(g);else O.remove(g);return d},e.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(v(this.edgeToDummyNodes.keys())).concat(g);for(var d=0;d<g.length;d++){var c=g[d];if(c.bendpoints.length>0){var O=this.edgeToDummyNodes.get(c);for(var T=0;T<O.length;T++){var N=O[T],D=new r(N.getCenterX(),N.getCenterY()),H=c.bendpoints.get(T);H.x=D.x,H.y=D.y,N.getOwner().remove(N)}this.graphManager.add(c,c.source,c.target)}}},e.transform=function(g,d,c,O){if(c!=null&&O!=null){var T=d;if(g<=50){var N=d/c;T-=(d-N)/50*(50-g)}else{var D=d*O;T+=(D-d)/50*(g-50)}return T}else{var H,x;if(g<=50)H=9*d/500,x=d/10;else H=9*d/50,x=-8*d;return H*g+x}},e.findCenterOfTree=function(g){var d=[];d=d.concat(g);var c=[],O=new Map,T=!1,N=null;if(d.length==1||d.length==2)T=!0,N=d[0];for(var D=0;D<d.length;D++){var H=d[D],x=H.getNeighborsList().size;if(O.set(H,H.getNeighborsList().size),x==1)c.push(H)}var B=[];B=B.concat(c);while(!T){var tt=[];tt=tt.concat(B),B=[];for(var D=0;D<d.length;D++){var H=d[D],J=d.indexOf(H);if(J>=0)d.splice(J,1);var ft=H.getNeighborsList();ft.forEach(function(s){if(c.indexOf(s)<0){var L=O.get(s),E=L-1;if(E==1)B.push(s);O.set(s,E)}})}if(c=c.concat(B),d.length==1||d.length==2)T=!0,N=d[0]}return N},e.prototype.setGraphManager=function(g){this.graphManager=g},w.exports=e},function(w,I,A){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},w.exports=v},function(w,I,A){var v=A(5);function f(o,n){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}f.prototype.getWorldOrgX=function(){return this.lworldOrgX},f.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},f.prototype.getWorldOrgY=function(){return this.lworldOrgY},f.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},f.prototype.getWorldExtX=function(){return this.lworldExtX},f.prototype.setWorldExtX=function(o){this.lworldExtX=o},f.prototype.getWorldExtY=function(){return this.lworldExtY},f.prototype.setWorldExtY=function(o){this.lworldExtY=o},f.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},f.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},f.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},f.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},f.prototype.getDeviceExtX=function(){return this.ldeviceExtX},f.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},f.prototype.getDeviceExtY=function(){return this.ldeviceExtY},f.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},f.prototype.transformX=function(o){var n=0,a=this.lworldExtX;if(a!=0)n=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/a;return n},f.prototype.transformY=function(o){var n=0,a=this.lworldExtY;if(a!=0)n=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/a;return n},f.prototype.inverseTransformX=function(o){var n=0,a=this.ldeviceExtX;if(a!=0)n=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/a;return n},f.prototype.inverseTransformY=function(o){var n=0,a=this.ldeviceExtY;if(a!=0)n=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/a;return n},f.prototype.inverseTransformPoint=function(o){var n=new v(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return n},w.exports=f},function(w,I,A){function v(i){if(Array.isArray(i)){for(var e=0,g=Array(i.length);e<i.length;e++)g[e]=i[e];return g}else return Array.from(i)}var f=A(15),o=A(4),n=A(0),a=A(8),u=A(9);function r(){f.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}r.prototype=Object.create(f.prototype);for(var y in f)r[y]=f[y];r.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){var i,e,g,d,c,O,T,N=this.getGraphManager().getAllEdges();for(var D=0;D<N.length;D++)if(i=N[D],e=i.idealLength,i.isInterGraph){if(d=i.getSource(),c=i.getTarget(),O=i.getSourceInLca().getEstimatedSize(),T=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)i.idealLength+=O+T-2*n.SIMPLE_NODE_SIZE;g=i.getLca().getInclusionTreeDepth(),i.idealLength+=e*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(d.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*g)}},r.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;if(this.incremental){if(i>o.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-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}else{if(i>o.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(i-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){var i=this.getAllEdges(),e;for(var g=0;g<i.length;g++)e=i[g],this.calcSpringForce(e,e.idealLength)},r.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,d,c,O,T=this.getAllNodes(),N;if(this.useFRGridVariant){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&i)this.updateGrid();N=new Set;for(g=0;g<T.length;g++)c=T[g],this.calculateRepulsionForceOfANode(c,N,i,e),N.add(c)}else for(g=0;g<T.length;g++){c=T[g];for(d=g+1;d<T.length;d++){if(O=T[d],c.getOwner()!=O.getOwner())continue;this.calcRepulsionForce(c,O)}}},r.prototype.calcGravitationalForces=function(){var i,e=this.getAllNodesToApplyGravitation();for(var g=0;g<e.length;g++)i=e[g],this.calcGravitationalForce(i)},r.prototype.moveNodes=function(){var i=this.getAllNodes(),e;for(var g=0;g<i.length;g++)e=i[g],e.move()},r.prototype.calcSpringForce=function(i,e){var g=i.getSource(),d=i.getTarget(),c,O,T,N;if(this.uniformLeafNodeSizes&&g.getChild()==null&&d.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;if(c=i.getLength(),c==0)return;O=i.edgeElasticity*(c-e),T=O*(i.lengthX/c),N=O*(i.lengthY/c),g.springForceX+=T,g.springForceY+=N,d.springForceX-=T,d.springForceY-=N},r.prototype.calcRepulsionForce=function(i,e){var g=i.getRect(),d=e.getRect(),c=[,,],O=[,,,,],T,N,D,H,x,B,tt;if(g.intersects(d)){a.calcSeparationAmount(g,d,c,o.DEFAULT_EDGE_LENGTH/2),B=2*c[0],tt=2*c[1];var J=i.noOfChildren*e.noOfChildren/(i.noOfChildren+e.noOfChildren);i.repulsionForceX-=J*B,i.repulsionForceY-=J*tt,e.repulsionForceX+=J*B,e.repulsionForceY+=J*tt}else{if(this.uniformLeafNodeSizes&&i.getChild()==null&&e.getChild()==null)T=d.getCenterX()-g.getCenterX(),N=d.getCenterY()-g.getCenterY();else a.getIntersection(g,d,O),T=O[2]-O[0],N=O[3]-O[1];if(Math.abs(T)<o.MIN_REPULSION_DIST)T=u.sign(T)*o.MIN_REPULSION_DIST;if(Math.abs(N)<o.MIN_REPULSION_DIST)N=u.sign(N)*o.MIN_REPULSION_DIST;D=T*T+N*N,H=Math.sqrt(D),x=(i.nodeRepulsion/2+e.nodeRepulsion/2)*i.noOfChildren*e.noOfChildren/D,B=x*T/H,tt=x*N/H,i.repulsionForceX-=B,i.repulsionForceY-=tt,e.repulsionForceX+=B,e.repulsionForceY+=tt}},r.prototype.calcGravitationalForce=function(i){var e,g,d,c,O,T,N,D;if(e=i.getOwner(),g=(e.getRight()+e.getLeft())/2,d=(e.getTop()+e.getBottom())/2,c=i.getCenterX()-g,O=i.getCenterY()-d,T=Math.abs(c)+i.getWidth()/2,N=Math.abs(O)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()){if(D=e.getEstimatedSize()*this.gravityRangeFactor,T>D||N>D)i.gravitationForceX=-this.gravityConstant*c,i.gravitationForceY=-this.gravityConstant*O}else if(D=e.getEstimatedSize()*this.compoundGravityRangeFactor,T>D||N>D)i.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*O*this.compoundGravityConstant},r.prototype.isConverged=function(){var i,e=!1;if(this.totalIterations>this.maxIterations/3)e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||e},r.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},r.prototype.calcNoOfChildrenForAllNodes=function(){var i,e=this.graphManager.getAllNodes();for(var g=0;g<e.length;g++)i=e[g],i.noOfChildren=i.getNoOfChildren()},r.prototype.calcGrid=function(i){var e=0,g=0;e=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));var d=Array(e);for(var c=0;c<e;c++)d[c]=Array(g);for(var c=0;c<e;c++)for(var O=0;O<g;O++)d[c][O]=[];return d},r.prototype.addNodeToGrid=function(i,e,g){var d=0,c=0,O=0,T=0;d=parseInt(Math.floor((i.getRect().x-e)/this.repulsionRange)),c=parseInt(Math.floor((i.getRect().width+i.getRect().x-e)/this.repulsionRange)),O=parseInt(Math.floor((i.getRect().y-g)/this.repulsionRange)),T=parseInt(Math.floor((i.getRect().height+i.getRect().y-g)/this.repulsionRange));for(var N=d;N<=c;N++)for(var D=O;D<=T;D++)this.grid[N][D].push(i),i.setGridCoordinates(d,c,O,T)},r.prototype.updateGrid=function(){var i,e,g=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(i=0;i<g.length;i++)e=g[i],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(i,e,g,d){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&g||d){var c=new Set;i.surrounding=[];var O,T=this.grid;for(var N=i.startX-1;N<i.finishX+2;N++)for(var D=i.startY-1;D<i.finishY+2;D++)if(!(N<0||D<0||N>=T.length||D>=T[0].length))for(var H=0;H<T[N][D].length;H++){if(O=T[N][D][H],i.getOwner()!=O.getOwner()||i==O)continue;if(!e.has(O)&&!c.has(O)){var x=Math.abs(i.getCenterX()-O.getCenterX())-(i.getWidth()/2+O.getWidth()/2),B=Math.abs(i.getCenterY()-O.getCenterY())-(i.getHeight()/2+O.getHeight()/2);if(x<=this.repulsionRange&&B<=this.repulsionRange)c.add(O)}}i.surrounding=[].concat(v(c))}for(N=0;N<i.surrounding.length;N++)this.calcRepulsionForce(i,i.surrounding[N])},r.prototype.calcRepulsionRange=function(){return 0},w.exports=r},function(w,I,A){var v=A(1),f=A(4);function o(a,u,r){v.call(this,a,u,r),this.idealLength=f.DEFAULT_EDGE_LENGTH,this.edgeElasticity=f.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(v.prototype);for(var n in v)o[n]=v[n];w.exports=o},function(w,I,A){var v=A(3),f=A(4);function o(a,u,r,y){v.call(this,a,u,r,y),this.nodeRepulsion=f.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}o.prototype=Object.create(v.prototype);for(var n in v)o[n]=v[n];o.prototype.setGridCoordinates=function(a,u,r,y){this.startX=a,this.finishX=u,this.startY=r,this.finishY=y},w.exports=o},function(w,I,A){function v(f,o){if(this.width=0,this.height=0,f!==null&&o!==null)this.height=o,this.width=f}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(f){this.width=f},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(f){this.height=f},w.exports=v},function(w,I,A){var v=A(14);function f(){this.map={},this.keys=[]}f.prototype.put=function(o,n){var a=v.createID(o);if(!this.contains(a))this.map[a]=n,this.keys.push(o)},f.prototype.contains=function(o){var n=v.createID(o);return this.map[o]!=null},f.prototype.get=function(o){var n=v.createID(o);return this.map[n]},f.prototype.keySet=function(){return this.keys},w.exports=f},function(w,I,A){var v=A(14);function f(){this.set={}}f.prototype.add=function(o){var n=v.createID(o);if(!this.contains(n))this.set[n]=o},f.prototype.remove=function(o){delete this.set[v.createID(o)]},f.prototype.clear=function(){this.set={}},f.prototype.contains=function(o){return this.set[v.createID(o)]==o},f.prototype.isEmpty=function(){return this.size()===0},f.prototype.size=function(){return Object.keys(this.set).length},f.prototype.addAllTo=function(o){var n=Object.keys(this.set),a=n.length;for(var u=0;u<a;u++)o.push(this.set[n[u]])},f.prototype.size=function(){return Object.keys(this.set).length},f.prototype.addAll=function(o){var n=o.length;for(var a=0;a<n;a++){var u=o[a];this.add(u)}},w.exports=f},function(w,I,A){function v(){}v.multMat=function(f,o){var n=[];for(var a=0;a<f.length;a++){n[a]=[];for(var u=0;u<o[0].length;u++){n[a][u]=0;for(var r=0;r<f[0].length;r++)n[a][u]+=f[a][r]*o[r][u]}}return n},v.transpose=function(f){var o=[];for(var n=0;n<f[0].length;n++){o[n]=[];for(var a=0;a<f.length;a++)o[n][a]=f[a][n]}return o},v.multCons=function(f,o){var n=[];for(var a=0;a<f.length;a++)n[a]=f[a]*o;return n},v.minusOp=function(f,o){var n=[];for(var a=0;a<f.length;a++)n[a]=f[a]-o[a];return n},v.dotProduct=function(f,o){var n=0;for(var a=0;a<f.length;a++)n+=f[a]*o[a];return n},v.mag=function(f){return Math.sqrt(this.dotProduct(f,f))},v.normalize=function(f){var o=[],n=this.mag(f);for(var a=0;a<f.length;a++)o[a]=f[a]/n;return o},v.multGamma=function(f){var o=[],n=0;for(var a=0;a<f.length;a++)n+=f[a];n*=-1/f.length;for(var u=0;u<f.length;u++)o[u]=n+f[u];return o},v.multL=function(f,o,n){var a=[],u=[],r=[];for(var y=0;y<o[0].length;y++){var i=0;for(var e=0;e<o.length;e++)i+=-0.5*o[e][y]*f[e];u[y]=i}for(var g=0;g<n.length;g++){var d=0;for(var c=0;c<n.length;c++)d+=n[g][c]*u[c];r[g]=d}for(var O=0;O<o.length;O++){var T=0;for(var N=0;N<o[0].length;N++)T+=o[O][N]*r[N];a[O]=T}return a},w.exports=v},function(w,I,A){var v=function(){function a(u,r){for(var y=0;y<r.length;y++){var i=r[y];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(u,i.key,i)}}return function(u,r,y){if(r)a(u.prototype,r);if(y)a(u,y);return u}}();function f(a,u){if(!(a instanceof u))throw TypeError("Cannot call a class as a function")}var o=A(11),n=function(){function a(u,r){if(f(this,a),r!==null||r!==void 0)this.compareFunction=this._defaultCompareFunction;var y=void 0;if(u instanceof o)y=u.size();else y=u.length;this._quicksort(u,0,y-1)}return v(a,[{key:"_quicksort",value:function(r,y,i){if(y<i){var e=this._partition(r,y,i);this._quicksort(r,y,e),this._quicksort(r,e+1,i)}}},{key:"_partition",value:function(r,y,i){var e=this._get(r,y),g=y,d=i;while(!0){while(this.compareFunction(e,this._get(r,d)))d--;while(this.compareFunction(this._get(r,g),e))g++;if(g<d)this._swap(r,g,d),g++,d--;else return d}}},{key:"_get",value:function(r,y){if(r instanceof o)return r.get_object_at(y);else return r[y]}},{key:"_set",value:function(r,y,i){if(r instanceof o)r.set_object_at(y,i);else r[y]=i}},{key:"_swap",value:function(r,y,i){var e=this._get(r,y);this._set(r,y,this._get(r,i)),this._set(r,i,e)}},{key:"_defaultCompareFunction",value:function(r,y){return y>r}}]),a}();w.exports=n},function(w,I,A){function v(){}v.svd=function(f){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=f.length,this.n=f[0].length;var o=Math.min(this.m,this.n);this.s=function(Vt){var Pt=[];while(Vt-- >0)Pt.push(0);return Pt}(Math.min(this.m+1,this.n)),this.U=function(Vt){var Pt=function ae(Bt){if(Bt.length==0)return 0;else{var _t=[];for(var ie=0;ie<Bt[0];ie++)_t.push(ae(Bt.slice(1)));return _t}};return Pt(Vt)}([this.m,o]),this.V=function(Vt){var Pt=function ae(Bt){if(Bt.length==0)return 0;else{var _t=[];for(var ie=0;ie<Bt[0];ie++)_t.push(ae(Bt.slice(1)));return _t}};return Pt(Vt)}([this.n,this.n]);var n=function(Vt){var Pt=[];while(Vt-- >0)Pt.push(0);return Pt}(this.n),a=function(Vt){var Pt=[];while(Vt-- >0)Pt.push(0);return Pt}(this.m),u=!0,r=!0,y=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m));for(var e=0;e<Math.max(y,i);e++){if(e<y){this.s[e]=0;for(var g=e;g<this.m;g++)this.s[e]=v.hypot(this.s[e],f[g][e]);if(this.s[e]!==0){if(f[e][e]<0)this.s[e]=-this.s[e];for(var d=e;d<this.m;d++)f[d][e]/=this.s[e];f[e][e]+=1}this.s[e]=-this.s[e]}for(var c=e+1;c<this.n;c++){if(function(Vt,Pt){return Vt&&Pt}(e<y,this.s[e]!==0)){var O=0;for(var T=e;T<this.m;T++)O+=f[T][e]*f[T][c];O=-O/f[e][e];for(var N=e;N<this.m;N++)f[N][c]+=O*f[N][e]}n[c]=f[e][c]}if(function(Vt,Pt){return Vt&&Pt}(u,e<y))for(var D=e;D<this.m;D++)this.U[D][e]=f[D][e];if(e<i){n[e]=0;for(var H=e+1;H<this.n;H++)n[e]=v.hypot(n[e],n[H]);if(n[e]!==0){if(n[e+1]<0)n[e]=-n[e];for(var x=e+1;x<this.n;x++)n[x]/=n[e];n[e+1]+=1}if(n[e]=-n[e],function(Vt,Pt){return Vt&&Pt}(e+1<this.m,n[e]!==0)){for(var B=e+1;B<this.m;B++)a[B]=0;for(var tt=e+1;tt<this.n;tt++)for(var J=e+1;J<this.m;J++)a[J]+=n[tt]*f[J][tt];for(var ft=e+1;ft<this.n;ft++){var G=-n[ft]/n[e+1];for(var et=e+1;et<this.m;et++)f[et][ft]+=G*a[et]}}if(r)for(var s=e+1;s<this.n;s++)this.V[s][e]=n[s]}}var L=Math.min(this.n,this.m+1);if(y<this.n)this.s[y]=f[y][y];if(this.m<L)this.s[L-1]=0;if(i+1<L)n[i]=f[i][L-1];if(n[L-1]=0,u){for(var E=y;E<o;E++){for(var M=0;M<this.m;M++)this.U[M][E]=0;this.U[E][E]=1}for(var m=y-1;m>=0;m--)if(this.s[m]!==0){for(var Y=m+1;Y<o;Y++){var b=0;for(var Q=m;Q<this.m;Q++)b+=this.U[Q][m]*this.U[Q][Y];b=-b/this.U[m][m];for(var Z=m;Z<this.m;Z++)this.U[Z][Y]+=b*this.U[Z][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var ht=0;ht<m-1;ht++)this.U[ht][m]=0}else{for(var vt=0;vt<this.m;vt++)this.U[vt][m]=0;this.U[m][m]=1}}if(r)for(var k=this.n-1;k>=0;k--){if(function(Vt,Pt){return Vt&&Pt}(k<i,n[k]!==0))for(var dt=k+1;dt<o;dt++){var at=0;for(var S=k+1;S<this.n;S++)at+=this.V[S][k]*this.V[S][dt];at=-at/this.V[k+1][k];for(var _=k+1;_<this.n;_++)this.V[_][dt]+=at*this.V[_][k]}for(var rt=0;rt<this.n;rt++)this.V[rt][k]=0;this.V[k][k]=1}var gt=L-1,Lt=0,Gt=Math.pow(2,-52),Zt=Math.pow(2,-966);while(L>0){var ct=void 0,Kt=void 0;for(ct=L-2;ct>=-1;ct--){if(ct===-1)break;if(Math.abs(n[ct])<=Zt+Gt*(Math.abs(this.s[ct])+Math.abs(this.s[ct+1]))){n[ct]=0;break}}if(ct===L-2)Kt=4;else{var Ht=void 0;for(Ht=L-1;Ht>=ct;Ht--){if(Ht===ct)break;var Tt=(Ht!==L?Math.abs(n[Ht]):0)+(Ht!==ct+1?Math.abs(n[Ht-1]):0);if(Math.abs(this.s[Ht])<=Zt+Gt*Tt){this.s[Ht]=0;break}}if(Ht===ct)Kt=3;else if(Ht===L-1)Kt=1;else Kt=2,ct=Ht}switch(ct++,Kt){case 1:{var pt=n[L-2];n[L-2]=0;for(var It=L-2;It>=ct;It--){var St=v.hypot(this.s[It],pt),Ut=this.s[It]/St,Ft=pt/St;if(this.s[It]=St,It!==ct)pt=-Ft*n[It-1],n[It-1]=Ut*n[It-1];if(r)for(var bt=0;bt<this.n;bt++)St=Ut*this.V[bt][It]+Ft*this.V[bt][L-1],this.V[bt][L-1]=-Ft*this.V[bt][It]+Ut*this.V[bt][L-1],this.V[bt][It]=St}}break;case 2:{var Wt=n[ct-1];n[ct-1]=0;for(var $t=ct;$t<L;$t++){var ee=v.hypot(this.s[$t],Wt),Qt=this.s[$t]/ee,jt=Wt/ee;if(this.s[$t]=ee,Wt=-jt*n[$t],n[$t]=Qt*n[$t],u)for(var qt=0;qt<this.m;qt++)ee=Qt*this.U[qt][$t]+jt*this.U[qt][ct-1],this.U[qt][ct-1]=-jt*this.U[qt][$t]+Qt*this.U[qt][ct-1],this.U[qt][$t]=ee}}break;case 3:{var K=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[L-1]),Math.abs(this.s[L-2])),Math.abs(n[L-2])),Math.abs(this.s[ct])),Math.abs(n[ct])),it=this.s[L-1]/K,nt=this.s[L-2]/K,ot=n[L-2]/K,st=this.s[ct]/K,ut=n[ct]/K,Dt=((nt+it)*(nt-it)+ot*ot)/2,Ct=it*ot*(it*ot),lt=0;if(function(Vt,Pt){return Vt||Pt}(Dt!==0,Ct!==0)){if(lt=Math.sqrt(Dt*Dt+Ct),Dt<0)lt=-lt;lt=Ct/(Dt+lt)}var wt=(st+it)*(st-it)+lt,At=st*ut;for(var yt=ct;yt<L-1;yt++){var xt=v.hypot(wt,At),Yt=wt/xt,Nt=At/xt;if(yt!==ct)n[yt-1]=xt;if(wt=Yt*this.s[yt]+Nt*n[yt],n[yt]=Yt*n[yt]-Nt*this.s[yt],At=Nt*this.s[yt+1],this.s[yt+1]=Yt*this.s[yt+1],r)for(var mt=0;mt<this.n;mt++)xt=Yt*this.V[mt][yt]+Nt*this.V[mt][yt+1],this.V[mt][yt+1]=-Nt*this.V[mt][yt]+Yt*this.V[mt][yt+1],this.V[mt][yt]=xt;if(xt=v.hypot(wt,At),Yt=wt/xt,Nt=At/xt,this.s[yt]=xt,wt=Yt*n[yt]+Nt*this.s[yt+1],this.s[yt+1]=-Nt*n[yt]+Yt*this.s[yt+1],At=Nt*n[yt+1],n[yt+1]=Yt*n[yt+1],u&&yt<this.m-1)for(var Ot=0;Ot<this.m;Ot++)xt=Yt*this.U[Ot][yt]+Nt*this.U[Ot][yt+1],this.U[Ot][yt+1]=-Nt*this.U[Ot][yt]+Yt*this.U[Ot][yt+1],this.U[Ot][yt]=xt}n[L-2]=wt,Lt=Lt+1}break;case 4:{if(this.s[ct]<=0){if(this.s[ct]=this.s[ct]<0?-this.s[ct]:0,r)for(var Et=0;Et<=gt;Et++)this.V[Et][ct]=-this.V[Et][ct]}while(ct<gt){if(this.s[ct]>=this.s[ct+1])break;var Mt=this.s[ct];if(this.s[ct]=this.s[ct+1],this.s[ct+1]=Mt,r&&ct<this.n-1)for(var kt=0;kt<this.n;kt++)Mt=this.V[kt][ct+1],this.V[kt][ct+1]=this.V[kt][ct],this.V[kt][ct]=Mt;if(u&&ct<this.m-1)for(var zt=0;zt<this.m;zt++)Mt=this.U[zt][ct+1],this.U[zt][ct+1]=this.U[zt][ct],this.U[zt][ct]=Mt;ct++}Lt=0,L--}break}}var re={U:this.U,V:this.V,S:this.s};return re},v.hypot=function(f,o){var n=void 0;if(Math.abs(f)>Math.abs(o))n=o/f,n=Math.abs(f)*Math.sqrt(1+n*n);else if(o!=0)n=f/o,n=Math.abs(o)*Math.sqrt(1+n*n);else n=0;return n},w.exports=v},function(w,I,A){var v=function(){function n(a,u){for(var r=0;r<u.length;r++){var y=u[r];if(y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y)y.writable=!0;Object.defineProperty(a,y.key,y)}}return function(a,u,r){if(u)n(a.prototype,u);if(r)n(a,r);return a}}();function f(n,a){if(!(n instanceof a))throw TypeError("Cannot call a class as a function")}var o=function(){function n(a,u){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;f(this,n),this.sequence1=a,this.sequence2=u,this.match_score=r,this.mismatch_penalty=y,this.gap_penalty=i,this.iMax=a.length+1,this.jMax=u.length+1,this.grid=Array(this.iMax);for(var e=0;e<this.iMax;e++){this.grid[e]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[e][g]=0}this.tracebackGrid=Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[d][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!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 y=1;y<this.iMax;y++)for(var i=1;i<this.jMax;i++){var e=void 0;if(this.sequence1[y-1]===this.sequence2[i-1])e=this.grid[y-1][i-1]+this.match_score;else e=this.grid[y-1][i-1]+this.mismatch_penalty;var g=this.grid[y-1][i]+this.gap_penalty,d=this.grid[y][i-1]+this.gap_penalty,c=[e,g,d],O=this.arrayAllMaxIndexes(c);this.grid[y][i]=c[O[0]],this.tracebackGrid[y][i]=[O.includes(0),O.includes(1),O.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var u=[];u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(u[0]){var r=u[0],y=this.tracebackGrid[r.pos[0]][r.pos[1]];if(y[0])u.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});if(y[1])u.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2});if(y[2])u.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(r.pos[0]===0&&r.pos[1]===0)this.alignments.push({sequence1:r.seq1,sequence2:r.seq2});u.shift()}return this.alignments}},{key:"getAllIndexes",value:function(u,r){var y=[],i=-1;while((i=u.indexOf(r,i+1))!==-1)y.push(i);return y}},{key:"arrayAllMaxIndexes",value:function(u){return this.getAllIndexes(u,Math.max.apply(null,u))}}]),n}();w.exports=o},function(w,I,A){var v=function(){return};v.FDLayout=A(18),v.FDLayoutConstants=A(4),v.FDLayoutEdge=A(19),v.FDLayoutNode=A(20),v.DimensionD=A(21),v.HashMap=A(22),v.HashSet=A(23),v.IGeometry=A(8),v.IMath=A(9),v.Integer=A(10),v.Point=A(12),v.PointD=A(5),v.RandomSeed=A(16),v.RectangleD=A(13),v.Transform=A(17),v.UniqueIDGeneretor=A(14),v.Quicksort=A(25),v.LinkedList=A(11),v.LGraphObject=A(2),v.LGraph=A(6),v.LEdge=A(1),v.LGraphManager=A(7),v.LNode=A(3),v.Layout=A(15),v.LayoutConstants=A(0),v.NeedlemanWunsch=A(27),v.Matrix=A(24),v.SVD=A(26),w.exports=v},function(w,I,A){function v(){this.listeners=[]}var f=v.prototype;f.addListener=function(o,n){this.listeners.push({event:o,callback:n})},f.removeListener=function(o,n){for(var a=this.listeners.length;a>=0;a--){var u=this.listeners[a];if(u.event===o&&u.callback===n)this.listeners.splice(a,1)}},f.emit=function(o,n){for(var a=0;a<this.listeners.length;a++){var u=this.listeners[a];if(o===u.event)u.callback(n)}},w.exports=v}])})});var Fe=Cn(function(Ee,Se){(function(I,A){if(typeof Ee==="object"&&typeof Se==="object")Se.exports=A(Re());else if(typeof define==="function"&&define.amd)define(["layout-base"],A);else if(typeof Ee==="object")Ee.coseBase=A(Re());else I.coseBase=A(I.layoutBase)})(Ee,function(w){return(()=>{var I={45:(o,n,a)=>{var u={};u.layoutBase=a(551),u.CoSEConstants=a(806),u.CoSEEdge=a(767),u.CoSEGraph=a(880),u.CoSEGraphManager=a(578),u.CoSELayout=a(765),u.CoSENode=a(991),u.ConstraintHandler=a(902),o.exports=u},806:(o,n,a)=>{var u=a(551).FDLayoutConstants;function r(){}for(var y in u)r[y]=u[y];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,o.exports=r},767:(o,n,a)=>{var u=a(551).FDLayoutEdge;function r(i,e,g){u.call(this,i,e,g)}r.prototype=Object.create(u.prototype);for(var y in u)r[y]=u[y];o.exports=r},880:(o,n,a)=>{var u=a(551).LGraph;function r(i,e,g){u.call(this,i,e,g)}r.prototype=Object.create(u.prototype);for(var y in u)r[y]=u[y];o.exports=r},578:(o,n,a)=>{var u=a(551).LGraphManager;function r(i){u.call(this,i)}r.prototype=Object.create(u.prototype);for(var y in u)r[y]=u[y];o.exports=r},765:(o,n,a)=>{var u=a(551).FDLayout,r=a(578),y=a(880),i=a(991),e=a(767),g=a(806),d=a(902),c=a(551).FDLayoutConstants,O=a(551).LayoutConstants,T=a(551).Point,N=a(551).PointD,D=a(551).DimensionD,H=a(551).Layout,x=a(551).Integer,B=a(551).IGeometry,tt=a(551).LGraph,J=a(551).Transform,ft=a(551).LinkedList;function G(){u.call(this),this.toBeTiled={},this.constraints={}}G.prototype=Object.create(u.prototype);for(var et in u)G[et]=u[et];G.prototype.newGraphManager=function(){var s=new r(this);return this.graphManager=s,s},G.prototype.newGraph=function(s){return new y(null,this.graphManager,s)},G.prototype.newNode=function(s){return new i(this.graphManager,s)},G.prototype.newEdge=function(s){return new e(null,null,s)},G.prototype.initParameters=function(){if(u.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(g.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=g.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=g.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1}},G.prototype.initSpringEmbedder=function(){u.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=0.04,this.coolingAdjuster=1},G.prototype.layout=function(){var s=O.DEFAULT_CREATE_BENDS_AS_NEEDED;if(s)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},G.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){var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(M){return L.has(M)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}else if(g.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(Y){return L.has(Y)});this.graphManager.setAllNodesToApplyGravitation(E)}if(Object.keys(this.constraints).length>0)d.handleConstraints(this),this.initConstraintVariables();if(this.initSpringEmbedder(),g.APPLY_LAYOUT)this.runSpringEmbedder();return!0},G.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%c.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(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 s=new Set(this.getAllNodes()),L=this.nodesWithGravity.filter(function(m){return s.has(m)});if(this.graphManager.setAllNodesToApplyGravitation(L),this.graphManager.updateBounds(),this.updateGrid(),g.PURE_INCREMENTAL)this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2;else this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();if(g.PURE_INCREMENTAL)this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100);else this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100);this.afterGrowthIterations++}var E=!this.isTreeGrowing&&!this.isGrowthFinished,M=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(E,M),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},G.prototype.getPositionsData=function(){var s=this.graphManager.getAllNodes(),L={};for(var E=0;E<s.length;E++){var M=s[E].rect,m=s[E].id;L[m]={id:m,x:M.getCenterX(),y:M.getCenterY(),w:M.width,h:M.height}}return L},G.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(c.ANIMATE==="during")this.emit("layoutstarted");else{while(!s)s=this.tick();this.graphManager.updateBounds()}},G.prototype.moveNodes=function(){var s=this.getAllNodes(),L;for(var E=0;E<s.length;E++)L=s[E],L.calculateDisplacement();if(Object.keys(this.constraints).length>0)this.updateDisplacements();for(var E=0;E<s.length;E++)L=s[E],L.move()},G.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;var L=this.graphManager.getAllNodes();for(var E=0;E<L.length;E++){var M=L[E];this.idToNodeMap.set(M.id,M)}var m=function S(_){var rt=_.getChild().getNodes(),gt,Lt=0;for(var Gt=0;Gt<rt.length;Gt++)if(gt=rt[Gt],gt.getChild()==null){if(s.fixedNodeSet.has(gt.id))Lt+=100}else Lt+=S(gt);return Lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(rt){s.fixedNodeSet.add(rt.nodeId)});var L=this.graphManager.getAllNodes(),M;for(var E=0;E<L.length;E++)if(M=L[E],M.getChild()!=null){var Y=m(M);if(Y>0)M.fixedNodeWeight=Y}}if(this.constraints.relativePlacementConstraint){var b=new Map,Q=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(S){s.fixedNodesOnHorizontal.add(S),s.fixedNodesOnVertical.add(S)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var Z=this.constraints.alignmentConstraint.vertical;for(var E=0;E<Z.length;E++)this.dummyToNodeForVerticalAlignment.set("dummy"+E,[]),Z[E].forEach(function(_){if(b.set(_,"dummy"+E),s.dummyToNodeForVerticalAlignment.get("dummy"+E).push(_),s.fixedNodeSet.has(_))s.fixedNodesOnHorizontal.add("dummy"+E)})}if(this.constraints.alignmentConstraint.horizontal){var W=this.constraints.alignmentConstraint.horizontal;for(var E=0;E<W.length;E++)this.dummyToNodeForHorizontalAlignment.set("dummy"+E,[]),W[E].forEach(function(_){if(Q.set(_,"dummy"+E),s.dummyToNodeForHorizontalAlignment.get("dummy"+E).push(_),s.fixedNodeSet.has(_))s.fixedNodesOnVertical.add("dummy"+E)})}}if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(S){var _,rt,gt;for(gt=S.length-1;gt>=2*S.length/3;gt--)_=Math.floor(Math.random()*(gt+1)),rt=S[gt],S[gt]=S[_],S[_]=rt;return S},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(S){if(S.left){var _=b.has(S.left)?b.get(S.left):S.left,rt=b.has(S.right)?b.get(S.right):S.right;if(!s.nodesInRelativeHorizontal.includes(_))if(s.nodesInRelativeHorizontal.push(_),s.nodeToRelativeConstraintMapHorizontal.set(_,[]),s.dummyToNodeForVerticalAlignment.has(_))s.nodeToTempPositionMapHorizontal.set(_,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(_)[0]).getCenterX());else s.nodeToTempPositionMapHorizontal.set(_,s.idToNodeMap.get(_).getCenterX());if(!s.nodesInRelativeHorizontal.includes(rt))if(s.nodesInRelativeHorizontal.push(rt),s.nodeToRelativeConstraintMapHorizontal.set(rt,[]),s.dummyToNodeForVerticalAlignment.has(rt))s.nodeToTempPositionMapHorizontal.set(rt,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(rt)[0]).getCenterX());else s.nodeToTempPositionMapHorizontal.set(rt,s.idToNodeMap.get(rt).getCenterX());s.nodeToRelativeConstraintMapHorizontal.get(_).push({right:rt,gap:S.gap}),s.nodeToRelativeConstraintMapHorizontal.get(rt).push({left:_,gap:S.gap})}else{var gt=Q.has(S.top)?Q.get(S.top):S.top,Lt=Q.has(S.bottom)?Q.get(S.bottom):S.bottom;if(!s.nodesInRelativeVertical.includes(gt))if(s.nodesInRelativeVertical.push(gt),s.nodeToRelativeConstraintMapVertical.set(gt,[]),s.dummyToNodeForHorizontalAlignment.has(gt))s.nodeToTempPositionMapVertical.set(gt,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(gt)[0]).getCenterY());else s.nodeToTempPositionMapVertical.set(gt,s.idToNodeMap.get(gt).getCenterY());if(!s.nodesInRelativeVertical.includes(Lt))if(s.nodesInRelativeVertical.push(Lt),s.nodeToRelativeConstraintMapVertical.set(Lt,[]),s.dummyToNodeForHorizontalAlignment.has(Lt))s.nodeToTempPositionMapVertical.set(Lt,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(Lt)[0]).getCenterY());else s.nodeToTempPositionMapVertical.set(Lt,s.idToNodeMap.get(Lt).getCenterY());s.nodeToRelativeConstraintMapVertical.get(gt).push({bottom:Lt,gap:S.gap}),s.nodeToRelativeConstraintMapVertical.get(Lt).push({top:gt,gap:S.gap})}});else{var ht=new Map,vt=new Map;this.constraints.relativePlacementConstraint.forEach(function(S){if(S.left){var _=b.has(S.left)?b.get(S.left):S.left,rt=b.has(S.right)?b.get(S.right):S.right;if(ht.has(_))ht.get(_).push(rt);else ht.set(_,[rt]);if(ht.has(rt))ht.get(rt).push(_);else ht.set(rt,[_])}else{var gt=Q.has(S.top)?Q.get(S.top):S.top,Lt=Q.has(S.bottom)?Q.get(S.bottom):S.bottom;if(vt.has(gt))vt.get(gt).push(Lt);else vt.set(gt,[Lt]);if(vt.has(Lt))vt.get(Lt).push(gt);else vt.set(Lt,[gt])}});var k=function(_,rt){var gt=[],Lt=[],Gt=new ft,Zt=new Set,ct=0;return _.forEach(function(Kt,Ht){if(!Zt.has(Ht)){gt[ct]=[],Lt[ct]=!1;var Tt=Ht;Gt.push(Tt),Zt.add(Tt),gt[ct].push(Tt);while(Gt.length!=0){if(Tt=Gt.shift(),rt.has(Tt))Lt[ct]=!0;var pt=_.get(Tt);pt.forEach(function(It){if(!Zt.has(It))Gt.push(It),Zt.add(It),gt[ct].push(It)})}ct++}}),{components:gt,isFixed:Lt}},dt=k(ht,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=dt.components,this.fixedComponentsOnHorizontal=dt.isFixed;var at=k(vt,s.fixedNodesOnVertical);this.componentsOnVertical=at.components,this.fixedComponentsOnVertical=at.isFixed}}},G.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint)this.constraints.fixedNodeConstraint.forEach(function(at){var S=s.idToNodeMap.get(at.nodeId);S.displacementX=0,S.displacementY=0});if(this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var L=this.constraints.alignmentConstraint.vertical;for(var E=0;E<L.length;E++){var M=0;for(var m=0;m<L[E].length;m++){if(this.fixedNodeSet.has(L[E][m])){M=0;break}M+=this.idToNodeMap.get(L[E][m]).displacementX}var Y=M/L[E].length;for(var m=0;m<L[E].length;m++)this.idToNodeMap.get(L[E][m]).displacementX=Y}}if(this.constraints.alignmentConstraint.horizontal){var b=this.constraints.alignmentConstraint.horizontal;for(var E=0;E<b.length;E++){var Q=0;for(var m=0;m<b[E].length;m++){if(this.fixedNodeSet.has(b[E][m])){Q=0;break}Q+=this.idToNodeMap.get(b[E][m]).displacementY}var Z=Q/b[E].length;for(var m=0;m<b[E].length;m++)this.idToNodeMap.get(b[E][m]).displacementY=Z}}}if(this.constraints.relativePlacementConstraint)if(g.RELAX_MOVEMENT_ON_CONSTRAINTS){if(this.totalIterations%10==0)this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical);this.nodesInRelativeHorizontal.forEach(function(at){if(!s.fixedNodesOnHorizontal.has(at)){var S=0;if(s.dummyToNodeForVerticalAlignment.has(at))S=s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(at)[0]).displacementX;else S=s.idToNodeMap.get(at).displacementX;if(s.nodeToRelativeConstraintMapHorizontal.get(at).forEach(function(_){if(_.right){var rt=s.nodeToTempPositionMapHorizontal.get(_.right)-s.nodeToTempPositionMapHorizontal.get(at)-S;if(rt<_.gap)S-=_.gap-rt}else{var rt=s.nodeToTempPositionMapHorizontal.get(at)-s.nodeToTempPositionMapHorizontal.get(_.left)+S;if(rt<_.gap)S+=_.gap-rt}}),s.nodeToTempPositionMapHorizontal.set(at,s.nodeToTempPositionMapHorizontal.get(at)+S),s.dummyToNodeForVerticalAlignment.has(at))s.dummyToNodeForVerticalAlignment.get(at).forEach(function(_){s.idToNodeMap.get(_).displacementX=S});else s.idToNodeMap.get(at).displacementX=S}}),this.nodesInRelativeVertical.forEach(function(at){if(!s.fixedNodesOnHorizontal.has(at)){var S=0;if(s.dummyToNodeForHorizontalAlignment.has(at))S=s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(at)[0]).displacementY;else S=s.idToNodeMap.get(at).displacementY;if(s.nodeToRelativeConstraintMapVertical.get(at).forEach(function(_){if(_.bottom){var rt=s.nodeToTempPositionMapVertical.get(_.bottom)-s.nodeToTempPositionMapVertical.get(at)-S;if(rt<_.gap)S-=_.gap-rt}else{var rt=s.nodeToTempPositionMapVertical.get(at)-s.nodeToTempPositionMapVertical.get(_.top)+S;if(rt<_.gap)S+=_.gap-rt}}),s.nodeToTempPositionMapVertical.set(at,s.nodeToTempPositionMapVertical.get(at)+S),s.dummyToNodeForHorizontalAlignment.has(at))s.dummyToNodeForHorizontalAlignment.get(at).forEach(function(_){s.idToNodeMap.get(_).displacementY=S});else s.idToNodeMap.get(at).displacementY=S}})}else{for(var E=0;E<this.componentsOnHorizontal.length;E++){var W=this.componentsOnHorizontal[E];if(this.fixedComponentsOnHorizontal[E])for(var m=0;m<W.length;m++)if(this.dummyToNodeForVerticalAlignment.has(W[m]))this.dummyToNodeForVerticalAlignment.get(W[m]).forEach(function(_){s.idToNodeMap.get(_).displacementX=0});else this.idToNodeMap.get(W[m]).displacementX=0;else{var ht=0,vt=0;for(var m=0;m<W.length;m++)if(this.dummyToNodeForVerticalAlignment.has(W[m])){var k=this.dummyToNodeForVerticalAlignment.get(W[m]);ht+=k.length*this.idToNodeMap.get(k[0]).displacementX,vt+=k.length}else ht+=this.idToNodeMap.get(W[m]).displacementX,vt++;var dt=ht/vt;for(var m=0;m<W.length;m++)if(this.dummyToNodeForVerticalAlignment.has(W[m]))this.dummyToNodeForVerticalAlignment.get(W[m]).forEach(function(_){s.idToNodeMap.get(_).displacementX=dt});else this.idToNodeMap.get(W[m]).displacementX=dt}}for(var E=0;E<this.componentsOnVertical.length;E++){var W=this.componentsOnVertical[E];if(this.fixedComponentsOnVertical[E])for(var m=0;m<W.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(W[m]))this.dummyToNodeForHorizontalAlignment.get(W[m]).forEach(function(rt){s.idToNodeMap.get(rt).displacementY=0});else this.idToNodeMap.get(W[m]).displacementY=0;else{var ht=0,vt=0;for(var m=0;m<W.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(W[m])){var k=this.dummyToNodeForHorizontalAlignment.get(W[m]);ht+=k.length*this.idToNodeMap.get(k[0]).displacementY,vt+=k.length}else ht+=this.idToNodeMap.get(W[m]).displacementY,vt++;var dt=ht/vt;for(var m=0;m<W.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(W[m]))this.dummyToNodeForHorizontalAlignment.get(W[m]).forEach(function(Gt){s.idToNodeMap.get(Gt).displacementY=dt});else this.idToNodeMap.get(W[m]).displacementY=dt}}}},G.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],L,E=this.graphManager.getGraphs(),M=E.length,m;for(m=0;m<M;m++)if(L=E[m],L.updateConnected(),!L.isConnected)s=s.concat(L.getNodes());return s},G.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var L=new Set,E;for(E=0;E<s.length;E++){var M=s[E];if(!L.has(M)){var m=M.getSource(),Y=M.getTarget();if(m==Y)M.getBendpoints().push(new N),M.getBendpoints().push(new N),this.createDummyNodesForBendpoints(M),L.add(M);else{var b=[];if(b=b.concat(m.getEdgeListToNode(Y)),b=b.concat(Y.getEdgeListToNode(m)),!L.has(b[0])){if(b.length>1){var Q;for(Q=0;Q<b.length;Q++){var Z=b[Q];Z.getBendpoints().push(new N),this.createDummyNodesForBendpoints(Z)}}b.forEach(function(W){L.add(W)})}}}if(L.size==s.length)break}},G.prototype.positionNodesRadially=function(s){var L=new T(0,0),E=Math.ceil(Math.sqrt(s.length)),M=0,m=0,Y=0,b=new N(0,0);for(var Q=0;Q<s.length;Q++){if(Q%E==0){if(Y=0,m=M,Q!=0)m+=g.DEFAULT_COMPONENT_SEPERATION;M=0}var Z=s[Q],W=H.findCenterOfTree(Z);if(L.x=Y,L.y=m,b=G.radialLayout(Z,W,L),b.y>M)M=Math.floor(b.y);Y=Math.floor(b.x+g.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(O.WORLD_CENTER_X-b.x/2,O.WORLD_CENTER_Y-b.y/2))},G.radialLayout=function(s,L,E){var M=Math.max(this.maxDiagonalInTree(s),g.DEFAULT_RADIAL_SEPARATION);G.branchRadialLayout(L,null,0,359,0,M);var m=tt.calculateBounds(s),Y=new J;Y.setDeviceOrgX(m.getMinX()),Y.setDeviceOrgY(m.getMinY()),Y.setWorldOrgX(E.x),Y.setWorldOrgY(E.y);for(var b=0;b<s.length;b++){var Q=s[b];Q.transform(Y)}var Z=new N(m.getMaxX(),m.getMaxY());return Y.inverseTransformPoint(Z)},G.branchRadialLayout=function(s,L,E,M,m,Y){var b=(M-E+1)/2;if(b<0)b+=180;var Q=(b+E)%360,Z=Q*B.TWO_PI/360,W=Math.cos(Z),ht=m*Math.cos(Z),vt=m*Math.sin(Z);s.setCenter(ht,vt);var k=[];k=k.concat(s.getEdges());var dt=k.length;if(L!=null)dt--;var at=0,S=k.length,_,rt=s.getEdgesBetween(L);while(rt.length>1){var gt=rt[0];rt.splice(0,1);var Lt=k.indexOf(gt);if(Lt>=0)k.splice(Lt,1);S--,dt--}if(L!=null)_=(k.indexOf(rt[0])+1)%S;else _=0;var Gt=Math.abs(M-E)/dt;for(var Zt=_;at!=dt;Zt=++Zt%S){var ct=k[Zt].getOtherEnd(s);if(ct==L)continue;var Kt=(E+at*Gt)%360,Ht=(Kt+Gt)%360;G.branchRadialLayout(ct,s,Kt,Ht,m+Y,Y),at++}},G.maxDiagonalInTree=function(s){var L=x.MIN_VALUE;for(var E=0;E<s.length;E++){var M=s[E],m=M.getDiagonal();if(m>L)L=m}return L},G.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},G.prototype.groupZeroDegreeMembers=function(){var s=this,L={};this.memberGroups={},this.idToDummyNode={};var E=[],M=this.graphManager.getAllNodes();for(var m=0;m<M.length;m++){var Y=M[m],b=Y.getParent();if(this.getNodeDegreeWithChildren(Y)===0&&(b.id==null||!this.getToBeTiled(b)))E.push(Y)}for(var m=0;m<E.length;m++){var Y=E[m],Q=Y.getParent().id;if(typeof L[Q]>"u")L[Q]=[];L[Q]=L[Q].concat(Y)}Object.keys(L).forEach(function(Z){if(L[Z].length>1){var W="DummyCompound_"+Z;s.memberGroups[W]=L[Z];var ht=L[Z][0].getParent(),vt=new i(s.graphManager);vt.id=W,vt.paddingLeft=ht.paddingLeft||0,vt.paddingRight=ht.paddingRight||0,vt.paddingBottom=ht.paddingBottom||0,vt.paddingTop=ht.paddingTop||0,s.idToDummyNode[W]=vt;var k=s.getGraphManager().add(s.newGraph(),vt),dt=ht.getChild();dt.add(vt);for(var at=0;at<L[Z].length;at++){var S=L[Z][at];dt.remove(S),k.add(S)}}})},G.prototype.clearCompounds=function(){var s={},L={};this.performDFSOnCompounds();for(var E=0;E<this.compoundOrder.length;E++)L[this.compoundOrder[E].id]=this.compoundOrder[E],s[this.compoundOrder[E].id]=[].concat(this.compoundOrder[E].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[E].getChild()),this.compoundOrder[E].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,L)},G.prototype.clearZeroDegreeMembers=function(){var s=this,L=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(E){var M=s.idToDummyNode[E];if(L[E]=s.tileNodes(s.memberGroups[E],M.paddingLeft+M.paddingRight),M.rect.width=L[E].width,M.rect.height=L[E].height,M.setCenter(L[E].centerX,L[E].centerY),M.labelMarginLeft=0,M.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var m=M.rect.width,Y=M.rect.height;if(M.labelWidth){if(M.labelPosHorizontal=="left")M.rect.x-=M.labelWidth,M.setWidth(m+M.labelWidth),M.labelMarginLeft=M.labelWidth;else if(M.labelPosHorizontal=="center"&&M.labelWidth>m)M.rect.x-=(M.labelWidth-m)/2,M.setWidth(M.labelWidth),M.labelMarginLeft=(M.labelWidth-m)/2;else if(M.labelPosHorizontal=="right")M.setWidth(m+M.labelWidth)}if(M.labelHeight){if(M.labelPosVertical=="top")M.rect.y-=M.labelHeight,M.setHeight(Y+M.labelHeight),M.labelMarginTop=M.labelHeight;else if(M.labelPosVertical=="center"&&M.labelHeight>Y)M.rect.y-=(M.labelHeight-Y)/2,M.setHeight(M.labelHeight),M.labelMarginTop=(M.labelHeight-Y)/2;else if(M.labelPosVertical=="bottom")M.setHeight(Y+M.labelHeight)}}})},G.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var L=this.compoundOrder[s],{id:E,paddingLeft:M,paddingTop:m,labelMarginLeft:Y,labelMarginTop:b}=L;this.adjustLocations(this.tiledMemberPack[E],L.rect.x,L.rect.y,M,m,Y,b)}},G.prototype.repopulateZeroDegreeMembers=function(){var s=this,L=this.tiledZeroDegreePack;Object.keys(L).forEach(function(E){var M=s.idToDummyNode[E],{paddingLeft:m,paddingTop:Y,labelMarginLeft:b,labelMarginTop:Q}=M;s.adjustLocations(L[E],M.rect.x,M.rect.y,m,Y,b,Q)})},G.prototype.getToBeTiled=function(s){var L=s.id;if(this.toBeTiled[L]!=null)return this.toBeTiled[L];var E=s.getChild();if(E==null)return this.toBeTiled[L]=!1,!1;var M=E.getNodes();for(var m=0;m<M.length;m++){var Y=M[m];if(this.getNodeDegree(Y)>0)return this.toBeTiled[L]=!1,!1;if(Y.getChild()==null){this.toBeTiled[Y.id]=!1;continue}if(!this.getToBeTiled(Y))return this.toBeTiled[L]=!1,!1}return this.toBeTiled[L]=!0,!0},G.prototype.getNodeDegree=function(s){var L=s.id,E=s.getEdges(),M=0;for(var m=0;m<E.length;m++){var Y=E[m];if(Y.getSource().id!==Y.getTarget().id)M=M+1}return M},G.prototype.getNodeDegreeWithChildren=function(s){var L=this.getNodeDegree(s);if(s.getChild()==null)return L;var E=s.getChild().getNodes();for(var M=0;M<E.length;M++){var m=E[M];L+=this.getNodeDegreeWithChildren(m)}return L},G.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},G.prototype.fillCompexOrderByDFS=function(s){for(var L=0;L<s.length;L++){var E=s[L];if(E.getChild()!=null)this.fillCompexOrderByDFS(E.getChild().getNodes());if(this.getToBeTiled(E))this.compoundOrder.push(E)}},G.prototype.adjustLocations=function(s,L,E,M,m,Y,b){L+=M+Y,E+=m+b;var Q=L;for(var Z=0;Z<s.rows.length;Z++){var W=s.rows[Z];L=Q;var ht=0;for(var vt=0;vt<W.length;vt++){var k=W[vt];if(k.rect.x=L,k.rect.y=E,L+=k.rect.width+s.horizontalPadding,k.rect.height>ht)ht=k.rect.height}E+=ht+s.verticalPadding}},G.prototype.tileCompoundMembers=function(s,L){var E=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(M){var m=L[M];if(E.tiledMemberPack[M]=E.tileNodes(s[M],m.paddingLeft+m.paddingRight),m.rect.width=E.tiledMemberPack[M].width,m.rect.height=E.tiledMemberPack[M].height,m.setCenter(E.tiledMemberPack[M].centerX,E.tiledMemberPack[M].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var Y=m.rect.width,b=m.rect.height;if(m.labelWidth){if(m.labelPosHorizontal=="left")m.rect.x-=m.labelWidth,m.setWidth(Y+m.labelWidth),m.labelMarginLeft=m.labelWidth;else if(m.labelPosHorizontal=="center"&&m.labelWidth>Y)m.rect.x-=(m.labelWidth-Y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-Y)/2;else if(m.labelPosHorizontal=="right")m.setWidth(Y+m.labelWidth)}if(m.labelHeight){if(m.labelPosVertical=="top")m.rect.y-=m.labelHeight,m.setHeight(b+m.labelHeight),m.labelMarginTop=m.labelHeight;else if(m.labelPosVertical=="center"&&m.labelHeight>b)m.rect.y-=(m.labelHeight-b)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-b)/2;else if(m.labelPosVertical=="bottom")m.setHeight(b+m.labelHeight)}}})},G.prototype.tileNodes=function(s,L){var E=this.tileNodesByFavoringDim(s,L,!0),M=this.tileNodesByFavoringDim(s,L,!1),m=this.getOrgRatio(E),Y=this.getOrgRatio(M),b;if(Y<m)b=M;else b=E;return b},G.prototype.getOrgRatio=function(s){var{width:L,height:E}=s,M=L/E;if(M<1)M=1/M;return M},G.prototype.calcIdealRowWidth=function(s,L){var{TILING_PADDING_VERTICAL:E,TILING_PADDING_HORIZONTAL:M}=g,m=s.length,Y=0,b=0,Q=0;s.forEach(function(at){if(Y+=at.getWidth(),b+=at.getHeight(),at.getWidth()>Q)Q=at.getWidth()});var Z=Y/m,W=b/m,ht=Math.pow(E-M,2)+4*(Z+M)*(W+E)*m,vt=(M-E+Math.sqrt(ht))/(2*(Z+M)),k;if(L){if(k=Math.ceil(vt),k==vt)k++}else k=Math.floor(vt);var dt=k*(Z+M)-M;if(Q>dt)dt=Q;return dt+=M*2,dt},G.prototype.tileNodesByFavoringDim=function(s,L,E){var{TILING_PADDING_VERTICAL:M,TILING_PADDING_HORIZONTAL:m,TILING_COMPARE_BY:Y}=g,b={rows:[],rowWidth:[],rowHeight:[],width:0,height:L,verticalPadding:M,horizontalPadding:m,centerX:0,centerY:0};if(Y)b.idealRowWidth=this.calcIdealRowWidth(s,E);var Q=function(S){return S.rect.width*S.rect.height},Z=function(S,_){return Q(_)-Q(S)};s.sort(function(at,S){var _=Z;if(b.idealRowWidth)return _=Y,_(at.id,S.id);return _(at,S)});var W=0,ht=0;for(var vt=0;vt<s.length;vt++){var k=s[vt];W+=k.getCenterX(),ht+=k.getCenterY()}b.centerX=W/s.length,b.centerY=ht/s.length;for(var vt=0;vt<s.length;vt++){var k=s[vt];if(b.rows.length==0)this.insertNodeToRow(b,k,0,L);else if(this.canAddHorizontal(b,k.rect.width,k.rect.height)){var dt=b.rows.length-1;if(!b.idealRowWidth)dt=this.getShortestRowIndex(b);this.insertNodeToRow(b,k,dt,L)}else this.insertNodeToRow(b,k,b.rows.length,L);this.shiftToLastRow(b)}return b},G.prototype.insertNodeToRow=function(s,L,E,M){var m=M;if(E==s.rows.length){var Y=[];s.rows.push(Y),s.rowWidth.push(m),s.rowHeight.push(0)}var b=s.rowWidth[E]+L.rect.width;if(s.rows[E].length>0)b+=s.horizontalPadding;if(s.rowWidth[E]=b,s.width<b)s.width=b;var Q=L.rect.height;if(E>0)Q+=s.verticalPadding;var Z=0;if(Q>s.rowHeight[E])Z=s.rowHeight[E],s.rowHeight[E]=Q,Z=s.rowHeight[E]-Z;s.height+=Z,s.rows[E].push(L)},G.prototype.getShortestRowIndex=function(s){var L=-1,E=Number.MAX_VALUE;for(var M=0;M<s.rows.length;M++)if(s.rowWidth[M]<E)L=M,E=s.rowWidth[M];return L},G.prototype.getLongestRowIndex=function(s){var L=-1,E=Number.MIN_VALUE;for(var M=0;M<s.rows.length;M++)if(s.rowWidth[M]>E)L=M,E=s.rowWidth[M];return L},G.prototype.canAddHorizontal=function(s,L,E){if(s.idealRowWidth){var M=s.rows.length-1,m=s.rowWidth[M];return m+L+s.horizontalPadding<=s.idealRowWidth}var Y=this.getShortestRowIndex(s);if(Y<0)return!0;var b=s.rowWidth[Y];if(b+s.horizontalPadding+L<=s.width)return!0;var Q=0;if(s.rowHeight[Y]<E){if(Y>0)Q=E+s.verticalPadding-s.rowHeight[Y]}var Z;if(s.width-b>=L+s.horizontalPadding)Z=(s.height+Q)/(b+L+s.horizontalPadding);else Z=(s.height+Q)/s.width;Q=E+s.verticalPadding;var W;if(s.width<L)W=(s.height+Q)/L;else W=(s.height+Q)/s.width;if(W<1)W=1/W;if(Z<1)Z=1/Z;return Z<W},G.prototype.shiftToLastRow=function(s){var L=this.getLongestRowIndex(s),E=s.rowWidth.length-1,M=s.rows[L],m=M[M.length-1],Y=m.width+s.horizontalPadding;if(s.width-s.rowWidth[E]>Y&&L!=E){M.splice(-1,1),s.rows[E].push(m),s.rowWidth[L]=s.rowWidth[L]-Y,s.rowWidth[E]=s.rowWidth[E]+Y,s.width=s.rowWidth[instance.getLongestRowIndex(s)];var b=Number.MIN_VALUE;for(var Q=0;Q<M.length;Q++)if(M[Q].height>b)b=M[Q].height;if(L>0)b+=s.verticalPadding;var Z=s.rowHeight[L]+s.rowHeight[E];if(s.rowHeight[L]=b,s.rowHeight[E]<m.height+s.verticalPadding)s.rowHeight[E]=m.height+s.verticalPadding;var W=s.rowHeight[L]+s.rowHeight[E];s.height+=W-Z,this.shiftToLastRow(s)}},G.prototype.tilingPreLayout=function(){if(g.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},G.prototype.tilingPostLayout=function(){if(g.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},G.prototype.reduceTrees=function(){var s=[],L=!0,E;while(L){var M=this.graphManager.getAllNodes(),m=[];L=!1;for(var Y=0;Y<M.length;Y++)if(E=M[Y],E.getEdges().length==1&&!E.getEdges()[0].isInterGraph&&E.getChild()==null){if(g.PURE_INCREMENTAL){var b=E.getEdges()[0].getOtherEnd(E),Q=new D(E.getCenterX()-b.getCenterX(),E.getCenterY()-b.getCenterY());m.push([E,E.getEdges()[0],E.getOwner(),Q])}else m.push([E,E.getEdges()[0],E.getOwner()]);L=!0}if(L==!0){var Z=[];for(var W=0;W<m.length;W++)if(m[W][0].getEdges().length==1)Z.push(m[W]),m[W][0].getOwner().remove(m[W][0]);s.push(Z),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},G.prototype.growTree=function(s){var L=s.length,E=s[L-1],M;for(var m=0;m<E.length;m++)M=E[m],this.findPlaceforPrunedNode(M),M[2].add(M[0]),M[2].add(M[1],M[1].source,M[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},G.prototype.findPlaceforPrunedNode=function(s){var L,E,M=s[0];if(M==s[1].source)E=s[1].target;else E=s[1].source;if(g.PURE_INCREMENTAL)M.setCenter(E.getCenterX()+s[3].getWidth(),E.getCenterY()+s[3].getHeight());else{var m=E.startX,Y=E.finishX,b=E.startY,Q=E.finishY,Z=0,W=0,ht=0,vt=0,k=[Z,ht,W,vt];if(b>0)for(var dt=m;dt<=Y;dt++)k[0]+=this.grid[dt][b-1].length+this.grid[dt][b].length-1;if(Y<this.grid.length-1)for(var dt=b;dt<=Q;dt++)k[1]+=this.grid[Y+1][dt].length+this.grid[Y][dt].length-1;if(Q<this.grid[0].length-1)for(var dt=m;dt<=Y;dt++)k[2]+=this.grid[dt][Q+1].length+this.grid[dt][Q].length-1;if(m>0)for(var dt=b;dt<=Q;dt++)k[3]+=this.grid[m-1][dt].length+this.grid[m][dt].length-1;var at=x.MAX_VALUE,S,_;for(var rt=0;rt<k.length;rt++)if(k[rt]<at)at=k[rt],S=1,_=rt;else if(k[rt]==at)S++;if(S==3&&at==0){if(k[0]==0&&k[1]==0&&k[2]==0)L=1;else if(k[0]==0&&k[1]==0&&k[3]==0)L=0;else if(k[0]==0&&k[2]==0&&k[3]==0)L=3;else if(k[1]==0&&k[2]==0&&k[3]==0)L=2}else if(S==2&&at==0){var gt=Math.floor(Math.random()*2);if(k[0]==0&&k[1]==0)if(gt==0)L=0;else L=1;else if(k[0]==0&&k[2]==0)if(gt==0)L=0;else L=2;else if(k[0]==0&&k[3]==0)if(gt==0)L=0;else L=3;else if(k[1]==0&&k[2]==0)if(gt==0)L=1;else L=2;else if(k[1]==0&&k[3]==0)if(gt==0)L=1;else L=3;else if(gt==0)L=2;else L=3}else if(S==4&&at==0){var gt=Math.floor(Math.random()*4);L=gt}else L=_;if(L==0)M.setCenter(E.getCenterX(),E.getCenterY()-E.getHeight()/2-c.DEFAULT_EDGE_LENGTH-M.getHeight()/2);else if(L==1)M.setCenter(E.getCenterX()+E.getWidth()/2+c.DEFAULT_EDGE_LENGTH+M.getWidth()/2,E.getCenterY());else if(L==2)M.setCenter(E.getCenterX(),E.getCenterY()+E.getHeight()/2+c.DEFAULT_EDGE_LENGTH+M.getHeight()/2);else M.setCenter(E.getCenterX()-E.getWidth()/2-c.DEFAULT_EDGE_LENGTH-M.getWidth()/2,E.getCenterY())}},o.exports=G},991:(o,n,a)=>{var u=a(551).FDLayoutNode,r=a(551).IMath;function y(e,g,d,c){u.call(this,e,g,d,c)}y.prototype=Object.create(u.prototype);for(var i in u)y[i]=u[i];y.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();if(this.getChild()!=null&&this.fixedNodeWeight)this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight;else this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren;if(Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement)this.displacementX=e.coolingFactor*e.maxNodeDisplacement*r.sign(this.displacementX);if(Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement)this.displacementY=e.coolingFactor*e.maxNodeDisplacement*r.sign(this.displacementY);if(this.child&&this.child.getNodes().length>0)this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(e,g){var d=this.getChild().getNodes(),c;for(var O=0;O<d.length;O++)if(c=d[O],c.getChild()==null)c.displacementX+=e,c.displacementY+=g;else c.propogateDisplacementToChildren(e,g)},y.prototype.move=function(){var e=this.graphManager.getLayout();if(this.child==null||this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY),e.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},y.prototype.setPred1=function(e){this.pred1=e},y.prototype.getPred1=function(){return pred1},y.prototype.getPred2=function(){return pred2},y.prototype.setNext=function(e){this.next=e},y.prototype.getNext=function(){return next},y.prototype.setProcessed=function(e){this.processed=e},y.prototype.isProcessed=function(){return processed},o.exports=y},902:(o,n,a)=>{function u(d){if(Array.isArray(d)){for(var c=0,O=Array(d.length);c<d.length;c++)O[c]=d[c];return O}else return Array.from(d)}var r=a(806),y=a(551).LinkedList,i=a(551).Matrix,e=a(551).SVD;function g(){}g.handleConstraints=function(d){var c={};c.fixedNodeConstraint=d.constraints.fixedNodeConstraint,c.alignmentConstraint=d.constraints.alignmentConstraint,c.relativePlacementConstraint=d.constraints.relativePlacementConstraint;var O=new Map,T=new Map,N=[],D=[],H=d.getAllNodes(),x=0;for(var B=0;B<H.length;B++){var tt=H[B];if(tt.getChild()==null)T.set(tt.id,x++),N.push(tt.getCenterX()),D.push(tt.getCenterY()),O.set(tt.id,tt)}if(c.relativePlacementConstraint)c.relativePlacementConstraint.forEach(function(K){if(!K.gap&&K.gap!=0)if(K.left)K.gap=r.DEFAULT_EDGE_LENGTH+O.get(K.left).getWidth()/2+O.get(K.right).getWidth()/2;else K.gap=r.DEFAULT_EDGE_LENGTH+O.get(K.top).getHeight()/2+O.get(K.bottom).getHeight()/2});var J=function(it,nt){return{x:it.x-nt.x,y:it.y-nt.y}},ft=function(it){var nt=0,ot=0;return it.forEach(function(st){nt+=N[T.get(st)],ot+=D[T.get(st)]}),{x:nt/it.size,y:ot/it.size}},G=function(it,nt,ot,st,ut){function Dt(Nt,mt){var Ot=new Set(Nt),Et=!0,Mt=!1,kt=void 0;try{for(var zt=mt[Symbol.iterator](),re;!(Et=(re=zt.next()).done);Et=!0){var Vt=re.value;Ot.add(Vt)}}catch(Pt){Mt=!0,kt=Pt}finally{try{if(!Et&&zt.return)zt.return()}finally{if(Mt)throw kt}}return Ot}var Ct=new Map;it.forEach(function(Nt,mt){Ct.set(mt,0)}),it.forEach(function(Nt,mt){Nt.forEach(function(Ot){Ct.set(Ot.id,Ct.get(Ot.id)+1)})});var lt=new Map,wt=new Map,At=new y;if(Ct.forEach(function(Nt,mt){if(Nt==0){if(At.push(mt),!ot)if(nt=="horizontal")lt.set(mt,T.has(mt)?N[T.get(mt)]:st.get(mt));else lt.set(mt,T.has(mt)?D[T.get(mt)]:st.get(mt))}else lt.set(mt,Number.NEGATIVE_INFINITY);if(ot)wt.set(mt,new Set([mt]))}),ot)ut.forEach(function(Nt){var mt=[];if(Nt.forEach(function(Mt){if(ot.has(Mt))mt.push(Mt)}),mt.length>0){var Ot=0;mt.forEach(function(Mt){if(nt=="horizontal")lt.set(Mt,T.has(Mt)?N[T.get(Mt)]:st.get(Mt)),Ot+=lt.get(Mt);else lt.set(Mt,T.has(Mt)?D[T.get(Mt)]:st.get(Mt)),Ot+=lt.get(Mt)}),Ot=Ot/mt.length,Nt.forEach(function(Mt){if(!ot.has(Mt))lt.set(Mt,Ot)})}else{var Et=0;Nt.forEach(function(Mt){if(nt=="horizontal")Et+=T.has(Mt)?N[T.get(Mt)]:st.get(Mt);else Et+=T.has(Mt)?D[T.get(Mt)]:st.get(Mt)}),Et=Et/Nt.length,Nt.forEach(function(Mt){lt.set(Mt,Et)})}});var yt=function(){var mt=At.shift(),Ot=it.get(mt);Ot.forEach(function(Et){if(lt.get(Et.id)<lt.get(mt)+Et.gap)if(ot&&ot.has(Et.id)){var Mt=void 0;if(nt=="horizontal")Mt=T.has(Et.id)?N[T.get(Et.id)]:st.get(Et.id);else Mt=T.has(Et.id)?D[T.get(Et.id)]:st.get(Et.id);if(lt.set(Et.id,Mt),Mt<lt.get(mt)+Et.gap){var kt=lt.get(mt)+Et.gap-Mt;wt.get(mt).forEach(function(zt){lt.set(zt,lt.get(zt)-kt)})}}else lt.set(Et.id,lt.get(mt)+Et.gap);if(Ct.set(Et.id,Ct.get(Et.id)-1),Ct.get(Et.id)==0)At.push(Et.id);if(ot)wt.set(Et.id,Dt(wt.get(mt),wt.get(Et.id)))})};while(At.length!=0)yt();if(ot){var xt=new Set;it.forEach(function(Nt,mt){if(Nt.length==0)xt.add(mt)});var Yt=[];wt.forEach(function(Nt,mt){if(xt.has(mt)){var Ot=!1,Et=!0,Mt=!1,kt=void 0;try{for(var zt=Nt[Symbol.iterator](),re;!(Et=(re=zt.next()).done);Et=!0){var Vt=re.value;if(ot.has(Vt))Ot=!0}}catch(Bt){Mt=!0,kt=Bt}finally{try{if(!Et&&zt.return)zt.return()}finally{if(Mt)throw kt}}if(!Ot){var Pt=!1,ae=void 0;if(Yt.forEach(function(Bt,_t){if(Bt.has([].concat(u(Nt))[0]))Pt=!0,ae=_t}),!Pt)Yt.push(new Set(Nt));else Nt.forEach(function(Bt){Yt[ae].add(Bt)})}}}),Yt.forEach(function(Nt,mt){var{POSITIVE_INFINITY:Ot,POSITIVE_INFINITY:Et,NEGATIVE_INFINITY:Mt,NEGATIVE_INFINITY:kt}=Number,zt=!0,re=!1,Vt=void 0;try{for(var Pt=Nt[Symbol.iterator](),ae;!(zt=(ae=Pt.next()).done);zt=!0){var Bt=ae.value,_t=void 0;if(nt=="horizontal")_t=T.has(Bt)?N[T.get(Bt)]:st.get(Bt);else _t=T.has(Bt)?D[T.get(Bt)]:st.get(Bt);var ie=lt.get(Bt);if(_t<Ot)Ot=_t;if(_t>Mt)Mt=_t;if(ie<Et)Et=ie;if(ie>kt)kt=ie}}catch(ve){re=!0,Vt=ve}finally{try{if(!zt&&Pt.return)Pt.return()}finally{if(re)throw Vt}}var Ce=(Ot+Mt)/2-(Et+kt)/2,le=!0,ce=!1,ge=void 0;try{for(var fe=Nt[Symbol.iterator](),we;!(le=(we=fe.next()).done);le=!0){var de=we.value;lt.set(de,lt.get(de)+Ce)}}catch(ve){ce=!0,ge=ve}finally{try{if(!le&&fe.return)fe.return()}finally{if(ce)throw ge}}})}return lt},et=function(it){var nt=0,ot=0,st=0,ut=0;if(it.forEach(function(wt){if(wt.left)N[T.get(wt.left)]-N[T.get(wt.right)]>=0?nt++:ot++;else D[T.get(wt.top)]-D[T.get(wt.bottom)]>=0?st++:ut++}),nt>ot&&st>ut)for(var Dt=0;Dt<T.size;Dt++)N[Dt]=-1*N[Dt],D[Dt]=-1*D[Dt];else if(nt>ot)for(var Ct=0;Ct<T.size;Ct++)N[Ct]=-1*N[Ct];else if(st>ut)for(var lt=0;lt<T.size;lt++)D[lt]=-1*D[lt]},s=function(it){var nt=[],ot=new y,st=new Set,ut=0;return it.forEach(function(Dt,Ct){if(!st.has(Ct)){nt[ut]=[];var lt=Ct;ot.push(lt),st.add(lt),nt[ut].push(lt);while(ot.length!=0){lt=ot.shift();var wt=it.get(lt);wt.forEach(function(At){if(!st.has(At.id))ot.push(At.id),st.add(At.id),nt[ut].push(At.id)})}ut++}}),nt},L=function(it){var nt=new Map;return it.forEach(function(ot,st){nt.set(st,[])}),it.forEach(function(ot,st){ot.forEach(function(ut){nt.get(st).push(ut),nt.get(ut.id).push({id:st,gap:ut.gap,direction:ut.direction})})}),nt},E=function(it){var nt=new Map;return it.forEach(function(ot,st){nt.set(st,[])}),it.forEach(function(ot,st){ot.forEach(function(ut){nt.get(ut.id).push({id:st,gap:ut.gap,direction:ut.direction})})}),nt},M=[],m=[],Y=!1,b=!1,Q=new Set,Z=new Map,W=new Map,ht=[];if(c.fixedNodeConstraint)c.fixedNodeConstraint.forEach(function(K){Q.add(K.nodeId)});if(c.relativePlacementConstraint)c.relativePlacementConstraint.forEach(function(K){if(K.left){if(Z.has(K.left))Z.get(K.left).push({id:K.right,gap:K.gap,direction:"horizontal"});else Z.set(K.left,[{id:K.right,gap:K.gap,direction:"horizontal"}]);if(!Z.has(K.right))Z.set(K.right,[])}else{if(Z.has(K.top))Z.get(K.top).push({id:K.bottom,gap:K.gap,direction:"vertical"});else Z.set(K.top,[{id:K.bottom,gap:K.gap,direction:"vertical"}]);if(!Z.has(K.bottom))Z.set(K.bottom,[])}}),W=L(Z),ht=s(W);if(r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(c.fixedNodeConstraint&&c.fixedNodeConstraint.length>1)c.fixedNodeConstraint.forEach(function(K,it){M[it]=[K.position.x,K.position.y],m[it]=[N[T.get(K.nodeId)],D[T.get(K.nodeId)]]}),Y=!0;else if(c.alignmentConstraint)(function(){var K=0;if(c.alignmentConstraint.vertical){var it=c.alignmentConstraint.vertical,nt=function(lt){var wt=new Set;it[lt].forEach(function(xt){wt.add(xt)});var At=new Set([].concat(u(wt)).filter(function(xt){return Q.has(xt)})),yt=void 0;if(At.size>0)yt=N[T.get(At.values().next().value)];else yt=ft(wt).x;it[lt].forEach(function(xt){M[K]=[yt,D[T.get(xt)]],m[K]=[N[T.get(xt)],D[T.get(xt)]],K++})};for(var ot=0;ot<it.length;ot++)nt(ot);Y=!0}if(c.alignmentConstraint.horizontal){var st=c.alignmentConstraint.horizontal,ut=function(lt){var wt=new Set;st[lt].forEach(function(xt){wt.add(xt)});var At=new Set([].concat(u(wt)).filter(function(xt){return Q.has(xt)})),yt=void 0;if(At.size>0)yt=N[T.get(At.values().next().value)];else yt=ft(wt).y;st[lt].forEach(function(xt){M[K]=[N[T.get(xt)],yt],m[K]=[N[T.get(xt)],D[T.get(xt)]],K++})};for(var Dt=0;Dt<st.length;Dt++)ut(Dt);Y=!0}if(c.relativePlacementConstraint)b=!0})();else if(c.relativePlacementConstraint){var vt=0,k=0;for(var dt=0;dt<ht.length;dt++)if(ht[dt].length>vt)vt=ht[dt].length,k=dt;if(vt<W.size/2)et(c.relativePlacementConstraint),Y=!1,b=!1;else{var at=new Map,S=new Map,_=[];ht[k].forEach(function(K){Z.get(K).forEach(function(it){if(it.direction=="horizontal"){if(at.has(K))at.get(K).push(it);else at.set(K,[it]);if(!at.has(it.id))at.set(it.id,[]);_.push({left:K,right:it.id})}else{if(S.has(K))S.get(K).push(it);else S.set(K,[it]);if(!S.has(it.id))S.set(it.id,[]);_.push({top:K,bottom:it.id})}})}),et(_),b=!1;var rt=G(at,"horizontal"),gt=G(S,"vertical");ht[k].forEach(function(K,it){if(m[it]=[N[T.get(K)],D[T.get(K)]],M[it]=[],rt.has(K))M[it][0]=rt.get(K);else M[it][0]=N[T.get(K)];if(gt.has(K))M[it][1]=gt.get(K);else M[it][1]=D[T.get(K)]}),Y=!0}}if(Y){var Lt=void 0,Gt=i.transpose(M),Zt=i.transpose(m);for(var ct=0;ct<Gt.length;ct++)Gt[ct]=i.multGamma(Gt[ct]),Zt[ct]=i.multGamma(Zt[ct]);var Kt=i.multMat(Gt,i.transpose(Zt)),Ht=e.svd(Kt);Lt=i.multMat(Ht.V,i.transpose(Ht.U));for(var Tt=0;Tt<T.size;Tt++){var pt=[N[Tt],D[Tt]],It=[Lt[0][0],Lt[1][0]],St=[Lt[0][1],Lt[1][1]];N[Tt]=i.dotProduct(pt,It),D[Tt]=i.dotProduct(pt,St)}if(b)et(c.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(c.fixedNodeConstraint&&c.fixedNodeConstraint.length>0){var Ut={x:0,y:0};c.fixedNodeConstraint.forEach(function(K,it){var nt={x:N[T.get(K.nodeId)],y:D[T.get(K.nodeId)]},ot=K.position,st=J(ot,nt);Ut.x+=st.x,Ut.y+=st.y}),Ut.x/=c.fixedNodeConstraint.length,Ut.y/=c.fixedNodeConstraint.length,N.forEach(function(K,it){N[it]+=Ut.x}),D.forEach(function(K,it){D[it]+=Ut.y}),c.fixedNodeConstraint.forEach(function(K){N[T.get(K.nodeId)]=K.position.x,D[T.get(K.nodeId)]=K.position.y})}if(c.alignmentConstraint){if(c.alignmentConstraint.vertical){var Ft=c.alignmentConstraint.vertical,bt=function(it){var nt=new Set;Ft[it].forEach(function(ut){nt.add(ut)});var ot=new Set([].concat(u(nt)).filter(function(ut){return Q.has(ut)})),st=void 0;if(ot.size>0)st=N[T.get(ot.values().next().value)];else st=ft(nt).x;nt.forEach(function(ut){if(!Q.has(ut))N[T.get(ut)]=st})};for(var Wt=0;Wt<Ft.length;Wt++)bt(Wt)}if(c.alignmentConstraint.horizontal){var $t=c.alignmentConstraint.horizontal,ee=function(it){var nt=new Set;$t[it].forEach(function(ut){nt.add(ut)});var ot=new Set([].concat(u(nt)).filter(function(ut){return Q.has(ut)})),st=void 0;if(ot.size>0)st=D[T.get(ot.values().next().value)];else st=ft(nt).y;nt.forEach(function(ut){if(!Q.has(ut))D[T.get(ut)]=st})};for(var Qt=0;Qt<$t.length;Qt++)ee(Qt)}}if(c.relativePlacementConstraint)(function(){var K=new Map,it=new Map,nt=new Map,ot=new Map,st=new Map,ut=new Map,Dt=new Set,Ct=new Set;if(Q.forEach(function(Jt){Dt.add(Jt),Ct.add(Jt)}),c.alignmentConstraint){if(c.alignmentConstraint.vertical){var lt=c.alignmentConstraint.vertical,wt=function(Rt){nt.set("dummy"+Rt,[]),lt[Rt].forEach(function(Xt){if(K.set(Xt,"dummy"+Rt),nt.get("dummy"+Rt).push(Xt),Q.has(Xt))Dt.add("dummy"+Rt)}),st.set("dummy"+Rt,N[T.get(lt[Rt][0])])};for(var At=0;At<lt.length;At++)wt(At)}if(c.alignmentConstraint.horizontal){var yt=c.alignmentConstraint.horizontal,xt=function(Rt){ot.set("dummy"+Rt,[]),yt[Rt].forEach(function(Xt){if(it.set(Xt,"dummy"+Rt),ot.get("dummy"+Rt).push(Xt),Q.has(Xt))Ct.add("dummy"+Rt)}),ut.set("dummy"+Rt,D[T.get(yt[Rt][0])])};for(var Yt=0;Yt<yt.length;Yt++)xt(Yt)}}var Nt=new Map,mt=new Map,Ot=function(Rt){Z.get(Rt).forEach(function(Xt){var oe=void 0,ne=void 0;if(Xt.direction=="horizontal"){if(oe=K.get(Rt)?K.get(Rt):Rt,K.get(Xt.id))ne={id:K.get(Xt.id),gap:Xt.gap,direction:Xt.direction};else ne=Xt;if(Nt.has(oe))Nt.get(oe).push(ne);else Nt.set(oe,[ne]);if(!Nt.has(ne.id))Nt.set(ne.id,[])}else{if(oe=it.get(Rt)?it.get(Rt):Rt,it.get(Xt.id))ne={id:it.get(Xt.id),gap:Xt.gap,direction:Xt.direction};else ne=Xt;if(mt.has(oe))mt.get(oe).push(ne);else mt.set(oe,[ne]);if(!mt.has(ne.id))mt.set(ne.id,[])}})},Et=!0,Mt=!1,kt=void 0;try{for(var zt=Z.keys()[Symbol.iterator](),re;!(Et=(re=zt.next()).done);Et=!0){var Vt=re.value;Ot(Vt)}}catch(Jt){Mt=!0,kt=Jt}finally{try{if(!Et&&zt.return)zt.return()}finally{if(Mt)throw kt}}var Pt=L(Nt),ae=L(mt),Bt=s(Pt),_t=s(ae),ie=E(Nt),Ce=E(mt),le=[],ce=[];Bt.forEach(function(Jt,Rt){le[Rt]=[],Jt.forEach(function(Xt){if(ie.get(Xt).length==0)le[Rt].push(Xt)})}),_t.forEach(function(Jt,Rt){ce[Rt]=[],Jt.forEach(function(Xt){if(Ce.get(Xt).length==0)ce[Rt].push(Xt)})});var ge=G(Nt,"horizontal",Dt,st,le),fe=G(mt,"vertical",Ct,ut,ce),we=function(Rt){if(nt.get(Rt))nt.get(Rt).forEach(function(Xt){N[T.get(Xt)]=ge.get(Rt)});else N[T.get(Rt)]=ge.get(Rt)},de=!0,ve=!1,Xe=void 0;try{for(var Ae=ge.keys()[Symbol.iterator](),He;!(de=(He=Ae.next()).done);de=!0){var De=He.value;we(De)}}catch(Jt){ve=!0,Xe=Jt}finally{try{if(!de&&Ae.return)Ae.return()}finally{if(ve)throw Xe}}var hr=function(Rt){if(ot.get(Rt))ot.get(Rt).forEach(function(Xt){D[T.get(Xt)]=fe.get(Rt)});else D[T.get(Rt)]=fe.get(Rt)},Oe=!0,We=!1,Ve=void 0;try{for(var xe=fe.keys()[Symbol.iterator](),ze;!(Oe=(ze=xe.next()).done);Oe=!0){var De=ze.value;hr(De)}}catch(Jt){We=!0,Ve=Jt}finally{try{if(!Oe&&xe.return)xe.return()}finally{if(We)throw Ve}}})()}for(var jt=0;jt<H.length;jt++){var qt=H[jt];if(qt.getChild()==null)qt.setCenter(N[T.get(qt.id)],D[T.get(qt.id)])}},o.exports=g},551:(o)=>{o.exports=w}},A={};function v(o){var n=A[o];if(n!==void 0)return n.exports;var a=A[o]={exports:{}};return I[o](a,a.exports,v),a.exports}var f=v(45);return f})()})});var $e=Cn(function(Ne,Pe){(function(I,A){if(typeof Ne==="object"&&typeof Pe==="object")Pe.exports=A(Fe());else if(typeof define==="function"&&define.amd)define(["cose-base"],A);else if(typeof Ne==="object")Ne.cytoscapeFcose=A(Fe());else I.cytoscapeFcose=A(I.coseBase)})(Ne,function(w){return(()=>{var I={658:(o)=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(n){for(var a=arguments.length,u=Array(a>1?a-1:0),r=1;r<a;r++)u[r-1]=arguments[r];return u.forEach(function(y){Object.keys(y).forEach(function(i){return n[i]=y[i]})}),n}},548:(o,n,a)=>{var u=function(){function i(e,g){var d=[],c=!0,O=!1,T=void 0;try{for(var N=e[Symbol.iterator](),D;!(c=(D=N.next()).done);c=!0)if(d.push(D.value),g&&d.length===g)break}catch(H){O=!0,T=H}finally{try{if(!c&&N.return)N.return()}finally{if(O)throw T}}return d}return function(e,g){if(Array.isArray(e))return e;else if(Symbol.iterator in Object(e))return i(e,g);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=a(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(i){var e={};for(var g=0;g<i.length;g++)e[i[g].id()]=!0;var d=i.filter(function(c,O){if(typeof c==="number")c=O;var T=c.parent()[0];while(T!=null){if(e[T.id()])return!1;T=T.parent()[0]}return!0});return d},y.connectComponents=function(i,e,g,d){var c=new r,O=new Set,T=[],N=void 0,D=void 0,H=void 0,x=!1,B=1,tt=[],J=[],ft=function(){var et=i.collection();J.push(et);var s=g[0],L=i.collection();L.merge(s).merge(s.descendants().intersection(e)),T.push(s),L.forEach(function(m){c.push(m),O.add(m),et.merge(m)});var E=function(){s=c.shift();var Y=i.collection();s.neighborhood().nodes().forEach(function(W){if(e.intersection(s.edgesWith(W)).length>0)Y.merge(W)});for(var b=0;b<Y.length;b++){var Q=Y[b];if(N=g.intersection(Q.union(Q.ancestors())),N!=null&&!O.has(N[0])){var Z=N.union(N.descendants());Z.forEach(function(W){if(c.push(W),O.add(W),et.merge(W),g.has(W))T.push(W)})}}};while(c.length!=0)E();if(et.forEach(function(m){e.intersection(m.connectedEdges()).forEach(function(Y){if(et.has(Y.source())&&et.has(Y.target()))et.merge(Y)})}),T.length==g.length)x=!0;if(!x||x&&B>1){D=T[0],H=D.connectedEdges().length,T.forEach(function(m){if(m.connectedEdges().length<H)H=m.connectedEdges().length,D=m}),tt.push(D.id());var M=i.collection();M.merge(T[0]),T.forEach(function(m){M.merge(m)}),T=[],g=g.difference(M),B++}};do ft();while(!x);if(d){if(tt.length>0)d.set("dummy"+(d.size+1),tt)}return J},y.relocateComponent=function(i,e,g){if(!g.fixedNodeConstraint){var{POSITIVE_INFINITY:d,NEGATIVE_INFINITY:c,POSITIVE_INFINITY:O,NEGATIVE_INFINITY:T}=Number;if(g.quality=="draft"){var N=!0,D=!1,H=void 0;try{for(var x=e.nodeIndexes[Symbol.iterator](),B;!(N=(B=x.next()).done);N=!0){var tt=B.value,J=u(tt,2),ft=J[0],G=J[1],et=g.cy.getElementById(ft);if(et){var s=et.boundingBox(),L=e.xCoords[G]-s.w/2,E=e.xCoords[G]+s.w/2,M=e.yCoords[G]-s.h/2,m=e.yCoords[G]+s.h/2;if(L<d)d=L;if(E>c)c=E;if(M<O)O=M;if(m>T)T=m}}}catch(W){D=!0,H=W}finally{try{if(!N&&x.return)x.return()}finally{if(D)throw H}}var Y=i.x-(c+d)/2,b=i.y-(T+O)/2;e.xCoords=e.xCoords.map(function(W){return W+Y}),e.yCoords=e.yCoords.map(function(W){return W+b})}else{Object.keys(e).forEach(function(W){var ht=e[W],vt=ht.getRect().x,k=ht.getRect().x+ht.getRect().width,dt=ht.getRect().y,at=ht.getRect().y+ht.getRect().height;if(vt<d)d=vt;if(k>c)c=k;if(dt<O)O=dt;if(at>T)T=at});var Q=i.x-(c+d)/2,Z=i.y-(T+O)/2;Object.keys(e).forEach(function(W){var ht=e[W];ht.setCenter(ht.getCenterX()+Q,ht.getCenterY()+Z)})}}},y.calcBoundingBox=function(i,e,g,d){var{MAX_SAFE_INTEGER:c,MIN_SAFE_INTEGER:O,MAX_SAFE_INTEGER:T,MIN_SAFE_INTEGER:N}=Number,D=void 0,H=void 0,x=void 0,B=void 0,tt=i.descendants().not(":parent"),J=tt.length;for(var ft=0;ft<J;ft++){var G=tt[ft];if(D=e[d.get(G.id())]-G.width()/2,H=e[d.get(G.id())]+G.width()/2,x=g[d.get(G.id())]-G.height()/2,B=g[d.get(G.id())]+G.height()/2,c>D)c=D;if(O<H)O=H;if(T>x)T=x;if(N<B)N=B}var et={};return et.topLeftX=c,et.topLeftY=T,et.width=O-c,et.height=N-T,et},y.calcParentsWithoutChildren=function(i,e){var g=i.collection();return e.nodes(":parent").forEach(function(d){var c=!1;if(d.children().forEach(function(O){if(O.css("display")!="none")c=!0}),!c)g.merge(d)}),g},o.exports=y},816:(o,n,a)=>{var u=a(548),r=a(140).CoSELayout,y=a(140).CoSENode,i=a(140).layoutBase.PointD,e=a(140).layoutBase.DimensionD,g=a(140).layoutBase.LayoutConstants,d=a(140).layoutBase.FDLayoutConstants,c=a(140).CoSEConstants,O=function(N,D){var{cy:H,eles:x}=N,B=x.nodes(),tt=x.edges(),J=void 0,ft=void 0,G=void 0,et={};if(N.randomize)J=D.nodeIndexes,ft=D.xCoords,G=D.yCoords;var s=function(W){return typeof W==="function"},L=function(W,ht){if(s(W))return W(ht);else return W},E=u.calcParentsWithoutChildren(H,x),M=function Z(W,ht,vt,k){var dt=ht.length;for(var at=0;at<dt;at++){var S=ht[at],_=null;if(S.intersection(E).length==0)_=S.children();var rt=void 0,gt=S.layoutDimensions({nodeDimensionsIncludeLabels:k.nodeDimensionsIncludeLabels});if(S.outerWidth()!=null&&S.outerHeight()!=null)if(k.randomize)if(!S.isParent())rt=W.add(new y(vt.graphManager,new i(ft[J.get(S.id())]-gt.w/2,G[J.get(S.id())]-gt.h/2),new e(parseFloat(gt.w),parseFloat(gt.h))));else{var Lt=u.calcBoundingBox(S,ft,G,J);if(S.intersection(E).length==0)rt=W.add(new y(vt.graphManager,new i(Lt.topLeftX,Lt.topLeftY),new e(Lt.width,Lt.height)));else rt=W.add(new y(vt.graphManager,new i(Lt.topLeftX,Lt.topLeftY),new e(parseFloat(gt.w),parseFloat(gt.h))))}else rt=W.add(new y(vt.graphManager,new i(S.position("x")-gt.w/2,S.position("y")-gt.h/2),new e(parseFloat(gt.w),parseFloat(gt.h))));else rt=W.add(new y(this.graphManager));if(rt.id=S.data("id"),rt.nodeRepulsion=L(k.nodeRepulsion,S),rt.paddingLeft=parseInt(S.css("padding")),rt.paddingTop=parseInt(S.css("padding")),rt.paddingRight=parseInt(S.css("padding")),rt.paddingBottom=parseInt(S.css("padding")),k.nodeDimensionsIncludeLabels)rt.labelWidth=S.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,rt.labelHeight=S.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,rt.labelPosVertical=S.css("text-valign"),rt.labelPosHorizontal=S.css("text-halign");if(et[S.data("id")]=rt,isNaN(rt.rect.x))rt.rect.x=0;if(isNaN(rt.rect.y))rt.rect.y=0;if(_!=null&&_.length>0){var Gt=void 0;Gt=vt.getGraphManager().add(vt.newGraph(),rt),Z(Gt,_,vt,k)}}},m=function(W,ht,vt){var k=0,dt=0;for(var at=0;at<vt.length;at++){var S=vt[at],_=et[S.data("source")],rt=et[S.data("target")];if(_&&rt&&_!==rt&&_.getEdgesBetween(rt).length==0){var gt=ht.add(W.newEdge(),_,rt);gt.id=S.id(),gt.idealLength=L(N.idealEdgeLength,S),gt.edgeElasticity=L(N.edgeElasticity,S),k+=gt.idealLength,dt++}}if(N.idealEdgeLength!=null){if(dt>0)c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=k/dt;else if(!s(N.idealEdgeLength))c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=N.idealEdgeLength;else c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50;c.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,c.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH}},Y=function(W,ht){if(ht.fixedNodeConstraint)W.constraints.fixedNodeConstraint=ht.fixedNodeConstraint;if(ht.alignmentConstraint)W.constraints.alignmentConstraint=ht.alignmentConstraint;if(ht.relativePlacementConstraint)W.constraints.relativePlacementConstraint=ht.relativePlacementConstraint};if(N.nestingFactor!=null)c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=N.nestingFactor;if(N.gravity!=null)c.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=N.gravity;if(N.numIter!=null)c.MAX_ITERATIONS=d.MAX_ITERATIONS=N.numIter;if(N.gravityRange!=null)c.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=N.gravityRange;if(N.gravityCompound!=null)c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=N.gravityCompound;if(N.gravityRangeCompound!=null)c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=N.gravityRangeCompound;if(N.initialEnergyOnIncremental!=null)c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=N.initialEnergyOnIncremental;if(N.tilingCompareBy!=null)c.TILING_COMPARE_BY=N.tilingCompareBy;if(N.quality=="proof")g.QUALITY=2;else g.QUALITY=0;if(c.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=N.nodeDimensionsIncludeLabels,c.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=!N.randomize,c.ANIMATE=d.ANIMATE=g.ANIMATE=N.animate,c.TILE=N.tile,c.TILING_PADDING_VERTICAL=typeof N.tilingPaddingVertical==="function"?N.tilingPaddingVertical.call():N.tilingPaddingVertical,c.TILING_PADDING_HORIZONTAL=typeof N.tilingPaddingHorizontal==="function"?N.tilingPaddingHorizontal.call():N.tilingPaddingHorizontal,c.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=!0,c.PURE_INCREMENTAL=!N.randomize,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=N.uniformNodeDimensions,N.step=="transformed")c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!1;if(N.step=="enforced")c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!1;if(N.step=="cose")c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!0;if(N.step=="all"){if(N.randomize)c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!0}if(N.fixedNodeConstraint||N.alignmentConstraint||N.relativePlacementConstraint)c.TREE_REDUCTION_ON_INCREMENTAL=!1;else c.TREE_REDUCTION_ON_INCREMENTAL=!0;var b=new r,Q=b.newGraphManager();return M(Q.addRoot(),u.getTopMostNodes(B),b,N),m(b,Q,tt),Y(b,N),b.runLayout(),et};o.exports={coseLayout:O}},212:(o,n,a)=>{var u=function(){function N(D,H){for(var x=0;x<H.length;x++){var B=H[x];if(B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B)B.writable=!0;Object.defineProperty(D,B.key,B)}}return function(D,H,x){if(H)N(D.prototype,H);if(x)N(D,x);return D}}();function r(N,D){if(!(N instanceof D))throw TypeError("Cannot call a class as a function")}var y=a(658),i=a(548),e=a(657),g=e.spectralLayout,d=a(816),c=d.coseLayout,O=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(D){return 4500},idealEdgeLength:function(D){return 50},edgeElasticity:function(D){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),T=function(){function N(D){r(this,N),this.options=y({},O,D)}return u(N,[{key:"run",value:function(){var H=this,x=this.options,{cy:B,eles:tt}=x,J=[],ft=void 0,G=void 0,et=[],s=void 0,L=[];if(x.fixedNodeConstraint&&(!Array.isArray(x.fixedNodeConstraint)||x.fixedNodeConstraint.length==0))x.fixedNodeConstraint=void 0;if(x.alignmentConstraint){if(x.alignmentConstraint.vertical&&(!Array.isArray(x.alignmentConstraint.vertical)||x.alignmentConstraint.vertical.length==0))x.alignmentConstraint.vertical=void 0;if(x.alignmentConstraint.horizontal&&(!Array.isArray(x.alignmentConstraint.horizontal)||x.alignmentConstraint.horizontal.length==0))x.alignmentConstraint.horizontal=void 0}if(x.relativePlacementConstraint&&(!Array.isArray(x.relativePlacementConstraint)||x.relativePlacementConstraint.length==0))x.relativePlacementConstraint=void 0;var E=x.fixedNodeConstraint||x.alignmentConstraint||x.relativePlacementConstraint;if(E)x.tile=!1,x.packComponents=!1;var M=void 0,m=!1;if(B.layoutUtilities&&x.packComponents){if(M=B.layoutUtilities("get"),!M)M=B.layoutUtilities();m=!0}if(tt.nodes().length>0)if(!m){var Y=x.eles.boundingBox();if(L.push({x:Y.x1+Y.w/2,y:Y.y1+Y.h/2}),x.randomize){var b=g(x);J.push(b)}if(x.quality=="default"||x.quality=="proof")et.push(c(x,J[0])),i.relocateComponent(L[0],et[0],x);else i.relocateComponent(L[0],J[0],x)}else{var Q=i.getTopMostNodes(x.eles.nodes());if(s=i.connectComponents(B,x.eles,Q),s.forEach(function(Tt){var pt=Tt.boundingBox();L.push({x:pt.x1+pt.w/2,y:pt.y1+pt.h/2})}),x.randomize)s.forEach(function(Tt){x.eles=Tt,J.push(g(x))});if(x.quality=="default"||x.quality=="proof"){var Z=B.collection();if(x.tile){var W=new Map,ht=[],vt=[],k=0,dt={nodeIndexes:W,xCoords:ht,yCoords:vt},at=[];if(s.forEach(function(Tt,pt){if(Tt.edges().length==0)Tt.nodes().forEach(function(It,St){if(Z.merge(Tt.nodes()[St]),!It.isParent())dt.nodeIndexes.set(Tt.nodes()[St].id(),k++),dt.xCoords.push(Tt.nodes()[0].position().x),dt.yCoords.push(Tt.nodes()[0].position().y)}),at.push(pt)}),Z.length>1){var S=Z.boundingBox();L.push({x:S.x1+S.w/2,y:S.y1+S.h/2}),s.push(Z),J.push(dt);for(var _=at.length-1;_>=0;_--)s.splice(at[_],1),J.splice(at[_],1),L.splice(at[_],1)}}s.forEach(function(Tt,pt){x.eles=Tt,et.push(c(x,J[pt])),i.relocateComponent(L[pt],et[pt],x)})}else s.forEach(function(Tt,pt){i.relocateComponent(L[pt],J[pt],x)});var rt=new Set;if(s.length>1){var gt=[],Lt=tt.filter(function(Tt){return Tt.css("display")=="none"});s.forEach(function(Tt,pt){var It=void 0;if(x.quality=="draft")It=J[pt].nodeIndexes;if(Tt.nodes().not(Lt).length>0){var St={};St.edges=[],St.nodes=[];var Ut=void 0;if(Tt.nodes().not(Lt).forEach(function(Ft){if(x.quality=="draft")if(!Ft.isParent())Ut=It.get(Ft.id()),St.nodes.push({x:J[pt].xCoords[Ut]-Ft.boundingbox().w/2,y:J[pt].yCoords[Ut]-Ft.boundingbox().h/2,width:Ft.boundingbox().w,height:Ft.boundingbox().h});else{var bt=i.calcBoundingBox(Ft,J[pt].xCoords,J[pt].yCoords,It);St.nodes.push({x:bt.topLeftX,y:bt.topLeftY,width:bt.width,height:bt.height})}else if(et[pt][Ft.id()])St.nodes.push({x:et[pt][Ft.id()].getLeft(),y:et[pt][Ft.id()].getTop(),width:et[pt][Ft.id()].getWidth(),height:et[pt][Ft.id()].getHeight()})}),Tt.edges().forEach(function(Ft){var bt=Ft.source(),Wt=Ft.target();if(bt.css("display")!="none"&&Wt.css("display")!="none"){if(x.quality=="draft"){var $t=It.get(bt.id()),ee=It.get(Wt.id()),Qt=[],jt=[];if(bt.isParent()){var qt=i.calcBoundingBox(bt,J[pt].xCoords,J[pt].yCoords,It);Qt.push(qt.topLeftX+qt.width/2),Qt.push(qt.topLeftY+qt.height/2)}else Qt.push(J[pt].xCoords[$t]),Qt.push(J[pt].yCoords[$t]);if(Wt.isParent()){var K=i.calcBoundingBox(Wt,J[pt].xCoords,J[pt].yCoords,It);jt.push(K.topLeftX+K.width/2),jt.push(K.topLeftY+K.height/2)}else jt.push(J[pt].xCoords[ee]),jt.push(J[pt].yCoords[ee]);St.edges.push({startX:Qt[0],startY:Qt[1],endX:jt[0],endY:jt[1]})}else if(et[pt][bt.id()]&&et[pt][Wt.id()])St.edges.push({startX:et[pt][bt.id()].getCenterX(),startY:et[pt][bt.id()].getCenterY(),endX:et[pt][Wt.id()].getCenterX(),endY:et[pt][Wt.id()].getCenterY()})}}),St.nodes.length>0)gt.push(St),rt.add(pt)}});var Gt=M.packComponents(gt,x.randomize).shifts;if(x.quality=="draft")J.forEach(function(Tt,pt){var It=Tt.xCoords.map(function(Ut){return Ut+Gt[pt].dx}),St=Tt.yCoords.map(function(Ut){return Ut+Gt[pt].dy});Tt.xCoords=It,Tt.yCoords=St});else{var Zt=0;rt.forEach(function(Tt){Object.keys(et[Tt]).forEach(function(pt){var It=et[Tt][pt];It.setCenter(It.getCenterX()+Gt[Zt].dx,It.getCenterY()+Gt[Zt].dy)}),Zt++})}}}var ct=function(pt,It){if(x.quality=="default"||x.quality=="proof"){if(typeof pt==="number")pt=It;var St=void 0,Ut=void 0,Ft=pt.data("id");if(et.forEach(function(Wt){if(Ft in Wt)St={x:Wt[Ft].getRect().getCenterX(),y:Wt[Ft].getRect().getCenterY()},Ut=Wt[Ft]}),x.nodeDimensionsIncludeLabels){if(Ut.labelWidth){if(Ut.labelPosHorizontal=="left")St.x+=Ut.labelWidth/2;else if(Ut.labelPosHorizontal=="right")St.x-=Ut.labelWidth/2}if(Ut.labelHeight){if(Ut.labelPosVertical=="top")St.y+=Ut.labelHeight/2;else if(Ut.labelPosVertical=="bottom")St.y-=Ut.labelHeight/2}}if(St==null)St={x:pt.position("x"),y:pt.position("y")};return{x:St.x,y:St.y}}else{var bt=void 0;if(J.forEach(function(Wt){var $t=Wt.nodeIndexes.get(pt.id());if($t!=null)bt={x:Wt.xCoords[$t],y:Wt.yCoords[$t]}}),bt==null)bt={x:pt.position("x"),y:pt.position("y")};return{x:bt.x,y:bt.y}}};if(x.quality=="default"||x.quality=="proof"||x.randomize){var Kt=i.calcParentsWithoutChildren(B,tt),Ht=tt.filter(function(Tt){return Tt.css("display")=="none"});if(x.eles=tt.not(Ht),tt.nodes().not(":parent").not(Ht).layoutPositions(H,x,ct),Kt.length>0)Kt.forEach(function(Tt){Tt.position(ct(Tt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),N}();o.exports=T},657:(o,n,a)=>{var u=a(548),r=a(140).layoutBase.Matrix,y=a(140).layoutBase.SVD,i=function(g){var{cy:d,eles:c}=g,O=c.nodes(),T=c.nodes(":parent"),N=new Map,D=new Map,H=new Map,x=[],B=[],tt=[],J=[],ft=[],G=[],et=[],s=[],L=void 0,E=void 0,M=1e8,m=0.000000001,{piTol:Y,samplingType:b,nodeSeparation:Q}=g,Z=void 0,W=function(){var nt=0,ot=0,st=!1;while(ot<Z){nt=Math.floor(Math.random()*E),st=!1;for(var ut=0;ut<ot;ut++)if(J[ut]==nt){st=!0;break}if(!st)J[ot]=nt,ot++;else continue}},ht=function(nt,ot,st){var ut=[],Dt=0,Ct=0,lt=0,wt=void 0,At=[],yt=0,xt=1;for(var Yt=0;Yt<E;Yt++)At[Yt]=M;ut[Ct]=nt,At[nt]=0;while(Ct>=Dt){lt=ut[Dt++];var Nt=x[lt];for(var mt=0;mt<Nt.length;mt++)if(wt=D.get(Nt[mt]),At[wt]==M)At[wt]=At[lt]+1,ut[++Ct]=wt;G[lt][ot]=At[lt]*Q}if(st){for(var Ot=0;Ot<E;Ot++)if(G[Ot][ot]<ft[Ot])ft[Ot]=G[Ot][ot];for(var Et=0;Et<E;Et++)if(ft[Et]>yt)yt=ft[Et],xt=Et}return xt},vt=function(nt){var ot=void 0;if(!nt){W();for(var st=0;st<Z;st++)ht(J[st],st,nt,!1)}else{ot=Math.floor(Math.random()*E),L=ot;for(var ut=0;ut<E;ut++)ft[ut]=M;for(var Dt=0;Dt<Z;Dt++)J[Dt]=ot,ot=ht(ot,Dt,nt)}for(var Ct=0;Ct<E;Ct++)for(var lt=0;lt<Z;lt++)G[Ct][lt]*=G[Ct][lt];for(var wt=0;wt<Z;wt++)et[wt]=[];for(var At=0;At<Z;At++)for(var yt=0;yt<Z;yt++)et[At][yt]=G[J[yt]][At]},k=function(){var nt=y.svd(et),{S:ot,U:st,V:ut}=nt,Dt=ot[0]*ot[0]*ot[0],Ct=[];for(var lt=0;lt<Z;lt++){Ct[lt]=[];for(var wt=0;wt<Z;wt++)if(Ct[lt][wt]=0,lt==wt)Ct[lt][wt]=ot[lt]/(ot[lt]*ot[lt]+Dt/(ot[lt]*ot[lt]))}s=r.multMat(r.multMat(ut,Ct),r.transpose(st))},dt=function(){var nt=void 0,ot=void 0,st=[],ut=[],Dt=[],Ct=[];for(var lt=0;lt<E;lt++)st[lt]=Math.random(),ut[lt]=Math.random();st=r.normalize(st),ut=r.normalize(ut);var wt=0,At=m,yt=m,xt=void 0;while(!0){wt++;for(var Yt=0;Yt<E;Yt++)Dt[Yt]=st[Yt];if(st=r.multGamma(r.multL(r.multGamma(Dt),G,s)),nt=r.dotProduct(Dt,st),st=r.normalize(st),At=r.dotProduct(Dt,st),xt=Math.abs(At/yt),xt<=1+Y&&xt>=1)break;yt=At}for(var Nt=0;Nt<E;Nt++)Dt[Nt]=st[Nt];wt=0,yt=m;while(!0){wt++;for(var mt=0;mt<E;mt++)Ct[mt]=ut[mt];if(Ct=r.minusOp(Ct,r.multCons(Dt,r.dotProduct(Dt,Ct))),ut=r.multGamma(r.multL(r.multGamma(Ct),G,s)),ot=r.dotProduct(Ct,ut),ut=r.normalize(ut),At=r.dotProduct(Ct,ut),xt=Math.abs(At/yt),xt<=1+Y&&xt>=1)break;yt=At}for(var Ot=0;Ot<E;Ot++)Ct[Ot]=ut[Ot];B=r.multCons(Dt,Math.sqrt(Math.abs(nt))),tt=r.multCons(Ct,Math.sqrt(Math.abs(ot)))};u.connectComponents(d,c,u.getTopMostNodes(O),N),T.forEach(function(it){u.connectComponents(d,c,u.getTopMostNodes(it.descendants().intersection(c)),N)});var at=0;for(var S=0;S<O.length;S++)if(!O[S].isParent())D.set(O[S].id(),at++);var _=!0,rt=!1,gt=void 0;try{for(var Lt=N.keys()[Symbol.iterator](),Gt;!(_=(Gt=Lt.next()).done);_=!0){var Zt=Gt.value;D.set(Zt,at++)}}catch(it){rt=!0,gt=it}finally{try{if(!_&&Lt.return)Lt.return()}finally{if(rt)throw gt}}for(var ct=0;ct<D.size;ct++)x[ct]=[];T.forEach(function(it){var nt=it.children().intersection(c);while(nt.nodes(":childless").length==0)nt=nt.nodes()[0].children().intersection(c);var ot=0,st=nt.nodes(":childless")[0].connectedEdges().length;nt.nodes(":childless").forEach(function(ut,Dt){if(ut.connectedEdges().length<st)st=ut.connectedEdges().length,ot=Dt}),H.set(it.id(),nt.nodes(":childless")[ot].id())}),O.forEach(function(it){var nt=void 0;if(it.isParent())nt=D.get(H.get(it.id()));else nt=D.get(it.id());it.neighborhood().nodes().forEach(function(ot){if(c.intersection(it.edgesWith(ot)).length>0)if(ot.isParent())x[nt].push(H.get(ot.id()));else x[nt].push(ot.id())})});var Kt=function(nt){var ot=D.get(nt),st=void 0;N.get(nt).forEach(function(ut){if(d.getElementById(ut).isParent())st=H.get(ut);else st=ut;x[ot].push(st),x[D.get(st)].push(nt)})},Ht=!0,Tt=!1,pt=void 0;try{for(var It=N.keys()[Symbol.iterator](),St;!(Ht=(St=It.next()).done);Ht=!0){var Ut=St.value;Kt(Ut)}}catch(it){Tt=!0,pt=it}finally{try{if(!Ht&&It.return)It.return()}finally{if(Tt)throw pt}}E=D.size;var Ft=void 0;if(E>2){Z=E<g.sampleSize?E:g.sampleSize;for(var bt=0;bt<E;bt++)G[bt]=[];for(var Wt=0;Wt<Z;Wt++)s[Wt]=[];if(g.quality=="draft"||g.step=="all")vt(b),k(),dt(),Ft={nodeIndexes:D,xCoords:B,yCoords:tt};else D.forEach(function(it,nt){B.push(d.getElementById(nt).position("x")),tt.push(d.getElementById(nt).position("y"))}),Ft={nodeIndexes:D,xCoords:B,yCoords:tt};return Ft}else{var $t=D.keys(),ee=d.getElementById($t.next().value),Qt=ee.position(),jt=ee.outerWidth();if(B.push(Qt.x),tt.push(Qt.y),E==2){var qt=d.getElementById($t.next().value),K=qt.outerWidth();B.push(Qt.x+jt/2+K/2+g.idealEdgeLength),tt.push(Qt.y)}return Ft={nodeIndexes:D,xCoords:B,yCoords:tt},Ft}};o.exports={spectralLayout:i}},579:(o,n,a)=>{var u=a(212),r=function(i){if(!i)return;i("layout","fcose",u)};if(typeof cytoscape<"u")r(cytoscape);o.exports=r},140:(o)=>{o.exports=w}},A={};function v(o){var n=A[o];if(n!==void 0)return n.exports;var a=A[o]={exports:{}};return I[o](a,a.exports,v),a.exports}var f=v(579);return f})()})});var je=dn($e(),1);var Be={L:"left",R:"right",T:"top",B:"bottom"},Ze={L:t((w)=>`${w},${w/2} 0,${w} 0,0`,"L"),R:t((w)=>`0,${w/2} ${w},0 ${w},${w}`,"R"),T:t((w)=>`0,0 ${w},0 ${w/2},${w}`,"T"),B:t((w)=>`${w/2},0 ${w},${w} 0,${w}`,"B")},Me={L:t((w,I)=>w-I+2,"L"),R:t((w,I)=>w-2,"R"),T:t((w,I)=>w-I+2,"T"),B:t((w,I)=>w-2,"B")},lr=t(function(w){if(te(w))return w==="L"?"R":"L";else return w==="T"?"B":"T"},"getOppositeArchitectureDirection"),ke=t(function(w){let I=w;return I==="L"||I==="R"||I==="T"||I==="B"},"isArchitectureDirection"),te=t(function(w){let I=w;return I==="L"||I==="R"},"isArchitectureDirectionX"),he=t(function(w){let I=w;return I==="T"||I==="B"},"isArchitectureDirectionY"),Ye=t(function(w,I){let A=te(w)&&he(I),v=he(w)&&te(I);return A||v},"isArchitectureDirectionXY"),fr=t(function(w){let I=w[0],A=w[1],v=te(I)&&he(A),f=he(I)&&te(A);return v||f},"isArchitecturePairXY"),cr=t(function(w){return w!=="LL"&&w!=="RR"&&w!=="TT"&&w!=="BB"},"isValidArchitectureDirectionPair"),Ge=t(function(w,I){let A=`${w}${I}`;return cr(A)?A:void 0},"getArchitectureDirectionPair"),gr=t(function([w,I],A){let v=A[0],f=A[1];if(te(v))if(he(f))return[w+(v==="L"?-1:1),I+(f==="T"?1:-1)];else return[w+(v==="L"?-1:1),I];else if(te(f))return[w+(f==="L"?1:-1),I+(v==="T"?1:-1)];else return[w,I+(v==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ur=t(function(w){if(w==="LT"||w==="TL")return[1,1];else if(w==="BL"||w==="LB")return[1,-1];else if(w==="BR"||w==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),dr=t(function(w,I){if(Ye(w,I))return"bend";else if(te(w))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),vr=t(function(w){return w.type==="service"},"isArchitectureService"),pr=t(function(w){return w.type==="junction"},"isArchitectureJunction"),qe=t((w,I)=>{let[A,v]=[w,I].sort();return`${JSON.stringify(A)}-${JSON.stringify(v)}`},"architectureGroupAlignmentKey"),Qe=t((w)=>w.data(),"edgeData"),ye=t((w)=>w.data(),"nodeData"),yr=V.architecture,Je=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=F,this.getAccTitle=z,this.setDiagramTitle=q,this.getDiagramTitle=j,this.getAccDescription=U,this.setAccDescription=P,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(w){this.diagramId=w}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",R()}addService({id:w,icon:I,in:A,title:v,iconText:f}){if(this.registeredIds.has(w))throw Error(`The service id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(A!==void 0){if(w===A)throw Error(`The service [${w}] cannot be placed within itself`);if(!this.registeredIds.has(A))throw Error(`The service [${w}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(A)==="node")throw Error(`The service [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"service",icon:I,iconText:f,title:v,edges:[],in:A})}getServices(){return[...this.nodes.values()].filter(vr)}addJunction({id:w,in:I}){if(this.registeredIds.has(w))throw Error(`The junction id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(I!==void 0){if(w===I)throw Error(`The junction [${w}] cannot be placed within itself`);if(!this.registeredIds.has(I))throw Error(`The junction [${w}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(I)==="node")throw Error(`The junction [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"junction",edges:[],in:I})}getJunctions(){return[...this.nodes.values()].filter(pr)}getNodes(){return[...this.nodes.values()]}getNode(w){return this.nodes.get(w)??null}addGroup({id:w,icon:I,in:A,title:v}){if(this.registeredIds.has(w))throw Error(`The group id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(A!==void 0){if(w===A)throw Error(`The group [${w}] cannot be placed within itself`);if(!this.registeredIds.has(A))throw Error(`The group [${w}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(A)==="node")throw Error(`The group [${w}]'s parent is not a group`)}this.registeredIds.set(w,"group"),this.groups.set(w,{id:w,icon:I,title:v,in:A})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:w,rhsId:I,lhsDir:A,rhsDir:v,lhsInto:f,rhsInto:o,lhsGroup:n,rhsGroup:a,title:u}){if(!ke(A))throw Error(`Invalid direction given for left hand side of edge ${w}--${I}. Expected (L,R,T,B) got ${String(A)}`);if(!ke(v))throw Error(`Invalid direction given for right hand side of edge ${w}--${I}. Expected (L,R,T,B) got ${String(v)}`);if(!this.nodes.has(w)&&!this.groups.has(w))throw Error(`The left-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(I)&&!this.groups.has(I))throw Error(`The right-hand id [${I}] does not yet exist. Please create the service/group before declaring an edge to it.`);let r=this.nodes.get(w).in,y=this.nodes.get(I).in;if(n&&r&&y&&r==y)throw Error(`The left-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&r&&y&&r==y)throw Error(`The right-hand id [${I}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let i={lhsId:w,lhsDir:A,lhsInto:f,lhsGroup:n,rhsId:I,rhsDir:v,rhsInto:o,rhsGroup:a,title:u};this.edges.push(i);let e=this.nodes.get(w),g=this.nodes.get(I);if(e&&g)e.edges.push(this.edges[this.edges.length-1]),g.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(w){if(w.members.length<2)throw Error(`An align directive requires at least two members; got ${w.members.length}`);let I=new Set;w.members.forEach((A)=>{if(this.registeredIds.get(A)!=="node")throw Error(`align ${w.direction} references [${A}], which is not a service or junction`);if(I.has(A))throw Error(`align ${w.direction} lists [${A}] more than once`);I.add(A)}),this.layoutHints.push(w)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let w=new Map,I=new Map;for(let[n,a]of this.nodes.entries()){let u=new Map;for(let r of a.edges){let y=this.getNode(r.lhsId)?.in,i=this.getNode(r.rhsId)?.in;if(y&&i&&y!==i){let e=dr(r.lhsDir,r.rhsDir);if(e!=="bend")w.set(qe(y,i),e)}if(r.lhsId===n){let e=Ge(r.lhsDir,r.rhsDir);if(e)u.set(e,r.rhsId)}else{let e=Ge(r.rhsDir,r.lhsDir);if(e)u.set(e,r.lhsId)}}I.set(n,u)}let A=new Set,v=new Set(I.keys()),f=t((n)=>{let a=new Map([[n,[0,0]]]),u=[n];while(u.length>0){let r=u.shift();if(r){A.add(r),v.delete(r);let y=I.get(r);if(!y)throw Error(`BFS error: adjacency list for id ${r} not found. Please report this as a bug.`);let i=a.get(r);if(!i)throw Error(`BFS error: position for id ${r} not found in spatial map. Please report this as a bug.`);let[e,g]=i;y.forEach((d,c)=>{if(!A.has(d))a.set(d,gr([e,g],c)),u.push(d)})}}return a},"BFS"),o=[];while(v.size>0){let n=v.values().next().value;o.push(f(n))}this.dataStructures={adjList:I,spatialMaps:o,groupAlignments:w}}return this.dataStructures}setElementForId(w,I){this.elements.set(w,I)}getElementById(w){return this.elements.get(w)}getConfig(){return se({...yr,...C().architecture})}getConfigField(w){return this.getConfig()[w]}},mr=t((w,I)=>{be(w,I),w.groups.map((A)=>I.addGroup(A)),w.services.map((A)=>I.addService({...A,type:"service"})),w.junctions.map((A)=>I.addJunction({...A,type:"junction"})),w.edges.map((A)=>I.addEdge(A)),w.alignments?.map((A)=>I.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ke={parser:{yy:void 0},parse:t(async(w)=>{let I=await Te("architecture",w);l.debug(I);let A=Ke.parser?.yy;if(!(A instanceof Je))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");mr(I,A)},"parse")},Er=t((w)=>`
2
2
  .edge {
3
3
  stroke-width: ${w.archEdgeWidth};
4
4
  stroke: ${w.archEdgeColor};