/* Highcharts JS v8.0.4 (2020-03-10) (c) 2014-2019 Highsoft AS Authors: Jon Arild Nygard / Oystein Moseng License: www.highcharts.com/license */ (function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/treemap",["highcharts"],function(p){c(p);c.Highcharts=p;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function p(c,d,y,g){c.hasOwnProperty(d)||(c[d]=g.apply(null,y))}c=c?c._modules:{};p(c,"mixins/tree-series.js",[c["parts/Color.js"],c["parts/Utilities.js"]],function(c,d){var y=d.extend,g=d.isArray,z=d.isNumber,m=d.isObject, k=d.merge,v=d.pick;return{getColor:function(f,l){var d=l.index,k=l.mapOptionsToLevel,w=l.parentColor,g=l.parentColorIndex,m=l.series,B=l.colors,y=l.siblings,q=m.points,x=m.chart.options.chart,A;if(f){q=q[f.i];f=k[f.level]||{};if(k=q&&f.colorByPoint){var t=q.index%(B?B.length:x.colorCount);var z=B&&B[t]}if(!m.chart.styledMode){B=q&&q.options.color;x=f&&f.color;if(A=w)A=(A=f&&f.colorVariation)&&"brightness"===A.key?c.parse(w).brighten(d/y*A.to).get():w;A=v(B,x,z,A,m.color)}var p=v(q&&q.options.colorIndex, f&&f.colorIndex,t,g,l.colorIndex)}return{color:A,colorIndex:p}},getLevelOptions:function(f){var l=null;if(m(f)){l={};var c=z(f.from)?f.from:1;var d=f.levels;var w={};var v=m(f.defaults)?f.defaults:{};g(d)&&(w=d.reduce(function(l,d){if(m(d)&&z(d.level)){var f=k({},d);var E="boolean"===typeof f.levelIsConstant?f.levelIsConstant:v.levelIsConstant;delete f.levelIsConstant;delete f.level;d=d.level+(E?0:c-1);m(l[d])?y(l[d],f):l[d]=f}return l},{}));d=z(f.to)?f.to:1;for(f=0;f<=d;f++)l[f]=k({},v,m(w[f])?w[f]: {})}return l},setTreeValues:function F(d,c){var l=c.before,k=c.idRoot,m=c.mapIdToNode[k],g=c.points[d.i],E=g&&g.options||{},q=0,x=[];y(d,{levelDynamic:d.level-(("boolean"===typeof c.levelIsConstant?c.levelIsConstant:1)?0:m.level),name:v(g&&g.name,""),visible:k===d.id||("boolean"===typeof c.visible?c.visible:!1)});"function"===typeof l&&(d=l(d,c));d.children.forEach(function(l,k){var g=y({},c);y(g,{index:k,siblings:d.children.length,visible:d.visible});l=F(l,g);x.push(l);l.visible&&(q+=l.val)});d.visible= 0{point.name}: {point.value}
"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,drillUpButton:{position:{align:"right",x:-10,y:10}},traverseUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1, colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:"#999999",brightness:G.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}}},{pointArrayMap:["value"],directTouch:!0,optionalAxis:"colorAxis",getSymbol:k,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,b){a=I(a)?a:[];var e=I(b)?b:[];b=a.reduce(function(a,b,e){b=t(b.parent,"");"undefined"===typeof a[b]&&(a[b]=[]);a[b].push(e);return a},{"":[]});O(b,function(a, b,d){""!==b&&-1===e.indexOf(b)&&(a.forEach(function(a){d[""].push(a)}),delete d[b])});return b},getTree:function(){var a=this.data.map(function(a){return a.id});a=this.getListOfParents(this.data,a);this.nodeMap=[];return this.buildNode("",-1,0,a,null)},hasData:function(){return!!this.processedXData.length},init:function(a,b){var e=c.colorMapSeriesMixin;e&&(this.colorAttribs=e.colorAttribs);this.eventsToUnbind.push(f(this,"setOptions",function(a){a=a.userOptions;p(a.allowDrillToNode)&&!p(a.allowTraversingTree)&& (a.allowTraversingTree=a.allowDrillToNode,delete a.allowDrillToNode);p(a.drillUpButton)&&!p(a.traverseUpButton)&&(a.traverseUpButton=a.drillUpButton,delete a.drillUpButton)}));C.prototype.init.call(this,a,b);this.options.allowTraversingTree&&this.eventsToUnbind.push(f(this,"click",this.onClickDrillToNode))},buildNode:function(a,b,e,d,h){var c=this,n=[],r=c.points[b],f=0,u;(d[a]||[]).forEach(function(b){u=c.buildNode(c.points[b].id,b,e+1,d,a);f=Math.max(u.height+1,f);n.push(u)});b={id:a,i:b,children:n, height:f,level:e,parent:h,visible:!1};c.nodeMap[b.id]=b;r&&(r.node=b);return b},setTreeValues:function(a){var b=this,e=b.options,d=b.nodeMap[b.rootNode];e="boolean"===typeof e.levelIsConstant?e.levelIsConstant:!0;var h=0,c=[],n=b.points[a.i];a.children.forEach(function(a){a=b.setTreeValues(a);c.push(a);a.ignore||(h+=a.val)});L(c,function(a,b){return a.sortIndex-b.sortIndex});var f=t(n&&n.options.value,h);n&&(n.value=f);w(a,{children:c,childrenTotal:h,ignore:!(t(n&&n.visible,!0)&&0u.lP.lR&&h.algorithmCalcPoints(a,!1,u,d,f);g===k&&h.algorithmCalcPoints(a,!0,u,d,f);g+=1});return d},algorithmFill:function(a,b,e){var d=[],c,f=b.direction,g=b.x,k=b.y,l=b.width,u=b.height,m,q,p,t;e.forEach(function(e){c=e.val/b.val* b.height*b.width;m=g;q=k;0===f?(t=u,p=c/t,l-=p,g+=p):(p=l,t=c/p,u-=t,k+=t);d.push({x:m,y:q,width:p,height:t});a&&(f=1-f)});return d},strip:function(a,b){return this.algorithmLowAspectRatio(!1,a,b)},squarified:function(a,b){return this.algorithmLowAspectRatio(!0,a,b)},sliceAndDice:function(a,b){return this.algorithmFill(!0,a,b)},stripes:function(a,b){return this.algorithmFill(!1,a,b)},translate:function(){var a=this,b=a.options,e=P(a);C.prototype.translate.call(a);var d=a.tree=a.getTree();var c=a.nodeMap[e]; a.renderTraverseUpButton(e);a.mapOptionsToLevel=N({from:c.level+1,levels:b.levels,to:d.height,defaults:{levelIsConstant:a.options.levelIsConstant,colorByPoint:b.colorByPoint}});""===e||c&&c.children.length||(a.setRootNode("",!1),e=a.rootNode,c=a.nodeMap[e]);D(a.nodeMap[a.rootNode],function(b){var e=!1,d=b.parent;b.visible=!0;if(d||""===d)e=a.nodeMap[d];return e});D(a.nodeMap[a.rootNode].children,function(a){var b=!1;a.forEach(function(a){a.visible=!0;a.children.length&&(b=(b||[]).concat(a.children))}); return b});a.setTreeValues(d);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=e={x:0,y:0,width:100,height:100};a.nodeMap[""].values=e=x(e,{width:e.width*a.axisRatio,direction:"vertical"===b.layoutStartingDirection?0:1,val:d.val});a.calculateChildrenAreas(d,e);a.colorAxis||b.colorByPoint||a.setColorRecursive(a.tree);b.allowTraversingTree&&(b=c.pointValues,a.xAxis.setExtremes(b.x,b.x+b.width,!1),a.yAxis.setExtremes(b.y,b.y+b.height,!1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()}, drawDataLabels:function(){var a=this,b=a.mapOptionsToLevel,e,d;a.points.filter(function(a){return a.node.visible}).forEach(function(c){d=b[c.node.level];e={style:{}};c.node.isLeaf||(e.enabled=!1);d&&d.dataLabels&&(e=x(e,d.dataLabels),a._hasPointLabels=!0);c.shapeArgs&&(e.style.width=c.shapeArgs.width,c.dataLabel&&c.dataLabel.css({width:c.shapeArgs.width+"px"}));c.dlOptions=x(e,c.options.dataLabels)});C.prototype.drawDataLabels.call(this)},alignDataLabel:function(a,b,e){var c=e.style;!p(c.textOverflow)&& b.text&&b.getBBox().width>b.text.textWidth&&b.css({textOverflow:"ellipsis",width:c.width+="px"});G.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},pointAttribs:function(a,b){var e=K(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},c=a&&e[a.node.level]||{};e=this.options;var d=b&&e.states[b]||{},f=a&&a.getClassName()||"";a={stroke:a&&a.borderColor||c.borderColor||d.borderColor||e.borderColor,"stroke-width":t(a&&a.borderWidth,c.borderWidth, d.borderWidth,e.borderWidth),dashstyle:a&&a.borderDashStyle||c.borderDashStyle||d.borderDashStyle||e.borderDashStyle,fill:a&&a.color||this.color};-1!==f.indexOf("highcharts-above-level")?(a.fill="none",a["stroke-width"]=0):-1!==f.indexOf("highcharts-internal-node-interactive")?(b=t(d.opacity,e.opacity),a.fill=v(a.fill).setOpacity(b).get(),a.cursor="pointer"):-1!==f.indexOf("highcharts-internal-node")?a.fill="none":b&&(a.fill=v(a.fill).brighten(d.brightness).get());return a},drawPoints:function(){var a= this,b=a.chart,e=b.renderer,c=b.styledMode,d=a.options,f=c?{}:d.shadow,g=d.borderRadius,k=b.pointCount