text: "use strict";!function(o){"object"==typeof module&&module.exports?module.exports=o.default=o:"function"==typeof define&&define.amd?define("highcharts/indicators/price-envelopes",["highcharts","highcharts/modules/stock"],function(t){return o(t),o.Highcharts=t,o}):o("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){var o=t?t._modules:{};function e(t,o,e,i){t.hasOwnProperty(o)||(t[o]=i.apply(null,e))}e(o,"indicators/price-envelopes.src.js",[o["parts/Globals.js"],o["parts/Utilities.js"]],function(t,o){var v=o.isArray,r=t.merge,x=t.seriesTypes.sma;t.seriesType("priceenvelopes","sma",{marker:{enabled:!1},tooltip:{pointFormat:'<span style="color:{point.color}">●</span><b> {series.name}</b><br/>Top: {point.top}<br/>Middle: {point.middle}<br/>Bottom: {point.bottom}<br/>'},params:{period:20,topBand:.1,bottomBand:.1},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}},{nameComponents:["period","topBand","bottomBand"],nameBase:"Price envelopes",pointArrayMap:["top","middle","bottom"],parallelArrays:["x","y","top","bottom"],pointValKey:"middle",init:function(){x.prototype.init.apply(this,arguments),this.options=r({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},toYData:function(t){return[t.top,t.middle,t.bottom]},translate:function(){var i=this,p=["plotTop","plotMiddle","plotBottom"];x.prototype.translate.apply(i),i.points.forEach(function(e){[e.top,e.middle,e.bottom].forEach(function(t,o){null!==t&&(e[p[o]]=i.yAxis.toPixels(t,!0))})})},drawGraph:function(){for(var t,e=this,o=e.points,i=o.length,p=e.options,n=e.graph,a={options:{gapSize:p.gapSize}},s=[[],[]];i--;)t=o[i],s[0].push({plotX:t.plotX,plotY:t.plotTop,isNull:t.isNull}),s[1].push({plotX:t.plotX,plotY:t.plotBottom,isNull:t.isNull});["topLine","bottomLine"].forEach(function(t,o){e.points=s[o],e.options=r(p[t].styles,a),e.graph=e["graph"+t],x.prototype.drawGraph.call(e),e["graph"+t]=e.graph}),e.points=o,e.options=p,e.graph=n,x.prototype.drawGraph.call(e)},getValues:function(t,o){var e,i,p,n,a,s,r,l,d=o.period,h=o.topBand,c=o.bottomBand,u=t.xData,m=t.yData,y=m?m.length:0,f=[],g=[],b=[];if(u.length<d||!v(m[0])||4!==m[0].length)return!1;for(l=d;l<=y;l++)a=u.slice(l-d,l),s=m.slice(l-d,l),n=(r=x.prototype.getValues.call(this,{xData:a,yData:s},o)).xData[0],i=(e=r.yData[0])*(1+h),p=e*(1-c),f.push([n,i,e,p]),g.push(n),b.push([i,e,p]);return{values:f,xData:g,yData:b}}})}),e(o,"masters/indicators/price-envelopes.src.js",[],function(){})});