/*
 Highcharts JS v6.1.1 (2018-06-27)

 (c) 2009-2017 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(m){"object"===typeof module&&module.exports?module.exports=m:m(Highcharts)})(function(m){(function(b){var u=b.addEvent,k=b.Axis,m=b.Chart,d=b.color,l,h=b.each,t=b.extend,q=b.isNumber,f=b.Legend,n=b.LegendSymbolMixin,x=b.noop,w=b.merge,p=b.pick;b.ColorAxis||(l=b.ColorAxis=function(){this.init.apply(this,arguments)},t(l.prototype,k.prototype),t(l.prototype,{defaultColorAxisOptions:{lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,
marker:{animation:{duration:50},width:.01},labels:{overflow:"justify",rotation:0},minColor:"#e6ebf5",maxColor:"#003399",tickLength:5,showInLegend:!0},keepProps:["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"].concat(k.prototype.keepProps),init:function(a,c){var e="vertical"!==a.options.legend.layout,r;this.coll="colorAxis";r=w(this.defaultColorAxisOptions,{side:e?2:1,reversed:!e},c,{opposite:!e,showEmpty:!1,title:null,visible:a.options.legend.enabled});k.prototype.init.call(this,
a,r);c.dataClasses&&this.initDataClasses(c);this.initStops();this.horiz=e;this.zoomEnabled=!1;this.defaultLegendLength=200},initDataClasses:function(a){var c,e=0,r=this.chart.options.chart.colorCount,g=this.options,b=a.dataClasses.length;this.dataClasses=c=[];this.legendItems=[];h(a.dataClasses,function(a,f){a=w(a);c.push(a);"category"===g.dataClassColor?(a.colorIndex=e,e++,e===r&&(e=0)):a.color=d(g.minColor).tweenTo(d(g.maxColor),2>b?.5:f/(b-1))})},setTickPositions:function(){if(!this.dataClasses)return k.prototype.setTickPositions.call(this)},
initStops:function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];h(this.stops,function(a){a.color=d(a[1])})},setOptions:function(a){k.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker},setAxisSize:function(){var a=this.legendSymbol,c=this.chart,e=c.options.legend||{},b,g;a?(this.left=e=a.attr("x"),this.top=b=a.attr("y"),this.width=g=a.attr("width"),this.height=a=a.attr("height"),this.right=c.chartWidth-e-g,this.bottom=c.chartHeight-
b-a,this.len=this.horiz?g:a,this.pos=this.horiz?e:b):this.len=(this.horiz?e.symbolWidth:e.symbolHeight)||this.defaultLegendLength},normalizedValue:function(a){this.isLog&&(a=this.val2lin(a));return 1-(this.max-a)/(this.max-this.min||1)},toColor:function(a,c){var e=this.stops,b,g,f=this.dataClasses,n,d;if(f)for(d=f.length;d--;){if(n=f[d],b=n.from,e=n.to,(void 0===b||a>=b)&&(void 0===e||a<=e)){c&&(c.dataClass=d,c.colorIndex=n.colorIndex);break}}else{a=this.normalizedValue(a);for(d=e.length;d--&&!(a>
e[d][0]););b=e[d]||e[d+1];e=e[d+1]||b;a=1-(e[0]-a)/(e[0]-b[0]||1);g=b.color.tweenTo(e.color,a)}return g},getOffset:function(){var a=this.legendGroup,c=this.chart.axisOffset[this.side];a&&(this.axisParent=a,k.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=c)},setLegendColor:function(){var a,c=this.reversed;a=c?1:0;c=c?0:1;a=this.horiz?[a,0,c,0]:[0,c,0,a];this.legendColor={linearGradient:{x1:a[0],y1:a[1],x2:a[2],
y2:a[3]},stops:this.stops}},drawLegendSymbol:function(a,c){var e=a.padding,b=a.options,g=this.horiz,f=p(b.symbolWidth,g?this.defaultLegendLength:12),d=p(b.symbolHeight,g?12:this.defaultLegendLength),n=p(b.labelPadding,g?16:30),b=p(b.itemDistance,10);this.setLegendColor();c.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,f,d).attr({zIndex:1}).add(c.legendGroup);this.legendItemWidth=f+e+(g?b:n);this.legendItemHeight=d+e+(g?n:0)},setState:function(a){h(this.series,function(c){c.setState(a)})},
visible:!0,setVisible:x,getSeriesExtremes:function(){var a=this.series,c=a.length;this.dataMin=Infinity;for(this.dataMax=-Infinity;c--;)a[c].getExtremes(),void 0!==a[c].valueMin&&(this.dataMin=Math.min(this.dataMin,a[c].valueMin),this.dataMax=Math.max(this.dataMax,a[c].valueMax))},drawCrosshair:function(a,c){var e=c&&c.plotX,b=c&&c.plotY,g,f=this.pos,d=this.len;c&&(g=this.toPixels(c[c.series.colorKey]),g<f?g=f-2:g>f+d&&(g=f+d+2),c.plotX=g,c.plotY=this.len-g,k.prototype.drawCrosshair.call(this,a,c),
c.plotX=e,c.plotY=b,this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0))},getPlotLinePath:function(a,c,e,b,f){return q(f)?this.horiz?["M",f-4,this.top-6,"L",f+4,this.top-6,f,this.top,"Z"]:["M",this.left,f,"L",this.left-6,f+6,this.left-6,f-6,"Z"]:k.prototype.getPlotLinePath.call(this,a,c,e,b)},update:function(a,c){var e=this.chart,b=e.legend;h(this.series,function(a){a.isDirtyData=!0});
a.dataClasses&&b.allItems&&(h(b.allItems,function(a){a.isDataClass&&a.legendGroup&&a.legendGroup.destroy()}),e.isDirtyLegend=!0);e.options[this.coll]=w(this.userOptions,a);k.prototype.update.call(this,a,c);this.legendItem&&(this.setLegendColor(),b.colorizeItem(this,!0))},remove:function(){this.legendItem&&this.chart.legend.destroyItem(this);k.prototype.remove.call(this)},getDataClassLegendSymbols:function(){var a=this,c=this.chart,e=this.legendItems,f=c.options.legend,d=f.valueDecimals,k=f.valueSuffix||
"",l;e.length||h(this.dataClasses,function(f,g){var q=!0,r=f.from,p=f.to;l="";void 0===r?l="\x3c ":void 0===p&&(l="\x3e ");void 0!==r&&(l+=b.numberFormat(r,d)+k);void 0!==r&&void 0!==p&&(l+=" - ");void 0!==p&&(l+=b.numberFormat(p,d)+k);e.push(t({chart:c,name:l,options:{},drawLegendSymbol:n.drawRectangle,visible:!0,setState:x,isDataClass:!0,setVisible:function(){q=this.visible=!q;h(a.series,function(a){h(a.points,function(a){a.dataClass===g&&a.setVisible(q)})});c.legend.colorizeItem(this,q)}},f))});
return e},name:""}),h(["fill","stroke"],function(a){b.Fx.prototype[a+"Setter"]=function(){this.elem.attr(a,d(this.start).tweenTo(d(this.end),this.pos),null,!0)}}),u(m,"afterGetAxes",function(){var a=this.options.colorAxis;this.colorAxis=[];a&&new l(this,a)}),u(f,"afterGetAllItems",function(a){var c=[],e=this.chart.colorAxis[0];e&&e.options&&e.options.showInLegend&&(e.options.dataClasses?c=e.getDataClassLegendSymbols():c.push(e),h(e.series,function(c){b.erase(a.allItems,c)}));for(e=c.length;e--;)a.allItems.unshift(c[e])}),
u(f,"afterColorizeItem",function(a){a.visible&&a.item.legendColor&&a.item.legendSymbol.attr({fill:a.item.legendColor})}),u(f,"afterUpdate",function(a,c,b){this.chart.colorAxis[0]&&this.chart.colorAxis[0].update({},b)}))})(m);(function(b){var m=b.defined,k=b.each,v=b.noop;b.colorPointMixin={isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value},setVisible:function(b){var d=this,h=b?"show":"hide";k(["graphic","dataLabel"],function(b){if(d[b])d[b][h]()})},setState:function(d){b.Point.prototype.setState.call(this,
d);this.graphic&&this.graphic.attr({zIndex:"hover"===d?1:0})}};b.colorSeriesMixin={pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],optionalAxis:"colorAxis",trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:v,parallelArrays:["x","y","value"],colorKey:"value",translateColors:function(){var b=this,l=this.options.nullColor,h=this.colorAxis,m=this.colorKey;k(this.data,function(d){var f=d[m];if(f=d.options.color||(d.isNull?l:h&&void 0!==f?h.toColor(f,d):d.color||b.color))d.color=
f})},colorAttribs:function(b){var d={};m(b.color)&&(d[this.colorProp||"fill"]=b.color);return d}}})(m);(function(b){var m=b.colorPointMixin,k=b.each,v=b.merge,d=b.noop,l=b.pick,h=b.Series,t=b.seriesType,q=b.seriesTypes;t("heatmap","scatter",{animation:!1,borderWidth:0,dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},marker:null,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}\x3cbr/\x3e"},states:{hover:{halo:!1,
brightness:.2}}},v(b.colorSeriesMixin,{pointArrayMap:["y","value"],hasPointSpecificOptions:!0,getExtremesFromAll:!0,directTouch:!0,init:function(){var b;q.scatter.prototype.init.apply(this,arguments);b=this.options;b.pointRange=l(b.pointRange,b.colsize||1);this.yAxis.axisPointRange=b.rowsize||1},translate:function(){var b=this.options,d=this.xAxis,h=this.yAxis,m=b.pointPadding||0,p=function(a,b,e){return Math.min(Math.max(b,a),e)};this.generatePoints();k(this.points,function(a){var c=(b.colsize||
1)/2,e=(b.rowsize||1)/2,f=p(Math.round(d.len-d.translate(a.x-c,0,1,0,1)),-d.len,2*d.len),c=p(Math.round(d.len-d.translate(a.x+c,0,1,0,1)),-d.len,2*d.len),g=p(Math.round(h.translate(a.y-e,0,1,0,1)),-h.len,2*h.len),e=p(Math.round(h.translate(a.y+e,0,1,0,1)),-h.len,2*h.len),n=l(a.pointPadding,m);a.plotX=a.clientX=(f+c)/2;a.plotY=(g+e)/2;a.shapeType="rect";a.shapeArgs={x:Math.min(f,c)+n,y:Math.min(g,e)+n,width:Math.abs(c-f)-2*n,height:Math.abs(e-g)-2*n}});this.translateColors()},drawPoints:function(){q.column.prototype.drawPoints.call(this);
k(this.points,function(b){b.graphic.css(this.colorAttribs(b))},this)},animate:d,getBox:d,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,alignDataLabel:q.column.prototype.alignDataLabel,getExtremes:function(){h.prototype.getExtremes.call(this,this.valueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;h.prototype.getExtremes.call(this)}}),b.extend({haloPath:function(b){if(!b)return[];var d=this.shapeArgs;return["M",d.x-b,d.y-b,"L",d.x-b,d.y+d.height+b,d.x+d.width+b,d.y+d.height+b,d.x+
d.width+b,d.y-b,"Z"]}},m))})(m)});
