!/** * Highcharts JS v11.4.1 (2024-04-04) * * (c) 2014-2024 Highsoft AS * Authors: Jon Arild Nygard / Oystein Moseng * * License: www.highcharts.com/license */function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/treemap",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Extensions/Breadcrumbs/BreadcrumbsDefaults.js",[],function(){return{lang:{mainBreadcrumb:"Main"},options:{buttonTheme:{fill:"none",height:18,padding:2,"stroke-width":0,zIndex:7,states:{select:{fill:"none"}},style:{color:"#334eff"}},buttonSpacing:5,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}}}),i(e,"Extensions/Breadcrumbs/Breadcrumbs.js",[e["Extensions/Breadcrumbs/BreadcrumbsDefaults.js"],e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i,s){let{format:r}=e,{composed:o}=i,{addEvent:l,defined:n,extend:a,fireEvent:h,isString:d,merge:p,objectEach:u,pick:c,pushUnique:g}=s;function m(){if(this.breadcrumbs){let 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 v(){this.breadcrumbs&&(this.breadcrumbs.destroy(),this.breadcrumbs=void 0)}function b(){let t=this.breadcrumbs;if(t&&!t.options.floating&&t.level){let e=t.options,i=e.buttonTheme,s=(i.height||0)+2*(i.padding||0)+e.buttonSpacing,r=e.position.verticalAlign;"bottom"===r?(this.marginBottom=(this.marginBottom||0)+s,t.yOffset=s):"middle"!==r?(this.plotTop+=s,t.yOffset=-s):t.yOffset=void 0}}function f(){this.breadcrumbs&&this.breadcrumbs.redraw()}function y(t){!0===t.resetSelection&&this.breadcrumbs&&this.breadcrumbs.alignBreadcrumbsGroup()}class x{static compose(e,i){g(o,"Breadcrumbs")&&(l(e,"destroy",v),l(e,"afterShowResetZoom",m),l(e,"getMargins",b),l(e,"redraw",f),l(e,"selection",y),a(i.lang,t.lang))}constructor(t,e){this.elementList={},this.isDirty=!0,this.level=0,this.list=[];let i=p(t.options.drilldown&&t.options.drilldown.drillUpButton,x.defaultOptions,t.options.navigation&&t.options.navigation.breadcrumbs,e);this.chart=t,this.options=i||{}}updateProperties(t){this.setList(t),this.setLevel(),this.isDirty=!0}setList(t){this.list=t}setLevel(){this.level=this.list.length&&this.list.length-1}getLevel(){return this.level}getButtonText(t){let e=this.chart,i=this.options,s=e.options.lang,o=c(i.format,i.showFullPath?"{level.name}":"← {level.name}"),l=s&&c(s.drillUpText,s.mainBreadcrumb),a=i.formatter&&i.formatter(t)||r(o,{level:t.levelOptions},e)||"";return(d(a)&&!a.length||"← "===a)&&n(l)&&(a=i.showFullPath?l:"← "+l),a}redraw(){this.isDirty&&this.render(),this.group&&this.group.align(),this.isDirty=!1}render(){let 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()}renderFullPathButtons(){this.destroySingleButton(),this.resetElementListState(),this.updateListElements(),this.destroyListElements()}renderSingleButton(){let t=this.chart,e=this.list,i=this.options.buttonSpacing;this.destroyListElements();let s=this.group?this.group.getBBox().width:i,r=e[e.length-2];!t.drillUpButton&&this.level>0?t.drillUpButton=this.renderButton(r,s,i):t.drillUpButton&&(this.level>0?this.updateSingleButton():this.destroySingleButton())}alignBreadcrumbsGroup(t){if(this.group){let e=this.options,i=e.buttonTheme,s=e.position,r="chart"===e.relativeTo||"spacingBox"===e.relativeTo?void 0:"plotBox",o=this.group.getBBox(),l=2*(i.padding||0)+e.buttonSpacing;s.width=o.width+l,s.height=o.height+l;let n=p(s);t&&(n.x+=t),this.options.rtl&&(n.x+=s.width),n.y=c(n.y,this.yOffset,0),this.group.align(n,!0,r)}}renderButton(t,e,i){let s=this,r=this.chart,o=s.options,l=p(o.buttonTheme),n=r.renderer.button(s.getButtonText(t),e,i,function(e){let i;let r=o.events&&o.events.click;r&&(i=r.call(s,e,t)),!1!==i&&(o.showFullPath?e.newLevel=t.level:e.newLevel=s.level-1,h(s,"up",e))},l).addClass("highcharts-breadcrumbs-button").add(s.group);return r.styledMode||n.attr(o.style),n}renderSeparator(t,e){let i=this.chart,s=this.options.separator,r=i.renderer.label(s.text,t,e,void 0,void 0,void 0,!1).addClass("highcharts-breadcrumbs-separator").add(this.group);return i.styledMode||r.css(s.style),r}update(t){p(!0,this.options,t),this.destroy(),this.isDirty=!0}updateSingleButton(){let t=this.chart,e=this.list[this.level-1];t.drillUpButton&&t.drillUpButton.attr({text:this.getButtonText(e)})}destroy(){this.destroySingleButton(),this.destroyListElements(!0),this.group&&this.group.destroy(),this.group=void 0}destroyListElements(t){let e=this.elementList;u(e,(i,s)=>{(t||!e[s].updated)&&((i=e[s]).button&&i.button.destroy(),i.separator&&i.separator.destroy(),delete i.button,delete i.separator,delete e[s])}),t&&(this.elementList={})}destroySingleButton(){this.chart.drillUpButton&&(this.chart.drillUpButton.destroy(),this.chart.drillUpButton=void 0)}resetElementListState(){u(this.elementList,t=>{t.updated=!1})}updateListElements(){let t=this.elementList,e=this.options.buttonSpacing,i=this.list,s=this.options.rtl,r=s?-1:1,o=function(t,e){return r*t.getBBox().width+r*e},l=function(t,e,i){t.translate(e-t.getBBox().width,i)},n=this.group?o(this.group,e):e,a,h;for(let d=0,p=i.length;d
{t.graphic=n=n&&n.destroy(),"function"==typeof s&&s()};Object.keys(i).length?n.animate(i,void 0,()=>e()):e()}}}}),i(e,"Series/Treemap/TreemapPoint.js",[e["Series/DrawPointUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{pie:{prototype:{pointClass:s}},scatter:{prototype:{pointClass:r}}}=e.seriesTypes,{extend:o,isNumber:l,pick:n}=i;class a extends r{constructor(){super(...arguments),this.shapeType="rect"}draw(e){t.draw(this,e)}getClassName(){let t=this.series,e=t.options,i=super.getClassName();return this.node.level<=t.nodeMap[t.rootNode].level?i+=" highcharts-above-level":this.node.isLeaf||n(e.interactByLeaf,!e.allowTraversingTree)?this.node.isLeaf||(i+=" highcharts-internal-node"):i+=" highcharts-internal-node-interactive",i}isValid(){return!!(this.id||l(this.value))}setState(t){super.setState.apply(this,arguments),this.graphic&&this.graphic.attr({zIndex:"hover"===t?1:0})}shouldDraw(){return l(this.plotY)&&null!==this.y}}return o(a.prototype,{setVisible:s.prototype.setVisible}),a}),i(e,"Series/Treemap/TreemapSeriesDefaults.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{isString:i}=e;return{allowTraversingTree:!1,animationLimit:250,borderRadius:0,showInLegend:!1,marker:void 0,colorByPoint:!1,dataLabels:{defer:!1,enabled:!0,formatter:function(){let t=this&&this.point?this.point:{};return i(t.name)?t.name:""},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:"",pointFormat:"{point.name}: {point.value}
"},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:t.seriesTypes.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}},legendSymbol:"rectangle"}}),i(e,"Series/Treemap/TreemapUtilities.js",[],function(){var t;return(t||(t={})).recursive=function t(e,i,s){let r=i.call(s||this,e);!1!==r&&t(r,i,s)},t}),i(e,"Series/TreeUtilities.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],function(t,e){let{extend:i,isArray:s,isNumber:r,isObject:o,merge:l,pick:n,relativeLength:a}=e;return{getColor:function(e,i){let s,r,o,l,a,h;let d=i.index,p=i.mapOptionsToLevel,u=i.parentColor,c=i.parentColorIndex,g=i.series,m=i.colors,v=i.siblings,b=g.points,f=g.chart.options.chart;return e&&(s=b[e.i],r=p[e.level]||{},s&&r.colorByPoint&&(l=s.index%(m?m.length:f.colorCount),o=m&&m[l]),g.chart.styledMode||(a=n(s&&s.options.color,r&&r.color,o,u&&(e=>{let i=r&&r.colorVariation;return i&&"brightness"===i.key&&d&&v?t.parse(e).brighten(i.to*(d/v)).get():e})(u),g.color)),h=n(s&&s.options.colorIndex,r&&r.colorIndex,l,c,i.colorIndex)),{color:a,colorIndex:h}},getLevelOptions:function(t){let e,i,a,h,d,p;let u={};if(o(t))for(h=r(t.from)?t.from:1,p=t.levels,i={},e=o(t.defaults)?t.defaults:{},s(p)&&(i=p.reduce((t,i)=>{let s,a,d;return o(i)&&r(i.level)&&(a=n((d=l({},i)).levelIsConstant,e.levelIsConstant),delete d.levelIsConstant,delete d.level,o(t[s=i.level+(a?0:h-1)])?l(!0,t[s],d):t[s]=d),t},{})),d=r(t.to)?t.to:1,a=0;a<=d;a++)u[a]=l({},e,o(i[a])?i[a]:{});return u},getNodeWidth:function(t,e){let{chart:i,options:s}=t,{nodeDistance:r=0,nodeWidth:o=0}=s,{plotSizeX:l=1}=i;if("auto"===o){if("string"==typeof r&&/%$/.test(r))return l/(e+parseFloat(r)/100*(e-1));let t=Number(r);return(l+t)/(e||1)-t}return a(o,l)},setTreeValues:function t(e,s){let r=s.before,o=s.idRoot,l=s.mapIdToNode[o],a=!1!==s.levelIsConstant,h=s.points[e.i],d=h&&h.options||{},p=[],u=0;e.levelDynamic=e.level-(a?0:l.level),e.name=n(h&&h.name,""),e.visible=o===e.id||!0===s.visible,"function"==typeof r&&(e=r(e,s)),e.children.forEach((r,o)=>{let l=i({},s);i(l,{index:o,siblings:e.children.length,visible:e.visible}),r=t(r,l),p.push(r),r.visible&&(u+=r.val)});let c=n(d.value,u);return e.visible=c>=0&&(u>0||e.visible),e.children=p,e.childrenTotal=u,e.isLeaf=e.visible&&!u,e.val=c,e},updateRootId:function(t){let e,i;return o(t)&&(i=o(t.options)?t.options:{},e=n(t.rootNode,i.rootId,""),o(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e}}}),i(e,"Series/Treemap/TreemapSeries.js",[e["Extensions/Breadcrumbs/Breadcrumbs.js"],e["Core/Color/Color.js"],e["Series/ColorMapComposition.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Treemap/TreemapAlgorithmGroup.js"],e["Series/Treemap/TreemapNode.js"],e["Series/Treemap/TreemapPoint.js"],e["Series/Treemap/TreemapSeriesDefaults.js"],e["Series/Treemap/TreemapUtilities.js"],e["Series/TreeUtilities.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o,l,n,a,h,d,p){let{parse:u}=e,{composed:c,noop:g}=s,{column:m,scatter:v}=r.seriesTypes,{getColor:b,getLevelOptions:f,updateRootId:y}=d,{addEvent:x,correctFloat:T,defined:w,error:B,extend:S,fireEvent:C,isArray:L,isObject:P,isString:A,merge:O,pick:R,pushUnique:D,stableSort:I}=p,M=!1;function N(){let t;let e=this.xAxis,i=this.yAxis;e&&i&&(this.is("treemap")?(t={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,minPadding:0,max:100,maxPadding:0,startOnTick:!1,title:void 0,tickPositions:[]},S(i.options,t),S(e.options,t),M=!0):M&&(i.setOptions(i.userOptions),e.setOptions(e.userOptions),M=!1))}class j extends v{static compose(t){D(c,"TreemapSeries")&&x(t,"afterBindAxes",N)}algorithmCalcPoints(t,e,i,s){let r=i.plot,o=i.elArr.length-1,l,n,a,h,d=i.lW,p=i.lH,u,c=0;for(let t of(e?(d=i.nW,p=i.nH):u=i.elArr[o],i.elArr))(e||c