/** * Highcharts JS v11.2.0 (2023-10-30) * * (c) 2009-2021 Torstein Honsi * * License: www.highcharts.com/license */!function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/draggable-points",["highcharts"],function(r){return e(r),e.Highcharts=r,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var r=e?e._modules:{};function t(e,r,t,a){e.hasOwnProperty(r)||(e[r]=a.apply(null,t),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:r,module:e[r]}})))}t(r,"Extensions/DraggablePoints/DragDropUtilities.js",[r["Core/Utilities.js"]],function(e){var r=e.addEvent;return{addEvents:function(e,t,a,o){var i=t.map(function(t){return r(e,t,a,o)});return function(){for(var e=0;ea)),f.draggedPastSensitivity&&(f.newPoints=function(e,r){var t=e.point,a=t.series,o=a.chart,i=h(a.options.dragDrop,t.options.dragDrop),n={},s=e.updateProp,d={},g=t.series.dragDropProps;for(var p in g){var l=g[p];(!s||s===p&&l.resize&&(!l.optionName||!1!==i[l.optionName]))&&(s||l.move&&("x"===l.axis&&i.draggableX||"y"===l.axis&&i.draggableY))&&(o.mapView?n["x"===p?"lon":"lat"]=l:n[p]=l)}for(var u=0,c=s?[t]:e.groupedPoints;u=d)?(o=e.attr("height"),e.attr({height:Math.max(0,Math.round(o+(n?n-s-o:0)))})):e.attr({y:Math.round(s+(n?n-s:0))})},resizeSide:function(e,r){var a=r.series.chart.dragHandles,o=e.y>=(r.series.options.threshold||0)?"top":"bottom",i=t(o);return a&&a[i]&&(a[i].destroy(),delete a[i]),o},handlePositioner:function(e){var r=e.shapeArgs||e.graphic&&e.graphic.getBBox()||{},t=e.series.yAxis.reversed,a=e.series.options.threshold||0,o=e.y||0;return{x:r.x||0,y:!t&&o>=a||t&&o=r.low}},median:{axis:"y",move:!0},q3:{optionName:"draggableQ3",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(e){return{x:e.shapeArgs.x||0,y:e.q3Plot}},handleFormatter:s.y.handleFormatter,propValidate:function(e,r){return e<=r.high&&e>=r.median}},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(e){return{x:e.shapeArgs.x||0,y:e.highPlot}},handleFormatter:s.y.handleFormatter,propValidate:function(e,r){return e>=r.q3}}},g={x:s.x,y:s.y,target:{optionName:"draggableTarget",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(e){var r=e.targetGraphic.getBBox();return{x:e.barX,y:r.y+r.height/2}},handleFormatter:s.y.handleFormatter}},p={x:s.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(e){return{x:e.shapeArgs.x,y:e.plotLow}},handleFormatter:s.y.handleFormatter,propValidate:function(e,r){return e<=r.open&&e<=r.close}},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(e){return{x:e.shapeArgs.x,y:e.plotHigh}},handleFormatter:s.y.handleFormatter,propValidate:function(e,r){return e>=r.open&&e>=r.close}},open:{optionName:"draggableOpen",axis:"y",move:!0,resize:!0,resizeSide:function(e){return e.open>=e.close?"top":"bottom"},handlePositioner:function(e){return{x:e.shapeArgs.x,y:e.plotOpen}},handleFormatter:s.y.handleFormatter,propValidate:function(e,r){return e<=r.high&&e>=r.low}},close:{optionName:"draggableClose",axis:"y",move:!0,resize:!0,resizeSide:function(e){return e.open>=e.close?"bottom":"top"},handlePositioner:function(e){return{x:e.shapeArgs.x,y:e.plotClose}},handleFormatter:s.y.handleFormatter,propValidate:function(e,r){return e<=r.high&&e>=r.low}}},l={x:s.x,y:o(s.y,{handleFormatter:function(e){return e.isSum||e.isIntermediateSum?null:s.y.handleFormatter(e)}})},h={x:{axis:"x",move:!0},low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(e){var r=e.shapeArgs||e.graphic.getBBox();return{x:r.x||0,y:(r.y||0)+(r.height||0)}},handleFormatter:s.y.handleFormatter,propValidate:function(e,r){return e<=r.high}},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(e){var r=e.shapeArgs||e.graphic.getBBox();return{x:r.x||0,y:r.y||0}},handleFormatter:s.y.handleFormatter,propValidate:function(e,r){return e>=r.low}}},u={x:h.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(e){var r=e.graphics&&e.graphics[0]&&e.graphics[0].getBBox();return r?{x:r.x+r.width/2,y:r.y+r.height/2}:{x:-999,y:-999}},handleFormatter:x,propValidate:h.low.propValidate},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(e){var r=e.graphics&&e.graphics[1]&&e.graphics[1].getBBox();return r?{x:r.x+r.width/2,y:r.y+r.height/2}:{x:-999,y:-999}},handleFormatter:x,propValidate:h.high.propValidate}},c={y:{axis:"y",move:!0},x:{optionName:"draggableX1",axis:"x",move:!0,resize:!0,resizeSide:"left",handlePositioner:function(e){return f(e,"x")},handleFormatter:m,propValidate:function(e,r){return e<=r.x2}},x2:{optionName:"draggableX2",axis:"x",move:!0,resize:!0,resizeSide:"right",handlePositioner:function(e){return f(e,"x2")},handleFormatter:m,propValidate:function(e,r){return e>=r.x}}};function x(e){var r=e.graphic?e.graphic.getBBox().width/2+1:4;return[["M",0-r,0],["a",r,r,0,1,0,2*r,0],["a",r,r,0,1,0,-2*r,0]]}function m(e){var r=e.shapeArgs||e.graphic.getBBox(),t=r.r||0,a=r.height-t,o=r.height/2;return[["M",0,t],["L",0,o-5],["A",1,1,0,0,0,0,o+5],["A",1,1,0,0,0,0,o-5],["M",0,o+5],["L",0,a]]}function f(e,r){var t=e.series,a=t.xAxis,o=t.yAxis,i=t.chart.inverted,n=t.columnMetrics?t.columnMetrics.offset:-e.shapeArgs.height/2,s=a.toPixels(e[r],!0),d=o.toPixels(e.y,!0);return i&&(s=a.len-s,d=o.len-d),{x:Math.round(s),y:Math.round(d+=n)}}return{arearange:u,boxplot:d,bullet:g,column:s,columnrange:h,flags:n,gantt:{y:c.y,start:o(c.x,{optionName:"draggableStart",validateIndividualDrag:function(e){return!e.milestone}}),end:o(c.x2,{optionName:"draggableEnd",validateIndividualDrag:function(e){return!e.milestone}})},line:n,ohlc:p,waterfall:l,xrange:c}}),t(r,"Extensions/DraggablePoints/DraggablePoints.js",[r["Extensions/DraggablePoints/DragDropUtilities.js"],r["Extensions/DraggablePoints/DraggableChart.js"],r["Extensions/DraggablePoints/DragDropDefaults.js"],r["Extensions/DraggablePoints/DragDropProps.js"],r["Core/Utilities.js"]],function(e,r,t,a,o){var i=e.addEvents,n=e.getNormalizedEvent,s=r.initDragDrop,d=o.addEvent,g=o.clamp,p=o.isNumber,l=o.merge,h=o.pick,u=o.pushUnique,c=[];function x(e){var r=e.series&&e.series.chart,t=r&&r.dragDropData;r&&r.dragHandles&&!(t&&(t.isDragging&&t.draggedPastSensitivity||t.isHoveringHandle===e.id))&&r.hideDragHandles()}function m(){var e=this;setTimeout(function(){e.series&&x(e)},10)}function f(){var e=this;setTimeout(function(){var r,t,a,o;return a=(t=(r=e.series)&&r.chart)&&t.dragDropData,o=t&&t.is3d&&t.is3d(),void(!t||a&&a.isDragging&&a.draggedPastSensitivity||t.isDragDropAnimating||!r.options.dragDrop||o||(t.dragHandles&&t.hideDragHandles(),e.showDragHandles()))},12)}function v(){var e=this.series.chart,r=e.dragHandles;r&&r.point===this.id&&e.hideDragHandles()}function D(e,r,t){for(var a=this.series,o=a.chart,i=o.mapView,n=l(a.options.dragDrop,this.options.dragDrop),s={},d=e.points[this.id],u=1===Object.keys(t).length,c=0,x=Object.keys(t);ci.projection.maxLatitude)&&(p=i.projection.maxLatitude),(isNaN(l)||l<-1*i.projection.maxLatitude)&&(l=-1*i.projection.maxLatitude);var c=l;l=p,p=c}if(!i.projection.hasCoordinates){var x=i.pixelsToLonLat({x:e.chartX-o.plotLeft,y:o.plotHeight-e.chartY+o.plotTop});x&&(u=x[t])}return a&&(u=Math.round(u/a)*a),g(u,p,l)}}(r,f.axis.toUpperCase(),m):function(e,r){var t=a[r.toLowerCase()+"Axis"].categories?1:0,o=h(n["dragPrecision"+r],t),i=h(n["dragMin"+r],-1/0),s=h(n["dragMax"+r],1/0),d=e;return o&&(d=Math.round(d/o)*o),g(d,i,s)}(D.toValue((D.horiz?r.chartX:r.chartY)+d[m+"Offset"]),f.axis.toUpperCase());p(y)&&!(u&&f.propValidate&&!f.propValidate(y,this))&&void 0!==v&&(s[m]=y)}return s}function y(){for(var e=this,r=e.series,a=r.chart,o=a.inverted,g=a.renderer,p=l(r.options.dragDrop,e.options.dragDrop),h=r.dragDropProps||{},u=a.dragHandles,c=function(c){var m=h[c],f=l(t.dragHandle,m.handleOptions,p.dragHandle),v={class:f.className,"stroke-width":f.lineWidth,fill:f.color,stroke:f.lineColor},D=f.pathFormatter||m.handleFormatter,y=m.handlePositioner,P=!m.validateIndividualDrag||m.validateIndividualDrag(e),b=void 0,w=void 0,z=void 0;if(m.resize&&P&&m.resizeSide&&D&&(p["draggable"+m.axis.toUpperCase()]||p[m.optionName])&&!1!==p[m.optionName]){u?u.point=e.id:u=a.dragHandles={group:g.g("drag-drop-handles").add(r.markerGroup||r.group),point:e.id},b=y(e),v.d=z=D(e);var A=e.series.xAxis.categories?-.5:0;if(!z||b.x