import{g as t}from"./index-B1MHyEgd.js";function e(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(o){if("default"!==o&&!(o in t)){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}})}),Object.freeze(t)}var o,i={exports:{}};var r,s=o?i.exports:(o=1,r="undefined"==typeof window?i.exports:window,i.exports=(t=>(()=>{var e={944:e=>{e.exports=t}},o={};function i(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};i.d(r,{default:()=>u});var s=i(944),n=i.n(s);let{composed:a}=n(),{addEvent:p,pushUnique:l}=n();function h(t){let e=this,{trigger:o,selection:i,reset:r,from:s={},to:n={}}=t;"xy"===e.zooming.type&&("mousewheel"===o||"pan"===o||i||r)&&e.series.forEach(i=>{if(!i.isCartesian&&!1!==i.options.zoomEnabled){i.isDirty=!0,e.isDirtyBox=!0,t.hasZoomed=!0;let{plotWidth:r=0,plotHeight:a=0}=e;if("pan"===o&&i.zooming)i.zooming.panX-=(n.x||0)/r,i.zooming.panY-=(n.y||0)/a;else if(Object.keys(s).length){let{width:t=1,height:o=1}=n,p=Math.abs(i.group?.scaleX||1),{x:l=0,y:h=0,width:c=1,height:m=1}=s,g=l,f=h,d=i.zooming?.scale||i.group?.scaleX||1,u=(i.zooming?.width||1)*r,z=(i.zooming?.height||1)*a;if(Object.keys(n).length)u*=c/t,z*=c/o,l-=e.plotLeft,h-=e.plotTop,g=l-u/2,f=h-z/2,d=Math.min(r/u,a/z);else{c/=p,m/=p,d=Math.min(r/c,a/m);let t=0,o=0;i.zooming&&(t=i.zooming.x*r,o=i.zooming.y*a);let s=(l-e.plotLeft)/(r-c*p||1),n=(h-e.plotTop)/(a-m*p||1);u=c,z=m,l-=e.plotLeft,h-=e.plotTop,l/=p,h/=p,l+=t+c*s,h+=o+m*n,g-=e.plotLeft,f-=e.plotTop,g/=p,f/=p,g+=t,f+=o}i.zooming={x:g/r,y:f/a,zoomX:l/r,zoomY:h/a,width:u/r,height:z/a,scale:d,panX:0,panY:0},d<1&&delete i.zooming}else delete i.zooming}})}function c(t){let{chart:e,group:o,zooming:i}=this,{plotSizeX:r=0,plotSizeY:s=0}=e,{scale:n,translateX:a,translateY:p,name:l}=t,h=0,c=0,m=a,g=p;e.inverted&&([r,s]=[s,r]),o&&i&&(n=i.scale,h=i.zoomX*r*(n-Math.abs(o.scaleX||1)),c=i.zoomY*s*(n-Math.abs(o.scaleY||1)),"series"===l&&(i.x=Math.max(0,Math.min(1-i.width,i.x+i.panX/n)),h+=i.panX*r,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),a=(o.translateX||m)-h,(p=(o.translateY||g)-c)>g?p=g:(o.translateY||g)-c<s*(1-n)+g&&(p=s*(1-n)+g),a>m?a=m:a<r*(1-n)+m&&(a=r*(1-n)+m),t.scale=n,t.translateX=a,t.translateY=p)}function m(){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.dataLabelsGroup?.clip(t)}function g(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,r=t.point.series.group.translateY||0;t.ret[0]=t.ret[0]*o+i-e.plotLeft,t.ret[1]=t.ret[1]*o+r-e.plotTop}}function f(t){t.skipAxes&&this.series.forEach(t=>{t.group&&t.zooming&&t.group.attr({translateX:0,translateY:0,scaleX:1,scaleY:1})})}let d=n();d.NonCartesianSeriesZoom=d.NonCartesianSeriesZoom||class{static compose(t,e,o){l(a,"NonCartesianSeriesZoom")&&(p(t,"afterDrawChartBox",m),p(t,"transform",h),p(t,"afterSetChartSize",f),p(e,"getPlotBox",c),p(o,"getAnchor",g))}},d.NonCartesianSeriesZoom.compose(d.Chart,d.Series,d.Tooltip);let u=n();return r.default})())(r._Highcharts)),n=e({__proto__:null,default:t(s)},[s]);export{n};
//# sourceMappingURL=non-cartesian-zoom-4i08EJsP.js.map
