!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @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 r,o,n={512:function(t){t.exports=e},944:function(e){e.exports=t}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,a),r.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 r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var p={};a.d(p,{default:function(){return O}});var s=a(944),l=a.n(s),c=a(512),u=a.n(c),h=function(t,e,r){if(r||2==arguments.length)for(var o,n=0,i=e.length;n<i;n++)!o&&n in e||(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))};function f(t,e){return t>1e14?t:parseFloat(t.toPrecision(e||14))}function y(t){return d(t)&&"number"==typeof t.nodeType}function d(t,e){var r;return!!t&&"object"==typeof t&&(!e||"[object Array]"!==(r=Object.prototype.toString.call(t))&&"[object Array Iterator]"!==r)}function m(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o,n=h([t],e,!0),i={},a=function(t,e){return"object"!=typeof t&&(t={}),function(t,e,r){for(var o in t)Object.hasOwnProperty.call(t,o)&&e.call((0,t[o]),t[o],o,t)}(e,function(r,o){if("__proto__"!==o&&"constructor"!==o){var n;!d(r,!0)||(n=null==r?void 0:r.constructor,d(r,!0)&&!y(r)&&(null==n?void 0:n.name)&&"Object"!==n.name)||y(r)?t[o]=e[o]:t[o]=a(t[o]||{},r)}}),t};!0===t&&(i=n[1],n=Array.prototype.slice.call(n,2));var p=n.length;for(o=0;o<p;o++)i=a(i,n[o]);return i}l().doc,l().win,Array.prototype.find;var g=u().seriesTypes.sma.prototype;!function(t){var e=["bottomLine"],r=["top","bottom"],o=["top"];function n(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function i(t,e){var r=[];return(t.pointArrayMap||[]).forEach(function(t){t!==e&&r.push(n(t))}),r}function a(){var t,e=this,r=e.pointValKey,o=e.linesApiNames,a=e.areaLinesNames,p=e.points,l=e.options,c=e.graph,u={options:{gapSize:l.gapSize}},h=[],f=i(e,r),y=p.length;if(f.forEach(function(e,r){for(h[r]=[];y--;)t=p[y],h[r].push({x:t.x,plotX:t.plotX,plotY:t[e],isNull:null==t[e]});y=p.length}),e.userOptions.fillColor&&a.length){var d=h[f.indexOf(n(a[0]))],v=1===a.length?p:h[f.indexOf(n(a[1]))],b=e.color;e.points=v,e.nextPoints=d,e.color=e.userOptions.fillColor,e.options=m(p,u),e.graph=e.area,e.fillGraph=!0,g.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=b}o.forEach(function(t,r){h[r]?(e.points=h[r],l[t]?e.options=m(l[t].styles,u):(0,s.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],g.drawGraph.call(e),e["graph"+t]=e.graph):(0,s.error)('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=p,e.options=l,e.graph=c,g.drawGraph.call(e)}function p(t){var e,r=[],o=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((e=g.getGraphPath.call(this,this.nextPoints))&&e.length){e[0][0]="L",r=g.getGraphPath.call(this,t),o=e.slice(0,r.length);for(var n=o.length-1;n>=0;n--)r.push(o[n])}}else r=g.getGraphPath.apply(this,arguments);return r}function l(t){var e=[];return(this.pointArrayMap||[]).forEach(function(r){e.push(t[r])}),e}function c(){var t,e=this,r=this.pointArrayMap,o=[];o=i(this),g.translate.apply(this,arguments),this.points.forEach(function(n){r.forEach(function(r,i){t=n[r],e.dataModify&&(t=e.dataModify.modifyValue(t)),null!==t&&(n[o[i]]=e.yAxis.toPixels(t,!0))})})}t.compose=function(t){var n=t.prototype;return n.linesApiNames=n.linesApiNames||e.slice(),n.pointArrayMap=n.pointArrayMap||r.slice(),n.pointValKey=n.pointValKey||"top",n.areaLinesNames=n.areaLinesNames||o.slice(),n.drawGraph=a,n.getGraphPath=p,n.toYData=l,n.translate=c,t}}(o||(o={}));var v=o,b=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),A=u().seriesTypes.sma,x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return b(e,t),e.prototype.init=function(){u().seriesTypes.sma.prototype.init.apply(this,arguments),this.options=m({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},e.prototype.getValues=function(t,e){var r,o,n,i,a,p,s,l=e.period,c=e.periodATR,h=e.multiplierATR,y=e.index,d=t.yData,m=d?d.length:0,g=[],v=u().seriesTypes.ema.prototype.getValues(t,{period:l,index:y}),b=u().seriesTypes.atr.prototype.getValues(t,{period:c}),A=[],x=[];if(!(m<l)){for(s=l;s<=m;s++)a=v.values[s-l],p=b.values[s-c],i=a[0],o=f(a[1]+h*p[1]),n=f(a[1]-h*p[1]),r=a[1],g.push([i,o,r,n]),A.push(i),x.push([o,r,n]);return{values:g,xData:A,yData:x}}},e.defaultOptions=m(A.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}(A);!function(t,e){var r;for(r in t||(t={}),e)t[r]=e[r]}(x.prototype,{nameBase:"Keltner Channels",areaLinesNames:["top","bottom"],nameComponents:["period","periodATR","multiplierATR"],linesApiNames:["topLine","bottomLine"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"}),v.compose(x),u().registerSeriesType("keltnerchannels",x);var O=l();return p.default}()});