/* Highcharts JS v6.0.4 (2017-12-15) (c) 2016 Highsoft AS Authors: Jon Arild Nygard License: www.highcharts.com/license */ (function(z){"object"===typeof module&&module.exports?module.exports=z:z(Highcharts)})(function(z){(function(b){var r=b.deg2rad,f=b.isNumber,l=b.pick,G=b.relativeLength;b.CenteredSeriesMixin={getCenter:function(){var b=this.options,h=this.chart,n=2*(b.slicedOffset||0),k=h.plotWidth-2*n,h=h.plotHeight-2*n,x=b.center,x=[l(x[0],"50%"),l(x[1],"50%"),b.size||"100%",b.innerSize||0],f=Math.min(k,h),y,A;for(y=0;4>y;++y)A=x[y],b=2>y||2===y&&/%$/.test(A),x[y]=G(A,[k,h,f,x[2]][y])+(b?n:0);x[3]>x[2]&&(x[3]=x[2]); return x},getStartAndEndRadians:function(b,h){b=f(b)?b:0;h=f(h)&&h>b&&360>h-b?h:b+360;return{start:r*(b+-90),end:r*(h+-90)}}}})(z);var L=function(){return function(b){var r=this,f=r.graphic,l=b.animate,G=b.attr,u=b.onComplete,h=b.css,n=b.group,k=b.renderer,x=b.shapeArgs;b=b.shapeType;r.shouldDraw()?(f||(r.graphic=f=k[b](x).add(n)),f.css(h).attr(G).animate(l,void 0,u)):f&&f.animate(l,void 0,function(){r.graphic=f=f.destroy();"function"===typeof u&&u()});f&&f.addClass(r.getClassName(),!0)}}(),K=function(b){var r= b.each,f=b.extend,l=b.pick;return{getColor:function(b,f){var h=f.levelMap,n=f.parentColorIndex,k=f.series,x=f.colors,r=k.points,y,A;b&&(r=r[b.i],h=h[b.levelDynamic]||{},(b=r&&("boolean"===typeof h.colorByPoint?h.colorByPoint:!!k.options.colorByPoint))&&(y=r.index%(x?x.length:k.chart.options.chart.colorCount)),A=l(r&&r.options.colorIndex,h&&h.colorIndex,y,n,f.colorIndex));return{color:void 0,colorIndex:A}},setTreeValues:function u(b,n){var k=n.before,h=n.idRoot,z=n.mapIdToNode[h],y=n.points[b.i],A= y&&y.options||{},w=0,B=[];f(b,{levelDynamic:b.level-(("boolean"===typeof n.levelIsConstant?n.levelIsConstant:1)?0:z.level),name:l(y&&y.name,""),visible:h===b.id||("boolean"===typeof n.visible?n.visible:!1)});"function"===typeof k&&(b=k(b,n));r(b.children,function(k,h){var l=f({},n);f(l,{index:h,siblings:b.children.length,visible:b.visible});k=u(k,l);B.push(k);k.visible&&(w+=k.val)});b.visible=0v.lP.lR&&e.algorithmCalcPoints(a, !1,v,b,g);f===h&&e.algorithmCalcPoints(a,!0,v,b,g);f+=1});return b},algorithmFill:function(a,c,d){var b=[],e,m=c.direction,g=c.x,f=c.y,h=c.width,v=c.height,l,n,q,r;k(d,function(d){e=d.val/c.val*c.height*c.width;l=g;n=f;0===m?(r=v,q=e/r,h-=q,g+=q):(q=h,r=e/q,v-=r,f+=r);b.push({x:l,y:n,width:q,height:r});a&&(m=1-m)});return b},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.rootNode=w(a.rootNode,a.options.rootId,""),d,b;B.prototype.translate.call(a);a.levelMap=F(a.options.levels||[],function(a,c){a[c.level]=c;return a},{});b=a.tree=a.getTree();d=a.nodeMap[c];""===c||d&&d.children.length||(a.drillToNode("",!1),c=a.rootNode,d=a.nodeMap[c]);E(a.nodeMap[a.rootNode],function(c){var d=!1,b=c.parent;c.visible=!0;if(b||""===b)d=a.nodeMap[b];return d});E(a.nodeMap[a.rootNode].children, function(a){var c=!1;k(a,function(a){a.visible=!0;a.children.length&&(c=(c||[]).concat(a.children))});return c});a.setTreeValues(b);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=c={x:0,y:0,width:100,height:100};a.nodeMap[""].values=c=u(c,{width:c.width*a.axisRatio,direction:"vertical"===a.options.layoutStartingDirection?0:1,val:b.val});a.calculateChildrenAreas(b,c);a.colorAxis?a.translateColors():a.options.colorByPoint||a.setColorRecursive(a.tree);a.options.allowDrillToNode&&(d=d.pointValues, a.xAxis.setExtremes(d.x,d.x+d.width,!1),a.yAxis.setExtremes(d.y,d.y+d.height,!1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()},drawDataLabels:function(){var a=this,c=D(a.points,function(a){return a.node.visible}),d,b;k(c,function(c){b=a.levelMap[c.node.levelDynamic];d={style:{}};c.node.isLeaf||(d.enabled=!1);b&&b.dataLabels&&(d=u(d,b.dataLabels),a._hasPointLabels=!0);c.shapeArgs&&(d.style.width=c.shapeArgs.width,c.dataLabel&&c.dataLabel.css({width:c.shapeArgs.width+"px"}));c.dlOptions= u(d,c.options.dataLabels)});B.prototype.drawDataLabels.call(this)},alignDataLabel:function(a){l.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},drawPoints:function(){var a=this,c=D(a.points,function(a){return a.node.visible});k(c,function(c){var d="level-group-"+c.node.levelDynamic;a[d]||(a[d]=a.chart.renderer.g(d).attr({zIndex:1E3-c.node.levelDynamic}).add(a.group));c.group=a[d]});l.column.prototype.drawPoints.call(this);this.colorAttribs&& k(this.points,function(a){a.graphic&&a.graphic.css(this.colorAttribs(a))},this);a.options.allowDrillToNode&&k(c,function(c){c.graphic&&(c.drillId=a.options.interactByLeaf?a.drillToByLeaf(c):a.drillToByGroup(c))})},onClickDrillToNode:function(a){var c=(a=a.point)&&a.drillId;A(c)&&(a.setState(""),this.drillToNode(c))},drillToByGroup:function(a){var c=!1;1!==a.node.level-this.nodeMap[this.rootNode].level||a.node.isLeaf||(c=a.id);return c},drillToByLeaf:function(a){var c=!1;if(a.node.parent!==this.rootNode&& a.node.isLeaf)for(a=a.node;!c;)a=this.nodeMap[a.parent],a.parent===this.rootNode&&(c=a.id);return c},drillUp:function(){var a=this.nodeMap[this.rootNode];a&&A(a.parent)&&this.drillToNode(a.parent)},drillToNode:function(a,c){var d=this.nodeMap[a];this.idPreviousRoot=this.rootNode;this.rootNode=a;""===a?this.drillUpButton=this.drillUpButton.destroy():this.showDrillUpButton(d&&d.name||a);this.isDirty=!0;w(c,!0)&&this.chart.redraw()},showDrillUpButton:function(a){var c=this;a=a||"\x3c Back";var d=c.options.drillUpButton, b,e;d.text&&(a=d.text);this.drillUpButton?(this.drillUpButton.placed=!1,this.drillUpButton.attr({text:a}).align()):(e=(b=d.theme)&&b.states,this.drillUpButton=this.chart.renderer.button(a,null,null,function(){c.drillUp()},b,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:n,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,getExtremes:function(){B.prototype.getExtremes.call(this, this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;B.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:[]};B.prototype.bindAxes.call(this);b.extend(this.yAxis.options,a);b.extend(this.xAxis.options,a)},utils:{recursive:E,reduce:F}},{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||w(d.interactByLeaf,!d.allowDrillToNode)?this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a},isValid:function(){return this.id||y(this.value)},setState:function(a){b.Point.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})},setVisible:l.pie.prototype.pointClass.prototype.setVisible})})(z,K);(function(b, r,f){var l=b.CenteredSeriesMixin,z=b.Series,u=b.each,h=b.extend,n=l.getCenter,k=f.getColor,x=l.getStartAndEndRadians,D=b.grep,y=b.isNumber,A=b.isObject,w=b.isString,B=b.merge,I=b.pick,J=180/Math.PI,l=b.seriesType,F=f.setTreeValues,E=b.reduce,a=function(a,b){var c=b.mapIdToNode[a.parent],d=b.series,m=d.chart,g=d.points[a.i];b=k(a,{colors:m&&m.options&&m.options.colors,colorIndex:d.colorIndex,colorByPoint:d.colorByPoint,index:b.index,levelMap:b.levelMap,parentColor:c&&c.color,parentColorIndex:c&&c.colorIndex, series:b.series,siblings:b.siblings});a.color=b.color;a.colorIndex=b.colorIndex;g&&(g.color=a.color,g.colorIndex=a.colorIndex,a.sliced=g.sliced);return a};l("sunburst","treemap",{center:["50%","50%"],dataLabels:{defer:!0,style:{textOverflow:"ellipsis"},rotationMode:"perpendicular"},rootId:void 0,levelIsConstant:!0,slicedOffset:10},{drawDataLabels:b.noop,drawPoints:function(){var a=this,b=a.levelMap,f=a.shapeRoot,e=a.group,m=a.hasRendered,g=a.rootNode,k=a.idPreviousRoot,l=a.nodeMap,v=l[k],r=v&&v.shapeArgs, v=a.points,n=a.startAndEndRadians,q=a.chart,q=q&&q.options&&q.options.chart||{},x="boolean"===typeof q.animation?q.animation:!0,w=a.center[3]/2,E=a.chart.renderer,D,F=!1,G=!1;if(q=!!(x&&m&&g!==k&&a.dataLabelsGroup))a.dataLabelsGroup.attr({opacity:0}),D=function(){F=!0;a.dataLabelsGroup&&a.dataLabelsGroup.animate({opacity:1,visibility:"visible"})};u(v,function(c){var d,v,p=c.node,t=b[p.levelDynamic];d=c.shapeExisting||{};var q=p.shapeArgs||{},z,H=!(!p.visible||!p.shapeArgs);if(m&&x){var u={};v={end:q.end, start:q.start,innerR:q.innerR,r:q.r,x:q.x,y:q.y};H?!c.graphic&&r&&(u=g===c.id?{start:n.start,end:n.end}:r.end<=q.start?{start:n.end,end:n.end}:{start:n.start,end:n.start},u.innerR=u.r=w):c.graphic&&(k===c.id?v={innerR:w,r:w}:f&&(v=f.end<=d.start?{innerR:w,r:w,start:n.end,end:n.end}:{innerR:w,r:w,start:n.start,end:n.start}));d=u}else v=q,d={};var u=[q.plotX,q.plotY],C;c.node.isLeaf||(g===c.id?(C=l[g],C=C.parent):C=c.id);h(c,{shapeExisting:q,tooltipPos:u,drillId:C,name:""+(c.name||c.id||c.index),plotX:q.plotX, plotY:q.plotY,value:p.val,isNull:!H});u=c.options;C=a.options;p=A(q)?q:{};C=A(C)?C.dataLabels:{};u=A(u)?u.dataLabels:{};t=A(t)?t.dataLabels:{};t=B({rotationMode:"perpendicular",style:{width:p.radius}},C,t,u);y(t.rotation)||(p=p.end-(p.end-p.start)/2,p=p*J%180,"parallel"===t.rotationMode&&(p-=90),90a.val?a.childrenTotal:a.val:a.childrenTotal,g=(b.end-b.start)/(2*Math.PI),m=2*Math.PI*b.innerR;this.points[a.i]&&(this.points[a.i].innerArcLength= g*m);a.shapeArgs=B(b,{plotX:d.x,plotY:d.y});a.values=B(b,{val:e});a.children.length&&this.setShapeArgs(a,a.values,f)},this)},translate:function(){var c=this.options,b=this.center=n.call(this),f=this.startAndEndRadians=x(c.startAngle,c.endAngle),e=b[3]/2,m=b[2]/2,g=this.rootNode=I(this.rootNode,c.rootId,""),h=this.nodeMap,k,l=h&&h[g],r,u;this.shapeRoot=l&&l.shapeArgs;z.prototype.translate.call(this);this.levelMap=E(this.options.levels||[],function(a,b){a[b.level]=b;return a},{});u=this.tree=this.getTree(); h=this.nodeMap;l=h[g];k=w(l.parent)?l.parent:"";r=h[k];F(u,{before:a,idRoot:g,levelIsConstant:c.levelIsConstant,levelMap:this.levelMap,mapIdToNode:h,points:this.points,series:this});b=h[""].shapeArgs={end:f.end,r:e,radius:(m-e)/(g===k?l.height:l.height+1),start:f.start,val:r.val,x:b[0],y:b[1]};this.setShapeArgs(r,b,{idRoot:g,slicedOffset:c.slicedOffset})},animate:function(a){var b=this.chart,c=[b.plotWidth/2,b.plotHeight/2],e=b.plotLeft,f=b.plotTop,b=this.group;a?(a={translateX:c[0]+e,translateY:c[1]+ f,scaleX:.001,scaleY:.001,rotation:10,opacity:.01},b.attr(a)):(a={translateX:e,translateY:f,scaleX:1,scaleY:1,rotation:0,opacity:1},b.animate(a,this.options.animation),this.animate=null)}},{draw:r,shouldDraw:function(){return!this.isNull}})})(z,L,K)});