text: ﻿/*!
      *
      * Wijmo Library 5.20213.824
      * http://wijmo.com/
      *
      * Copyright(c) GrapeCity, Inc.  All rights reserved.
      *
      * Licensed under the GrapeCity Commercial License.
      * sales@wijmo.com
      * wijmo.com/products/wijmo-5/license/
      *
      */
  
  var wijmo,__extends=this&&this.__extends||function(){var extendStatics=function(t,i){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)};return function(t,i){extendStatics(t,i);function __(){this.constructor=t}t.prototype=null===i?Object.create(i):(__.prototype=i.prototype,new __)}}();!function(t){!function(i){!function(i){!function(i){"use strict";function isValid(i){return isFinite(i)&&!isNaN(i)&&t.isNumber(i)}var e=function(i){__extends(Fibonacci,i);function Fibonacci(e){var a=i.call(this)||this;a._levels=[0,23.6,38.2,50,61.8,100];a._uptrend=!0;a._labelPosition=t.chart.LabelPosition.Left;a.rendering.addHandler(a._render);a.initialize(e);return a}Object.defineProperty(Fibonacci.prototype,"low",{get:function(){return this._low},set:function(i){if(i!=this._low){this._low=t.asNumber(i,!0);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Fibonacci.prototype,"high",{get:function(){return this._high},set:function(i){if(i!=this._high){this._high=t.asNumber(i,!0);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Fibonacci.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(i){if((i=t.asEnum(i,t.chart.LabelPosition,!0))!=this._labelPosition){this._labelPosition=i;this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Fibonacci.prototype,"uptrend",{get:function(){return this._uptrend},set:function(i){if(i!=this._uptrend){this._uptrend=t.asBoolean(i,!0);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Fibonacci.prototype,"levels",{get:function(){return this._levels},set:function(i){if(i!=this._levels){this._levels=t.asArray(i,!0);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Fibonacci.prototype,"minX",{get:function(){return this._minX},set:function(t){if(t!=this._minX){this._minX=t;this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Fibonacci.prototype,"maxX",{get:function(){return this._maxX},set:function(t){if(t!=this._maxX){this._maxX=t;this._invalidate()}},enumerable:!0,configurable:!0});Fibonacci.prototype._getMinX=function(){return t.isNumber(this._minX)?this._minX:t.isDate(this._minX)?t.asDate(this._minX).valueOf():this._getAxisX().actualMin};Fibonacci.prototype._getMaxX=function(){return t.isNumber(this._maxX)?this._maxX:t.isDate(this._maxX)?t.asDate(this._maxX).valueOf():this._getAxisX().actualMax};Fibonacci.prototype._updateLevels=function(){var t=void 0,e=void 0;if(void 0===this._low||void 0===this._high){var a=i.prototype.getValues.call(this,0),s=i.prototype.getValues.call(this,1);if(a)for(var n=a.length,r=this._getMinX(),l=this._getMaxX(),o=0;o<n;o++){var h=a[o],c=s?s[o]:o;if(!(c<r||c>l)&&!isNaN(h)){(void 0===t||t>h)&&(t=h);(void 0===e||e<h)&&(e=h)}}}void 0===this._low&&void 0!==t?this._actualLow=t:this._actualLow=this._low;void 0===this._high&&void 0!==e?this._actualHigh=e:this._actualHigh=this._high};Fibonacci.prototype._render=function(i,e){e.cancel=!0;var a=i;a._updateLevels();var s=a._getAxisX(),n=a._getAxisY(),r=e.engine,l=a._getSymbolStroke(a._chart.series.indexOf(a)),o=t.chart._BasePlotter.cloneStyle(a.style,["fill"]),h=t.chart._BasePlotter.cloneStyle(a.style,["stroke"]),c=a.chart._plotrectId;r.stroke=l;r.strokeWidth=2;r.textFill=l;var u=a._getMinX(),_=a._getMaxX();u<s.actualMin&&(u=s.actualMin);_>s.actualMax&&(_=s.actualMax);r.startGroup(null,c);for(var d=a._levels?a._levels.length:0,p=0;p<d;p++){var f=a._levels[p],g=s.convert(u),y=s.convert(_),m=a.uptrend?n.convert(a._actualLow+.01*f*(a._actualHigh-a._actualLow)):n.convert(a._actualHigh-.01*f*(a._actualHigh-a._actualLow));if(t.chart._DataInfo.isValid(g)&&t.chart._DataInfo.isValid(y)&&t.chart._DataInfo.isValid(m)){r.drawLine(g,m,y,m,null,o);if(a.labelPosition!=t.chart.LabelPosition.None){var v=f.toFixed(1)+"%",V=0;(a.uptrend&&0==p||!a.uptrend&&p==d-1)&&(V=2);switch(a.labelPosition){case t.chart.LabelPosition.Left:t.chart.FlexChartCore._renderText(r,v,new t.Point(g,m),0,V,null,null,h);break;case t.chart.LabelPosition.Center:t.chart.FlexChartCore._renderText(r,v,new t.Point(.5*(g+y),m),1,V,null,null,h);break;case t.chart.LabelPosition.Right:t.chart.FlexChartCore._renderText(r,v,new t.Point(y,m),2,V,null,null,h)}}}}r.stroke=null;r.strokeWidth=null;r.textFill=null;r.endGroup()};Fibonacci.prototype._getChartType=function(){return t.chart.ChartType.Line};return Fibonacci}(t.chart.SeriesBase);i.Fibonacci=e;var a=function(i){__extends(FibonacciArcs,i);function FibonacciArcs(e){var a=i.call(this)||this;a._levels=[38.2,50,61.8];a._labelPosition=t.chart.LabelPosition.Top;a.rendering.addHandler(a._render,a);a.initialize(e);return a}Object.defineProperty(FibonacciArcs.prototype,"start",{get:function(){return this._start},set:function(i){if(i!==this.start){this._start=t.asType(i,t.chart.DataPoint);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciArcs.prototype,"end",{get:function(){return this._end},set:function(i){if(i!==this.end){this._end=t.asType(i,t.chart.DataPoint);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciArcs.prototype,"levels",{get:function(){return this._levels},set:function(i){if(i!==this._levels){this._levels=t.asArray(i,!1);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciArcs.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(i){if((i=t.asEnum(i,t.chart.LabelPosition))!==this.labelPosition){this._labelPosition=i;this._invalidate()}},enumerable:!0,configurable:!0});FibonacciArcs.prototype._render=function(e,a){a.cancel=!0;var s=this._getX(0),n=this._getY(0),r=this._getX(1),l=this._getY(1);if(!(i.prototype._getLength.call(this)<=1)&&isValid(s)&&isValid(n)&&isValid(r)&&isValid(l)){var o,h=this._getAxisX(),c=this._getAxisY(),u=a.engine,_=this.chart.series.indexOf(this),d=this._getSymbolStroke(_),p=t.chart._BasePlotter.cloneStyle(this.style,["fill"]),f=t.chart._BasePlotter.cloneStyle(this.style,["stroke"]);u.stroke=d;u.strokeWidth=2;u.textFill=d;var g,y,m,v,V,b,x,P,w,k=this.chart._plotrectId,B=l-n;o=u.startGroup(null,k);t.addClass(o,"fibonacci-arcs");isValid(s)&&isValid(n)&&isValid(r)&&isValid(l)&&u.drawLines([h.convert(s),h.convert(r)],[c.convert(n),c.convert(l)],null,p);v=Math.sqrt(Math.pow(h.convert(r)-h.convert(s),2)+Math.pow(c.convert(l)-c.convert(n),2));b=new t.Point(r,l);for(var L=0;L<this.levels.length;L++){x=.01*this.levels[L];V=Math.abs(v*x);if(isValid(b.x)&&isValid(b.y)&&isValid(V)){g=h.convert(b.x);y=c.convert(b.y);u.drawDonutSegment(g,y,V,V,B>0?0:Math.PI,Math.PI,null,p);if(this.labelPosition!==t.chart.LabelPosition.None&&0!==x){w=t.Globalize.format(x,"p1");P=u.measureString(w,null,null,f);m=B<=0?y-V:y+V;switch(this.labelPosition){case t.chart.LabelPosition.Center:m+=.5*P.height;break;case t.chart.LabelPosition.Bottom:m+=B<=0?P.height:0;break;default:m+=B<=0?0:P.height}u.drawString(w,new t.Point(g-.5*P.width,m),null,f)}}}u.stroke=null;u.strokeWidth=null;u.textFill=null;u.endGroup()}};FibonacciArcs.prototype._getX=function(i){var e=null;0===i&&this.start?e=this.start.x:1===i&&this.end&&(e=this.end.x);t.isDate(e)&&(e=t.asDate(e).valueOf());return e};FibonacciArcs.prototype._getY=function(t){var i=null;0===t&&this.start?i=this.start.y:1===t&&this.end&&(i=this.end.y);return i};FibonacciArcs.prototype._getChartType=function(){return t.chart.ChartType.Line};return FibonacciArcs}(t.chart.SeriesBase);i.FibonacciArcs=a;var s=function(i){__extends(FibonacciFans,i);function FibonacciFans(e){var a=i.call(this)||this;a._levels=[0,23.6,38.2,50,61.8,100];a._labelPosition=t.chart.LabelPosition.Top;a.rendering.addHandler(a._render,a);a.initialize(e);return a}Object.defineProperty(FibonacciFans.prototype,"start",{get:function(){return this._start},set:function(i){if(i!==this.start){this._start=t.asType(i,t.chart.DataPoint);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciFans.prototype,"end",{get:function(){return this._end},set:function(i){if(i!==this.end){this._end=t.asType(i,t.chart.DataPoint);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciFans.prototype,"levels",{get:function(){return this._levels},set:function(i){if(i!==this._levels){this._levels=t.asArray(i,!1);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciFans.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(i){if((i=t.asEnum(i,t.chart.LabelPosition))!==this.labelPosition){this._labelPosition=i;this._invalidate()}},enumerable:!0,configurable:!0});FibonacciFans.prototype._updateLevels=function(){if(!this.start||!this.end){var e,a,s,n,r=this.chart._getPlotter(this),l=this._getAxisX(),o=i.prototype.getValues.call(this,0),h=i.prototype.getValues.call(this,1)||r.dataInfo.getXVals();if(o&&o.length>0){s=t.chart.finance._minimum(o);n=t.chart.finance._maximum(o)}if(h&&h.length>0){e=t.chart.finance._minimum(h);a=t.chart.finance._maximum(h)}else{e=l.actualMin;a=l.actualMax}if(isValid(e)&&isValid(s)&&isValid(a)&&isValid(n)){this.start=new t.chart.DataPoint(e,s);this.end=new t.chart.DataPoint(a,n)}}};FibonacciFans.prototype._render=function(e,a){a.cancel=!0;this._updateLevels();var s=this._getX(0),n=this._getY(0),r=this._getX(1),l=this._getY(1);if(!(i.prototype._getLength.call(this)<=1)&&isValid(s)&&isValid(n)&&isValid(r)&&isValid(l)){var o=this._getAxisX(),h=this._getAxisY(),c=this.chart.series.indexOf(this),u=a.engine,_=this._getSymbolStroke(c),d=t.chart._BasePlotter.cloneStyle(this.style,["fill"]),p=t.chart._BasePlotter.cloneStyle(this.style,["stroke"]);u.stroke=_;u.strokeWidth=2;u.textFill=_;var f,g,y,m,v,V,b,x,P,w,k,B,L,I=l-n,X=r-s,M=this.chart._plotrectId;f=s;y=n;m=l;var O=g=r;u.startGroup(null,M);for(var S=0;S<this.levels.length;S++){g=X<0?o.actualMin:o.actualMax;m=(x=((m=y+(w=.01*this.levels[S])*I)-y)/(O-f))*g+(P=m-x*O);I>0&&m>h.actualMax?g=((m=h.actualMax)-P)/x:I<0&&m<h.actualMin&&(g=((m=h.actualMin)-P)/x);if(isValid(f)&&isValid(y)&&isValid(g)&&isValid(m)){v=new t.Point(o.convert(f),h.convert(y));V=new t.Point(o.convert(g),h.convert(m));u.drawLines([v.x,V.x],[v.y,V.y],null,d);if(this.labelPosition!=t.chart.LabelPosition.None){k=t.Globalize.format(w,"p1");B=u.measureString(k,null,null,p);L=180*Math.atan((V.y-v.y)/(V.x-v.x))/Math.PI;b=V.clone();V.x=X>0?V.x-B.width:V.x;var F,C=L*Math.PI/180,A=new t.Point,T=new t.Point,j=new t.Point,D=new t.Point,Y=h.convert(h.actualMin),R=h.convert(h.actualMax),W=o.convert(o.actualMin),N=o.convert(o.actualMax),E=b.clone();switch(this.labelPosition){case t.chart.LabelPosition.Center:V.y+=.5*B.height;E.y+=.5*B.height;break;case t.chart.LabelPosition.Bottom:V.y+=B.height}if(X>0){if(this.labelPosition===t.chart.LabelPosition.Top||this.labelPosition===t.chart.LabelPosition.Center){D=E.clone();j.x=D.x+B.height*Math.sin(C);j.y=D.y-B.height*Math.cos(C);A.x=D.x-B.width*Math.cos(C)+B.height*Math.sin(C);A.y=D.y-B.width*Math.sin(C)-B.height*Math.cos(C);T.x=D.x-B.width*Math.cos(C);T.y=D.y-B.width*Math.sin(C)}else if(this.labelPosition===t.chart.LabelPosition.Bottom){j=E.clone();A.x=j.x-B.width*Math.cos(C);A.y=j.y-B.width*Math.sin(C);T.x=A.x-B.height*Math.sin(C);T.y=A.y+B.height*Math.cos(C);D.x=A.x+B.width*Math.cos(C)-B.height*Math.sin(C);D.y=A.y+B.width*Math.sin(C)+B.height*Math.cos(C)}if(I>0){if(j.y<R){x=(h.convertBack(j.y)-h.convertBack(A.y))/(o.convertBack(j.x)-o.convertBack(A.x));P=h.convertBack(j.y)-x*o.convertBack(j.x);F=o.convert((h.actualMax-P)/x);V.x-=Math.abs(j.x-F)}D.x>N&&(V.x-=Math.abs(N-D.x))}else if(I<0){if(D.y>Y){x=(h.convertBack(T.y)-h.convertBack(D.y))/(o.convertBack(T.x)-o.convertBack(D.x));P=h.convertBack(D.y)-x*o.convertBack(D.x);F=o.convert((h.actualMin-P)/x);V.x-=Math.max(Math.abs(F-D.x),Math.abs(Y-D.y))}j.x>N&&(V.x-=Math.abs(N-j.x))}}else if(X<0){if(this.labelPosition===t.chart.LabelPosition.Top||this.labelPosition===t.chart.LabelPosition.Center){T=E.clone();A.x=T.x+B.height*Math.sin(C);A.y=T.y-B.height*Math.cos(C);D.x=T.x+B.width*Math.cos(C);D.y=T.y+B.width*Math.sin(C);j.x=A.x+B.width*Math.cos(C);j.y=A.y+B.width*Math.sin(C)}else if(this.labelPosition===t.chart.LabelPosition.Bottom){A=E.clone();j.x=A.x+B.width*Math.cos(C);j.y=A.y+B.width*Math.sin(C);T.x=A.x-B.height*Math.sin(C);T.y=A.y+B.height*Math.cos(C);D.x=A.x+B.width*Math.cos(C)-B.height*Math.sin(C);D.y=A.y+B.width*Math.sin(C)+B.height*Math.cos(C)}if(I>0){if(A.y<R){x=(h.convertBack(A.y)-h.convertBack(j.y))/(o.convertBack(A.x)-o.convertBack(j.x));P=h.convertBack(A.y)-x*o.convertBack(A.x);F=o.convert((h.actualMax-P)/x);V.x+=Math.abs(A.x-F)}T.x<W&&(V.x+=Math.abs(W-T.x))}else if(I<0){if(T.y>Y){x=(h.convertBack(D.y)-h.convertBack(T.y))/(o.convertBack(D.x)-o.convertBack(T.x));P=h.convertBack(T.y)-x*o.convertBack(T.x);F=o.convert((h.actualMin-P)/x);V.x+=Math.max(Math.abs(F-T.x),Math.abs(Y-T.y))}A.x<W&&(V.x+=Math.abs(W-A.x))}}isFinite(V.x)&&isFinite(V.y)&&(0===L?u.drawString(k,V,null,p):u.drawStringRotated(k,V,b,L,null,p))}}}u.stroke=null;u.strokeWidth=null;u.textFill=null;u.endGroup()}};FibonacciFans.prototype._getX=function(i){var e=null;0===i&&this.start?e=this.start.x:1===i&&this.end&&(e=this.end.x);t.isDate(e)&&(e=t.asDate(e).valueOf());return e};FibonacciFans.prototype._getY=function(t){var i=null;0===t&&this.start?i=this.start.y:1===t&&this.end&&(i=this.end.y);return i};FibonacciFans.prototype._getChartType=function(){return t.chart.ChartType.Line};return FibonacciFans}(t.chart.SeriesBase);i.FibonacciFans=s;var n=function(i){__extends(FibonacciTimeZones,i);function FibonacciTimeZones(e){var a=i.call(this)||this;a._levels=[0,1,2,3,5,8,13,21,34];a._labelPosition=t.chart.LabelPosition.Right;a.rendering.addHandler(a._render,a);a.initialize(e);return a}Object.defineProperty(FibonacciTimeZones.prototype,"startX",{get:function(){return this._startX},set:function(i){if(i!==this.startX){t.isDate(i)?this._startX=t.asDate(i):this._startX=t.asNumber(i);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciTimeZones.prototype,"endX",{get:function(){return this._endX},set:function(i){if(i!==this.endX){t.isDate(i)?this._endX=t.asDate(i):this._endX=t.asNumber(i);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciTimeZones.prototype,"levels",{get:function(){return this._levels},set:function(i){if(i!==this._levels){this._levels=t.asArray(i,!1);this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FibonacciTimeZones.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(i){if((i=t.asEnum(i,t.chart.LabelPosition))!==this.labelPosition){this._labelPosition=i;this._invalidate()}},enumerable:!0,configurable:!0});FibonacciTimeZones.prototype._render=function(e,a){a.cancel=!0;this._updateLevels();var s=this._getX(0),n=this._getX(1);if(!(i.prototype._getLength.call(this)<=1)&&isValid(s)&&isValid(n)){var r,l,o,h,c=n-s,u=this._getAxisX(),_=this._getAxisY(),d=this._chart.series.indexOf(this),p=a.engine,f=this._getSymbolStroke(d),g=t.chart._BasePlotter.cloneStyle(this.style,["fill"]),y=t.chart._BasePlotter.cloneStyle(this.style,["stroke"]),m=_.convert(_.actualMin),v=_.convert(_.actualMax),V=this.chart._plotrectId;p.stroke=f;p.strokeWidth=2;p.textFill=f;if(0!==c){p.startGroup(null,V);for(var b=0;b<this.levels.length;b++)if(!((l=c*(r=this.levels[b])+s)<u.actualMin||u.actualMax<l)&&isValid(l)){l=u.convert(l);p.drawLine(l,m,l,v,null,g);if(this.labelPosition!==t.chart.LabelPosition.None){h=t.Globalize.format(r,"n0");o=p.measureString(h,null,null,y);switch(this.labelPosition){case t.chart.LabelPosition.Left:l-=o.width+2;break;case t.chart.LabelPosition.Center:l-=o.width/2;break;case t.chart.LabelPosition.Right:l+=2;break;default:l=c<0?l-o.width-2:l+2}p.drawString(h,new t.Point(l,m),null,y)}}p.stroke=null;p.strokeWidth=null;p.textFill=null;p.endGroup()}}};FibonacciTimeZones.prototype._updateLevels=function(){var e=this.chart._getPlotter(this),a=i.prototype.getValues.call(this,1)||e.dataInfo.getXVals();if(!(i.prototype._getLength.call(this)<=1)){var s=this._getX(0),n=this._getX(1),r=t.isNumber(s)&&t.isNumber(n);if(r||a){if(!r&&a){this._startX=a[0];this._endX=a[1]}}else{this._startX=0;this._endX=1}}};FibonacciTimeZones.prototype._getX=function(i){var e=null;0===i?e=this.startX:1===i&&(e=this.endX);t.isDate(e)&&(e=t.asDate(e).valueOf());return e};FibonacciTimeZones.prototype._getChartType=function(){return t.chart.ChartType.Line};return FibonacciTimeZones}(t.chart.SeriesBase);i.FibonacciTimeZones=n}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e=function(i){__extends(OverlayIndicatorBase,i);function OverlayIndicatorBase(t){var e=i.call(this,t)||this;e._seriesCount=1;return e}Object.defineProperty(OverlayIndicatorBase.prototype,"_hitTester",{get:function(){this._plotter&&!this.__hitTester&&(this.__hitTester=this._plotter.hitTester);return this.__hitTester},enumerable:!0,configurable:!0});OverlayIndicatorBase.prototype._getChartType=function(){return t.chart.ChartType.Line};OverlayIndicatorBase.prototype._getXValues=function(){return i.prototype.getValues.call(this,1)||this._plotter.dataInfo.getXVals()};OverlayIndicatorBase.prototype._getDataPoint=function(i,e,a,s,n,r){var l=new t.chart._DataPoint(a,s,i,e);l.y=e;l.yfmt=r._formatValue(e);l.x=i;l.xfmt=n._formatValue(i);return l};OverlayIndicatorBase.prototype._shouldCalculate=function(){return!0};OverlayIndicatorBase.prototype._init=function(){};OverlayIndicatorBase.prototype._calculate=function(){};OverlayIndicatorBase.prototype._clearValues=function(){i.prototype._clearValues.call(this);this.__hitTester=null};OverlayIndicatorBase.prototype._getName=function(t){var i=void 0;if(this.name)if(this.name.indexOf(",")){var e=this.name.split(",");e&&e.length-1>=t&&(i=e[t].trim())}else i=this.name;return i};OverlayIndicatorBase.prototype._getStyles=function(t){var i=null;if(t<0||null===this._styles)return i;var e=0;for(var a in this._styles){if(e===t&&this._styles.hasOwnProperty(a)){i=this._styles[a];break}e++}return i};OverlayIndicatorBase.prototype.legendItemLength=function(){return this._seriesCount};OverlayIndicatorBase.prototype.measureLegendItem=function(i,e){var a=this._getName(e),s=new t.Size(0,0);a&&(s=this._measureLegendItem(i,this._getName(e)));return s};OverlayIndicatorBase.prototype.drawLegendItem=function(t,i,e){var a=this._getStyles(e)||this.style;this._getName(e)&&this._drawLegendItem(t,i,this._getChartType(),this._getName(e),a,this.symbolStyle)};return OverlayIndicatorBase}(t.chart.SeriesBase);i.OverlayIndicatorBase=e;var a=function(i){__extends(SingleOverlayIndicatorBase,i);function SingleOverlayIndicatorBase(t){var e=i.call(this,t)||this;e._period=14;return e}Object.defineProperty(SingleOverlayIndicatorBase.prototype,"period",{get:function(){return this._period},set:function(i){if(i!==this._period){this._period=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});SingleOverlayIndicatorBase.prototype.getValues=function(t){var e=null;if(i.prototype._getLength.call(this)<=0)return e;if(this._shouldCalculate()){this._init();this._calculate()}0===t?e=this._yvals:1===t&&(e=this._xvals);return e};SingleOverlayIndicatorBase.prototype.getDataRect=function(e,a){if(a)return a;var s=null;if(i.prototype._getLength.call(this)<=0)return s;if(this._shouldCalculate()){this._init();this._calculate()}var n=t.chart.finance._minimum(this._xvals),r=t.chart.finance._maximum(this._xvals),l=t.chart.finance._minimum(this._yvals),o=t.chart.finance._maximum(this._yvals);t.chart._DataInfo.isValid(n)&&t.chart._DataInfo.isValid(r)&&t.chart._DataInfo.isValid(l)&&t.chart._DataInfo.isValid(o)&&(s=new t.Rect(n,l,r-n,o-l));return s};SingleOverlayIndicatorBase.prototype._clearValues=function(){i.prototype._clearValues.call(this);this._xvals=null;this._yvals=null};SingleOverlayIndicatorBase.prototype._shouldCalculate=function(){return!this._yvals||!this._xvals};SingleOverlayIndicatorBase.prototype._init=function(){i.prototype._init.call(this);this._yvals=[];this._xvals=[]};SingleOverlayIndicatorBase.prototype._getItem=function(e){if(i.prototype._getLength.call(this)<=0)return i.prototype._getItem.call(this,e);if(this._shouldCalculate()){this._init();this._calculate()}e=i.prototype._getLength.call(this)-t.chart.finance._minimum(this._yvals.length,this._xvals.length)+e;return i.prototype._getItem.call(this,e)};return SingleOverlayIndicatorBase}(e);i.SingleOverlayIndicatorBase=a}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e=function(i){__extends(WilliamsR,i);function WilliamsR(t){var e=i.call(this)||this;e.period=14;e.initialize(t);return e}WilliamsR.prototype._calculate=function(){var e=i.prototype._getLength.call(this);if(!(e<=0)){var a=i.prototype._getBindingValues.call(this,0),s=i.prototype._getBindingValues.call(this,1),n=i.prototype._getBindingValues.call(this,3),r=this._getXValues();this._yvals=_williamsR(a,s,n,this.period);this._xvals=r?r.slice(this.period-1):t.chart.finance._range(this.period-1,e-1)}};return WilliamsR}(i.SingleOverlayIndicatorBase);i.WilliamsR=e;function _williamsR(i,e,a,s){t.asArray(i,!1);t.asArray(e,!1);t.asArray(a,!1);t.asInt(s,!1,!0);var n,r=t.chart.finance._minimum(i.length,e.length,a.length),l=[],o=[],h=[];t.assert(r>s&&s>1,"Williams %R period must be an integer less than the length of the data and greater than one.");for(n=s;n<=i.length;n++){l.push(t.chart.finance._maximum(i.slice(n-s,n)));o.push(t.chart.finance._minimum(e.slice(n-s,n)))}a.splice(0,s-1);for(n=0;n<l.length;n++)h.push((l[n]-a[n])/(l[n]-o[n])*-100);return h}i._williamsR=_williamsR}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e=function(i){__extends(Stochastic,i);function Stochastic(t){var e=i.call(this)||this;e._kPeriod=14;e._dPeriod=3;e._smoothingPeriod=1;e._seriesCount=2;e.rendering.addHandler(e._rendering,e);e.initialize(t);return e}Object.defineProperty(Stochastic.prototype,"kPeriod",{get:function(){return this._kPeriod},set:function(i){if(i!==this._kPeriod){this._kPeriod=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Stochastic.prototype,"dPeriod",{get:function(){return this._dPeriod},set:function(i){if(i!==this._dPeriod){this._dPeriod=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Stochastic.prototype,"smoothingPeriod",{get:function(){return this._smoothingPeriod},set:function(i){if(i!==this._smoothingPeriod){this._smoothingPeriod=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Stochastic.prototype,"styles",{get:function(){return this._styles},set:function(t){if(t!==this._styles){this._styles=t;this._invalidate()}},enumerable:!0,configurable:!0});Stochastic.prototype.getDataRect=function(e,a){if(a)return a;var s=null;if(i.prototype._getLength.call(this)<=0)return s;if(this._shouldCalculate()){this._init();this._calculate()}var n=this._kVals.concat(this._dVals),r=this._kXVals.concat(this._dXVals),l=t.chart.finance._minimum(r),o=t.chart.finance._maximum(r),h=t.chart.finance._minimum(n),c=t.chart.finance._maximum(n);t.chart._DataInfo.isValid(l)&&t.chart._DataInfo.isValid(o)&&t.chart._DataInfo.isValid(h)&&t.chart._DataInfo.isValid(c)&&(s=new t.Rect(l,h,o-l,c-h));return s};Stochastic.prototype._clearValues=function(){i.prototype._clearValues.call(this);this._kVals=null;this._kXVals=null;this._dVals=null;this._dXVals=null};Stochastic.prototype._shouldCalculate=function(){return!(this._kVals&&this._kXVals&&this._dVals&&this._dXVals)};Stochastic.prototype._init=function(){i.prototype._init.call(this);this._kVals=[];this._kXVals=[];this._dVals=[];this._dXVals=[]};Stochastic.prototype._calculate=function(){var e=i.prototype._getLength.call(this);if(!(i.prototype._getLength.call(this)<=0)){var a=i.prototype._getBindingValues.call(this,0),s=i.prototype._getBindingValues.call(this,1),n=i.prototype._getBindingValues.call(this,3),r=this._getXValues(),l=_stochastic(a,s,n,this.kPeriod,this.dPeriod,this.smoothingPeriod);this._kVals=l.ks;this._dVals=l.ds;this._kXVals=r?r.slice(this.kPeriod-1):t.chart.finance._range(this.kPeriod-1,e-1);this.smoothingPeriod&&this.smoothingPeriod>1&&(this._kXVals=this._kXVals.slice(this._kXVals.length-this._kVals.length,this._kXVals.length));this._dXVals=this._kXVals.slice(this._kXVals.length-this._dVals.length,this._kXVals.length)}};Stochastic.prototype._rendering=function(e,a){a.cancel=!0;if(!(i.prototype._getLength.call(this)<=0)){if(this._shouldCalculate()){this._init();this._calculate()}var s=this.chart.series.indexOf(this),n=a.engine,r=this._getAxisX(),l=this._getAxisY(),o=t.chart._BasePlotter.cloneStyle(this.style,["fill"]),h=this._getSymbolStroke(s),c=this.chart._plotrectId,u=null,_=h,d=2,p=null,f=h,g=2;if(this.styles&&t.isObject(this.styles)){if(this.styles.kLine&&t.isObject(this.styles.kLine)){_=(u=t.chart._BasePlotter.cloneStyle(this.styles.kLine,["fill"])).stroke?u.stroke:h;d=u.strokeWidth?u.strokeWidth:2}if(this.styles.dLine&&t.isObject(this.styles.dLine)){f=(p=t.chart._BasePlotter.cloneStyle(this.styles.dLine,["fill"])).stroke?p.stroke:h;g=p.strokeWidth?p.strokeWidth:2}}var y,m,v,V,b=[],x=[],P=[],w=[],k=this._getLength();for(v=0;v<this._kVals.length;v++){V=k-this._kVals.length+v;x.push(r.convert(this._kXVals[v]));b.push(l.convert(this._kVals[v]));(y=this._getDataPoint(this._kXVals[v],this._kVals[v],s,V,r,l)).name=this._getName(0);(m=new t.chart._CircleArea(new t.Point(x[v],b[v]),.5*n.strokeWidth)).tag=y;this._hitTester.add(m,s)}this._hitTester.add(new t.chart._LinesArea(x,b),s);n.stroke=_;n.strokeWidth=d;n.drawLines(x,b,null,o,c);for(v=0;v<this._dVals.length;v++){V=k-this._dVals.length+v;w.push(r.convert(this._dXVals[v]));P.push(l.convert(this._dVals[v]));(y=this._getDataPoint(this._dXVals[v],this._dVals[v],s,V,r,l)).name=this._getName(1);(m=new t.chart._CircleArea(new t.Point(w[v],P[v]),.5*n.strokeWidth)).tag=y;this._hitTester.add(m,s)}this._hitTester.add(new t.chart._LinesArea(w,P),s);n.stroke=f;n.strokeWidth=g;n.drawLines(w,P,null,o,c)}};Stochastic.prototype.getCalculatedValues=function(e){e=t.asString(e,!1);var a=[],s=0;if(i.prototype._getLength.call(this)<=0)return a;if(this._shouldCalculate()){this._init();this._calculate()}switch(e){case"kLine":for(;s<this._kVals.length;s++)a.push({x:this._kXVals[s],y:this._kVals[s]});break;case"dLine":for(;s<this._dVals.length;s++)a.push({x:this._dXVals[s],y:this._dVals[s]})}return a};return Stochastic}(i.OverlayIndicatorBase);i.Stochastic=e;function _stochastic(i,e,a,s,n,r){t.asArray(i,!1);t.asArray(e,!1);t.asArray(a,!1);t.asInt(s,!1,!0);t.asInt(n,!1,!0);t.asInt(r,!0,!0);var l,o=[],h=[],c=[];for(l=s;l<=i.length;l++){o.push(t.chart.finance._maximum(i.slice(l-s,l)));h.push(t.chart.finance._minimum(e.slice(l-s,l)))}a=a.slice(s-1);for(l=0;l<a.length;l++)c.push((a[l]-h[l])/(o[l]-h[l])*100);r&&r>1&&(c=t.chart.finance._sma(c,r));return{ks:c,ds:t.chart.finance._sma(c,n)}}i._stochastic=_stochastic}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e=function(i){__extends(RSI,i);function RSI(t){var e=i.call(this)||this;e.period=14;e.initialize(t);return e}RSI.prototype._calculate=function(){var e=i.prototype._getLength.call(this);if(!(e<=0)){var a=i.prototype._getBindingValues.call(this,0),s=this._getXValues();this._yvals=_rsi(a,this.period);this._xvals=s?s.slice(this.period):t.chart.finance._range(this.period,e)}};return RSI}(i.SingleOverlayIndicatorBase);i.RSI=e;function _rsi(i,e){t.asArray(i,!1);t.asInt(e,!0,!1);t.assert(i.length>e&&e>1,"RSI period must be an integer less than the length of the data and greater than one.");var a,s,n,r,l=[],o=[],h=[],c=[];for(r=1;r<i.length;r++)l.push(i[r]-i[r-1]);a=l.map((function(t){return t>0?t:0}));s=l.map((function(t){return t<0?Math.abs(t):0}));for(r=e;r<=l.length;r++){if(r===e){o.push(t.chart.finance._sum(a.slice(r-e,r))/e);h.push(t.chart.finance._sum(s.slice(r-e,r))/e)}else{o.push((a[r-1]+o[r-e-1]*(e-1))/e);h.push((s[r-1]+h[r-e-1]*(e-1))/e)}n=o[r-e]/h[r-e];n=isFinite(n)?n:0;c.push(100-100/(1+n))}return c}i._rsi=_rsi}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e=function(i){__extends(MacdBase,i);function MacdBase(t){var e=i.call(this,t)||this;e._fastPeriod=12;e._slowPeriod=26;e._smoothingPeriod=9;return e}Object.defineProperty(MacdBase.prototype,"fastPeriod",{get:function(){return this._fastPeriod},set:function(i){if(i!==this._fastPeriod){this._fastPeriod=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(MacdBase.prototype,"slowPeriod",{get:function(){return this._slowPeriod},set:function(i){if(i!==this._slowPeriod){this._slowPeriod=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(MacdBase.prototype,"smoothingPeriod",{get:function(){return this._smoothingPeriod},set:function(i){if(i!==this._smoothingPeriod){this._smoothingPeriod=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});MacdBase.prototype._clearValues=function(){i.prototype._clearValues.call(this);this._macdVals=null;this._macdXVals=null;this._signalVals=null;this._signalXVals=null;this._histogramVals=null;this._histogramXVals=null};MacdBase.prototype._shouldCalculate=function(){return!(this._macdVals&&this._macdXVals&&this._signalVals&&this._signalXVals&&this._histogramVals&&this._histogramXVals)};MacdBase.prototype._init=function(){i.prototype._init.call(this);this._macdVals=[];this._macdXVals=[];this._signalVals=[];this._signalXVals=[];this._histogramVals=[];this._histogramXVals=[]};MacdBase.prototype._calculate=function(){var e=i.prototype._getLength.call(this);if(!(e<=0)){var a=i.prototype.getValues.call(this,0),s=this._getXValues(),n=_macd(a,this.fastPeriod,this.slowPeriod,this.smoothingPeriod);this._macdVals=n.macds;this._signalVals=n.signals;this._histogramVals=n.histograms;this._macdXVals=s?s.slice(e-this._macdVals.length,e):t.chart.finance._range(e-this._macdVals.length,e-1);this._signalXVals=s?s.slice(e-this._signalVals.length,e):t.chart.finance._range(e-this._signalVals.length,e-1);this._histogramXVals=s?s.slice(e-this._histogramVals.length,e):t.chart.finance._range(e-this._histogramVals.length,e-1)}};return MacdBase}(i.OverlayIndicatorBase);i.MacdBase=e;var a=function(i){__extends(Macd,i);function Macd(t){var e=i.call(this)||this;e._seriesCount=2;e.rendering.addHandler(e._rendering,e);e.initialize(t);return e}Object.defineProperty(Macd.prototype,"styles",{get:function(){return this._styles},set:function(t){if(t!==this._styles){this._styles=t;this._invalidate()}},enumerable:!0,configurable:!0});Macd.prototype.legendItemLength=function(){return this.name.indexOf(",")>-1?2:1};Macd.prototype.getDataRect=function(e,a){if(a)return a;var s=null;if(i.prototype._getLength.call(this)<=0)return s;if(this._shouldCalculate()){this._init();this._calculate()}var n=[],r=[];r.push.apply(r,this._macdXVals);r.push.apply(r,this._signalXVals);n.push.apply(n,this._macdVals);n.push.apply(n,this._signalVals);var l=t.chart.finance._minimum(r),o=t.chart.finance._maximum(r),h=t.chart.finance._minimum(n),c=t.chart.finance._maximum(n);t.chart._DataInfo.isValid(l)&&t.chart._DataInfo.isValid(o)&&t.chart._DataInfo.isValid(h)&&t.chart._DataInfo.isValid(c)&&(s=new t.Rect(l,h,o-l,c-h));return s};Macd.prototype._rendering=function(e,a){a.cancel=!0;if(!(i.prototype._getLength.call(this)<=0)){if(this._shouldCalculate()){this._init();this._calculate()}var s=this.chart.series.indexOf(this),n=a.engine,r=this._getAxisX(),l=this._getAxisY(),o=t.chart._BasePlotter.cloneStyle(this.style,["fill"]),h=this._getSymbolStroke(s),c=this.chart._plotrectId,u=null,_=h,d=2,p=null,f=h,g=2;if(this.styles&&t.isObject(this.styles)){if(this.styles.macdLine&&t.isObject(this.styles.macdLine)){_=(u=t.chart._BasePlotter.cloneStyle(this.styles.macdLine,["fill"])).stroke?u.stroke:h;d=u.strokeWidth?u.strokeWidth:2}if(this.styles.signalLine&&t.isObject(this.styles.signalLine)){f=(p=t.chart._BasePlotter.cloneStyle(this.styles.signalLine,["fill"])).stroke?p.stroke:h;g=p.strokeWidth?p.strokeWidth:2}}var y,m,v,V,b=[],x=[],P=[],w=[],k=this._getLength();for(v=0;v<this._macdVals.length;v++){V=k-this._macdVals.length+v;x.push(r.convert(this._macdXVals[v]));b.push(l.convert(this._macdVals[v]));(y=this._getDataPoint(this._macdXVals[v],this._macdVals[v],s,V,r,l)).name=this._getName(0);(m=new t.chart._CircleArea(new t.Point(x[v],b[v]),.5*n.strokeWidth)).tag=y;this._hitTester.add(m,s)}this._hitTester.add(new t.chart._LinesArea(x,b),s);n.stroke=_;n.strokeWidth=d;n.drawLines(x,b,null,o,c);for(v=0;v<this._signalVals.length;v++){V=k-this._signalVals.length+v;w.push(r.convert(this._signalXVals[v]));P.push(l.convert(this._signalVals[v]));(y=this._getDataPoint(this._signalXVals[v],this._signalVals[v],s,V,r,l)).name=this._getName(1);(m=new t.chart._CircleArea(new t.Point(w[v],P[v]),.5*n.strokeWidth)).tag=y;this._hitTester.add(m,s)}this._hitTester.add(new t.chart._LinesArea(w,P),s);n.stroke=f;n.strokeWidth=g;n.drawLines(w,P,null,o,c)}};Macd.prototype.getCalculatedValues=function(e){e=t.asString(e,!1);var a=[],s=0;if(i.prototype._getLength.call(this)<=0)return a;if(this._shouldCalculate()){this._init();this._calculate()}switch(e){case"macdLine":for(;s<this._macdVals.length;s++)a.push({x:this._macdXVals[s],y:this._macdVals[s]});break;case"signalLine":for(;s<this._signalVals.length;s++)a.push({x:this._signalXVals[s],y:this._signalVals[s]})}return a};return Macd}(e);i.Macd=a;var s=function(i){__extends(MacdHistogram,i);function MacdHistogram(t){return i.call(this,t)||this}MacdHistogram.prototype.getValues=function(t){var e=null;if(i.prototype._getLength.call(this)<=0)return e;if(this._shouldCalculate()){this._init();this._calculate()}0===t?e=this._histogramVals:1===t&&(e=this._histogramXVals);return e};MacdHistogram.prototype.getDataRect=function(e,a){if(a)return a;var s=null;if(i.prototype._getLength.call(this)<=0)return s;if(this._shouldCalculate()){this._init();this._calculate()}var n=t.chart.finance._minimum(this._histogramXVals),r=t.chart.finance._maximum(this._histogramXVals),l=t.chart.finance._minimum(this._histogramVals),o=t.chart.finance._maximum(this._histogramVals);t.chart._DataInfo.isValid(n)&&t.chart._DataInfo.isValid(r)&&t.chart._DataInfo.isValid(l)&&t.chart._DataInfo.isValid(o)&&(s=new t.Rect(n,l,r-n,o-l));return s};MacdHistogram.prototype._getChartType=function(){return t.chart.ChartType.Column};MacdHistogram.prototype._getItem=function(e){e=i.prototype._getLength.call(this)-t.chart.finance._minimum(this._histogramVals.length,this._histogramXVals.length)+e;return i.prototype._getItem.call(this,e)};return MacdHistogram}(e);i.MacdHistogram=s;function _macd(i,e,a,s){t.asArray(i,!1);t.asInt(e,!1,!0);t.asInt(a,!1,!0);t.asInt(s,!1,!0);var n,r=e>a;if(r){n=a;a=e;e=n}var l,o,h=t.chart.finance._ema(i,e),c=t.chart.finance._ema(i,a),u=[],_=[];h.splice(0,a-e);for(o=0;o<h.length;o++){n=h[o]-c[o];r&&(n*=-1);u.push(n)}l=t.chart.finance._ema(u,s);var d=u.slice(u.length-l.length,u.length);for(o=0;o<d.length;o++)_.push(d[o]-l[o]);return{macds:u,signals:l,histograms:_}}i._macd=_macd}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e;!function(t){t[t.Simple=0]="Simple";t[t.Exponential=1]="Exponential"}(e=i.MovingAverageType||(i.MovingAverageType={}));var a=function(i){__extends(Envelopes,i);function Envelopes(t){var a=i.call(this)||this;a._period=20;a._type=e.Simple;a._size=.025;a.rendering.addHandler(a._rendering,a);a.initialize(t);return a}Object.defineProperty(Envelopes.prototype,"period",{get:function(){return this._period},set:function(i){if(i!==this._period){this._period=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Envelopes.prototype,"type",{get:function(){return this._type},set:function(i){if((i=t.asEnum(i,e,!1))!==this._type){this._type=i;this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(Envelopes.prototype,"size",{get:function(){return this._size},set:function(i){if(i!==this._size){this._size=t.asNumber(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Envelopes.prototype.getDataRect=function(e,a){if(a)return a;var s=null;if(i.prototype._getLength.call(this)<=0)return s;if(this._shouldCalculate()){this._init();this._calculate()}var n=this._upperYVals.concat(this._lowerYVals),r=t.chart.finance._minimum(this._xVals),l=t.chart.finance._maximum(this._xVals),o=t.chart.finance._minimum(n),h=t.chart.finance._maximum(n);t.chart._DataInfo.isValid(r)&&t.chart._DataInfo.isValid(l)&&t.chart._DataInfo.isValid(o)&&t.chart._DataInfo.isValid(h)&&(s=new t.Rect(r,o,l-r,h-o));return s};Envelopes.prototype._clearValues=function(){i.prototype._clearValues.call(this);this._upperYVals=null;this._lowerYVals=null;this._xVals=null};Envelopes.prototype._init=function(){i.prototype._init.call(this);this._upperYVals=[];this._lowerYVals=[];this._xVals=[]};Envelopes.prototype._shouldCalculate=function(){return!this._upperYVals||!this._lowerYVals||!this._xVals};Envelopes.prototype._calculate=function(){var a=this;if(!(i.prototype._getLength.call(this)<=0)){var s,n=i.prototype.getValues.call(this,0),r=this._getXValues();switch(this.type){case e.Exponential:s=t.chart.finance._ema(n,this.period);break;case e.Simple:default:s=t.chart.finance._sma(n,this.period)}this._xVals=r?r.slice(this.period-1):t.chart.finance._range(this.period-1,i.prototype._getLength.call(this)-1);this._upperYVals=s.map((function(t){return t+t*a.size}));this._lowerYVals=s.map((function(t){return t-t*a.size}))}};Envelopes.prototype._rendering=function(e,a){a.cancel=!0;if(!(i.prototype._getLength.call(this)<=0)){if(this._shouldCalculate()){this._init();this._calculate()}var s=this.chart.series.indexOf(this),n=a.engine,r=this._getAxisX(),l=this._getAxisY(),o=t.chart.finance._minimum(this._upperYVals.length,this._lowerYVals.length,this._xVals.length),h=t.chart._BasePlotter.cloneStyle(this.style,["fill"]),c=this._getSymbolStroke(s),u=this.chart._plotrectId;if(o&&!(o<=0)){n.stroke=c;n.strokeWidth=2;for(var _,d,p,f=[],g=[],y=[],m=this._getLength(),v=0;v<o;v++){p=m-o+v;f.push(r.convert(this._xVals[v]));g.push(l.convert(this._upperYVals[v]));_=this._getDataPoint(this._xVals[v],this._upperYVals[v],s,p,r,l);(d=new t.chart._CircleArea(new t.Point(f[v],g[v]),.5*n.strokeWidth)).tag=_;this._hitTester.add(d,s);y.push(l.convert(this._lowerYVals[v]));_=this._getDataPoint(this._xVals[v],this._lowerYVals[v],s,p,r,l);(d=new t.chart._CircleArea(new t.Point(f[v],y[v]),.5*n.strokeWidth)).tag=_;this._hitTester.add(d,s)}this._hitTester.add(new t.chart._LinesArea(f,g),s);this._hitTester.add(new t.chart._LinesArea(f,y),s);n.drawLines(f,g,null,h,u);n.drawLines(f,y,null,h,u)}}};Envelopes.prototype.getCalculatedValues=function(e){e=t.asString(e,!1);var a=[],s=0;if(i.prototype._getLength.call(this)<=0)return a;if(this._shouldCalculate()){this._init();this._calculate()}switch(e){case"upperEnvelope":for(;s<this._upperYVals.length;s++)a.push({x:this._xVals[s],y:this._upperYVals[s]});break;case"lowerEnvelope":for(;s<this._lowerYVals.length;s++)a.push({x:this._xVals[s],y:this._lowerYVals[s]})}return a};return Envelopes}(i.OverlayIndicatorBase);i.Envelopes=a}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e=function(i){__extends(CCI,i);function CCI(t){var e=i.call(this)||this;e._constant=.015;e.period=20;e.initialize(t);return e}Object.defineProperty(CCI.prototype,"constant",{get:function(){return this._constant},set:function(i){if(i!==this._constant){this._constant=t.asNumber(i,!1);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});CCI.prototype._calculate=function(){var e=i.prototype._getLength.call(this);if(!(e<=0)){var a=i.prototype._getBindingValues.call(this,0),s=i.prototype._getBindingValues.call(this,1),n=i.prototype._getBindingValues.call(this,3),r=this._getXValues();this._yvals=_cci(a,s,n,this.period,this.constant);this._xvals=r?r.slice(this.period-1):t.chart.finance._range(this.period-1,e-1)}};return CCI}(i.SingleOverlayIndicatorBase);i.CCI=e;function _cci(i,e,a,s,n){t.asArray(i,!1);t.asArray(e,!1);t.asArray(a,!1);t.asInt(s,!1,!0);t.asNumber(n,!1,!0);var r,l,o,h=t.chart.finance._minimum(i.length,e.length,a.length),c=[],u=[],_=[];t.assert(h>s&&s>1,"CCI period must be an integer less than the length of the data and greater than one.");for(l=0;l<h;l++)c.push(t.chart.finance._average(i[l],e[l],a[l]));r=t.chart.finance._sma(c,s);for(l=0;l<r.length;l++){o=c.slice(l,s+l).reduce((function(t,i){return t+Math.abs(r[l]-i)}),0);u.push(o/s)}c.splice(0,s-1);for(l=0;l<r.length;l++)_.push((c[l]-r[l])/(n*u[l]));return _}i._cci=_cci}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e=function(i){__extends(BollingerBands,i);function BollingerBands(t){var e=i.call(this)||this;e._period=20;e._multiplier=2;e.rendering.addHandler(e._rendering,e);e.initialize(t);return e}Object.defineProperty(BollingerBands.prototype,"period",{get:function(){return this._period},set:function(i){if(i!==this._period){this._period=t.asInt(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(BollingerBands.prototype,"multiplier",{get:function(){return this._multiplier},set:function(i){if(i!==this._multiplier){this._multiplier=t.asNumber(i,!1,!0);this._clearValues();this._invalidate()}},enumerable:!0,configurable:!0});BollingerBands.prototype.getDataRect=function(e,a){if(a)return a;if(i.prototype._getLength.call(this)<=0)return null;if(this._shouldCalculate()){this._init();this._calculate()}var s=this._upperYVals.concat(this._lowerYVals),n=t.chart.finance._minimum(this._xVals),r=t.chart.finance._maximum(this._xVals),l=t.chart.finance._minimum(s),o=t.chart.finance._maximum(s);return t.chart._DataInfo.isValid(n)&&t.chart._DataInfo.isValid(r)&&t.chart._DataInfo.isValid(l)&&t.chart._DataInfo.isValid(o)?new t.Rect(n,l,r-n,o-l):null};BollingerBands.prototype._clearValues=function(){i.prototype._clearValues.call(this);this._upperYVals=null;this._middleYVals=null;this._lowerYVals=null;this._xVals=null};BollingerBands.prototype._shouldCalculate=function(){return!(this._upperYVals&&this._middleYVals&&this._lowerYVals&&this._xVals)};BollingerBands.prototype._init=function(){i.prototype._init.call(this);this._upperYVals=[];this._middleYVals=[];this._lowerYVals=[];this._xVals=[]};BollingerBands.prototype._calculate=function(){var e=i.prototype._getLength.call(this);if(!(e<=0)){var a=i.prototype.getValues.call(this,0),s=this._getXValues(),n=_bollingerBands(a,this.period,this.multiplier);this._upperYVals=n.uppers;this._middleYVals=n.middles;this._lowerYVals=n.lowers;this._xVals=s?s.slice(this.period-1):t.chart.finance._range(this.period-1,e-1)}};BollingerBands.prototype._rendering=function(e,a){a.cancel=!0;if(!(i.prototype._getLength.call(this)<=0)){if(this._shouldCalculate()){this._init();this._calculate()}var s=this.chart.series.indexOf(this),n=a.engine,r=this._getAxisX(),l=this._getAxisY(),o=t.chart.finance._minimum(this._upperYVals.length,this._middleYVals.length,this._lowerYVals.length,this._xVals.length),h=t.chart._BasePlotter.cloneStyle(this.style,["fill"]),c=this._getSymbolStroke(s),u=this.chart._plotrectId;if(o&&!(o<=0)){n.stroke=c;n.strokeWidth=2;for(var _,d,p,f=[],g=[],y=[],m=[],v=this._getLength(),V=0;V<o;V++){p=v-o+V;f.push(r.convert(this._xVals[V]));g.push(l.convert(this._upperYVals[V]));_=this._getDataPoint(this._xVals[V],this._upperYVals[V],s,p,r,l);(d=new t.chart._CircleArea(new t.Point(f[V],g[V]),.5*n.strokeWidth)).tag=_;this._hitTester.add(d,s);y.push(l.convert(this._middleYVals[V]));_=this._getDataPoint(this._xVals[V],this._middleYVals[V],s,p,r,l);(d=new t.chart._CircleArea(new t.Point(f[V],y[V]),.5*n.strokeWidth)).tag=_;this._hitTester.add(d,s);m.push(l.convert(this._lowerYVals[V]));_=this._getDataPoint(this._xVals[V],this._lowerYVals[V],s,p,r,l);(d=new t.chart._CircleArea(new t.Point(f[V],m[V]),.5*n.strokeWidth)).tag=_;this._hitTester.add(d,s)}this._hitTester.add(new t.chart._LinesArea(f,g),s);this._hitTester.add(new t.chart._LinesArea(f,y),s);this._hitTester.add(new t.chart._LinesArea(f,m),s);n.drawLines(f,g,null,h,u);n.drawLines(f,y,null,h,u);n.drawLines(f,m,null,h,u)}}};BollingerBands.prototype.getCalculatedValues=function(e){e=t.asString(e,!1);var a=[],s=0;if(i.prototype._getLength.call(this)<=0)return a;if(this._shouldCalculate()){this._init();this._calculate()}switch(e){case"upperBand":for(;s<this._upperYVals.length;s++)a.push({x:this._xVals[s],y:this._upperYVals[s]});break;case"middleBand":for(;s<this._middleYVals.length;s++)a.push({x:this._xVals[s],y:this._middleYVals[s]});break;case"lowerBand":for(;s<this._lowerYVals.length;s++)a.push({x:this._xVals[s],y:this._lowerYVals[s]})}return a};return BollingerBands}(i.OverlayIndicatorBase);i.BollingerBands=e;function _bollingerBands(i,e,a){t.asArray(i,!1);t.asInt(e,!1,!0);t.asNumber(a,!1,!0);t.assert(i.length>e&&e>1,"Bollinger Bands period must be an integer less than the length of the data and greater than one.");var s,n=t.chart.finance._sma(i,e),r=[];for(s=e;s<=i.length;s++)r.push(t.chart.finance._stdDeviation(i.slice(s-e,s)));var l=n,o=n.map((function(t,i){return t+r[i]*a}));return{lowers:n.map((function(t,i){return t-r[i]*a})),middles:l,uppers:o}}i._bollingerBands=_bollingerBands}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){!function(i){"use strict";var e=function(i){__extends(ATR,i);function ATR(t){var e=i.call(this)||this;e.period=14;e.initialize(t);return e}ATR.prototype._calculate=function(){if(!(i.prototype._getLength.call(this)<=0)){var e=i.prototype._getBindingValues.call(this,0),a=i.prototype._getBindingValues.call(this,1),s=i.prototype._getBindingValues.call(this,3),n=this._getXValues();this._yvals=t.chart.finance._avgTrueRng(e,a,s,this.period);this._xvals=n?n.slice(this.period-1):t.chart.finance._range(this.period-1,e.length)}};return ATR}(i.SingleOverlayIndicatorBase);i.ATR=e}(i.analytics||(i.analytics={}))}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));!function(t){!function(i){!function(i){i.analytics||(i.analytics={}),t._registerModule("wijmo.chart.finance.analytics",t.chart.finance.analytics)}(i.finance||(i.finance={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));