/**
 * Highstock JS v11.3.0 (2024-01-10)
 *
 * Parabolic SAR Indicator for Highcharts Stock
 *
 * (c) 2010-2024 Grzegorz Blachliński
 *
 * 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/psar",["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 n(t,e,n,o){t.hasOwnProperty(e)||(t[e]=o.apply(null,n),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}n(e,"Stock/Indicators/PSAR/PSARIndicator.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(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}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=t.seriesTypes.sma,r=e.merge;function a(t,e){return parseFloat(t.toFixed(e))}var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.nameComponents=void 0,e}return o(e,t),e.prototype.getValues=function(t,e){var n,o,i,r,s,c,u,l,p,h,d,f,m,y,v,g,x,_,A,j,F,O,w,M,S,C=t.xData,P=t.yData,b=e.maxAccelerationFactor,D=e.increment,E=e.initialAccelerationFactor,H=e.decimals,k=e.index,R=[],T=[],I=[],W=e.initialAccelerationFactor,L=P[0][1],U=1,V=P[0][2];if(!(k>=P.length)){for(S=0;S<k;S++)L=Math.max(P[S][1],L),V=Math.min(P[S][2],a(V,H));for(y=P[S][1]>V?1:-1,v=L-V,g=(W=e.initialAccelerationFactor)*v,R.push([C[k],V]),T.push(C[k]),I.push(a(V,H)),S=k+1;S<P.length;S++)_=P[S-1][2],A=P[S-2][2],j=P[S-1][1],F=P[S-2][1],w=P[S][1],M=P[S][2],null!==A&&null!==F&&null!==_&&null!==j&&null!==w&&null!==M&&(n=y,o=U,i=V,r=g,s=L,V=n===o?1===n?i+r<Math.min(A,_)?i+r:Math.min(A,_):i+r>Math.max(F,j)?i+r:Math.max(F,j):s,h=y,d=L,O=1===h?w>d?w:d:M<d?M:d,f=U,m=V,c=x=1===f&&M>m||-1===f&&w>m?1:-1,u=y,l=L,p=W,g=(W=c===u?1===c&&O>l||-1===c&&O<l?p===b?b:a(p+D,2):p:E)*(v=O-V),R.push([C[S],a(V,H)]),T.push(C[S]),I.push(a(V,H)),U=y,y=x,L=O);return{values:R,xData:T,yData:I}}},e.defaultOptions=r(i.defaultOptions,{lineWidth:0,marker:{enabled:!0},states:{hover:{lineWidthPlus:0}},params:{period:void 0,initialAccelerationFactor:.02,maxAccelerationFactor:.2,increment:.02,index:2,decimals:4}}),e}(i);return t.registerSeriesType("psar",s),s}),n(e,"masters/indicators/psar.src.js",[],function(){})});