!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/dema
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Rafał Sebestjański
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/dema",["highcharts/highcharts"],function(t){return r(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/dema"]=r(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=r(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,r){return function(){"use strict";var e,o={512:function(t){t.exports=r},944:function(r){r.exports=t}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var e=n[t]={exports:{}};return o[t](e,e.exports,i),e.exports}i.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(r,{a:r}),r},i.d=function(t,r){for(var e in r)i.o(r,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},i.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)};var c={};i.d(c,{default:function(){return _}});var a=i(944),u=i.n(a),s=i(512),p=i.n(s),f=function(t,r,e){if(e||2==arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return t.concat(o||Array.prototype.slice.call(r))};function l(t){return y(t)&&"number"==typeof t.nodeType}function h(t){var r=Object.prototype.toString.call(t);return"[object Array]"===r||"[object Array Iterator]"===r}function y(t,r){return!!t&&"object"==typeof t&&(!r||!h(t))}u().doc,u().win,Array.prototype.find;var d=(e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)},function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),g=p().seriesTypes.ema,v=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return d(r,t),r.prototype.getEMA=function(r,e,o,n,i,c){return t.prototype.calculateEma.call(this,c||[],r,void 0===i?1:i,this.EMApercent,e,void 0===n?-1:n,o)},r.prototype.getValues=function(r,e){var o,n,i,c,a,u,s=e.period,p=[],f=2*s,l=r.xData,y=r.yData,d=y?y.length:0,g=[],v=[],_=[],b=0,j=0,x=-1,m=0;if(this.EMApercent=2/(s+1),!(d<2*s-1)){for(h(y[0])&&(x=e.index?e.index:0),m=(b=t.prototype.accumulatePeriodPoints.call(this,s,x,y))/s,b=0,a=s;a<d+2;a++)if(a<d+1&&(j=this.getEMA(y,i,m,x,a)[1],p.push(j)),i=j,a<f)b+=j;else{a===f&&(m=b/s),j=p[a-s-1],n=this.getEMA([j],c,m)[1],u=[l[a-2],(o=2*j-n)>1e14?o:parseFloat(o.toPrecision(14))],g.push(u),v.push(u[0]),_.push(u[1]),c=n}return{values:g,xData:v,yData:_}}},r.defaultOptions=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];var o,n=f([t],r,!0),i={},c=function(t,r){return"object"!=typeof t&&(t={}),function(t,r,e){for(var o in t)Object.hasOwnProperty.call(t,o)&&r.call((0,t[o]),t[o],o,t)}(r,function(e,o){if("__proto__"!==o&&"constructor"!==o){var n;!y(e,!0)||(n=null==e?void 0:e.constructor,y(e,!0)&&!l(e)&&(null==n?void 0:n.name)&&"Object"!==n.name)||l(e)?t[o]=r[o]:t[o]=c(t[o]||{},e)}}),t};!0===t&&(i=n[1],n=Array.prototype.slice.call(n,2));var a=n.length;for(o=0;o<a;o++)i=c(i,n[o]);return i}(g.defaultOptions),r}(g);p().registerSeriesType("dema",v);var _=u();return c.default}()});