/* 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=0h.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)});