!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/tema
 * @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(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/tema",["highcharts/highcharts"],function(e){return t(e,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/tema"]=t(e._Highcharts,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(e,t)=>(()=>{"use strict";var r={512:e=>{e.exports=t},944:t=>{t.exports=e}},l={};function o(e){var t=l[e];if(void 0!==t)return t.exports;var i=l[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 r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};o.d(i,{default:()=>y});var n=o(944),s=o.n(n),a=o(512),c=o.n(a);let{doc:u,win:p}=s();function h(e){return f(e)&&"number"==typeof e.nodeType}function v(e){let t=Object.prototype.toString.call(e);return"[object Array]"===t||"[object Array Iterator]"===t}function f(e,t){return!!e&&"object"==typeof e&&(!t||!v(e))}Array.prototype.find;let{ema:d}=c().seriesTypes;class g extends d{getEMA(e,t,r,l,o,i){return super.calculateEma(i||[],e,void 0===o?1:o,this.EMApercent,t,void 0===l?-1:l,r)}getTemaPoint(e,t,r,l){var o;return[e[l-3],(o=3*r.level1-3*r.level2+r.level3)>1e14?o:parseFloat(o.toPrecision(14))]}getValues(e,t){let r=t.period,l=2*r,o=3*r,i=e.xData,n=e.yData,s=n?n.length:0,a=[],c=[],u=[],p=[],h=[],f={},d=-1,g=0,y=0,m,x,b,j;if(this.EMApercent=2/(r+1),!(s<3*r-2)){for(v(n[0])&&(d=t.index?t.index:0),y=(g=super.accumulatePeriodPoints(r,d,n))/r,g=0,b=r;b<s+3;b++)b<s+1&&(f.level1=this.getEMA(n,m,y,d,b)[1],p.push(f.level1)),m=f.level1,b<l?g+=f.level1:(b===l&&(y=g/r,g=0),f.level1=p[b-r-1],f.level2=this.getEMA([f.level1],x,y)[1],h.push(f.level2),x=f.level2,b<o?g+=f.level2:(b===o&&(y=g/r),b===s+1&&(f.level1=p[b-r-1],f.level2=this.getEMA([f.level1],x,y)[1],h.push(f.level2)),f.level1=p[b-r-2],f.level2=h[b-2*r-1],f.level3=this.getEMA([f.level2],f.prevLevel3,y)[1],(j=this.getTemaPoint(i,o,f,b))&&(a.push(j),c.push(j[0]),u.push(j[1])),f.prevLevel3=f.level3));return{values:a,xData:c,yData:u}}}}g.defaultOptions=function(e,...t){let r,l=[e,...t],o={},i=function(e,t){return"object"!=typeof e&&(e={}),function(e,t,r){for(let r in e)Object.hasOwnProperty.call(e,r)&&t.call((0,e[r]),e[r],r,e)}(t,function(r,l){if("__proto__"!==l&&"constructor"!==l){let o;!f(r,!0)||(o=r?.constructor,f(r,!0)&&!h(r)&&o?.name&&"Object"!==o.name)||h(r)?e[l]=t[l]:e[l]=i(e[l]||{},r)}}),e};!0===e&&(o=l[1],l=Array.prototype.slice.call(l,2));let n=l.length;for(r=0;r<n;r++)o=i(o,l[r]);return o}(d.defaultOptions),c().registerSeriesType("tema",g);let y=s();return i.default})());