/* Highcharts JS v7.0.3 (2019-02-06) Sankey diagram module (c) 2010-2019 Torstein Honsi License: www.highcharts.com/license */ (function(k){"object"===typeof module&&module.exports?(k["default"]=k,module.exports=k):"function"===typeof define&&define.amd?define(function(){return k}):k("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(k){(function(g){g.NodesMixin={createNode:function(k){function l(b,c){return g.find(b,function(a){return a.id===c})}var e=l(this.nodes,k),t=this.pointClass,b;e||(b=this.options.nodes&&l(this.options.nodes,k),e=(new t).init(this,g.extend({className:"highcharts-node",isNode:!0,id:k,y:1}, b)),e.linksTo=[],e.linksFrom=[],e.formatPrefix="node",e.name=e.name||e.options.id,e.getSum=function(){var b=0,c=0;e.linksTo.forEach(function(a){b+=a.weight});e.linksFrom.forEach(function(a){c+=a.weight});return Math.max(b,c)},e.offset=function(b,c){for(var a=0,d=0;da&&(a=f.fromNode.column);c.column=a+1}b[c.column]||(b[c.column]=this.createNodeColumn());b[c.column].push(c)},this);for(var d=0;dm;a.inverted&& (g=a.plotSizeY-g,h=a.plotSizeY-h,c=a.plotSizeX-c,e=-e,f=-f,p=m>c);b.shapeType="path";b.linkBase=[g,g+f,h,h+f];if(p)b.shapeArgs={d:["M",m+e,g,"C",m+e+k,g,c-k,h,c,h,"L",c+(n?e:0),h+f/2,"L",c,h+f,"C",c-k,h+f,m+e+k,g+f,m+e,g+f,"z"]};else{var k=c-20-f,n=c-20,p=c,u=m+e,r=u+20,l=r+f,t=g,v=g+f,y=v+20,a=y+(a.plotHeight-g-f),q=a+20,x=q+f,z=h,w=z+f,A=w+20,B=q+.7*f,C=p-.7*f,D=u+.7*f;b.shapeArgs={d:["M",u,t,"C",D,t,l,v-.7*f,l,y,"L",l,a,"C",l,B,D,x,u,x,"L",p,x,"C",C,x,k,B,k,a,"L",k,A,"C",k,w-.7*f,C,z,p,z,"L",p, w,"C",n,w,n,w,n,A,"L",n,a,"C",n,q,n,q,p,q,"L",u,q,"C",r,q,r,q,r,a,"L",r,y,"C",r,v,r,v,u,v,"z"]}}b.dlBox={x:m+(c-m+e)/2,y:g+(h-g)/2,height:f,width:0};b.y=b.plotY=1;b.color||(b.color=d.color)},translate:function(){this.processedXData||this.processData();this.generatePoints();this.nodeColumns=this.createNodeColumns();var b=this,d=this.chart,c=this.options.nodeWidth,a=this.nodeColumns,e=this.getNodePadding();this.translationFactor=a.reduce(function(a,b){return Math.min(a,(d.plotSizeY-(b.length-1)*e)/ b.sum())},Infinity);this.colDistance=(d.plotSizeX-c)/(a.length-1);a.forEach(function(a){a.forEach(function(c){b.translateNode(c,a)})},this);this.nodes.forEach(function(a){a.linksFrom.forEach(function(a){b.translateLink(a)})})},render:function(){var b=this.points;this.points=this.points.concat(this.nodes);g.seriesTypes.column.prototype.render.call(this);this.points=b},animate:g.Series.prototype.animate,destroy:function(){this.data=[].concat(this.points,this.nodes);g.Series.prototype.destroy.call(this)}}, {getClassName:function(){return(this.isNode?"highcharts-node ":"highcharts-link ")+t.prototype.getClassName.call(this)},isValid:function(){return this.isNode||"number"===typeof this.weight}})})(k)}); //# sourceMappingURL=sankey.js.map