/* Highcharts JS v9.3.1 (2021-11-05) (c) 2014-2021 Highsoft AS Authors: Jon Arild Nygard / Oystein Moseng License: www.highcharts.com/license */ 'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/treemap",["highcharts"],function(l){a(l);a.Highcharts=l;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function l(a,e,d,t){a.hasOwnProperty(e)||(a[e]=t.apply(null,d))}a=a?a._modules:{};l(a,"Series/ColorMapComposition.js",[a["Core/Utilities.js"]],function(a){var e=a.defined,d=a.wrap,t={pointArrayMap:["value"], axisTypes:["xAxis","yAxis","colorAxis"],trackerGroups:["group","markerGroup","dataLabelsGroup"],parallelArrays:["x","y","value"],colorKey:"value"},p;(function(n){function a(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value}function f(b){var g={};!e(b.color)||b.state&&"normal"!==b.state||(g[this.colorProp||"fill"]=b.color);return g}function r(b,g,a){b=b.call(this,g,a);g.moveToTopOnHover&&(b.zIndex="hover"===a?1:0);return b}n.colorMapSeriesMixin=t;var b=[];n.compose=function(m, g){g&&-1===b.indexOf(g)&&(b.push(g),g=g.prototype,g.dataLabelOnNull=!0,g.moveToTopOnHover=!0,g.isValid=a);-1===b.indexOf(m)&&(b.push(m),g=m.prototype,g.colorAttribs=f,d(g,"pointAttribs",r));return m};n.seriesColorAttribs=f})(p||(p={}));return p});l(a,"Series/Treemap/TreemapAlgorithmGroup.js",[],function(){return function(){function a(a,d,t,p){this.height=a;this.width=d;this.plot=p;this.startDirection=this.direction=t;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,d){return Math.max(a/d,d/a)}}}a.prototype.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)};a.prototype.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=0};return a}()});l(a,"Series/DrawPointComposition.js",[],function(){var a;(function(a){function d(a){var d=this,f=a.animatableAttribs,n=a.onComplete,b=a.css,m=a.renderer,g=this.series&&this.series.chart.hasRendered?void 0:this.series&&this.series.options.animation,A=this.graphic;a.attribs= a.attribs||{};a.attribs["class"]=this.getClassName();if(this.shouldDraw())A||(this.graphic=A=m[a.shapeType](a.shapeArgs).add(a.group)),A.css(b).attr(a.attribs).animate(f,a.isNew?!1:g,n);else if(A){var z=function(){d.graphic=A=A&&A.destroy();"function"===typeof n&&n()};Object.keys(f).length?A.animate(f,void 0,function(){z()}):z()}}function e(){return!this.isNull}var p=[];a.compose=function(a){if(-1===p.indexOf(a)){p.push(a);var n=a.prototype;n.draw=d;n.shouldDraw||(n.shouldDraw=e)}return a}})(a||(a= {}));return a});l(a,"Series/Treemap/TreemapPoint.js",[a["Series/DrawPointComposition.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,e,d){var t=this&&this.__extends||function(){var b=function(a,g){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var g in a)a.hasOwnProperty(g)&&(b[g]=a[g])};return b(a,g)};return function(a,g){function m(){this.constructor=a}b(a,g);a.prototype=null===g?Object.create(g):(m.prototype=g.prototype, new m)}}(),p=e.series.prototype.pointClass,n=e.seriesTypes;e=n.pie.prototype.pointClass;var q=d.extend,f=d.isNumber,r=d.pick;d=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.name=void 0;b.node=void 0;b.options=void 0;b.series=void 0;b.value=void 0;return b}t(b,a);b.prototype.getClassName=function(){var b=p.prototype.getClassName.call(this),a=this.series,m=a.options;this.node.level<=a.nodeMap[a.rootNode].level?b+=" highcharts-above-level":this.node.isLeaf||r(m.interactByLeaf, !m.allowTraversingTree)?this.node.isLeaf||(b+=" highcharts-internal-node"):b+=" highcharts-internal-node-interactive";return b};b.prototype.isValid=function(){return!(!this.id&&!f(this.value))};b.prototype.setState=function(b){p.prototype.setState.call(this,b);this.graphic&&this.graphic.attr({zIndex:"hover"===b?1:0})};b.prototype.shouldDraw=function(){return f(this.plotY)&&null!==this.y};return b}(n.scatter.prototype.pointClass);q(d.prototype,{setVisible:e.prototype.setVisible});a.compose(d);return d}); l(a,"Series/Treemap/TreemapUtilities.js",[a["Core/Utilities.js"]],function(a){var e=a.objectEach,d;(function(a){function d(a,e,f){void 0===f&&(f=this);a=e.call(f,a);!1!==a&&d(a,e,f)}a.AXIS_MAX=100;a.isBoolean=function(a){return"boolean"===typeof a};a.eachObject=function(a,d,f){f=f||this;e(a,function(e,b){d.call(f,e,b,a)})};a.recursive=d})(d||(d={}));return d});l(a,"Series/TreeUtilities.js",[a["Core/Color/Color.js"],a["Core/Utilities.js"]],function(a,e){function d(a,m){var b=m.before,f=m.idRoot,e= m.mapIdToNode[f],n=m.points[a.i],p=n&&n.options||{},F=[],q=0;a.levelDynamic=a.level-(!1!==m.levelIsConstant?0:e.level);a.name=r(n&&n.name,"");a.visible=f===a.id||!0===m.visible;"function"===typeof b&&(a=b(a,m));a.children.forEach(function(b,f){var g=t({},m);t(g,{index:f,siblings:a.children.length,visible:a.visible});b=d(b,g);F.push(b);b.visible&&(q+=b.val)});b=r(p.value,q);a.visible=0<=b&&(0w.lP.lR&&h.algorithmCalcPoints(a, !1,w,c,f);e===g&&h.algorithmCalcPoints(a,!0,w,c,f);e+=1});return c};b.prototype.alignDataLabel=function(a,b,k){var c=k.style;c&&!C(c.textOverflow)&&b.text&&b.getBBox().width>b.text.textWidth&&b.css({textOverflow:"ellipsis",width:c.width+="px"});E.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})};b.prototype.buildNode=function(a,b,k,d,v){var c=this,h=[],f=c.points[b],e=0,B;(d[a]||[]).forEach(function(b){B=c.buildNode(c.points[b].id,b,k+1,d, a);e=Math.max(B.height+1,e);h.push(B)});b={id:a,i:b,children:h,height:e,level:k,parent:v,visible:!1};c.nodeMap[b.id]=b;f&&(f.node=b);return b};b.prototype.calculateChildrenAreas=function(a,b){var c=this,h=c.options,v=c.mapOptionsToLevel[a.level+1],d=y(c[v&&v.layoutAlgorithm]&&v.layoutAlgorithm,h.layoutAlgorithm),e=h.alternateStartingDirection,g=[];a=a.children.filter(function(a){return!a.ignore});v&&v.layoutStartingDirection&&(b.direction="vertical"===v.layoutStartingDirection?0:1);g=c[d](b,a);a.forEach(function(a, h){h=g[h];a.values=D(h,{val:a.childrenTotal,direction:e?1-b.direction:b.direction});a.pointValues=D(h,{x:h.x/c.axisRatio,y:f.AXIS_MAX-h.y-h.height,width:h.width/c.axisRatio});a.children.length&&c.calculateChildrenAreas(a,a.values)})};b.prototype.drawDataLabels=function(){var a=this,b=a.mapOptionsToLevel,k,d;a.points.filter(function(a){return a.node.visible}).forEach(function(c){d=b[c.node.level];k={style:{}};c.node.isLeaf||(k.enabled=!1);d&&d.dataLabels&&(k=D(k,d.dataLabels),a._hasPointLabels=!0); c.shapeArgs&&(k.style.width=c.shapeArgs.width,c.dataLabel&&c.dataLabel.css({width:c.shapeArgs.width+"px"}));c.dlOptions=D(k,c.options.dataLabels)});z.prototype.drawDataLabels.call(this)};b.prototype.drawPoints=function(){var a=this,b=a.chart,k=b.renderer,d=b.styledMode,e=a.options,f=d?{}:e.shadow,g=e.borderRadius,l=b.pointCount{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:M?0:.1,halo:!1,opacity:.75,shadow:!1}}});return b}(F);H(r.prototype,{buildKDTree:a,colorKey:"colorValue",directTouch:!0,drawLegendSymbol:l.drawRectangle,getExtremesFromAll:!0, getSymbol:a,optionalAxis:"colorAxis",parallelArrays:["x","y","value","colorValue"],pointArrayMap:["value"],pointClass:q,trackerGroups:["group","dataLabelsGroup"],utils:{recursive:f.recursive}});e.compose(r);p.registerSeriesType("treemap",r);"";return r});l(a,"masters/modules/treemap.src.js",[],function(){})}); //# sourceMappingURL=treemap.js.map