!/**
 * Highstock JS v13.0.0 (2026-06-11)
 * @module highcharts/indicators/keltner-channels
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Daniel Studencki
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/keltner-channels",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/keltner-channels"]=e(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,e){return function(){"use strict";var o,r,i={512:function(t){t.exports=e},944:function(e){e.exports=t}},n={};function a(t){var e=n[t];if(void 0!==e)return e.exports;var o=n[t]={exports:{}};return i[t](o,o.exports,a),o.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var s={};a.d(s,{default:function(){return g}});var p=a(944),l=a.n(p),h=a(512),c=a.n(h),u=c().seriesTypes.sma.prototype;!function(t){var e=["bottomLine"],o=["top","bottom"],r=["top"];function i(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function n(t,e){var o=[];return(t.pointArrayMap||[]).forEach(function(t){t!==e&&o.push(i(t))}),o}function a(){var t,e=this,o=e.pointValKey,r=e.linesApiNames,a=e.areaLinesNames,s=e.points,l=e.options,h=e.graph,c={options:{gapSize:l.gapSize}},f=[],d=n(e,o),y=s.length;if(d.forEach(function(e,o){for(f[o]=[];y--;)t=s[y],f[o].push({x:t.x,plotX:t.plotX,plotY:t[e],isNull:!(0,p.defined)(t[e])});y=s.length}),e.userOptions.fillColor&&a.length){var m=f[d.indexOf(i(a[0]))],g=1===a.length?s:f[d.indexOf(i(a[1]))],v=e.color;e.points=g,e.nextPoints=m,e.color=e.userOptions.fillColor,e.options=(0,p.merge)(s,c),e.graph=e.area,e.fillGraph=!0,u.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=v}r.forEach(function(t,o){f[o]?(e.points=f[o],l[t]?e.options=(0,p.merge)(l[t].styles,c):(0,p.error)('Error: "There is no '+t+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),e.graph=e["graph"+t],u.drawGraph.call(e),e["graph"+t]=e.graph):(0,p.error)('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=s,e.options=l,e.graph=h,u.drawGraph.call(e)}function s(t){var e,o=[],r=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((e=u.getGraphPath.call(this,this.nextPoints))&&e.length){e[0][0]="L",o=u.getGraphPath.call(this,t),r=e.slice(0,o.length);for(var i=r.length-1;i>=0;i--)o.push(r[i])}}else o=u.getGraphPath.apply(this,arguments);return o}function l(t){var e=[];return(this.pointArrayMap||[]).forEach(function(o){e.push(t[o])}),e}function h(){var t,e=this,o=this.pointArrayMap,r=[];r=n(this),u.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[r[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||r.slice(),i.drawGraph=a,i.getGraphPath=s,i.toYData=l,i.translate=h,t}}(r||(r={}));var f=r,d=(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),y=c().seriesTypes.sma,m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.init=function(){c().seriesTypes.sma.prototype.init.apply(this,arguments),this.options=(0,p.merge)({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},e.prototype.getValues=function(t,e){var o,r,i,n,a,s,l,h=e.period,u=e.periodATR,f=e.multiplierATR,d=e.index,y=t.yData,m=y?y.length:0,g=[],v=c().seriesTypes.ema.prototype.getValues(t,{period:h,index:d}),x=c().seriesTypes.atr.prototype.getValues(t,{period:u}),A=[],b=[];if(!(m<h)){for(l=h;l<=m;l++)a=v.values[l-h],s=x.values[l-u],n=a[0],r=(0,p.correctFloat)(a[1]+f*s[1]),i=(0,p.correctFloat)(a[1]-f*s[1]),o=a[1],g.push([n,r,o,i]),A.push(n),b.push([r,o,i]);return{values:g,xData:A,yData:b}}},e.defaultOptions=(0,p.merge)(y.defaultOptions,{params:{index:0,period:20,periodATR:10,multiplierATR:2},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1,lineColor:void 0}},tooltip:{pointFormat:'<span style="color:{point.color}">●</span><b> {series.name}</b><br/>Upper Channel: {point.top}<br/>EMA({series.options.params.period}): {point.middle}<br/>Lower Channel: {point.bottom}<br/>'},marker:{enabled:!1},dataGrouping:{approximation:"averages"},lineWidth:1}),e}(y);(0,p.extend)(m.prototype,{nameBase:"Keltner Channels",areaLinesNames:["top","bottom"],nameComponents:["period","periodATR","multiplierATR"],linesApiNames:["topLine","bottomLine"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"}),f.compose(m),c().registerSeriesType("keltnerchannels",m);var g=l();return s.default}()});