!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/stochastic
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Paweł Fus
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/stochastic",["highcharts/highcharts"],function(t){return r(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/stochastic"]=r(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=r(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,r){return function(){"use strict";var o,e,n={512:function(t){t.exports=r},944:function(r){r.exports=t}},i={};function a(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return n[t](o,o.exports,a),o.exports}a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,{a:r}),r},a.d=function(t,r){for(var o in r)a.o(r,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)};var s={};a.d(s,{default:function(){return N}});var p=a(944),l=a.n(p),c=function(t,r,o){return t.reduce(function(t,e){return[Math.min(t[0],e[r]),Math.max(t[1],e[o])]},[Number.MAX_VALUE,-Number.MAX_VALUE])},u=a(512),h=a.n(u),f=function(t,r,o){if(o||2==arguments.length)for(var e,n=0,i=r.length;n<i;n++)!e&&n in r||(e||(e=Array.prototype.slice.call(r,0,n)),e[n]=r[n]);return t.concat(e||Array.prototype.slice.call(r))};function y(t){return g(t)&&"number"==typeof t.nodeType}function d(t){var r=Object.prototype.toString.call(t);return"[object Array]"===r||"[object Array Iterator]"===r}function g(t,r){return!!t&&"object"==typeof t&&(!r||!d(t))}function m(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var e,n=f([t],r,!0),i={},a=function(t,r){return"object"!=typeof t&&(t={}),function(t,r,o){for(var e in t)Object.hasOwnProperty.call(t,e)&&r.call((0,t[e]),t[e],e,t)}(r,function(o,e){if("__proto__"!==e&&"constructor"!==e){var n;!g(o,!0)||(n=null==o?void 0:o.constructor,g(o,!0)&&!y(o)&&(null==n?void 0:n.name)&&"Object"!==n.name)||y(o)?t[e]=r[e]:t[e]=a(t[e]||{},o)}}),t};!0===t&&(i=n[1],n=Array.prototype.slice.call(n,2));var s=n.length;for(e=0;e<s;e++)i=a(i,n[e]);return i}l().doc,l().win,Array.prototype.find;var v=h().seriesTypes.sma.prototype;!function(t){var r=["bottomLine"],o=["top","bottom"],e=["top"];function n(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function i(t,r){var o=[];return(t.pointArrayMap||[]).forEach(function(t){t!==r&&o.push(n(t))}),o}function a(){var t,r=this,o=r.pointValKey,e=r.linesApiNames,a=r.areaLinesNames,s=r.points,l=r.options,c=r.graph,u={options:{gapSize:l.gapSize}},h=[],f=i(r,o),y=s.length;if(f.forEach(function(r,o){for(h[o]=[];y--;)t=s[y],h[o].push({x:t.x,plotX:t.plotX,plotY:t[r],isNull:null==t[r]});y=s.length}),r.userOptions.fillColor&&a.length){var d=h[f.indexOf(n(a[0]))],g=1===a.length?s:h[f.indexOf(n(a[1]))],A=r.color;r.points=g,r.nextPoints=d,r.color=r.userOptions.fillColor,r.options=m(s,u),r.graph=r.area,r.fillGraph=!0,v.drawGraph.call(r),r.area=r.graph,delete r.nextPoints,delete r.fillGraph,r.color=A}e.forEach(function(t,o){h[o]?(r.points=h[o],l[t]?r.options=m(l[t].styles,u):(0,p.error)('Error: "There is no '+t+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),r.graph=r["graph"+t],v.drawGraph.call(r),r["graph"+t]=r.graph):(0,p.error)('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),r.points=s,r.options=l,r.graph=c,v.drawGraph.call(r)}function s(t){var r,o=[],e=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((r=v.getGraphPath.call(this,this.nextPoints))&&r.length){r[0][0]="L",o=v.getGraphPath.call(this,t),e=r.slice(0,o.length);for(var n=e.length-1;n>=0;n--)o.push(e[n])}}else o=v.getGraphPath.apply(this,arguments);return o}function l(t){var r=[];return(this.pointArrayMap||[]).forEach(function(o){r.push(t[o])}),r}function c(){var t,r=this,o=this.pointArrayMap,e=[];e=i(this),v.translate.apply(this,arguments),this.points.forEach(function(n){o.forEach(function(o,i){t=n[o],r.dataModify&&(t=r.dataModify.modifyValue(t)),null!==t&&(n[e[i]]=r.yAxis.toPixels(t,!0))})})}t.compose=function(t){var n=t.prototype;return n.linesApiNames=n.linesApiNames||r.slice(),n.pointArrayMap=n.pointArrayMap||o.slice(),n.pointValKey=n.pointValKey||"top",n.areaLinesNames=n.areaLinesNames||e.slice(),n.drawGraph=a,n.getGraphPath=s,n.toYData=l,n.translate=c,t}}(e||(e={}));var A=e,b=(o=function(t,r){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])})(t,r)},function(t,r){function e(){this.constructor=t}o(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}),x=h().seriesTypes.sma,_=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return b(r,t),r.prototype.init=function(){t.prototype.init.apply(this,arguments),this.options=m({smoothedLine:{styles:{lineColor:this.color}}},this.options)},r.prototype.getValues=function(r,o){var e,n,i,a,s=o.periods[0],p=o.periods[1],l=r.xData,u=r.yData,h=u?u.length:0,f=[],y=[],g=[],m=null;if(!(h<s)&&d(u[0])&&4===u[0].length){var v=!0,A=0;for(a=s-1;a<h;a++){if(e=(i=c(u.slice(a-s+1,a+1),2,1))[0],isNaN(n=(u[a][3]-e)/(i[1]-e)*100)&&v){A++;continue}v&&!isNaN(n)&&(v=!1);var b=y.push(l[a]);isNaN(n)?g.push([g[b-2]&&"number"==typeof g[b-2][0]?g[b-2][0]:null,null]):g.push([n,null]),a>=A+(s-1)+(p-1)&&(m=t.prototype.getValues.call(this,{xData:y.slice(-p),yData:g.slice(-p)},{period:p}).yData[0]),f.push([l[a],n,m]),g[b-1][1]=m}return{values:f,xData:y,yData:g}}},r.defaultOptions=m(x.defaultOptions,{params:{index:void 0,period:void 0,periods:[14,3]},marker:{enabled:!1},tooltip:{pointFormat:'<span style="color:{point.color}">●</span><b> {series.name}</b><br/>%K: {point.y}<br/>%D: {point.smoothed}<br/>'},smoothedLine:{styles:{lineWidth:1,lineColor:void 0}},dataGrouping:{approximation:"averages"}}),r}(x);!function(t,r){var o;for(o in t||(t={}),r)t[o]=r[o]}(_.prototype,{areaLinesNames:[],nameComponents:["periods"],nameBase:"Stochastic",pointArrayMap:["y","smoothed"],parallelArrays:["x","y","smoothed"],pointValKey:"y",linesApiNames:["smoothedLine"]}),A.compose(_),h().registerSeriesType("stochastic",_);var N=l();return s.default}()});