/*
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 { EventArgs, Base, Type, markType, typeCast, Point_$type, String_$type, runOn, Number_$type, enumGetBox, fromEnum, toEnum, Date_$type, Delegate_$type } from "igniteui-angular-core/ES2015/type";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-angular-core/ES2015/ArgumentNullException";
import { IFastItemColumn$1_$type } from "igniteui-angular-core/ES2015/IFastItemColumn$1";
import { Series } from "./Series";
import { Rect } from "igniteui-angular-core/ES2015/Rect";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-angular-core/ES2015/number";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-angular-core/ES2015/Brush";
import { DependencyProperty } from "igniteui-angular-core/ES2015/DependencyProperty";
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-angular-core/ES2015/FastReflectionHelper";
import { List$1 } from "igniteui-angular-core/ES2015/List$1";
import { Dictionary$2 } from "igniteui-angular-core/ES2015/Dictionary$2";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-angular-core/ES2015/IFastItemsSource";
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-angular-core/ES2015/TrendCalculators";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-angular-core/ES2015/PropertyMetadata";
import { stringIsNullOrEmpty } from "igniteui-angular-core/ES2015/string";
import { dateToStringFormat } from "igniteui-angular-core/ES2015/dateExtended";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-angular-core/ES2015/SRProvider";
import { Color } from "igniteui-angular-core/ES2015/Color";
/**
 * @hidden
 */
export class FinancialEventArgs extends EventArgs {
    constructor(a, b, c, d, e) {
        super();
        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;
        }
    }
    get position() {
        return this._position;
    }
    set position(a) {
        this._position = a;
    }
    get count() {
        return this._count;
    }
    set count(a) {
        this._count = a;
    }
    get dataSource() {
        return this._dataSource;
    }
    set dataSource(a) {
        this._dataSource = a;
    }
    get supportingCalculations() {
        return this._supportingCalculations;
    }
    set supportingCalculations(a) {
        this._supportingCalculations = a;
    }
    get basedOn() {
        return this._basedOn;
    }
    set basedOn(a) {
        this._basedOn = a;
    }
}
FinancialEventArgs.$t = markType(FinancialEventArgs, 'FinancialEventArgs', EventArgs.$);
/**
 * @hidden
 */
export class FinancialBucketCalculator extends Base {
    constructor(a) {
        super();
        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;
    }
    getBucket(a) {
        return null;
    }
    getBucketWithoutUnknowns(a) {
        return this.getBucket(a);
    }
    getErrorBucket(a, b) {
        return NaN;
    }
    getBucketInfo(a, b, c, d) {
        a = this.c;
        b = this.d;
        c = this.b;
        d = this.a.bw.er;
        return {
            p0: a,
            p1: b,
            p2: c,
            p3: d
        };
    }
    e(a) {
        let b = this.a.bs;
        let c = this.a.br;
        let d = this.a.br;
        if (this.a.bw != null) {
            d = this.a.bw.getEffectiveViewport1(this.a);
        }
        if (b.isEmpty || c.isEmpty || this.a.bw.l0 == null) {
            this.b = 0;
            return;
        }
        let e = (this.a.bw.l0 != null) ? this.a.bw.l0.b8 : false;
        let f = new ScalerParams(0, b, c, e, d);
        let g = this.a.bw.li(this.a);
        let h = typeCast(ISortingAxis_$type, this.a.bw.l0);
        if (h == null || h.i$b == null) {
            let i = Math.floor(this.a.bw.l0.dw(g.left, f));
            let j = Math.ceil(this.a.bw.l0.dw(g.right, f));
            if (this.a.bw.l0.b8) {
                j = Math.ceil(this.a.bw.l0.dw(g.left, f));
                i = Math.floor(this.a.bw.l0.dw(g.right, f));
            }
            let 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;
        }
    }
    cacheValues() {
    }
    unCacheValues() {
    }
}
FinancialBucketCalculator.$t = markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
/**
 * @hidden
 */
export class FinancialSeries extends Series {
    constructor() {
        super();
        this.mt = null;
        this.mp = null;
        this.mr = null;
        this.mn = null;
        this.mw = null;
        this.m0 = false;
        this.assigningCategoryStyle = null;
        this.l8 = null;
        this.nb = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
        this.nc = new Dictionary$2(String_$type, String_$type, 0);
        this.mz = false;
        this.mj = null;
        this.l3 = null;
        this.l5 = null;
        this.l2 = null;
        this.mb = null;
        this.typical = null;
        this.typicalBasedOn = null;
        this.my = false;
        this.no = null;
        this.nm = null;
        this.nn = null;
        this.nl = null;
        this.np = null;
        this.l4 = null;
        this.l1 = null;
        this.l6 = 0;
        this.mk = null;
        this.mm = null;
        this.l8 = new CategorySeriesRenderManager();
        this.m0 = false;
        this.mb = new CategoryTransitionSourceFramePreparer();
        this.l4 = new CategoryFrame(3);
        this.ab = FinancialSeries.$;
        this.l7 = 0;
    }
    im(a) {
        super.im(a);
        this.mg = a;
    }
    get_cr() {
        return true;
    }
    ag() {
        return [this.l0, this.ml];
    }
    n0() {
        return 2;
    }
    ny() {
        return 4;
    }
    ah(a) {
        let b = this.aj(this.l0, this.l2.f, this.nx(this.bi), this.nz(this.bi), this.lg(a), true);
        if (b == null) {
            return null;
        }
        let c = b[0];
        let d = b[1];
        let e = new Array(1);
        let f = new Array(2);
        let g = this.n0();
        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;
    }
    ai(a) {
        let b = this.aj(this.l0, this.l2.f, this.nx(this.bi), this.nz(this.bi), this.lg(a), true);
        if (b == null) {
            return null;
        }
        let c = b[0];
        let d = b[1];
        let e = new Array(1);
        let 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;
    }
    k1() {
        return this.o6;
    }
    hn() {
        super.hn();
        this.l0 = null;
        this.ml = null;
    }
    get mu() {
        return this.mt;
    }
    set mu(a) {
        if (this.mt != a) {
            let b = this.mt;
            this.mt = a;
            this.raisePropertyChanged("OpenColumn", b, this.mt);
        }
    }
    get mq() {
        return this.mp;
    }
    set mq(a) {
        if (this.mp != a) {
            let b = this.mp;
            this.mp = a;
            this.raisePropertyChanged("HighColumn", b, this.mp);
        }
    }
    get ms() {
        return this.mr;
    }
    set ms(a) {
        if (this.mr != a) {
            let b = this.mr;
            this.mr = a;
            this.raisePropertyChanged("LowColumn", b, this.mr);
        }
    }
    get mo() {
        return this.mn;
    }
    set mo(a) {
        if (this.mn != a) {
            let b = this.mn;
            this.mn = a;
            this.raisePropertyChanged("CloseColumn", b, this.mn);
        }
    }
    get mx() {
        return this.mw;
    }
    set mx(a) {
        if (this.mw != a) {
            let b = this.mw;
            this.mw = a;
            this.raisePropertyChanged("VolumeColumn", b, this.mw);
        }
    }
    m8() {
        return (this.assigningCategoryStyle != null && this.m0) || this.cu;
    }
    os(a) {
        if (this.assigningCategoryStyle != null && this.m0) {
            this.assigningCategoryStyle(this, a);
        }
    }
    oq(a, b, c, d, e, f) {
        let g = this.b9;
        this.l8.ac(a, b, c, d, e, f, g);
        let h = this.l8.c;
        let i = null;
        let j = this.bz;
        if (g && this.bs != null) {
            i = this.bs.az.getHighlightingInfo(this, j, d, h.m, h.l, false);
            h.b = i;
        }
        h.f = f;
        this.os(h);
        this.l8.aa(i, f, g);
    }
    nq(a) {
        return this.ea(a, this.l0);
    }
    fb(a, b) {
        return this.fc(a, b, this.l0, runOn(this, this.nq), new FinancialValueList(this.mu, this.mq, this.ms, this.mo, this.mx));
    }
    e9(a, b) {
        return this.fa(a, b, this.l0, runOn(this, this.nq), new FinancialValueList(this.mu, this.mq, this.ms, this.mo, this.mx));
    }
    d6(a, b, c, d, e) {
        if (c == null) {
            return Number.POSITIVE_INFINITY;
        }
        let f = this.l0.jr;
        return this.d7(a, b, this.l0, d, e, f, runOn(this, this.nq));
    }
    getOffsetValue() {
        return this.nr(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
    }
    getCategoryWidth() {
        return this.l0.getCategorySize(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
    }
    ld(a, b, c) {
        return this.lf(a, b, c, this.nr(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.ml, this.l0, null, null, null);
    }
    ek(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nr(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l0.b8, d);
        return this.em(new FinancialValueList(this.mu, this.mq, this.ms, this.mo, this.mx), a, this.l0, f, e, runOn(this, this.nq), b, c);
    }
    eg(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nr(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l0.b8, d);
        return this.em(this.mq, a, this.l0, f, e, runOn(this, this.nq), b, c);
    }
    ei(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nr(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l0.b8, d);
        return this.em(this.ms, a, this.l0, f, e, runOn(this, this.nq), b, c);
    }
    ns(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nr(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l0.b8, d);
        return this.em(this.mo, a, this.l0, f, e, runOn(this, this.nq), b, c);
    }
    nt(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nr(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l0.b8, d);
        return this.em(this.mu, a, this.l0, f, e, runOn(this, this.nq), b, c);
    }
    nu(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nr(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l0.b8, d);
        return this.em(this.mx, a, this.l0, f, e, runOn(this, this.nq), b, c);
    }
    k9(a, b, c) {
        return this.lf(a, b, c, this.nr(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.ml, this.l0, runOn(this, this.eg), (d, e) => this.fc(d, e, this.l0, runOn(this, this.nq), this.mq), (d, e) => this.fa(d, e, this.l0, runOn(this, this.nq), this.mq));
    }
    lb(a, b, c) {
        return this.lf(a, b, c, this.nr(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.ml, this.l0, runOn(this, this.ei), (d, e) => this.fc(d, e, this.l0, runOn(this, this.nq), this.ms), (d, e) => this.fa(d, e, this.l0, runOn(this, this.nq), this.ms));
    }
    o8(a, b, c) {
        return this.lf(a, b, c, this.nr(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.ml, this.l0, runOn(this, this.nt), (d, e) => this.fc(d, e, this.l0, runOn(this, this.nq), this.mu), (d, e) => this.fa(d, e, this.l0, runOn(this, this.nq), this.mu));
    }
    o7(a, b, c) {
        return this.lf(a, b, c, this.nr(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.ml, this.l0, runOn(this, this.ns), (d, e) => this.fc(d, e, this.l0, runOn(this, this.nq), this.mo), (d, e) => this.fa(d, e, this.l0, runOn(this, this.nq), this.mo));
    }
    o9(a, b, c) {
        return this.lf(a, b, c, this.nr(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.ml, this.l0, runOn(this, this.nu), (d, e) => this.fc(d, e, this.l0, runOn(this, this.nq), this.mx), (d, e) => this.fa(d, e, this.l0, runOn(this, this.nq), this.mx));
    }
    h4() {
        super.h4();
        if (this.l0 != null) {
            this.l0.g0(false);
        }
        if (this.ml != null) {
            this.ml.g0(false);
        }
    }
    jl(a, b) {
        this.mg.bu.e(this.er);
        this.i5(false);
    }
    jk(a, b) {
        if (this.dl && this.ew < 0.05) {
            this.dm = true;
        }
        this.mg.bu.e(this.er);
        this.i5(false);
    }
    mv(a, b, c) {
        let d = this.bw(b);
        this.nb.addItem(d, b);
        this.nc.addItem(b, c);
        return d;
    }
    op(a, b) {
        if (b == null) {
            return;
        }
        a.deregisterColumn(b);
        let c = this.nb.item(b);
        this.nc.removeItem(c);
        this.nb.removeItem(b);
    }
    is(a, b, c, d) {
        super.is(a, b, c, d);
        switch (b) {
            case "SyncLink":
                if (this.bn != null && this.bs != null) {
                    this.mg.bu.e(this.er);
                    this.i5(false);
                }
                break;
            case "SeriesViewer":
                if (c != null && d == null) {
                    if (this.l0 != null) {
                        this.l0.bv(this);
                    }
                    if (this.ml != null) {
                        this.ml.bv(this);
                    }
                }
                if (c == null && d != null) {
                    if (this.l0 != null) {
                        this.l0.ch(this);
                    }
                    if (this.ml != null) {
                        this.ml.ch(this);
                    }
                }
                this.mg.bu.e(this.er);
                this.i5(false);
                break;
            case "FastItemsSource":
                this.mz = true;
                if (typeCast(IFastItemsSource_$type, c) != null) {
                    this.op(typeCast(IFastItemsSource_$type, c), this.mu);
                    this.op(typeCast(IFastItemsSource_$type, c), this.mq);
                    this.op(typeCast(IFastItemsSource_$type, c), this.ms);
                    this.op(typeCast(IFastItemsSource_$type, c), this.mo);
                    this.op(typeCast(IFastItemsSource_$type, c), this.mx);
                    this.mu = null;
                    this.mq = null;
                    this.ms = null;
                    this.mo = null;
                    this.mx = null;
                }
                if (typeCast(IFastItemsSource_$type, d) != null) {
                    if (stringIsNullOrEmpty(this.og) == false) {
                        this.mu = this.mv(typeCast(IFastItemsSource_$type, d), this.og, "OpenColumn");
                    }
                    if (stringIsNullOrEmpty(this.n7) == false) {
                        this.mq = this.mv(typeCast(IFastItemsSource_$type, d), this.n7, "HighColumn");
                    }
                    if (stringIsNullOrEmpty(this.oc) == false) {
                        this.ms = this.mv(typeCast(IFastItemsSource_$type, d), this.oc, "LowColumn");
                    }
                    if (stringIsNullOrEmpty(this.n4) == false) {
                        this.mo = this.mv(typeCast(IFastItemsSource_$type, d), this.n4, "CloseColumn");
                    }
                    if (stringIsNullOrEmpty(this.ok) == false) {
                        this.mx = this.mv(typeCast(IFastItemsSource_$type, d), this.ok, "VolumeColumn");
                    }
                }
                this.mz = false;
                if (this.ml != null && !this.ml.ck()) {
                    this.mg.bu.e(this.er);
                    this.i5(false);
                }
                break;
            case FinancialSeries.$$p[6]:
                if (this.bz != null) {
                    this.op(this.bz, this.mu);
                    this.mu = this.mv(this.bz, this.og, "OpenColumn");
                }
                break;
            case "OpenColumn":
                if (this.ml != null && !this.ml.ck() && !this.mz) {
                    this.mg.bu.e(this.er);
                    this.i5(false);
                }
                break;
            case FinancialSeries.$$p[1]:
                if (this.bz != null) {
                    this.op(this.bz, this.mq);
                    this.mq = this.mv(this.bz, this.n7, "HighColumn");
                }
                break;
            case "HighColumn":
                if (this.ml != null && !this.ml.ck() && !this.mz) {
                    this.mg.bu.e(this.er);
                    this.i5(false);
                }
                break;
            case FinancialSeries.$$p[4]:
                if (this.bz != null) {
                    this.op(this.bz, this.ms);
                    this.ms = this.mv(this.bz, this.oc, "LowColumn");
                }
                break;
            case "LowColumn":
                if (this.ml != null && !this.ml.ck() && !this.mz) {
                    this.mg.bu.e(this.er);
                    this.i5(false);
                }
                break;
            case FinancialSeries.$$p[0]:
                if (this.bz != null) {
                    this.op(this.bz, this.mo);
                    this.mo = this.mv(this.bz, this.n4, "CloseColumn");
                }
                break;
            case "CloseColumn":
                if (this.ml != null && !this.ml.ck() && !this.mz) {
                    this.mg.bu.e(this.er);
                    this.i5(false);
                }
                this.ou();
                break;
            case FinancialSeries.$$p[8]:
                if (this.bz != null) {
                    this.op(this.bz, this.mx);
                    this.mx = this.mv(this.bz, this.ok, "VolumeColumn");
                }
                break;
            case "VolumeColumn":
                if (this.ml != null && !this.ml.ck() && !this.mz) {
                    this.mg.bu.e(this.er);
                    this.i5(false);
                }
                break;
            case FinancialSeries.$$p[9]:
                if (c != null) {
                    c.bv(this);
                }
                if (d != null) {
                    d.ch(this);
                }
                this.mg.bu.e(this.er);
                this.i5(false);
                this.ic();
                this.mk = typeCast(ITimeRangeSelectorAxis_$type, this.l0);
                break;
            case FinancialSeries.$$p[10]:
                if (c != null) {
                    c.bv(this);
                }
                if (d != null) {
                    d.ch(this);
                }
                this.mg.bu.e(this.er);
                if (this.ml != null) {
                    this.ml.ck();
                }
                {
                    this.i5(false);
                }
                this.ic();
                break;
            case "TransitionProgress":
                this.l5.c(this.ew, this.l3, this.l2);
                if (this.cc(this.bi)) {
                    return;
                }
                if (this.ew == 1) {
                    this.l2.v();
                    this.ot(this.l2, this.mg);
                    if (this.dl) {
                        this.dl = false;
                        this.hq();
                        this.bt.r = truncate(this.en());
                        this.bt.b = this.bu;
                    }
                }
                else {
                    this.ot(this.l5, this.mg);
                }
                if (this.bs != null) {
                    this.bs.jj(this);
                }
                break;
            case FinancialSeries.$$p[5]:
                this.i5(false);
                break;
            case "IsCustomCategoryStyleAllowed":
                this.m0 = this.m3();
                this.i5(false);
                break;
            case "CategoryMode":
                if (this.l0 != null) {
                    this.l0.kg(true);
                }
                break;
        }
    }
    m2(a) {
        if (typeCast(NumericYAxis.$, a) !== null) {
            return true;
        }
        return false;
    }
    m1(a) {
        if (typeCast(CategoryXAxis.$, a) !== null || a.b5) {
            return true;
        }
        return false;
    }
    lt(a, b, c) {
        if (b < a || a < 0 || a > this.bz.count || b < 0 || b > this.bz.count || c == null) {
            return null;
        }
        let d = new Array((b - a) + 1);
        let e = c.cc;
        let f = null;
        if (e) {
            f = c.i$b;
        }
        for (let g = a; g <= b; g++) {
            let h = g;
            if (e) {
                h = f._inner[h];
            }
            d[g - a] = this.bz.item(g);
        }
        return d;
    }
    nx(a) {
        return a.bu.b;
    }
    nz(a) {
        return a.bu.c;
    }
    ls(a, b) {
        return this.lt(a, b, this.ml);
    }
    get_m4() {
        return false;
    }
    get m4() {
        return this.get_m4();
    }
    get_cv() {
        return true;
    }
    at(a, b) {
        if (this.m4) {
            let c = this.mi(a, b, this.mj);
            this.mj = c;
            return c;
        }
        else {
            let d = this.mh(a, b, this.mj);
            this.mj = d;
            return d;
        }
    }
    n1(a) {
        let b = this.l2;
        if (this.ca()) {
            b = this.l5;
        }
        let c = this.bi.br;
        let d = this.bi.bs;
        let e = this.l0;
        let f = 0;
        if (e.ce) {
            let g = (a.y - d.top) / d.height;
            f = g * c.height + c.top;
        }
        else {
            let h = (a.x - d.left) / d.width;
            f = h * c.width + c.left;
        }
        let i = b.f.count;
        let j = 0;
        for (j = 0; j < i; j++) {
            let k = b.f._inner[j];
            let 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;
    }
    mi(a, b, c) {
        let d = this.bz.count;
        let e = this.mg.bu.c;
        let f = this.mg.bu.d;
        let g = this.mg.bu.b;
        let h = this.l0;
        let i = -1;
        let j = -1;
        if (h.cc) {
            let k = this.l2;
            if (this.ca()) {
                k = this.l5;
            }
            let l = this.n1(b);
            i = l;
            j = l;
        }
        else {
            let m = this.e5(b);
            i = truncate(Math.floor((intDivide(m, g)))) * g;
            j = i + (g - 1);
        }
        if (c != null && c.f == i && c.e == j) {
            return c;
        }
        let n = new HighlightingInfo();
        n.b = this;
        n.f = i;
        n.e = j;
        return n;
    }
    mh(a, b, c) {
        let d = new HighlightingInfo();
        d.b = this;
        d.f = 0;
        d.e = this.bz.count - 1;
        if (c != null && c.f == d.f && c.e == d.e) {
            return c;
        }
        return d;
    }
    m3() {
        return this.m6;
    }
    d8(a) {
        let b = this.bi.bs;
        let c = this.bi.br;
        let d = -1;
        if (!b.isEmpty && !c.isEmpty && this.l0 != null) {
            let e = this.getEffectiveViewport1(this.bi);
            let f = new ScalerParams(0, b, c, this.l0.b8, e);
            let g = this.li(this.bi);
            let h = this.l0.dw(g.left, f);
            let i = this.l0.dw(g.right, f);
            let j = (a.x - b.left) / b.width;
            let k = h + (j * (i - h));
            if (this.l0.categoryMode != 0) {
                k -= 0.5;
            }
            d = k;
        }
        return d;
    }
    e5(a) {
        return truncate(Math.round(this.d8(a)));
    }
    get_c1() {
        return typeCast(ISortingAxis_$type, this.l0) !== null;
    }
    ap() {
        return this.l0;
    }
    e7(a) {
        let b = this.bi.bs;
        let c = this.bi.br;
        let d = this.getEffectiveViewport1(this.bi);
        if (b.isEmpty || c.isEmpty) {
            return -1;
        }
        let e = new Rect(0, 0, 0, 1, 1);
        let f = new ScalerParams(0, b, c, this.l0.b8, d);
        let g = typeCast(ISortingAxis_$type, this.l0);
        let h = this.li(this.bi);
        let i = h.left;
        let j = h.right;
        let k = this.k8(a).x;
        let l = this.l0.dw(k, f);
        let m = this.l0.dw(i, f);
        let n = this.l0.dw(j, f);
        l = Math.max(m, Math.min(n, l));
        let o = g.i$f(l);
        return o;
    }
    fm(a) {
        let b = 0;
        if (typeCast(ISortingAxis_$type, this.l0) !== null) {
            b = this.e7(a);
            if (b == -1) {
                return null;
            }
        }
        else {
            b = this.e5(a);
        }
        return b >= 0 && this.bz != null && b < this.bz.count ? this.bz.item(b) : null;
    }
    nr(a, b, c) {
        if (this.l0 == null) {
            return 0;
        }
        return this.l0.jl(a, b, c, this.fe);
    }
    db() {
        return this.m7;
    }
    l9() {
        return 11;
    }
    bo() {
        return 3;
    }
    ot(a, b) {
        this.lh = a.aa;
        b.ar();
    }
    or(a, b) {
        a.u();
    }
    dv(a, b, c) {
        let d = super.dv(a, b, c);
        let e = c;
        if (this.bz == null || this.bz.count == 0 || !c.l() || b.isEmpty || a.isEmpty || this.l0 == null || this.ml == null || e.bu.b < 1 || this.l0.bf == null || this.ml.bf == null || this.ml.jx == this.ml.jw || this.l0.itemsSource == null || this.l0.jr < 1) {
            e.bu.b = 0;
            d = false;
        }
        return d;
    }
    getViewInfo(a, b) {
        b = this.bi.bs;
        a = this.bi.br;
        return {
            p0: a,
            p1: b
        };
    }
    nv(a) {
        let b = 0;
        let c = a.bs;
        let d = a.br;
        let e = this.getEffectiveViewport1(this.bi);
        if (!c.isEmpty && !d.isEmpty && this.ml != null) {
            let f = new ScalerParams(0, c, d, this.ml.b8, e);
            f.b = this.ee();
            b = this.ml.dt(this.ml.j7, f);
        }
        return b;
    }
    hq() {
        super.hq();
        this.l3.v();
        this.l2.v();
        this.l5.v();
    }
    i6(a) {
        super.i6(a);
        this.mg.bu.e(this.er);
        if (this.cc(this.bi)) {
            return;
        }
        if (this.dd) {
            if (this.ca()) {
                this.ot(this.l5, this.mg);
            }
            else {
                this.ot(this.l2, this.mg);
            }
            return;
        }
        if (this.c9(a)) {
            let b = this.l3;
            if (this.ca()) {
                if (this.bt.g) {
                    this.bt.t();
                }
                this.l3 = this.l5;
                this.l5 = b;
            }
            else {
                this.l3 = this.l2;
                this.l2 = b;
            }
            this.or(this.l2, this.mg);
            if (this.dn) {
                this.bt.w();
                this.bt.r = truncate(this.eo());
                this.bt.b = this.bv != null ? this.bv : this.bu;
                this.mb.p(this.l3, this.l2, this.isVertical, this.l0, this.ml, this.ma, this.l9(), this.bp, this.bo(), () => this.nv(this.mg), this.mg.br);
            }
            this.hm();
            this.jd();
            if (this.dn) {
                this.dm = false;
                this.dl = true;
            }
        }
        else {
            this.or(this.l2, this.mg);
            this.ot(this.l2, this.mg);
        }
    }
    m9(a) {
        for (let b of fromEnum(a)) {
            switch (b) {
                case "HighColumn":
                    if (this.mq == null) {
                        return false;
                    }
                    break;
                case "LowColumn":
                    if (this.ms == null) {
                        return false;
                    }
                    break;
                case "OpenColumn":
                    if (this.mu == null) {
                        return false;
                    }
                    break;
                case "CloseColumn":
                    if (this.mo == null) {
                        return false;
                    }
                    break;
                case "VolumeColumn":
                    if (this.mx == null) {
                        return false;
                    }
                    break;
            }
        }
        return true;
    }
    get na() {
        return this.l0 != null && typeCast(ISortingAxis_$type, this.l0) !== null;
    }
    m5() {
        return this.typical != null;
    }
    oo(a) {
        this.typical(this, a);
    }
    get ni() {
        return this.nf();
    }
    *_nf() {
        let a = false;
        if (this.m5()) {
            let b = this.mc(0, this.bz.count);
            this.oo(new FinancialEventArgs(0, this.bz.count, b, this.md(b), this));
            if (b.typicalColumn != null) {
                a = true;
                for (let c of fromEnum(b.typicalColumn)) {
                    yield c;
                }
            }
        }
        if (!a) {
            if (this.na && this.l0.i$b != null) {
                let d = this.bz.count;
                let e = this.l0.i$b;
                for (let f = 0; f < d; ++f) {
                    yield (this.mq.item(e.item(f)) + this.ms.item(e.item(f)) + this.mo.item(e.item(f))) / 3;
                }
            }
            else {
                let g = this.bz.count;
                for (let h = 0; h < g; ++h) {
                    yield (this.mq.item(h) + this.ms.item(h) + this.mo.item(h)) / 3;
                }
            }
        }
    }
    nf() {
        return toEnum(() => this._nf());
    }
    get nh() {
        return this.ne();
    }
    *_ne() {
        if (this.na && this.l0.i$b != null) {
            let a = this.mq.count;
            let b = this.l0.i$b;
            if (a > 0) {
                yield this.nw(this.mq.item(b.item(0)) - this.ms.item(b.item(0)));
            }
            for (let c = 1; c < a; ++c) {
                yield Math.max(this.nw(this.mq.item(b.item(c)) - this.ms.item(b.item(c))), Math.max(this.nw(Math.abs(this.mq.item(b.item(c)) - this.mo.item(b.item(c - 1)))), this.nw(Math.abs(this.ms.item(b.item(c)) - this.mo.item(b.item(c - 1))))));
            }
        }
        else {
            let d = this.mq.count;
            if (d > 0) {
                yield this.nw(this.mq.item(0) - this.ms.item(0));
            }
            for (let e = 1; e < d; ++e) {
                yield Math.max(this.nw(this.mq.item(e) - this.ms.item(e)), Math.max(this.nw(Math.abs(this.mq.item(e) - this.mo.item(e - 1))), this.nw(Math.abs(this.ms.item(e) - this.mo.item(e - 1)))));
            }
        }
    }
    ne() {
        return toEnum(() => this._ne());
    }
    get ng() {
        return this.nd();
    }
    *_nd() {
        if (this.na && this.l0.i$b != null) {
            let a = this.ms.count;
            let b = this.l0.i$b;
            if (a > 0) {
                yield this.nw(this.ms.item(b.item(0)));
            }
            for (let c = 1; c < a; c++) {
                yield Math.min(this.nw(this.ms.item(b.item(c))), this.nw(this.mo.item(b.item(c - 1))));
            }
        }
        else {
            let d = this.ms.count;
            if (d > 0) {
                yield this.nw(this.ms.item(0));
            }
            for (let e = 1; e < d; e++) {
                yield Math.min(this.nw(this.ms.item(e)), this.nw(this.mo.item(e - 1)));
            }
        }
    }
    nd() {
        return toEnum(() => this._nd());
    }
    nk(a) {
        if (a == null) {
            return null;
        }
        if (this.na && this.l0.i$b != null) {
            return new SafeSortedReadOnlyDoubleCollection(0, a, this.l0.i$b);
        }
        return new SafeReadOnlyDoubleCollection(0, a);
    }
    nj() {
        let a = new List$1(String_$type, 0);
        a.add("HighColumn");
        a.add("LowColumn");
        a.add("CloseColumn");
        if (this.typicalBasedOn != null && this.bz != null && !this.my) {
            this.my = true;
            let b = this.mc(0, this.bz.count);
            this.my = false;
            let c = new FinancialEventArgs(0, this.bz.count, b, this.md(b), this);
            this.typicalBasedOn(this, c);
            if (c.basedOn != null && c.basedOn.count > 0) {
                return c.basedOn;
            }
        }
        return a;
    }
    getOpenColumnAsArray() {
        if (this.mu == null) {
            return null;
        }
        if (this.l0 != null && typeCast(ISortingAxis_$type, this.l0) !== null) {
            if (this.no != null) {
                return this.no.asArray();
            }
            let a = new List$1(Number_$type, 2, this.mu.count);
            let b = this.l0.i$b;
            let c = this.mu.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.no = a;
            return this.no.asArray();
        }
        else {
            return this.mu.asArray();
        }
    }
    getHighColumnAsArray() {
        if (this.mq == null) {
            return null;
        }
        if (this.l0 != null && typeCast(ISortingAxis_$type, this.l0) !== null) {
            if (this.nm != null) {
                return this.nm.asArray();
            }
            let a = new List$1(Number_$type, 2, this.mq.count);
            let b = this.l0.i$b;
            let c = this.mq.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.nm = a;
            return this.nm.asArray();
        }
        else {
            return this.mq.asArray();
        }
    }
    getLowColumnAsArray() {
        if (this.ms == null) {
            return null;
        }
        if (this.l0 != null && typeCast(ISortingAxis_$type, this.l0) !== null) {
            if (this.nn != null) {
                return this.nn.asArray();
            }
            let a = new List$1(Number_$type, 2, this.ms.count);
            let b = this.l0.i$b;
            let c = this.ms.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.nn = a;
            return this.nn.asArray();
        }
        else {
            return this.ms.asArray();
        }
    }
    getCloseColumnAsArray() {
        if (this.mo == null) {
            return null;
        }
        if (this.l0 != null && typeCast(ISortingAxis_$type, this.l0) !== null) {
            if (this.nl != null) {
                return this.nl.asArray();
            }
            let a = new List$1(Number_$type, 2, this.mo.count);
            let b = this.l0.i$b;
            let c = this.mo.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.nl = a;
            return this.nl.asArray();
        }
        else {
            return this.mo.asArray();
        }
    }
    getVolumeColumnAsArray() {
        if (this.mx == null) {
            return null;
        }
        if (this.l0 != null && typeCast(ISortingAxis_$type, this.l0) !== null) {
            if (this.np != null) {
                return this.np.asArray();
            }
            let a = new List$1(Number_$type, 2, this.mx.count);
            let b = this.l0.i$b;
            let c = this.mx.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.np = a;
            return this.np.asArray();
        }
        else {
            return this.mx.asArray();
        }
    }
    hs(a, b, c, d) {
        super.hs(a, b, c, d);
        if (this.l0 == null || !(typeCast(ISortingAxis_$type, this.l0) !== null)) {
            return;
        }
        let e = this.l0.i$b;
        switch (a) {
            case 1:
                for (let f = b; f < c; f++) {
                    let g = e._inner[f];
                    if (this.no != null) {
                        this.no.insert(f, this.mu.item(g));
                    }
                    if (this.nm != null) {
                        this.nm.insert(f, this.mq.item(g));
                    }
                    if (this.nn != null) {
                        this.nn.insert(f, this.ms.item(g));
                    }
                    if (this.nl != null) {
                        this.nl.insert(f, this.mo.item(g));
                    }
                    if (this.np != null) {
                        this.np.insert(f, this.mx.item(g));
                    }
                }
                break;
            case 0:
                if (this.no != null) {
                    this.no.v(b, c);
                }
                if (this.nm != null) {
                    this.nm.v(b, c);
                }
                if (this.nn != null) {
                    this.nn.v(b, c);
                }
                if (this.nl != null) {
                    this.nl.v(b, c);
                }
                if (this.np != null) {
                    this.np.v(b, c);
                }
                break;
            case 4:
                if (this.no != null) {
                    this.no = new List$1(Number_$type, 0);
                }
                if (this.nm != null) {
                    this.nm = new List$1(Number_$type, 0);
                }
                if (this.nn != null) {
                    this.nn = new List$1(Number_$type, 0);
                }
                if (this.nl != null) {
                    this.nl = new List$1(Number_$type, 0);
                }
                if (this.np != null) {
                    this.np = new List$1(Number_$type, 0);
                }
                break;
            case 3:
            case 2:
                for (let h = b; h < c; h++) {
                    let i = e._inner[h];
                    if (this.no != null) {
                        this.no._inner[h] = this.mu.item(i);
                    }
                    if (this.nm != null) {
                        this.nm._inner[h] = this.mq.item(i);
                    }
                    if (this.nn != null) {
                        this.nn._inner[h] = this.ms.item(i);
                    }
                    if (this.nl != null) {
                        this.nl._inner[h] = this.mo.item(i);
                    }
                    if (this.np != null) {
                        this.np._inner[h] = this.mx.item(i);
                    }
                }
                break;
        }
        this.ou();
        this.ji();
    }
    mc(a, b) {
        let c = this.nk(this.mu);
        let d = this.nk(this.mo);
        let e = this.nk(this.mq);
        let f = this.nk(this.ms);
        let g = this.nk(this.mx);
        let h = ((() => {
            let $ret = new FinancialCalculationDataSource();
            $ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(this.ni), this.nj());
            $ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(this.nh), ((() => {
                let $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.ng), ((() => {
                let $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.bz != null ? this.bz.count : 0;
            return $ret;
        })());
        return h;
    }
    nw(a) {
        if (isInfinity(a) || isNaN_(a)) {
            return 0;
        }
        return a;
    }
    md(a) {
        return ((() => {
            let $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, (b) => TrendCalculators.b(b.volumeColumn, b.shortPeriod), ((() => {
                let $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.f = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.volumeColumn, b.longPeriod), ((() => {
                let $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.g = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.typicalColumn, b.shortPeriod), a.typicalColumn.basedOn);
            $ret.e = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.typicalColumn, b.longPeriod), a.typicalColumn.basedOn);
            $ret.k = Series.dy;
            $ret.j = Series.dx;
            $ret.i = runOn(this, this.nw);
            return $ret;
        })());
    }
    get categoryAxis() {
        return this.l0;
    }
    i7(a, b) {
        super.i7(a, b);
        if (!this.dk) {
            this.bi.az(b);
            return;
        }
        let c = typeCast(FinancialSeriesView.$, this.bh);
        this.bi.az(b);
        c.bu.e(this.er);
        if (this.cc(this.bh)) {
            return;
        }
        if (!this.de) {
            this.or(this.l4, c);
        }
        this.de = false;
        this.ot(this.l4, c);
        this.dk = false;
    }
    i4(a, b, c, d, e) {
        super.i4(a, b, c, d, e);
        let f = this.a0.a$h.item(d);
        let g = f;
        g.bu.e(this.er);
        f.ay(c);
        if (this.cc(g)) {
            return;
        }
        if (this.l1 == null) {
            this.l1 = new CategoryFrame(3);
        }
        this.l1.u();
        this.or(this.l1, g);
        this.ot(this.l1, g);
    }
    am(a) {
        if (this.l0 == a) {
            return this.ml;
        }
        if (this.ml == a) {
            return this.l0;
        }
        return null;
    }
    preferredCategoryMode(a) {
        let b = typeCast(IDateTimeAxis_$type, this.l0);
        return b != null ? b.preferredCategoryMode(this) : this.l7;
    }
    get l7() {
        return this.l6;
    }
    set l7(a) {
        let b = this.l7;
        if (a != b) {
            this.l6 = a;
            this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.l7));
        }
    }
    get_cz() {
        return true;
    }
    ja(a, b) {
        super.ja(a, b);
        this.o6 = a;
    }
    ou() {
        this.d5 = this.mo == null || this.mo.count == 0 ? NaN : this.mo.item(this.mo.count - 1);
    }
    fo(a) {
        if (this.mk != null && a != null) {
            if (this.mm == null || this.mm.f != this.mk.dateTimeMemberPath) {
                this.mm = new FastReflectionHelper(false, this.mk.dateTimeMemberPath);
            }
            let b = this.mm.d(a);
            if (typeCast(Date_$type, b) !== null) {
                return dateToStringFormat(b, this.mk.itemLabelFormat());
            }
        }
        return super.fo(a);
    }
}
FinancialSeries.$t = markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
Type.dep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:n4:ov', [2, null], 'HighMemberPath:n7:ow', [2, null], 'IsCustomCategoryStyleAllowed:m6:ox', [0, false], 'IsTransitionInEnabled:m7:oy', [0, false], 'LowMemberPath:oc:oz', [2, null], 'NegativeBrush:o6:o0', [Brush.$, null], 'OpenMemberPath:og:o1', [2, null], 'TransitionInMode:ma:o2', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:ok:o3', [2, null], 'XAxis:l0:o4', [CategoryAxisBase.$, null], 'YAxis:ml:o5', [NumericYAxis.$, null]]);
/**
 * @hidden
 */
export class FinancialCalculationSupportingCalculations extends Base {
    constructor() {
        super(...arguments);
        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;
    }
}
FinancialCalculationSupportingCalculations.$t = markType(FinancialCalculationSupportingCalculations, 'FinancialCalculationSupportingCalculations');
/**
 * @hidden
 */
export class DataSourceSupportingCalculation extends SupportingCalculation$1 {
    constructor(a, ..._rest) {
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0:
                {
                    let c = _rest[0];
                    super(Delegate_$type, 0, c);
                }
                break;
            case 1:
                {
                    let c = _rest[0];
                    let d = _rest[1];
                    super(Delegate_$type, 1, c, d);
                }
                break;
        }
    }
}
DataSourceSupportingCalculation.$t = markType(DataSourceSupportingCalculation, 'DataSourceSupportingCalculation', SupportingCalculation$1.$.specialize(Delegate_$type));
/**
 * @hidden
 */
export class FinancialCalculationDataSource extends Base {
    constructor() {
        super(...arguments);
        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;
    }
    get openColumn() {
        return this._openColumn;
    }
    set openColumn(a) {
        this._openColumn = a;
    }
    get closeColumn() {
        return this._closeColumn;
    }
    set closeColumn(a) {
        this._closeColumn = a;
    }
    get highColumn() {
        return this._highColumn;
    }
    set highColumn(a) {
        this._highColumn = a;
    }
    get lowColumn() {
        return this._lowColumn;
    }
    set lowColumn(a) {
        this._lowColumn = a;
    }
    get volumeColumn() {
        return this._volumeColumn;
    }
    set volumeColumn(a) {
        this._volumeColumn = a;
    }
    get indicatorColumn() {
        return this._indicatorColumn;
    }
    set indicatorColumn(a) {
        this._indicatorColumn = a;
    }
    get typicalColumn() {
        return this._typicalColumn;
    }
    set typicalColumn(a) {
        this._typicalColumn = a;
    }
    get trueRange() {
        return this._trueRange;
    }
    set trueRange(a) {
        this._trueRange = a;
    }
    get trueLow() {
        return this._trueLow;
    }
    set trueLow(a) {
        this._trueLow = a;
    }
    get period() {
        return this._period;
    }
    set period(a) {
        this._period = a;
    }
    get shortPeriod() {
        return this._shortPeriod;
    }
    set shortPeriod(a) {
        this._shortPeriod = a;
    }
    get longPeriod() {
        return this._longPeriod;
    }
    set longPeriod(a) {
        this._longPeriod = a;
    }
    get count() {
        return this._count;
    }
    set count(a) {
        this._count = a;
    }
    get calculateFrom() {
        return this._calculateFrom;
    }
    set calculateFrom(a) {
        this._calculateFrom = a;
    }
    get calculateCount() {
        return this._calculateCount;
    }
    set calculateCount(a) {
        this._calculateCount = a;
    }
    get multiplier() {
        return this._multiplier;
    }
    set multiplier(a) {
        this._multiplier = a;
    }
    get minimumValue() {
        return this._minimumValue;
    }
    set minimumValue(a) {
        this._minimumValue = a;
    }
    get maximumValue() {
        return this._maximumValue;
    }
    set maximumValue(a) {
        this._maximumValue = a;
    }
    get specifiesRange() {
        return this._specifiesRange;
    }
    set specifiesRange(a) {
        this._specifiesRange = a;
    }
    get series() {
        return this._series;
    }
    set series(a) {
        this._series = a;
    }
}
FinancialCalculationDataSource.$t = markType(FinancialCalculationDataSource, 'FinancialCalculationDataSource');
/**
 * @hidden
 */
export class FinancialSeriesView extends SeriesView {
    constructor(a) {
        super(a);
        this.bw = null;
        this.bu = null;
        this.by = 0;
        this.by = -1;
        this.bw = a;
        this.bu = this.bv();
    }
    bx(a) {
        if (this.by != a.t) {
            return true;
        }
        return false;
    }
    bz(a) {
        this.by = a.t;
    }
    ap() {
        super.ap();
        if (!this.n) {
            this.e.bj = 6;
        }
    }
    getDefaultTooltipTemplate() {
        let a = "<div class='ui-chart-default-tooltip-content'>";
        if (this.bw.l0.b5) {
            a += "<span>${itemLabel}</span><br/>";
        }
        else if (this.bw.l0.e2 != null) {
            a += "<span>${item." + this.bw.l0.e2 + "}</span><br/>";
        }
        a += "<span class='ui-priority-primary'";
        let b = this.e.a0.a$q(this.e);
        if (!stringIsNullOrEmpty(b)) {
            a += " style='color:" + b + "'";
        }
        let c = new SRProvider(this.t);
        let d = c.al("financialSeries_Open");
        let e = c.al("financialSeries_High");
        let f = c.al("financialSeries_Low");
        let g = c.al("financialSeries_Close");
        d = stringIsNullOrEmpty(d) ? "Open" : d;
        e = stringIsNullOrEmpty(e) ? "High" : e;
        f = stringIsNullOrEmpty(f) ? "Low" : f;
        g = stringIsNullOrEmpty(g) ? "Close" : g;
        a += ">" + this.bw.fs + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.bw.og + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.bw.n7 + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.bw.oc + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.bw.n4 + "}</td></tr>";
        if (!stringIsNullOrEmpty(this.bw.ok)) {
            let h = c.al("financialSeries_Volume");
            h = stringIsNullOrEmpty(h) ? "Volume" : h;
            a += "<tr><td>" + h + ":</td><td>" + "${item." + this.bw.ok + "}</td></tr>";
        }
        a += "</table></div>";
        return a;
    }
    ac() {
        let a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.k2 = a;
        this.e.es = 5;
        this.e.et = 2;
        this.e.eu = 2;
    }
}
FinancialSeriesView.$t = markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
//# sourceMappingURL=FinancialEventArgs_combined.js.map