/* Highcharts JS v10.3.3 (2023-01-20) Highcharts Drilldown module Author: Torstein Honsi License: www.highcharts.com/license */ (function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/drilldown",["highcharts"],function(v){a(v);a.Highcharts=v;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function v(a,q,f,p){a.hasOwnProperty(q)||(a[q]=p.apply(null,f),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:q,module:a[q]}})))}a=a?a._modules:{};v(a, "Extensions/Breadcrumbs.js",[a["Core/Chart/Chart.js"],a["Core/Defaults.js"],a["Core/Globals.js"],a["Core/Utilities.js"],a["Core/FormatUtilities.js"]],function(a,q,f,p,l){var v=l.format;l=p.addEvent;var C=p.objectEach,y=p.extend,D=p.fireEvent,w=p.merge,A=p.pick,E=p.defined,r=p.isString;y(q.defaultOptions.lang,{mainBreadcrumb:"Main"});q=function(){function a(b,d){this.group=void 0;this.list=[];this.elementList={};this.isDirty=!0;this.level=0;this.options=void 0;d=w(b.options.drilldown&&b.options.drilldown.drillUpButton, a.defaultBreadcrumbsOptions,b.options.navigation&&b.options.navigation.breadcrumbs,d);this.chart=b;this.options=d||{}}a.prototype.updateProperties=function(b){this.setList(b);this.setLevel();this.isDirty=!0};a.prototype.setList=function(b){this.list=b};a.prototype.setLevel=function(){this.level=this.list.length&&this.list.length-1};a.prototype.getLevel=function(){return this.level};a.prototype.getButtonText=function(b){var a=this.chart,h=this.options,e=a.options.lang,f=A(h.format,h.showFullPath?"{level.name}": "\u2190 {level.name}");e=e&&A(e.drillUpText,e.mainBreadcrumb);b=h.formatter&&h.formatter(b)||v(f,{level:b.levelOptions},a)||"";(r(b)&&!b.length||"\u2190 "===b)&&E(e)&&(b=h.showFullPath?e:"\u2190 "+e);return b};a.prototype.redraw=function(){this.isDirty&&this.render();this.group&&this.group.align();this.isDirty=!1};a.prototype.render=function(){var a=this.chart,d=this.options;!this.group&&d&&(this.group=a.renderer.g("breadcrumbs-group").addClass("highcharts-no-tooltip highcharts-breadcrumbs").attr({zIndex:d.zIndex}).add()); d.showFullPath?this.renderFullPathButtons():this.renderSingleButton();this.alignBreadcrumbsGroup()};a.prototype.renderFullPathButtons=function(){this.destroySingleButton();this.resetElementListState();this.updateListElements();this.destroyListElements()};a.prototype.renderSingleButton=function(){var a=this.chart,d=this.list,h=this.options.buttonSpacing;this.destroyListElements();var e=this.group?this.group.getBBox().width:h;d=d[d.length-2];!a.drillUpButton&&0c[c.length-1].level&&c.push({level:a.levelNumber+1,levelOptions:t({name:a.lowerSeries.name},a.pointOptions)})}));return c};f.prototype.drillUp=function(){if(this.drilldownLevels&&0!==this.drilldownLevels.length){z(this,"beforeDrillUp"); for(var a=this,c=a.drilldownLevels,b=c[c.length-1].levelNumber,m=c.length,d=a.series,u,e,n,f,h=function(c){d.forEach(function(a){a.options._ddSeriesId===c._ddSeriesId&&(g=a)});var g=g||a.addSeries(c,!1);g.type===n.type&&g.animateDrillupTo&&(g.animate=g.animateDrillupTo);c===e.seriesPurgedOptions&&(f=g)},k=a.drilldownLevels.length;m--;)if(e=c[m],e.levelNumber===b){c.pop();n=e.lowerSeries;if(!n.chart)for(u=d.length;u--;)if(d[u].options.id===e.lowerSeriesOptions.id&&d[u].options._levelNumber===b+1){n= d[u];break}n.xData=[];n.xAxis&&n.xAxis.names&&(0===k||m===k)&&(n.xAxis.names.length=0);e.levelSeriesOptions.forEach(h);z(a,"drillup",{seriesOptions:e.seriesPurgedOptions||e.seriesOptions});f.type===n.type&&(f.drilldownLevel=e,f.options.animation=a.options.drilldown.animation,n.animateDrillupFrom&&n.chart&&n.animateDrillupFrom(e));f.options._levelNumber=b;n.remove(!1);f.xAxis&&(u=e.oldExtremes,f.xAxis.setExtremes(u.xMin,u.xMax,!1),f.yAxis.setExtremes(u.yMin,u.yMax,!1));e.resetZoomButton&&(a.resetZoomButton= e.resetZoomButton)}z(a,"afterDrillUp");this.redraw();this.ddDupes&&(this.ddDupes.length=0);z(a,"drillupall")}};e(f,"afterInit",function(){var a=this;a.drilldown={chart:a,fadeInGroup:b,update:function(c,g){t(!0,a.options.drilldown,c);B(g,!0)&&a.redraw()}}});e(f,"render",function(){(this.xAxis||[]).forEach(function(a){a.ddPoints={};a.series.forEach(function(c){var g,b=c.xData||[],e=c.points;for(g=0;g