!/**
 * Highcharts JS v12.5.0 (2026-01-12)
 * @module highcharts/modules/treemap
 * @requires highcharts
 *
 * (c) 2014-2026 Highsoft AS
 * Authors: Jon Arild Nygard / Oystein Moseng
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("highcharts"),require("highcharts").Templating,require("highcharts").Color,require("highcharts").SeriesRegistry,require("highcharts").SVGElement,require("highcharts").Series):"function"==typeof define&&define.amd?define("highcharts/modules/treemap",[["highcharts/highcharts"],["highcharts/highcharts","Templating"],["highcharts/highcharts","Color"],["highcharts/highcharts","SeriesRegistry"],["highcharts/highcharts","SVGElement"],["highcharts/highcharts","Series"]],e):"object"==typeof exports?exports["highcharts/modules/treemap"]=e(require("highcharts"),require("highcharts").Templating,require("highcharts").Color,require("highcharts").SeriesRegistry,require("highcharts").SVGElement,require("highcharts").Series):t.Highcharts=e(t.Highcharts,t.Highcharts.Templating,t.Highcharts.Color,t.Highcharts.SeriesRegistry,t.Highcharts.SVGElement,t.Highcharts.Series)}(this,function(t,e,i,o,r,s){return function(){"use strict";var n,a,l,h,p={28:function(t){t.exports=r},512:function(t){t.exports=o},620:function(t){t.exports=i},820:function(t){t.exports=s},944:function(e){e.exports=t},984:function(t){t.exports=e}},d={};function u(t){var e=d[t];if(void 0!==e)return e.exports;var i=d[t]={exports:{}};return p[t](i,i.exports,u),i.exports}u.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(e,{a:e}),e},u.d=function(t,e){for(var i in e)u.o(e,i)&&!u.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var c={};u.d(c,{default:function(){return tY}});var v=u(944),g=u.n(v),f={mainBreadcrumb:"Main"},y={buttonSpacing:5,buttonTheme:{fill:"none",height:18,padding:2,"stroke-width":0,zIndex:7,states:{select:{fill:"none"}},style:{color:"#334eff"}},floating:!1,format:void 0,relativeTo:"plotBox",rtl:!1,position:{align:"left",verticalAlign:"top",x:0,y:void 0},separator:{text:"/",style:{color:"#666666",fontSize:"0.8em"}},showFullPath:!0,style:{},useHTML:!1,zIndex:7},m=u(984),b=u.n(m)().format,x=g().composed,w=g().addEvent,T=g().defined,L=g().extend,A=g().fireEvent,P=g().isString,B=g().merge,O=g().objectEach,S=g().pick,C=g().pushUnique;function M(){if(this.breadcrumbs){var t=this.resetZoomButton&&this.resetZoomButton.getBBox(),e=this.breadcrumbs.options;t&&"right"===e.position.align&&"plotBox"===e.relativeTo&&this.breadcrumbs.alignBreadcrumbsGroup(-t.width-e.buttonSpacing)}}function N(){this.breadcrumbs&&(this.breadcrumbs.destroy(),this.breadcrumbs=void 0)}function D(){var t=this.breadcrumbs;if(t&&!t.options.floating&&t.level){var e=t.options,i=e.buttonTheme,o=(i.height||0)+2*(i.padding||0)+e.buttonSpacing,r=e.position.verticalAlign;"bottom"===r?(this.marginBottom=(this.marginBottom||0)+o,t.yOffset=o):"middle"!==r?(this.plotTop+=o,t.yOffset=-o):t.yOffset=void 0}}function R(){this.breadcrumbs&&this.breadcrumbs.redraw()}function I(t){!0===t.resetSelection&&this.breadcrumbs&&this.breadcrumbs.alignBreadcrumbsGroup()}var G=function(){function t(e,i){this.elementList={},this.isDirty=!0,this.level=0,this.list=[];var o=B(e.options.drilldown&&e.options.drilldown.drillUpButton,t.defaultOptions,e.options.navigation&&e.options.navigation.breadcrumbs,i);this.chart=e,this.options=o||{}}return t.compose=function(t,e){C(x,"Breadcrumbs")&&(w(t,"destroy",N),w(t,"afterShowResetZoom",M),w(t,"getMargins",D),w(t,"redraw",R),w(t,"selection",I),L(e.lang,f))},t.prototype.updateProperties=function(t){this.setList(t),this.setLevel(),this.isDirty=!0},t.prototype.setList=function(t){this.list=t},t.prototype.setLevel=function(){this.level=this.list.length&&this.list.length-1},t.prototype.getLevel=function(){return this.level},t.prototype.getButtonText=function(t){var e=this.chart,i=this.options,o=e.options.lang,r=S(i.format,i.showFullPath?"{level.name}":"← {level.name}"),s=o&&S(o.drillUpText,o.mainBreadcrumb),n=i.formatter&&i.formatter(t)||b(r,{level:t.levelOptions},e)||"";return(P(n)&&!n.length||"← "===n)&&T(s)&&(n=i.showFullPath?s:"← "+s),n},t.prototype.redraw=function(){this.isDirty&&this.render(),this.group&&this.group.align(),this.isDirty=!1},t.prototype.render=function(){var t=this.chart,e=this.options;!this.group&&e&&(this.group=t.renderer.g("breadcrumbs-group").addClass("highcharts-no-tooltip highcharts-breadcrumbs").attr({zIndex:e.zIndex}).add()),e.showFullPath?this.renderFullPathButtons():this.renderSingleButton(),this.alignBreadcrumbsGroup()},t.prototype.renderFullPathButtons=function(){this.destroySingleButton(),this.resetElementListState(),this.updateListElements(),this.destroyListElements()},t.prototype.renderSingleButton=function(){var t=this.chart,e=this.list,i=this.options.buttonSpacing;this.destroyListElements();var o=this.group?this.group.getBBox().width:i,r=e[e.length-2];!t.drillUpButton&&this.level>0?t.drillUpButton=this.renderButton(r,o,i):t.drillUpButton&&(this.level>0?this.updateSingleButton():this.destroySingleButton())},t.prototype.alignBreadcrumbsGroup=function(t){if(this.group){var e=this.options,i=e.buttonTheme,o=e.position,r="chart"===e.relativeTo||"spacingBox"===e.relativeTo?void 0:"plotBox",s=this.group.getBBox(),n=2*(i.padding||0)+e.buttonSpacing;o.width=s.width+n,o.height=s.height+n;var a=B(o);t&&(a.x+=t),this.options.rtl&&(a.x+=o.width),a.y=S(a.y,this.yOffset,0),this.group.align(a,!0,r)}},t.prototype.renderButton=function(t,e,i){var o=this,r=this.chart,s=o.options,n=B(s.buttonTheme),a=r.renderer.button(o.getButtonText(t),e,i,function(e){var i,r=s.events&&s.events.click;r&&(i=r.call(o,e,t)),!1!==i&&(s.showFullPath?e.newLevel=t.level:e.newLevel=o.level-1,A(o,"up",e))},n).addClass("highcharts-breadcrumbs-button").add(o.group);return r.styledMode||a.attr(s.style),a},t.prototype.renderSeparator=function(t,e){var i=this.chart,o=this.options.separator,r=i.renderer.label(o.text,t,e,void 0,void 0,void 0,!1).addClass("highcharts-breadcrumbs-separator").add(this.group);return i.styledMode||r.css(o.style),r},t.prototype.update=function(t){B(!0,this.options,t),this.destroy(),this.isDirty=!0},t.prototype.updateSingleButton=function(){var t=this.chart,e=this.list[this.level-1];t.drillUpButton&&t.drillUpButton.attr({text:this.getButtonText(e)})},t.prototype.destroy=function(){this.destroySingleButton(),this.destroyListElements(!0),this.group&&this.group.destroy(),this.group=void 0},t.prototype.destroyListElements=function(t){var e=this.elementList;O(e,function(i,o){(t||!e[o].updated)&&((i=e[o]).button&&i.button.destroy(),i.separator&&i.separator.destroy(),delete i.button,delete i.separator,delete e[o])}),t&&(this.elementList={})},t.prototype.destroySingleButton=function(){this.chart.drillUpButton&&(this.chart.drillUpButton.destroy(),this.chart.drillUpButton=void 0)},t.prototype.resetElementListState=function(){O(this.elementList,function(t){t.updated=!1})},t.prototype.updateListElements=function(){for(var t,e,i=this.elementList,o=this.options.buttonSpacing,r=this.list,s=this.options.rtl,n=s?-1:1,a=function(t,e){return n*t.getBBox().width+n*e},l=function(t,e,i){t.translate(e-t.getBBox().width,i)},h=this.group?a(this.group,o):o,p=0,d=r.length;p<d;++p){var u=p===d-1,c=void 0,v=void 0;i[(e=r[p]).level]?(c=(t=i[e.level]).button,t.separator||u?t.separator&&u&&(t.separator.destroy(),delete t.separator):(h+=n*o,t.separator=this.renderSeparator(h,o),s&&l(t.separator,h,o),h+=a(t.separator,o)),i[e.level].updated=!0):(c=this.renderButton(e,h,o),s&&l(c,h,o),h+=a(c,o),u||(v=this.renderSeparator(h,o),s&&l(v,h,o),h+=a(v,o)),i[e.level]={button:c,separator:v,updated:!0}),c&&c.setState(2*!!u)}},t.defaultOptions=y,t}(),E=u(620),V=u.n(E),k=u(512),U=u.n(k),H=u(28),W=u.n(H),F=U().seriesTypes.column.prototype,_=g().addEvent,j=g().defined,q=l||(l={});function z(t){var e=this.series,i=e.chart.renderer;this.moveToTopOnHover&&this.graphic&&(e.stateMarkerGraphic||(e.stateMarkerGraphic=new(W())(i,"use").css({pointerEvents:"none"}).add(this.graphic.parentGroup)),(null==t?void 0:t.state)==="hover"?(this.graphic.attr({id:this.id}),e.stateMarkerGraphic.attr({href:""+i.url+"#".concat(this.id),visibility:"visible"})):e.stateMarkerGraphic.attr({href:""}))}q.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&this.value!==1/0&&this.value!==-1/0&&(void 0===this.value||!isNaN(this.value))}},q.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(t){var e={};return j(t.color)&&(!t.state||"normal"===t.state)&&(e[this.colorProp||"fill"]=t.color),e},pointAttribs:F.pointAttribs},q.compose=function(t){return _(t.prototype.pointClass,"afterSetState",z),t};var K=l,Y=u(820),Z=u.n(Y),X=function(){function t(t,e,i,o){this.height=t,this.width=e,this.plot=o,this.direction=i,this.startDirection=i,this.total=0,this.nW=0,this.lW=0,this.nH=0,this.lH=0,this.elArr=[],this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(t,e){return Math.max(t/e,e/t)}}}return t.prototype.addElement=function(t){this.lP.total=this.elArr[this.elArr.length-1],this.total=this.total+t,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(t)},t.prototype.reset=function(){this.nW=0,this.lW=0,this.elArr=[],this.total=0},t}(),J=function(){function t(){this.childrenTotal=0,this.visible=!1}return t.prototype.init=function(t,e,i,o,r,s,n){return this.id=t,this.i=e,this.children=i,this.height=o,this.level=r,this.series=s,this.parent=n,this},t}(),Q=function(){return(Q=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},$=function(t,e){var i=e.animatableAttribs,o=e.onComplete,r=e.css,s=e.renderer,n=t.series&&t.series.chart.hasRendered?void 0:t.series&&t.series.options.animation,a=t.graphic;if(e.attribs=Q(Q({},e.attribs),{class:t.getClassName()}),t.shouldDraw())a||(t.graphic=a="text"===e.shapeType?s.text():"image"===e.shapeType?s.image(e.imageUrl||"").attr(e.shapeArgs||{}):s[e.shapeType](e.shapeArgs||{}),a.add(e.group)),r&&a.css(r),a.attr(e.attribs).animate(i,!e.isNew&&n,o);else if(a){var l=function(){t.graphic=a=a&&a.destroy(),"function"==typeof o&&o()};Object.keys(i).length?a.animate(i,void 0,function(){return l()}):l()}},tt=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),te=U().seriesTypes,ti=te.pie.prototype.pointClass,to=te.scatter.prototype.pointClass,tr=g().extend,ts=g().isNumber,tn=g().pick,ta=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.groupedPointsAmount=0,e.shapeType="rect",e}return tt(e,t),e.prototype.draw=function(t){$(this,t)},e.prototype.getClassName=function(){var e=this.series,i=e.options,o=t.prototype.getClassName.call(this);return this.node.level<=e.nodeMap[e.rootNode].level&&this.node.children.length?o+=" highcharts-above-level":this.node.isGroup||this.node.isLeaf||e.nodeMap[e.rootNode].isGroup||tn(i.interactByLeaf,!i.allowTraversingTree)?this.node.isGroup||this.node.isLeaf||e.nodeMap[e.rootNode].isGroup||(o+=" highcharts-internal-node"):o+=" highcharts-internal-node-interactive",o},e.prototype.isValid=function(){return!!(this.id||ts(this.value))},e.prototype.setState=function(e){t.prototype.setState.apply(this,arguments),this.graphic&&this.graphic.attr({zIndex:+("hover"===e)})},e.prototype.shouldDraw=function(){return ts(this.plotY)&&null!==this.y},e}(to);tr(ta.prototype,{setVisible:ti.prototype.setVisible});var tl=g().isString,th={allowTraversingTree:!1,animationLimit:250,borderRadius:0,showInLegend:!1,marker:void 0,colorByPoint:!1,dataLabels:{enabled:!0,formatter:function(){var t=this&&this.point?this.point:{};return tl(t.name)?t.name:""},headers:!1,inside:!0,padding:2,verticalAlign:"middle",style:{textOverflow:"ellipsis"}},tooltip:{headerFormat:"",pointFormat:"<b>{point.name}</b>: {point.value}<br/>",clusterFormat:"+ {point.groupedPointsAmount} more...<br/>"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,traverseUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1,colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:"#999999",brightness:.1*!U().seriesTypes.heatmap,halo:!1,opacity:.75,shadow:!1}},legendSymbol:"rectangle",traverseToLeaf:!1,cluster:{className:void 0,color:void 0,enabled:!1,pixelWidth:void 0,pixelHeight:void 0,name:void 0,reductionFactor:void 0,minimumClusterSize:5,layoutAlgorithm:{distance:0,gridSize:0,kmeansThreshold:0},marker:{lineWidth:0,radius:0}}};(h||(h={})).recursive=function t(e,i,o){var r=i.call(o||this,e);!1!==r&&t(r,i,o)};var tp=h,td=(g().extend,g().isArray),tu=g().isNumber,tc=g().isObject,tv=g().merge,tg=g().pick,tf=(g().relativeLength,function(t,e){var i,o,r,s,n,a,l,h=e.index,p=e.mapOptionsToLevel,d=e.parentColor,u=e.parentColorIndex,c=e.series,v=e.colors,g=e.siblings,f=c.points,y=c.chart.options.chart;return t&&(o=f[t.i],r=p[t.level]||{},o&&r.colorByPoint&&(n=o.index%(v?v.length:y.colorCount),s=v&&v[n]),c.chart.styledMode||(a=tg(o&&o.options.color,r&&r.color,s,d&&((i=r&&r.colorVariation)&&"brightness"===i.key&&h&&g?V().parse(d).brighten(i.to*(h/g)).get():d),c.color)),l=tg(o&&o.options.colorIndex,r&&r.colorIndex,n,u,e.colorIndex)),{color:a,colorIndex:l}}),ty=function(t){var e,i,o,r,s,n,a={};if(tc(t))for(r=tu(t.from)?t.from:1,n=t.levels,i={},e=tc(t.defaults)?t.defaults:{},td(n)&&(i=n.reduce(function(t,i){var o,s,n;return tc(i)&&tu(i.level)&&(s=tg((n=tv({},i)).levelIsConstant,e.levelIsConstant),delete n.levelIsConstant,delete n.level,tc(t[o=i.level+(s?0:r-1)])?tv(!0,t[o],n):t[o]=n),t},{})),s=tu(t.to)?t.to:1,o=0;o<=s;o++)a[o]=tv({},e,tc(i[o])?i[o]:{});return a},tm=function(t){var e,i;return tc(t)&&(i=tc(t.options)?t.options:{},e=tg(t.rootNode,i.rootId,""),tc(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e},tb=(a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),tx=V().parse,tw=g().composed,tT=g().noop,tL=U().seriesTypes,tA=tL.column,tP=tL.scatter,tB=g().addEvent,tO=g().arrayMax,tS=g().clamp,tC=g().correctFloat,tM=g().crisp,tN=g().defined,tD=g().error,tR=g().extend,tI=g().fireEvent,tG=g().isArray,tE=g().isNumber,tV=g().isObject,tk=g().isString,tU=g().merge,tH=g().pick,tW=g().pushUnique,tF=g().splat,t_=g().stableSort;Z().keepProps.push("simulation","hadOutsideDataLabels");var tj=!1;function tq(){var t=this.xAxis,e=this.yAxis;if(t&&e)if(this.is("treemap")){var i={endOnTick:!1,startOnTick:!1,visible:!1};this.is("treegraph")||(i.min=0,i.max=100,i.tickPositions=[]),tU(!0,t.options,i,t.userOptions),tU(!0,e.options,i,e.userOptions),t.visible=t.options.visible,e.visible=e.options.visible,this.is("treegraph")&&(this.isCartesian=t.visible),tj=!0}else tj&&(e.setOptions(e.userOptions),t.setOptions(t.userOptions),tj=!1)}var tz=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.simulation=0,e}return tb(e,t),e.compose=function(t){tW(tw,"TreemapSeries")&&tB(t,"afterBindAxes",tq)},e.prototype.algorithmCalcPoints=function(t,e,i,o){var r,s,n,a,l,h=i.plot,p=i.elArr.length-1,d=i.lW,u=i.lH,c=0;e?(d=i.nW,u=i.nH):l=i.elArr[p];for(var v=0,g=i.elArr;v<g.length;v++){var f=g[v];(e||c<p)&&(0===i.direction?(r=h.x,s=h.y,a=f/(n=d)):(r=h.x,s=h.y,n=f/(a=u)),o.push({x:r,y:s,width:n,height:tC(a)}),0===i.direction?h.y=h.y+a:h.x=h.x+n),c+=1}i.reset(),0===i.direction?i.width=i.width-d:i.height=i.height-u,h.y=h.parent.y+(h.parent.height-i.height),h.x=h.parent.x+(h.parent.width-i.width),t&&(i.direction=1-i.direction),e||i.addElement(l)},e.prototype.algorithmFill=function(t,e,i){for(var o,r,s,n,a,l=[],h=e.direction,p=e.x,d=e.y,u=e.width,c=e.height,v=0;v<i.length;v++){var g=i[v];o=e.width*e.height*(g.val/e.val),r=p,s=d,0===h?(u-=n=o/(a=c),p+=n):(c-=a=o/(n=u),d+=a),l.push({x:r,y:s,width:n,height:a,direction:0,val:0}),t&&(h=1-h)}return l},e.prototype.algorithmLowAspectRatio=function(t,e,i){for(var o,r=[],s={x:e.x,y:e.y,parent:e},n=e.direction,a=i.length-1,l=new X(e.height,e.width,n,s),h=0,p=0;p<i.length;p++){var d=i[p];o=e.width*e.height*(d.val/e.val),l.addElement(o),l.lP.nR>l.lP.lR&&this.algorithmCalcPoints(t,!1,l,r,s),h===a&&this.algorithmCalcPoints(t,!0,l,r,s),++h}return r},e.prototype.alignDataLabel=function(t,e,i){tA.prototype.alignDataLabel.apply(this,arguments),t.dataLabel&&t.dataLabel.attr({zIndex:(t.node.zIndex||0)+1})},e.prototype.applyTreeGrouping=function(){var t=this,e=t.parentList||{},i=t.options.cluster,o=(null==i?void 0:i.minimumClusterSize)||5;if(null==i?void 0:i.enabled){var r={},s=function(t){var e;if(null==(e=null==t?void 0:t.point)?void 0:e.shapeArgs){var o=t.point.shapeArgs,n=o.width,a=void 0===n?0:n,l=o.height,h=void 0===l?0:l,p=i.pixelWidth,d=void 0===p?0:p,u=i.pixelHeight,c=void 0===u?0:u,v=tN(c),g=c?d*c:d*d;(a<d||h<(v?c:d)||a*h<g)&&!t.isGroup&&tN(t.parent)&&(r[t.parent]||(r[t.parent]=[]),r[t.parent].push(t))}null==t||t.children.forEach(function(t){s(t)})};s(t.tree);var n=function(s){r[s]&&r[s].length>o&&r[s].forEach(function(o){var r=e[s].indexOf(o.i);if(-1!==r){e[s].splice(r,1);var n="highcharts-grouped-treemap-points-".concat(o.parent||"root"),a=t.points.find(function(t){return t.id===n});if(!a){var l=t.pointClass,h=t.points.length;tR(a=new l(t,{className:i.className,color:i.color,id:n,index:h,isGroup:!0,value:0}),{formatPrefix:"cluster"}),t.points.push(a),e[s].push(h),e[n]=[]}var p=a.groupedPointsAmount+1,d=t.points[a.index].options.value||0,u=i.name||"+ ".concat(p);t.points[a.index].groupedPointsAmount=p,t.points[a.index].options.value=d+(o.point.value||0),t.points[a.index].name=u,e[n].push(o.point.index)}})};for(var a in r)n(a);t.nodeMap={},t.nodeList=[],t.parentList=e;var l=t.buildTree("",-1,0,t.parentList);t.translate(l)}},e.prototype.calculateChildrenAreas=function(t,e){var i,o,r,s,n,a,l=this.options,h=this.mapOptionsToLevel[t.level+1],p=tH((null==h?void 0:h.layoutAlgorithm)&&this[null==h?void 0:h.layoutAlgorithm]&&h.layoutAlgorithm,l.layoutAlgorithm),d=l.alternateStartingDirection,u=t.children.filter(function(e){return t.isGroup||!e.ignore}),c=null!=(o=null!=(i=null==h?void 0:h.groupPadding)?i:l.groupPadding)?o:0,v=this.nodeMap[this.rootNode];if(p){var g=[],f=(null==(r=v.pointValues)?void 0:r.width)||0,y=(null==(s=v.pointValues)?void 0:s.height)||0;(null==h?void 0:h.layoutStartingDirection)&&(e.direction=+("vertical"!==h.layoutStartingDirection)),g=this[p](e,u);for(var m=-1,b=0;b<u.length;b++){var x=u[b],w=g[++m];x===v&&(f=f||w.width,y=w.height);var T=c/(this.xAxis.len/y),L=c/(this.yAxis.len/y);if(x.values=tU(w,{val:x.childrenTotal,direction:d?1-e.direction:e.direction}),x.children.length&&(null==(n=x.point.dataLabels)?void 0:n.length)){var A=tO(x.point.dataLabels.map(function(t){var e;return(null==(e=t.options)?void 0:e.headers)&&t.height||0}))/(this.yAxis.len/y);A<x.values.height/2&&(x.values.y+=A,x.values.height-=A)}if(c){var P=Math.min(T,x.values.width/4),B=Math.min(L,x.values.height/4);x.values.x+=P,x.values.width-=2*P,x.values.y+=B,x.values.height-=2*B}x.pointValues=tU(w,{x:w.x/this.axisRatio,y:100-w.y-w.height,width:w.width/this.axisRatio}),x.children.length&&this.calculateChildrenAreas(x,x.values)}var O=function(t,e,i){return void 0===e&&(e=[]),void 0===i&&(i=!0),t.children.forEach(function(t){i&&t.isLeaf?e.push(t.point):i||t.isLeaf||e.push(t.point),t.children.length&&O(t,e,i)}),e};if("leaf"===l.nodeSizeBy&&t===v&&this.hasOutsideDataLabels&&!O(v,void 0,!1).some(function(t){return tE(t.options.value)})&&!tE(null==(a=v.point)?void 0:a.options.value)){var S=O(v),C=S.map(function(t){return t.options.value||0}),M=S.map(function(t){var e=t.node.pointValues;return e?e.width*e.height:0}),N=C.reduce(function(t,e){return t+e},0),D=M.reduce(function(t,e){return t+e},0)/N,R=0,I=0;S.forEach(function(t,e){var i=tS((C[e]?M[e]/C[e]:1)/D,.8,1.4),o=1-i;t.value&&(M[e]<20&&(o*=M[e]/20),o>I&&(I=o),o<R&&(R=o),t.simulatedValue=(t.simulatedValue||t.value)/i)}),(R<-.05||I>.05)&&this.simulation<10?(this.simulation++,this.setTreeValues(t),e.val=t.val,this.calculateChildrenAreas(t,e)):(S.forEach(function(t){delete t.simulatedValue}),this.setTreeValues(t),this.simulation=0)}}},e.prototype.createList=function(t){var e=this.chart,i=e.breadcrumbs,o=[];if(i){var r=0;o.push({level:r,levelOptions:e.series[0]});for(var s=t.target.nodeMap[t.newRootId],n=[];s.parent||""===s.parent;)n.push(s),s=t.target.nodeMap[s.parent];for(var a=0,l=n.reverse();a<l.length;a++){var h=l[a];o.push({level:++r,levelOptions:h})}o.length<=1&&(o.length=0)}return o},e.prototype.drawDataLabels=function(){for(var e,i,o,r=this.mapOptionsToLevel,s=this.points.filter(function(t){return t.node.visible||tN(t.dataLabel)}),n=null==(e=tF(this.options.dataLabels||{})[0])?void 0:e.padding,a=s.some(function(t){return tE(t.plotY)}),l=0;l<s.length;l++){var h=s[l],p={},d={style:p},u=r[h.node.level];if((!h.node.isLeaf&&!h.node.isGroup||h.node.isGroup&&h.node.level<=this.nodeMap[this.rootNode].level)&&(d.enabled=!1),(null==u?void 0:u.dataLabels)&&(tU(!0,d,tF(u.dataLabels)[0]),this.hasDataLabels=function(){return!0}),h.node.isLeaf?d.inside=!0:d.headers&&(d.verticalAlign="top"),h.shapeArgs&&a){var c=h.shapeArgs,v=c.height,g=void 0===v?0:v,f=c.width,y=void 0===f?0:f;if(y>32&&g>16&&h.shouldDraw()){var m=y-2*(d.padding||n||0);p.width=""+m+"px",null!=p.lineClamp||(p.lineClamp=Math.floor(g/16)),p.visibility="inherit",d.headers&&(null==(o=h.dataLabel)||o.attr({width:m}))}else p.width=""+y+"px",p.visibility="hidden"}h.dlOptions=tU(d,h.options.dataLabels,{zIndex:void 0})}t.prototype.drawDataLabels.call(this,s)},e.prototype.drawPoints=function(t){void 0===t&&(t=this.points);for(var e=this.chart,i=e.renderer,o=e.styledMode,r=this.options,s=o?{}:r.shadow,n=r.borderRadius,a=e.pointCount<r.animationLimit,l=r.allowTraversingTree,h=0,p=t;h<p.length;h++){var d=p[h],u={},c={},v={},g="level-group-"+d.node.level,f=!!d.graphic,y=a&&f,m=d.shapeArgs;d.shouldDraw()&&(d.isInside=!0,n&&(c.r=n),tU(!0,y?u:c,f?m:{},o?{}:this.pointAttribs(d,d.selected?"select":void 0)),this.colorAttribs&&o&&tR(v,this.colorAttribs(d)),this[g]||(this[g]=i.g(g).attr({zIndex:-(d.node.level||0)}).add(this.group),this[g].survive=!0)),d.draw({animatableAttribs:u,attribs:c,css:v,group:this[g],imageUrl:d.imageUrl,renderer:i,shadow:s,shapeArgs:m,shapeType:d.shapeType}),l&&d.graphic&&(d.drillId=r.interactByLeaf?this.drillToByLeaf(d):this.drillToByGroup(d))}},e.prototype.drillToByGroup=function(t){return(!t.node.isLeaf||!!t.node.isGroup)&&t.id},e.prototype.drillToByLeaf=function(t){var e,i=t.series.options.traverseToLeaf,o=!1;if(t.node.parent!==this.rootNode&&t.node.isLeaf)if(i)o=t.id;else for(e=t.node;!o;)void 0!==e.parent&&(e=this.nodeMap[e.parent]),e.parent===this.rootNode&&(o=e.id);return o},e.prototype.drillToNode=function(t,e){tD(32,!1,void 0,{"treemap.drillToNode":"use treemap.setRootNode"}),this.setRootNode(t,e)},e.prototype.drillUp=function(){var t=this.nodeMap[this.rootNode];t&&tk(t.parent)&&this.setRootNode(t.parent,!0,{trigger:"traverseUpButton"})},e.prototype.getExtremes=function(){var e=t.prototype.getExtremes.call(this,this.colorValueData),i=e.dataMin,o=e.dataMax;return this.valueMin=i,this.valueMax=o,t.prototype.getExtremes.call(this)},e.prototype.getListOfParents=function(t,e){for(var i=tG(t)?t:[],o=tG(e)?e:[],r=i.reduce(function(t,e,i){var o=tH(e.parent,"");return void 0===t[o]&&(t[o]=[]),t[o].push(i),t},{"":[]}),s=0,n=Object.keys(r);s<n.length;s++){var a=n[s],l=r[a];if(""!==a&&-1===o.indexOf(a)){for(var h=0;h<l.length;h++){var p=l[h];r[""].push(p)}delete r[a]}}return r},e.prototype.getTree=function(){var t=this.data.map(function(t){return t.id});return this.parentList=this.getListOfParents(this.data,t),this.nodeMap={},this.nodeList=[],this.buildTree("",-1,0,this.parentList||{})},e.prototype.buildTree=function(t,e,i,o,r){for(var s,n=[],a=this.points[e],l=0,h=0,p=o[t]||[];h<p.length;h++){var d=p[h];l=Math.max((s=this.buildTree(this.points[d].id,d,i+1,o,t)).height+1,l),n.push(s),this.is("treegraph")&&(s.visible=!0)}for(var u=new this.NodeClass().init(t,e,n,l,i,this,r),c=0;c<n.length;c++)n[c].parentNode=u;return this.nodeMap[u.id]=u,this.nodeList.push(u),a&&(a.node=u,u.point=a,tN(a.options.x)||(a.x=i)),u},e.prototype.hasData=function(){return!!this.dataTable.rowCount},e.prototype.init=function(e,i){var o=this,r=this,s=tU(i.drillUpButton,i.breadcrumbs),n=tB(r,"setOptions",function(t){var e,i=t.userOptions;tN(i.allowDrillToNode)&&!tN(i.allowTraversingTree)&&(i.allowTraversingTree=i.allowDrillToNode,delete i.allowDrillToNode),tN(i.drillUpButton)&&!tN(i.traverseUpButton)&&(i.traverseUpButton=i.drillUpButton,delete i.drillUpButton);var r=tF(i.dataLabels||{});null==(e=i.levels)||e.forEach(function(t){r.push.apply(r,tF(t.dataLabels||{}))}),o.hasOutsideDataLabels=r.some(function(t){return t.headers})});t.prototype.init.call(this,e,i),delete r.opacity,r.eventsToUnbind.push(n),r.options.allowTraversingTree&&(r.eventsToUnbind.push(tB(r,"click",r.onClickDrillToNode)),r.eventsToUnbind.push(tB(r,"setRootNode",function(t){var e=r.chart;e.breadcrumbs&&e.breadcrumbs.updateProperties(r.createList(t))})),r.eventsToUnbind.push(tB(r,"update",function(t,e){var i=this.chart.breadcrumbs;i&&t.options.breadcrumbs&&i.update(t.options.breadcrumbs),this.hadOutsideDataLabels=this.hasOutsideDataLabels})),r.eventsToUnbind.push(tB(r,"destroy",function(t){var e=this.chart;e.breadcrumbs&&!t.keepEventsForUpdate&&(e.breadcrumbs.destroy(),e.breadcrumbs=void 0)}))),e.breadcrumbs||(e.breadcrumbs=new G(e,s)),r.eventsToUnbind.push(tB(e.breadcrumbs,"up",function(t){for(var e=this.level-t.newLevel,i=0;i<e;i++)r.drillUp()}))},e.prototype.onClickDrillToNode=function(t){var e=t.point,i=null==e?void 0:e.drillId;tk(i)&&(e.setState(""),this.setRootNode(i,!0,{trigger:"click"}))},e.prototype.pointAttribs=function(t,e){var i,o,r=tV(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},s=t&&r[t.node.level]||{},n=this.options,a=e&&n.states&&n.states[e]||{},l=(null==t?void 0:t.getClassName())||"",h={stroke:t&&t.borderColor||s.borderColor||a.borderColor||n.borderColor,"stroke-width":tH(t&&t.borderWidth,s.borderWidth,a.borderWidth,n.borderWidth),dashstyle:(null==t?void 0:t.borderDashStyle)||s.borderDashStyle||a.borderDashStyle||n.borderDashStyle,fill:(null==t?void 0:t.color)||this.color};return -1!==l.indexOf("highcharts-above-level")?(h.fill="none",h["stroke-width"]=0):-1!==l.indexOf("highcharts-internal-node-interactive")?(h["fill-opacity"]=null!=(o=null!=(i=a.opacity)?i:n.opacity)?o:1,h.cursor="pointer"):-1!==l.indexOf("highcharts-internal-node")?h.fill="none":e&&a.brightness&&(h.fill=tx(h.fill).brighten(a.brightness).get()),h},e.prototype.setColorRecursive=function(t,e,i,o,r){var s,n=null===this||void 0===this?void 0:this.chart,a=null==(s=null==n?void 0:n.options)?void 0:s.colors;if(t){var l=tf(t,{colors:a,index:o,mapOptionsToLevel:this.mapOptionsToLevel,parentColor:e,parentColorIndex:i,series:this,siblings:r}),h=this.points[t.i];h&&(h.color=l.color,h.colorIndex=l.colorIndex);for(var p=-1,d=0,u=t.children||[];d<u.length;d++){var c=u[d];this.setColorRecursive(c,l.color,l.colorIndex,++p,t.children.length)}}},e.prototype.setPointValues=function(){for(var t=this.points,e=this.xAxis,i=this.yAxis,o=this.chart.styledMode,r=0;r<t.length;r++){var s=t[r],n=s.node,a=n.pointValues,l=n.visible;if(a&&l){var h=a.height,p=a.width,d=a.x,u=a.y,c=o?0:this.pointAttribs(s)["stroke-width"]||0,v=e.toPixels(d,!0),g=e.toPixels(d+p,!0),f=i.toPixels(u,!0),y=i.toPixels(u+h,!0),m=0===v?c/2:tM(e.toPixels(d,!0),c,!0),b=g===e.len?e.len-c/2:tM(e.toPixels(d+p,!0),c,!0),x=f===i.len?i.len-c/2:tM(i.toPixels(u,!0),c,!0),w=0===y?c/2:tM(i.toPixels(u+h,!0),c,!0),T={x:Math.min(m,b),y:Math.min(x,w),width:Math.abs(b-m),height:Math.abs(w-x)};s.plotX=T.x+T.width/2,s.plotY=T.y+T.height/2,s.shapeArgs=T}else delete s.plotX,delete s.plotY}},e.prototype.setRootNode=function(t,e,i){tI(this,"setRootNode",tR({newRootId:t,previousRootId:this.rootNode,redraw:tH(e,!0),series:this},i),function(t){var e=t.series;e.idPreviousRoot=t.previousRootId,e.rootNode=t.newRootId,e.isDirty=!0,t.redraw&&e.chart.redraw()})},e.prototype.setState=function(e){this.options.inactiveOtherPoints=!0,t.prototype.setState.call(this,e,!1),this.options.inactiveOtherPoints=!1},e.prototype.setTreeValues=function(t){for(var e,i,o,r=this.options,s=this.rootNode,n=this.nodeMap[s],a="boolean"!=typeof r.levelIsConstant||r.levelIsConstant,l=[],h=this.points[t.i],p=0,d=0,u=t.children;d<u.length;d++){var c=u[d];c=this.setTreeValues(c),l.push(c),c.ignore||(p+=c.val)}t_(l,function(t,e){return(t.sortIndex||0)-(e.sortIndex||0)});var v=tH(null==h?void 0:h.simulatedValue,null==h?void 0:h.options.value,p);return h&&(h.value=v),(null==h?void 0:h.isGroup)&&(null==(e=r.cluster)?void 0:e.reductionFactor)&&(v/=r.cluster.reductionFactor),(null==(o=null==(i=t.parentNode)?void 0:i.point)?void 0:o.isGroup)&&this.rootNode!==t.parent&&(t.visible=!1),tR(t,{children:l,childrenTotal:p,ignore:!(tH(null==h?void 0:h.visible,!0)&&v>0),isLeaf:t.visible&&!("treegraph"===this.type?l.length>0:p),isGroup:null==h?void 0:h.isGroup,levelDynamic:t.level-(a?0:n.level),name:tH(null==h?void 0:h.name,""),sortIndex:tH(null==h?void 0:h.sortIndex,-v),val:v}),t},e.prototype.sliceAndDice=function(t,e){return this.algorithmFill(!0,t,e)},e.prototype.squarified=function(t,e){return this.algorithmLowAspectRatio(!0,t,e)},e.prototype.strip=function(t,e){return this.algorithmLowAspectRatio(!1,t,e)},e.prototype.stripes=function(t,e){return this.algorithmFill(!1,t,e)},e.prototype.translate=function(e){var i,o,r,s,n,a=this,l=a.options,h=!e,p=tm(a);e||p.startsWith("highcharts-grouped-treemap-points-")||((this.points||[]).forEach(function(t){t.isGroup&&t.destroy()}),t.prototype.translate.call(this),e=a.getTree()),a.tree=e=e||a.tree,o=a.nodeMap[p],""===p||o||(a.setRootNode("",!1),p=a.rootNode,o=a.nodeMap[p]),(null==(i=o.point)?void 0:i.isGroup)||(a.mapOptionsToLevel=ty({from:o.level+1,levels:l.levels,to:e.height,defaults:{levelIsConstant:a.options.levelIsConstant,colorByPoint:l.colorByPoint}})),tp.recursive(a.nodeMap[a.rootNode],function(t){var e=t.parent,i=!1;return t.visible=!0,(e||""===e)&&(i=a.nodeMap[e]),i}),tp.recursive(a.nodeMap[a.rootNode].children,function(t){for(var e=!1,i=0;i<t.length;i++){var o=t[i];o.visible=!0,o.children.length&&(e=(e||[]).concat(o.children))}return e}),a.setTreeValues(e),a.axisRatio=a.xAxis.len/a.yAxis.len,a.nodeMap[""].pointValues=r={x:0,y:0,width:100,height:100},a.nodeMap[""].values=s=tU(r,{width:r.width*a.axisRatio,direction:+("vertical"!==l.layoutStartingDirection),val:e.val}),(this.hasOutsideDataLabels||this.hadOutsideDataLabels)&&this.drawDataLabels(),a.calculateChildrenAreas(e,s),a.colorAxis||l.colorByPoint||a.setColorRecursive(a.tree),l.allowTraversingTree&&o.pointValues&&(n=o.pointValues,a.xAxis.setExtremes(n.x,n.x+n.width,!1),a.yAxis.setExtremes(n.y,n.y+n.height,!1),a.xAxis.setScale(),a.yAxis.setScale()),a.setPointValues(),h&&a.applyTreeGrouping()},e.defaultOptions=tU(tP.defaultOptions,th),e}(tP);tR(tz.prototype,{buildKDTree:tT,colorAttribs:K.seriesMembers.colorAttribs,colorKey:"colorValue",directTouch:!0,getExtremesFromAll:!0,getSymbol:tT,optionalAxis:"colorAxis",parallelArrays:["x","y","value","colorValue"],pointArrayMap:["value","colorValue"],pointClass:ta,NodeClass:J,trackerGroups:["group","dataLabelsGroup"],utils:tp}),K.compose(tz),U().registerSeriesType("treemap",tz);var tK=g();tK.Breadcrumbs=tK.Breadcrumbs||G,tK.Breadcrumbs.compose(tK.Chart,tK.defaultOptions),tz.compose(tK.Series);var tY=g();return c.default}()});