/*
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 { ScatterBase } from "./ScatterBase";
import { IScaleLegendSeries_$type } from "igniteui-react-core";
import { ISupportsSizeScale_$type } from "./ISupportsSizeScale";
import { ISupportsFillScale_$type } from "./ISupportsFillScale";
import { List$1 } from "igniteui-react-core";
import { UIElement } from "igniteui-react-core";
import { Base, typeCast, Point_$type, fromEnum, markType, markDep, enumGetBox, runOn } from "igniteui-react-core";
import { ActualRange } from "./ActualRange";
import { DependencyProperty } from "igniteui-react-core";
import { SizeScale } from "./SizeScale";
import { BrushScale } from "./BrushScale";
import { ScatterFrame } from "./ScatterFrame";
import { IChartLegend_$type } from "igniteui-react-core";
import { ValueBrushScale } from "./ValueBrushScale";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { ScatterBaseView } from "./ScatterBaseView";
import { ScalerParams } from "./ScalerParams";
import { OwnedPoint } from "./OwnedPoint";
import { Dictionary$2 } from "igniteui-react-core";
import { BubbleMarkerManager } from "./BubbleMarkerManager";
import { IChartItemLegend_$type } from "igniteui-react-core";
import { IChartScaleLegend_$type } from "igniteui-react-core";
import { ContentControl } from "igniteui-react-core";
import { DataContext } from "igniteui-react-core";
import { DeviceUtils } from "igniteui-react-core";
import { BrushUtil } from "igniteui-react-core";
import { DataLegendSeriesValueInfo } from "igniteui-react-core";
import { DataLegendSeriesContext } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_, isInfinity, logBase } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
import { BrushSelectionMode_$type } from "./BrushSelectionMode";
import { ScatterTrendLineManager } from "./ScatterTrendLineManager";
import { Defaults } from "./Defaults";
/**
 * @hidden
 */
export let BubbleSeries = /*@__PURE__*/ (() => {
    class BubbleSeries extends ScatterBase {
        get_dx() {
            return true;
        }
        cg() {
            return new BubbleSeriesView(this);
        }
        o0(a) {
            super.o0(a);
            this.zh = a;
        }
        iq() {
            return 0.7;
        }
        t4() {
            if (this.t3 == 0) {
                return 2;
            }
            return super.t4();
        }
        constructor() {
            super();
            this.aa7 = null;
            this.aa6 = null;
            this.zu = null;
            this.zm = null;
            this.zl = null;
            this.zk = null;
            this.zi = null;
            this.ab = BubbleSeries.$;
            this.v0 = new ScatterFrame();
            this.v2 = new ScatterFrame();
            this.vy = new ScatterFrame();
        }
        isAttachedTo(a) {
            return this.a2 == a;
        }
        dw() {
            return true;
        }
        n4(a) {
            super.n4(a);
            if (this.zp != null && this.zu != null && this.zu.count > 0) {
                for (let b = 0; b < this.zu.count; b++) {
                    a(this.zu._inner[b]);
                }
            }
        }
        get zo() {
            return this.zq;
        }
        aa5(a) {
            let b = typeCast(CustomPaletteBrushScale.$, this.zg);
            let c = typeCast(ValueBrushScale.$, this.zg);
            let d = this.zg;
            if (b != null && this.c6 != null) {
                return b.getBrush1(a, this.c6.count);
            }
            else if (c != null) {
                return c.getBrushByIndex(a, this.zn);
            }
            else if (d != null) {
                return d.getBrush(a);
            }
            return null;
        }
        get legendReady() {
            return this.zq != null && this.zq.count != 0;
        }
        get minScaleText() {
            let a = this.zf(this.zj).b;
            return (Math.round(a * 1000) / 1000).toString();
        }
        get maxScaleText() {
            let a = this.zf(this.zj).a;
            return (Math.round(a * 1000) / 1000).toString();
        }
        forScaleColors(a) {
            for (let b = 0; b < this.zq.count; b++) {
                if (this.zg == null || !this.zg.isReady) {
                    return false;
                }
                let c = NaN;
                if (this.zn != null) {
                    c = (this.zn.item(b) - this.zn.minimum) / (this.zn.maximum - this.zn.minimum);
                }
                let d = (this.zq.item(b) - this.zq.minimum) / (this.zq.maximum - this.zq.minimum);
                if (isNaN_(c)) {
                    c = 0;
                }
                if (isNaN_(d)) {
                    d = c;
                }
                let e = this.va;
                let f = this.aa5(b);
                let g = f != null ? f : e;
                a(g, d);
            }
            return true;
        }
        ju(a, b) {
            let c = this.lv(b);
            if (c == BubbleSeries.$$p[5]) {
                return this.jv(a, b, this.z9);
            }
            if (c == BubbleSeries.$$p[11]) {
                return this.jv(a, b, this.aaj);
            }
            if (c == ScatterBase.$$p[12]) {
                return this.jv(a, b, this.xl);
            }
            if (c == ScatterBase.$$p[16]) {
                return this.jv(a, b, this.xt);
            }
            if (c == BubbleSeries.$$p[2]) {
                return this.jv(a, b, this.z4);
            }
            return super.ju(a, b);
        }
        get zq() {
            return this.zm;
        }
        set zq(a) {
            if (this.zm != a) {
                let b = this.zq;
                this.zm = a;
                this.raisePropertyChanged("RadiusColumn", b, this.zq);
            }
        }
        get zp() {
            return this.zl;
        }
        set zp(a) {
            if (this.zl != a) {
                let b = this.zp;
                this.zl = a;
                this.raisePropertyChanged("LabelColumn", b, this.zp);
            }
        }
        get zn() {
            return this.zk;
        }
        set zn(a) {
            if (this.zk != a) {
                let b = this.zn;
                this.zk = a;
                this.raisePropertyChanged("FillColumn", b, this.zn);
            }
        }
        xw(a, b, c, d, e) {
            if (c <= this.w1) {
                b.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, c);
            }
            let f = this.w1;
            let g = this.c6;
            let h;
            let i;
            let j = this.getEffectiveViewport1(a);
            let k = new ScalerParams(0, d, e, this.vu.d, j);
            let l = new ScalerParams(0, d, e, this.vu.e, j);
            let m = false;
            let n = 0;
            if (this.cy != null) {
                if (this.cy.fb()) {
                    let o = this.cy.lo(d, k);
                    m = o.c;
                    n = o.d;
                }
            }
            for (let p = 0; p < c; p++) {
                h = this.wa.item(p);
                i = this.wb.item(p);
                let q = { $type: Point_$type, x: this.vu.a.ej(h, k), y: this.vu.b.ej(i, l) };
                if (m) {
                    if (q.x < e.left || q.x > e.right) {
                        if (q.x + n >= e.left && q.x + n <= e.right) {
                            q = { $type: Point_$type, x: q.x + n, y: i };
                        }
                    }
                }
                if (!isInfinity(q.x) && !isInfinity(q.y)) {
                    let r = g.item(p);
                    if (c <= f) {
                        if (!b.g.containsKey(r)) {
                            let s = { $type: Point_$type, x: h, y: i };
                            b.g.addItem(r, ((() => {
                                let $ret = new OwnedPoint();
                                $ret.a = r;
                                $ret.b = s;
                                $ret.c = q;
                                return $ret;
                            })()));
                        }
                    }
                }
            }
        }
        x6(a, b) {
            let c = typeCast(BubbleSeriesView.$, b);
            let d = c.cy;
            d.m = this.zq;
            super.x6(a, b);
            let e = Math.min(this.wa != null ? this.wa.count : 0, this.wb != null ? this.wb.count : 0);
            if (e < 1) {
                return;
            }
            c.dk();
            c.dl();
        }
        aao() {
            if (this.cy == null) {
                return;
            }
            if (this.a2 == null) {
                return;
            }
            if (this.a2.isItemwise) {
                let a = this.a2;
                this.a2.clearLegendItemsForSeries(this);
                this.aan();
                a.renderItemwiseContent(this);
            }
            if (this.a2.isScale) {
                let b = this.a2;
                b.restoreOriginalState();
                b.initializeLegend(this);
            }
        }
        static zv(a, b, c, d, e) {
            if (e <= a || isNaN_(e) || isInfinity(e)) {
                return c;
            }
            if (e >= b) {
                return d;
            }
            let f = c + ((d - c) / (b - a)) * (e - a);
            return f;
        }
        static zw(a, b, c, d, logBase_, e) {
            let f = logBase(e, logBase_);
            let g = logBase(a, logBase_);
            let h = logBase(b, logBase_);
            return BubbleSeries.zv(g, h, c, d, f);
        }
        gl(a, b, c) {
            let d = super.gl(a, b, c);
            if (this.zq == null || this.c6 == null || this.zq.count == 0 || this.c6.count != this.zq.count) {
                d = false;
            }
            return d;
        }
        wk(a, b) {
            if (b != 3) {
                return true;
            }
            if (a == null) {
                return true;
            }
            if (this.xl == a || this.xt == a || this.aaj == a) {
                return true;
            }
            return false;
        }
        aan() {
            let a = typeCast(IChartLegend_$type, this.a2);
            if (a == null || this.c6 == null) {
                return;
            }
            this.zu = new List$1(UIElement.$, 0);
            let b = typeCast(CustomPaletteBrushScale.$, this.zg);
            let c = typeCast(ValueBrushScale.$, this.zg);
            let d = this.zg;
            let e = this.ze();
            let f = e.b;
            let g = e.a;
            let h = this.c6;
            for (let i = 0; i < h.count; i++) {
                let j = null;
                if (c != null && this.zn != null) {
                    let k = this.zn.item(i);
                    j = c.getBrushByRange(k, f, g);
                }
                else if (b != null) {
                    j = b.getBrush1(i, h.count);
                }
                else if (d != null) {
                    j = d.getBrush(i);
                }
                let l = new ContentControl();
                let m = this.zp != null && this.zp.item(i) != null ? this.zp.item(i).toString() : "";
                l.content = ((() => {
                    let $ret = new DataContext();
                    $ret.series = this;
                    $ret.item = h.item(i);
                    $ret.itemBrush = j;
                    $ret.itemLabel = m;
                    return $ret;
                })());
                let n = this.qt;
                if (n == null) {
                    n = this.cj.bn(this.co);
                }
                l.ah = n;
                this.zu.add(l);
            }
        }
        no(a, b, c, d) {
            super.no(a, b, c, d);
            if (this.zj != null) {
                this.zj.aa();
            }
            if (this.zg != null) {
                this.zg.x();
            }
            this.aao();
        }
        oe() {
            super.oe();
            this.aao();
        }
        ok() {
            super.ok();
            this.aao();
        }
        o8(a, b, c, d) {
            super.o8(a, b, c, d);
            switch (b) {
                case "FastItemsSource":
                    if (this.zj != null) {
                        this.zj.aa();
                    }
                    if (this.zg != null) {
                        this.zg.x();
                    }
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        c.deregisterColumn(this.zq);
                        c.deregisterColumn(this.zn);
                        c.deregisterColumn(this.zp);
                        this.zq = null;
                        this.zn = null;
                        this.zp = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        this.zq = this.c3(this.aaj);
                        if (!stringIsNullOrEmpty(this.z4)) {
                            this.zn = this.c3(this.z4);
                        }
                        this.zp = this.c5(this.z9);
                    }
                    this.pp(false);
                    this.aao();
                    break;
                case BubbleSeries.$$p[11]:
                    if (this.zj != null) {
                        this.zj.aa();
                    }
                    if (this.c6 != null) {
                        this.c6.deregisterColumn(this.zq);
                        this.zq = this.c3(this.aaj);
                        this.aao();
                    }
                    break;
                case "RadiusColumn":
                    if (this.zj != null) {
                        this.zj.aa();
                    }
                    this.vv.c0.g$i();
                    this.pp(this.fq && this.dn);
                    this.om();
                    break;
                case BubbleSeries.$$p[12]:
                    if (c != null) {
                        c.l.remove(this);
                        c.aa();
                    }
                    if (d != null) {
                        d.l.add(this);
                        d.aa();
                    }
                    this.pp(false);
                    this.ol();
                    break;
                case BubbleSeries.$$p[13]:
                    this.pp(false);
                    this.ol();
                    break;
                case "DiscreteLegendItemTemplate":
                    this.aao();
                    break;
                case BubbleSeries.$$p[3]:
                    if (c != null) {
                        c.o.remove(this);
                        c.x();
                    }
                    if (d != null) {
                        d.o.add(this);
                        d.x();
                    }
                    this.pp(false);
                    this.aao();
                    this.ol();
                    break;
                case BubbleSeries.$$p[4]:
                case BubbleSeries.$$p[8]:
                case BubbleSeries.$$p[7]:
                case BubbleSeries.$$p[6]:
                    this.pp(false);
                    this.aao();
                    this.ol();
                    break;
                case "FillColumn":
                    this.pp(this.fq && this.dn);
                    this.ol();
                    break;
                case BubbleSeries.$$p[2]:
                    if (this.zg != null) {
                        this.zg.x();
                    }
                    if (this.c6 != null) {
                        this.c6.deregisterColumn(this.zn);
                        this.zn = this.c3(this.z4);
                        this.aao();
                    }
                    break;
                case BubbleSeries.$$p[5]:
                    if (this.c6 != null) {
                        this.c6.deregisterColumn(this.zp);
                        this.zp = this.c5(this.z9);
                        this.aao();
                    }
                    break;
                case "ActualLegend":
                    let e = typeCast(IChartLegend_$type, c);
                    if (e != null && e.isItemwise) {
                        let f = typeCast(IChartItemLegend_$type, e);
                        f.clearLegendItemsForSeries(this);
                    }
                    if (e != null && e.isScale) {
                        let g = typeCast(IChartScaleLegend_$type, e);
                        let h = true;
                        let i = null;
                        if (this.cy != null) {
                            for (let j of fromEnum(this.cy.series)) {
                                if (j.legend == g) {
                                    i = j;
                                    h = false;
                                }
                            }
                        }
                        if (h) {
                            g.restoreOriginalState();
                        }
                        else {
                            g.initializeLegend(typeCast(IScaleLegendSeries_$type, i));
                        }
                    }
                    this.aao();
                    break;
                case "SeriesViewer":
                    this.aao();
                    break;
            }
        }
        updateSizeScaleGlobals() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.zq != null) {
                a.b = this.zq.minimum;
                a.a = this.zq.maximum;
            }
            if (this.zj != null) {
                this.zj.ab(a.b, a.a);
            }
        }
        updateFillScaleGlobals() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.zn != null) {
                a.b = this.zn.minimum;
                a.a = this.zn.maximum;
            }
            if (this.zg != null) {
                this.zg.z(a.b, a.a);
            }
        }
        zf(a) {
            let b = new ActualRange();
            b.b = NaN;
            b.a = NaN;
            if (this.zq != null) {
                b.b = this.zq.minimum;
                b.a = this.zq.maximum;
            }
            if (a != null) {
                a.x();
                if (this.zt) {
                    b.b = a.globalMinimum;
                    b.a = a.globalMaximum;
                }
            }
            return b;
        }
        ze() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.zn != null) {
                a.b = this.zn.minimum;
                a.a = this.zn.maximum;
            }
            let b = typeCast(ValueBrushScale.$, this.zg);
            if (b != null) {
                b.s();
                if (this.zr && this.zg.o.count > 1) {
                    a.b = b.q;
                    a.a = b.p;
                }
            }
            return a;
        }
        aaq(a, b, c, d) {
            let e = c.width;
            if (!this.cj.bx.isEmpty) {
                e = this.cj.bx.width;
            }
            else if (this.cy != null && !this.cy.t2.isEmpty) {
                e = this.cy.t2.width;
            }
            let f = DeviceUtils.c(e);
            this.zi = this.zj || ((() => {
                let $ret = new SizeScale();
                $ret.minimumValue = f / 10;
                $ret.maximumValue = f / 5;
                return $ret;
            })());
            if (this.zi != null) {
                let g = this.zi.minimumValue;
                let h = this.zi.maximumValue;
                let i = this.zi.logarithmBase;
                let j = this.zf(this.zi);
                let k = j.b;
                let l = j.a;
                if (this.zi.isLogarithmic) {
                    for (let m = 0; m < b.count; m++) {
                        b._inner[m] = BubbleSeries.zw(k, l, g, h, i, b._inner[m]);
                    }
                }
                else {
                    for (let n = 0; n < b.count; n++) {
                        b._inner[n] = BubbleSeries.zv(k, l, g, h, b._inner[n]);
                    }
                }
            }
            let o = 1;
            o = DeviceUtils.d();
            let p = this.zj == null;
            if (d) {
                let q = c.width / e;
                for (let r = 0; r < b.count; r++) {
                    if (p) {
                        b._inner[r] = b._inner[r] / o;
                    }
                    b._inner[r] = b._inner[r] * q;
                }
            }
            for (let s = 0; s < a.count; s++) {
                let t = a._inner[s];
                if (p && !d) {
                    t.width = Math.max(0, b._inner[s] / o);
                    t.height = Math.max(0, b._inner[s] / o);
                }
                else {
                    t.width = Math.max(0, b._inner[s]);
                    t.height = Math.max(0, b._inner[s]);
                }
            }
        }
        aap(a) {
            let b = typeCast(BubbleSeriesView.$, this.ci);
            this.zh.b6 = false;
            if (b != null) {
                b.b6 = false;
            }
            let c = typeCast(CustomPaletteBrushScale.$, this.zg);
            let d = typeCast(ValueBrushScale.$, this.zg);
            let e = this.zg;
            let f = this.ze();
            let g = f.b;
            let h = f.a;
            let i = this.zg == null || !this.zg.isReady || (d != null && this.z4 == null);
            if (i) {
                this.zh.dj();
                if (b != null) {
                    b.dj();
                }
                return;
            }
            this.zh.b6 = true;
            if (b != null) {
                b.b6 = true;
            }
            let j = a.count;
            let k = this.c6;
            for (let l = 0; l < j; l++) {
                let m = a._inner[l];
                let n = typeCast(DataContext.$, m.content);
                if (n != null) {
                    let o = null;
                    let p = k.indexOf(n.item);
                    if (c != null) {
                        o = c.getBrush1(p, k.count);
                    }
                    else if (d != null && this.zn != null) {
                        let q = this.zn.item(p);
                        o = d.getBrushByRange(q, g, h);
                    }
                    else if (e != null) {
                        o = e.getBrush(p);
                    }
                    else {
                        if (this.vc == null) {
                            o = this.va;
                        }
                        else {
                            o = this.vc;
                        }
                    }
                    let r = null;
                    if (this.vd == null) {
                        r = this.vb;
                    }
                    else {
                        r = this.vd;
                    }
                    if (this.zs && o != null) {
                        r = o;
                    }
                    if (r != null && !isNaN_(this.zy)) {
                        r = BrushUtil.m(r, this.zy);
                    }
                    if (o != null && !isNaN_(this.zx)) {
                        o = BrushUtil.m(o, this.zx);
                    }
                    n.itemBrush = o;
                    n.actualItemBrush = o;
                    n.outline = r;
                }
            }
        }
        getDataLegendSeriesContextAt(a, b) {
            let c = { $type: Point_$type, x: a, y: b };
            let d = this.jr(c);
            let e = d == null ? NaN : this.h1(d, "XMemberPath");
            let f = d == null ? NaN : this.h1(d, "YMemberPath");
            let g = new DataLegendSeriesValueInfo();
            g.a = 13;
            g.l = e;
            g.p = "X";
            g.q = this.xl != null ? this.xl : "X";
            g.r = this.xh != null ? this.xh : "X:";
            g.s = this.xj != null ? this.xj : "";
            let h = new DataLegendSeriesValueInfo();
            h.l = f;
            h.a = 14;
            h.p = "Y";
            h.q = this.xt != null ? this.xt : "Y";
            h.r = this.xp != null ? this.xp : "Y:";
            h.s = this.xr != null ? this.xr : "";
            let i = new DataLegendSeriesContext();
            i.f = ((() => {
                let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
                $ret.add(g);
                $ret.add(h);
                return $ret;
            })());
            i.b = this.aw();
            if (!stringIsNullOrEmpty(this.aaj)) {
                let j = d == null ? NaN : this.h1(d, "RadiusMemberPath");
                let k = new DataLegendSeriesValueInfo();
                k.l = j;
                k.a = 11;
                k.p = "Radius";
                k.q = this.aaj != null ? this.aaj : "Radius";
                k.r = this.aaf != null ? this.aaf : "R:";
                k.s = this.aah != null ? this.aah : "";
                i.f.add(k);
            }
            else if (this.zi != null) {
                let l = new DataLegendSeriesValueInfo();
                l.l = this.zi.maximumValue;
                l.a = 11;
                l.p = "Radius";
                l.q = this.aaj != null ? this.aaj : "Radius";
                l.r = this.aaf != null ? this.aaf : "R:";
                l.s = this.aah != null ? this.aah : "";
                i.f.add(l);
            }
            if (!stringIsNullOrEmpty(this.z4)) {
                let m = d == null ? NaN : this.h1(d, "FillMemberPath");
                let n = new DataLegendSeriesValueInfo();
                n.l = m;
                n.a = 12;
                n.p = "Fill";
                n.q = this.z4 != null ? this.z4 : "Fill";
                n.r = this.z0 != null ? this.z0 : "F:";
                n.s = this.z2 != null ? this.z2 : "";
                i.f.add(n);
            }
            return i;
        }
        get actualMarkerBrush() {
            return this.va;
        }
    }
    BubbleSeries.$t = /*@__PURE__*/ markType(BubbleSeries, 'BubbleSeries', ScatterBase.$, [IScaleLegendSeries_$type, ISupportsSizeScale_$type, ISupportsFillScale_$type]);
    BubbleSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, BubbleSeries, 'raisePropertyChanged', ['FillMemberAsLegendLabel:z0:aar', [2, null], 'FillMemberAsLegendUnit:z2:aas', [2, null], 'FillMemberPath:z4:aat', [2], 'FillScale:zg:aau', [BrushScale.$], 'FillScaleUseGlobalValues:zr:aav', [0, false], 'LabelMemberPath:z9:aaw', [2], 'MarkerBrushBrightness:zx:aax', [1, NaN], 'MarkerOutlineBrightness:zy:aay', [1, NaN], 'MarkerOutlineUsesFillScale:zs:aaz', [0, false], 'RadiusMemberAsLegendLabel:aaf:aa0', [2, null], 'RadiusMemberAsLegendUnit:aah:aa1', [2, null], 'RadiusMemberPath:aaj:aa2', [2, null], 'RadiusScale:zj:aa3', [SizeScale.$], 'RadiusScaleUseGlobalValues:zt:aa4', [0, false]]);
    return BubbleSeries;
})();
/**
 * @hidden
 */
export let CustomPaletteBrushScale = /*@__PURE__*/ (() => {
    class CustomPaletteBrushScale extends BrushScale {
        constructor() {
            super();
        }
        getBrush1(a, b) {
            if (this.brushes == null || this.brushes.count == 0) {
                return null;
            }
            if (this.brushSelectionMode == 0) {
                return super.getBrush(a % this.brushes.count);
            }
            let c = BubbleSeries.zv(0, b - 1, 0, this.brushes.count - 1, a);
            return this.ab(c);
        }
        get_isReady() {
            return this.brushes != null && this.brushes.count > 0;
        }
    }
    CustomPaletteBrushScale.$t = /*@__PURE__*/ markType(CustomPaletteBrushScale, 'CustomPaletteBrushScale', BrushScale.$);
    CustomPaletteBrushScale.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, CustomPaletteBrushScale, 'v', ['BrushSelectionMode', [BrushSelectionMode_$type, /*@__PURE__*/ enumGetBox(BrushSelectionMode_$type, 0)]]);
    return CustomPaletteBrushScale;
})();
/**
 * @hidden
 */
export let BubbleSeriesView = /*@__PURE__*/ (() => {
    class BubbleSeriesView extends ScatterBaseView {
        constructor(a) {
            super(a);
            this.di = null;
            this.di = a;
            this.c0 = new ScatterTrendLineManager();
        }
        au() {
            super.au();
            if (!this.q) {
                this.b4.ua = Defaults.e;
            }
        }
        cx() {
            return new BubbleMarkerManager((a) => this.c1.item(a), (a) => this.cz.vu.c.item(a), runOn(this, this.dc), runOn(this, this.cu), runOn(this, this.c2));
        }
        dk() {
            let a = this.cy;
            this.di.aaq(a.n, a.o, this.bx, this == this.e.ci);
            this.as();
        }
        dl() {
            let a = this.cy;
            this.di.aap(a.n);
        }
        dj() {
            let a = this.cy;
            for (let b of fromEnum(a.n)) {
                let c = typeCast(DataContext.$, b.content);
                if (c != null) {
                    c.itemBrush = null;
                    c.outline = null;
                }
            }
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'><span";
            let b = this.e.a7.a$r(this.e);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            a += ">" + this.di.title + "</span><br/><span>" + "(${item." + this.di.xl + "}, ${item." + this.di.xt + "})</span>";
            if (!stringIsNullOrEmpty(this.di.aaj)) {
                a += "<span>, Radius: ${item." + this.di.aaj + "}</span>";
            }
            a += "</div>";
            return a;
        }
    }
    BubbleSeriesView.$t = /*@__PURE__*/ markType(BubbleSeriesView, 'BubbleSeriesView', ScatterBaseView.$);
    return BubbleSeriesView;
})();
