/*
 Highcharts JS v6.1.0 (2018-04-13)

 (c) 2014 Highsoft AS
 Authors: Jon Arild Nygard / Oystein Moseng

 License: www.highcharts.com/license
*/
(function(u){"object"===typeof module&&module.exports?module.exports=u:u(Highcharts)})(function(u){var E=function(b){var u=b.each,w=b.extend,q=b.isArray,t=b.isObject,r=b.isNumber,A=b.merge,x=b.pick,g=b.reduce;return{getColor:function(b,f){var l=f.mapOptionsToLevel,v=f.parentColorIndex,g=f.series,h=f.colors,p=g.points,C,B;b&&(p=p[b.i],l=l[b.level]||{},(b=p&&l.colorByPoint)&&(C=p.index%(h?h.length:g.chart.options.chart.colorCount)),B=x(p&&p.options.colorIndex,l&&l.colorIndex,C,v,f.colorIndex));return{color:void 0,
colorIndex:B}},getLevelOptions:function(b){var f=null,l,v,z,h;if(t(b))for(f={},z=r(b.from)?b.from:1,h=b.levels,v={},l=t(b.defaults)?b.defaults:{},q(h)&&(v=g(h,function(b,f){var h,g;t(f)&&r(f.level)&&(g=A({},f),h="boolean"===typeof g.levelIsConstant?g.levelIsConstant:l.levelIsConstant,delete g.levelIsConstant,delete g.level,f=f.level+(h?0:z-1),t(b[f])?w(b[f],g):b[f]=g);return b},{})),h=r(b.to)?b.to:1,b=0;b<=h;b++)f[b]=A({},l,t(v[b])?v[b]:{});return f},setTreeValues:function f(b,g){var l=g.before,h=
g.idRoot,p=g.mapIdToNode[h],q=g.points[b.i],t=q&&q.options||{},r=0,v=[];w(b,{levelDynamic:b.level-(("boolean"===typeof g.levelIsConstant?g.levelIsConstant:1)?0:p.level),name:x(q&&q.name,""),visible:h===b.id||("boolean"===typeof g.visible?g.visible:!1)});"function"===typeof l&&(b=l(b,g));u(b.children,function(l,a){var c=w({},g);w(c,{index:a,siblings:b.children.length,visible:b.visible});l=f(l,c);v.push(l);l.visible&&(r+=l.val)});b.visible=0<r||b.visible;l=x(t.value,r);w(b,{children:v,childrenTotal:r,
isLeaf:b.visible&&!r,val:l});return b},updateRootId:function(b){var g;t(b)&&(g=t(b.options)?b.options:{},g=x(b.rootNode,g.rootId,""),t(b.userOptions)&&(b.userOptions.rootId=g),b.rootNode=g);return g}}}(u);(function(b,u){var w=b.seriesType,q=b.seriesTypes,t=b.map,r=b.merge,A=b.extend,x=b.noop,g=b.each,B=u.getColor,f=u.getLevelOptions,l=b.grep,v=b.isNumber,z=b.isString,h=b.pick,p=b.Series,C=b.stableSort,E=function(a,c,d){d=d||this;b.objectEach(a,function(b,e){c.call(d,b,e,a)})},H=b.reduce,D=function(a,
c,d){d=d||this;a=c.call(d,a);!1!==a&&D(a,c,d)},I=u.updateRootId;w("treemap","scatter",{showInLegend:!1,marker:!1,colorByPoint:!1,dataLabels:{enabled:!0,defer:!1,verticalAlign:"middle",formatter:function(){return this.point.name||this.point.id},inside:!0},tooltip:{headerFormat:"",pointFormat:"\x3cb\x3e{point.name}\x3c/b\x3e: {point.value}\x3cbr/\x3e"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,drillUpButton:{position:{align:"right",
x:-10,y:10}}},{pointArrayMap:["value"],axisTypes:q.heatmap?["xAxis","yAxis","colorAxis"]:["xAxis","yAxis"],directTouch:!0,optionalAxis:"colorAxis",getSymbol:x,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",translateColors:q.heatmap&&q.heatmap.prototype.translateColors,colorAttribs:q.heatmap&&q.heatmap.prototype.colorAttribs,trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,c){a=H(a||[],function(a,c,b){c=h(c.parent,"");void 0===a[c]&&(a[c]=[]);a[c].push(b);
return a},{});E(a,function(a,n,e){""!==n&&-1===b.inArray(n,c)&&(g(a,function(a){e[""].push(a)}),delete e[n])});return a},getTree:function(){var a=t(this.data,function(a){return a.id}),a=this.getListOfParents(this.data,a);this.nodeMap=[];return this.buildNode("",-1,0,a,null)},init:function(a,c){p.prototype.init.call(this,a,c);this.options.allowDrillToNode&&b.addEvent(this,"click",this.onClickDrillToNode)},buildNode:function(a,c,d,b,e){var m=this,n=[],k=m.points[c],F=0,G;g(b[a]||[],function(c){G=m.buildNode(m.points[c].id,
c,d+1,b,a);F=Math.max(G.height+1,F);n.push(G)});c={id:a,i:c,children:n,height:F,level:d,parent:e,visible:!1};m.nodeMap[c.id]=c;k&&(k.node=c);return c},setTreeValues:function(a){var c=this,d=c.options,b=c.nodeMap[c.rootNode],d="boolean"===typeof d.levelIsConstant?d.levelIsConstant:!0,e=0,m=[],y,k=c.points[a.i];g(a.children,function(a){a=c.setTreeValues(a);m.push(a);a.ignore||(e+=a.val)});C(m,function(a,c){return a.sortIndex-c.sortIndex});y=h(k&&k.options.value,e);k&&(k.value=y);A(a,{children:m,childrenTotal:e,
ignore:!(h(k&&k.visible,!0)&&0<y),isLeaf:a.visible&&!e,levelDynamic:a.level-(d?0:b.level),name:h(k&&k.name,""),sortIndex:h(k&&k.sortIndex,-y),val:y});return a},calculateChildrenAreas:function(a,c){var d=this,b=d.options,e=d.mapOptionsToLevel[a.level+1],m=h(d[e&&e.layoutAlgorithm]&&e.layoutAlgorithm,b.layoutAlgorithm),y=b.alternateStartingDirection,k=[];a=l(a.children,function(a){return!a.ignore});e&&e.layoutStartingDirection&&(c.direction="vertical"===e.layoutStartingDirection?0:1);k=d[m](c,a);g(a,
function(a,b){b=k[b];a.values=r(b,{val:a.childrenTotal,direction:y?1-c.direction:c.direction});a.pointValues=r(b,{x:b.x/d.axisRatio,width:b.width/d.axisRatio});a.children.length&&d.calculateChildrenAreas(a,a.values)})},setPointValues:function(){var a=this.xAxis,c=this.yAxis;g(this.points,function(d){var b=d.node,e=b.pointValues,m,g;e&&b.visible?(b=Math.round(a.translate(e.x,0,0,0,1))-0,m=Math.round(a.translate(e.x+e.width,0,0,0,1))-0,g=Math.round(c.translate(e.y,0,0,0,1))-0,e=Math.round(c.translate(e.y+
e.height,0,0,0,1))-0,d.shapeType="rect",d.shapeArgs={x:Math.min(b,m),y:Math.min(g,e),width:Math.abs(m-b),height:Math.abs(e-g)},d.plotX=d.shapeArgs.x+d.shapeArgs.width/2,d.plotY=d.shapeArgs.y+d.shapeArgs.height/2):(delete d.plotX,delete d.plotY)})},setColorRecursive:function(a,c,d,b,e){var m=this,n=m&&m.chart,n=n&&n.options&&n.options.colors,k;if(a){k=B(a,{colors:n,index:b,mapOptionsToLevel:m.mapOptionsToLevel,parentColor:c,parentColorIndex:d,series:m,siblings:e});if(c=m.points[a.i])c.color=k.color,
c.colorIndex=k.colorIndex;g(a.children||[],function(c,d){m.setColorRecursive(c,k.color,k.colorIndex,d,a.children.length)})}},algorithmGroup:function(a,c,d,b){this.height=a;this.width=c;this.plot=b;this.startDirection=this.direction=d;this.lH=this.nH=this.lW=this.nW=this.total=0;this.elArr=[];this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(a,c){return Math.max(a/c,c/a)}};this.addElement=function(a){this.lP.total=this.elArr[this.elArr.length-1];this.total+=a;0===this.direction?(this.lW=
this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,this.lP.lW=this.lP.total/this.lH,this.lP.lR=this.lP.aspectRatio(this.lP.lW,this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=this.lP.aspectRatio(this.lP.nW,this.nH));this.elArr.push(a)};this.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=
0}},algorithmCalcPoints:function(a,c,d,b){var e,m,n,k,l=d.lW,h=d.lH,f=d.plot,q,r=0,p=d.elArr.length-1;c?(l=d.nW,h=d.nH):q=d.elArr[d.elArr.length-1];g(d.elArr,function(a){if(c||r<p)0===d.direction?(e=f.x,m=f.y,n=l,k=a/n):(e=f.x,m=f.y,k=h,n=a/k),b.push({x:e,y:m,width:n,height:k}),0===d.direction?f.y+=k:f.x+=n;r+=1});d.reset();0===d.direction?d.width-=l:d.height-=h;f.y=f.parent.y+(f.parent.height-d.height);f.x=f.parent.x+(f.parent.width-d.width);a&&(d.direction=1-d.direction);c||d.addElement(q)},algorithmLowAspectRatio:function(a,
c,b){var d=[],e=this,m,f={x:c.x,y:c.y,parent:c},k=0,l=b.length-1,h=new this.algorithmGroup(c.height,c.width,c.direction,f);g(b,function(b){m=b.val/c.val*c.height*c.width;h.addElement(m);h.lP.nR>h.lP.lR&&e.algorithmCalcPoints(a,!1,h,d,f);k===l&&e.algorithmCalcPoints(a,!0,h,d,f);k+=1});return d},algorithmFill:function(a,c,b){var d=[],e,m=c.direction,f=c.x,k=c.y,h=c.width,l=c.height,q,r,p,t;g(b,function(b){e=b.val/c.val*c.height*c.width;q=f;r=k;0===m?(t=l,p=e/t,h-=p,f+=p):(p=h,t=e/p,l-=t,k+=t);d.push({x:q,
y:r,width:p,height:t});a&&(m=1-m)});return d},strip:function(a,c){return this.algorithmLowAspectRatio(!1,a,c)},squarified:function(a,c){return this.algorithmLowAspectRatio(!0,a,c)},sliceAndDice:function(a,c){return this.algorithmFill(!0,a,c)},stripes:function(a,c){return this.algorithmFill(!1,a,c)},translate:function(){var a=this,c=a.options,b=I(a),n,e;p.prototype.translate.call(a);e=a.tree=a.getTree();n=a.nodeMap[b];a.mapOptionsToLevel=f({from:n.level+1,levels:c.levels,to:e.height,defaults:{levelIsConstant:a.options.levelIsConstant,
colorByPoint:c.colorByPoint}});""===b||n&&n.children.length||(a.drillToNode("",!1),b=a.rootNode,n=a.nodeMap[b]);D(a.nodeMap[a.rootNode],function(b){var c=!1,d=b.parent;b.visible=!0;if(d||""===d)c=a.nodeMap[d];return c});D(a.nodeMap[a.rootNode].children,function(a){var b=!1;g(a,function(a){a.visible=!0;a.children.length&&(b=(b||[]).concat(a.children))});return b});a.setTreeValues(e);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=b={x:0,y:0,width:100,height:100};a.nodeMap[""].values=
b=r(b,{width:b.width*a.axisRatio,direction:"vertical"===c.layoutStartingDirection?0:1,val:e.val});a.calculateChildrenAreas(e,b);a.colorAxis?a.translateColors():c.colorByPoint||a.setColorRecursive(a.tree);c.allowDrillToNode&&(c=n.pointValues,a.xAxis.setExtremes(c.x,c.x+c.width,!1),a.yAxis.setExtremes(c.y,c.y+c.height,!1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()},drawDataLabels:function(){var a=this,b=a.mapOptionsToLevel,d=l(a.points,function(a){return a.node.visible}),f,e;g(d,function(c){e=
b[c.node.level];f={style:{}};c.node.isLeaf||(f.enabled=!1);e&&e.dataLabels&&(f=r(f,e.dataLabels),a._hasPointLabels=!0);c.shapeArgs&&(f.style.width=c.shapeArgs.width,c.dataLabel&&c.dataLabel.css({width:c.shapeArgs.width+"px"}));c.dlOptions=r(f,c.options.dataLabels)});p.prototype.drawDataLabels.call(this)},alignDataLabel:function(a){q.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},drawPoints:function(){var a=this,b=l(a.points,function(a){return a.node.visible});
g(b,function(b){var c="level-group-"+b.node.levelDynamic;a[c]||(a[c]=a.chart.renderer.g(c).attr({zIndex:1E3-b.node.levelDynamic}).add(a.group));b.group=a[c]});q.column.prototype.drawPoints.call(this);this.colorAttribs&&g(this.points,function(a){a.graphic&&a.graphic.css(this.colorAttribs(a))},this);a.options.allowDrillToNode&&g(b,function(b){b.graphic&&(b.drillId=a.options.interactByLeaf?a.drillToByLeaf(b):a.drillToByGroup(b))})},onClickDrillToNode:function(a){var b=(a=a.point)&&a.drillId;z(b)&&(a.setState(""),
this.drillToNode(b))},drillToByGroup:function(a){var b=!1;1!==a.node.level-this.nodeMap[this.rootNode].level||a.node.isLeaf||(b=a.id);return b},drillToByLeaf:function(a){var b=!1;if(a.node.parent!==this.rootNode&&a.node.isLeaf)for(a=a.node;!b;)a=this.nodeMap[a.parent],a.parent===this.rootNode&&(b=a.id);return b},drillUp:function(){var a=this.nodeMap[this.rootNode];a&&z(a.parent)&&this.drillToNode(a.parent)},drillToNode:function(a,b){var c=this.nodeMap[a];this.idPreviousRoot=this.rootNode;this.rootNode=
a;""===a?this.drillUpButton=this.drillUpButton.destroy():this.showDrillUpButton(c&&c.name||a);this.isDirty=!0;h(b,!0)&&this.chart.redraw()},showDrillUpButton:function(a){var b=this;a=a||"\x3c Back";var d=b.options.drillUpButton,f,e;d.text&&(a=d.text);this.drillUpButton?(this.drillUpButton.placed=!1,this.drillUpButton.attr({text:a}).align()):(e=(f=d.theme)&&f.states,this.drillUpButton=this.chart.renderer.button(a,null,null,function(){b.drillUp()},f,e&&e.hover,e&&e.select).addClass("highcharts-drillup-button").attr({align:d.position.align,
zIndex:7}).add().align(d.position,!1,d.relativeTo||"plotBox"))},buildKDTree:x,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,getExtremes:function(){p.prototype.getExtremes.call(this,this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;p.prototype.getExtremes.call(this)},getExtremesFromAll:!0,bindAxes:function(){var a={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,dataMin:0,minPadding:0,max:100,dataMax:100,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};p.prototype.bindAxes.call(this);
b.extend(this.yAxis.options,a);b.extend(this.xAxis.options,a)},utils:{recursive:D,reduce:H}},{getClassName:function(){var a=b.Point.prototype.getClassName.call(this),c=this.series,d=c.options;this.node.level<=c.nodeMap[c.rootNode].level?a+=" highcharts-above-level":this.node.isLeaf||h(d.interactByLeaf,!d.allowDrillToNode)?this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a},isValid:function(){return this.id||v(this.value)},setState:function(a){b.Point.prototype.setState.call(this,
a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})},setVisible:q.pie.prototype.pointClass.prototype.setVisible})})(u,E)});
