/*
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 { MarkerSeries } from "./MarkerSeries";
import { ISupportsErrorBars_$type } from "./ISupportsErrorBars";
import { ITrendLineSeries_$type } from "./ITrendLineSeries";
import { ScatterAxisInfoCache } from "./ScatterAxisInfoCache";
import { NumericXAxis } from "./NumericXAxis";
import { DependencyProperty } from "igniteui-angular-core";
import { NumericYAxis } from "./NumericYAxis";
import { Series } from "./Series";
import { TrendLineType_$type } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { PenLineCap_$type } from "igniteui-angular-core";
import { DoubleCollection } from "igniteui-angular-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { ScatterErrorBarSettings } from "./ScatterErrorBarSettings";
import { HighlightingInfo } from "./HighlightingInfo";
import { ScatterFrame } from "./ScatterFrame";
import { Base, enumGetBox, Number_$type, typeCast, fromEnum, Point_$type, runOn, markType, markDep, PointUtil } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { SeriesPointOfInterest } from "./SeriesPointOfInterest";
import { ScalerParams } from "./ScalerParams";
import { Rect } from "igniteui-angular-core";
import { Marker } from "./Marker";
import { MarkerSeriesView } from "./MarkerSeriesView";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { Clipper } from "igniteui-angular-core";
import { OwnedPoint } from "./OwnedPoint";
import { Dictionary$2 } from "igniteui-angular-core";
import { AxisRange } from "./AxisRange";
import { GeometryUtil } from "igniteui-angular-core";
import { HashPool$2 } from "igniteui-angular-core";
import { DataContext } from "igniteui-angular-core";
import { TrendResolutionParams } from "./TrendResolutionParams";
import { ScatterTrendLineManager } from "./ScatterTrendLineManager";
import { Thickness } from "igniteui-angular-core";
import { Size } from "igniteui-angular-core";
import { AssigningScatterStyleEventArgs } from "./AssigningScatterStyleEventArgs";
import { AssigningScatterMarkerStyleEventArgs } from "./AssigningScatterMarkerStyleEventArgs";
import { SeriesRenderManager } from "./SeriesRenderManager";
import { ErrorBarsHelper } from "./ErrorBarsHelper";
import { PathGeometry } from "igniteui-angular-core";
import { DataLegendSeriesValueInfo } from "igniteui-angular-core";
import { DataLegendSeriesContext } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { truncate, isNaN_, isInfinity } from "igniteui-angular-core";
import { boxArray$1, arrayShallowClone } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { DataTemplateMeasureInfo } from "igniteui-angular-core";
import { NumericMarkerManager } from "./NumericMarkerManager";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
/**
 * @hidden
 */
export let ScatterBase = /*@__PURE__*/ (() => {
    class ScatterBase extends MarkerSeries {
        constructor() {
            super();
            this.rw = null;
            this.sa = null;
            this.sb = null;
            this.uz = null;
            this.u0 = null;
            this.r5 = 1;
            this.rh = null;
            this.ri = null;
            this.r2 = null;
            this.r4 = null;
            this.r0 = null;
            this.sf = false;
            this.se = false;
            this.rs = null;
            this.rt = null;
            this.assigningScatterStyle = null;
            this.assigningScatterMarkerStyle = null;
            this.r9 = null;
            this.r3 = null;
            this.rz = null;
            this.r6 = this.r7();
            this.r9 = new ScatterSeriesRenderManager();
            this.r3 = new ScatterFrame();
            this.u0 = Rect.empty;
            this.uz = Rect.empty;
        }
        bx() {
            return new ScatterBaseView(this);
        }
        ku() {
            super.ku();
            this.xAxis = null;
            this.yAxis = null;
        }
        ly(a) {
            super.ly(a);
            this.rx = a;
        }
        get_ec() {
            return true;
        }
        ag() {
            return [this.xAxis, this.yAxis];
        }
        hw(a, b) {
            let c = this.jq(b);
            if (c == ScatterBase.$$p[10]) {
                return this.hx(a, b, this.td);
            }
            if (c == ScatterBase.$$p[14]) {
                return this.hx(a, b, this.tl);
            }
            return null;
        }
        c1(a, b, c, d) {
            if (!this.hasMarkers) {
                return false;
            }
            let e = this.xAxis;
            let f = new ScalerParams(1, this.cd.sf, this.py, e.cg);
            f.c = this.getEffectiveViewport1(this.b0);
            let g = this.yAxis;
            let h = new ScalerParams(1, this.cd.sf, this.py, g.cg);
            h.c = this.getEffectiveViewport1(this.b0);
            a.clear();
            this.qb.cf((i) => {
                if (i._visibility == 0) {
                    let j = new SeriesPointOfInterest();
                    let k = i.n;
                    let l = i.o;
                    if (k < this.py.left || k > this.py.right || l < this.py.top || l > this.py.bottom) {
                        return;
                    }
                    j.b = e.el(k, f);
                    j.c = g.el(l, h);
                    j.a = i.content;
                    a.add(j);
                }
            });
            return true;
        }
        bp() {
            if (this.bq == 0) {
                if (this.sx <= 2000) {
                    return 1;
                }
                else {
                    return super.bp();
                }
            }
            else {
                return super.bp();
            }
        }
        pw(a) {
            if (!this.hasMarkers || !this.qe()) {
                return Rect.empty;
            }
            let b = this.qb.by(this.pg(a));
            if (b != null) {
                return this.qb.cp(b);
            }
            return Rect.empty;
        }
        ev(a, b) {
            if (this.qf(a, b)) {
                return true;
            }
            return false;
        }
        get sc() {
            return this.sa;
        }
        set sc(a) {
            if (this.sa != a) {
                let b = this.sc;
                this.sa = a;
                this.raisePropertyChanged("XColumn", b, this.sc);
            }
        }
        get sd() {
            return this.sb;
        }
        set sd(a) {
            if (this.sb != a) {
                let b = this.sd;
                this.sb = a;
                this.raisePropertyChanged("YColumn", b, this.sd);
            }
        }
        get uw() {
            return this.c(ScatterBase.t9);
        }
        set uw(a) {
            this.h(ScatterBase.t9, a);
        }
        get GetErrorBarsXAxis() {
            return this.xAxis;
        }
        get GetErrorBarsYAxis() {
            return this.yAxis;
        }
        le() {
            super.le();
            if (this.xAxis != null) {
                this.xAxis.h7(false);
            }
            if (this.yAxis != null) {
                this.yAxis.h7(false);
            }
        }
        l3(a, b, c, d) {
            super.l3(a, b, c, d);
            if (this.rx.cx.g$b(a, b, c, d)) {
                this.mh(false);
                this.lo();
            }
            switch (b) {
                case "FastItemsSource":
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        c.deregisterColumn(this.sc);
                        c.deregisterColumn(this.sd);
                        this.sc = null;
                        this.sd = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        this.sc = this.ch(this.td);
                        this.sd = this.ch(this.tl);
                    }
                    if ((this.yAxis != null && !this.yAxis.c0()) || (this.xAxis != null && !this.xAxis.c0())) {
                        this.mh(false);
                    }
                    break;
                case ScatterBase.$$p[7]:
                    if (c != null) {
                        c.bz(this);
                    }
                    if (d != null) {
                        d.cs(this);
                    }
                    if ((this.xAxis != null && !this.xAxis.c0()) || (d == null && c != null)) {
                        this.mh(false);
                    }
                    this.lo();
                    break;
                case ScatterBase.$$p[11]:
                    if (c != null) {
                        c.bz(this);
                    }
                    if (d != null) {
                        d.cs(this);
                    }
                    if ((this.yAxis != null && !this.yAxis.c0()) || (d == null && c != null)) {
                        this.mh(false);
                    }
                    this.lo();
                    break;
                case ScatterBase.$$p[10]:
                    if (this.ck != null) {
                        this.ck.deregisterColumn(this.sc);
                        this.sc = this.ch(this.td);
                    }
                    break;
                case "XColumn":
                    this.rx.cx.g$i();
                    if (this.xAxis != null && !this.xAxis.c0()) {
                        this.mh(false);
                    }
                    break;
                case ScatterBase.$$p[14]:
                    if (this.ck != null) {
                        this.ck.deregisterColumn(this.sd);
                        this.sd = this.ch(this.tl);
                    }
                    break;
                case "YColumn":
                    this.rx.cx.g$i();
                    if (this.yAxis != null && !this.yAxis.c0()) {
                        this.mh(false);
                    }
                    break;
                case ScatterBase.$$p[5]:
                    this.mh(false);
                    this.lo();
                    break;
                case ScatterBase.$$p[6]:
                    this.mh(false);
                    this.lo();
                    break;
                case "TransitionProgress":
                    this.r4.c(this.g0, this.r2, this.r0);
                    this.tn();
                    try {
                        if (this.cx(this.b0)) {
                            return;
                        }
                        if ((Math.round(this.g0 * 100000) / 100000) == 1) {
                            this.t7(this.r0, this.rx);
                        }
                        else {
                            this.t7(this.r4, this.rx);
                        }
                        if (this.cd != null) {
                            this.cd.nn(this);
                        }
                    }
                    finally {
                        this.t8();
                    }
                    break;
                case "TrendLineBrush":
                    this.mv();
                    break;
                case ScatterBase.$$p[0]:
                    if (this.ry != null) {
                        this.ry.r = this;
                    }
                    this.mh(false);
                    this.lo();
                    break;
                case "TrendLineType":
                    this.lo();
                    break;
                case ScatterBase.$$p[2]:
                    this.sf = this.sn();
                    this.mh(false);
                    break;
                case ScatterBase.$$p[1]:
                    this.se = this.sm();
                    this.mh(false);
                    break;
                case ScatterBase.$$p[3]:
                    this.r6 = this.r7();
                    break;
            }
        }
        sn() {
            return this.sj;
        }
        sm() {
            return this.si;
        }
        sh(a) {
            if (typeCast(NumericYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        sg(a) {
            if (typeCast(NumericXAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        t8() {
            this.uz = Rect.empty;
            this.u0 = Rect.empty;
        }
        tn() {
            let a = this.getViewInfo(this.uz, this.u0);
            this.uz = a.p0;
            this.u0 = a.p1;
        }
        sl(a, b) {
            if (b != 3) {
                return true;
            }
            if (a == null) {
                return true;
            }
            if (this.td == a || this.tl == a) {
                return true;
            }
            return false;
        }
        k0(a, b, c, d) {
            let e = false;
            if (!this.sl(d, a)) {
                return;
            }
            this.rx.cx.g$e(a, b, c, d);
            if (this.xAxis != null && !this.xAxis.c0()) {
                e = true;
            }
            if (this.yAxis != null && !this.yAxis.c0()) {
                e = true;
            }
            if (e) {
                this.mh(true);
            }
        }
        tz(a) {
            this.t0(a, null);
        }
        t0(a, b) {
            let c = this.sc != null ? this.sc.count : 0;
            let d = this.sd != null ? this.sd.count : 0;
            let e = Math.min(c, d);
            if (e <= this.sx) {
                a.m.clear();
                let f = new List$1(OwnedPoint.$, 0);
                for (let g of fromEnum(a.u.values)) {
                    f.add(g);
                }
                let h = this.ck;
                f.aa((i, j) => {
                    let k = h.indexOf(i.a);
                    let l = h.indexOf(j.a);
                    if (k < l) {
                        return -1;
                    }
                    if (k > l) {
                        return 1;
                    }
                    return 0;
                });
                if (b != null) {
                    b.i = a.m;
                }
                for (let i of fromEnum(f)) {
                    if (h.indexOf(i.a) >= 0) {
                        if (b != null) {
                            b.j(i.c);
                        }
                        else {
                            a.m.add({ $type: Point_$type, x: i.c.x, y: i.c.y });
                        }
                    }
                }
            }
        }
        ap(a) {
            if (a != null && a == this.xAxis && this.sc != null) {
                return new AxisRange(this.sc.minimum, this.sc.maximum);
            }
            if (a != null && a == this.yAxis && this.sd != null) {
                return new AxisRange(this.sd.minimum, this.sd.maximum);
            }
            return null;
        }
        ht(a) {
            let b = this.hd(a);
            if (this.ck != null && b >= 0 && b < this.ck.count) {
                return this.ck.item(b);
            }
            return null;
        }
        get r6() {
            return this.r5;
        }
        set r6(a) {
            let b = this.r5;
            this.r5 = a;
            if (b != this.r5) {
                this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.r5));
            }
        }
        r7() {
            if (this.r8 != 0) {
                return this.r8;
            }
            return this.sk ? 4 : 1;
        }
        hd(a) {
            let b = truncate(Math.round(this.f5(a)));
            return b;
        }
        f5(a) {
            switch (this.r6) {
                case 1: return this.st(a);
                case 3: return this.su(a);
                case 2: return this.sr(a);
                case 4: return this.ss(a);
            }
            return -1;
        }
        ss(a) {
            return this.sv(a, false);
        }
        sr(a) {
            let b = this.pg(a);
            let c = b.x;
            let d = b.y;
            if (this.ck == null || this.xAxis == null || this.yAxis == null || this.sc == null || this.sd == null) {
                return -1;
            }
            if (this.ck.count > this.sw) {
                return -1;
            }
            this.tq();
            let e = this.rh;
            let f = this.ri;
            if (e == null || f == null) {
                return -1;
            }
            let g = 1.7976931348623157E+308;
            let h = -1;
            for (let i = 0; i < this.sc.count; i++) {
                let j = e[i];
                let k = f[i];
                let l = (c - j) * (c - j) + (d - k) * (d - k);
                if (l < g) {
                    g = l;
                    h = i;
                }
            }
            return h;
        }
        tq() {
            let a = this.b0.bv;
            let b = this.b0.bu;
            let c = this.getEffectiveViewport();
            if (this.rw == null) {
                return;
            }
            let d = new ScalerParams(0, a, b, this.rw.d, c);
            let e = ((() => {
                let $ret = new ScalerParams(0, a, b, this.rw.e, c);
                $ret.b = this.gc();
                return $ret;
            })());
            if (this.rh == null || this.ri == null) {
                let f = arrayShallowClone(this.sc.asArray());
                let g = arrayShallowClone(this.sd.asArray());
                this.xAxis.hm(boxArray$1(f), 0, f.length, d);
                this.yAxis.hm(boxArray$1(g), 0, g.length, e);
                this.rh = f;
                this.ri = g;
            }
        }
        get_sk() {
            return false;
        }
        get sk() {
            return this.get_sk();
        }
        sv(a, b) {
            if (!this.sk) {
                return -1;
            }
            let c = { $type: Point_$type, x: 0, y: 0 };
            let d = true;
            let e = this.r1();
            if (e == null) {
                return -1;
            }
            if (e.m == null) {
                return -1;
            }
            if (this.ck == null || this.ck.count > this.sw) {
                return -1;
            }
            this.tq();
            let f = this.rh;
            let g = this.ri;
            if (f == null || g == null) {
                return -1;
            }
            let h = this.pg(a);
            let i = 1.7976931348623157E+308;
            let j = -1;
            for (let k = 0; k < this.rh.length; k++) {
                let l = { $type: Point_$type, x: this.rh[k], y: this.ri[k] };
                if (k > 0) {
                    if (!b || e.j.containsKey(this.ck.item(k)) || e.j.containsKey(this.ck.item(k - 1))) {
                        let m = GeometryUtil.d(h, c, l);
                        if (m < i) {
                            i = m;
                            j = k;
                        }
                    }
                }
                c = l;
            }
            if (j >= 0) {
                let n = { $type: Point_$type, x: this.rh[j], y: this.ri[j] };
                let o = { $type: Point_$type, x: this.rh[j - 1], y: this.ri[j - 1] };
                if (!b || (e.j.containsKey(this.ck.item(j)) && e.j.containsKey(this.ck.item(j - 1)))) {
                    let p = GeometryUtil.h(h, o, n);
                    return (j - 1) + p;
                }
                else if (e.j.containsKey(this.ck.item(j))) {
                    return j;
                }
                else {
                    return j - 1;
                }
            }
            return -1;
        }
        su(a) {
            return this.sv(a, true);
        }
        st(a) {
            let b = null;
            let c = 1.7976931348623157E+308;
            let d = this.pg(a);
            let e = d.x;
            let f = d.y;
            if (this.rx.cy.e > this.sw) {
                return -1;
            }
            this.rx.c5((g) => {
                if (g._visibility == 0) {
                    let h = this.rx.cp(g);
                    let i = h.left + h.width / 2;
                    let j = h.top + h.height / 2;
                    let k = (e - i) * (e - i) + (f - j) * (f - j);
                    if (k < c) {
                        c = k;
                        b = g;
                    }
                }
            });
            if (b != null) {
                return b.ak;
            }
            return -1;
        }
        pl(a, b, c) {
            if (this.xAxis == null || this.yAxis == null || this.sc == null || this.sd == null) {
                return { $type: Point_$type, x: NaN, y: NaN };
            }
            let d = this.b0.bv;
            let e = this.b0.bu;
            let f = this.getEffectiveViewport();
            let g = new ScalerParams(0, d, e, this.xAxis.cg, f);
            let h = ((() => {
                let $ret = new ScalerParams(0, d, e, this.yAxis.cg, f);
                $ret.b = this.gc();
                return $ret;
            })());
            if (b) {
                let i = this.f5(a);
                if (i == -1) {
                    return { $type: Point_$type, x: NaN, y: NaN };
                }
                let j = truncate(Math.floor(i));
                let k = truncate(Math.ceil(i));
                if (j < 0) {
                    j = 0;
                }
                if (k < 0) {
                    k = 0;
                }
                if (k > this.ck.count - 1) {
                    k = this.ck.count - 1;
                }
                if (j > this.ck.count - 1) {
                    j = this.ck.count - 1;
                }
                if (k == j) {
                    let l = this.xAxis.ei(this.sc.item(j), g);
                    let m = this.yAxis.ei(this.sd.item(j), h);
                    return { $type: Point_$type, x: l, y: m };
                }
                let n = i - Math.floor(i);
                let o = this.xAxis.ei(this.sc.item(j), g);
                let p = this.yAxis.ei(this.sd.item(j), h);
                let q = this.xAxis.ei(this.sc.item(k), g);
                let r = this.yAxis.ei(this.sd.item(k), h);
                let s = q - o;
                let t = r - p;
                return { $type: Point_$type, x: o + s * n, y: p + t * n };
            }
            else {
                let u = this.hd(a);
                if (u == -1) {
                    return { $type: Point_$type, x: NaN, y: NaN };
                }
                let v = this.xAxis.ei(this.sc.item(u), g);
                let w = this.yAxis.ei(this.sd.item(u), h);
                return { $type: Point_$type, x: v, y: w };
            }
        }
        en(a) {
            let b = this.cd != null ? this.cd.sf : Rect.empty;
            b = b.copy();
            let c = this.cd != null ? this.cd.su : Rect.empty;
            let d = new Rect(0, 0, 0, 1, 1);
            let e = this.ps(this.b0);
            let f = new ScalerParams(0, d, d, this.xAxis.cg, e);
            let g = ((() => {
                let $ret = new ScalerParams(0, d, d, this.yAxis.cg, e);
                $ret.b = this.gc();
                return $ret;
            })());
            let h = !b.isEmpty && !c.isEmpty && this.ck != null ? this.ck.indexOf(a) : -1;
            let i = this.xAxis != null && this.sc != null && h < this.sc.count ? this.xAxis.ei(this.sc.item(h), f) : NaN;
            let j = this.yAxis != null && this.sd != null && h < this.sd.count ? this.yAxis.ei(this.sd.item(h), g) : NaN;
            if (!isNaN_(i)) {
                if (i < b.left + 0.1 * b.width) {
                    i = i + 0.4 * b.width;
                    b.x = i - 0.5 * b.width;
                }
                if (i > b.right - 0.1 * b.width) {
                    i = i - 0.4 * b.width;
                    b.x = i - 0.5 * b.width;
                }
            }
            if (!isNaN_(j)) {
                if (j < b.top + 0.1 * b.height) {
                    j = j + 0.4 * b.height;
                    b.y = j - 0.5 * b.height;
                }
                if (j > b.bottom - 0.1 * b.height) {
                    j = j - 0.4 * b.height;
                    b.y = j - 0.5 * b.height;
                }
            }
            if (this.b8 != null) {
                this.b8.au(this.cd, b, true);
            }
            return h >= 0;
        }
        m4(a, b) {
            this.mh(false);
        }
        m5(a, b) {
            this.mh(false);
        }
        r1() {
            let a = this.r0;
            if (this.cv()) {
                if (this.ce.g) {
                    this.ce.t();
                }
                a = this.r4;
            }
            return a;
        }
        to(a, b, c, d, e) {
            b.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, c);
            let f = this.getEffectiveViewport1(a);
            let g = this.ck;
            let h;
            let i;
            let j = ((() => {
                let $ret = new ScalerParams(0, d, e, this.rw.d, f);
                $ret.c = this.getEffectiveViewport1(a);
                return $ret;
            })());
            let k = ((() => {
                let $ret = new ScalerParams(0, d, e, this.rw.e, f);
                $ret.c = this.getEffectiveViewport1(a);
                $ret.b = this.gc();
                return $ret;
            })());
            let l = false;
            let m = 0;
            if (this.cd != null) {
                if (this.cd.e3()) {
                    let n = this.cd.ku(d, j);
                    l = n.c;
                    m = n.d;
                }
            }
            for (let o = 0; o < c; o++) {
                h = this.sc.item(o);
                i = this.sd.item(o);
                let p = { $type: Point_$type, x: this.rw.a.ei(h, j), y: this.rw.b.ei(i, k) };
                if (l) {
                    if (p.x < e.left || p.x > e.right) {
                        if (p.x + m >= e.left && p.x + m <= e.right) {
                            p = { $type: Point_$type, x: p.x + m, y: i };
                        }
                    }
                }
                if (!isInfinity(p.x) && !isInfinity(p.y)) {
                    let q = g.item(o);
                    if (!b.g.containsKey(q)) {
                        let r = { $type: Point_$type, x: h, y: i };
                        let s = { $type: Point_$type, x: p.x, y: p.y };
                        b.g.addItem(q, ((() => {
                            let $ret = new OwnedPoint();
                            $ret.a = q;
                            $ret.b = r;
                            $ret.c = s;
                            return $ret;
                        })()));
                    }
                }
            }
        }
        tw(a, b) {
            this.rh = null;
            this.ri = null;
            a.j.clear();
            a.n.clear();
            a.h.clear();
            a.l.clear();
            a.i.clear();
            a.k.clear();
            let c = Math.min(this.sc != null ? this.sc.count : 0, this.sd != null ? this.sd.count : 0);
            let d = b.bv;
            let e = b.bu;
            let f = this.getEffectiveViewport1(b);
            let g = new ScalerParams(0, d, e, this.xAxis.cg, f);
            g.c = this.getEffectiveViewport1(b);
            let h = ((() => {
                let $ret = new ScalerParams(0, d, e, this.yAxis.cg, f);
                $ret.b = this.gc();
                return $ret;
            })());
            h.c = this.getEffectiveViewport1(b);
            if (c < 1) {
                return;
            }
            this.rw = ((() => {
                let $ret = new ScatterAxisInfoCache();
                $ret.a = this.xAxis;
                $ret.b = this.yAxis;
                $ret.d = this.xAxis.cg;
                $ret.e = this.yAxis.cg;
                $ret.c = this.ck;
                return $ret;
            })());
            let i = b;
            if (c <= this.sx) {
                this.to(i, a, c, d, e);
            }
            if (this.qe()) {
                b.cv.l(a.j, this.sx, d, e, this.ft);
            }
            let j = ((() => {
                let $ret = new Clipper(0, e, false);
                $ret.i = a.n;
                return $ret;
            })());
            let k = this.pq(b);
            let l = this.xAxis.el(k.left, g);
            let m = this.xAxis.el(k.right, g);
            b.cx.h(a.n, this.trendLineType, this.sc, this.sd, this.trendLinePeriod, (n) => this.xAxis.ei(n, g), (n) => this.yAxis.ei(n, h), ((() => {
                let $ret = new TrendResolutionParams();
                $ret.b = this.ft;
                $ret.f = e;
                $ret.g = d;
                return $ret;
            })()), j, l, m);
            this.tu(a, b);
        }
        kx(a, b) {
            super.kx(a, b);
            let c = b;
            c.c4(a);
        }
        get_dx() {
            return true;
        }
        rq(a, b, c) {
            return null;
        }
        rr(a, b, c) {
            let d = this.r1();
            let e = this.rx.by(this.pg(b));
            let f = -1;
            if (e == null) {
                if (a != null) {
                    f = this.ck.indexOf(a);
                }
                else {
                    return null;
                }
            }
            else {
                f = e.ak;
            }
            if (f == -1) {
                return null;
            }
            let g = new HighlightingInfo();
            g.b = this;
            g.h = f;
            g.g = f;
            g.d = false;
            g.e = true;
            if (c != null && c.h == g.h && c.g == g.g) {
                return c;
            }
            return g;
        }
        p0(a, b) {
            if (this.qc != 1 && this.qc != 13) {
                let c = this.qb.cq();
                let d = (c.width / 2) + (this.qh / 2);
                let e = (c.height / 2) + (this.qh / 2);
                let f = d;
                let g = d;
                let h = e;
                let i = e;
                if (a == 2 || a == 4) {
                    f = 0;
                }
                if (a == 2 || a == 3) {
                    g = 0;
                }
                if (b == 2 || b == 3) {
                    h = 0;
                }
                if (b == 2 || b == 4) {
                    i = 0;
                }
                return new Thickness(1, f, h, g, i);
            }
            return new Thickness(1, 0, 0, 0, 0);
        }
        rp(a, b, c) {
            let d = new HighlightingInfo();
            d.b = this;
            d.h = 0;
            d.g = this.ck.count - 1;
            d.d = true;
            if (c != null && c.h == d.h && c.g == d.g) {
                return c;
            }
            return d;
        }
        aw(a, b, c) {
            if (this.c2 && this.ef(this.bk) && !c) {
                let d = this.rq(a, b, this.rs);
                this.rs = d;
                return d;
            }
            else {
                let e = this.rp(a, b, this.rs);
                this.rs = e;
                return e;
            }
        }
        ax(a, b, c) {
            if (this.ef(this.bk) && !c) {
                let d = this.rr(a, b, this.rt);
                this.rt = d;
                return d;
            }
            else {
                let e = this.rp(a, b, this.rt);
                e.e = true;
                this.rt = e;
                return e;
            }
        }
        sp() {
            return (this.assigningScatterStyle != null && this.sf) || (this.bk != 1);
        }
        so() {
            return (this.assigningScatterMarkerStyle != null && this.se) || (this.bk != 1);
        }
        t7(a, b) {
            let c = b.bu;
            this.rw = ((() => {
                let $ret = new ScatterAxisInfoCache();
                $ret.a = this.xAxis;
                $ret.b = this.yAxis;
                $ret.d = this.xAxis.cg;
                $ret.e = this.yAxis.cg;
                return $ret;
            })());
            if (this.qe()) {
                b.cv.j(a.j, this.qg);
                if (this.so()) {
                    this.tp(b, a);
                }
            }
            b.cm();
            let d = ((() => {
                let $ret = new Clipper(1, NaN, c.bottom, NaN, c.top, false);
                $ret.i = b.cx.g$j.ak;
                return $ret;
            })());
            b.cx.g$h(a.n, d);
            this.t4(a, b);
        }
        rk(a, b) {
            return this.rl(a, b);
        }
        rl(a, b) {
            if (b < a || a < 0 || a > this.sc.count || b < 0 || b > this.sc.count) {
                return null;
            }
            let c = new Array((b - a) + 1);
            for (let d = a; d <= b; d++) {
                let e = d;
                c[d - a] = this.ck.item(d);
            }
            return c;
        }
        tp(a, b) {
            a.b3 = true;
            this.r9.aw(this, this.so(), runOn(this, this.rk));
            let c = this.r9.d;
            let d = c != null;
            let e = this.getEffectiveViewport1(a);
            let f = this.ck == null ? 0 : this.ck.count;
            this.rx.cf((g) => {
                if (g._visibility == 0) {
                    let h = g.ak;
                    let i = g.content;
                    if (i == null) {
                        i = new DataContext();
                        g.content = i;
                    }
                    if (d) {
                        this.tr(h, f, a.q);
                    }
                    this.r9.ac(g, i);
                }
            });
        }
        ts(a, b, c) {
            let d = this.bk != 1;
            this.r9.ay(this.r9.b, a, b, false);
            this.r9.ab(this.fr);
            let e = this.r9.av;
            let f = null;
            let g = this.ck;
            if (d && this.cd != null) {
                f = this.cd.a3.getHighlightingInfo(this, g, e.o, e.n, false);
                e.b = f;
            }
            e.f = c;
            this.t2(e);
            this.r9.z(this, f, c, d, a < 0);
        }
        tr(a, b, c) {
            let d = this.bk != 1;
            this.r9.ay(this.r9.d, a, b, true);
            this.r9.aa(this.fr);
            let e = this.r9.au;
            let f = null;
            let g = this.ck;
            let h = null;
            if (d && this.cd != null) {
                f = this.cd.a3.getHighlightingInfo(this, g, e.o, e.n, true);
                if (this.cd.a3.isCrossSeriesHighlight(this)) {
                    h = this.cd.a3.getHighlightingInfo(this, g, e.o, e.n, true);
                }
                e.b = f;
            }
            e.f = c;
            this.t1(e);
            this.r9.y(this, f, c, d, e.m, this.cd.a3.totalHighlightingProgress);
        }
        t2(a) {
            if (this.assigningScatterStyle != null && this.sf) {
                this.assigningScatterStyle(this, a);
            }
        }
        t1(a) {
            if (this.assigningScatterMarkerStyle != null && this.se) {
                this.assigningScatterMarkerStyle(this, a);
            }
        }
        tu(a, b) {
            let c = new ErrorBarsHelper(this, b);
            if (this.ry == null) {
                return;
            }
            let d = this.ry.u;
            let e = this.ry.v;
            let f = 0;
            let g = 0;
            let h = 0;
            let i = 0;
            for (let j of fromEnum(a.j.keys)) {
                let k = a.j.item(j);
                if (d != null) {
                    switch (d.getCalculatorType()) {
                        case 1:
                            let l = this.tx(k, c, d, h, i, true);
                            h = l.p3;
                            i = l.p4;
                            break;
                        case 0:
                            let m = this.tv(k, c, d, h, i, true);
                            h = m.p3;
                            i = m.p4;
                            break;
                        case 2:
                            let n = this.tt(k, c, d, j, h, i, true);
                            h = n.p4;
                            i = n.p5;
                            break;
                        case 3:
                            let o = this.ty(c, d, f, h, i, true);
                            f = o.p2;
                            h = o.p3;
                            i = o.p4;
                            break;
                        case 4:
                            let p = this.tv(k, c, d, h, i, true);
                            h = p.p3;
                            i = p.p4;
                            break;
                    }
                    ;
                    let q = new OwnedPoint();
                    q.c = c.l(d, this.rw.a, k.c, f);
                    q.a = k.a;
                    a.h.addItem(j, q);
                    a.i.addItem(j, [h, i]);
                }
                if (e != null) {
                    switch (e.getCalculatorType()) {
                        case 1:
                            let r = this.tx(k, c, e, h, i, false);
                            h = r.p3;
                            i = r.p4;
                            break;
                        case 0:
                            let s = this.tv(k, c, e, h, i, false);
                            h = s.p3;
                            i = s.p4;
                            break;
                        case 2:
                            let t = this.tt(k, c, e, j, h, i, false);
                            h = t.p4;
                            i = t.p5;
                            break;
                        case 3:
                            let u = this.ty(c, e, g, h, i, false);
                            g = u.p2;
                            h = u.p3;
                            i = u.p4;
                            break;
                        case 4:
                            let v = this.tv(k, c, e, h, i, false);
                            h = v.p3;
                            i = v.p4;
                            break;
                    }
                    ;
                    let w = new OwnedPoint();
                    w.c = c.m(e, this.rw.b, k.c, g);
                    w.a = k.a;
                    a.l.addItem(j, w);
                    a.k.addItem(j, [h, i]);
                }
            }
        }
        tx(a, b, c, d, e, f) {
            if (f) {
                let g;
                let h, i;
                i = this.rw.a;
                if (this.ry.s == 0) {
                    g = a.c.x;
                    h = this.rw.a;
                }
                else {
                    g = a.c.y;
                    h = this.rw.b;
                }
                let j = b.f(g, c, h, i, d, e);
                d = j.p4;
                e = j.p5;
            }
            else {
                let k;
                let l, m;
                m = this.rw.b;
                if (this.ry.t == 0) {
                    k = a.c.x;
                    l = this.rw.a;
                }
                else {
                    k = a.c.y;
                    l = this.rw.b;
                }
                let n = b.f(k, c, l, m, d, e);
                d = n.p4;
                e = n.p5;
            }
            return {
                p3: d,
                p4: e
            };
        }
        tv(a, b, c, d, e, f) {
            if (f) {
                let g = b.j(a.c.x, c, this.rw.a, d, e);
                d = g.p3;
                e = g.p4;
            }
            else {
                let h = b.j(a.c.y, c, this.rw.b, d, e);
                d = h.p3;
                e = h.p4;
            }
            return {
                p3: d,
                p4: e
            };
        }
        tt(a, b, c, d, e, f, g) {
            let h = c.getItemColumn();
            let i = this.ck.indexOf(d);
            if (h != null && i < h.count) {
                let j = h.item(i);
                if (g) {
                    let k = b.h(a.c.x, j, this.rw.a, e, f);
                    e = k.p3;
                    f = k.p4;
                }
                else {
                    let l = b.h(a.c.y, j, this.rw.b, e, f);
                    e = l.p3;
                    f = l.p4;
                }
            }
            else {
                e = NaN;
                f = NaN;
            }
            return {
                p4: e,
                p5: f
            };
        }
        ty(a, b, c, d, e, f) {
            let g = a.i(b, c);
            c = g.p1;
            if (f) {
                let h = a.k(c, b, this.rw.a, d, e);
                d = h.p3;
                e = h.p4;
            }
            else {
                let i = a.k(c, b, this.rw.b, d, e);
                d = i.p3;
                e = i.p4;
            }
            return {
                p2: c,
                p3: d,
                p4: e
            };
        }
        t4(a, b) {
            if (!b.o() || this.ry == null) {
                b.c6();
                return;
            }
            this.t5(a, b);
            this.t6(a, b);
        }
        t5(a, b) {
            b.c2();
            let c = new ErrorBarsHelper(this, b);
            let d = new PathGeometry();
            let e = this.ry.u;
            for (let f of fromEnum(a.j.keys)) {
                if (e != null && a.i.containsKey(f)) {
                    let g = a.i.item(f)[0];
                    let h = a.i.item(f)[1];
                    if (!isNaN_(g) && !isNaN_(h)) {
                        let i = a.h.item(f).c;
                        if (this.ry.o == 1 || this.ry.o == 2) {
                            c.d(d, i, g, true);
                        }
                        if (this.ry.o == 1 || this.ry.o == 3) {
                            c.d(d, i, h, false);
                        }
                    }
                }
            }
            b.c7(d);
        }
        t6(a, b) {
            b.c3();
            let c = new ErrorBarsHelper(this, b);
            let d = new PathGeometry();
            let e = this.ry.v;
            for (let f of fromEnum(a.j.keys)) {
                if (e != null && a.k.containsKey(f)) {
                    let g = a.k.item(f)[0];
                    let h = a.k.item(f)[1];
                    if (!isNaN_(g) && !isNaN_(h)) {
                        let i = a.l.item(f).c;
                        if (this.ry.p == 1 || this.ry.p == 2) {
                            c.e(d, i, g, true);
                        }
                        if (this.ry.p == 1 || this.ry.p == 3) {
                            c.e(d, i, h, false);
                        }
                    }
                }
            }
        }
        e9(a, b, c) {
            let d = true;
            if (!super.e9(a, b, c) || b.isEmpty || a.isEmpty || this.xAxis == null || this.yAxis == null || this.xAxis.bh == null || this.yAxis.bh == null || this.sc == null || this.sd == null || this.sc.count == 0 || this.sd.count == 0 || this.ck == null || this.ck.count != this.sc.count || this.ck.count != this.sd.count || this.xAxis.bh == null || this.yAxis.bh == null || this.xAxis.lv == this.xAxis.lu || this.yAxis.lv == this.yAxis.lu) {
                d = false;
            }
            return d;
        }
        getViewInfo(a, b) {
            if (!this.uz.isEmpty && !this.u0.isEmpty) {
                a = this.uz;
                b = this.u0;
                return {
                    p0: a,
                    p1: b
                };
            }
            a = this.b0.bu;
            b = this.b0.bv;
            return {
                p0: a,
                p1: b
            };
        }
        mi(a) {
            this.tn();
            try {
                if (this.cx(this.b0)) {
                    return;
                }
                if (this.ck != null && this.ck.count > this.sx) {
                    a = false;
                }
                if (this.eo(a) && !this.es) {
                    let b = this.r2;
                    if (this.cv()) {
                        if (this.ce.g) {
                            this.ce.t();
                        }
                        this.r2 = this.r4;
                        this.r4 = b;
                    }
                    else {
                        this.r2 = this.r0;
                        this.r0 = b;
                    }
                    this.tw(this.r0, this.rx);
                    this.mq();
                }
                else {
                    if (!this.es) {
                        this.tw(this.r0, this.rx);
                    }
                    this.t7(this.r0, this.rx);
                }
            }
            finally {
                this.t8();
            }
        }
        mv() {
            super.mv();
            if (this.index < 0) {
                return;
            }
            this.rx.da();
        }
        mj(a, b) {
            super.mj(a, b);
            if (!this.ez) {
                this.b0.a2(b);
                return;
            }
            this.b0.a2(b);
            if (this.cx(this.bz)) {
                return;
            }
            let c = typeCast(ScatterBaseView.$, this.bz);
            if (!this.et) {
                this.r3 = new ScatterFrame();
                this.tw(this.r3, c);
            }
            this.et = false;
            this.t7(this.r3, c);
            this.ez = false;
        }
        mg(a, b, c, d, e) {
            super.mg(a, b, c, d, e);
            let f = this.a6.a$h.item(d);
            let g = f;
            f.a1(c);
            if (this.cx(g)) {
                return;
            }
            if (this.rz == null) {
                this.rz = new ScatterFrame();
            }
            this.tw(this.rz, g);
            this.t7(this.rz, g);
        }
        t3(a, b) {
            let c = new List$1(Base.$, 0);
            for (let d of fromEnum(b.c)) {
                if (!a.containsKey(d)) {
                    c.add1(d);
                }
            }
            for (let e of fromEnum(c)) {
                b.h(e);
            }
        }
        rj(a, b, c, d, e) {
            if (c == null || c.length != this.rw.c.count) {
                c = new Array(this.rw.c.count);
                for (let f = 0; f < this.rw.c.count; f++) {
                    c[f] = PointUtil.create();
                }
            }
            let g = this.getEffectiveViewport1(a);
            let h = ((() => {
                let $ret = new ScalerParams(0, d, e, this.xAxis.cg, g);
                $ret.c = this.getEffectiveViewport1(a);
                return $ret;
            })());
            let i = ((() => {
                let $ret = new ScalerParams(0, d, e, this.yAxis.cg, g);
                $ret.c = this.getEffectiveViewport1(a);
                $ret.b = this.gc();
                return $ret;
            })());
            let j = this.pq(a);
            let k = this.rw.a.el(j.left, h);
            let l = this.rw.a.el(j.right, h);
            let m = this.rw.b.el(j.bottom, i);
            let n = this.rw.b.el(j.top, i);
            if (this.rw.d) {
                let o = k;
                k = l;
                l = o;
            }
            if (this.rw.e) {
                let p = m;
                m = n;
                n = p;
            }
            let q = this.rw;
            let r = q.a;
            let s = q.b;
            let t;
            let u;
            let v = this.sc;
            let w = this.sd;
            let x = false;
            let y = 0;
            let z = 0;
            if (this.cd != null) {
                if (this.cd.e3()) {
                    let aa = this.cd.ku(d, h);
                    x = aa.c;
                    y = aa.d;
                    z = r.el(0 + y, h);
                    let ab = r.el(0, h);
                    z -= ab;
                }
            }
            for (let ac = 0; ac < this.rw.c.count; ac++) {
                t = v.item(ac);
                u = w.item(ac);
                if (x) {
                    if (t >= k && t <= l && u >= m && u <= n) {
                        c[ac].x = r.ei(t, h);
                        c[ac].y = s.ei(u, i);
                    }
                    else {
                        if ((t + z) >= k && (t + z) <= l && u >= m && u <= n) {
                            c[ac].x = r.ei(t, h) + y;
                            c[ac].y = s.ei(u, i);
                        }
                        else {
                            c[ac].x = NaN;
                            c[ac].y = NaN;
                        }
                    }
                }
                else {
                    if (t >= k && t <= l && u >= m && u <= n) {
                        c[ac].x = r.ei(t, h);
                        c[ac].y = s.ei(u, i);
                    }
                    else {
                        c[ac].x = NaN;
                        c[ac].y = NaN;
                    }
                }
            }
            return c;
        }
        sq(a, b) {
            if (b == null) {
                b = new List$1(Number_$type, 2, a.e);
            }
            else {
                b.clear();
            }
            let c = 0;
            let d = this.ck;
            for (let e of fromEnum(a.c)) {
                b.add(d.indexOf(e));
            }
            return b;
        }
        k7(a) {
            super.k7(a);
            this.a8.exportTrendlineData(this, a, this.rx.cx.g$j);
        }
        gc() {
            return Series.gd(this.sd, null);
        }
        getDataLegendSeriesContextAt(a, b) {
            let c = { $type: Point_$type, x: a, y: b };
            let d = this.ht(c);
            let e = d == null ? NaN : this.gb(d, "XMemberPath");
            let f = d == null ? NaN : this.gb(d, "YMemberPath");
            let g = new DataLegendSeriesValueInfo();
            g.l = e;
            g.a = 13;
            g.p = this.td != null ? this.td : "X:";
            g.q = this.s9 != null ? this.s9 : "X:";
            g.r = this.tb != null ? this.tb : "";
            let h = new DataLegendSeriesValueInfo();
            h.l = f;
            h.a = 14;
            h.p = this.tl != null ? this.tl : "Y:";
            h.q = this.th != null ? this.th : "Y:";
            h.r = this.tj != null ? this.tj : "";
            let i = new DataLegendSeriesContext();
            i.f = ((() => {
                let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
                $ret.add(g);
                $ret.add(h);
                return $ret;
            })());
            i.b = this.av();
            return i;
        }
    }
    ScatterBase.$t = markType(ScatterBase, 'ScatterBase', MarkerSeries.$, [ISupportsErrorBars_$type, ITrendLineSeries_$type]);
    ScatterBase.t9 = DependencyProperty.i("ActualTrendLineBrush", Brush.$, ScatterBase.$, new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue)));
    ScatterBase.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterBase, 'raisePropertyChanged', ['ErrorBarSettings:ry:ua', [ScatterErrorBarSettings.$, null], 'IsCustomScatterMarkerStyleAllowed:si:ub', [0, false], 'IsCustomScatterStyleAllowed:sj:uc', [0, false], 'ItemSearchMode:r8:ud', [ScatterItemSearchMode_$type, enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:sw:ue', [1, 10000], 'MarkerCollisionAvoidance:ro:uf', [CollisionAvoidanceType_$type, enumGetBox(CollisionAvoidanceType_$type, 0)], 'MaximumMarkers:sx:ug', [1, 400], 'XAxis::uo', [NumericXAxis.$, null], 'XMemberAsLegendLabel:s9:up', [2, null], 'XMemberAsLegendUnit:tb:uq', [2, null], 'XMemberPath:td:ur', [2, null], 'YAxis::us', [NumericYAxis.$, null], 'YMemberAsLegendLabel:th:ut', [2, null], 'YMemberAsLegendUnit:tj:uu', [2, null], 'YMemberPath:tl:uv', [2, null], 'TrendLineType::um', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::ul', [1, 1.5], 'TrendLinePeriod::uk', [1, 7], 'TrendLineBrush::uh', [Brush.$, null], 'TrendLineZIndex:sy:un', [1, 1001], 'TrendLineDashArray:ux:ui', [DoubleCollection.$], 'TrendLineDashCap:uy:uj', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]);
    return ScatterBase;
})();
/**
 * @hidden
 */
export let ScatterSeriesRenderManager = /*@__PURE__*/ (() => {
    class ScatterSeriesRenderManager extends SeriesRenderManager {
        constructor() {
            super(...arguments);
            this.au = null;
            this.av = null;
        }
        c() {
            this.au = new AssigningScatterMarkerStyleEventArgs();
            return this.au;
        }
        a() {
            this.av = new AssigningScatterStyleEventArgs();
            return this.av;
        }
        aw(a, b, c) {
            this.w(a, b, c);
        }
        ax(a, b, c) {
            this.x(a, b, c);
        }
        ay(a, b, c, d) {
            if (b == -1) {
                a.c = false;
                a.o = 0;
                a.n = c - 1;
            }
            else {
                if (d) {
                    a.o = b;
                    a.n = b;
                }
                else {
                    a.c = false;
                    a.o = b;
                    a.n = b;
                }
            }
        }
    }
    ScatterSeriesRenderManager.$t = markType(ScatterSeriesRenderManager, 'ScatterSeriesRenderManager', SeriesRenderManager.$);
    return ScatterSeriesRenderManager;
})();
/**
 * @hidden
 */
export let ScatterBaseView = /*@__PURE__*/ (() => {
    class ScatterBaseView extends MarkerSeriesView {
        constructor(a) {
            super(a);
            this.cv = null;
            this.ct = null;
            this.cw = null;
            this.c1 = null;
            this.dc = null;
            this.dd = null;
            this.cx = null;
            this.db = null;
            this.cy = null;
            this.cw = a;
            this.cy = new HashPool$2(Base.$, Marker.$);
            this.ch(this.cy);
            this.cx = new ScatterTrendLineManager();
        }
        as() {
            super.as();
            this.cv = this.cu();
            this.dc = new Path();
            this.dd = new Path();
            if (!this.q) {
                this.cw.sx = 2000;
            }
        }
        de(a) {
            if (this.db == null) {
                this.db = new DataTemplateMeasureInfo();
                this.db.context = this.k.g();
            }
            this.db.width = a.width;
            this.db.height = a.height;
            this.db.data = a.content;
            let b = a.ah;
            if (b.measure != null) {
                b.measure(this.db);
            }
            return new Size(1, this.db.width, this.db.height);
        }
        cu() {
            let a = new NumericMarkerManager(1, (b) => this.cy.item(b), (b) => this.cw.rw.c.item(b), runOn(this, this.c9), runOn(this, this.cr), runOn(this, this.cz), () => this.cw.ro);
            a.q = runOn(this, this.de);
            return a;
        }
        c9(a) {
            this.cw.t3(a, this.cy);
        }
        c0() {
            return this.b4;
        }
        cs() {
            return this.ct;
        }
        cr() {
            this.ct = this.cw.rj(this, this.cy, this.ct, this.bv, this.bu);
            return this.ct;
        }
        cz() {
            this.c1 = this.cw.sq(this.cy, this.c1);
            return this.c1;
        }
        c2() {
        }
        c7(a) {
        }
        c3() {
        }
        c8(a) {
        }
        da() {
            if (this.cw.trendLineBrush != null) {
                this.cw.uw = this.cw.trendLineBrush;
            }
            else {
                this.cw.uw = this.cw.oy;
            }
        }
        cf(a) {
            this.cy.f(a);
        }
        c5(a) {
            this.cy.g(a);
        }
        c6() {
        }
        a5(a, b) {
            super.a5(a, b);
            if (a.d) {
                if (this.cw.trendLineType != 0 && !b) {
                    let c = this.cx.g$j;
                    c.ac = this.cw.trendLineThickness;
                    c._stroke = this.cw.uw;
                    c.ai = this.cw.ux;
                    c.ad = this.cw.uy;
                    a.u(c);
                }
            }
        }
        c4(a) {
            if (a) {
                this.c6();
                this.cy.clear();
            }
            this.cx.g$d();
            this.aq();
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'><span";
            let b = this.e.a6.a$r(this.e);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            a += ">" + this.cw.title + "</span><br/><span>" + "x: </span><span class='ui-priority-primary'>${item." + this.cw.td + "}</span><br/><span>" + "y: </span><span class='ui-priority-primary'>${item." + this.cw.tl + "}</span></div>";
            return a;
        }
    }
    ScatterBaseView.$t = markType(ScatterBaseView, 'ScatterBaseView', MarkerSeriesView.$);
    return ScatterBaseView;
})();
