!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/disparity-index
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highstock
 *
 * (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/disparity-index",["highcharts/highcharts"],function(e){return t(e,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/disparity-index"]=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}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var o=a[e]={exports:{}};return r[e](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};i.d(o,{default:()=>x});var n=i(944),s=i.n(n),p=i(512),c=i.n(p);let{doc:l,win:u}=s();function d(e){return y(e)&&"number"==typeof e.nodeType}function h(e){let t=Object.prototype.toString.call(e);return"[object Array]"===t||"[object Array Iterator]"===t}function y(e,t){return!!e&&"object"==typeof e&&(!t||!h(e))}Array.prototype.find;let{sma:f}=c().seriesTypes;class g extends f{init(){let e=arguments,t=e[1].params,r=t&&t.average?t.average:void 0;this.averageIndicator=c().seriesTypes[r]||f,this.averageIndicator.prototype.init.apply(this,e)}calculateDisparityIndex(e,t){var r;return((r=e-t)>1e14?r:parseFloat(r.toPrecision(14)))/t*100}getValues(e,t){let r=t.index,a=e.xData,i=e.yData,o=i?i.length:0,n=[],s=[],p=[],c=this.averageIndicator,l=h(i[0]),u=c.prototype.getValues(e,t),d=u.yData,y=a.indexOf(u.xData[0]);if(d&&0!==d.length&&null!=r&&!(i.length<=y)){for(let e=y;e<o;e++){let t=this.calculateDisparityIndex(l?i[e][r]:i[e],d[e-y]);n.push([a[e],t]),s.push(a[e]),p.push(t)}return{values:n,xData:s,yData:p}}}}g.defaultOptions=function(e,...t){let r,a=[e,...t],i={},o=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,a){if("__proto__"!==a&&"constructor"!==a){let i;!y(r,!0)||(i=r?.constructor,y(r,!0)&&!d(r)&&i?.name&&"Object"!==i.name)||d(r)?e[a]=t[a]:e[a]=o(e[a]||{},r)}}),e};!0===e&&(i=a[1],a=Array.prototype.slice.call(a,2));let n=a.length;for(r=0;r<n;r++)i=o(i,a[r]);return i}(f.defaultOptions,{params:{average:"sma",index:3},marker:{enabled:!1},dataGrouping:{approximation:"averages"}}),function(e,t){let r;for(r in e||(e={}),t)e[r]=t[r]}(g.prototype,{nameBase:"Disparity Index",nameComponents:["period","average"]}),c().registerSeriesType("disparityindex",g);let x=s();return o.default})());