/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/mouse-wheel-zoom
 * @requires highcharts
 *
 * Non-cartesian series zoom module
 *
 * (c) 2024-2026 Highsoft AS
 * Author: Hubert Kozik
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */import*as t from"../highcharts.js";var e={};e.n=t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},e.d=(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},e.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let o=t.default;var i=e.n(o);let{composed:a}=i();function s(t){let e=this,{trigger:o,selection:i,reset:a,from:s={},to:n={}}=t;"xy"===e.zooming.type&&("mousewheel"===o||"pan"===o||i||a)&&e.series.forEach(i=>{if(!i.isCartesian&&!1!==i.options.zoomEnabled){i.isDirty=!0,e.isDirtyBox=!0,t.hasZoomed=!0;let{plotWidth:a=0,plotHeight:r=0}=e;if("pan"===o&&i.zooming)i.zooming.panX-=(n.x||0)/a,i.zooming.panY-=(n.y||0)/r;else if(Object.keys(s).length){let{width:t=1,height:o=1}=n,l=Math.abs(i.group?.scaleX||1),{x:h=0,y:p=0,width:c=1,height:m=1}=s,d=h,g=p,f=i.zooming?.scale||i.group?.scaleX||1,u=(i.zooming?.width||1)*a,z=(i.zooming?.height||1)*r;if(Object.keys(n).length)u=c/t*u,z=c/o*z,h-=e.plotLeft,p-=e.plotTop,d=h-u/2,g=p-z/2,f=Math.min(a/u,r/z);else{c/=l,m/=l,f=Math.min(a/c,r/m);let t=0,o=0;i.zooming&&(t=i.zooming.x*a,o=i.zooming.y*r);let s=(h-e.plotLeft)/(a-c*l||1),n=(p-e.plotTop)/(r-m*l||1);u=c,z=m,h-=e.plotLeft,p-=e.plotTop,h/=l,p/=l,h+=t+c*s,p+=o+m*n,d-=e.plotLeft,g-=e.plotTop,d/=l,g/=l,d+=t,g+=o}i.zooming={x:d/a,y:g/r,zoomX:h/a,zoomY:p/r,width:u/a,height:z/r,scale:f,panX:0,panY:0},f<1&&delete i.zooming}else delete i.zooming}})}function n(t){let{chart:e,group:o,zooming:i}=this,{plotSizeX:a=0,plotSizeY:s=0}=e,{scale:n,translateX:r,translateY:l,name:h}=t,p=0,c=0,m=r,d=l;e.inverted&&([a,s]=[s,a]),o&&i&&(n=i.scale,p=i.zoomX*a*(n-Math.abs(o.scaleX||1)),c=i.zoomY*s*(n-Math.abs(o.scaleY||1)),"series"===h&&(i.x=Math.max(0,Math.min(1-i.width,i.x+i.panX/n)),p+=i.panX*a,i.panX=0,i.y=Math.max(0,Math.min(1-i.height,i.y+i.panY/n)),c+=i.panY*s,i.panY=0),r=(o.translateX||m)-p,(l=(o.translateY||d)-c)>d?l=d:(o.translateY||d)-c<s*(1-n)+d&&(l=s*(1-n)+d),r>m?r=m:r<a*(1-n)+m&&(r=a*(1-n)+m),t.scale=n,t.translateX=r,t.translateY=l)}function r(){let t;this.series.find(t=>!!t.zooming)&&(this.zoomClipRect||(this.zoomClipRect=this.renderer.clipRect()),this.zoomClipRect.attr({x:this.plotLeft,y:this.plotTop,width:this.inverted?this.clipBox.height:this.clipBox.width,height:this.inverted?this.clipBox.width:this.clipBox.height}),t=this.zoomClipRect),this.seriesGroup?.clip(t),this.series.forEach(e=>{e.dataLabelsParentGroups?.forEach(e=>{e.clip(t)})})}function l(t){if(t.point.series&&!t.point.series.isCartesian&&t.point.series.group&&t.point.series.zooming){let e=t.point.series.chart,o=t.point.series.zooming.scale,i=t.point.series.group.translateX||0,a=t.point.series.group.translateY||0;t.ret[0]=t.ret[0]*o+i-e.plotLeft,t.ret[1]=t.ret[1]*o+a-e.plotTop}}function h(t){t.skipAxes&&this.series.forEach(t=>{t.group&&t.zooming&&t.group.attr({translateX:0,translateY:0,scaleX:1,scaleY:1})})}function p({index:t,zIndex:e=6}){var o;this.hasDataLabels?.()&&(this.dataLabelsParentGroups||(this.dataLabelsParentGroups=[]),(o=this.dataLabelsParentGroups)[t]||(o[t]=this.chart.renderer.g().attr({zIndex:e}).add()))}let c=class{static compose(t,e,i){(0,o.pushUnique)(a,"NonCartesianSeriesZoom")&&((0,o.addEvent)(t,"afterDrawChartBox",r),(0,o.addEvent)(t,"transform",s),(0,o.addEvent)(t,"afterSetChartSize",h),(0,o.addEvent)(e,"getPlotBox",n),(0,o.addEvent)(e,"initDataLabelsGroup",p),(0,o.addEvent)(i,"getAnchor",l))}},m=i();m.NonCartesianSeriesZoom=m.NonCartesianSeriesZoom||c,m.NonCartesianSeriesZoom.compose(m.Chart,m.Series,m.Tooltip);let d=i();export{d as default};