!/**
 * Highstock JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/drag-panes
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Drag-panes module
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Kacper Madej
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts):"function"==typeof define&&define.amd?define("highcharts/modules/drag-panes",["highcharts/highcharts"],function(e){return t(e)}):"object"==typeof exports?exports["highcharts/modules/drag-panes"]=t(e._Highcharts):e.Highcharts=t(e.Highcharts)}("u"<typeof window?this:window,e=>(()=>{"use strict";var t={944:t=>{t.exports=e}},s={};function i(e){var o=s[e];if(void 0!==o)return o.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};i.d(o,{default:()=>x});var r=i(944),n=i.n(r);let h=class{constructor(e){this.init(e)}init(e,t){this.axis=e,this.options=e.options.resize||{},this.render(),t||this.addMouseEvents()}render(){let e=this.axis,t=e.chart,s=this.options,i=s.x||0,o=s.y,n=(0,r.clamp)(e.top+e.height+o,t.plotTop,t.plotTop+t.plotHeight),h={};t.styledMode||(h={cursor:s.cursor,stroke:s.lineColor,"stroke-width":s.lineWidth,dashstyle:s.lineDashStyle}),this.lastPos=n-o,this.controlLine||(this.controlLine=t.renderer.path().addClass("highcharts-axis-resizer")),this.controlLine.add(e.axisGroup);let a=t.styledMode?this.controlLine.strokeWidth():s.lineWidth;h.d=t.renderer.crispLine([["M",e.left+i,n],["L",e.left+e.width+i,n]],a),this.controlLine.attr(h)}addMouseEvents(){let e,t,s,i=this,o=i.controlLine.element,n=i.axis.chart.container,h=[];i.mouseMoveHandler=e=e=>i.onMouseMove(e),i.mouseUpHandler=t=e=>i.onMouseUp(e),i.mouseDownHandler=s=()=>i.onMouseDown(),h.push((0,r.addEvent)(n,"mousemove",e),(0,r.addEvent)(n.ownerDocument,"mouseup",t),(0,r.addEvent)(o,"mousedown",s),(0,r.addEvent)(n,"touchmove",e),(0,r.addEvent)(n.ownerDocument,"touchend",t),(0,r.addEvent)(o,"touchstart",s)),i.eventsToUnbind=h}onMouseMove(e){if(!e.touches||0!==e.touches[0].pageX){let t=this.axis.chart.pointer;this.grabbed&&t&&(this.hasDragged=!0,this.updateAxes(t.normalize(e).chartY-(this.options.y||0)))}}onMouseUp(e){let t=this.axis.chart.pointer;this.hasDragged&&t&&this.updateAxes(t.normalize(e).chartY-(this.options.y||0)),this.grabbed=this.hasDragged=this.axis.chart.activeResizer=void 0}onMouseDown(){this.axis.chart.pointer?.reset(!1,0),this.grabbed=this.axis.chart.activeResizer=!0}updateAxes(e){let t=this.axis.chart,s=this.options.controlledAxis,i=0===s.next.length?[t.yAxis.indexOf(this.axis)+1]:s.next,o=[this.axis].concat(s.prev),n=[],h=t.plotTop,a=t.plotHeight,l=h+a,d=e=>100*e/a+"%",p=(e,t,s)=>Math.round((0,r.clamp)(e,t,s));e=(0,r.clamp)(e,h,l);let c=!1,u=e-this.lastPos;if(u*u<1)return;let f=!0;for(let s of[o,i])for(let o of s){let x,g,v=(0,r.isNumber)(o)?t.yAxis[o]:f?o:t.get(o),m=v&&v.options,y={};if(!m||m.isInternal){f=!1;continue}g=v.top;let b=Math.round((0,r.relativeLength)(m.minLength||NaN,a)),z=Math.round((0,r.relativeLength)(m.maxLength||NaN,a));if(f||s!==i)(x=p(e-g,b,z))===z&&(c=!0),e=g+x,n.push({axis:v,options:{height:d(x)}});else{if(u=e-this.lastPos,x=p(v.len-u,b,z),(g=v.top+u)+x>l){let t=l-x-g;e+=t,g+=t}g<h&&(g=h)+x>l&&(x=a),x===b&&(c=!0),n.push({axis:v,options:{top:d(g-h),height:d(x)}})}f=!1,y.height=x}if(!c){for(let e of n)e.axis.update(e.options,!1);t.redraw(!1)}}destroy(){let e=this.axis;for(let t of(delete e.resizer,this.eventsToUnbind&&this.eventsToUnbind.forEach(e=>e()),this.controlLine.destroy(),Object.keys(this)))this[t]=null}},a={minLength:"10%",maxLength:"100%",resize:{controlledAxis:{next:[],prev:[]},enabled:!1,cursor:"ns-resize",lineColor:"var(--highcharts-neutral-color-20)",lineDashStyle:"Solid",lineWidth:4,x:0,y:0}},{defaultOptions:l}=n();function d(){let e=this.resizer,t=this.options.resize;if(t){let s=!1!==t.enabled;e?s?e.init(this,!0):e.destroy():s&&(this.resizer=new h(this))}}function p(e){!e.keepEvents&&this.resizer&&this.resizer.destroy()}function c(e){this.chart.activeResizer||e.apply(this,[].slice.call(arguments,1))}function u(e){this.chart.activeResizer||e.apply(this,[].slice.call(arguments,1))}let f=n();({compose:function(e,t){e.keepProps.includes("resizer")||((0,r.merge)(!0,l.yAxis,a),e.keepProps.push("resizer"),(0,r.addEvent)(e,"afterRender",d),(0,r.addEvent)(e,"destroy",p),(0,r.wrap)(t.prototype,"runPointActions",u),(0,r.wrap)(t.prototype,"drag",c))}}).compose(f.Axis,f.Pointer);let x=n();return o.default})());