!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/cmf
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Sebastian Domas
 *
 * 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/cmf",["highcharts/highcharts"],function(t){return r(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/cmf"]=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,n={512:function(t){t.exports=r},944:function(r){r.exports=t}},o={};function i(t){var r=o[t];if(void 0!==r)return r.exports;var e=o[t]={exports:{}};return n[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 u={};i.d(u,{default:function(){return g}});var a=i(944),c=i.n(a),s=i(512),l=i.n(s),p=function(t,r,e){if(e||2==arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return t.concat(n||Array.prototype.slice.call(r))};function f(t){return h(t)&&"number"==typeof t.nodeType}function h(t,r){var e;return!!t&&"object"==typeof t&&(!r||"[object Array]"!==(e=Object.prototype.toString.call(t))&&"[object Array Iterator]"!==e)}c().doc,c().win,Array.prototype.find;var y=(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 n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),d=l().seriesTypes.sma,v=function(t){function r(){var r=null!==t&&t.apply(this,arguments)||this;return r.nameBase="Chaikin Money Flow",r}return y(r,t),r.prototype.isValid=function(){var t,r=this.chart,e=this.options,n=this.linkedParent,o=this.volumeSeries||(this.volumeSeries=r.get(e.params.volumeSeriesID)),i=(null==(t=null==n?void 0:n.pointArrayMap)?void 0:t.length)===4;function u(t){return t.dataTable.rowCount>=e.params.period}return!!(n&&o&&u(n)&&u(o)&&i)},r.prototype.getValues=function(t,r){if(this.isValid())return this.getMoneyFlow(t.xData,t.yData,this.volumeSeries.getColumn("y"),r.period)},r.prototype.getMoneyFlow=function(t,r,e,n){var o,i,u=r.length,a=[],c=[],s=[],l=[],p=-1,f=0,h=0;function y(t,r){var e=t[1],n=t[2],i=t[3];return null!==r&&null!==e&&null!==n&&null!==i&&e!==n?(i-n-(e-i))/(e-n)*r:(p=o,null)}if(n>0&&n<=u){for(o=0;o<n;o++)a[o]=y(r[o],e[o]),f+=e[o],h+=a[o];for(c.push(t[o-1]),s.push(o-p>=n&&0!==f?h/f:null),l.push([c[0],s[0]]);o<u;o++)a[o]=y(r[o],e[o]),f-=e[o-n],f+=e[o],h-=a[o-n],h+=a[o],i=[t[o],o-p>=n?h/f:null],c.push(i[0]),s.push(i[1]),l.push([i[0],i[1]])}return{values:l,xData:c,yData:s}},r.defaultOptions=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];var n,o=p([t],r,!0),i={},u=function(t,r){return"object"!=typeof t&&(t={}),function(t,r,e){for(var n in t)Object.hasOwnProperty.call(t,n)&&r.call((0,t[n]),t[n],n,t)}(r,function(e,n){if("__proto__"!==n&&"constructor"!==n){var o;!h(e,!0)||(o=null==e?void 0:e.constructor,h(e,!0)&&!f(e)&&(null==o?void 0:o.name)&&"Object"!==o.name)||f(e)?t[n]=r[n]:t[n]=u(t[n]||{},e)}}),t};!0===t&&(i=o[1],o=Array.prototype.slice.call(o,2));var a=o.length;for(n=0;n<a;n++)i=u(i,o[n]);return i}(d.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume"}}),r}(d);l().registerSeriesType("cmf",v);var g=c();return u.default}()});