!/**
 * 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(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts):"function"==typeof define&&define.amd?define("highcharts/modules/drag-panes",["highcharts/highcharts"],function(t){return e(t)}):"object"==typeof exports?exports["highcharts/modules/drag-panes"]=e(t._Highcharts):t.Highcharts=e(t.Highcharts)}("u"<typeof window?this:window,function(t){return function(){"use strict";var e={944:function(e){e.exports=t}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(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=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var n={};i.d(n,{default:function(){return v}});var r=i(944),s=i.n(r),a=function(){function t(t){this.init(t)}return t.prototype.init=function(t,e){this.axis=t,this.options=t.options.resize||{},this.render(),e||this.addMouseEvents()},t.prototype.render=function(){var t=this.axis,e=t.chart,o=this.options,i=o.x||0,n=o.y,s=(0,r.clamp)(t.top+t.height+n,e.plotTop,e.plotTop+e.plotHeight),a={};e.styledMode||(a={cursor:o.cursor,stroke:o.lineColor,"stroke-width":o.lineWidth,dashstyle:o.lineDashStyle}),this.lastPos=s-n,this.controlLine||(this.controlLine=e.renderer.path().addClass("highcharts-axis-resizer")),this.controlLine.add(t.axisGroup);var h=e.styledMode?this.controlLine.strokeWidth():o.lineWidth;a.d=e.renderer.crispLine([["M",t.left+i,s],["L",t.left+t.width+i,s]],h),this.controlLine.attr(a)},t.prototype.addMouseEvents=function(){var t,e,o,i=this,n=i.controlLine.element,s=i.axis.chart.container,a=[];i.mouseMoveHandler=t=function(t){return i.onMouseMove(t)},i.mouseUpHandler=e=function(t){return i.onMouseUp(t)},i.mouseDownHandler=o=function(){return i.onMouseDown()},a.push((0,r.addEvent)(s,"mousemove",t),(0,r.addEvent)(s.ownerDocument,"mouseup",e),(0,r.addEvent)(n,"mousedown",o),(0,r.addEvent)(s,"touchmove",t),(0,r.addEvent)(s.ownerDocument,"touchend",e),(0,r.addEvent)(n,"touchstart",o)),i.eventsToUnbind=a},t.prototype.onMouseMove=function(t){if(!t.touches||0!==t.touches[0].pageX){var e=this.axis.chart.pointer;this.grabbed&&e&&(this.hasDragged=!0,this.updateAxes(e.normalize(t).chartY-(this.options.y||0)))}},t.prototype.onMouseUp=function(t){var e=this.axis.chart.pointer;this.hasDragged&&e&&this.updateAxes(e.normalize(t).chartY-(this.options.y||0)),this.grabbed=this.hasDragged=this.axis.chart.activeResizer=void 0},t.prototype.onMouseDown=function(){var t;null==(t=this.axis.chart.pointer)||t.reset(!1,0),this.grabbed=this.axis.chart.activeResizer=!0},t.prototype.updateAxes=function(t){var e=this.axis.chart,o=this.options.controlledAxis,i=0===o.next.length?[e.yAxis.indexOf(this.axis)+1]:o.next,n=[this.axis].concat(o.prev),s=[],a=e.plotTop,h=e.plotHeight,u=a+h,c=function(t){return 100*t/h+"%"},d=function(t,e,o){return Math.round((0,r.clamp)(t,e,o))};t=(0,r.clamp)(t,a,u);var p=!1,l=t-this.lastPos;if(!(l*l<1)){for(var f=!0,v=0,g=[n,i];v<g.length;v++)for(var x=g[v],y=0;y<x.length;y++){var m=x[y],b=(0,r.isNumber)(m)?e.yAxis[m]:f?m:e.get(m),z=b&&b.options,M={},w=void 0,L=void 0;if(!z||z.isInternal){f=!1;continue}L=b.top;var E=Math.round((0,r.relativeLength)(z.minLength||NaN,h)),A=Math.round((0,r.relativeLength)(z.maxLength||NaN,h));if(f||x!==i)(w=d(t-L,E,A))===A&&(p=!0),t=L+w,s.push({axis:b,options:{height:c(w)}});else{if(l=t-this.lastPos,w=d(b.len-l,E,A),(L=b.top+l)+w>u){var D=u-w-L;t+=D,L+=D}L<a&&(L=a)+w>u&&(w=h),w===E&&(p=!0),s.push({axis:b,options:{top:c(L-a),height:c(w)}})}f=!1,M.height=w}if(!p){for(var H=0;H<s.length;H++){var P=s[H];P.axis.update(P.options,!1)}e.redraw(!1)}}},t.prototype.destroy=function(){var t=this.axis;delete t.resizer,this.eventsToUnbind&&this.eventsToUnbind.forEach(function(t){return t()}),this.controlLine.destroy();for(var e=0,o=Object.keys(this);e<o.length;e++)this[o[e]]=null},t}(),h={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}},u=s().defaultOptions;function c(){var t=this.resizer,e=this.options.resize;if(e){var o=!1!==e.enabled;t?o?t.init(this,!0):t.destroy():o&&(this.resizer=new a(this))}}function d(t){!t.keepEvents&&this.resizer&&this.resizer.destroy()}function p(t){this.chart.activeResizer||t.apply(this,[].slice.call(arguments,1))}function l(t){this.chart.activeResizer||t.apply(this,[].slice.call(arguments,1))}var f=s();({compose:function(t,e){t.keepProps.includes("resizer")||((0,r.merge)(!0,u.yAxis,h),t.keepProps.push("resizer"),(0,r.addEvent)(t,"afterRender",c),(0,r.addEvent)(t,"destroy",d),(0,r.wrap)(e.prototype,"runPointActions",l),(0,r.wrap)(e.prototype,"drag",p))}}).compose(f.Axis,f.Pointer);var v=s();return n.default}()});