/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/drilldown
 * @requires highcharts
 *
 * Highcharts Drilldown module
 *
 * (c) 2009-2026 Highsoft AS
 *
 * Author: Torstein Hønsi
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 *
 */import*as e from"../highcharts.js";var t,i={};i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let o=e.default;var r=i.n(o);let l={mainBreadcrumb:"Main"},s=e.default.Templating,{format:n}=i.n(s)(),{composed:a}=r();function d(){if(this.breadcrumbs){let e=this.resetZoomButton&&this.resetZoomButton.getBBox(),t=this.breadcrumbs.options;e&&"right"===t.position.align&&"plotBox"===t.relativeTo&&this.breadcrumbs.alignBreadcrumbsGroup(-e.width-t.buttonSpacing)}}function p(){this.breadcrumbs&&(this.breadcrumbs.destroy(),this.breadcrumbs=void 0)}function h(){let e=this.breadcrumbs;if(e&&!e.options.floating&&e.level){let t=e.options,i=t.buttonTheme,o=(i.height||0)+2*(i.padding||0)+t.buttonSpacing,r=t.position.verticalAlign;"bottom"===r?(this.marginBottom=(this.marginBottom||0)+o,e.yOffset=o):"middle"!==r?(this.plotTop+=o,e.yOffset=-o):e.yOffset=void 0}}function u(){this.breadcrumbs&&this.breadcrumbs.redraw()}function c(e){!0===e.resetSelection&&this.breadcrumbs&&this.breadcrumbs.alignBreadcrumbsGroup()}class m{static compose(e,t){(0,o.pushUnique)(a,"Breadcrumbs")&&((0,o.addEvent)(e,"destroy",p),(0,o.addEvent)(e,"afterShowResetZoom",d),(0,o.addEvent)(e,"getMargins",h),(0,o.addEvent)(e,"redraw",u),(0,o.addEvent)(e,"selection",c),(0,o.extend)(t.lang,l))}constructor(e,t){this.elementList={},this.isDirty=!0,this.level=0,this.list=[];let i=(0,o.merge)(e.options.drilldown&&e.options.drilldown.drillUpButton,m.defaultOptions,e.options.navigation&&e.options.navigation.breadcrumbs,t);this.chart=e,this.options=i||{}}updateProperties(e){this.setList(e),this.setLevel(),this.isDirty=!0}setList(e){this.list=e}setLevel(){this.level=this.list.length&&this.list.length-1}getLevel(){return this.level}getButtonText(e){let t=this.chart,i=this.options,r=t.options.lang,l=(0,o.pick)(i.format,i.showFullPath?"{level.name}":"← {level.name}"),s=r&&(0,o.pick)(r.drillUpText,r.mainBreadcrumb),a=i.formatter&&i.formatter(e)||n(l,{level:e.levelOptions},t)||"";return((0,o.isString)(a)&&!a.length||"← "===a)&&(0,o.defined)(s)&&(a=i.showFullPath?s:"← "+s),a}redraw(){this.isDirty&&this.render(),this.group&&this.group.align(),this.isDirty=!1}render(){let e=this.chart,t=this.options;!this.group&&t&&(this.group=e.renderer.g("breadcrumbs-group").addClass("highcharts-no-tooltip highcharts-breadcrumbs").attr({zIndex:t.zIndex}).add()),t.showFullPath?this.renderFullPathButtons():this.renderSingleButton(),this.alignBreadcrumbsGroup()}renderFullPathButtons(){this.destroySingleButton(),this.resetElementListState(),this.updateListElements(),this.destroyListElements()}renderSingleButton(){let e=this.chart,t=this.list,i=this.options.buttonSpacing;this.destroyListElements();let o=this.group?this.group.getBBox().width:i,r=t[t.length-2];!e.drillUpButton&&this.level>0?e.drillUpButton=this.renderButton(r,o,i):e.drillUpButton&&(this.level>0?this.updateSingleButton():this.destroySingleButton())}alignBreadcrumbsGroup(e){if(this.group){let t=this.options,i=t.buttonTheme,r=t.position,l="chart"===t.relativeTo||"spacingBox"===t.relativeTo?void 0:"plotBox",s=this.group.getBBox(),n=2*(i.padding||0)+t.buttonSpacing;r.width=s.width+n,r.height=s.height+n;let a=(0,o.merge)(r);e&&(a.x+=e),this.options.rtl&&(a.x+=r.width),a.y=(0,o.pick)(a.y,this.yOffset,0),this.group.align(a,!0,l)}}renderButton(e,t,i){let r=this,l=this.chart,s=r.options,n=(0,o.merge)(s.buttonTheme),a=l.renderer.button(r.getButtonText(e),t,i,function(t){let i,l=s.events&&s.events.click;l&&(i=l.call(r,t,e,r)),!1!==i&&(s.showFullPath?t.newLevel=e.level:t.newLevel=r.level-1,(0,o.fireEvent)(r,"up",t))},n).addClass("highcharts-breadcrumbs-button").add(r.group);return l.styledMode||a.attr(s.style),a}renderSeparator(e,t){let i=this.chart,o=this.options.separator,r=i.renderer.label(o.text,e,t,void 0,void 0,void 0,!1).addClass("highcharts-breadcrumbs-separator").add(this.group);return i.styledMode||r.css(o.style),r}update(e){(0,o.merge)(!0,this.options,e),this.destroy(),this.isDirty=!0}updateSingleButton(){let e=this.chart,t=this.list[this.level-1];e.drillUpButton&&e.drillUpButton.attr({text:this.getButtonText(t)})}destroy(){this.destroySingleButton(),this.destroyListElements(!0),this.group&&this.group.destroy(),this.group=void 0}destroyListElements(e){let t=this.elementList;(0,o.objectEach)(t,(i,o)=>{(e||!t[o].updated)&&((i=t[o]).button&&i.button.destroy(),i.separator&&i.separator.destroy(),delete i.button,delete i.separator,delete t[o])}),e&&(this.elementList={})}destroySingleButton(){this.chart.drillUpButton&&(this.chart.drillUpButton.destroy(),this.chart.drillUpButton=void 0)}resetElementListState(){(0,o.objectEach)(this.elementList,e=>{e.updated=!1})}updateListElements(){let e=this.elementList,t=this.options.buttonSpacing,i=this.list,o=this.options.rtl,r=o?-1:1,l=function(e,t){return r*e.getBBox().width+r*t},s=function(e,t,i){e.translate(t-e.getBBox().width,i)},n=this.group?l(this.group,t):t,a,d;for(let p=0,h=i.length;p<h;++p){let u,c,m=p===h-1;e[(d=i[p]).level]?(u=(a=e[d.level]).button,a.separator||m?a.separator&&m&&(a.separator.destroy(),delete a.separator):(n+=r*t,a.separator=this.renderSeparator(n,t),o&&s(a.separator,n,t),n+=l(a.separator,t)),e[d.level].updated=!0):(u=this.renderButton(d,n,t),o&&s(u,n,t),n+=l(u,t),m||(c=this.renderSeparator(n,t),o&&s(c,n,t),n+=l(c,t)),e[d.level]={button:u,separator:c,updated:!0}),u&&u.setState(2*!!m)}}}m.defaultOptions={buttonSpacing:5,buttonTheme:{fill:"none",height:18,padding:2,"stroke-width":0,zIndex:7,states:{select:{fill:"none"}},style:{color:"var(--highcharts-highlight-color-80)"}},floating:!1,format:void 0,relativeTo:"plotBox",rtl:!1,position:{align:"left",verticalAlign:"top",x:0,y:void 0},separator:{text:"/",style:{color:"var(--highcharts-neutral-color-60)",fontSize:"0.8em"}},showFullPath:!0,style:{},useHTML:!1,zIndex:7};let f={activeAxisLabelStyle:{cursor:"pointer",color:"var(--highcharts-highlight-color-100)",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:"var(--highcharts-highlight-color-100)",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}},mapZooming:!0},{animObject:g}=r();function w(e,t,i,o){e[i?"addClass":"removeClass"]("highcharts-drilldown-point"),o||e.css({cursor:t})}function b(e){let t=this,i=t.chart,{drilldownLevels:r,styledMode:l}=i,s=g(i.options.drilldown?.animation),{xAxis:n,yAxis:a}=this;if(!e){let e;r?.forEach(i=>{t.options._ddSeriesId===i.lowerSeriesOptions._ddSeriesId&&(e=i.shapeArgs)&&(e.x=(e.x||0)+(i.plotLeft??n.pos)-n.pos,e.y=(e.y||0)+(i.plotTop??a.pos)-a.pos,l||(e.fill=i.color))}),t.points.forEach(i=>{i.graphic?.attr(e).animate((0,o.extend)(i.shapeArgs,{fill:i.color||t.color}),s)}),this.dataLabelsGroups?.forEach(e=>i.drilldown?.fadeInGroup(e)),delete this.animate}}function v(e){let t=this,i=g((t.chart.options.drilldown||{}).animation);t.trackerGroups?.forEach(e=>{"dataLabelsGroup"===e?t.dataLabelsGroups?.forEach(e=>{e?.on("mouseover",()=>{})}):t[e]?.on("mouseover")});let r=t.group,l=r!==t.chart.columnGroup;l&&delete t.group,(this.points||this.data).forEach(s=>{let n=s.graphic,a=e.shapeArgs;if(n&&a){let d=()=>{n.destroy(),r&&l&&(r=r.destroy())};delete s.graphic,t.chart.styledMode||(a.fill=e.color),i.duration?n.animate(a,(0,o.merge)(i,{complete:d})):(n.attr(a),d())}})}function y(e){let t=this,i=t.drilldownLevel,r=g(t.chart.options.drilldown?.animation);e||(t.points.forEach(e=>{let t=e.dataLabel;e.graphic&&e.graphic.hide(),t&&(t.hidden="hidden"===t.attr("visibility"),t.hidden||(t.hide(),t.connector?.hide()))}),(0,o.syncTimeout)(()=>{if(t.points){let e=[];t.data.forEach(t=>{e.push(t)}),t.nodes&&(e=e.concat(t.nodes)),e.forEach((e,t)=>{let o=t===(i&&i.pointIndex)?"show":"fadeIn",r=e.dataLabel;e.graphic&&e.visible&&e.graphic[o]("show"===o||void 0),r&&!r.hidden&&(r.fadeIn(),r.connector?.fadeIn())})}},Math.max(r.duration-50,0)),delete this.animate)}function D(e){let t=this,i=t.chart,o=t.group;i&&o&&t.options&&i.options.drilldown?.animation&&(e&&i.mapView?(o.attr({opacity:.01}),i.mapView.allowTransformAnimation=!1,t.options.inactiveOtherPoints=!0,t.options.enableMouseTracking=!1):(o.animate({opacity:1},i.options.drilldown.animation,()=>{t.options&&(t.options.inactiveOtherPoints=!1,t.options.enableMouseTracking=t.userOptions?.enableMouseTracking??!0)}),t.dataLabelsGroups?.forEach(e=>i.drilldown?.fadeInGroup(e))))}function x(){let e=this.chart;e?.mapView&&(e.mapView.allowTransformAnimation=!1),this.options&&(this.options.inactiveOtherPoints=!0)}function S(e){let t=this.chart,i=this.group;t&&i&&(e?(i.attr({opacity:.01}),this.options&&(this.options.inactiveOtherPoints=!0)):(i.animate({opacity:1},(t.options.drilldown||{}).animation),this.dataLabelsGroups?.forEach(e=>t.drilldown?.fadeInGroup(e))))}function E(){return this.drilldown&&!this.unbindDrilldownClick&&(this.unbindDrilldownClick=(0,o.addEvent)(this,"click",L)),this}function B(){let e=this.series,t=e.chart.styledMode;this.drilldown&&e.halo&&"hover"===this.state?w(e.halo,"pointer",!0,t):e.halo&&w(e.halo,"auto",!1,t)}function L(e){let t=this.series;t.xAxis&&!1===(t.chart.options.drilldown||{}).allowPointDrilldown?t.xAxis.drilldownCategory(this.x,e):this.runDrilldown(void 0,void 0,e)}function O(e){let t=e.options||{};t.drilldown&&!this.unbindDrilldownClick?this.unbindDrilldownClick=(0,o.addEvent)(this,"click",L):!t.drilldown&&void 0!==t.drilldown&&this.unbindDrilldownClick&&(this.unbindDrilldownClick=this.unbindDrilldownClick())}function T(){let e=this.chart,t=e.options.drilldown?.activeDataLabelStyle||{},i=e.renderer,r=e.styledMode;for(let e of this.points){let l=(0,o.splat)(e.options.dataLabels)[0]||{},s=e.dlOptions||l.style||{};if(e.drilldown&&e.dataLabel){if("contrast"===t.color&&!r){let t=(0,o.isString)(e.color)&&e.color||(0,o.isString)(this.color)&&this.color;(0,o.isString)(t)&&(s.color=i.getContrast(t))}l&&l.color&&(s.color=l.color),e.dataLabel.addClass("highcharts-drilldown-data-label"),r||e.dataLabel.css(t).css(s)}}}function A(){let e=this.chart.styledMode;for(let t of this.points)t.drilldown&&t.graphic&&w(t.graphic,"pointer",!0,e)}function C(e){let t=this.chart,i=this.points,r=t.drilldownLevels||[],l=r[r.length-1],s=g(t.options.drilldown?.animation);if(this.is("item")&&(s.duration=0),this.center){let r=l.shapeArgs||{},n=r.start||0,a=((r.end||0)-n)/this.points.length,d=t.styledMode;if(r.y=(r.y||0)+((l.plotTop??t.plotTop)-t.plotTop)/2,!e){let e,p;for(let t=0,h=i.length;t<h;++t){e=(p=i[t]).shapeArgs||{},d||(r.fill=l.color,e.fill=p.color);let h=(0,o.merge)(r,{start:n+t*a,end:n+(t+1)*a});p.graphic?.attr(h).animate(e,s)}this.dataLabelsGroups?.forEach(e=>t.drilldown?.fadeInGroup(e)),delete this.animate}}}function M(){this.runDrilldown()}function I(e,t,i){let r=this.series,l=r.chart,s=l.options.drilldown||{},n=(s.series||[]).length,a;for(l.ddDupes||(l.ddDupes=[]),l.colorCounter=l.symbolCounter=0;n--&&!a;)s.series&&s.series[n].id===this.drilldown&&this.drilldown&&-1===l.ddDupes.indexOf(this.drilldown)&&(a=s.series[n],l.ddDupes.push(this.drilldown));(0,o.fireEvent)(l,"drilldown",{point:this,seriesOptions:a,category:t,originalEvent:i,points:void 0!==t&&r.xAxis.getDDPoints(t).slice(0)},t=>{let i=t.point.series?.chart,o=t.seriesOptions;i&&o&&(e?i.addSingleSeriesAsDrilldown(t.point,o):i.addSeriesAsDrilldown(t.point,o))})}let P=function(e,t){let i=e.prototype.pointClass,r=i.prototype;if(!r.doDrilldown){let{column:l,map:s,pie:n}=t;if((0,o.addEvent)(i,"afterInit",E),(0,o.addEvent)(i,"afterSetState",B),(0,o.addEvent)(i,"update",O),r.doDrilldown=M,r.runDrilldown=I,(0,o.addEvent)(e,"afterDrawDataLabels",T),(0,o.addEvent)(e,"afterDrawTracker",A),l){let e=l.prototype;e.animateDrilldown=b,e.animateDrillupFrom=v,e.animateDrillupTo=y}if(s){let e=s.prototype;e.animateDrilldown=D,e.animateDrillupFrom=x,e.animateDrillupTo=S}if(n){let e=n.prototype;e.animateDrilldown=C,e.animateDrillupFrom=v,e.animateDrillupTo=y}}},{animObject:k,stop:V}=r(),{noop:G}=r(),_=1;function Z(e,t){this.getDDPoints(e).forEach(function(i){(0,o.isObject)(i)&&i.series&&i.series.visible&&i.runDrilldown&&i.runDrilldown(!0,e,t)}),this.chart.applyDrilldown()}function N(e){return this.ddPoints&&this.ddPoints[e]||[]}function U(e){let t=[],i=e.drilldownLevels;return i&&i.length&&(t[0]||t.push({level:0,levelOptions:i[0].seriesOptions}),i.forEach(function(e){let i=t[t.length-1];e.levelNumber+1>i.level&&t.push({level:e.levelNumber+1,levelOptions:(0,o.merge)({name:e.lowerSeries.name},e.pointOptions)})})),t}class j{constructor(e){this.chart=e}addSeriesAsDrilldown(e,t){let i=this.chart||this;if((0,o.fireEvent)(this,"addSeriesAsDrilldown",{seriesOptions:t}),i.mapView){if(e.series.isDrilling=!0,i.series.forEach(e=>{e.options.inactiveOtherPoints=!0,e.dataLabelsGroups?.forEach(e=>e?.destroy()),e.dataLabelsGroups=[],e.points?.forEach(e=>{e.dataLabels&&(e.dataLabels=[])})}),i.options.drilldown&&!i.mapView.projection.hasGeoProjection&&f){let e=(0,o.diffObjects)(i.options.drilldown,f);(0,o.defined)(e.mapZooming)||(i.options.drilldown.mapZooming=!1)}if(i.options.drilldown&&i.options.drilldown.animation&&i.options.drilldown.mapZooming){i.mapView.allowTransformAnimation=!0;let o=k(i.options.drilldown.animation);if("boolean"!=typeof o){let r=o.complete,l=function(o){o&&o.applyDrilldown&&i.mapView&&(i.addSingleSeriesAsDrilldown(e,t),i.applyDrilldown(),i.mapView.allowTransformAnimation=!1)};o.complete=function(){r&&r.apply(this,arguments),l.apply(this,arguments)}}e.zoomTo(o)}else i.addSingleSeriesAsDrilldown(e,t),i.applyDrilldown()}else i.addSingleSeriesAsDrilldown(e,t),i.applyDrilldown()}addSingleSeriesAsDrilldown(e,t){let i=this.chart||this,r=e.series,l=r.xAxis,s=r.yAxis,n=l&&i.inverted?s:l,a=l&&i.inverted?l:s,d=i.styledMode?{colorIndex:e.colorIndex??r.colorIndex}:{color:e.color||r.color},p=r.options._levelNumber??0;i.drilldownLevels||(i.drilldownLevels=[]),t=(0,o.extend)((0,o.extend)({_ddSeriesId:_++,_levelNumber:p+1},d),t);let h=[],u=[],c;(c=i.drilldownLevels[i.drilldownLevels.length-1])&&c.levelNumber!==p&&(c=void 0),r.chart.series.forEach(e=>{var t,i;if(e.xAxis===l)if((t=e.options)._ddSeriesId||(t._ddSeriesId=_++),e.options.colorIndex=e.colorIndex,(i=e.options)._levelNumber??(i._levelNumber=p),c)h=c.levelSeries,u=c.levelSeriesOptions;else{h.push(e),e.purgedOptions=(0,o.merge)({_ddSeriesId:e.options._ddSeriesId,_levelNumber:e.options._levelNumber,selected:e.options.selected},e.userOptions);let t=e.dataTable.getColumns();e.purgedOptions.dataTable={columns:t},u.push(e.purgedOptions)}}),l?.names&&(l.names.length=0);let m=i.addSeries(t,!1);m.options._levelNumber=p+1,l&&(l.userMin=l.userMax=void 0,s.userMin=s.userMax=void 0),m.isDrilling=!0;let f=(0,o.extend)({levelNumber:p,seriesOptions:r.options,seriesPurgedOptions:r.purgedOptions,levelSeriesOptions:u,levelSeries:h,shapeArgs:e.shapeArgs,bBox:e.graphic?e.graphic.getBBox():{},color:e.isNull?"rgba(0,0,0,0)":d.color,lowerSeries:m,lowerSeriesOptions:t,plotTop:a?.pos??i.plotTop,plotLeft:n?.pos??i.plotLeft,pointOptions:e.options,pointIndex:e.index,oldExtremes:{xMin:l?.userMin,xMax:l?.userMax,yMin:s?.userMin,yMax:s?.userMax},resetZoomButton:c&&c.levelNumber===p?void 0:i.resetZoomButton},d);i.drilldownLevels.push(f),r.type===m.type&&(m.animate=m.animateDrilldown||G,m.options.animation=!0)}applyDrilldown(){let e,t=this.chart||this,i=t.options.drilldown,r=t.drilldownLevels;r&&r.length>0&&(e=r[r.length-1].levelNumber,t.hasCartesianSeries=r.some(e=>e.lowerSeries?.isCartesian),(t.drilldownLevels||[]).forEach(r=>{t.mapView&&i?.mapZooming&&(t.redraw(),r.lowerSeries.isDrilling=!1,t.mapView.fitToBounds(r.lowerSeries.bounds),r.lowerSeries.isDrilling=!0),r.levelNumber===e&&r.levelSeries.forEach(l=>{let s=l.options?._levelNumber;if(t.mapView){if(l.options&&s===e){let e={};i&&(e=i.animation);let s=k(e),n=!1,a=()=>{!n&&(n=!0,l.chart&&(l.group&&V(l.group),l.dataLabelsGroup&&V(l.dataLabelsGroup),l.dataLabelsGroups?.forEach(e=>{e&&V(e)}),l.remove(!1)),r.levelSeries.filter(e=>Object.keys(e).length).length||(t.resetZoomButton&&(t.resetZoomButton.hide(),delete t.resetZoomButton),t.pointer?.reset(),(0,o.fireEvent)(t,"afterDrilldown"),t.mapView&&(t.series.forEach(e=>{e.isDirtyData=!0,e.isDrilling=!1}),t.mapView.fitToBounds(void 0,void 0),t.mapView.allowTransformAnimation=!0),(0,o.fireEvent)(t,"afterApplyDrilldown")))};if(l.group?.element){let t;(t=e=>{let t=e?.element;e&&t&&(V(e),t.setAttribute("opacity","0"),t.setAttribute("visibility","hidden"))})(l.dataLabelsGroup),l.dataLabelsGroups?.forEach(t),l.group.animate({opacity:0},e,a),(0,o.syncTimeout)(a,s.defer+s.duration)}else a()}}else l.options&&s===e&&l.remove(!1)})})),t.mapView||(t.resetZoomButton&&(t.resetZoomButton.hide(),delete t.resetZoomButton),t.pointer?.reset(),(0,o.fireEvent)(t,"afterDrilldown"),t.hasCartesianSeries||t.axes.forEach(e=>{e.destroy(!0),e.init(t,(0,o.merge)(e.userOptions,e.options))}),t.redraw(i?.animation),(0,o.fireEvent)(t,"afterApplyDrilldown"))}drillUp(e){let t=this.chart||this;if(!t.drilldownLevels||0===t.drilldownLevels.length)return;(0,o.fireEvent)(t,"beforeDrillUp");let i=t.drilldownLevels,r=i[i.length-1].levelNumber,l=t.series,s=t.drilldownLevels.length,n=t.options.drilldown||{},a=(e,i)=>{let o;if(l.forEach(t=>{t.options._ddSeriesId===e._ddSeriesId&&(o=t)}),(o=o||t.addSeries(e,!1)).type===i.type&&o.animateDrillupTo&&(o.animate=o.animateDrillupTo),e===u.seriesPurgedOptions)return o},d=e=>{e.remove(!1),t.series.forEach(e=>{e.colorAxis&&(e.isDirtyData=!0),e.options.inactiveOtherPoints=!1,e.group&&e.visible&&e.group.attr({opacity:1})}),t.redraw()},p=i.length,h,u,c;for(t.symbolCounter=t.colorCounter=0;p--;){let m,f;if((u=i[p]).levelNumber===r){if(i.pop(),!(m=u.lowerSeries).chart){for(h=l.length;h--;)if(l[h].options.id===u.lowerSeriesOptions.id&&l[h].options._levelNumber===r+1){m=l[h];break}}m.dataTable.setColumn("x",[]),m.xAxis&&m.xAxis.names&&(0===s||p===s-1)&&(m.xAxis.names.length=0),u.levelSeriesOptions.forEach(e=>{let t=a(e,m);t&&(f=t)}),(0,o.fireEvent)(t,"drillup",{seriesOptions:u.seriesPurgedOptions||u.seriesOptions}),f&&(f.type===m.type&&(f.drilldownLevel=u,f.options.animation=n.animation,m.chart&&m.animateDrillupFrom?.(u)),f.options._levelNumber=r);let g=m;if(t.mapView||g.remove(!1),f?.xAxis&&(c=u.oldExtremes,f.xAxis.setExtremes(c.xMin,c.xMax,!1),f.yAxis.setExtremes(c.yMin,c.yMax,!1)),u.resetZoomButton&&(t.resetZoomButton=u.resetZoomButton),t.mapView){let i=u.levelNumber===r&&e,l=n.animation&&n.mapZooming;i?m.remove(!1):(m.dataLabelsGroups?.forEach(e=>{e?.destroy()}),m.dataLabelsGroups=[],t.mapView&&f&&(l&&(m.isDrilling=!0,f.isDrilling=!0,t.redraw(!1),t.mapView.fitToBounds(m.bounds,void 0,!0,!1)),t.mapView.allowTransformAnimation=!0,(0,o.fireEvent)(t,"afterDrillUp",{seriesOptions:f?f.userOptions:void 0}),l?(t.mapView.setView(void 0,t.mapView.minZoom??1,!0,{complete:function(){Object.prototype.hasOwnProperty.call(this,"complete")&&d(m)}}),f._hasTracking=!1):(t.mapView.allowTransformAnimation=!1,m.group?m.group.animate({opacity:0},n.animation,()=>{d(m),t.mapView&&(t.mapView.allowTransformAnimation=!0)}):(d(m),t.mapView.allowTransformAnimation=!0)),f.isDrilling=!1))}else(0,o.fireEvent)(t,"afterDrillUp")}}t.mapView||e||t.redraw(n.animation),t.ddDupes&&(t.ddDupes.length=0),(0,o.fireEvent)(t,"drillupall")}fadeInGroup(e){let t=k(this.chart.options.drilldown?.animation);e&&(e.hide(),(0,o.syncTimeout)(()=>{e?.added&&e.fadeIn()},Math.max(t.duration-50,0)))}update(e,t=!0){let i=this.chart;(0,o.merge)(!0,i.options.drilldown,e),t&&i.redraw()}}!function(e){function t(e){let t=this.chart,i=this.getLevel()-e.newLevel,o=i>1;for(let e=0;e<i;e++)e===i-1&&(o=!1),t.drillUp(o)}function i(){let e=this.options.drilldown,t=e&&e.breadcrumbs;this.breadcrumbs||(this.breadcrumbs=new m(this,t)),this.breadcrumbs.updateProperties(U(this))}function r(){this.breadcrumbs&&this.breadcrumbs.updateProperties(U(this))}function l(){this.drilldown=new j(this)}function s(){this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy())}function n(){this.resetZoomButton&&this.showResetZoom()}function a(){(this.xAxis||[]).forEach(e=>{let t={};e.ddPoints=t,e.series.forEach(e=>{let i=e.getColumn("x"),r=e.points;for(let l=0,s=i.length,n;l<s;l++)if(n=e.dataTable.getRowObject(l),(0,o.defined)(n)&&"number"!=typeof n&&(n=e.pointClass.prototype.optionsToObject.call({series:e},n)).drilldown){t[i[l]]||(t[i[l]]=[]);let o=l-(e.cropStart||0);t[i[l]].push(!r||!(o>=0)||!(o<r.length)||r[o])}}),(0,o.objectEach)(e.ticks,e=>e.drillable())})}function d(e){let t=this.breadcrumbs,i=e.options.drilldown&&e.options.drilldown.breadcrumbs;t&&i&&t.update(i)}function p(e){let t=e.options;t&&void 0===t._levelNumber&&void 0!==this.options._levelNumber&&(t._levelNumber=this.options._levelNumber)}function h(e){this.attr({opacity:.1,visibility:"inherit"}).animate({opacity:this.newOpacity??1},e||{duration:250})}function u(){let e=this.pos,t=this.label,i=this.axis,r="xAxis"===i.coll&&i.getDDPoints,l=r&&i.getDDPoints(e),s=i.chart.styledMode;r&&(t&&l&&l.length?(t.drillable=!0,t.basicStyles||s||(t.basicStyles=(0,o.merge)(t.styles)),t.addClass("highcharts-drilldown-axis-label"),t.removeOnDrillableClick&&(0,o.removeEvent)(t.element,"click"),t.removeOnDrillableClick=(0,o.addEvent)(t.element,"click",function(t){t.preventDefault(),i.drilldownCategory(e,t)}),!s&&i.chart.options.drilldown&&t.css(i.chart.options.drilldown.activeAxisLabelStyle||{})):t&&t.drillable&&t.removeOnDrillableClick&&(s||(t.styles={},t.element.removeAttribute("style"),t.css(t.basicStyles)),t.removeOnDrillableClick(),t.removeClass("highcharts-drilldown-axis-label")))}e.compose=function(e,c,g,w,b,v,y){P(w,b);let D=c.prototype;if(!D.drillUp){let b=v.prototype.Element,x=j.prototype,S=e.prototype,E=b.prototype,B=y.prototype;S.drilldownCategory=Z,S.getDDPoints=N,m.compose(c,g),(0,o.addEvent)(m,"up",t),D.addSeriesAsDrilldown=x.addSeriesAsDrilldown,D.addSingleSeriesAsDrilldown=x.addSingleSeriesAsDrilldown,D.applyDrilldown=x.applyDrilldown,D.drillUp=x.drillUp,(0,o.addEvent)(c,"afterDrilldown",i),(0,o.addEvent)(c,"afterDrillUp",r),(0,o.addEvent)(c,"afterInit",l),(0,o.addEvent)(c,"drillup",s),(0,o.addEvent)(c,"drillupall",n),(0,o.addEvent)(c,"render",a),(0,o.addEvent)(c,"update",d),(0,o.addEvent)(w,"update",p),g.drilldown=f,E.fadeIn=h,B.drillable=u}}}(t||(t={}));let F=t,z=r();z.Breadcrumbs=z.Breadcrumbs||m,F.compose(z.Axis,z.Chart,z.defaultOptions,z.Series,z.seriesTypes,z.SVGRenderer,z.Tick);let R=r();export{R as default};