!/**
 * Highstock JS v12.5.0 (2026-01-12)
 * @module highcharts/indicators/price-channel
 * @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(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/price-channel",["highcharts/highcharts"],function(e){return t(e,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/price-channel"]=t(e._Highcharts,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(e,t)=>(()=>{"use strict";var i,r={512:e=>{e.exports=t},944:t=>{t.exports=e}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};o.d(n,{default:()=>v});var s=o(944),p=o.n(s);let l=function(e,t,i){return e.reduce((e,r)=>[Math.min(e[0],r[t]),Math.max(e[1],r[i])],[Number.MAX_VALUE,-Number.MAX_VALUE])};var h=o(512),c=o.n(h);let{sma:{prototype:u}}=c().seriesTypes,{defined:f,error:d,merge:g}=p();!function(e){let t=["bottomLine"],i=["top","bottom"],r=["top"];function a(e){return"plot"+e.charAt(0).toUpperCase()+e.slice(1)}function o(e,t){let i=[];return(e.pointArrayMap||[]).forEach(e=>{e!==t&&i.push(a(e))}),i}function n(){let e=this,t=e.pointValKey,i=e.linesApiNames,r=e.areaLinesNames,n=e.points,s=e.options,p=e.graph,l={options:{gapSize:s.gapSize}},h=[],c=o(e,t),y=n.length,m;if(c.forEach((e,t)=>{for(h[t]=[];y--;)m=n[y],h[t].push({x:m.x,plotX:m.plotX,plotY:m[e],isNull:!f(m[e])});y=n.length}),e.userOptions.fillColor&&r.length){let t=h[c.indexOf(a(r[0]))],i=1===r.length?n:h[c.indexOf(a(r[1]))],o=e.color;e.points=i,e.nextPoints=t,e.color=e.userOptions.fillColor,e.options=g(n,l),e.graph=e.area,e.fillGraph=!0,u.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=o}i.forEach((t,i)=>{h[i]?(e.points=h[i],s[t]?e.options=g(s[t].styles,l):d('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):d('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=n,e.options=s,e.graph=p,u.drawGraph.call(e)}function s(e){let t,i=[],r=[];if(e=e||this.points,this.fillGraph&&this.nextPoints){if((t=u.getGraphPath.call(this,this.nextPoints))&&t.length){t[0][0]="L",i=u.getGraphPath.call(this,e),r=t.slice(0,i.length);for(let e=r.length-1;e>=0;e--)i.push(r[e])}}else i=u.getGraphPath.apply(this,arguments);return i}function p(e){let t=[];return(this.pointArrayMap||[]).forEach(i=>{t.push(e[i])}),t}function l(){let e=this.pointArrayMap,t=[],i;t=o(this),u.translate.apply(this,arguments),this.points.forEach(r=>{e.forEach((e,a)=>{i=r[e],this.dataModify&&(i=this.dataModify.modifyValue(i)),null!==i&&(r[t[a]]=this.yAxis.toPixels(i,!0))})})}e.compose=function(e){let a=e.prototype;return a.linesApiNames=a.linesApiNames||t.slice(),a.pointArrayMap=a.pointArrayMap||i.slice(),a.pointValKey=a.pointValKey||"top",a.areaLinesNames=a.areaLinesNames||r.slice(),a.drawGraph=n,a.getGraphPath=s,a.toYData=p,a.translate=l,e}}(i||(i={}));let y=i,{sma:m}=c().seriesTypes,{merge:x,extend:A}=p();class b extends m{getValues(e,t){let i,r,a,o,n,s,p=t.period,h=e.xData,c=e.yData,u=c?c.length:0,f=[],d=[],g=[];if(!(u<p)){for(s=p;s<=u;s++)o=h[s-1],i=((r=(n=l(c.slice(s-p,s),2,1))[1])+(a=n[0]))/2,f.push([o,r,i,a]),d.push(o),g.push([r,i,a]);return{values:f,xData:d,yData:g}}}}b.defaultOptions=x(m.defaultOptions,{params:{index:void 0,period:20},lineWidth:1,topLine:{styles:{lineColor:"#00e272",lineWidth:1}},bottomLine:{styles:{lineColor:"#feb56a",lineWidth:1}},dataGrouping:{approximation:"averages"}}),A(b.prototype,{areaLinesNames:["top","bottom"],nameBase:"Price Channel",nameComponents:["period"],linesApiNames:["topLine","bottomLine"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"}),y.compose(b),c().registerSeriesType("pc",b);let v=p();return n.default})());