/*
 Highcharts JS v11.1.0 (2023-06-05)

 Boost module

 (c) 2010-2021 Highsoft AS
 Author: Torstein Honsi

 License: www.highcharts.com/license

*/
'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/boost",["highcharts"],function(t){a(t);a.Highcharts=t;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function t(a,d,g,v){a.hasOwnProperty(d)||(a[d]=v.apply(null,g),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:d,module:a[d]}})))}a=a?a._modules:
{};t(a,"Extensions/Boost/Boostables.js",[],function(){return"area areaspline arearange column columnrange bar line scatter heatmap bubble treemap".split(" ")});t(a,"Extensions/Boost/BoostableMap.js",[a["Extensions/Boost/Boostables.js"]],function(a){const d={};a.forEach(a=>{d[a]=!0});return d});t(a,"Extensions/Boost/BoostChart.js",[a["Extensions/Boost/BoostableMap.js"],a["Core/Utilities.js"]],function(a,d){function g(e){const b=e.series,d=e.boost=e.boost||{};var l=e.options.boost||{},D=u(l.seriesThreshold,
50);if(b.length>=D)return!0;if(1===b.length)return!1;l=l.allowForce;if("undefined"===typeof l){l=!0;for(var g of e.xAxis)if(u(g.min,-Infinity)>u(g.dataMin,-Infinity)||u(g.max,Infinity)<u(g.dataMax,Infinity)){l=!1;break}}if("undefined"!==typeof d.forceChartBoost){if(l)return d.forceChartBoost;d.forceChartBoost=void 0}g=e=0;for(const d of b)D=d.options,0!==D.boostThreshold&&!1!==d.visible&&"heatmap"!==d.type&&(a[d.type]&&++e,B(d.processedXData,D.data,d.points)>=(D.boostThreshold||Number.MAX_VALUE)&&
++g);d.forceChartBoost=l&&(e===b.length&&0<g||5<g);return d.forceChartBoost}function v(e){b(e,"predraw",function(){e.boost=e.boost||{};e.boost.forceChartBoost=void 0;e.boosted=!1;e.boost.clear&&e.boost.clear();e.boost.canvas&&e.boost.wgl&&g(e)&&e.boost.wgl.allocateBuffer(e);e.boost.markerGroup&&e.xAxis&&0<e.xAxis.length&&e.yAxis&&0<e.yAxis.length&&e.boost.markerGroup.translate(e.xAxis[0].pos,e.yAxis[0].pos)});b(e,"render",function(){e.boost&&e.boost.wgl&&g(e)&&e.boost.wgl.render(e)});let a=-1,d=-1;
b(e.pointer,"afterGetHoverData",()=>{var b=e.hoverSeries;e.boost=e.boost||{};if(e.boost.markerGroup&&b){const g=e.inverted?b.yAxis:b.xAxis;b=e.inverted?b.xAxis:b.yAxis;if(g&&g.pos!==a||b&&b.pos!==d)e.boost.markerGroup.translate(g.pos,b.pos),a=g.pos,d=b.pos}})}function B(...b){let e=-Number.MAX_VALUE;b.forEach(function(b){if("undefined"!==typeof b&&null!==b&&"undefined"!==typeof b.length&&0<b.length)return e=b.length,!0});return e}const {addEvent:b,pick:u}=d,D=[];return{compose:function(b,a){a&&d.pushUnique(D,
b)&&b.prototype.callbacks.push(v);return b},getBoostClipRect:function(b,a){const e={x:b.plotLeft,y:b.plotTop,width:b.plotWidth,height:b.plotHeight};a===b&&(a=b.inverted?b.xAxis:b.yAxis,1>=a.length?(e.y=Math.min(a[0].pos,e.y),e.height=a[0].pos-b.plotTop+a[0].len):e.height=b.plotHeight);return e},isChartSeriesBoosting:g}});t(a,"Extensions/Boost/WGLDrawMode.js",[],function(){return{area:"LINES",arearange:"LINES",areaspline:"LINES",column:"LINES",columnrange:"LINES",bar:"LINES",line:"LINE_STRIP",scatter:"POINTS",
heatmap:"TRIANGLES",treemap:"TRIANGLES",bubble:"POINTS"}});t(a,"Extensions/Boost/WGLShader.js",[a["Core/Utilities.js"]],function(a){const {clamp:d,error:g,pick:v}=a;class B{constructor(b){this.errors=[];this.uLocations={};(this.gl=b)&&this.createShader()}bind(){this.gl&&this.shaderProgram&&this.gl.useProgram(this.shaderProgram)}createShader(){const b=this.stringToProgram("#version 100\n#define LN10 2.302585092994046\nprecision highp float;\nattribute vec4 aVertexPosition;\nattribute vec4 aColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform mat4 uPMatrix;\nuniform float pSize;\nuniform float translatedThreshold;\nuniform bool hasThreshold;\nuniform bool skipTranslation;\nuniform float xAxisTrans;\nuniform float xAxisMin;\nuniform float xAxisMinPad;\nuniform float xAxisPointRange;\nuniform float xAxisLen;\nuniform bool  xAxisPostTranslate;\nuniform float xAxisOrdinalSlope;\nuniform float xAxisOrdinalOffset;\nuniform float xAxisPos;\nuniform bool  xAxisCVSCoord;\nuniform bool  xAxisIsLog;\nuniform bool  xAxisReversed;\nuniform float yAxisTrans;\nuniform float yAxisMin;\nuniform float yAxisMinPad;\nuniform float yAxisPointRange;\nuniform float yAxisLen;\nuniform bool  yAxisPostTranslate;\nuniform float yAxisOrdinalSlope;\nuniform float yAxisOrdinalOffset;\nuniform float yAxisPos;\nuniform bool  yAxisCVSCoord;\nuniform bool  yAxisIsLog;\nuniform bool  yAxisReversed;\nuniform bool  isBubble;\nuniform bool  bubbleSizeByArea;\nuniform float bubbleZMin;\nuniform float bubbleZMax;\nuniform float bubbleZThreshold;\nuniform float bubbleMinSize;\nuniform float bubbleMaxSize;\nuniform bool  bubbleSizeAbs;\nuniform bool  isInverted;\nfloat bubbleRadius(){\nfloat value = aVertexPosition.w;\nfloat zMax = bubbleZMax;\nfloat zMin = bubbleZMin;\nfloat radius = 0.0;\nfloat pos = 0.0;\nfloat zRange = zMax - zMin;\nif (bubbleSizeAbs){\nvalue = value - bubbleZThreshold;\nzMax = max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);\nzMin = 0.0;\n}\nif (value < zMin){\nradius = bubbleZMin / 2.0 - 1.0;\n} else {\npos = zRange > 0.0 ? (value - zMin) / zRange : 0.5;\nif (bubbleSizeByArea && pos > 0.0){\npos = sqrt(pos);\n}\nradius = ceil(bubbleMinSize + pos * (bubbleMaxSize - bubbleMinSize)) / 2.0;\n}\nreturn radius * 2.0;\n}\nfloat translate(float val,\nfloat pointPlacement,\nfloat localA,\nfloat localMin,\nfloat minPixelPadding,\nfloat pointRange,\nfloat len,\nbool  cvsCoord,\nbool  isLog,\nbool  reversed\n){\nfloat sign = 1.0;\nfloat cvsOffset = 0.0;\nif (cvsCoord) {\nsign *= -1.0;\ncvsOffset = len;\n}\nif (isLog) {\nval = log(val) / LN10;\n}\nif (reversed) {\nsign *= -1.0;\ncvsOffset -= sign * len;\n}\nreturn sign * (val - localMin) * localA + cvsOffset + \n(sign * minPixelPadding);\n}\nfloat xToPixels(float value) {\nif (skipTranslation){\nreturn value;// + xAxisPos;\n}\nreturn translate(value, 0.0, xAxisTrans, xAxisMin, xAxisMinPad, xAxisPointRange, xAxisLen, xAxisCVSCoord, xAxisIsLog, xAxisReversed);// + xAxisPos;\n}\nfloat yToPixels(float value, float checkTreshold) {\nfloat v;\nif (skipTranslation){\nv = value;// + yAxisPos;\n} else {\nv = translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord, yAxisIsLog, yAxisReversed);// + yAxisPos;\nif (v > yAxisLen) {\nv = yAxisLen;\n}\n}\nif (checkTreshold > 0.0 && hasThreshold) {\nv = min(v, translatedThreshold);\n}\nreturn v;\n}\nvoid main(void) {\nif (isBubble){\ngl_PointSize = bubbleRadius();\n} else {\ngl_PointSize = pSize;\n}\nvColor = aColor;\nif (skipTranslation && isInverted) {\ngl_Position = uPMatrix * vec4(aVertexPosition.y + yAxisPos, aVertexPosition.x + xAxisPos, 0.0, 1.0);\n} else if (isInverted) {\ngl_Position = uPMatrix * vec4(yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, xToPixels(aVertexPosition.x) + xAxisPos, 0.0, 1.0);\n} else {\ngl_Position = uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);\n}\n}",
"vertex"),a=this.stringToProgram("precision highp float;\nuniform vec4 fillColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform sampler2D uSampler;\nuniform bool isCircle;\nuniform bool hasColor;\nvoid main(void) {\nvec4 col = fillColor;\nvec4 tcol = texture2D(uSampler, gl_PointCoord.st);\nif (hasColor) {\ncol = vColor;\n}\nif (isCircle) {\ncol *= tcol;\nif (tcol.r < 0.0) {\ndiscard;\n} else {\ngl_FragColor = col;\n}\n} else {\ngl_FragColor = col;\n}\n}","fragment"),d=b=>this.gl.getUniformLocation(this.shaderProgram,
b);if(!b||!a)return this.shaderProgram=!1,this.handleErrors(),!1;this.shaderProgram=this.gl.createProgram();this.gl.attachShader(this.shaderProgram,b);this.gl.attachShader(this.shaderProgram,a);this.gl.linkProgram(this.shaderProgram);if(!this.gl.getProgramParameter(this.shaderProgram,this.gl.LINK_STATUS))return this.errors.push(this.gl.getProgramInfoLog(this.shaderProgram)),this.handleErrors(),this.shaderProgram=!1;this.gl.useProgram(this.shaderProgram);this.gl.bindAttribLocation(this.shaderProgram,
0,"aVertexPosition");this.pUniform=d("uPMatrix");this.psUniform=d("pSize");this.fcUniform=d("fillColor");this.isBubbleUniform=d("isBubble");this.bubbleSizeAbsUniform=d("bubbleSizeAbs");this.bubbleSizeAreaUniform=d("bubbleSizeByArea");this.uSamplerUniform=d("uSampler");this.skipTranslationUniform=d("skipTranslation");this.isCircleUniform=d("isCircle");this.isInverted=d("isInverted");return!0}handleErrors(){this.errors.length&&g("[highcharts boost] shader error - "+this.errors.join("\n"))}stringToProgram(b,
a){const d=this.gl.createShader("vertex"===a?this.gl.VERTEX_SHADER:this.gl.FRAGMENT_SHADER);this.gl.shaderSource(d,b);this.gl.compileShader(d);return this.gl.getShaderParameter(d,this.gl.COMPILE_STATUS)?d:(this.errors.push("when compiling "+a+" shader:\n"+this.gl.getShaderInfoLog(d)),!1)}destroy(){this.gl&&this.shaderProgram&&(this.gl.deleteProgram(this.shaderProgram),this.shaderProgram=!1)}fillColorUniform(){return this.fcUniform}getProgram(){return this.shaderProgram}pointSizeUniform(){return this.psUniform}perspectiveUniform(){return this.pUniform}reset(){this.gl&&
this.shaderProgram&&(this.gl.uniform1i(this.isBubbleUniform,0),this.gl.uniform1i(this.isCircleUniform,0))}setBubbleUniforms(b,a,g,e=1){const B=b.options;let u=Number.MAX_VALUE,l=-Number.MAX_VALUE;if(this.gl&&this.shaderProgram&&b.is("bubble")){const U=b.getPxExtremes();u=v(B.zMin,d(a,!1===B.displayNegative?B.zThreshold:-Number.MAX_VALUE,u));l=v(B.zMax,Math.max(l,g));this.gl.uniform1i(this.isBubbleUniform,1);this.gl.uniform1i(this.isCircleUniform,1);this.gl.uniform1i(this.bubbleSizeAreaUniform,"width"!==
b.options.sizeBy);this.gl.uniform1i(this.bubbleSizeAbsUniform,b.options.sizeByAbsoluteValue);this.setUniform("bubbleMinSize",U.minPxSize*e);this.setUniform("bubbleMaxSize",U.maxPxSize*e);this.setUniform("bubbleZMin",u);this.setUniform("bubbleZMax",l);this.setUniform("bubbleZThreshold",b.options.zThreshold)}}setColor(b){this.gl&&this.shaderProgram&&this.gl.uniform4f(this.fcUniform,b[0]/255,b[1]/255,b[2]/255,b[3])}setDrawAsCircle(b){this.gl&&this.shaderProgram&&this.gl.uniform1i(this.isCircleUniform,
b?1:0)}setInverted(b){this.gl&&this.shaderProgram&&this.gl.uniform1i(this.isInverted,b)}setPMatrix(b){this.gl&&this.shaderProgram&&this.gl.uniformMatrix4fv(this.pUniform,!1,b)}setPointSize(b){this.gl&&this.shaderProgram&&this.gl.uniform1f(this.psUniform,b)}setSkipTranslation(b){this.gl&&this.shaderProgram&&this.gl.uniform1i(this.skipTranslationUniform,!0===b?1:0)}setTexture(b){this.gl&&this.shaderProgram&&this.gl.uniform1i(this.uSamplerUniform,b)}setUniform(b,a){this.gl&&this.shaderProgram&&(b=this.uLocations[b]=
this.uLocations[b]||this.gl.getUniformLocation(this.shaderProgram,b),this.gl.uniform1f(b,a))}}return B});t(a,"Extensions/Boost/WGLVertexBuffer.js",[],function(){class a{constructor(a,g,v){this.buffer=!1;this.iterator=0;this.vertAttribute=this.preAllocated=!1;this.components=v||2;this.dataComponents=v;this.gl=a;this.shader=g}allocate(a){this.iterator=-1;this.preAllocated=new Float32Array(4*a)}bind(){if(!this.buffer)return!1;this.gl.vertexAttribPointer(this.vertAttribute,this.components,this.gl.FLOAT,
!1,0,0)}build(a,g,v){let d;this.data=a||[];if(!(this.data&&0!==this.data.length||this.preAllocated))return this.destroy(),!1;this.components=v||this.components;this.buffer&&this.gl.deleteBuffer(this.buffer);this.preAllocated||(d=new Float32Array(this.data));this.buffer=this.gl.createBuffer();this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.buffer);this.gl.bufferData(this.gl.ARRAY_BUFFER,this.preAllocated||d,this.gl.STATIC_DRAW);this.vertAttribute=this.gl.getAttribLocation(this.shader.getProgram(),g);
this.gl.enableVertexAttribArray(this.vertAttribute);return!0}destroy(){this.buffer&&(this.gl.deleteBuffer(this.buffer),this.vertAttribute=this.buffer=!1);this.iterator=0;this.components=this.dataComponents||2;this.data=[]}push(a,g,v,B){this.preAllocated&&(this.preAllocated[++this.iterator]=a,this.preAllocated[++this.iterator]=g,this.preAllocated[++this.iterator]=v,this.preAllocated[++this.iterator]=B)}render(a,g,v){const d=this.preAllocated?this.preAllocated.length:this.data.length;if(!this.buffer||
!d)return!1;if(!a||a>d||0>a)a=0;if(!g||g>d)g=d;if(a>=g)return!1;this.gl.drawArrays(this.gl[v||"POINTS"],a/this.components,(g-a)/this.components);return!0}}return a});t(a,"Extensions/Boost/WGLRenderer.js",[a["Core/Color/Color.js"],a["Core/Globals.js"],a["Core/Utilities.js"],a["Extensions/Boost/WGLDrawMode.js"],a["Extensions/Boost/WGLShader.js"],a["Extensions/Boost/WGLVertexBuffer.js"]],function(a,d,g,v,B,b){const {parse:u}=a,{doc:D,win:e}=d,{isNumber:t,isObject:U,merge:l,objectEach:H,pick:L}=g,z={column:!0,
columnrange:!0,bar:!0,area:!0,areaspline:!0,arearange:!0},I={scatter:!0,bubble:!0},J=["webgl","experimental-webgl","moz-webgl","webkit-3d"];class N{static orthoMatrix(c,a){return[2/c,0,0,0,0,-(2/a),0,0,0,0,-2,0,-1,1,-1,1]}static seriesPointCount(c){let a;if(c.boosted){var b=!!c.options.stacking;a=c.xData||c.options.xData||c.processedXData;b=(b?c.data:a||c.options.data).length;"treemap"===c.type?b*=12:"heatmap"===c.type?b*=6:z[c.type]&&(b*=2);return b}return 0}constructor(c){this.data=[];this.height=
0;this.isInited=!1;this.markerData=[];this.series=[];this.textureHandles={};this.width=0;this.postRenderCallback=c;this.settings={pointSize:1,lineWidth:1,fillColor:"#AA00AA",useAlpha:!0,usePreallocated:!1,useGPUTranslations:!1,debug:{timeRendering:!1,timeSeriesProcessing:!1,timeSetup:!1,timeBufferCopy:!1,timeKDTree:!1,showSkipSummary:!1}}}getPixelRatio(){return this.settings.pixelRatio||e.devicePixelRatio||1}setOptions(c){"pixelRatio"in c||(c.pixelRatio=1);l(!0,this.settings,c)}allocateBuffer(c){const a=
this.vbuffer;let b=0;this.settings.usePreallocated&&(c.series.forEach(c=>{c.boosted&&(b+=N.seriesPointCount(c))}),a&&a.allocate(b))}allocateBufferForSingleSeries(c){const a=this.vbuffer;let b=0;this.settings.usePreallocated&&(c.boosted&&(b=N.seriesPointCount(c)),a&&a.allocate(b))}clear(){const c=this.gl;c&&c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT)}pushSeriesData(c,a){const b=this.data,f=this.settings,ka=this.vbuffer;var h=c.pointArrayMap&&"low,high"===c.pointArrayMap.join(",");const q=c.chart,
n=c.options,m=!!n.stacking,d=n.data;var e=c.xAxis.getExtremes();const Z=e.min;e=e.max;var p=c.yAxis.getExtremes();const g=p.min,v=p.max;var l=c.xData||n.xData||c.processedXData;const B=c.yData||n.yData||c.processedYData,t=c.zData||n.zData||c.processedZData,C=c.yAxis,D=c.xAxis,L=!l||0===l.length;p=n.connectNulls;var w=c.points||!1;const F=m?c.data:l||d;l={x:Number.MAX_VALUE,y:0};const I={x:-Number.MAX_VALUE,y:0},k="undefined"===typeof q.index,r=z[c.type],V=n.zoneAxis||"y",ba=n.zones||!1,sa=n.threshold,
ia=this.getPixelRatio();let ua=c.chart.plotWidth,ca=!1,R=!1;let W,J=0;var X=!1;let A,x,H,E=-1,Y=!1,da=!1,ea,N=!1,ja=!1,y=!1,fa=!1,na=!0,S=!0,ha,G=!1,P=!1,oa=0;if(!(n.boostData&&0<n.boostData.length)){n.gapSize&&(P="value"!==n.gapUnit?n.gapSize*c.closestPointRange:n.gapSize);if(ba&&(ha=[],ba.forEach((a,c)=>{if(a.color){const k=u(a.color).rgba;k[0]/=255;k[1]/=255;k[2]/=255;ha[c]=k;G||"undefined"!==typeof a.value||(G=k)}}),!G)){var T=c.pointAttribs&&c.pointAttribs().fill||c.color;G=u(T).rgba;G[0]/=255;
G[1]/=255;G[2]/=255}q.inverted&&(ua=c.chart.plotHeight);c.closestPointRangePx=Number.MAX_VALUE;var M=c=>{c&&(a.colorData.push(c[0]),a.colorData.push(c[1]),a.colorData.push(c[2]),a.colorData.push(c[3]))},Q=(c,k,r,h=1,V)=>{M(V);1===ia||f.useGPUTranslations&&!a.skipTranslation||(c*=ia,k*=ia,h*=ia);f.usePreallocated&&ka?(ka.push(c,k,r?1:0,h),oa+=4):(b.push(c),b.push(k),b.push(r?ia:0),b.push(h))},Ba=()=>{a.segments.length&&(a.segments[a.segments.length-1].to=b.length||oa)};T=()=>{a.segments.length&&a.segments[a.segments.length-
1].from===(b.length||oa)||(Ba(),a.segments.push({from:b.length||oa}))};var Ca=(a,c,k,b,r)=>{M(r);Q(a+k,c);M(r);Q(a,c);M(r);Q(a,c+b);M(r);Q(a,c+b);M(r);Q(a+k,c+b);M(r);Q(a+k,c)};T();if(w&&0<w.length)a.skipTranslation=!0,a.drawMode="TRIANGLES",w[0].node&&w[0].node.levelDynamic&&w.sort((a,c)=>{if(a.node){if(a.node.levelDynamic>c.node.levelDynamic)return 1;if(a.node.levelDynamic<c.node.levelDynamic)return-1}return 0}),w.forEach(a=>{var k=a.plotY;if("undefined"!==typeof k&&!isNaN(k)&&null!==a.y&&a.shapeArgs){let {x:b=
0,y:r=0,width:h=0,height:V=0}=a.shapeArgs;k=q.styledMode?a.series.colorAttribs(a):k=a.series.pointAttribs(a);a=k["stroke-width"]||0;y=u(k.fill).rgba;y[0]/=255;y[1]/=255;y[2]/=255;c.is("treemap")&&(a=a||1,W=u(k.stroke).rgba,W[0]/=255,W[1]/=255,W[2]/=255,Ca(b,r,h,V,W),a/=2);c.is("heatmap")&&q.inverted&&(b=D.len-b,r=C.len-r,h=-h,V=-V);Ca(b+a,r+a,h-2*a,V-2*a,y)}});else{for(;E<F.length-1;){w=F[++E];if("undefined"===typeof w)continue;if(k)break;const b=d&&d[E];!L&&U(b,!0)&&b.color&&(y=u(b.color).rgba,y[0]/=
255,y[1]/=255,y[2]/=255);L?(A=w[0],x=w[1],F[E+1]&&(da=F[E+1][0]),F[E-1]&&(Y=F[E-1][0]),3<=w.length&&(H=w[2],w[2]>a.zMax&&(a.zMax=w[2]),w[2]<a.zMin&&(a.zMin=w[2]))):(A=w,x=B[E],F[E+1]&&(da=F[E+1]),F[E-1]&&(Y=F[E-1]),t&&t.length&&(H=t[E],t[E]>a.zMax&&(a.zMax=t[E]),t[E]<a.zMin&&(a.zMin=t[E])));if(p||null!==A&&null!==x){if(da&&da>=Z&&da<=e&&(N=!0),Y&&Y>=Z&&Y<=e&&(ja=!0),h?(L&&(x=w.slice(1,3)),ea=x[0],x=x[1]):m&&(A=w.x,x=w.stackY,ea=x-w.y),null!==g&&"undefined"!==typeof g&&null!==v&&"undefined"!==typeof v&&
(na=x>=g&&x<=v),A>e&&I.x<e&&(I.x=A,I.y=x),A<Z&&l.x>Z&&(l.x=A,l.y=x),null!==x||!p)if(null!==x&&(na||N||ja)){if((da>=Z||A>=Z)&&(Y<=e||A<=e)&&(fa=!0),fa||N||ja){P&&A-Y>P&&T();if(ba){let a;ba.some((c,k)=>{const b=ba[k-1];return"x"===V?"undefined"!==typeof c.value&&A<=c.value?(ha[k]&&(!b||A>=b.value)&&(a=ha[k]),!0):!1:"undefined"!==typeof c.value&&x<=c.value?(ha[k]&&(!b||x>=b.value)&&(a=ha[k]),!0):!1});y=a||G||y}if(!f.useGPUTranslations&&(a.skipTranslation=!0,A=D.toPixels(A,!0),x=C.toPixels(x,!0),A>ua&&
"POINTS"===a.drawMode))continue;a.hasMarkers&&fa&&!1!==ca&&(c.closestPointRangePx=Math.min(c.closestPointRangePx,Math.abs(A-ca)));if(!f.useGPUTranslations&&!f.usePreallocated&&ca&&1>Math.abs(A-ca)&&R&&1>Math.abs(x-R))f.debug.showSkipSummary&&++J;else{if(r){X=ea;if(!1===ea||"undefined"===typeof ea)X=0>x?x:0;h||m||(X=Math.max(null===sa?g:sa,g));f.useGPUTranslations||(X=C.toPixels(X,!0));Q(A,X,0,0,y)}n.step&&!S&&Q(A,R,0,2,y);Q(A,x,0,"bubble"===c.type?H||1:2,y);ca=A;R=x;X=!0;S=!1}}}else T()}else T()}f.debug.showSkipSummary&&
console.log("skipped points:",J);h=(c,k)=>{f.useGPUTranslations||(a.skipTranslation=!0,c.x=D.toPixels(c.x,!0),c.y=C.toPixels(c.y,!0));k?this.data=[c.x,c.y,0,2].concat(this.data):Q(c.x,c.y,0,2)};X||!1===p||"line_strip"!==c.drawMode||(l.x<Number.MAX_VALUE&&h(l,!0),I.x>-Number.MAX_VALUE&&h(I))}Ba()}}pushSeries(a){var c=this.markerData;const b=this.series,f=this.settings;0<b.length&&b[b.length-1].hasMarkers&&(b[b.length-1].markerTo=c.length);f.debug.timeSeriesProcessing&&console.time("building "+a.type+
" series");c={segments:[],markerFrom:c.length,colorData:[],series:a,zMin:Number.MAX_VALUE,zMax:-Number.MAX_VALUE,hasMarkers:a.options.marker?!1!==a.options.marker.enabled:!1,showMarkers:!0,drawMode:v[a.type]||"LINE_STRIP"};a.index>=b.length?b.push(c):b[a.index]=c;this.pushSeriesData(a,c);f.debug.timeSeriesProcessing&&console.timeEnd("building "+a.type+" series")}flush(){const a=this.vbuffer;this.data=[];this.markerData=[];this.series=[];a&&a.destroy()}setXAxis(a){const c=this.shader;if(c){var b=this.getPixelRatio();
c.setUniform("xAxisTrans",a.transA*b);c.setUniform("xAxisMin",a.min);c.setUniform("xAxisMinPad",a.minPixelPadding*b);c.setUniform("xAxisPointRange",a.pointRange);c.setUniform("xAxisLen",a.len*b);c.setUniform("xAxisPos",a.pos*b);c.setUniform("xAxisCVSCoord",!a.horiz);c.setUniform("xAxisIsLog",!!a.logarithmic);c.setUniform("xAxisReversed",!!a.reversed)}}setYAxis(a){const c=this.shader;if(c){var b=this.getPixelRatio();c.setUniform("yAxisTrans",a.transA*b);c.setUniform("yAxisMin",a.min);c.setUniform("yAxisMinPad",
a.minPixelPadding*b);c.setUniform("yAxisPointRange",a.pointRange);c.setUniform("yAxisLen",a.len*b);c.setUniform("yAxisPos",a.pos*b);c.setUniform("yAxisCVSCoord",!a.horiz);c.setUniform("yAxisIsLog",!!a.logarithmic);c.setUniform("yAxisReversed",!!a.reversed)}}setThreshold(a,b){const c=this.shader;c&&(c.setUniform("hasThreshold",a),c.setUniform("translatedThreshold",b))}renderChart(c){const e=this.gl,g=this.settings,f=this.shader,K=this.vbuffer,h=this.getPixelRatio();if(c)this.width=c.chartWidth*h,this.height=
c.chartHeight*h;else return!1;const q=this.height,n=this.width;if(!(e&&f&&n&&q))return!1;g.debug.timeRendering&&console.time("gl rendering");e.canvas.width=n;e.canvas.height=q;f.bind();e.viewport(0,0,n,q);f.setPMatrix(N.orthoMatrix(n,q));1<g.lineWidth&&!d.isMS&&e.lineWidth(g.lineWidth);K&&(K.build(this.data,"aVertexPosition",4),K.bind());f.setInverted(c.inverted);this.series.forEach((m,d)=>{const n=m.series.options;var q=n.marker,p="undefined"!==typeof n.lineWidth?n.lineWidth:1,l=n.threshold;const v=
t(l),la=m.series.yAxis.getThreshold(l);l=L(n.marker?n.marker.enabled:null,m.series.xAxis.isRadial?!0:null,m.series.closestPointRangePx>2*((n.marker?n.marker.radius:10)||10));q=this.textureHandles[q&&q.symbol||m.series.symbol]||this.textureHandles.circle;if(0!==m.segments.length&&m.segments[0].from!==m.segments[0].to&&(q.isReady&&(e.bindTexture(e.TEXTURE_2D,q.handle),f.setTexture(q.handle)),c.styledMode?q=m.series.markerGroup&&m.series.markerGroup.getStyle("fill"):(q="POINTS"===m.drawMode&&m.series.pointAttribs&&
m.series.pointAttribs().fill||m.series.color,n.colorByPoint&&(q=m.series.chart.options.colors[d])),m.series.fillOpacity&&n.fillOpacity&&(q=(new a(q)).setOpacity(L(n.fillOpacity,1)).get()),q=u(q).rgba,g.useAlpha||(q[3]=1),"LINES"===m.drawMode&&g.useAlpha&&1>q[3]&&(q[3]/=10),"add"===n.boostBlending?(e.blendFunc(e.SRC_ALPHA,e.ONE),e.blendEquation(e.FUNC_ADD)):"mult"===n.boostBlending||"multiply"===n.boostBlending?e.blendFunc(e.DST_COLOR,e.ZERO):"darken"===n.boostBlending?(e.blendFunc(e.ONE,e.ONE),e.blendEquation(e.FUNC_MIN)):
e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),f.reset(),0<m.colorData.length?(f.setUniform("hasColor",1),d=new b(e,f),d.build(m.colorData,"aColor",4),d.bind()):e.disableVertexAttribArray(e.getAttribLocation(f.getProgram(),"aColor")),f.setColor(q),this.setXAxis(m.series.xAxis),this.setYAxis(m.series.yAxis),this.setThreshold(v,la),"POINTS"===m.drawMode&&f.setPointSize(2*L(n.marker&&n.marker.radius,.5)*h),f.setSkipTranslation(m.skipTranslation),"bubble"===m.series.type&&
f.setBubbleUniforms(m.series,m.zMin,m.zMax,h),f.setDrawAsCircle(I[m.series.type]||!1),K)){if(0<p||"LINE_STRIP"!==m.drawMode)for(p=0;p<m.segments.length;p++)K.render(m.segments[p].from,m.segments[p].to,m.drawMode);if(m.hasMarkers&&l)for(f.setPointSize(2*L(n.marker&&n.marker.radius,5)*h),f.setDrawAsCircle(!0),p=0;p<m.segments.length;p++)K.render(m.segments[p].from,m.segments[p].to,"POINTS")}});g.debug.timeRendering&&console.timeEnd("gl rendering");this.postRenderCallback&&this.postRenderCallback(this);
this.flush()}render(a){this.clear();if(a.renderer.forExport)return this.renderChart(a);this.isInited?this.renderChart(a):setTimeout(()=>{this.render(a)},1)}setSize(a,b){const c=this.shader;!c||this.width===a&&this.height===b||(this.width=a,this.height=b,c.bind(),c.setPMatrix(N.orthoMatrix(a,b)))}init(a,e){const c=this.settings;this.isInited=!1;if(!a)return!1;c.debug.timeSetup&&console.time("gl setup");for(let b=0;b<J.length&&!(this.gl=a.getContext(J[b],{}));++b);const f=this.gl;if(f)e||this.flush();
else return!1;f.enable(f.BLEND);f.blendFunc(f.SRC_ALPHA,f.ONE_MINUS_SRC_ALPHA);f.disable(f.DEPTH_TEST);f.depthFunc(f.LESS);a=this.shader=new B(f);if(!a)return!1;this.vbuffer=new b(f,a);a=(a,b)=>{const c={isReady:!1,texture:D.createElement("canvas"),handle:f.createTexture()},e=c.texture.getContext("2d");this.textureHandles[a]=c;c.texture.width=512;c.texture.height=512;e.mozImageSmoothingEnabled=!1;e.webkitImageSmoothingEnabled=!1;e.msImageSmoothingEnabled=!1;e.imageSmoothingEnabled=!1;e.strokeStyle=
"rgba(255, 255, 255, 0)";e.fillStyle="#FFF";b(e);try{f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,c.handle),f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,c.texture),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.LINEAR),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR),f.bindTexture(f.TEXTURE_2D,null),c.isReady=!0}catch(m){}};a("circle",
a=>{a.beginPath();a.arc(256,256,256,0,2*Math.PI);a.stroke();a.fill()});a("square",a=>{a.fillRect(0,0,512,512)});a("diamond",a=>{a.beginPath();a.moveTo(256,0);a.lineTo(512,256);a.lineTo(256,512);a.lineTo(0,256);a.lineTo(256,0);a.fill()});a("triangle",a=>{a.beginPath();a.moveTo(0,512);a.lineTo(256,0);a.lineTo(512,512);a.lineTo(0,512);a.fill()});a("triangle-down",a=>{a.beginPath();a.moveTo(0,0);a.lineTo(256,512);a.lineTo(512,0);a.lineTo(0,0);a.fill()});this.isInited=!0;c.debug.timeSetup&&console.timeEnd("gl setup");
return!0}destroy(){const a=this.gl,b=this.shader,e=this.vbuffer;this.flush();e&&e.destroy();b&&b.destroy();a&&(H(this.textureHandles,b=>{b.handle&&a.deleteTexture(b.handle)}),a.canvas.width=1,a.canvas.height=1)}}return N});t(a,"Extensions/Boost/BoostSeries.js",[a["Extensions/Boost/BoostableMap.js"],a["Extensions/Boost/Boostables.js"],a["Extensions/Boost/BoostChart.js"],a["Core/Defaults.js"],a["Core/Globals.js"],a["Core/Utilities.js"],a["Extensions/Boost/WGLRenderer.js"]],function(a,d,g,v,t,b,u){function D(a,
b){const c=b.boost;a&&c&&c.target&&c.canvas&&!m(b.chart)&&a.allocateBufferForSingleSeries(b)}function e(a){return ta(a&&a.options&&a.options.boost&&a.options.boost.enabled,!0)}function B(a,b){const c=a.constructor,k=a.seriesGroup||b.group;let e=a.chartWidth,r=a.chartHeight,h=a,q="undefined"!==typeof SVGForeignObjectElement;h=m(a)?a:b;const d=h.boost=h.boost||{};q=!1;ra||(ra=pa.createElement("canvas"));d.target||(d.canvas=ra,a.renderer.forExport||!q?(h.renderTarget=d.target=a.renderer.image("",0,0,
e,r).addClass("highcharts-boost-canvas").add(k),d.clear=function(){d.target.attr({href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="})},d.copy=function(){d.resize();d.target.attr({href:d.canvas.toDataURL("image/png")})}):(d.targetFo=a.renderer.createElement("foreignObject").add(k),h.renderTarget=d.target=pa.createElement("canvas"),d.targetCtx=d.target.getContext("2d"),d.targetFo.element.appendChild(d.target),d.clear=function(){d.target.width=
d.canvas.width;d.target.height=d.canvas.height},d.copy=function(){d.target.width=d.canvas.width;d.target.height=d.canvas.height;d.targetCtx.drawImage(d.canvas,0,0)}),d.resize=function(){e=a.chartWidth;r=a.chartHeight;(d.targetFo||d.target).attr({x:0,y:0,width:e,height:r}).css({pointerEvents:"none",mixedBlendMode:"normal",opacity:1});h instanceof c&&h.boost.markerGroup.translate(a.plotLeft,a.plotTop)},d.clipRect=a.renderer.clipRect(),(d.targetFo||d.target).clip(d.clipRect),h instanceof c&&(h.boost.markerGroup=
h.renderer.g().add(k).translate(b.xAxis.pos,b.yAxis.pos)));d.canvas.width=e;d.canvas.height=r;d.clipRect&&d.clipRect.attr(n(a,h));d.resize();d.clear();d.wgl||(d.wgl=new u(a=>{a.settings.debug.timeBufferCopy&&console.time("buffer copy");d.copy();a.settings.debug.timeBufferCopy&&console.timeEnd("buffer copy")}),d.wgl.init(d.canvas)||ya("[highcharts boost] - unable to init WebGL renderer"),d.wgl.setOptions(a.options.boost||{}),h instanceof c&&d.wgl.allocateBuffer(a));d.wgl.setSize(e,r);return d.wgl}
function U(a){const b=a.points;if(b){let a,c;for(c=0;c<b.length;c+=1)(a=b[c])&&a.destroyElements&&a.destroyElements()}["graph","area","tracker"].forEach(b=>{const c=a[b];c&&(a[b]=c.destroy())});a.getZonesGraphs&&a.getZonesGraphs([["graph","highcharts-graph"]]).forEach(b=>{const c=a[b[0]];c&&(a[b[0]]=c.destroy())})}function l(a,b,c,d,e,h){e=e||0;d=d||3E3;const k=e+d;let r=!0;for(;r&&e<k&&e<a.length;)r=b(a[e],e),++e;r&&(e<a.length?h?l(a,b,c,d,e,h):p.requestAnimationFrame?p.requestAnimationFrame(function(){l(a,
b,c,d,e)}):setTimeout(l,0,a,b,c,d,e):c&&c())}function H(a){a.boost=a.boost||{getPoint:b=>c(a,b)};const b=a.boost.altered=[];["allowDG","directTouch","stickyTracking"].forEach(c=>{b.push({prop:c,val:a[c],own:Object.hasOwnProperty.call(a,c)})});a.allowDG=!1;a.directTouch=!1;a.stickyTracking=!0;a.finishedAnimating=!0;a.labelBySeries&&(a.labelBySeries=a.labelBySeries.destroy())}function L(a){const b=a.boost;b&&((b.altered||[]).forEach(b=>{b.own?a[b.prop]=b.val:delete a[b.prop]}),b.clear&&b.clear())}function z(a,
b){const c=a.options,e=a.xAxis&&a.xAxis.options,d=a.yAxis&&a.yAxis.options;a=a.colorAxis&&a.colorAxis.options;return c.data.length>(c.boostThreshold||Number.MAX_VALUE)&&C(d.min)&&C(d.max)&&(!b||C(e.min)&&C(e.max))&&(!a||C(a.min)&&C(a.max))}function I(){const a=this,b=a.chart;b.boost&&b.boost.markerGroup===a.markerGroup&&(a.markerGroup=null);b.hoverPoints&&(b.hoverPoints=b.hoverPoints.filter(function(b){return b.series===a}));b.hoverPoint&&b.hoverPoint.series===a&&(b.hoverPoint=null)}function J(){const a=
this.boost;a&&a.canvas&&a.target&&(a.wgl&&a.wgl.clear(),a.clear&&a.clear())}function N(a){const b=a.boost;b&&b.canvas&&b.target&&b.wgl&&!m(a.chart)&&b.wgl.render(a.chart)}function c(a,b){var c=a.options;const e=a.xAxis;var d=a.pointClass;if(b instanceof d)return b;c=a.xData||c.xData||a.processedXData||!1;d=(new d).init(a,a.options.data[b.i],c?c[b.i]:void 0);d.category=ta(e.categories?e.categories[d.x]:d.x,d.x);d.dist=b.dist;d.distX=b.distX;d.plotX=b.plotX;d.plotY=b.plotY;d.index=b.i;d.percentage=
b.percentage;d.isInside=a.isPointInside(d);return d}function ka(){function a(a,b){const h="undefined"===typeof c.index;let f;let q,m=!1,k=!0;if("undefined"===typeof a)return!0;if(!h){if(L){f=a[0];var r=a[1]}else f=a,r=n[b];u?(L&&(r=a.slice(1,3)),m=r[0],r=r[1]):pa&&(f=a.x,r=a.stackY,m=r-a.y,q=a.percentage);I||(k=(r||0)>=w&&r<=v);if(f>=g&&f<=p&&k)if(a=d.toPixels(f,!0),la){if("undefined"===typeof P||a===ma){u||(m=r);if("undefined"===typeof K||r>G)G=r,K=b;if("undefined"===typeof P||m<H)H=m,P=b}y&&a===
ma||("undefined"!==typeof P&&(r=e.toPixels(G,!0),J=e.toPixels(H,!0),M(a,r,K,q),J!==r&&M(a,J,P,q)),P=K=void 0,ma=a)}else r=Math.ceil(e.toPixels(r,!0)),M(a,r,b,q)}return!h}var b=this.options||{};const c=this.chart,d=this.xAxis,e=this.yAxis,h=b.xData||this.processedXData,n=b.yData||this.processedYData,q=b.data;var f=d.getExtremes();const g=f.min,p=f.max;f=e.getExtremes();const w=f.min,v=f.max,x={},la=!!this.sampling,t=b.enableMouseTracking;f=b.threshold;const u=this.pointArrayMap&&"low,high"===this.pointArrayMap.join(","),
pa=!!b.stacking,z=this.cropStart||0,I=this.requireSorting,L=!h,y="x"===b.findNearestPointBy,C=this.xData||this.options.xData||this.processedXData||!1;b=!1;let ma,J=e.getThreshold(f),H,G,P,K;b=B(c,this);c.boosted=!0;if(this.visible){(this.points||this.graph)&&U(this);m(c)?(this.markerGroup&&this.markerGroup!==c.boost.markerGroup&&this.markerGroup.destroy(),this.markerGroup=c.boost.markerGroup,this.boost&&this.boost.target&&(this.renderTarget=this.boost.target=this.boost.target.destroy())):(c.boost&&
this.markerGroup===c.boost.markerGroup&&(this.markerGroup=void 0),this.markerGroup=this.plotGroup("markerGroup","markers",!0,1,c.seriesGroup));var T=this.points=[],M=(a,b,h,f)=>{const q=C?C[z+h]:!1,n=a=>{c.inverted&&(a=d.len-a,b=e.len-b);T.push({destroy:Z,x:q,clientX:a,plotX:a,plotY:b,i:z+h,percentage:f})};a=Math.ceil(a);F=y?a:a+","+b;t&&(x[F]?q===C[C.length-1]&&(T.length--,n(a)):(x[F]=!0,n(a)))};this.buildKDTree=Z;b&&(D(b,this),b.pushSeries(this),N(this));var Q=b.settings;b=()=>{O(this,"renderedCanvas");
delete this.buildKDTree;this.buildKDTree();Q.debug.timeKDTree&&console.timeEnd("kd tree building")};c.renderer.forExport||(Q.debug.timeKDTree&&console.time("kd tree building"),l(pa?this.data:h||q,a,b))}}function va(a){let b=!0;this.chart.options&&this.chart.options.boost&&(b="undefined"===typeof this.chart.options.boost.enabled?!0:this.chart.options.boost.enabled);if(!b||!this.boosted)return a.call(this);this.chart.boosted=!0;if(a=B(this.chart,this))D(a,this),a.pushSeries(this);N(this)}function f(b,
c,d){function h(b){const c=this.options.stacking&&("translate"===d||"generatePoints"===d);this.boosted&&!c&&e(this.chart)&&"heatmap"!==this.type&&"treemap"!==this.type&&a[this.type]&&0!==this.options.boostThreshold?"render"===d&&this.renderCanvas&&this.renderCanvas():b.call(this)}aa(b,d,h);"translate"===d&&["column","arearange","columnrange","heatmap","treemap"].forEach(function(a){c[a]&&aa(c[a].prototype,d,h)})}function K(a){return this.boosted&&z(this)?{}:a.apply(this,[].slice.call(arguments,1))}
function h(b){var c=this.options.data;const d=a=>this.forceCrop?!1:m(this.chart)||(a?a.length:0)>=(this.options.boostThreshold||Number.MAX_VALUE);e(this.chart)&&a[this.type]?(d(c)&&"heatmap"!==this.type&&"treemap"!==this.type&&!this.options.stacking&&z(this,!0)||(b.apply(this,[].slice.call(arguments,1)),c=this.processedXData),(this.boosted=d(c))?(this.options.data&&this.options.data.length&&(c=this.getFirstValidPoint(this.options.data),C(c)||qa(c)||ya(12,!1,this.chart)),H(this)):L(this)):b.apply(this,
[].slice.call(arguments,1))}function q(a){const b=a.apply(this,[].slice.call(arguments,1));return this.boost&&b?this.boost.getPoint(b):b}const {getBoostClipRect:n,isChartSeriesBoosting:m}=g,{getOptions:la}=v,{doc:pa,noop:Z,win:p}=t,{addEvent:ma,error:ya,extend:wa,fireEvent:O,isArray:qa,isNumber:C,pick:ta,wrap:aa}=b,w=[];let F,ra;return{compose:function(a,c,e){if(b.pushUnique(w,a)){ma(a,"destroy",I);ma(a,"hide",J);const b=a.prototype;e&&(b.renderCanvas=ka);aa(b,"getExtremes",K);aa(b,"processData",
h);aa(b,"searchPoint",q);["translate","generatePoints","drawTracker","drawPoints","render"].forEach(a=>f(b,c,a))}if(b.pushUnique(w,la)){const a=la().plotOptions;d.forEach(b=>{const d=a[b];d&&(d.boostThreshold=5E3,d.boostData=[],c[b].prototype.fillOpacity=!0)})}if(e){const {area:a,areaspline:d,bubble:h,column:f,heatmap:q,scatter:n,treemap:m}=c;a&&b.pushUnique(w,a)&&wa(a.prototype,{fill:!0,fillOpacity:!0,sampling:!0});d&&b.pushUnique(w,d)&&wa(d.prototype,{fill:!0,fillOpacity:!0,sampling:!0});h&&b.pushUnique(w,
h)&&(e=h.prototype,delete e.buildKDTree,aa(e,"markerAttribs",function(a){return this.boosted?!1:a.apply(this,[].slice.call(arguments,1))}));f&&b.pushUnique(w,f)&&wa(f.prototype,{fill:!0,sampling:!0});n&&b.pushUnique(w,n)&&(n.prototype.fill=!0);[q,m].forEach(a=>{a&&b.pushUnique(w,a)&&aa(a.prototype,"drawPoints",va)})}return a},destroyGraphics:U,eachAsync:l,getPoint:c}});t(a,"Extensions/BoostCanvas.js",[a["Extensions/Boost/BoostChart.js"],a["Extensions/Boost/BoostSeries.js"],a["Core/Chart/Chart.js"],
a["Core/Color/Color.js"],a["Core/Globals.js"],a["Core/Series/Series.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,d,g,v,t,b,u,D){const {getBoostClipRect:e,isChartSeriesBoosting:B}=a,{destroyGraphics:U}=d,{parse:l}=v,{doc:H,noop:L}=t,{seriesTypes:z}=u,{addEvent:I,extend:J,fireEvent:N,isNumber:c,merge:ka,pick:va,wrap:f}=D;let K;return function(){t.seriesTypes.heatmap&&f(t.seriesTypes.heatmap.prototype,"drawPoints",function(){const a=this.chart,b=this.getContext(),c=this.chart.inverted,
d=this.xAxis,e=this.yAxis;b?(this.points.forEach(function(h){let f=h.plotY;if("undefined"!==typeof f&&!isNaN(f)&&null!==h.y&&b){const {x:f=0,y:n=0,width:q=0,height:m=0}=h.shapeArgs||{};h=a.styledMode?h.series.colorAttribs(h):h.series.pointAttribs(h);b.fillStyle=h.fill;c?b.fillRect(e.len-n+d.left,d.len-f+e.top,-m,-q):b.fillRect(f+d.left,n+e.top,q,m)}}),this.canvasToSVG()):this.chart.showLoading("Your browser doesn't support HTML5 canvas, <br>please use a modern browser")});J(b.prototype,{getContext:function(){const a=
this.chart,b=B(a)?a:this,c=b===a?a.seriesGroup:a.seriesGroup||this.group;let d=a.chartWidth,g=a.chartHeight,l,t=function(a,b,c,d,e,h,f){a.call(this,c,b,d,e,h,f)};const p=b.boost=b.boost||{};l=p.targetCtx;p.canvas||(p.canvas=H.createElement("canvas"),p.target=a.renderer.image("",0,0,d,g).addClass("highcharts-boost-canvas").add(c),l=p.targetCtx=p.canvas.getContext("2d"),a.inverted&&["moveTo","lineTo","rect","arc"].forEach(a=>{f(l,a,t)}),p.copy=function(){p.target.attr({href:p.canvas.toDataURL("image/png")})},
p.clear=function(){l.clearRect(0,0,p.canvas.width,p.canvas.height);b===p.target&&p.target.attr({href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="})},p.clipRect=a.renderer.clipRect(),p.target.clip(p.clipRect));p.canvas.width!==d&&(p.canvas.width=d);p.canvas.height!==g&&(p.canvas.height=g);p.target.attr({x:0,y:0,width:d,height:g,style:"pointer-events: none",href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="});
p.clipRect&&p.clipRect.attr(e(a,b));return l},canvasToSVG:function(){B(this.chart)?this.boost&&this.boost.clear&&this.boost.clear():this.boost&&this.boost.copy?this.boost.copy():this.chart.boost&&this.chart.boost.copy&&this.chart.boost.copy()},cvsLineTo:function(a,b,c){a.lineTo(b,c)},renderCanvas:function(){let a=this,b=a.options,e=a.chart,f=this.xAxis,g=this.yAxis;var t=(e.options.boost||{}).timeRendering||!1;let u,p=0;var z=a.processedXData;let B=a.processedYData,H=b.data;var O=f.getExtremes();
let qa=O.min,C=O.max;O=g.getExtremes();let ta=O.min,aa=O.max,w={},F,ra=!!a.sampling,k,r=b.marker&&b.marker.radius,V=this.cvsDrawPoint,ba=b.lineWidth?this.cvsLineTo:void 0,sa=r&&1>=r?this.cvsMarkerSquare:this.cvsMarkerCircle,ia=this.cvsStrokeBatch||1E3,ua=b.enableMouseTracking,ca;O=b.threshold;let R=g.getThreshold(O),W=c(O),za=R,X=this.fill,A=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),x=!!b.stacking,Aa=a.cropStart||0;O=e.options.loading;let E=a.requireSorting,Y,da=b.connectNulls,ea=!z,
xa,ja,y,fa,na,S=x?a.data:z||H,ha=a.fillOpacity?v.parse(a.color).setOpacity(va(b.fillOpacity,.75)).get():a.color,G=function(){X?(u.fillStyle=ha,u.fill()):(u.strokeStyle=a.color,u.lineWidth=b.lineWidth,u.stroke())},P=function(b,c,d,f){0===p&&(u.beginPath(),ba&&(u.lineJoin="round"));e.scroller&&"highcharts-navigator-series"===a.options.className?(c+=e.scroller.top,d&&(d+=e.scroller.top)):c+=e.plotTop;b+=e.plotLeft;Y?u.moveTo(b,c):V?V(u,b,c,d,ca):ba?ba(u,b,c):sa&&sa.call(a,u,b,c,r,f);p+=1;p===ia&&(G(),
p=0);ca={clientX:b,plotY:c,yBottom:d}},oa="x"===b.findNearestPointBy,T=this.xData||this.options.xData||this.processedXData||!1,M=function(a,b,c){na=oa?a:a+","+b;ua&&!w[na]&&(w[na]=!0,e.inverted&&(a=f.len-a,b=g.len-b),k.push({x:T?T[Aa+c]:!1,clientX:a,plotX:a,plotY:b,i:Aa+c}))};z=this.boost||{};z.target&&z.target.attr({href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="});(this.points||this.graph)&&U(this);a.plotGroup("group","series",
a.visible?"visible":"hidden",b.zIndex,e.seriesGroup);a.markerGroup=a.group;I(a,"destroy",function(){a.markerGroup=null});k=this.points=[];u=this.getContext();a.buildKDTree=L;z.clear&&z.clear();this.visible&&(99999<H.length&&(e.options.loading=ka(O,{labelStyle:{backgroundColor:l("#ffffff").setOpacity(.75).get(),padding:"1em",borderRadius:"0.5em"},style:{backgroundColor:"none",opacity:1}}),D.clearTimeout(K),e.showLoading("Drawing..."),e.options.loading=O),t&&console.time("canvas rendering"),d.eachAsync(S,
function(b,c){let d,h=!1,m=!1,q=!1,n=!1,p="undefined"===typeof e.index,r=!0;if(!p){if(ea){var l=b[0];var k=b[1];S[c+1]&&(q=S[c+1][0]);S[c-1]&&(n=S[c-1][0])}else l=b,k=B[c],S[c+1]&&(q=S[c+1]),S[c-1]&&(n=S[c-1]);q&&q>=qa&&q<=C&&(h=!0);n&&n>=qa&&n<=C&&(m=!0);A?(ea&&(k=b.slice(1,3)),d=k[0],k=k[1]):x&&(l=b.x,k=b.stackY,d=k-b.y);b=null===k;E||(r=k>=ta&&k<=aa);if(!b&&(l>=qa&&l<=C&&r||h||m))if(l=Math.round(f.toPixels(l,!0)),ra){if("undefined"===typeof y||l===F){A||(d=k);if("undefined"===typeof fa||k>ja)ja=
k,fa=c;if("undefined"===typeof y||d<xa)xa=d,y=c}l!==F&&("undefined"!==typeof y&&(k=g.toPixels(ja,!0),R=g.toPixels(xa,!0),P(l,W?Math.min(k,za):k,W?Math.max(R,za):R,c),M(l,k,fa),R!==k&&M(l,R,y)),y=fa=void 0,F=l)}else k=Math.round(g.toPixels(k,!0)),P(l,k,R,c),M(l,k,c);Y=b&&!da;0===c%5E4&&(a.boost&&a.boost.copy?a.boost.copy():a.chart.boost&&a.chart.boost.copy&&a.chart.boost.copy())}return!p},function(){const b=e.loadingDiv,c=e.loadingShown;G();a.canvasToSVG();t&&console.timeEnd("canvas rendering");N(a,
"renderedCanvas");c&&(J(b.style,{transition:"opacity 250ms",opacity:0}),e.loadingShown=!1,K=setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b);e.loadingDiv=e.loadingSpan=null},250));delete a.buildKDTree;a.buildKDTree()},e.renderer.forExport?Number.MAX_VALUE:void 0))}});z.scatter.prototype.cvsMarkerCircle=function(a,b,c,d){a.moveTo(b,c);a.arc(b,c,d,0,2*Math.PI,!1)};z.scatter.prototype.cvsMarkerSquare=function(a,b,c,d){a.rect(b-d,c-d,2*d,2*d)};z.scatter.prototype.fill=!0;z.bubble&&(z.bubble.prototype.cvsMarkerCircle=
function(a,b,c,d,e){a.moveTo(b,c);a.arc(b,c,this.radii&&this.radii[e],0,2*Math.PI,!1)},z.bubble.prototype.cvsStrokeBatch=1);J(z.area.prototype,{cvsDrawPoint:function(a,b,c,d,e){e&&b!==e.clientX&&(a.moveTo(e.clientX,e.yBottom),a.lineTo(e.clientX,e.plotY),a.lineTo(b,c),a.lineTo(b,d))},fill:!0,fillOpacity:!0,sampling:!0});J(z.column.prototype,{cvsDrawPoint:function(a,b,c,d){a.rect(b-1,c,1,d-c)},fill:!0,sampling:!0});g.prototype.callbacks.push(function(a){I(a,"predraw",function(){const a=this.boost||
{};a.target&&a.target.attr({href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="});a.canvas&&a.canvas.getContext("2d").clearRect(0,0,a.canvas.width,a.canvas.height)});I(a,"render",function(){a.boost&&a.boost.copy&&a.boost.copy()})})}});t(a,"Extensions/Boost/NamedColors.js",[],function(){return{defaultHTMLColorMap:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",
blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",
darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",
khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",
mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",
palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",
turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}});t(a,"Extensions/Boost/Boost.js",[a["Extensions/Boost/BoostChart.js"],a["Extensions/Boost/BoostSeries.js"],a["Core/Globals.js"],a["Extensions/BoostCanvas.js"],a["Extensions/Boost/NamedColors.js"],a["Core/Utilities.js"]],function(a,d,g,t,B,b){function u(){let a,b=!1;if("undefined"!==typeof v.WebGLRenderingContext){a=e.createElement("canvas");for(let d=0;d<l.length;++d)try{if(b=
a.getContext(l[d]),"undefined"!==typeof b&&null!==b)return!0}catch(I){}}return!1}const {win:v,doc:e}=g,{error:U}=b,Da=[],l=["webgl","experimental-webgl","moz-webgl","webkit-3d"];g={compose:function(e,g,l,v){const z=u();z||("undefined"!==typeof t?t():U(26));v&&b.pushUnique(Da,v)&&(v.names=Object.assign(Object.assign({},v.names),B.defaultHTMLColorMap));a.compose(e,z);d.compose(g,l,z)},hasWebGLSupport:u};"";return g});t(a,"masters/modules/boost.src.js",[a["Core/Globals.js"],a["Extensions/Boost/Boost.js"]],
function(a,d){a.hasWebGLSupport=d.hasWebGLSupport;d.compose(a.Chart,a.Series,a.seriesTypes,a.Color)})});
//# sourceMappingURL=boost.js.map