!/**
 * Highstock JS v11.4.0 (2024-03-04)
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2024 Daniel Studencki
 *
 * License: www.highcharts.com/license
 */function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/indicators/acceleration-bands",["highcharts","highcharts/modules/stock"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function o(t,e,o,i){t.hasOwnProperty(e)||(t[e]=i.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Stock/Indicators/MultipleLinesComposition.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var o,i=t.seriesTypes.sma.prototype,a=e.defined,n=e.error,r=e.merge;return function(t){var e=["bottomLine"],o=["top","bottom"],s=["top"];function p(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function l(t,e){var o=[];return(t.pointArrayMap||[]).forEach(function(t){t!==e&&o.push(p(t))}),o}function c(){var t,e=this,o=e.pointValKey,s=e.linesApiNames,c=e.areaLinesNames,h=e.points,u=e.options,f=e.graph,d={options:{gapSize:u.gapSize}},y=[],m=l(e,o),g=h.length;if(m.forEach(function(e,o){for(y[o]=[];g--;)t=h[g],y[o].push({x:t.x,plotX:t.plotX,plotY:t[e],isNull:!a(t[e])});g=h.length}),e.userOptions.fillColor&&c.length){var x=y[m.indexOf(p(c[0]))],v=1===c.length?h:y[m.indexOf(p(c[1]))],A=e.color;e.points=v,e.nextPoints=x,e.color=e.userOptions.fillColor,e.options=r(h,d),e.graph=e.area,e.fillGraph=!0,i.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=A}s.forEach(function(t,o){y[o]?(e.points=y[o],u[t]?e.options=r(u[t].styles,d):n('Error: "There is no '+t+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),e.graph=e["graph"+t],i.drawGraph.call(e),e["graph"+t]=e.graph):n('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=h,e.options=u,e.graph=f,i.drawGraph.call(e)}function h(t){var e,o=[],a=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((e=i.getGraphPath.call(this,this.nextPoints))&&e.length){e[0][0]="L",o=i.getGraphPath.call(this,t),a=e.slice(0,o.length);for(var n=a.length-1;n>=0;n--)o.push(a[n])}}else o=i.getGraphPath.apply(this,arguments);return o}function u(t){var e=[];return(this.pointArrayMap||[]).forEach(function(o){e.push(t[o])}),e}function f(){var t,e=this,o=this.pointArrayMap,a=[];a=l(this),i.translate.apply(this,arguments),this.points.forEach(function(i){o.forEach(function(o,n){t=i[o],e.dataModify&&(t=e.dataModify.modifyValue(t)),null!==t&&(i[a[n]]=e.yAxis.toPixels(t,!0))})})}t.compose=function(t){var i=t.prototype;return i.linesApiNames=i.linesApiNames||e.slice(),i.pointArrayMap=i.pointArrayMap||o.slice(),i.pointValKey=i.pointValKey||"top",i.areaLinesNames=i.areaLinesNames||s.slice(),i.drawGraph=c,i.getGraphPath=h,i.toYData=u,i.translate=f,t}}(o||(o={})),o}),o(e,"Stock/Indicators/ABands/ABandsIndicator.js",[e["Stock/Indicators/MultipleLinesComposition.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,o){var i,a=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=e.seriesTypes.sma,r=o.correctFloat,s=o.extend,p=o.merge,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.getValues=function(e,o){var i,a,n,s,p,l,c,h,u,f,d,y,m,g=o.period,x=o.factor,v=o.index,A=e.xData,C=e.yData,D=C?C.length:0,b=[],O=[],j=[],G=[],L=[];if(!(D<g)){for(m=0;m<=D;m++)m<D&&(i=C[m][2],c=r((a=C[m][1])-i)/(r(a+i)/2)*1e3*x,b.push(C[m][1]*r(1+2*c)),O.push(C[m][2]*r(1-2*c))),m>=g&&(d=A.slice(m-g,m),y=C.slice(m-g,m),u=t.prototype.getValues.call(this,{xData:d,yData:b.slice(m-g,m)},{period:g}),f=t.prototype.getValues.call(this,{xData:d,yData:O.slice(m-g,m)},{period:g}),l=(h=t.prototype.getValues.call(this,{xData:d,yData:y},{period:g,index:v})).xData[0],s=u.yData[0],p=f.yData[0],n=h.yData[0],j.push([l,s,n,p]),G.push(l),L.push([s,n,p]));return{values:j,xData:G,yData:L}}},e.defaultOptions=p(n.defaultOptions,{params:{period:20,factor:.001,index:3},lineWidth:1,topLine:{styles:{lineWidth:1}},bottomLine:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}}),e}(n);return s(l.prototype,{areaLinesNames:["top","bottom"],linesApiNames:["topLine","bottomLine"],nameBase:"Acceleration Bands",nameComponents:["period","factor"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"}),t.compose(l),e.registerSeriesType("abands",l),l}),o(e,"masters/indicators/acceleration-bands.src.js",[e["Core/Globals.js"]],function(t){return t})});