/* Highcharts JS v9.1.0 (2021-05-03) (c) 2009-2021 Torstein Honsi License: www.highcharts.com/license */ (function(m){"object"===typeof module&&module.exports?(m["default"]=m,module.exports=m):"function"===typeof define&&define.amd?define("highcharts/modules/series-label",["highcharts"],function(u){m(u);m.Highcharts=u;return m}):m("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(m){function u(m,z,y,u){m.hasOwnProperty(z)||(m[z]=u.apply(null,y))}m=m?m._modules:{};u(m,"Extensions/SeriesLabel.js",[m["Core/Animation/AnimationUtilities.js"],m["Core/Chart/Chart.js"],m["Core/FormatUtilities.js"], m["Core/Options.js"],m["Core/Series/Series.js"],m["Core/Renderer/SVG/SVGRenderer.js"],m["Core/Utilities.js"]],function(m,u,y,I,D,J,x){function B(e,d,a,l,f,g){e=(g-d)*(a-e)-(l-d)*(f-e);return 0e)}function C(e,d,a,l,f,g,b,k){return B(e,d,f,g,b,k)!==B(a,l,f,g,b,k)&&B(e,d,a,l,f,g)!==B(e,d,a,l,b,k)}function z(e,d,a,l,f,g,b,k){return C(e,d,e+a,d,f,g,b,k)||C(e+a,d,e+a,d+l,f,g,b,k)||C(e,d+l,e+a,d+l,f,g,b,k)||C(e,d,e,d+l,f,g,b,k)}function G(e){if(this.renderer){var d=this,a=E(d.renderer.globalAnimation).duration; d.labelSeries=[];d.labelSeriesMaxSum=0;x.clearTimeout(d.seriesLabelTimer);d.series.forEach(function(l){var f=l.options.label,g=l.labelBySeries,b=g&&g.closest;f.enabled&&l.visible&&(l.graph||l.area)&&!l.isSeriesBoosting&&(d.labelSeries.push(l),f.minFontSize&&f.maxFontSize&&(l.sum=l.yData.reduce(function(a,b){return(a||0)+(b||0)},0),d.labelSeriesMaxSum=Math.max(d.labelSeriesMaxSum,l.sum)),"load"===e.type&&(a=Math.max(a,E(l.options.animation).duration)),b&&("undefined"!==typeof b[0].plotX?g.animate({x:b[0].plotX+ b[1],y:b[0].plotY+b[2]}):g.attr({opacity:0})))});d.seriesLabelTimer=K(function(){d.series&&d.labelSeries&&d.drawSeriesLabels()},d.renderer.forExport||!a?0:a)}}var E=m.animObject,L=y.format;m=I.setOptions;y=x.addEvent;var H=x.extend,M=x.fireEvent,F=x.isNumber,A=x.pick,K=x.syncTimeout;"";m({plotOptions:{series:{label:{enabled:!0,connectorAllowed:!1,connectorNeighbourDistance:24,format:void 0,formatter:void 0,minFontSize:null,maxFontSize:null,onArea:null,style:{fontWeight:"bold"},boxesToAvoid:[]}}}}); J.prototype.symbols.connector=function(e,d,a,l,f){var g=f&&f.anchorX;f=f&&f.anchorY;var b=a/2;if(F(g)&&F(f)){var k=[["M",g,f]];var h=d-f;0>h&&(h=-l-h);hd+l?k.push(["L",e+b,d+l]):fe+a&&k.push(["L",e+a,d+l/2])}return k||[]};D.prototype.getPointsOnGraph=function(){function e(b){var c=Math.round(b.plotX/8)+","+Math.round(b.plotY/8);n[c]||(n[c]=1,a.push(b))}if(this.xAxis||this.yAxis){var d=this.points,a=[],l;var f=this.graph||this.area; var g=f.element;var b=this.chart.inverted,k=this.xAxis;var h=this.yAxis;var m=b?h.pos:k.pos;b=b?k.pos:h.pos;k=A(this.options.label.onArea,!!this.area);var w=h.getThreshold(this.options.threshold),n={};if(this.getPointSpline&&g.getPointAtLength&&!k&&d.lengthn.right||cn.bottom||q=e-16&&n[c-1].chartX<=e+a.width+16){if(z(e,d,a.width,a.height,n[c-1].chartX,n[c-1].chartY,n[c].chartX,n[c].chartY))return!1;this===v&&!b&&l&&(b=z(e-16,d-16,a.width+32,a.height+32,n[c-1].chartX,n[c-1].chartY,n[c].chartX,n[c].chartY))}if((h||b)&&(this!==v||k)){q=e+a.width/2-n[c].chartX;var u=d+a.height/2-n[c].chartY;f=Math.min(f,q*q+u*u)}}if(!k&&h&&this===v&&(l&&!b||fd&&a<=e-c.width&&b>=m&&b<=m+n-c.height}var f=a.options.label;if(f&&(a.xAxis||a.yAxis)){var g=[],b,k,h=(k=e.inverted)?a.yAxis.pos:a.xAxis.pos,m=k?a.xAxis.pos:a.yAxis.pos,u=e.inverted?a.yAxis.len:a.xAxis.len,n=e.inverted? a.xAxis.len:a.yAxis.len,c=a.interpolatedPoints,v=A(f.onArea,!!a.area),q=a.labelBySeries,x=!q;var p=f.minFontSize;var r=f.maxFontSize;var t="highcharts-color-"+A(a.colorIndex,"none");if(v&&!k){k=[a.xAxis.toPixels(a.xData[0]),a.xAxis.toPixels(a.xData[a.xData.length-1])];var y=Math.min.apply(Math,k);var z=Math.max.apply(Math,k)}if(a.visible&&!a.isSeriesBoosting&&c){q||(q=a.name,"string"===typeof f.format?q=L(f.format,a,e):f.formatter&&(q=f.formatter.call(a)),a.labelBySeries=q=e.renderer.label(q,0,-9999, "connector").addClass("highcharts-series-label highcharts-series-label-"+a.index+" "+(a.options.className||"")+" "+t),e.renderer.styledMode||(q.css(H({color:v?e.renderer.getContrast(a.color):a.color},f.style||{})),q.attr({opacity:e.renderer.forExport?1:0,stroke:a.color,"stroke-width":1})),p&&r&&q.css({fontSize:a.labelFontSize(p,r)}),q.attr({padding:0,zIndex:3}).add());p=q.getBBox();p.width=Math.round(p.width);for(k=c.length-1;0=h;r-=16)for(t=m;t=c&&(f={x:g.x,y:g.y},g={}),c=void 0,x&&(c=E(a.options.animation),c.duration*=.2),a.labelBySeries.attr(H(g,{anchorX:b.connectorPoint&&b.connectorPoint.plotX+ h,anchorY:b.connectorPoint&&b.connectorPoint.plotY+m})).animate(f,c),a.options.kdNow=!0,a.buildKDTree(),a=a.searchPoint({chartX:b.x,chartY:b.y},!0)))q.closest=[a,b.x-(a.plotX||0),b.y-(a.plotY||0)]}else q&&(a.labelBySeries=q.destroy())}else q&&(a.labelBySeries=q.destroy())}});M(e,"afterDrawSeriesLabels")};y(u,"load",G);y(u,"redraw",G)});u(m,"masters/modules/series-label.src.js",[],function(){})}); //# sourceMappingURL=series-label.js.map