/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends, __generator, __values } from "tslib";
import { EventArgs, Base, markType, typeCast, runOn, delegateCombine, enumGetBox, Point_$type, String_$type, Number_$type, fromEnum, toEnum, Date_$type, markDep, Delegate_$type } from "igniteui-react-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-react-core";
import { IFastItemColumn$1_$type } from "igniteui-react-core";
import { Series } from "./Series";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-react-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "./HighlightingInfo";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { CategoryFrame } from "./CategoryFrame";
import { CategoryMode_$type } from "./CategoryMode";
import { ITimeRangeSelectorAxis_$type } from "./ITimeRangeSelectorAxis";
import { FastReflectionHelper } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { Dictionary$2 } from "igniteui-react-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { FinancialValueList } from "./FinancialValueList";
import { CategoryXAxis } from "./CategoryXAxis";
import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection";
import { SafeReadOnlyDoubleCollection } from "./SafeReadOnlyDoubleCollection";
import { SafeEnumerable } from "./SafeEnumerable";
import { CalculatedColumn } from "./CalculatedColumn";
import { TrendCalculators } from "igniteui-react-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
import { dateToStringFormat } from "igniteui-react-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
var FinancialEventArgs = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialEventArgs, _super);
    function FinancialEventArgs(a, b, c, d, e) {
        var _this = _super.call(this) || this;
        _this._position = 0;
        _this._count = 0;
        _this._dataSource = null;
        _this._supportingCalculations = null;
        _this._basedOn = null;
        _this.position = a;
        _this.count = b;
        _this.dataSource = c;
        _this.supportingCalculations = d;
        if (c != null) {
            c.series = e;
        }
        return _this;
    }
    Object.defineProperty(FinancialEventArgs.prototype, "position", {
        get: function () {
            return this._position;
        },
        set: function (a) {
            this._position = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "count", {
        get: function () {
            return this._count;
        },
        set: function (a) {
            this._count = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "dataSource", {
        get: function () {
            return this._dataSource;
        },
        set: function (a) {
            this._dataSource = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "supportingCalculations", {
        get: function () {
            return this._supportingCalculations;
        },
        set: function (a) {
            this._supportingCalculations = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "basedOn", {
        get: function () {
            return this._basedOn;
        },
        set: function (a) {
            this._basedOn = a;
        },
        enumerable: false,
        configurable: true
    });
    FinancialEventArgs.$t = markType(FinancialEventArgs, 'FinancialEventArgs', EventArgs.$);
    return FinancialEventArgs;
}(EventArgs));
export { FinancialEventArgs };
/**
 * @hidden
 */
var FinancialBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialBucketCalculator, _super);
    function FinancialBucketCalculator(a) {
        var _this = _super.call(this) || this;
        _this.a = null;
        _this.c = 0;
        _this.d = 0;
        _this.b = 0;
        if (a == null) {
            throw new ArgumentNullException(0, "view");
        }
        _this.a = a;
        _this.c = -1;
        _this.d = _this.d;
        _this.b = 0;
        return _this;
    }
    FinancialBucketCalculator.prototype.getBucket = function (a) {
        return null;
    };
    FinancialBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) {
        return this.getBucket(a);
    };
    FinancialBucketCalculator.prototype.getErrorBucket = function (a, b) {
        return NaN;
    };
    FinancialBucketCalculator.prototype.getBucketInfo = function (a, b, c, d) {
        a = this.c;
        b = this.d;
        c = this.b;
        d = this.a.b2.hj;
        return {
            p0: a,
            p1: b,
            p2: c,
            p3: d
        };
    };
    FinancialBucketCalculator.prototype.e = function (a) {
        var b = this.a.by;
        var c = this.a.bx;
        var d = this.a.bx;
        if (this.a.b2 != null) {
            d = this.a.b2.getEffectiveViewport1(this.a);
        }
        if (b.isEmpty || c.isEmpty || this.a.b2.t9 == null) {
            this.b = 0;
            return;
        }
        var e = (this.a.b2.t9 != null) ? this.a.b2.t9.ch : false;
        var f = new ScalerParams(0, b, c, e, d);
        var g = this.a.b2.to(this.a);
        var h = typeCast(ISortingAxis_$type, this.a.b2.t9);
        if (h == null || h.i$b == null) {
            var i = Math.floor(this.a.b2.t9.em(g.left, f));
            var j = Math.ceil(this.a.b2.t9.em(g.right, f));
            if (this.a.b2.t9.ch) {
                j = Math.ceil(this.a.b2.t9.em(g.left, f));
                i = Math.floor(this.a.b2.t9.em(g.right, f));
            }
            var k = Math.floor((j - i + 1) * a / g.width);
            this.b = truncate(Math.max(1, k));
            this.c = truncate(Math.floor(i / this.b));
            this.d = truncate(Math.ceil(j / this.b));
        }
        else {
            this.c = h.i$e(b, c, d, g);
            this.d = h.i$g(b, c, d, g);
            this.b = 1;
        }
    };
    FinancialBucketCalculator.prototype.cacheValues = function () {
    };
    FinancialBucketCalculator.prototype.unCacheValues = function () {
    };
    FinancialBucketCalculator.$t = markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
    return FinancialBucketCalculator;
}(Base));
export { FinancialBucketCalculator };
/**
 * @hidden
 */
var FinancialSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialSeries, _super);
    function FinancialSeries() {
        var _this = _super.call(this) || this;
        _this.u0 = null;
        _this.uy = null;
        _this.uz = null;
        _this.ux = null;
        _this.u1 = null;
        _this.va = false;
        _this.assigningCategoryStyle = null;
        _this.ui = null;
        _this.vk = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
        _this.vl = new Dictionary$2(String_$type, String_$type, 0);
        _this.u9 = false;
        _this.ut = null;
        _this.ud = null;
        _this.uf = null;
        _this.ub = null;
        _this.ul = null;
        _this.typical = null;
        _this.typicalBasedOn = null;
        _this.u8 = false;
        _this.vx = null;
        _this.vv = null;
        _this.vw = null;
        _this.vu = null;
        _this.vy = null;
        _this.ue = null;
        _this.ua = null;
        _this.ug = 0;
        _this.uu = null;
        _this.uw = null;
        _this.ui = new CategorySeriesRenderManager();
        _this.va = false;
        _this.ul = new CategoryTransitionSourceFramePreparer();
        _this.ue = new CategoryFrame(3);
        _this.ab = FinancialSeries.$;
        _this.uh = 0;
        return _this;
    }
    FinancialSeries.prototype.g0 = function () {
        var a = _super.prototype.g0.call(this);
        {
            var b = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "OpenMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedOpenMemberPath";
                $ret.q = true;
                return $ret;
            })());
            b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.xc));
            a.add(b);
        }
        {
            var c = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "HighMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedHighMemberPath";
                $ret.q = true;
                return $ret;
            })());
            c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.xa));
            a.add(c);
        }
        {
            var d = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "LowMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedLowMemberPath";
                $ret.q = true;
                return $ret;
            })());
            d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.xb));
            a.add(d);
        }
        {
            var e = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "CloseMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedCloseMemberPath";
                $ret.q = true;
                return $ret;
            })());
            e.valueResolving = delegateCombine(e.valueResolving, runOn(this, this.w9));
            a.add(e);
        }
        {
            var f = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "VolumeMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedVolumeMemberPath";
                $ret.q = true;
                return $ret;
            })());
            f.valueResolving = delegateCombine(f.valueResolving, runOn(this, this.xd));
            a.add(f);
        }
        {
            var g = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.r = true;
                $ret.ad = "Brush";
                $ret.p = true;
                $ret.y = "ActualBrush";
                $ret.q = true;
                return $ret;
            })());
            g.valueResolving = delegateCombine(g.valueResolving, runOn(this, this.px));
            a.add(g);
        }
        {
            var h = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.r = true;
                $ret.ad = "Outline";
                $ret.p = true;
                $ret.y = "ActualOutline";
                $ret.q = true;
                return $ret;
            })());
            h.valueResolving = delegateCombine(h.valueResolving, runOn(this, this.px));
            a.add(h);
        }
        {
            var i = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.r = true;
                $ret.ad = "NegativeBrush";
                $ret.p = true;
                $ret.q = true;
                return $ret;
            })());
            i.valueResolving = delegateCombine(i.valueResolving, runOn(this, this.px));
            a.add(i);
        }
        {
            var j = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.r = true;
                $ret.ad = "NegativeOutline";
                $ret.p = true;
                $ret.q = true;
                return $ret;
            })());
            j.valueResolving = delegateCombine(j.valueResolving, runOn(this, this.px));
            a.add(j);
        }
        var k = ((function () {
            var $ret = new SeriesLayerPropertyOverlay();
            $ret.p = true;
            $ret.ad = "IsTransitionInEnabled";
            $ret.x = true;
            $ret.q = true;
            return $ret;
        })());
        a.add(k);
        var l = ((function () {
            var $ret = new SeriesLayerPropertyOverlay();
            $ret.p = true;
            $ret.ad = "TransitionInMode";
            $ret.x = enumGetBox(CategoryTransitionInMode_$type, 20);
            $ret.q = true;
            return $ret;
        })());
        a.add(l);
        return a;
    };
    FinancialSeries.prototype.xc = function (a, b) {
        if (this.wm != null) {
            b.value = this.wm;
            return;
        }
        b.value = this.wz;
    };
    FinancialSeries.prototype.xa = function (a, b) {
        if (this.wi != null) {
            b.value = this.wi;
            return;
        }
        b.value = this.wq;
    };
    FinancialSeries.prototype.xb = function (a, b) {
        if (this.wk != null) {
            b.value = this.wk;
            return;
        }
        b.value = this.wv;
    };
    FinancialSeries.prototype.w9 = function (a, b) {
        if (this.wg != null) {
            b.value = this.wg;
            return;
        }
        b.value = this.wd;
    };
    FinancialSeries.prototype.xd = function (a, b) {
        if (this.wo != null) {
            b.value = this.wo;
            return;
        }
        b.value = this.w3;
    };
    FinancialSeries.prototype.jw = function () {
        if (this.dj()) {
            return this.bi.uf;
        }
        else {
            return this.bi.ub;
        }
    };
    FinancialSeries.prototype.o0 = function (a) {
        _super.prototype.o0.call(this, a);
        this.uq = a;
    };
    FinancialSeries.prototype.get_ek = function () {
        return true;
    };
    FinancialSeries.prototype.ag = function () {
        return [this.t9, this.uv];
    };
    FinancialSeries.prototype.ju = function (a, b) {
        var c = this.lv(b);
        if (c == FinancialSeries.$$p[11]) {
            return this.jv(a, b, this.wz);
        }
        if (c == FinancialSeries.$$p[6]) {
            return this.jv(a, b, this.wq);
        }
        if (c == FinancialSeries.$$p[9]) {
            return this.jv(a, b, this.wv);
        }
        if (c == FinancialSeries.$$p[0]) {
            return this.jv(a, b, this.wd);
        }
        if (c == FinancialSeries.$$p[13]) {
            return this.jv(a, b, this.w3);
        }
        return _super.prototype.ju.call(this, a, b);
    };
    FinancialSeries.prototype.v9 = function () {
        return 2;
    };
    FinancialSeries.prototype.v7 = function () {
        return 4;
    };
    FinancialSeries.prototype.ah = function (a) {
        var b = this.aj(this.t9, this.ub.f, this.v6(this.cj), this.v8(this.cj), this.tm(a), true);
        if (b == null) {
            return null;
        }
        var c = b[0];
        var d = b[1];
        var e = new Array(1);
        var f = new Array(2);
        var g = this.v9();
        f[0] = { $type: Point_$type, x: c[0], y: c[g] };
        f[1] = { $type: Point_$type, x: d[0], y: d[g] };
        e[0] = f;
        return e;
    };
    FinancialSeries.prototype.ai = function (a) {
        var b = this.aj(this.t9, this.ub.f, this.v6(this.cj), this.v8(this.cj), this.tm(a), true);
        if (b == null) {
            return null;
        }
        var c = b[0];
        var d = b[1];
        var e = new Array(1);
        var f = new Array(2);
        f[0] = { $type: Point_$type, x: c[0], y: c[1] };
        f[1] = { $type: Point_$type, x: d[0], y: d[1] };
        e[0] = f;
        return e;
    };
    FinancialSeries.prototype.s3 = function () {
        return this.xz;
    };
    FinancialSeries.prototype.s4 = function () {
        return this.xz;
    };
    FinancialSeries.prototype.ng = function () {
        _super.prototype.ng.call(this);
        this.t9 = null;
        this.uv = null;
    };
    FinancialSeries.prototype.get_dz = function () {
        return true;
    };
    FinancialSeries.prototype.get_fi = function () {
        return this.uv != null && this.uv.ch;
    };
    Object.defineProperty(FinancialSeries.prototype, "u5", {
        get: function () {
            return this.u0;
        },
        set: function (a) {
            if (this.u0 != a) {
                var b = this.u0;
                this.u0 = a;
                this.raisePropertyChanged("OpenColumn", b, this.u0);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "u3", {
        get: function () {
            return this.uy;
        },
        set: function (a) {
            if (this.uy != a) {
                var b = this.uy;
                this.uy = a;
                this.raisePropertyChanged("HighColumn", b, this.uy);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "u4", {
        get: function () {
            return this.uz;
        },
        set: function (a) {
            if (this.uz != a) {
                var b = this.uz;
                this.uz = a;
                this.raisePropertyChanged("LowColumn", b, this.uz);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "u2", {
        get: function () {
            return this.ux;
        },
        set: function (a) {
            if (this.ux != a) {
                var b = this.ux;
                this.ux = a;
                this.raisePropertyChanged("CloseColumn", b, this.ux);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "u7", {
        get: function () {
            return this.u1;
        },
        set: function (a) {
            if (this.u1 != a) {
                var b = this.u1;
                this.u1 = a;
                this.raisePropertyChanged("VolumeColumn", b, this.u1);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.fn = function () {
        return this.highlightedItemsSource != null || (this.wm != null && this.wi != null && this.wk != null && this.wg != null);
    };
    FinancialSeries.prototype.vh = function () {
        return (this.assigningCategoryStyle != null && this.va) || this.bs != 1;
    };
    FinancialSeries.prototype.xg = function (a) {
        if (this.assigningCategoryStyle != null && this.va) {
            this.assigningCategoryStyle(this, a);
        }
    };
    FinancialSeries.prototype.xe = function (a, b, c, d, e, f) {
        var g = this.bs != 1;
        this.ui.a3(this.ui.b, d.cn, a, b, c, d, e, f, false);
        this.ui.ab(this.hh);
        var h = this.ui.ay;
        var i = null;
        var j = this.c6;
        if (g && this.cy != null) {
            i = this.cy.a7.getHighlightingInfo(this, j, h.o, h.n, false);
            h.b = i;
        }
        h.f = f;
        this.xg(h);
        this.ui.z(this, i, f, g, b < 0);
    };
    FinancialSeries.prototype.vz = function (a) {
        return this.hx(a, this.t9);
    };
    FinancialSeries.prototype.jf = function (a, b) {
        return this.jg(a, b, this.t9, runOn(this, this.vz), new FinancialValueList(this.u5, this.u3, this.u4, this.u2, this.u7));
    };
    FinancialSeries.prototype.jd = function (a, b) {
        return this.je(a, b, this.t9, runOn(this, this.vz), new FinancialValueList(this.u5, this.u3, this.u4, this.u2, this.u7));
    };
    FinancialSeries.prototype.ht = function (a, b, c, d, e) {
        if (c == null) {
            return Number.POSITIVE_INFINITY;
        }
        var f = this.t9.lf;
        return this.hu(a, b, this.t9, d, e, f, runOn(this, this.vz));
    };
    FinancialSeries.prototype.getOffsetValue = function () {
        return this.v0(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj));
    };
    FinancialSeries.prototype.getCategoryWidth = function () {
        return this.t9.getCategorySize(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj));
    };
    FinancialSeries.prototype.th = function (a, b, c) {
        return this.tj(a, b, c, this.v0(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj)), this.uv, this.t9, null, null, null);
    };
    FinancialSeries.prototype.h9 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cj);
        var e = this.v0(this.cj.by, this.cj.bx, d);
        var f = new ScalerParams(0, this.cj.by, this.cj.bx, this.t9.ch, d);
        return this.ib(new FinancialValueList(this.u5, this.u3, this.u4, this.u2, this.u7), a, this.t9, f, e, runOn(this, this.vz), b, c);
    };
    FinancialSeries.prototype.h5 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cj);
        var e = this.v0(this.cj.by, this.cj.bx, d);
        var f = new ScalerParams(0, this.cj.by, this.cj.bx, this.t9.ch, d);
        return this.ib(this.u3, a, this.t9, f, e, runOn(this, this.vz), b, c);
    };
    FinancialSeries.prototype.h7 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cj);
        var e = this.v0(this.cj.by, this.cj.bx, d);
        var f = new ScalerParams(0, this.cj.by, this.cj.bx, this.t9.ch, d);
        return this.ib(this.u4, a, this.t9, f, e, runOn(this, this.vz), b, c);
    };
    FinancialSeries.prototype.v1 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cj);
        var e = this.v0(this.cj.by, this.cj.bx, d);
        var f = new ScalerParams(0, this.cj.by, this.cj.bx, this.t9.ch, d);
        return this.ib(this.u2, a, this.t9, f, e, runOn(this, this.vz), b, c);
    };
    FinancialSeries.prototype.v2 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cj);
        var e = this.v0(this.cj.by, this.cj.bx, d);
        var f = new ScalerParams(0, this.cj.by, this.cj.bx, this.t9.ch, d);
        return this.ib(this.u5, a, this.t9, f, e, runOn(this, this.vz), b, c);
    };
    FinancialSeries.prototype.v3 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cj);
        var e = this.v0(this.cj.by, this.cj.bx, d);
        var f = new ScalerParams(0, this.cj.by, this.cj.bx, this.t9.ch, d);
        return this.ib(this.u7, a, this.t9, f, e, runOn(this, this.vz), b, c);
    };
    FinancialSeries.prototype.td = function (a, b, c) {
        var _this = this;
        return this.tj(a, b, c, this.v0(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj)), this.uv, this.t9, runOn(this, this.h5), function (d, e) { return _this.jg(d, e, _this.t9, runOn(_this, _this.vz), _this.u3); }, function (d, e) { return _this.je(d, e, _this.t9, runOn(_this, _this.vz), _this.u3); });
    };
    FinancialSeries.prototype.tf = function (a, b, c) {
        var _this = this;
        return this.tj(a, b, c, this.v0(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj)), this.uv, this.t9, runOn(this, this.h7), function (d, e) { return _this.jg(d, e, _this.t9, runOn(_this, _this.vz), _this.u4); }, function (d, e) { return _this.je(d, e, _this.t9, runOn(_this, _this.vz), _this.u4); });
    };
    FinancialSeries.prototype.x1 = function (a, b, c) {
        var _this = this;
        return this.tj(a, b, c, this.v0(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj)), this.uv, this.t9, runOn(this, this.v2), function (d, e) { return _this.jg(d, e, _this.t9, runOn(_this, _this.vz), _this.u5); }, function (d, e) { return _this.je(d, e, _this.t9, runOn(_this, _this.vz), _this.u5); });
    };
    FinancialSeries.prototype.x0 = function (a, b, c) {
        var _this = this;
        return this.tj(a, b, c, this.v0(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj)), this.uv, this.t9, runOn(this, this.v1), function (d, e) { return _this.jg(d, e, _this.t9, runOn(_this, _this.vz), _this.u2); }, function (d, e) { return _this.je(d, e, _this.t9, runOn(_this, _this.vz), _this.u2); });
    };
    FinancialSeries.prototype.x2 = function (a, b, c) {
        var _this = this;
        return this.tj(a, b, c, this.v0(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj)), this.uv, this.t9, runOn(this, this.v3), function (d, e) { return _this.jg(d, e, _this.t9, runOn(_this, _this.vz), _this.u7); }, function (d, e) { return _this.je(d, e, _this.t9, runOn(_this, _this.vz), _this.u7); });
    };
    FinancialSeries.prototype.ob = function () {
        _super.prototype.ob.call(this);
        if (this.t9 != null) {
            this.t9.h8(false);
        }
        if (this.uv != null) {
            this.uv.h8(false);
        }
    };
    FinancialSeries.prototype.qn = function (a, b) {
        this.uq.b0.e(this.hj);
        this.pp(false);
    };
    FinancialSeries.prototype.qm = function (a, b) {
        if (this.f9 && this.iv < 0.05) {
            this.ga = true;
            this.gd = false;
            this.ft = false;
        }
        this.uq.b0.e(this.hj);
        this.pp(false);
    };
    FinancialSeries.prototype.u6 = function (a, b, c) {
        var d = this.c3(b);
        this.vk.addItem(d, b);
        this.vl.addItem(b, c);
        return d;
    };
    FinancialSeries.prototype.w8 = function (a, b) {
        if (b == null) {
            return;
        }
        a.deregisterColumn(b);
        var c = this.vk.item(b);
        this.vl.removeItem(c);
        this.vk.removeItem(b);
    };
    FinancialSeries.prototype.o8 = function (a, b, c, d) {
        _super.prototype.o8.call(this, a, b, c, d);
        switch (b) {
            case "SyncLink":
                if (this.cr != null && this.cy != null) {
                    this.uq.b0.e(this.hj);
                    this.pp(false);
                }
                break;
            case "SeriesViewer":
                if (c != null && d == null) {
                    if (this.t9 != null) {
                        this.t9.b0(this);
                    }
                    if (this.uv != null) {
                        this.uv.b0(this);
                    }
                }
                if (c == null && d != null) {
                    if (this.t9 != null) {
                        this.t9.ct(this);
                    }
                    if (this.uv != null) {
                        this.uv.ct(this);
                    }
                }
                this.uq.b0.e(this.hj);
                this.pp(false);
                break;
            case "FastItemsSource":
                this.u9 = true;
                if (typeCast(IFastItemsSource_$type, c) != null) {
                    this.w8(typeCast(IFastItemsSource_$type, c), this.u5);
                    this.w8(typeCast(IFastItemsSource_$type, c), this.u3);
                    this.w8(typeCast(IFastItemsSource_$type, c), this.u4);
                    this.w8(typeCast(IFastItemsSource_$type, c), this.u2);
                    this.w8(typeCast(IFastItemsSource_$type, c), this.u7);
                    this.u5 = null;
                    this.u3 = null;
                    this.u4 = null;
                    this.u2 = null;
                    this.u7 = null;
                }
                if (typeCast(IFastItemsSource_$type, d) != null) {
                    if (stringIsNullOrEmpty(this.wz) == false) {
                        this.u5 = this.u6(typeCast(IFastItemsSource_$type, d), this.wz, "OpenColumn");
                    }
                    if (stringIsNullOrEmpty(this.wq) == false) {
                        this.u3 = this.u6(typeCast(IFastItemsSource_$type, d), this.wq, "HighColumn");
                    }
                    if (stringIsNullOrEmpty(this.wv) == false) {
                        this.u4 = this.u6(typeCast(IFastItemsSource_$type, d), this.wv, "LowColumn");
                    }
                    if (stringIsNullOrEmpty(this.wd) == false) {
                        this.u2 = this.u6(typeCast(IFastItemsSource_$type, d), this.wd, "CloseColumn");
                    }
                    if (stringIsNullOrEmpty(this.w3) == false) {
                        this.u7 = this.u6(typeCast(IFastItemsSource_$type, d), this.w3, "VolumeColumn");
                    }
                }
                this.u9 = false;
                if (this.uv != null && !this.uv.c1()) {
                    this.uq.b0.e(this.hj);
                    this.pp(this.fq && c != null);
                }
                break;
            case FinancialSeries.$$p[11]:
                if (this.c6 != null) {
                    this.w8(this.c6, this.u5);
                    this.u5 = this.u6(this.c6, this.wz, "OpenColumn");
                }
                break;
            case "OpenColumn":
                if (this.uv != null && !this.uv.c1() && !this.u9) {
                    this.uq.b0.e(this.hj);
                    this.pp(this.fq && this.dn);
                }
                break;
            case FinancialSeries.$$p[6]:
                if (this.c6 != null) {
                    this.w8(this.c6, this.u3);
                    this.u3 = this.u6(this.c6, this.wq, "HighColumn");
                }
                break;
            case "HighColumn":
                if (this.uv != null && !this.uv.c1() && !this.u9) {
                    this.uq.b0.e(this.hj);
                    this.pp(this.fq && this.dn);
                }
                break;
            case FinancialSeries.$$p[9]:
                if (this.c6 != null) {
                    this.w8(this.c6, this.u4);
                    this.u4 = this.u6(this.c6, this.wv, "LowColumn");
                }
                break;
            case "LowColumn":
                if (this.uv != null && !this.uv.c1() && !this.u9) {
                    this.uq.b0.e(this.hj);
                    this.pp(this.fq && this.dn);
                }
                break;
            case FinancialSeries.$$p[0]:
                if (this.c6 != null) {
                    this.w8(this.c6, this.u2);
                    this.u2 = this.u6(this.c6, this.wd, "CloseColumn");
                }
                break;
            case "CloseColumn":
                if (this.uv != null && !this.uv.c1() && !this.u9) {
                    this.uq.b0.e(this.hj);
                    this.pp(this.fq && this.dn);
                }
                this.xi();
                break;
            case FinancialSeries.$$p[13]:
                if (this.c6 != null) {
                    this.w8(this.c6, this.u7);
                    this.u7 = this.u6(this.c6, this.w3, "VolumeColumn");
                }
                break;
            case "VolumeColumn":
                if (this.uv != null && !this.uv.c1() && !this.u9) {
                    this.uq.b0.e(this.hj);
                    this.pp(this.fq && this.dn);
                }
                break;
            case FinancialSeries.$$p[14]:
                if (c != null) {
                    c.b0(this);
                }
                if (d != null) {
                    d.ct(this);
                }
                this.uq.b0.e(this.hj);
                this.pp(false);
                this.ol();
                this.uu = typeCast(ITimeRangeSelectorAxis_$type, this.t9);
                break;
            case FinancialSeries.$$p[15]:
                if (c != null) {
                    c.b0(this);
                }
                if (d != null) {
                    d.ct(this);
                }
                this.uq.b0.e(this.hj);
                if (this.uv != null) {
                    this.uv.c1();
                }
                {
                    this.pp(false);
                }
                this.ol();
                break;
            case "TransitionProgress":
                this.uf.c(this.iv, this.ud, this.ub);
                if (this.dl(this.cj)) {
                    return;
                }
                if (this.iv == 1) {
                    this.ub.v();
                    this.xh(this.ub, this.uq);
                    if (this.f9) {
                        this.f9 = false;
                        this.nk();
                        this.cz.r = truncate(this.id());
                        this.cz.b = this.c0;
                    }
                }
                else {
                    this.xh(this.uf, this.uq);
                }
                if (this.cy != null) {
                    this.cy.on(this);
                }
                break;
            case FinancialSeries.$$p[10]:
                this.pp(false);
                break;
            case "IsCustomCategoryStyleAllowed":
                this.va = this.vd();
                this.pp(false);
                break;
            case "CategoryMode":
                if (this.t9 != null) {
                    this.t9.l5(true);
                }
                break;
        }
    };
    FinancialSeries.prototype.vc = function (a) {
        if (typeCast(NumericYAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    FinancialSeries.prototype.vb = function (a) {
        if (typeCast(CategoryXAxis.$, a) !== null || a.ce) {
            return true;
        }
        return false;
    };
    FinancialSeries.prototype.t2 = function (a, b, c) {
        if (b < a || a < 0 || a > this.c6.count || b < 0 || b > this.c6.count || c == null) {
            return null;
        }
        var d = new Array((b - a) + 1);
        var e = c.cn;
        var f = null;
        if (e) {
            f = c.i$b;
        }
        for (var g = a; g <= b; g++) {
            var h = g;
            if (e) {
                h = f._inner[h];
            }
            d[g - a] = this.c6.item(g);
        }
        return d;
    };
    FinancialSeries.prototype.v6 = function (a) {
        return a.b0.b;
    };
    FinancialSeries.prototype.v8 = function (a) {
        return a.b0.c;
    };
    FinancialSeries.prototype.t1 = function (a, b) {
        return this.t2(a, b, this.uv);
    };
    FinancialSeries.prototype.get_es = function () {
        return true;
    };
    FinancialSeries.prototype.nh = function () {
        _super.prototype.nh.call(this);
        this.ut = null;
    };
    FinancialSeries.prototype.ax = function (a, b, c) {
        if (this.du && this.fc(this.bs) && !c) {
            var d = this.us(a, b, this.ut);
            this.ut = d;
            return d;
        }
        else {
            var e = this.ur(a, b, this.ut);
            this.ut = e;
            return e;
        }
    };
    FinancialSeries.prototype.wa = function (a) {
        var b = this.uc();
        var c = this.cj.bx;
        var d = this.cj.by;
        var e = this.t9;
        var f = 0;
        if (e.cp) {
            var g = (a.y - d.top) / d.height;
            f = g * c.height + c.top;
        }
        else {
            var h = (a.x - d.left) / d.width;
            f = h * c.width + c.left;
        }
        var i = b.f.count;
        var j = 0;
        for (j = 0; j < i; j++) {
            var k = b.f._inner[j];
            var l = null;
            if (j < i - 1) {
                l = b.f._inner[j + 1];
            }
            if (k[0] <= f && l == null || l[0] >= f) {
                if (l != null) {
                    if (Math.abs(k[0] - f) < Math.abs(l[0] - f)) {
                        return j;
                    }
                    else {
                        return j + 1;
                    }
                }
                else {
                    return j;
                }
            }
        }
        return j;
    };
    FinancialSeries.prototype.us = function (a, b, c) {
        var d = this.c6.count;
        var e = this.uq.b0.c;
        var f = this.uq.b0.d;
        var g = this.uq.b0.b;
        var h = this.t9;
        var i = -1;
        var j = -1;
        if (h.cn) {
            var k = this.uc();
            var l = this.wa(b);
            i = l;
            j = l;
        }
        else {
            var m = this.i8(b);
            i = truncate(Math.floor((intDivide(m, g)))) * g;
            j = i + (g - 1);
        }
        if (c != null && c.h == i && c.g == j) {
            return c;
        }
        var n = new HighlightingInfo();
        n.b = this;
        n.h = i;
        n.g = j;
        return n;
    };
    FinancialSeries.prototype.ur = function (a, b, c) {
        var d = new HighlightingInfo();
        d.b = this;
        d.h = 0;
        d.g = this.c6.count - 1;
        d.d = true;
        if (c != null && c.h == d.h && c.g == d.g) {
            return c;
        }
        return d;
    };
    FinancialSeries.prototype.vd = function () {
        return this.vf;
    };
    FinancialSeries.prototype.hv = function (a) {
        var b = this.cj.by;
        var c = this.cj.bx;
        var d = -1;
        if (!b.isEmpty && !c.isEmpty && this.t9 != null) {
            var e = this.getEffectiveViewport1(this.cj);
            var f = new ScalerParams(0, b, c, this.t9.ch, e);
            var g = this.to(this.cj);
            var h = this.t9.em(g.left, f);
            var i = this.t9.em(g.right, f);
            var j = (a.x - b.left) / b.width;
            var k = h + (j * (i - h));
            if (this.t9.categoryMode != 0) {
                k -= 0.5;
            }
            d = k;
        }
        return d;
    };
    FinancialSeries.prototype.i8 = function (a) {
        return truncate(Math.round(this.hv(a)));
    };
    FinancialSeries.prototype.get_e5 = function () {
        return typeCast(ISortingAxis_$type, this.t9) !== null;
    };
    FinancialSeries.prototype.as = function () {
        return this.t9;
    };
    FinancialSeries.prototype.ja = function (a) {
        var b = this.cj.by;
        var c = this.cj.bx;
        var d = this.getEffectiveViewport1(this.cj);
        if (b.isEmpty || c.isEmpty) {
            return -1;
        }
        var e = new Rect(0, 0, 0, 1, 1);
        var f = new ScalerParams(0, b, c, this.t9.ch, d);
        var g = typeCast(ISortingAxis_$type, this.t9);
        var h = this.to(this.cj);
        var i = h.left;
        var j = h.right;
        var k = this.tc(a).x;
        var l = this.t9.em(k, f);
        var m = this.t9.em(i, f);
        var n = this.t9.em(j, f);
        l = Math.max(m, Math.min(n, l));
        var o = g.i$f(l);
        return o;
    };
    FinancialSeries.prototype.jr = function (a) {
        var b = 0;
        if (typeCast(ISortingAxis_$type, this.t9) !== null) {
            b = this.ja(a);
            if (b == -1) {
                return null;
            }
        }
        else {
            b = this.i8(a);
        }
        return b >= 0 && this.c6 != null && b < this.c6.count ? this.c6.item(b) : null;
    };
    FinancialSeries.prototype.uc = function () {
        var a = this.ub;
        if (this.dj()) {
            if (this.cz.g) {
                this.cz.t();
            }
            a = this.uf;
        }
        return a;
    };
    FinancialSeries.prototype.v0 = function (a, b, c) {
        if (this.t9 == null) {
            return 0;
        }
        return this.t9.k5(a, b, c, this.index);
    };
    FinancialSeries.prototype.fw = function () {
        return this.vg;
    };
    FinancialSeries.prototype.uj = function () {
        return 11;
    };
    FinancialSeries.prototype.cs = function () {
        return 3;
    };
    FinancialSeries.prototype.cu = function () {
        return 3;
    };
    FinancialSeries.prototype.xh = function (a, b) {
        this.ow();
        this.tn = a.aa;
        b.aw();
    };
    FinancialSeries.prototype.xf = function (a, b) {
        a.u();
    };
    FinancialSeries.prototype.gl = function (a, b, c) {
        var d = _super.prototype.gl.call(this, a, b, c);
        var e = c;
        if (this.c6 == null || this.c6.count == 0 || !c.o() || b.isEmpty || a.isEmpty || this.t9 == null || this.uv == null || e.b0.b < 1 || this.t9.bi == null || this.uv.bi == null || this.uv.lx == this.uv.lw || this.t9.itemsSource == null || this.t9.lf < 1) {
            e.b0.b = 0;
            d = false;
        }
        return d;
    };
    FinancialSeries.prototype.getViewInfo = function (a, b) {
        b = this.cj.by;
        a = this.cj.bx;
        return {
            p0: a,
            p1: b
        };
    };
    FinancialSeries.prototype.v4 = function (a) {
        var b = 0;
        var c = a.by;
        var d = a.bx;
        var e = this.getEffectiveViewport1(this.cj);
        if (!c.isEmpty && !d.isEmpty && this.uv != null) {
            var f = new ScalerParams(0, c, d, this.uv.ch, e);
            f.b = this.h2();
            b = this.uv.ej(this.uv.l7, f);
        }
        return b;
    };
    FinancialSeries.prototype.nk = function () {
        _super.prototype.nk.call(this);
        this.ud.v();
        this.ub.v();
        this.uf.v();
    };
    FinancialSeries.prototype.pq = function (a) {
        var _this = this;
        _super.prototype.pq.call(this, a);
        this.uq.b0.e(this.hj);
        if (this.dl(this.cj)) {
            return;
        }
        if (this.f0) {
            if (this.dj()) {
                this.xh(this.uf, this.uq);
            }
            else {
                this.xh(this.ub, this.uq);
            }
            return;
        }
        if (this.fp(a)) {
            var b = this.ud;
            if (this.dj()) {
                if (this.cz.g) {
                    this.cz.t();
                }
                this.ud = this.uf;
                this.uf = b;
            }
            else {
                this.ud = this.ub;
                this.ub = b;
            }
            this.xf(this.ub, this.uq);
            var c = false;
            if (this.gb) {
                this.cz.w();
                this.cz.r = truncate(this.ie());
                this.cz.b = this.c1 != null ? this.c1 : this.c0;
                if (this.gc) {
                    var d = this.uf;
                    this.uf = this.ud;
                    this.ud = d;
                    c = true;
                }
                this.ul.s(this, this.ud, this.ub, this.isVertical, this.t9, this.uv, this.uk, this.uj(), this.ct, this.cs(), function () { return _this.v4(_this.uq); }, this.uq.bx);
                if (this.gc) {
                    var e = this.uf;
                    this.uf = this.ud;
                    this.ud = e;
                }
                this.gc = false;
            }
            if (this.ge) {
                this.cz.w();
                this.cz.r = truncate(this.ig());
                this.cz.b = this.c2 != null ? this.c2 : this.c0;
                if (this.f9) {
                    var f = this.uf;
                    this.uf = this.ud;
                    this.ud = f;
                    c = true;
                }
                this.ul.s(this, this.ud, this.ub, this.isVertical, this.t9, this.uv, this.uk, this.uj(), this.ct, this.cs(), function () { return _this.v4(_this.uq); }, this.uq.bx);
                var g = this.ub;
                this.ub = this.ud;
                this.ud = g;
                if (this.f9) {
                    var h = this.uf;
                    this.uf = this.ud;
                    this.ud = h;
                }
                this.f9 = false;
            }
            this.dq = false;
            if (!c) {
                this.nf();
            }
            this.p3();
            if (this.gb) {
                this.ga = false;
                this.gd = false;
                this.ft = false;
                this.f9 = true;
            }
            if (this.ge) {
                this.gd = false;
                this.gc = true;
            }
        }
        else {
            this.xf(this.ub, this.uq);
            this.xh(this.ub, this.uq);
        }
    };
    FinancialSeries.prototype.fx = function () {
        return true;
    };
    FinancialSeries.prototype.vi = function (a) {
        var e_1, _a;
        try {
            for (var _b = __values(fromEnum(a)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                switch (b) {
                    case "HighColumn":
                        if (this.u3 == null) {
                            return false;
                        }
                        break;
                    case "LowColumn":
                        if (this.u4 == null) {
                            return false;
                        }
                        break;
                    case "OpenColumn":
                        if (this.u5 == null) {
                            return false;
                        }
                        break;
                    case "CloseColumn":
                        if (this.u2 == null) {
                            return false;
                        }
                        break;
                    case "VolumeColumn":
                        if (this.u7 == null) {
                            return false;
                        }
                        break;
                }
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        return true;
    };
    Object.defineProperty(FinancialSeries.prototype, "vj", {
        get: function () {
            return this.t9 != null && typeCast(ISortingAxis_$type, this.t9) !== null;
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.ve = function () {
        return this.typical != null;
    };
    FinancialSeries.prototype.w7 = function (a) {
        this.typical(this, a);
    };
    Object.defineProperty(FinancialSeries.prototype, "vr", {
        get: function () {
            return this.vo();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._vo = function () {
        var a, b, _a, _b, c, e_2_1, d, e, f, g, h;
        var e_2, _c;
        return __generator(this, function (_d) {
            switch (_d.label) {
                case 0:
                    a = false;
                    if (!this.ve())
                        return [3 /*break*/, 8];
                    b = this.um(0, this.c6.count);
                    this.w7(new FinancialEventArgs(0, this.c6.count, b, this.un(b), this));
                    if (!(b.typicalColumn != null))
                        return [3 /*break*/, 8];
                    a = true;
                    _d.label = 1;
                case 1:
                    _d.trys.push([1, 6, 7, 8]);
                    _a = __values(fromEnum(b.typicalColumn)), _b = _a.next();
                    _d.label = 2;
                case 2:
                    if (!!_b.done)
                        return [3 /*break*/, 5];
                    c = _b.value;
                    return [4 /*yield*/, c];
                case 3:
                    _d.sent();
                    _d.label = 4;
                case 4:
                    _b = _a.next();
                    return [3 /*break*/, 2];
                case 5: return [3 /*break*/, 8];
                case 6:
                    e_2_1 = _d.sent();
                    e_2 = { error: e_2_1 };
                    return [3 /*break*/, 8];
                case 7:
                    try {
                        if (_b && !_b.done && (_c = _a.return))
                            _c.call(_a);
                    }
                    finally {
                        if (e_2)
                            throw e_2.error;
                    }
                    return [7 /*endfinally*/];
                case 8:
                    if (!!a)
                        return [3 /*break*/, 17];
                    if (!(this.vj && this.t9.i$b != null))
                        return [3 /*break*/, 13];
                    d = this.c6.count;
                    e = this.t9.i$b;
                    f = 0;
                    _d.label = 9;
                case 9:
                    if (!(f < d))
                        return [3 /*break*/, 12];
                    return [4 /*yield*/, (this.u3.item(e.item(f)) + this.u4.item(e.item(f)) + this.u2.item(e.item(f))) / 3];
                case 10:
                    _d.sent();
                    _d.label = 11;
                case 11:
                    ++f;
                    return [3 /*break*/, 9];
                case 12: return [3 /*break*/, 17];
                case 13:
                    g = this.c6.count;
                    h = 0;
                    _d.label = 14;
                case 14:
                    if (!(h < g))
                        return [3 /*break*/, 17];
                    return [4 /*yield*/, (this.u3.item(h) + this.u4.item(h) + this.u2.item(h)) / 3];
                case 15:
                    _d.sent();
                    _d.label = 16;
                case 16:
                    ++h;
                    return [3 /*break*/, 14];
                case 17: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.vo = function () {
        var _this = this;
        return toEnum(function () { return _this._vo(); });
    };
    Object.defineProperty(FinancialSeries.prototype, "vq", {
        get: function () {
            return this.vn();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._vn = function () {
        var a, b, c, d, e;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (!(this.vj && this.t9.i$b != null))
                        return [3 /*break*/, 7];
                    a = this.u3.count;
                    b = this.t9.i$b;
                    if (!(a > 0))
                        return [3 /*break*/, 2];
                    return [4 /*yield*/, this.v5(this.u3.item(b.item(0)) - this.u4.item(b.item(0)))];
                case 1:
                    _a.sent();
                    _a.label = 2;
                case 2:
                    c = 1;
                    _a.label = 3;
                case 3:
                    if (!(c < a))
                        return [3 /*break*/, 6];
                    return [4 /*yield*/, Math.max(this.v5(this.u3.item(b.item(c)) - this.u4.item(b.item(c))), Math.max(this.v5(Math.abs(this.u3.item(b.item(c)) - this.u2.item(b.item(c - 1)))), this.v5(Math.abs(this.u4.item(b.item(c)) - this.u2.item(b.item(c - 1))))))];
                case 4:
                    _a.sent();
                    _a.label = 5;
                case 5:
                    ++c;
                    return [3 /*break*/, 3];
                case 6: return [3 /*break*/, 13];
                case 7:
                    d = this.u3.count;
                    if (!(d > 0))
                        return [3 /*break*/, 9];
                    return [4 /*yield*/, this.v5(this.u3.item(0) - this.u4.item(0))];
                case 8:
                    _a.sent();
                    _a.label = 9;
                case 9:
                    e = 1;
                    _a.label = 10;
                case 10:
                    if (!(e < d))
                        return [3 /*break*/, 13];
                    return [4 /*yield*/, Math.max(this.v5(this.u3.item(e) - this.u4.item(e)), Math.max(this.v5(Math.abs(this.u3.item(e) - this.u2.item(e - 1))), this.v5(Math.abs(this.u4.item(e) - this.u2.item(e - 1)))))];
                case 11:
                    _a.sent();
                    _a.label = 12;
                case 12:
                    ++e;
                    return [3 /*break*/, 10];
                case 13: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.vn = function () {
        var _this = this;
        return toEnum(function () { return _this._vn(); });
    };
    Object.defineProperty(FinancialSeries.prototype, "vp", {
        get: function () {
            return this.vm();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._vm = function () {
        var a, b, c, d, e;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (!(this.vj && this.t9.i$b != null))
                        return [3 /*break*/, 7];
                    a = this.u4.count;
                    b = this.t9.i$b;
                    if (!(a > 0))
                        return [3 /*break*/, 2];
                    return [4 /*yield*/, this.v5(this.u4.item(b.item(0)))];
                case 1:
                    _a.sent();
                    _a.label = 2;
                case 2:
                    c = 1;
                    _a.label = 3;
                case 3:
                    if (!(c < a))
                        return [3 /*break*/, 6];
                    return [4 /*yield*/, Math.min(this.v5(this.u4.item(b.item(c))), this.v5(this.u2.item(b.item(c - 1))))];
                case 4:
                    _a.sent();
                    _a.label = 5;
                case 5:
                    c++;
                    return [3 /*break*/, 3];
                case 6: return [3 /*break*/, 13];
                case 7:
                    d = this.u4.count;
                    if (!(d > 0))
                        return [3 /*break*/, 9];
                    return [4 /*yield*/, this.v5(this.u4.item(0))];
                case 8:
                    _a.sent();
                    _a.label = 9;
                case 9:
                    e = 1;
                    _a.label = 10;
                case 10:
                    if (!(e < d))
                        return [3 /*break*/, 13];
                    return [4 /*yield*/, Math.min(this.v5(this.u4.item(e)), this.v5(this.u2.item(e - 1)))];
                case 11:
                    _a.sent();
                    _a.label = 12;
                case 12:
                    e++;
                    return [3 /*break*/, 10];
                case 13: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.vm = function () {
        var _this = this;
        return toEnum(function () { return _this._vm(); });
    };
    FinancialSeries.prototype.vt = function (a) {
        if (a == null) {
            return null;
        }
        if (this.vj && this.t9.i$b != null) {
            return new SafeSortedReadOnlyDoubleCollection(0, a, this.t9.i$b);
        }
        return new SafeReadOnlyDoubleCollection(0, a);
    };
    FinancialSeries.prototype.vs = function () {
        var a = new List$1(String_$type, 0);
        a.add("HighColumn");
        a.add("LowColumn");
        a.add("CloseColumn");
        if (this.typicalBasedOn != null && this.c6 != null && !this.u8) {
            this.u8 = true;
            var b = this.um(0, this.c6.count);
            this.u8 = false;
            var c = new FinancialEventArgs(0, this.c6.count, b, this.un(b), this);
            this.typicalBasedOn(this, c);
            if (c.basedOn != null && c.basedOn.count > 0) {
                return c.basedOn;
            }
        }
        return a;
    };
    FinancialSeries.prototype.getOpenColumnAsArray = function () {
        if (this.u5 == null) {
            return null;
        }
        if (this.t9 != null && typeCast(ISortingAxis_$type, this.t9) !== null) {
            if (this.vx != null) {
                return this.vx.asArray();
            }
            var a = new List$1(Number_$type, 2, this.u5.count);
            var b = this.t9.i$b;
            var c = this.u5.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.vx = a;
            return this.vx.asArray();
        }
        else {
            return this.u5.asArray();
        }
    };
    FinancialSeries.prototype.getHighColumnAsArray = function () {
        if (this.u3 == null) {
            return null;
        }
        if (this.t9 != null && typeCast(ISortingAxis_$type, this.t9) !== null) {
            if (this.vv != null) {
                return this.vv.asArray();
            }
            var a = new List$1(Number_$type, 2, this.u3.count);
            var b = this.t9.i$b;
            var c = this.u3.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.vv = a;
            return this.vv.asArray();
        }
        else {
            return this.u3.asArray();
        }
    };
    FinancialSeries.prototype.getLowColumnAsArray = function () {
        if (this.u4 == null) {
            return null;
        }
        if (this.t9 != null && typeCast(ISortingAxis_$type, this.t9) !== null) {
            if (this.vw != null) {
                return this.vw.asArray();
            }
            var a = new List$1(Number_$type, 2, this.u4.count);
            var b = this.t9.i$b;
            var c = this.u4.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.vw = a;
            return this.vw.asArray();
        }
        else {
            return this.u4.asArray();
        }
    };
    FinancialSeries.prototype.getCloseColumnAsArray = function () {
        if (this.u2 == null) {
            return null;
        }
        if (this.t9 != null && typeCast(ISortingAxis_$type, this.t9) !== null) {
            if (this.vu != null) {
                return this.vu.asArray();
            }
            var a = new List$1(Number_$type, 2, this.u2.count);
            var b = this.t9.i$b;
            var c = this.u2.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.vu = a;
            return this.vu.asArray();
        }
        else {
            return this.u2.asArray();
        }
    };
    FinancialSeries.prototype.getVolumeColumnAsArray = function () {
        if (this.u7 == null) {
            return null;
        }
        if (this.t9 != null && typeCast(ISortingAxis_$type, this.t9) !== null) {
            if (this.vy != null) {
                return this.vy.asArray();
            }
            var a = new List$1(Number_$type, 2, this.u7.count);
            var b = this.t9.i$b;
            var c = this.u7.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.vy = a;
            return this.vy.asArray();
        }
        else {
            return this.u7.asArray();
        }
    };
    FinancialSeries.prototype.no = function (a, b, c, d) {
        _super.prototype.no.call(this, a, b, c, d);
        if (this.t9 == null || !(typeCast(ISortingAxis_$type, this.t9) !== null)) {
            return;
        }
        var e = this.t9.i$b;
        switch (a) {
            case 1:
                for (var f = b; f < c; f++) {
                    var g = e._inner[f];
                    if (this.vx != null) {
                        this.vx.insert(f, this.u5.item(g));
                    }
                    if (this.vv != null) {
                        this.vv.insert(f, this.u3.item(g));
                    }
                    if (this.vw != null) {
                        this.vw.insert(f, this.u4.item(g));
                    }
                    if (this.vu != null) {
                        this.vu.insert(f, this.u2.item(g));
                    }
                    if (this.vy != null) {
                        this.vy.insert(f, this.u7.item(g));
                    }
                }
                break;
            case 0:
                if (this.vx != null) {
                    this.vx.v(b, c);
                }
                if (this.vv != null) {
                    this.vv.v(b, c);
                }
                if (this.vw != null) {
                    this.vw.v(b, c);
                }
                if (this.vu != null) {
                    this.vu.v(b, c);
                }
                if (this.vy != null) {
                    this.vy.v(b, c);
                }
                break;
            case 4:
                if (this.vx != null) {
                    this.vx = new List$1(Number_$type, 0);
                }
                if (this.vv != null) {
                    this.vv = new List$1(Number_$type, 0);
                }
                if (this.vw != null) {
                    this.vw = new List$1(Number_$type, 0);
                }
                if (this.vu != null) {
                    this.vu = new List$1(Number_$type, 0);
                }
                if (this.vy != null) {
                    this.vy = new List$1(Number_$type, 0);
                }
                break;
            case 3:
            case 2:
                for (var h = b; h < c; h++) {
                    var i = e._inner[h];
                    if (this.vx != null) {
                        this.vx._inner[h] = this.u5.item(i);
                    }
                    if (this.vv != null) {
                        this.vv._inner[h] = this.u3.item(i);
                    }
                    if (this.vw != null) {
                        this.vw._inner[h] = this.u4.item(i);
                    }
                    if (this.vu != null) {
                        this.vu._inner[h] = this.u2.item(i);
                    }
                    if (this.vy != null) {
                        this.vy._inner[h] = this.u7.item(i);
                    }
                }
                break;
        }
        this.xi();
        this.qj();
    };
    FinancialSeries.prototype.um = function (a, b) {
        var _this = this;
        var c = this.vt(this.u5);
        var d = this.vt(this.u2);
        var e = this.vt(this.u3);
        var f = this.vt(this.u4);
        var g = this.vt(this.u7);
        var h = ((function () {
            var $ret = new FinancialCalculationDataSource();
            $ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(_this.vr), _this.vs());
            $ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(_this.vq), ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("HighColumn");
                $ret.add("LowColumn");
                $ret.add("CloseColumn");
                return $ret;
            })()));
            $ret.trueLow = new CalculatedColumn(1, new SafeEnumerable(_this.vp), ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("LowColumn");
                $ret.add("CloseColumn");
                return $ret;
            })()));
            $ret.openColumn = c;
            $ret.closeColumn = d;
            $ret.highColumn = e;
            $ret.lowColumn = f;
            $ret.volumeColumn = g;
            $ret.calculateFrom = a;
            $ret.calculateCount = b;
            $ret.minimumValue = NaN;
            $ret.maximumValue = NaN;
            $ret.count = _this.c6 != null ? _this.c6.count : 0;
            return $ret;
        })());
        return h;
    };
    FinancialSeries.prototype.v5 = function (a) {
        if (isInfinity(a) || isNaN_(a)) {
            return 0;
        }
        return a;
    };
    FinancialSeries.prototype.un = function (a) {
        var _this = this;
        return ((function () {
            var $ret = new FinancialCalculationSupportingCalculations();
            $ret.a = new ColumnSupportingCalculation(1, TrendCalculators.b, new List$1(String_$type, 0));
            $ret.c = new ColumnSupportingCalculation(1, TrendCalculators.e, new List$1(String_$type, 0));
            $ret.d = new ColumnSupportingCalculation(1, TrendCalculators.f, new List$1(String_$type, 0));
            $ret.b = new ColumnSupportingCalculation(1, TrendCalculators.d, new List$1(String_$type, 0));
            $ret.h = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.volumeColumn, b.shortPeriod); }, ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.f = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.volumeColumn, b.longPeriod); }, ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.g = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.typicalColumn, b.shortPeriod); }, a.typicalColumn.basedOn);
            $ret.e = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.typicalColumn, b.longPeriod); }, a.typicalColumn.basedOn);
            $ret.k = Series.gx;
            $ret.j = Series.gw;
            $ret.i = runOn(_this, _this.v5);
            return $ret;
        })());
    };
    Object.defineProperty(FinancialSeries.prototype, "categoryAxis", {
        get: function () {
            return this.t9;
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.pr = function (a, b) {
        _super.prototype.pr.call(this, a, b);
        if (!this.f8) {
            this.cj.a4(b);
            return;
        }
        var c = typeCast(FinancialSeriesView.$, this.ci);
        this.cj.a4(b);
        c.b0.e(this.hj);
        if (this.dl(this.ci)) {
            return;
        }
        if (!this.f1) {
            this.xf(this.ue, c);
        }
        this.f1 = false;
        this.xh(this.ue, c);
        this.f8 = false;
    };
    FinancialSeries.prototype.po = function (a, b, c, d, e) {
        _super.prototype.po.call(this, a, b, c, d, e);
        var f = this.a7.a$h.item(d);
        var g = f;
        g.b0.e(this.hj);
        f.a3(c);
        if (this.dl(g)) {
            return;
        }
        if (this.ua == null) {
            this.ua = new CategoryFrame(3);
        }
        this.ua.u();
        this.xf(this.ua, g);
        this.xh(this.ua, g);
    };
    FinancialSeries.prototype.ao = function (a) {
        if (this.t9 == a) {
            return this.uv;
        }
        if (this.uv == a) {
            return this.t9;
        }
        return null;
    };
    FinancialSeries.prototype.preferredCategoryMode = function (a) {
        var b = typeCast(IDateTimeAxis_$type, this.t9);
        return b != null ? b.preferredCategoryMode(this) : this.uh;
    };
    Object.defineProperty(FinancialSeries.prototype, "uh", {
        get: function () {
            return this.ug;
        },
        set: function (a) {
            var b = this.uh;
            if (a != b) {
                this.ug = a;
                this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.uh));
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.get_ez = function () {
        return true;
    };
    FinancialSeries.prototype.pz = function (a, b) {
        _super.prototype.pz.call(this, a, b);
        this.xz = a;
    };
    FinancialSeries.prototype.xi = function () {
        this.hr = this.u2 == null || this.u2.count == 0 ? NaN : this.u2.item(this.u2.count - 1);
    };
    FinancialSeries.prototype.jt = function (a) {
        if (this.uu != null && a != null) {
            if (this.uw == null || this.uw.propertyName != this.uu.dateTimeMemberPath) {
                this.uw = new FastReflectionHelper(false, this.uu.dateTimeMemberPath);
            }
            var b = this.uw.getPropertyValue(a);
            if (typeCast(Date_$type, b) !== null) {
                return dateToStringFormat(b, this.uu.itemLabelFormat());
            }
        }
        return _super.prototype.jt.call(this, a);
    };
    FinancialSeries.$t = markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
    FinancialSeries.$$p = markDep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:wd:xj', [2, null], 'HighlightedCloseMemberPath:wg:xk', [2, null], 'HighlightedHighMemberPath:wi:xl', [2, null], 'HighlightedLowMemberPath:wk:xm', [2, null], 'HighlightedOpenMemberPath:wm:xn', [2, null], 'HighlightedVolumeMemberPath:wo:xo', [2, null], 'HighMemberPath:wq:xp', [2, null], 'IsCustomCategoryStyleAllowed:vf:xq', [0, false], 'IsTransitionInEnabled:vg:xr', [0, false], 'LowMemberPath:wv:xs', [2, null], 'NegativeBrush:xz:xt', [Brush.$, null], 'OpenMemberPath:wz:xu', [2, null], 'TransitionInMode:uk:xv', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:w3:xw', [2, null], 'XAxis:t9:xx', [CategoryAxisBase.$, null], 'YAxis:uv:xy', [NumericYAxis.$, null]]);
    return FinancialSeries;
}(Series));
export { FinancialSeries };
/**
 * @hidden
 */
var FinancialCalculationSupportingCalculations = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialCalculationSupportingCalculations, _super);
    function FinancialCalculationSupportingCalculations() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.a = null;
        _this.c = null;
        _this.d = null;
        _this.b = null;
        _this.h = null;
        _this.f = null;
        _this.g = null;
        _this.e = null;
        _this.k = null;
        _this.j = null;
        _this.i = null;
        return _this;
    }
    FinancialCalculationSupportingCalculations.$t = markType(FinancialCalculationSupportingCalculations, 'FinancialCalculationSupportingCalculations');
    return FinancialCalculationSupportingCalculations;
}(Base));
export { FinancialCalculationSupportingCalculations };
/**
 * @hidden
 */
var DataSourceSupportingCalculation = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(DataSourceSupportingCalculation, _super);
    function DataSourceSupportingCalculation(a) {
        var _rest = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            _rest[_i - 1] = arguments[_i];
        }
        var _this = this;
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0:
                {
                    var c = _rest[0];
                    _this = _super.call(this, Delegate_$type, 0, c) || this;
                }
                break;
            case 1:
                {
                    var c = _rest[0];
                    var d = _rest[1];
                    _this = _super.call(this, Delegate_$type, 1, c, d) || this;
                }
                break;
        }
        return _this;
    }
    DataSourceSupportingCalculation.$t = markType(DataSourceSupportingCalculation, 'DataSourceSupportingCalculation', SupportingCalculation$1.$.specialize(Delegate_$type));
    return DataSourceSupportingCalculation;
}(SupportingCalculation$1));
export { DataSourceSupportingCalculation };
/**
 * @hidden
 */
var FinancialCalculationDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialCalculationDataSource, _super);
    function FinancialCalculationDataSource() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._openColumn = null;
        _this._closeColumn = null;
        _this._highColumn = null;
        _this._lowColumn = null;
        _this._volumeColumn = null;
        _this._indicatorColumn = null;
        _this._typicalColumn = null;
        _this._trueRange = null;
        _this._trueLow = null;
        _this._period = 0;
        _this._shortPeriod = 0;
        _this._longPeriod = 0;
        _this._count = 0;
        _this._calculateFrom = 0;
        _this._calculateCount = 0;
        _this._multiplier = 0;
        _this._minimumValue = 0;
        _this._maximumValue = 0;
        _this._specifiesRange = false;
        _this._series = null;
        return _this;
    }
    Object.defineProperty(FinancialCalculationDataSource.prototype, "openColumn", {
        get: function () {
            return this._openColumn;
        },
        set: function (a) {
            this._openColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "closeColumn", {
        get: function () {
            return this._closeColumn;
        },
        set: function (a) {
            this._closeColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "highColumn", {
        get: function () {
            return this._highColumn;
        },
        set: function (a) {
            this._highColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "lowColumn", {
        get: function () {
            return this._lowColumn;
        },
        set: function (a) {
            this._lowColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "volumeColumn", {
        get: function () {
            return this._volumeColumn;
        },
        set: function (a) {
            this._volumeColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "indicatorColumn", {
        get: function () {
            return this._indicatorColumn;
        },
        set: function (a) {
            this._indicatorColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "typicalColumn", {
        get: function () {
            return this._typicalColumn;
        },
        set: function (a) {
            this._typicalColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "trueRange", {
        get: function () {
            return this._trueRange;
        },
        set: function (a) {
            this._trueRange = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "trueLow", {
        get: function () {
            return this._trueLow;
        },
        set: function (a) {
            this._trueLow = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "period", {
        get: function () {
            return this._period;
        },
        set: function (a) {
            this._period = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "shortPeriod", {
        get: function () {
            return this._shortPeriod;
        },
        set: function (a) {
            this._shortPeriod = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "longPeriod", {
        get: function () {
            return this._longPeriod;
        },
        set: function (a) {
            this._longPeriod = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "count", {
        get: function () {
            return this._count;
        },
        set: function (a) {
            this._count = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "calculateFrom", {
        get: function () {
            return this._calculateFrom;
        },
        set: function (a) {
            this._calculateFrom = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "calculateCount", {
        get: function () {
            return this._calculateCount;
        },
        set: function (a) {
            this._calculateCount = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "multiplier", {
        get: function () {
            return this._multiplier;
        },
        set: function (a) {
            this._multiplier = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "minimumValue", {
        get: function () {
            return this._minimumValue;
        },
        set: function (a) {
            this._minimumValue = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "maximumValue", {
        get: function () {
            return this._maximumValue;
        },
        set: function (a) {
            this._maximumValue = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "specifiesRange", {
        get: function () {
            return this._specifiesRange;
        },
        set: function (a) {
            this._specifiesRange = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "series", {
        get: function () {
            return this._series;
        },
        set: function (a) {
            this._series = a;
        },
        enumerable: false,
        configurable: true
    });
    FinancialCalculationDataSource.$t = markType(FinancialCalculationDataSource, 'FinancialCalculationDataSource');
    return FinancialCalculationDataSource;
}(Base));
export { FinancialCalculationDataSource };
/**
 * @hidden
 */
var FinancialSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialSeriesView, _super);
    function FinancialSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.b2 = null;
        _this.b0 = null;
        _this.b4 = 0;
        _this.b4 = -1;
        _this.b2 = a;
        _this.b0 = _this.b1();
        return _this;
    }
    FinancialSeriesView.prototype.b3 = function (a) {
        if (this.b4 != a.t) {
            return true;
        }
        return false;
    };
    FinancialSeriesView.prototype.b5 = function (a) {
        this.b4 = a.t;
    };
    FinancialSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
        }
    };
    FinancialSeriesView.prototype.getDefaultTooltipTemplate = function () {
        var a = "<div class='ui-chart-default-tooltip-content'>";
        if (this.b2.t9.ce) {
            a += "<span>${itemLabel}</span><br/>";
        }
        else if (this.b2.t9.f0 != null) {
            a += "<span>${item." + this.b2.t9.f0 + "}</span><br/>";
        }
        a += "<span class='ui-priority-primary'";
        var b = this.e.a7.a$r(this.e);
        if (!stringIsNullOrEmpty(b)) {
            a += " style='color:" + b + "'";
        }
        var c = new SRProvider(this.w);
        var d = c.b1("financialSeries_Open");
        var e = c.b1("financialSeries_High");
        var f = c.b1("financialSeries_Low");
        var g = c.b1("financialSeries_Close");
        d = stringIsNullOrEmpty(d) ? "Open" : d;
        e = stringIsNullOrEmpty(e) ? "High" : e;
        f = stringIsNullOrEmpty(f) ? "Low" : f;
        g = stringIsNullOrEmpty(g) ? "Close" : g;
        a += ">" + this.b2.title + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.b2.wz + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.b2.wq + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.b2.wv + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.b2.wd + "}</td></tr>";
        if (!stringIsNullOrEmpty(this.b2.w3)) {
            var h = c.b1("financialSeries_Volume");
            h = stringIsNullOrEmpty(h) ? "Volume" : h;
            a += "<tr><td>" + h + ":</td><td>" + "${item." + this.b2.w3 + "}</td></tr>";
        }
        a += "</table></div>";
        return a;
    };
    FinancialSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.s6 = a;
        this.e.ir = 5;
        this.e.is = 2;
        this.e.it = 2;
    };
    FinancialSeriesView.$t = markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
    return FinancialSeriesView;
}(SeriesView));
export { FinancialSeriesView };
