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