/**
 * Highstock JS v11.3.0 (2024-01-10)
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2024 Wojciech Chmiel
 *
 * 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/ao",["highcharts","highcharts/modules/stock"],function(o){return t(o),t.Highcharts=o,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var o=t?t._modules:{};function r(t,o,r,e){t.hasOwnProperty(o)||(t[o]=e.apply(null,r),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:o,module:t[o]}})))}r(o,"Stock/Indicators/AO/AOIndicator.js",[o["Core/Globals.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(t,o,r){var e,n=this&&this.__extends||(e=function(t,o){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),i=t.noop,s=o.seriesTypes,a=s.column.prototype,c=s.sma,l=r.extend,u=r.merge,p=r.correctFloat,d=r.isArray,h=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return n(o,t),o.prototype.drawGraph=function(){var t,o=this.options,r=this.points,e=this.userOptions.color,n=o.greaterBarColor,i=o.lowerBarColor,s=r[0];if(!e&&s)for(t=1,s.color=n;t<r.length;t++)r[t].y>r[t-1].y?r[t].color=n:r[t].y<r[t-1].y?r[t].color=i:r[t].color=r[t-1].color},o.prototype.getValues=function(t){var o,r,e,n,i,s,a=t.xData||[],c=t.yData||[],l=c.length,u=[],h=[],f=[],y=0,g=0;if(!(a.length<=34)&&d(c[0])&&4===c[0].length){for(i=0;i<33;i++)n=(c[i][1]+c[i][2])/2,i>=29&&(g=p(g+n)),y=p(y+n);for(s=33;s<l;s++)g=p(g+(n=(c[s][1]+c[s][2])/2)),y=p(y+n),o=p(g/5-y/34),u.push([a[s],o]),h.push(a[s]),f.push(o),r=s+1-5,e=s+1-34,g=p(g-(c[r][1]+c[r][2])/2),y=p(y-(c[e][1]+c[e][2])/2);return{values:u,xData:h,yData:f}}},o.defaultOptions=u(c.defaultOptions,{params:{index:void 0,period:void 0},greaterBarColor:"#06b535",lowerBarColor:"#f21313",threshold:0,groupPadding:.2,pointPadding:.2,crisp:!1,states:{hover:{halo:{size:0}}}}),o}(c);return l(h.prototype,{nameBase:"AO",nameComponents:void 0,markerAttribs:i,getColumnMetrics:a.getColumnMetrics,crispCol:a.crispCol,translate:a.translate,drawPoints:a.drawPoints}),o.registerSeriesType("ao",h),h}),r(o,"masters/indicators/ao.src.js",[],function(){})});