/*
Highcharts JS v9.1.1 (2021-06-03)
Boost module
(c) 2010-2021 Highsoft AS
Author: Torstein Honsi
License: www.highcharts.com/license
*/
'use strict';(function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/boost-canvas",["highcharts"],function(g){c(g);c.Highcharts=g;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function g(c,g,v,B){c.hasOwnProperty(g)||(c[g]=B.apply(null,v))}c=c?c._modules:{};g(c,"Extensions/BoostCanvas.js",[c["Core/Chart/Chart.js"],c["Core/Color/Color.js"],c["Core/Globals.js"],c["Core/Color/Palette.js"],
c["Core/Series/Series.js"],c["Core/Series/SeriesRegistry.js"],c["Core/Utilities.js"]],function(c,g,v,B,C,D,r){var ea=g.parse,E=v.doc,fa=v.noop,m=D.seriesTypes,F=r.addEvent,y=r.extend,ha=r.fireEvent,ia=r.isNumber,ja=r.merge,ka=r.pick,z=r.wrap,P;return function(){v.seriesTypes.heatmap&&z(v.seriesTypes.heatmap.prototype,"drawPoints",function(){var a=this.chart,b=this.getContext(),f=this.chart.inverted,c=this.xAxis,d=this.yAxis;b?(this.points.forEach(function(e){var k=e.plotY;if("undefined"!==typeof k&&
!isNaN(k)&&null!==e.y&&b){var l=e.shapeArgs||{};k=l.x;k=void 0===k?0:k;var g=l.y;g=void 0===g?0:g;var u=l.width;u=void 0===u?0:u;l=l.height;l=void 0===l?0:l;e=a.styledMode?e.series.colorAttribs(e):e.series.pointAttribs(e);b.fillStyle=e.fill;f?b.fillRect(d.len-g+c.left,c.len-k+d.top,-l,-u):b.fillRect(k+c.left,g+d.top,u,l)}}),this.canvasToSVG()):this.chart.showLoading("Your browser doesn't support HTML5 canvas,
please use a modern browser")});y(C.prototype,{getContext:function(){var a=this.chart,
b=a.chartWidth,f=a.chartHeight,c=a.seriesGroup||this.group,d=this,g=function(a,d,f,b,c,e,g){a.call(this,f,d,b,c,e,g)};a.isChartSeriesBoosting()&&(d=a,c=a.seriesGroup);var k=d.ctx;d.canvas||(d.canvas=E.createElement("canvas"),d.renderTarget=a.renderer.image("",0,0,b,f).addClass("highcharts-boost-canvas").add(c),d.ctx=k=d.canvas.getContext("2d"),a.inverted&&["moveTo","lineTo","rect","arc"].forEach(function(a){z(k,a,g)}),d.boostCopy=function(){d.renderTarget.attr({href:d.canvas.toDataURL("image/png")})},
d.boostClear=function(){k.clearRect(0,0,d.canvas.width,d.canvas.height);d===this&&d.renderTarget.attr({href:""})},d.boostClipRect=a.renderer.clipRect(),d.renderTarget.clip(d.boostClipRect));d.canvas.width!==b&&(d.canvas.width=b);d.canvas.height!==f&&(d.canvas.height=f);d.renderTarget.attr({x:0,y:0,width:b,height:f,style:"pointer-events: none",href:""});d.boostClipRect.attr(a.getBoostClipRect(d));return k},canvasToSVG:function(){this.chart.isChartSeriesBoosting()?this.boostClear&&this.boostClear():
(this.boostCopy||this.chart.boostCopy)&&(this.boostCopy||this.chart.boostCopy)()},cvsLineTo:function(a,b,f){a.lineTo(b,f)},renderCanvas:function(){var a=this,b=a.options,f=a.chart,c=this.xAxis,d=this.yAxis,m=(f.options.boost||{}).timeRendering||!1,k=0,l=a.processedXData,z=a.processedYData,u=b.data,n=c.getExtremes(),G=n.min,H=n.max;n=d.getExtremes();var C=n.min,D=n.max,Q={},I,E=!!a.sampling,J=b.marker&&b.marker.radius,R=this.cvsDrawPoint,K=b.lineWidth?this.cvsLineTo:void 0,S=J&&1>=J?this.cvsMarkerSquare:
this.cvsMarkerCircle,la=this.cvsStrokeBatch||1E3,ma=!1!==b.enableMouseTracking,T;n=b.threshold;var w=d.getThreshold(n),U=ia(n),V=w,na=this.fill,W=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),X=!!b.stacking,Y=a.cropStart||0;n=f.options.loading;var oa=a.requireSorting,Z,pa=b.connectNulls,aa=!l,L,M,x,A,N,t=X?a.data:l||u,qa=a.fillOpacity?(new g(a.color)).setOpacity(ka(b.fillOpacity,.75)).get():a.color,ba=function(){na?(p.fillStyle=qa,p.fill()):(p.strokeStyle=a.color,p.lineWidth=b.lineWidth,
p.stroke())},ca=function(d,b,c,e){0===k&&(p.beginPath(),K&&(p.lineJoin="round"));f.scroller&&"highcharts-navigator-series"===a.options.className?(b+=f.scroller.top,c&&(c+=f.scroller.top)):b+=f.plotTop;d+=f.plotLeft;Z?p.moveTo(d,b):R?R(p,d,b,c,T):K?K(p,d,b):S&&S.call(a,p,d,b,J,e);k+=1;k===la&&(ba(),k=0);T={clientX:d,plotY:b,yBottom:c}},ra="x"===b.findNearestPointBy,da=this.xData||this.options.xData||this.processedXData||!1,O=function(a,b,e){N=ra?a:a+","+b;ma&&!Q[N]&&(Q[N]=!0,f.inverted&&(a=c.len-a,
b=d.len-b),sa.push({x:da?da[Y+e]:!1,clientX:a,plotX:a,plotY:b,i:Y+e}))};this.renderTarget&&this.renderTarget.attr({href:""});(this.points||this.graph)&&this.destroyGraphics();a.plotGroup("group","series",a.visible?"visible":"hidden",b.zIndex,f.seriesGroup);a.markerGroup=a.group;F(a,"destroy",function(){a.markerGroup=null});var sa=this.points=[];var p=this.getContext();a.buildKDTree=fa;this.boostClear&&this.boostClear();this.visible&&(99999=G&&l<=H&&(g=!0);m&&m>=G&&m<=H&&(k=!0);if(W){aa&&(h=b.slice(1,3));var r=h[0];h=h[1]}else X&&
(q=b.x,h=b.stackY,r=h-b.y);b=null===h;oa||(p=h>=C&&h<=D);if(!b&&(q>=G&&q<=H&&p||g||k))if(q=Math.round(c.toPixels(q,!0)),E){if("undefined"===typeof x||q===I){W||(r=h);if("undefined"===typeof A||h>M)M=h,A=e;if("undefined"===typeof x||r