/*
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 { FinancialSeries } from "./FinancialSeries";
import { ITrendLineSeries_$type } from "./ITrendLineSeries";
import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { DependencyProperty } from "igniteui-react-core";
import { TrendLineType_$type } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { PenLineCap_$type } from "igniteui-react-core";
import { DoubleCollection } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { AxisRange } from "./AxisRange";
import { CategoryFrame } from "./CategoryFrame";
import { Number_$type, typeCast, enumGetBox, EnumUtil, runOn, markType, markDep } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { FinancialSeriesView } from "./FinancialSeriesView";
import { FinancialBucketCalculator } from "./FinancialBucketCalculator";
import { TrendResolutionParams } from "./TrendResolutionParams";
import { CategorySeries } from "./CategorySeries";
import { NotImplementedException } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { GeometryGroup } from "igniteui-react-core";
import { Pool$1 } from "igniteui-react-core";
import { LineGeometry } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-react-core";
import { IndicatorRenderer } from "./IndicatorRenderer";
/**
 * @hidden
 */
export let FinancialIndicator = /*@__PURE__*/ (() => {
    class FinancialIndicator extends FinancialSeries {
        get_e7() {
            return true;
        }
        cs() {
            return new FinancialIndicatorView(this);
        }
        qz(a) {
            super.qz(a);
            this.aaz = a;
        }
        constructor() {
            super();
            this._indicatorColumn = null;
            this.aay = null;
            this.w8 = new CategoryFrame(3);
            this.xa = new CategoryFrame(3);
            this.w6 = new CategoryFrame(3);
            this.indicatorColumn = new List$1(Number_$type, 0);
            this.aay = new AxisRange(-100, 100);
        }
        abc(a) {
            if (this.xn != null && !this.xn.c1()) {
                this.rp(true);
            }
        }
        aa4(a, b, c) {
            if (isNaN_(b.x) || isNaN_(b.y)) {
                return false;
            }
            let d = this.xn;
            let e = 0;
            if (d != null) {
                e = d.e6(d.me);
            }
            if ((a.y >= e && a.y <= b.y) || (a.y <= e && a.y >= b.y)) {
                return true;
            }
            return false;
        }
        b2() {
            if (this.b3 == 0) {
                return 1;
            }
            else {
                return super.b2();
            }
        }
        wl(a) {
            if (this.w4 == null || this.xn == null) {
                return Rect.empty;
            }
            let b = this.v5(a);
            let c = this.cv.by;
            let d = this.cv.bx;
            let e = this.getEffectiveViewport1(this.cv);
            let f = new ScalerParams(0, c, d, this.xn.ch, e);
            f.b = this.iy();
            let g = this.an(this.w4, this.w6.f, this.y1(this.cv), this.y3(this.cv), a, true);
            if (g == null) {
                return Rect.empty;
            }
            let h = g[0];
            let i = g[1];
            let j = Math.abs(b.x - h[0]);
            let k = Math.abs(b.x - i[0]);
            let l = this.xn.el(this.xn.me, f);
            let m = 1;
            if (j < k) {
                let n = h[0] - 0.5 * m;
                let o = h[1];
                let p = l;
                return new Rect(0, n, Math.min(o, p), m, Math.max(o, p) - Math.min(o, p));
            }
            else {
                let q = i[0] - 0.5 * m;
                let r = i[1];
                let s = l;
                return new Rect(0, q, Math.min(r, s), m, Math.max(r, s) - Math.min(r, s));
            }
        }
        gw(a, b) {
            let c = this.wa(this.wf(a), true, false);
            if (this.aa1 == 1) {
                if (this.aa4(a, c, b)) {
                    return true;
                }
            }
            if (this.aa1 == 1 || this.aa1 == 0) {
                if (this.gv(a, b)) {
                    return true;
                }
            }
            if (this.aa1 == 2) {
                if (this.gz(a, b)) {
                    return true;
                }
            }
            return false;
        }
        pb(a, b, c, d) {
            super.pb(a, b, c, d);
            if (this.w4 != null && typeCast(ISortingAxis_$type, this.w4) !== null) {
                this.w4.i$i();
            }
            if (this.aaz.ca) {
                this.aaz.b8.g$e(a, b, c, d);
            }
            if (d != null && this.yg.containsKey(d)) {
                let e = this.yg.tryGetValue(d, d);
                d = e.p1;
            }
            if (this.w4 != null && typeCast(ISortingAxis_$type, this.w4) !== null) {
                a = 4;
                b = 0;
                c = this.dn.count;
            }
            switch (a) {
                case 3:
                    if (this.aa3(b, c, d)) {
                        this.abe(b, c, d);
                        this.abc(true);
                    }
                    break;
                case 2:
                    if (this.aa3(b, this.dn.count - b, d)) {
                        this.abe(b, this.dn.count - b, d);
                        this.abc(true);
                    }
                    break;
                case 1:
                    if (this.aa3(b, this.dn.count - b, d)) {
                        let f = new Array(c);
                        for (let g = 0; g < c; g++) {
                            f[g] = 0;
                        }
                        this.indicatorColumn.s(b, f);
                        this.abe(b, this.dn.count - b, d);
                        this.abc(true);
                    }
                    break;
                case 0:
                    if (this.aa3(b, this.dn.count - b, d)) {
                        this.indicatorColumn.v(b, c);
                        this.abe(b, this.dn.count - b, d);
                        this.abc(true);
                    }
                    break;
                case 4:
                    if (this.aa3(b, this.dn.count - b, d)) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.dn.count);
                        let h = new Array(c);
                        for (let i = 0; i < c; i++) {
                            h[i] = 0;
                        }
                        this.indicatorColumn.s(0, h);
                        this.abe(b, this.dn.count - b, d);
                        this.abc(true);
                    }
                    break;
            }
        }
        get_aa0() {
            return 0;
        }
        get aa0() {
            return this.get_aa0();
        }
        get abp() {
            return this.c(FinancialIndicator.abf);
        }
        set abp(a) {
            this.h(FinancialIndicator.abf, a);
        }
        aa9() {
            return -1;
        }
        get indicatorColumn() {
            return this._indicatorColumn;
        }
        set indicatorColumn(a) {
            this._indicatorColumn = a;
        }
        q7(a, b, c, d) {
            switch (b) {
                case "XAxis":
                    this.aaz.cg();
                    break;
                case "TrendLineType":
                    let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                    if (e != 0) {
                        this.aaz.b8 = CategoryTrendLineManagerFactory.a(this.aaz.b8, this.w4, this.st, this, this.dr);
                    }
                    break;
            }
            super.q7(a, b, c, d);
            if (this.aaz.ca && this.aaz.b8.g$b(a, b, c, d)) {
                this.rp(false);
                let f = typeCast(FinancialIndicatorView.$, this.cu);
                if (f != null && f.ca) {
                    f.b8.g$b(a, b, c, d);
                }
                this.qj();
            }
            switch (b) {
                case "FastItemsSource":
                    if (this.dn != null) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.dn.count);
                        let g = new Array(this.dn.count);
                        for (let h = 0; h < this.dn.count; h++) {
                            g[h] = 0;
                        }
                        this.indicatorColumn.s(0, g);
                        this.abe(0, this.dn.count, null);
                        if (this.xn != null && !this.xn.c1()) {
                            this.xl.b0.e(this.id);
                            this.rp(this.gg && c != null);
                        }
                    }
                    break;
                case "TrendLineBrush":
                    this.rd(b);
                    break;
                case FinancialIndicator.$$p[0]:
                    this.o5(true, this.cv);
                    this.sg();
                    this.rp(false);
                    this.qj();
                    break;
                case "OpenColumn":
                case "HighColumn":
                case "LowColumn":
                case "CloseColumn":
                case "VolumeColumn":
                    if (this.dn != null) {
                        if (this.indicatorColumn.count != this.dn.count) {
                            this.indicatorColumn = new List$1(Number_$type, 2, this.dn.count);
                            let i = new Array(this.dn.count);
                            for (let j = 0; j < this.dn.count; j++) {
                                i[j] = 0;
                            }
                            this.indicatorColumn.s(0, i);
                        }
                        if (this.aa3(0, this.dn.count - 1, b)) {
                            this.abd();
                        }
                    }
                    break;
                case "XAxis":
                    if (this.w4 != null && (typeCast(ISortingAxis_$type, this.w4) !== null || typeCast(ISortingAxis_$type, c) !== null)) {
                        this.abd();
                    }
                    break;
                case "YAxis":
                case FinancialIndicator.$$p[1]:
                    this.abd();
                    this.qj();
                    break;
                case "TrendLineType":
                    this.qj();
                    break;
            }
        }
        i5(a, b, c) {
            if (this.indicatorColumn == null) {
                return super.i5(a, b, c);
            }
            let d = this.getEffectiveViewport1(this.cv);
            let e = this.yv(this.cv.by, this.cv.bx, d);
            let f = new ScalerParams(0, this.cv.by, this.cv.bx, this.w4.ch, d);
            f.c = this.db.wj;
            return this.i7(this.indicatorColumn, a, this.w4, f, e, runOn(this, this.yu), b, c);
        }
        ka(a, b) {
            if (this.indicatorColumn == null) {
                return super.ka(a, b);
            }
            return this.kb(a, b, this.w4, runOn(this, this.yu), this.indicatorColumn);
        }
        j8(a, b) {
            if (this.indicatorColumn == null) {
                return super.j8(a, b);
            }
            return this.j9(a, b, this.w4, runOn(this, this.yu), this.indicatorColumn);
        }
        get_hd() {
            return true;
        }
        aa3(a, b, c) {
            if (c == null) {
                return true;
            }
            if (this.aa5(a, b).contains(c)) {
                return true;
            }
            return false;
        }
        abe(a, b, c) {
            this.aa2(a, b);
        }
        ay(a) {
            if (this.dn == null) {
                return null;
            }
            if (a != null && a == this.xn) {
                return this.aay;
            }
            return null;
        }
        gd(a) {
            let b = this.dn != null ? this.dn.indexOf(a) : -1;
            let c = this.cv.by;
            c = c.copy();
            let d = this.cv.bx;
            let e = new Rect(0, 0, 0, 1, 1);
            let f = this.wj(this.cv);
            if (b >= 0 && Rect.l_op_Inequality(c, null) && Rect.l_op_Inequality(d, null)) {
                if (this.w4 != null) {
                    let g = new ScalerParams(0, e, e, this.w4.ch, f);
                    let h = this.w4.el(b, g);
                    if (h < c.left + 0.1 * c.width) {
                        h = h + 0.4 * c.width;
                    }
                    if (h > c.right - 0.1 * c.width) {
                        h = h - 0.4 * c.width;
                    }
                    c.x = h - 0.5 * c.width;
                }
                if (this.xn != null && this.indicatorColumn != null && b < this.indicatorColumn.count) {
                    let i = new ScalerParams(0, e, e, this.xn.ch, f);
                    i.b = this.iy();
                    let j = this.xn.el(this.indicatorColumn._inner[b], i);
                    if (j < c.top + 0.1 * c.height) {
                        j = j + 0.4 * c.height;
                    }
                    if (j > c.bottom - 0.1 * c.height) {
                        j = j - 0.4 * c.height;
                    }
                    c.y = j - 0.5 * c.height;
                }
                this.c3.au(this.db, c, true);
            }
            return b >= 0;
        }
        he(a, b, c) {
            let d = super.he(a, b, c);
            if (this.indicatorColumn == null || this.indicatorColumn.count == 0) {
                d = false;
            }
            return d;
        }
        aaa(a, b) {
            super.aaa(a, b);
            let c = b.by;
            let d = b.bx;
            let e = this.getEffectiveViewport1(b);
            let f = this.w4;
            let g = this.xn;
            let h = new ScalerParams(0, c, d, f.ch, e);
            let i = new ScalerParams(0, c, d, g.ch, e);
            i.b = this.iy();
            let j = this.w4.ag();
            let k = j[0];
            let l = j[1];
            a.f.clear();
            a.n.clear();
            a.q.clear();
            let m = 0;
            let n = typeCast(ISortingAxis_$type, this.w4);
            if (n != null && n.i$b.count != this.dn.count) {
                return;
            }
            m = this.yv(c, d, e);
            let o = this.aa9();
            if (o == -1) {
                o = this.trendLinePeriod;
            }
            let p = typeCast(FinancialIndicatorView.$, b);
            if (p.ca) {
                p.b8.prepareLineCore(a.q, this.trendLineType, this.indicatorColumn, o, (q) => this.w4.el(q, h), (q) => this.xn.el(q, i), ((() => {
                    let $ret = new TrendResolutionParams();
                    $ret.e = b.b0.b;
                    $ret.f = b.b0.c;
                    $ret.g = b.b0.d;
                    $ret.a = m;
                    $ret.d = this.id;
                    $ret.i = d;
                    $ret.j = c;
                    $ret.h = e;
                    $ret.b = l;
                    $ret.c = k;
                    return $ret;
                })()));
            }
            let q = this.w4.eo(2, h) - this.w4.eo(1, h);
            for (let r = b.b0.c; r <= b.b0.d; ++r) {
                let s;
                if (n == null) {
                    s = b.b0.getBucket(r);
                }
                else {
                    let t = n.i$b._inner[r];
                    let u = n.i$d(t);
                    let v = this.indicatorColumn._inner[r];
                    let w = v;
                    let x = u;
                    while (r < b.b0.d) {
                        t = n.i$b._inner[r + 1];
                        x = n.i$d(t);
                        if (x - u > q) {
                            break;
                        }
                        r++;
                        let y = this.indicatorColumn._inner[r];
                        v = Math.min(v, y);
                        w = Math.max(w, y);
                    }
                    let z = NaN;
                    if (!isNaN_(u)) {
                        z = this.w4.el(u, h);
                    }
                    s = [z, v, w];
                }
                if (!isNaN_(s[0])) {
                    if (this.w4 != null && typeCast(ISortingAxis_$type, this.w4) !== null) {
                        s[0] = s[0] + m;
                    }
                    else {
                        s[0] = f.el(s[0], h) + m;
                    }
                    s[1] = g.el(s[1], i);
                    if (b.b0.b > 1 || n != null) {
                        s[2] = g.el(s[2], i);
                    }
                    else {
                        s[2] = s[1];
                    }
                    a.f.add(s);
                }
            }
            return;
        }
        o5(a, b) {
            super.o5(a, b);
            let c = b;
            c.cb(a);
            if (c.ca) {
                c.b8.g$d();
            }
        }
        xe() {
            switch (this.aa1) {
                case 1: return 1;
                case 2: return 1;
                case 0: return 12;
            }
            return 1;
        }
        aac(a, b) {
            super.aac(a, b);
            let c = typeCast(FinancialIndicatorView.$, b);
            let d = (e) => a.f._inner[e][0];
            let e = (f) => a.f._inner[f][1];
            if (c.ca) {
                c.b8.g$d();
                c.b8.g$g(a.q);
            }
            let f = b.bx;
            let g = this.getEffectiveViewport1(b);
            let h = 0;
            let i = this.u7;
            let j = this.aau;
            if (b.b3(a)) {
                c.cb(false);
                if (a.f.count > 0) {
                    switch (this.aa1) {
                        case 0:
                            let k = CategorySeries.yl(a.f, a.f.count - 1, f, b.by, false);
                            c.cf(a.f.count, d, e, true, k);
                            break;
                        case 1:
                            if (this.xn != null) {
                                h = this.yz(b);
                            }
                            else {
                                h = 0.5 * (f.top + f.bottom);
                            }
                            let l = CategorySeries.yl(a.f, a.f.count - 1, f, b.by, false);
                            c.cd(a.f.count, d, e, true, h, l);
                            break;
                        case 2:
                            h = this.yz(b);
                            c.ce(a.f.count, d, e, true, h);
                            break;
                        default: throw new NotImplementedException(0);
                    }
                }
                b.b5(a);
            }
            let m = a.f;
            let n = this.dn.count;
            this.xd.a2(this, this.yc(), runOn(this, this.ww), this.y1(b), this.y3(b));
            let o = false;
            let p = this.xd.b;
            if (p != null) {
                o = true;
            }
            this.xd.ak = i;
            this.xd.ag = i;
            if (o) {
                let q = new ScalerParams(0, b.by, b.bx, this.w4.ch, g);
                this.xd.f = false;
                this.z9(m, -1, n, this.w4, q, b.q, -1);
            }
            this.xd.ad(c.cx, true, false, true, false);
            this.xd.ad(c.cz, true, false, true, false);
            this.xd.ad(c.cy, false, true, false, false);
            c.cy._opacity = 0.8 * this.xd.j * this.h9;
            this.xd.ad(c.cw, true, false, false, false);
            this.xd.ak = j;
            this.xd.ag = j;
            if (o) {
                let r = new ScalerParams(0, b.by, b.bx, this.w4.ch, g);
                this.xd.f = true;
                this.z9(m, -1, n, this.w4, r, b.q, -1);
            }
            this.xd.ad(c.ct, true, false, true, false);
            this.xd.ad(c.cv, true, false, true, false);
            this.xd.ad(c.cu, false, true, false, false);
            c.cu._opacity = 0.8 * this.xd.j * this.h9;
            this.xd.ad(c.cs, true, false, false, false);
            c.ch();
        }
        sf() {
            super.sf();
            if (this.index < 0) {
                return;
            }
            if (this.aaz.ca) {
                this.aaz.ci();
            }
        }
        abd() {
            if (this.aaz.ca) {
                this.aaz.b8.g$i();
            }
            this.aa2(0, this.indicatorColumn.count);
            if (this.xn != null && !this.xn.c1()) {
                this.rp(this.gg && this.d7);
            }
        }
        px(a) {
            super.px(a);
            this.bc.exportTrendlineData(this, a, this.aaz.b8.g$j);
        }
        be(a) {
            if (this.aa1 == 1 || this.aa1 == 2) {
                return 3;
            }
            else if (this.aa1 == 0) {
                return 2;
            }
            return a;
        }
    }
    FinancialIndicator.$t = /*@__PURE__*/ markType(FinancialIndicator, 'FinancialIndicator', FinancialSeries.$, [ITrendLineSeries_$type]);
    FinancialIndicator.abf = /*@__PURE__*/ DependencyProperty.i("ActualTrendLineBrush", Brush.$, FinancialIndicator.$, /*@__PURE__*/ new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue)));
    FinancialIndicator.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinancialIndicator, 'raisePropertyChanged', ['DisplayType:aa1:abg', [IndicatorDisplayType_$type, /*@__PURE__*/ enumGetBox(IndicatorDisplayType_$type, 0)], 'IgnoreFirst:aa7:abh', [1, 0], 'TrendLineType::abn', [TrendLineType_$type, /*@__PURE__*/ enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::abm', [1, 1.5], 'TrendLinePeriod::abl', [1, 7], 'TrendLineBrush::abi', [Brush.$, null], 'TrendLineZIndex:aa8:abo', [1, 1001], 'TrendLineDashArray:abq:abj', [DoubleCollection.$], 'TrendLineDashCap:abr:abk', [PenLineCap_$type, /*@__PURE__*/ enumGetBox(PenLineCap_$type, 0)]]);
    return FinancialIndicator;
})();
/**
 * @hidden
 */
export let FinancialIndicatorBucketCalculator = /*@__PURE__*/ (() => {
    class FinancialIndicatorBucketCalculator extends FinancialBucketCalculator {
        constructor(a) {
            super(a);
            this.f = null;
            this.f = a;
        }
        getBucket(a) {
            let b = a * this.b;
            let c = Math.min(b + this.b - 1, this.f.b6.indicatorColumn.count - 1);
            let d = NaN;
            let e = NaN;
            for (let f = b; f <= c; ++f) {
                let g = this.f.b6.indicatorColumn._inner[f];
                if (!isNaN_(d)) {
                    if (!isNaN_(g)) {
                        d = Math.min(d, g);
                        e = Math.max(e, g);
                    }
                }
                else {
                    d = g;
                    e = g;
                }
            }
            if (!isNaN_(d)) {
                return [0.5 * (b + c), d, e];
            }
            return [NaN, NaN, NaN];
        }
    }
    FinancialIndicatorBucketCalculator.$t = /*@__PURE__*/ markType(FinancialIndicatorBucketCalculator, 'FinancialIndicatorBucketCalculator', FinancialBucketCalculator.$);
    return FinancialIndicatorBucketCalculator;
})();
/**
 * @hidden
 */
export let FinancialIndicatorView = /*@__PURE__*/ (() => {
    class FinancialIndicatorView extends FinancialSeriesView {
        constructor(a) {
            super(a);
            this.b6 = null;
            this.b9 = null;
            this.cx = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.ct = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cy = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cu = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cz = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cv = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cw = ((() => {
                let $ret = new Path();
                $ret.an = new GeometryGroup();
                return $ret;
            })());
            this.cs = ((() => {
                let $ret = new Path();
                $ret.an = new GeometryGroup();
                return $ret;
            })());
            this.b7 = null;
            this.cp = new Path();
            this.cr = new Path();
            this.cq = new Path();
            this.co = new Path();
            this.cl = new Path();
            this.cn = new Path();
            this.cm = new Path();
            this.ck = new Path();
            this.b6 = a;
            this.b9 = ((() => {
                let $ret = new Pool$1(LineGeometry.$);
                $ret.create = runOn(this, this.cj);
                $ret.destroy = runOn(this, this.cc);
                return $ret;
            })());
        }
        b1() {
            return new FinancialIndicatorBucketCalculator(this);
        }
        au() {
            super.au();
            if (!this.q) {
                this.b6.aau = Defaults.ah;
                this.b6.aa1 = this.b6.aa0;
            }
        }
        cj() {
            return new LineGeometry();
        }
        cc(a) {
        }
        get b8() {
            if (this.b7 == null) {
                this.b7 = CategoryTrendLineManagerFactory.a(this.b7, this.e.a0(), this.e.st, this.e, this.e.dr);
            }
            return this.b7;
        }
        set b8(a) {
            this.b7 = a;
        }
        get ca() {
            return this.b7 != null;
        }
        cb(a) {
            Extensions.e(this.cx.an);
            Extensions.e(this.cy.an);
            Extensions.e(this.cz.an);
            Extensions.e(this.ct.an);
            Extensions.e(this.cu.an);
            Extensions.e(this.cv.an);
            Extensions.d(this.cw.an);
            Extensions.d(this.cs.an);
            if (a) {
                this.b9.count = 0;
            }
            this.as();
        }
        ch() {
        }
        cf(a, b, c, d, e) {
            IndicatorRenderer.g(a, b, c, d, this.by, this.bx, this.cx, this.ct, this.b0.b, this.e.id, e);
            this.as();
        }
        cd(a, b, c, d, e, f) {
            IndicatorRenderer.e(a, b, c, d, this.by, this.bx, this.cx, this.cy, this.ct, this.cu, e, this.b0.b, this.e.id, f);
            this.as();
        }
        ce(a, b, c, d, e) {
            IndicatorRenderer.f(a, b, c, d, this.bx, e, this.b9, this.cw, this.cs);
            this.as();
        }
        ci() {
            this.b6.abp = null;
            if (this.b6.trendLineBrush != null) {
                this.b6.abp = this.b6.trendLineBrush;
            }
            else {
                this.b6.abp = this.b6.u7;
            }
        }
        be() {
            super.be();
            let a = this.br();
            this.cp.an = this.cx.an;
            this.cr.an = this.cz.an;
            this.cq.an = this.cy.an;
            this.co.an = this.cw.an;
            this.cl.an = this.ct.an;
            this.cn.an = this.cv.an;
            this.cm.an = this.cu.an;
            this.ck.an = this.cs.an;
            this.cp._stroke = a;
            this.cr._stroke = a;
            this.cp.ad = this.e.ie + 3;
            this.cr.ad = this.e.ie + 3;
            this.cq._fill = a;
            this.cq._opacity = 1;
            this.co._stroke = a;
            this.co.ad = this.e.ie + 3;
            this.cl._stroke = a;
            this.cn._stroke = a;
            this.cl.ad = this.e.ie + 3;
            this.cn.ad = this.e.ie + 3;
            this.cm._fill = a;
            this.cm._opacity = 1;
            this.ck._stroke = a;
            this.ck.ad = this.e.ie + 3;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    if (this.b6.aa1 == 2) {
                        a.t(this.co);
                        a.t(this.ck);
                    }
                    else {
                        a.t(this.cq);
                        a.t(this.cp);
                        a.t(this.cr);
                        a.t(this.cm);
                        a.t(this.cl);
                        a.t(this.cn);
                    }
                }
                else {
                    if (this.b6.aa1 == 2) {
                        a.t(this.cw);
                        a.t(this.cs);
                    }
                    else {
                        a.t(this.cy);
                        a.t(this.cx);
                        a.t(this.cz);
                        a.t(this.cu);
                        a.t(this.ct);
                        a.t(this.cv);
                    }
                }
            }
        }
        a7(a, b) {
            if (a.d) {
                if (this.b6.trendLineType != 0 && !b) {
                    let c = this.b8.g$j;
                    c.ad = this.b6.trendLineThickness;
                    c._stroke = this.b6.abp;
                    c.aj = this.b6.abr;
                    c.ai = this.b6.abq;
                    a.v(c);
                }
            }
            super.a7(a, b);
        }
        an(a) {
            super.an(a);
            this.e.bc.exportPathData(a, this.cw, "positiveColumnsShape", ["Positive", "Main"]);
            this.e.bc.exportPathData(a, this.cs, "negativeColumnsShape", ["Negative"]);
            this.e.bc.exportPathData(a, this.cx, "positive0", ["Positive", "Main"]);
            this.e.bc.exportPathData(a, this.cz, "positive1", ["Positive"]);
            this.e.bc.exportPathData(a, this.cy, "positive01", ["PositiveFill"]);
            this.e.bc.exportPathData(a, this.ct, "negative0", ["Negative", "Main"]);
            this.e.bc.exportPathData(a, this.cv, "negative1", ["Negative"]);
            this.e.bc.exportPathData(a, this.cu, "negative01", ["NegativeFill"]);
        }
        cg() {
            if (this.ca) {
                this.b7 = CategoryTrendLineManagerFactory.a(this.b7, this.e.a0(), this.e.st, this.e, this.e.dr);
            }
        }
    }
    FinancialIndicatorView.$t = /*@__PURE__*/ markType(FinancialIndicatorView, 'FinancialIndicatorView', FinancialSeriesView.$);
    return FinancialIndicatorView;
})();
