/*
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 * as tslib_1 from "tslib";
import { Series } from "./Series";
import { DependencyProperty } from "igniteui-react-core";
import { HighlightingInfo } from "./HighlightingInfo";
import { ShapeItemSearchMode_$type } from "./ShapeItemSearchMode";
import { IEnumerable$1_$type, enumGetBox, Number_$type, Point_$type, typeCast, fromEnum, runOn, Array_$type, markType, markDep } from "igniteui-react-core";
import { NumericXAxis } from "./NumericXAxis";
import { NumericYAxis } from "./NumericYAxis";
import { List$1 } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { StyleShapeEventArgs } from "./StyleShapeEventArgs";
import { FrameworkElement } from "igniteui-react-core";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { DataContext } from "igniteui-react-core";
import { Tuple$2 } from "igniteui-react-core";
import { ShapeHitRegion } from "./ShapeHitRegion";
import { RectUtil } from "igniteui-react-core";
import { Tuple$3 } from "igniteui-react-core";
import { GeometryUtil } from "igniteui-react-core";
import { AssigningShapeStyleEventArgs } from "./AssigningShapeStyleEventArgs";
import { AssigningShapeMarkerStyleEventArgs } from "./AssigningShapeMarkerStyleEventArgs";
import { PointCollectionUtil } from "igniteui-react-core";
import { FlattenedShape } from "./FlattenedShape";
import { SeriesView } from "./SeriesView";
import { Clipper } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { Dictionary$2 } from "igniteui-react-core";
import { SeriesRenderManager } from "./SeriesRenderManager";
import { PolySimplification } from "igniteui-react-core";
import { DefaultFlattener } from "./DefaultFlattener";
import { AxisRange } from "./AxisRange";
import { Style } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { boxArray$1 } from "igniteui-react-core";
import { InvalidOperationException } from "igniteui-react-core";
import { isNaN_, truncate } from "igniteui-react-core";
import { FastItemObjectColumn } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { Pool$1 } from "igniteui-react-core";
import { PointCollection } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { PolyLineSegment } from "igniteui-react-core";
import { PathFigure } from "igniteui-react-core";
import { PolygonUtil } from "igniteui-react-core";
/**
 * @hidden
 */
var ShapeSeriesBase = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(ShapeSeriesBase, _super);
    function ShapeSeriesBase() {
        var _this = _super.call(this) || this;
        _this.o2 = false;
        _this.o1 = false;
        _this.on = null;
        _this.oo = null;
        _this.ot = 1;
        _this.od = null;
        _this.oe = null;
        _this.assigningShapeStyle = null;
        _this.assigningShapeMarkerStyle = null;
        _this.ox = null;
        _this.oz = null;
        _this.op = null;
        _this.or = null;
        _this.pn = 0;
        _this.pj = null;
        _this.oa = null;
        _this.oc = null;
        _this.ob = null;
        _this.n9 = null;
        _this.qu = null;
        _this.pq = 0;
        _this.styleShape = null;
        _this.ox = new ShapeSeriesRenderManager();
        FastItemObjectColumn.m();
        _this.pq = _this.pp;
        _this.qu = Rect.empty;
        return _this;
    }
    ShapeSeriesBase.prototype.ji = function () {
        _super.prototype.ji.call(this);
        this.oq = null;
        this.os = null;
    };
    ShapeSeriesBase.prototype.ag = function () {
        return [this.oq, this.os];
    };
    ShapeSeriesBase.prototype.gt = function (a, b) {
        var c = this.ic(b);
        if (c == ShapeSeriesBase.$$p[6]) {
            return this.gu(a, b, this.p3);
        }
        return null;
    };
    ShapeSeriesBase.prototype.get_da = function () {
        return true;
    };
    ShapeSeriesBase.prototype.get_cu = function () {
        return true;
    };
    ShapeSeriesBase.prototype.ol = function (a, b, c) {
        var d = this.no(b);
        var e = this.oy.cz(d, false);
        var f = -1;
        if (e == null) {
            if (a != null) {
                f = this.cd.indexOf(a);
            }
            else {
                return null;
            }
        }
        else if (e.dataContext != null) {
            f = e.dataContext.c;
        }
        if (f == -1) {
            return null;
        }
        var g = new HighlightingInfo();
        g.b = this;
        g.h = f;
        g.g = f;
        g.d = false;
        if (c != null && c.h == g.h && c.g == g.g) {
            return c;
        }
        return g;
    };
    ShapeSeriesBase.prototype.om = function (a, b, c) {
        var d = this.oy.b1(this.no(b));
        var e = -1;
        if (d == null) {
            if (a != null) {
                e = this.cd.indexOf(a);
            }
            else {
                return null;
            }
        }
        else {
            e = d.ak;
        }
        if (e == -1) {
            return null;
        }
        var f = new HighlightingInfo();
        f.b = this;
        f.h = e;
        f.g = e;
        f.d = false;
        f.e = true;
        if (c != null && c.h == f.h && c.g == f.g) {
            return c;
        }
        return f;
    };
    Object.defineProperty(ShapeSeriesBase.prototype, "ou", {
        get: function () {
            return this.ot;
        },
        set: function (a) {
            var b = this.ot;
            this.ot = a;
            if (b != this.ot) {
                this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ShapeItemSearchMode_$type, b), enumGetBox(ShapeItemSearchMode_$type, this.ot));
            }
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesBase.prototype.ov = function () {
        if (this.ow != 0) {
            return this.ow;
        }
        return 1;
    };
    ShapeSeriesBase.prototype.e4 = function (a) {
        switch (this.ou) {
            case 1: return this.p9(a).c;
            case 2: return this.po(a);
            case 3: return this.po(a);
        }
        return -1;
    };
    ShapeSeriesBase.prototype.p9 = function (a) {
        var b = this.no(a);
        var c = { $type: Point_$type, x: NaN, y: NaN };
        var d = this.oy.cb;
        if (d == null) {
            return new Tuple$2(Number_$type, Point_$type, -1, c);
        }
        var e = this.oy.b2(b, false, !this.o3);
        if (e != null) {
            c = RectUtil.l(e.d);
            return new Tuple$2(Number_$type, Point_$type, e.b, c);
        }
        var f = b.x;
        var g = b.y;
        if (this.cd == null || this.oq == null || this.os == null || this.pj == null) {
            return new Tuple$2(Number_$type, Point_$type, -1, c);
        }
        if (this.cd.count > this.pt) {
            return new Tuple$2(Number_$type, Point_$type, -1, c);
        }
        var h = 1.7976931348623157E+308;
        var i = -1;
        for (var j = 0; j < d.count; j++) {
            var k = d._inner[j].d;
            var l = RectUtil.g(k, b);
            if (l < h) {
                h = l;
                i = d._inner[j].b;
                c = RectUtil.l(d._inner[j].d);
            }
        }
        return new Tuple$2(Number_$type, Point_$type, i, c);
    };
    ShapeSeriesBase.prototype.p8 = function (a) {
        var b = this.no(a);
        var c = b.x;
        var d = b.y;
        var e = { $type: Point_$type, x: NaN, y: NaN };
        if (this.cd == null || this.oq == null || this.os == null || this.pj == null) {
            return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
        }
        if (this.cd.count > this.pt) {
            return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
        }
        var f = 1.7976931348623157E+308;
        var g = this.oy.cb;
        if (g == null) {
            return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
        }
        var h = this.oy.b2(b, false, !this.o3);
        if (h != null) {
            var i = RectUtil.l(h.d);
            var j = this.p7(b, h.a, this.o3);
            return new Tuple$3(Number_$type, Point_$type, Point_$type, h.b, j.d, i);
        }
        for (var k = 0; k < g.count; k++) {
            var l = g._inner[k].d;
            var m = RectUtil.g(l, b);
            var n = (l.width * l.width) + (l.height * l.height) + m;
            if (n <= f) {
                f = n;
            }
        }
        var o = 1.7976931348623157E+308;
        var p = -1;
        for (var q = 0; q < g.count; q++) {
            var r = g._inner[q].d;
            var s = RectUtil.g(r, b);
            if (s < f) {
                var t = this.p7(b, g._inner[q].a, this.o3);
                if (t.c < o) {
                    o = t.c;
                    e = t.d;
                    p = q;
                }
            }
        }
        if (p >= 0) {
            return new Tuple$3(Number_$type, Point_$type, Point_$type, g._inner[p].b, e, RectUtil.l(g._inner[p].d));
        }
        return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
    };
    ShapeSeriesBase.prototype.get_o3 = function () {
        return true;
    };
    Object.defineProperty(ShapeSeriesBase.prototype, "o3", {
        get: function () {
            return this.get_o3();
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesBase.prototype.p7 = function (a, b, c) {
        var d = { $type: Point_$type, x: NaN, y: NaN };
        var e = 1.7976931348623157E+308;
        var f = { $type: Point_$type, x: NaN, y: NaN };
        var g = false;
        var h = -1;
        for (var i = 0; i < b.count; i++) {
            var j = b._inner[i];
            if (i >= 1) {
                var k = GeometryUtil.d(a, d, j);
                if (k < e) {
                    e = k;
                    g = true;
                    h = i;
                }
            }
            d = j;
        }
        if (c) {
            var l = b._inner[0];
            var m = GeometryUtil.d(a, d, l);
            if (m < e) {
                e = m;
                var n = GeometryUtil.h(a, d, l);
                f = { $type: Point_$type, x: d.x + (l.x - d.x) * n, y: d.y + (l.y - d.y) * n };
                return new Tuple$2(Number_$type, Point_$type, e, f);
            }
        }
        if (g) {
            var o = b._inner[h - 1];
            var p = b._inner[h];
            var q = GeometryUtil.h(a, o, p);
            f = { $type: Point_$type, x: o.x + (p.x - o.x) * q, y: o.y + (p.y - o.y) * q };
        }
        return new Tuple$2(Number_$type, Point_$type, e, f);
    };
    ShapeSeriesBase.prototype.po = function (a) {
        return this.p8(a).c;
    };
    ShapeSeriesBase.prototype.nt = function (a, b, c) {
        if (this.oq == null || this.os == null || this.pj == null) {
            return { $type: Point_$type, x: NaN, y: NaN };
        }
        switch (this.ou) {
            case 1:
                var d = this.p9(a);
                return d.d;
            case 2:
                var e = this.p8(a);
                return e.e;
            case 3:
                var f = this.p8(a);
                return f.d;
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    ShapeSeriesBase.prototype.gq = function (a) {
        var b = this.f9(a);
        if (this.cd != null && b >= 0 && b < this.cd.count) {
            return this.cd.item(b);
        }
        return null;
    };
    ShapeSeriesBase.prototype.ok = function (a, b, c) {
        var d = new HighlightingInfo();
        d.b = this;
        d.h = 0;
        d.g = this.cd.count - 1;
        d.d = true;
        if (c != null && c.h == d.h && c.g == d.g) {
            return c;
        }
        return d;
    };
    ShapeSeriesBase.prototype.au = function (a, b, c) {
        if (this.cu && this.dl(this.be) && !c) {
            var d = this.ol(a, b, this.on);
            this.on = d;
            return d;
        }
        else {
            var e = this.ok(a, b, this.on);
            this.on = e;
            return e;
        }
    };
    ShapeSeriesBase.prototype.av = function (a, b, c) {
        if (this.dl(this.be) && !c) {
            var d = this.om(a, b, this.oo);
            this.oo = d;
            return d;
        }
        else {
            var e = this.ok(a, b, this.oo);
            e.e = true;
            this.oo = e;
            return e;
        }
    };
    ShapeSeriesBase.prototype.ph = function () {
        return (this.assigningShapeStyle != null && this.o2) || (this.be != 1);
    };
    ShapeSeriesBase.prototype.pg = function () {
        return (this.assigningShapeMarkerStyle != null && this.o1) || (this.be != 1);
    };
    Object.defineProperty(ShapeSeriesBase.prototype, "o0", {
        get: function () {
            return this.oz;
        },
        set: function (a) {
            var b = this.o0 != a;
            if (b) {
                var c = this.o0;
                this.oz = a;
                this.raisePropertyChanged("ShapeColumn", c, this.o0);
            }
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesBase.prototype.o7 = function (array_) {
        var a = (Array.isArray(array_));
        return a;
    };
    ShapeSeriesBase.pb = function (a) {
        if (a == null) {
            return true;
        }
        var val_ = a;
        return (val_ == undefined);
    };
    ShapeSeriesBase.prototype.convertToListList = function (a) {
        if (a == null) {
            return null;
        }
        var b = new List$1(List$1.$.specialize(Point_$type), 0);
        var c;
        var curr_;
        var d;
        var e;
        var f = false;
        var g = false;
        for (var h = 0; h < a.length; h++) {
            c = a[h];
            if (c == null) {
                continue;
            }
            var i = new List$1(Point_$type, 0);
            for (var j = 0; j < c.length; j++) {
                curr_ = c[j];
                if (f) {
                    d = (curr_.X);
                    e = (curr_.Y);
                }
                else {
                    d = (curr_.x);
                    e = (curr_.y);
                }
                if (!g) {
                    if ((isNaN_(d) || ShapeSeriesBase.pb(d)) && (isNaN_(e) || ShapeSeriesBase.pb(e))) {
                        d = (curr_.X);
                        e = (curr_.Y);
                        if (!isNaN_(d) && !ShapeSeriesBase.pb(d) && !isNaN_(e) && !ShapeSeriesBase.pb(e)) {
                            g = true;
                            f = true;
                        }
                    }
                    else {
                        g = true;
                    }
                }
                i.add({ $type: Point_$type, x: d, y: e });
            }
            b.add(i);
        }
        return b;
    };
    ShapeSeriesBase.prototype.cc = function (a) {
        if (this.cd != null && this.o7(this.itemsSource) && a != null && a.split('!').length != 2) {
            if (this.coercionMethods == null) {
                this.coercionMethods = {};
            }
            var methods_ = this.coercionMethods;
            methods_.convertToListList = this.convertToListList;
            a += "!convertToListList";
        }
        return _super.prototype.cc.call(this, a);
    };
    ShapeSeriesBase.prototype.kp = function (a, b, c, d) {
        _super.prototype.kp.call(this, a, b, c, d);
        var e = false;
        var f = false;
        switch (b) {
            case ShapeSeriesBase.$$p[2]:
                this.ou = this.ov();
                break;
            case "FastItemsSource":
                var g = typeCast(IFastItemsSource_$type, c);
                if (g != null) {
                    g.deregisterColumn(this.o0);
                    this.o0 = null;
                }
                var h = typeCast(IFastItemsSource_$type, d);
                if (h != null) {
                    this.o0 = this.cc(this.p3);
                }
                e = this.oq != null && !this.oq.cn();
                f = this.os != null && !this.os.cn();
                if (e || f) {
                    this.k3(false);
                }
                break;
            case ShapeSeriesBase.$$p[6]:
                if (this.cd != null) {
                    this.cd.deregisterColumn(this.o0);
                    this.o0 = this.cc(this.p3);
                }
                break;
            case "ShapeColumn":
                this.qi();
                e = this.oq != null && !this.oq.cn();
                f = this.os != null && !this.os.cn();
                if (e || f) {
                    this.k3(false);
                }
                this.ka();
                break;
            case ShapeSeriesBase.$$p[7]:
            case ShapeSeriesBase.$$p[8]:
                this.op = this.oq;
                this.or = this.os;
                var i = c;
                var j = d;
                this.qj(i);
                this.qb(j);
                if ((j != null && !j.cn()) || (j == null && i != null)) {
                    this.k3(false);
                }
                this.ka();
                break;
            case "Resolution":
                this.pn = this.fq;
                this.ka();
                break;
            case "ActualBrush":
                this.k3(false);
                break;
            case ShapeSeriesBase.$$p[5]:
                this.pq = this.pp;
                this.k3(false);
                this.ka();
                break;
            case "ActualThickness":
                this.k3(false);
                this.ka();
                break;
            case ShapeSeriesBase.$$p[1]:
                this.o2 = this.pf();
                this.k3(false);
                break;
            case ShapeSeriesBase.$$p[0]:
                this.o1 = this.pe();
                this.k3(false);
                break;
        }
    };
    ShapeSeriesBase.prototype.pf = function () {
        return this.pa;
    };
    ShapeSeriesBase.prototype.pe = function () {
        return this.o9;
    };
    ShapeSeriesBase.prototype.o5 = function (a) {
        if (typeCast(NumericYAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    ShapeSeriesBase.prototype.o4 = function (a) {
        if (typeCast(NumericXAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    ShapeSeriesBase.prototype.qi = function () {
        this.pj = null;
        if (this.o0 == null) {
            return;
        }
        this.pj = new List$1(Rect.$, 2, this.o0.count);
        for (var a = 0; a < this.o0.count; a++) {
            this.pj.add(PointCollectionUtil.j(this.o0.item(a)));
        }
    };
    ShapeSeriesBase.prototype.qv = function (a) {
        if (typeCast(IEnumerable$1_$type.specialize(IEnumerable$1_$type.specialize(Point_$type)), a) !== null) {
            return PointCollectionUtil.h(a);
        }
        else if (typeCast(IEnumerable$1_$type.specialize(Point_$type), a) !== null) {
            return PointCollectionUtil.g(a);
        }
        return Rect.empty;
    };
    ShapeSeriesBase.prototype.pl = function (a, b, c, d, e, f, g) {
        var e_1, _a;
        return this.pm(a, b, c, d, e, f, g);
        if (typeCast(List$1.$.specialize(List$1.$.specialize(Point_$type)), c) !== null) {
            return this.pm(a, b, c, d, e, f, g);
        }
        else if (typeCast(IEnumerable$1_$type.specialize(IEnumerable$1_$type.specialize(Point_$type)), c) !== null) {
            var h = c;
            var i = new List$1(FlattenedShape.$, 0);
            var j = null;
            try {
                for (var _b = tslib_1.__values(fromEnum(h)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var k = _c.value;
                    j = this.oj(a, b, PointCollectionUtil.b(k), d, e, f, g);
                    if (j == null) {
                        continue;
                    }
                    i.add(j);
                }
            }
            catch (e_1_1) {
                e_1 = { error: e_1_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_1)
                        throw e_1.error;
                }
            }
            return i;
        }
        else if (typeCast(IEnumerable$1_$type.specialize(Point_$type), c) !== null) {
            var l = c;
            var m = this.oj(a, b, PointCollectionUtil.b(l), d, e, f, g);
            var n = new List$1(FlattenedShape.$, 0);
            if (m != null) {
                n.add(m);
            }
            return n;
        }
        else {
            throw new InvalidOperationException(1, "Unrecognized data in ShapeColumn");
        }
    };
    ShapeSeriesBase.prototype.get_o8 = function () {
        return true;
    };
    Object.defineProperty(ShapeSeriesBase.prototype, "o8", {
        get: function () {
            return this.get_o8();
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesBase.prototype.pi = function () {
        return false;
    };
    ShapeSeriesBase.prototype.k4 = function (a) {
        this.qh(this.bs);
    };
    ShapeSeriesBase.prototype.k2 = function (a, b, c, d, e) {
        _super.prototype.k2.call(this, a, b, c, d, e);
        var f = this.a3.a$h.item(d);
        var g = f;
        f.a1(c);
        if (this.cp(f)) {
            return;
        }
        this.qh(f);
    };
    ShapeSeriesBase.prototype.qh = function (a) {
        var _this = this;
        if (this.cp(a)) {
            return;
        }
        var b;
        var c;
        var d = a;
        var e = a.getViewInfo(c, b);
        c = e.p0;
        b = e.p1;
        if (c.width < 1 || c.height < 1 || this.o0 == null) {
            return;
        }
        var f = this.oq;
        var g = this.os;
        var h = this.getEffectiveViewport1(a);
        var i = new ScalerParams(1, b, c, f.ca);
        i.c = h;
        var j = new ScalerParams(1, b, c, g.ca);
        j.c = h;
        if (!this.dv) {
            d.cr();
            var k = new Rect(0, 0, 0, 0, 0);
            var l = void 0;
            var m = void 0;
            var n = void 0;
            var o = void 0;
            var p = this.o0.count;
            if (this.oc == null || this.oc.length != p) {
                this.oc = new Array(p);
                this.oa = new Array(p);
                this.ob = new Array(p);
                this.n9 = new Array(p);
            }
            var q = this.oc;
            var r = this.oa;
            var s = this.ob;
            var t = this.n9;
            var u = void 0;
            for (var v = 0; v < p; v++) {
                u = this.pj._inner[v];
                q[v] = u.top;
                r[v] = u.left;
                s[v] = u.right;
                t[v] = u.bottom;
            }
            this.op.gt(boxArray$1(r), 0, r.length, i);
            this.op.gt(boxArray$1(s), 0, s.length, i);
            this.or.gt(boxArray$1(q), 0, q.length, j);
            this.or.gt(boxArray$1(t), 0, t.length, j);
            d.cs(r, q, s, t);
            var w = this.o0;
            var x = this.cd;
            this.qk(d);
            var y = c.left;
            var z = c.right;
            var aa = c.top;
            var ab = c.bottom;
            var ac = null;
            if (this.qu.isEmpty) {
                ac = null;
            }
            else {
                ac = new Clipper(1, this.qu.left, this.qu.bottom, this.qu.right, this.qu.top, this.o8);
            }
            var ad = this.pi();
            if (ad) {
                d.b9.clear();
            }
            var ae = false;
            var af = true;
            var ag = 0;
            if (this.b6 != null) {
                if (this.b6.ea()) {
                    var ah = this.b6.ik(b, i);
                    ae = ah.c;
                    ag = ah.d;
                }
            }
            var ai = void 0;
            for (var aj = 0; aj < p; aj++) {
                n = r[aj];
                l = q[aj];
                m = t[aj];
                o = s[aj];
                k.x = Math.min(n, o);
                k.y = Math.min(l, m);
                k.width = Math.max(n, o) - k.x;
                k.height = Math.max(l, m) - k.y;
                if (k.intersectsWith(c)) {
                    if (k.x < y || k.y < aa || k.x > z || k.y > ab) {
                        ai = ac;
                    }
                    else {
                        ai = null;
                    }
                    var ak = this.pl(a, ai, w.item(aj), i, j, 0, ag);
                    if (ad) {
                        ShapeSeriesBase.qg(d, aj, ak);
                    }
                    d.cf(aj, x.item(aj), k, ak);
                }
                else if (ae) {
                    k.x = k.x + ag;
                    if (k.intersectsWith(c)) {
                        if (k.x < y || k.y < aa || k.x > z || k.y > ab) {
                            ai = ac;
                        }
                        else {
                            ai = null;
                        }
                        var al = this.pl(a, ai, w.item(aj), i, j, ag, ag);
                        if (ad) {
                            ShapeSeriesBase.qg(d, aj, al);
                        }
                        d.cf(aj, x.item(aj), k, al);
                    }
                }
            }
            d.cq();
        }
        var am = this.ph();
        this.ox.ax(this, this.ph(), runOn(this, this.of));
        var an = false;
        var ao = this.ox.b;
        if (ao != null) {
            an = true;
        }
        var ap = a.q;
        var aq = this.pc;
        var ar = d.b7;
        d.cm(function (as) {
            var at = as.dataContext != null ? as.dataContext.item : null;
            var au = as.dataContext != null ? as.dataContext.c : -1;
            d.cj(as, at, am);
            if (an) {
                _this.qd(as, aq, au, _this.o0.count, ap, ar);
            }
            else {
                if (ar) {
                    {
                        _this.ox.az(as, _this.es, ar);
                    }
                }
            }
            {
                _this.ox.ad(as, false, false, false, false);
            }
        });
    };
    ShapeSeriesBase.prototype.get_pc = function () {
        return false;
    };
    Object.defineProperty(ShapeSeriesBase.prototype, "pc", {
        get: function () {
            return this.get_pc();
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesBase.prototype.qd = function (a, b, c, d, e, f) {
        var g = this.be != 1;
        this.ox.ay(this.ox.b, c, d, false);
        {
            this.ox.az(a, this.es, f);
        }
        var h = this.ox.av;
        var i = null;
        var j = this.cd;
        if (g && this.b6 != null) {
            i = this.b6.az.getHighlightingInfo(this, j, h.o, h.n, false);
            h.b = i;
        }
        h.f = e;
        this.qf(h);
        this.ox.z(this, i, e, g, false);
    };
    ShapeSeriesBase.prototype.qc = function (a, b, c) {
        var d = this.be != 1;
        this.ox.ay(this.ox.d, a, b, true);
        this.ox.aa(this.es);
        var e = this.ox.au;
        var f = null;
        var g = this.cd;
        var h = null;
        if (d && this.b6 != null) {
            f = this.b6.az.getHighlightingInfo(this, g, e.o, e.n, true);
            if (this.b6.az.isCrossSeriesHighlight(this)) {
                h = this.b6.az.getHighlightingInfo(this, g, e.o, e.n, true);
            }
            e.b = f;
        }
        e.f = c;
        this.qe(e);
        this.ox.y(this, f, c, d, e.l, this.b6.az.sumHighlightingProgress);
    };
    ShapeSeriesBase.prototype.qf = function (a) {
        if (this.assigningShapeStyle != null && this.o2) {
            this.assigningShapeStyle(this, a);
        }
    };
    ShapeSeriesBase.prototype.qe = function (a) {
        if (this.assigningShapeMarkerStyle != null && this.o1) {
            this.assigningShapeMarkerStyle(this, a);
        }
    };
    ShapeSeriesBase.prototype.of = function (a, b) {
        return this.og(a, b);
    };
    ShapeSeriesBase.prototype.og = function (a, b) {
        if (b < a || a < 0 || a > this.o0.count || b < 0 || b > this.o0.count) {
            return null;
        }
        var c = new Array((b - a) + 1);
        for (var d = a; d <= b; d++) {
            var e = d;
            c[d - a] = this.cd.item(d);
        }
        return c;
    };
    ShapeSeriesBase.qg = function (a, b, c) {
        var d = 0;
        var e = null;
        for (var f = 0; f < c.count; f++) {
            var g = c._inner[f];
            var h = g.b.width * g.b.height;
            if (h > d) {
                d = h;
                e = g;
            }
        }
        a.b9.addItem(b, e);
    };
    ShapeSeriesBase.prototype.j2 = function () {
        _super.prototype.j2.call(this);
        if (this.oq != null) {
            this.oq.hb();
        }
        if (this.os != null) {
            this.os.hb();
        }
    };
    ShapeSeriesBase.prototype.lo = function (a, b) {
        this.k3(false);
    };
    ShapeSeriesBase.prototype.ln = function (a, b) {
        this.k3(false);
    };
    ShapeSeriesBase.prototype.jo = function (a, b, c, d) {
        _super.prototype.jo.call(this, a, b, c, d);
        switch (a) {
            case 3:
                if (d == this.p3) {
                    this.pj._inner[b] = this.qv(this.o0.item(b));
                }
                break;
            case 1:
                for (var e = b; e < b + c; e++) {
                    this.pj.insert(e, this.qv(this.o0.item(e)));
                }
                break;
            case 0:
                this.pj.v(b, c);
                break;
            case 2:
                for (var f = b; f < b + c; f++) {
                    this.pj._inner[f] = this.qv(this.o0.item(f));
                }
                break;
            case 4:
                this.qi();
                break;
        }
        this.k3(false);
    };
    ShapeSeriesBase.prototype.ec = function (a, b, c) {
        var d = true;
        if (!_super.prototype.ec.call(this, a, b, c) || (this.pd && this.o0 == null) || b.isEmpty || a.isEmpty || this.oq == null || this.os == null || this.oq.bh == null || this.os.bh == null || this.oq.kd == this.oq.kc || this.os.kd == this.os.kc || this.o0 == null || this.o0.count == 0 || this.pj == null || this.pj.count == 0 || this.pj.count != this.o0.count) {
            d = false;
        }
        return d;
    };
    ShapeSeriesBase.prototype.get_pd = function () {
        return true;
    };
    Object.defineProperty(ShapeSeriesBase.prototype, "pd", {
        get: function () {
            return this.get_pd();
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesBase.prototype.kk = function (a) {
        _super.prototype.kk.call(this, a);
        this.oy = typeCast(ShapeSeriesViewBase.$, a);
    };
    ShapeSeriesBase.prototype.pm = function (a, b, c, d, e, f, g) {
        var h = new List$1(FlattenedShape.$, 0);
        var i;
        var j = c.count;
        for (var k = 0; k < j; k++) {
            i = c._inner[k];
            var l = this.oj(a, b, i, d, e, f, g);
            if (l == null) {
                continue;
            }
            h.add(l);
        }
        return h;
    };
    ShapeSeriesBase.prototype.oj = function (a, b, c, d, e, f, g) {
        var h = this.qa(c, d, e);
        var i = h.c;
        var j = h.d;
        var k = i.length;
        var l = 1.7976931348623157E+308;
        var m = 1.7976931348623157E+308;
        var n = -1.7976931348623157E+308;
        var o = -1.7976931348623157E+308;
        var p;
        var q;
        if (f != 0) {
            for (var r = 0; r < k; r++) {
                i[r] = i[r] + f;
            }
        }
        for (var s = 0; s < k; s++) {
            p = i[s];
            q = j[s];
            l = p < l ? p : l;
            m = q < m ? q : m;
            n = p > n ? p : n;
            o = q > o ? q : o;
        }
        var t = !(l > this.qu.right || n < this.qu.left || m > this.qu.bottom || o < this.qu.top);
        if (!t && f == 0 && g != 0) {
            if (g != 0) {
                for (var u = 0; u < k; u++) {
                    i[u] = i[u] + g;
                }
            }
            for (var v = 0; v < k; v++) {
                p = i[v];
                q = j[v];
                l = p < l ? p : l;
                m = q < m ? q : m;
                n = p > n ? p : n;
                o = q > o ? q : o;
            }
            t = !(l > this.qu.right || n < this.qu.left || m > this.qu.bottom || o < this.qu.top);
        }
        if (!t) {
            return null;
        }
        var w = b != null && (l < this.qu.left || m < this.qu.top || n > this.qu.right || o > this.qu.bottom);
        var x = new Rect(0, l, m, n - l, o - m);
        if (!a.b8(x)) {
            return null;
        }
        l = l < this.qu.left ? this.qu.left : l;
        n = n > this.qu.right ? this.qu.right : n;
        m = m < this.qu.top ? this.qu.top : m;
        o = o > this.qu.bottom ? this.qu.bottom : o;
        var y = PolySimplification.b(h, this.fq);
        var z = new DefaultFlattener().c(h.c, h.d, y, this.pn);
        var aa = z.count;
        if (w) {
            var ab = new List$1(Point_$type, 0);
            b.i = ab;
            for (var ac = 0; ac < aa; ac++) {
                b.j(z._inner[ac]);
            }
            b.i = null;
            z = ab;
        }
        if (z == null || z.count == 0) {
            return null;
        }
        var ad = new FlattenedShape();
        ad.a = z;
        ad.b = new Rect(0, l, m, n - l, o - m);
        ad.c = x;
        return ad;
    };
    ShapeSeriesBase.prototype.qa = function (a, b, c) {
        var d = this.op;
        var e = this.or;
        var f = a.count;
        var g = new Array(f);
        var h = new Array(f);
        for (var i = 0; i < f; i++) {
            g[i] = a._inner[i].x;
            h[i] = a._inner[i].y;
        }
        d.gt(boxArray$1(g), 0, g.length, b);
        e.gt(boxArray$1(h), 0, h.length, c);
        return new Tuple$2(Array_$type, Array_$type, g, h);
    };
    ShapeSeriesBase.prototype.qk = function (a) {
        a.cx();
    };
    ShapeSeriesBase.prototype.jl = function (a, b) {
        _super.prototype.jl.call(this, a, b);
        var c = b;
        c.ck();
    };
    ShapeSeriesBase.prototype.qb = function (a) {
        if (a != null) {
            a.ck(this);
        }
    };
    ShapeSeriesBase.prototype.qj = function (a) {
        if (a != null) {
            a.bx(this);
        }
    };
    ShapeSeriesBase.prototype.as = function (a, b) {
        var c = this.oy.cz(a, b);
        var d = null;
        if (c != null) {
            d = c.dataContext;
        }
        if (d != null) {
            return d;
        }
        return _super.prototype.as.call(this, a, b);
    };
    ShapeSeriesBase.prototype.pu = function (a) {
        return this.cd.item(a);
    };
    ShapeSeriesBase.prototype.get_d6 = function () {
        return true;
    };
    ShapeSeriesBase.prototype.set_d6 = function (a) {
        _super.prototype.set_d6.call(this, a);
    };
    ShapeSeriesBase.prototype.ao = function (a) {
        var e_2, _a, e_3, _b;
        if (typeCast(NumericXAxis.$, a) !== null && this.pj != null) {
            var b = 1.7976931348623157E+308;
            var c = -1.7976931348623157E+308;
            try {
                for (var _c = tslib_1.__values(fromEnum(this.pj)), _d = _c.next(); !_d.done; _d = _c.next()) {
                    var d = _d.value;
                    b = Math.min(b, d.left);
                    c = Math.max(c, d.right);
                }
            }
            catch (e_2_1) {
                e_2 = { error: e_2_1 };
            }
            finally {
                try {
                    if (_d && !_d.done && (_a = _c.return))
                        _a.call(_c);
                }
                finally {
                    if (e_2)
                        throw e_2.error;
                }
            }
            return new AxisRange(b, c);
        }
        if (typeCast(NumericYAxis.$, a) !== null && this.pj != null) {
            var e = 1.7976931348623157E+308;
            var f = -1.7976931348623157E+308;
            try {
                for (var _e = tslib_1.__values(fromEnum(this.pj)), _f = _e.next(); !_f.done; _f = _e.next()) {
                    var g = _f.value;
                    e = Math.min(e, g.top);
                    f = Math.max(f, g.bottom);
                }
            }
            catch (e_3_1) {
                e_3 = { error: e_3_1 };
            }
            finally {
                try {
                    if (_f && !_f.done && (_b = _e.return))
                        _b.call(_e);
                }
                finally {
                    if (e_3)
                        throw e_3.error;
                }
            }
            return new AxisRange(e, f);
        }
        return null;
    };
    ShapeSeriesBase.prototype.get_dk = function () {
        return true;
    };
    Object.defineProperty(ShapeSeriesBase.prototype, "o6", {
        get: function () {
            return this.styleShape != null;
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesBase.prototype.qw = function (a, b, c) {
        if (this.styleShape != null) {
            if (this.oy.c6 != null && c == this.oy.c6) {
                c = new Style();
                var d = this.oy.c6;
                c.fill = d.fill;
                c.opacity = d.opacity;
                c.stroke = d.stroke;
                c.strokeThickness = d.strokeThickness;
            }
            else {
                if (c != null) {
                    var e = new Style();
                    e.fill = c.fill;
                    e.opacity = c.opacity;
                    e.stroke = c.stroke;
                    e.strokeThickness = c.strokeThickness;
                    c = e;
                }
                else {
                    c = new Style();
                }
            }
            var f = new StyleShapeEventArgs(a, b, c);
            this.styleShape(this, f);
            return f.d();
        }
        return c;
    };
    ShapeSeriesBase.$t = markType(ShapeSeriesBase, 'ShapeSeriesBase', Series.$);
    ShapeSeriesBase.$$p = markDep(DependencyProperty, PropertyMetadata, ShapeSeriesBase, 'raisePropertyChanged', ['IsCustomShapeMarkerStyleAllowed:o9:ql', [0, false], 'IsCustomShapeStyleAllowed:pa:qm', [0, false], 'ItemSearchMode:ow:qn', [ShapeItemSearchMode_$type, enumGetBox(ShapeItemSearchMode_$type, 0)], 'ItemSearchPointsThreshold:ps:qo', [1, 10000], 'ItemSearchThreshold:pt:qp', [1, 10000], 'ShapeFilterResolution:pp:qq', [1, 2], 'ShapeMemberPath:p3:qr', [2, null], 'XAxis:oq:qs', [NumericXAxis.$, null], 'YAxis:os:qt', [NumericYAxis.$, null]]);
    return ShapeSeriesBase;
}(Series));
export { ShapeSeriesBase };
/**
 * @hidden
 */
var ShapeSeriesRenderManager = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(ShapeSeriesRenderManager, _super);
    function ShapeSeriesRenderManager() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.au = null;
        _this.av = null;
        return _this;
    }
    ShapeSeriesRenderManager.prototype.c = function () {
        this.au = new AssigningShapeMarkerStyleEventArgs();
        return this.au;
    };
    ShapeSeriesRenderManager.prototype.a = function () {
        this.av = new AssigningShapeStyleEventArgs();
        return this.av;
    };
    ShapeSeriesRenderManager.prototype.az = function (a, b, c) {
        this.ag = this.ak;
        this.ah = this.al;
        this.m = this.t;
        this.am = this.an;
        this.ao = this.ar;
        this.k = this.r;
        this.l = this.s;
        this.j = this.q;
        if (c) {
            if (a._fill != null) {
                this.ag = a._fill;
            }
            if (a._stroke != null) {
                this.ah = a._stroke;
            }
            if (!isNaN_(a.ac) && (a.y == null || !isNaN_(a.y.strokeThickness))) {
                this.m = a.ac;
            }
        }
        var d = this.b;
        if (d != null) {
            d.p = this.ag;
            d.q = this.ah;
            d.t = this.m;
            d.u = this.am;
            d.v = this.ao;
            d.r = this.k;
            d.s = this.l;
            d.k = this.j;
            d.e = this.f;
            d.i = b;
            d.d = false;
        }
    };
    ShapeSeriesRenderManager.prototype.aw = function (a, b, c) {
        this.w(a, b, c);
    };
    ShapeSeriesRenderManager.prototype.ax = function (a, b, c) {
        this.x(a, b, c);
    };
    ShapeSeriesRenderManager.prototype.ay = function (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;
            }
        }
    };
    ShapeSeriesRenderManager.$t = markType(ShapeSeriesRenderManager, 'ShapeSeriesRenderManager', SeriesRenderManager.$);
    return ShapeSeriesRenderManager;
}(SeriesRenderManager));
export { ShapeSeriesRenderManager };
/**
 * @hidden
 */
var ShapeSeriesViewBase = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(ShapeSeriesViewBase, _super);
    function ShapeSeriesViewBase(a) {
        var _this = _super.call(this, a) || this;
        _this.b9 = null;
        _this.b3 = null;
        _this.ca = new List$1(ShapeHitRegion.$, 0);
        _this.ce = 0;
        _this.cd = null;
        _this.b6 = null;
        _this.c4 = new Path();
        _this.b4 = null;
        _this.c5 = null;
        _this.by = null;
        _this.b0 = null;
        _this.bz = null;
        _this.bx = null;
        _this.b3 = a;
        _this.b6 = _this.b5();
        _this.cd = new List$1(Path.$, 0);
        _this.b9 = new Dictionary$2(Number_$type, FlattenedShape.$, 0);
        return _this;
    }
    ShapeSeriesViewBase.prototype.b1 = function (a) {
        return null;
    };
    Object.defineProperty(ShapeSeriesViewBase.prototype, "cb", {
        get: function () {
            return this.ca;
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesViewBase.prototype.b5 = function () {
        var _this = this;
        return ((function () {
            var $ret = new Pool$1(FrameworkElement.$);
            $ret.create = runOn(_this, _this.cy);
            $ret.activate = runOn(_this, _this.cn);
            $ret.disactivate = runOn(_this, _this.co);
            $ret.destroy = runOn(_this, _this.cp);
            return $ret;
        })());
    };
    ShapeSeriesViewBase.prototype.b8 = function (a) {
        return a.width >= this.b3.pq && a.height >= this.b3.pq;
    };
    ShapeSeriesViewBase.cc = function (a) {
        var b = new List$1(PointCollection.$, 0);
        var c;
        var d = a.count;
        for (var e = 0; e < d; e++) {
            c = a._inner[e];
            var f = new PointCollection(1, c.a);
            b.add(f);
        }
        return b;
    };
    Object.defineProperty(ShapeSeriesViewBase.prototype, "b7", {
        get: function () {
            return this.c5 != null || this.b4 != null || this.b3.o6;
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesViewBase.prototype.cf = function (a, b, c, d) {
        if (d != null && d.count > 0) {
            var e = ShapeSeriesViewBase.cc(d);
            c.intersect(this.bu);
            if (!this.b8(c)) {
            }
            else {
                var f = this.c2(a, e);
                if (f != null) {
                    var g = this.c1(this.ce, b);
                    for (var h = 0; h < d.count; h++) {
                        var i = new ShapeHitRegion();
                        i.d = d._inner[h].b;
                        i.a = d._inner[h].a;
                        i.b = a;
                        i.c = g;
                        this.ca.add(i);
                    }
                    this.ch(g, f);
                    this.ce = this.ce + 1;
                }
            }
        }
    };
    ShapeSeriesViewBase.prototype.c1 = function (a, b) {
        var c = this.b6.item(this.ce);
        if (c.dataContext != null) {
            c.dataContext.item = b;
            c.dataContext.c = a;
        }
        return c;
    };
    ShapeSeriesViewBase.ci = function (a, b, c) {
        if (b._fill == null) {
            b._fill = a.e.m9;
        }
        if (b._stroke == null) {
            b._stroke = a.e.na;
        }
        if (b.y == null) {
            b.ac = a.e.eu;
        }
    };
    ShapeSeriesViewBase.prototype.cm = function (a) {
        for (var b = 0; b < this.b6.a.count; b++) {
            var c = this.b6.a._inner[b];
            a(c);
        }
    };
    ShapeSeriesViewBase.prototype.cj = function (a, b, c) {
        if (a == null) {
            return;
        }
        this.cl(a, c);
        var d = false;
        if (this.b4 != null) {
            var e = this.b4.selectStyle(b, a);
            if (e != null) {
                d = true;
            }
            if (a.y != e) {
                a.y = e;
                this.k.i(a, a.y);
            }
        }
        if (!d) {
            if (a.y != this.c5) {
                a.y = this.c5;
                this.k.i(a, a.y);
            }
        }
        var f = this.b3.qw(b, a, a.y);
        if (a.y != f) {
            a.y = f;
            this.k.i(a, a.y);
        }
    };
    ShapeSeriesViewBase.prototype.cl = function (a, b) {
    };
    ShapeSeriesViewBase.prototype.cg = function (a, b) {
        var c = truncate(Math.floor(a.left));
        var d = truncate(Math.ceil(a.right));
        var e = truncate(Math.floor(a.top));
        var f = truncate(Math.ceil(a.bottom));
        for (var g = c; g < d; g++) {
            for (var h = e; h < f; h++) {
                this.cu(g, h, b);
            }
        }
    };
    ShapeSeriesViewBase.prototype.cu = function (a, b, c) {
    };
    ShapeSeriesViewBase.prototype.cr = function () {
        this.ce = 0;
    };
    ShapeSeriesViewBase.prototype.cq = function () {
        this.b6.count = this.ce;
        this.aq();
    };
    ShapeSeriesViewBase.prototype.ct = function (a, b) {
    };
    ShapeSeriesViewBase.prototype.ck = function () {
        this.b6.count = 0;
        this.aq();
    };
    ShapeSeriesViewBase.prototype.cy = function () {
        var a = this.b3;
        var b = ((function () {
            var $ret = new Path();
            $ret.dataContext = ((function () {
                var $ret = new DataContext();
                $ret.series = a;
                return $ret;
            })());
            return $ret;
        })());
        this.cd.add(b);
        return b;
    };
    ShapeSeriesViewBase.prototype.cn = function (a) {
        a._visibility = 0;
    };
    ShapeSeriesViewBase.prototype.co = function (a) {
        a.dataContext.item = null;
        a._visibility = 1;
    };
    ShapeSeriesViewBase.prototype.cp = function (a) {
        this.cd.remove(a);
    };
    ShapeSeriesViewBase.prototype.c3 = function (a, b, c) {
        if (b == null) {
            return null;
        }
        var d = new PathGeometry();
        var e;
        var f = b.count;
        for (var g = 0; g < f; g++) {
            e = b._inner[g];
            if (e.count < 1) {
                continue;
            }
            var h = new PolyLineSegment();
            h._points = e;
            var i = new PathFigure();
            i._isFilled = c;
            i._isClosed = c;
            i._startPoint = e._inner[0];
            i._segments.add(h);
            d.c.add(i);
        }
        return d;
    };
    ShapeSeriesViewBase.prototype.ac = function (a) {
        return this.cd._inner[a];
    };
    ShapeSeriesViewBase.prototype.ab = function (a) {
        var b = this.cd._inner[a];
        this.c4._visibility = b._visibility;
        this.c4.ak = b.ak;
        var c = this.bp(a);
        this.c4._fill = c;
        this.c4._stroke = c;
        this.c4.ac = this.e.eu + 3;
        return this.c4;
    };
    ShapeSeriesViewBase.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        for (var c = 0; c < this.cd.count; c++) {
            var d = this.aa(c, b);
            if (d._visibility != 1) {
                a.s(d);
            }
        }
    };
    Object.defineProperty(ShapeSeriesViewBase.prototype, "c6", {
        get: function () {
            return this.c5;
        },
        enumerable: true,
        configurable: true
    });
    ShapeSeriesViewBase.prototype.cw = function (a) {
        this.b4 = a;
    };
    ShapeSeriesViewBase.prototype.cv = function (a) {
        this.c5 = a;
    };
    ShapeSeriesViewBase.prototype.cz = function (a, b) {
        return this.c0(a, b, false);
    };
    ShapeSeriesViewBase.prototype.c0 = function (a, b, c) {
        var d = this.b2(a, b, c);
        if (d == null) {
            return null;
        }
        return d.c;
    };
    ShapeSeriesViewBase.prototype.b2 = function (a, b, c) {
        if (this.ca.count == 0) {
            return null;
        }
        var d = a.x;
        var e = a.y;
        var f = this.ca.count;
        var g = this.ca;
        var h = null;
        for (var i = 0; i < f; i++) {
            h = g._inner[i];
            if (h.a == null || h.a.count == 0) {
                continue;
            }
            if (d >= h.d.left && d <= h.d.right && e >= h.d.top && e <= h.d.bottom) {
                if (c) {
                    var j = this.b3.eu / 2 + this.b3.e7(b);
                    if (GeometryUtil.b(a, h.a._inner[0], h.a, j)) {
                        return h;
                    }
                }
                else {
                    if (PolygonUtil.a(h.a, a)) {
                        return h;
                    }
                }
            }
        }
        return null;
    };
    ShapeSeriesViewBase.prototype.cs = function (a, b, c, d) {
        this.by = a;
        this.b0 = b;
        this.bz = c;
        this.bx = d;
        this.ca.clear();
    };
    ShapeSeriesViewBase.prototype.cx = function () {
        var _this = this;
        var a = this.bu;
        var b = ((function () {
            var $ret = new Path();
            $ret.y = _this.c5;
            return $ret;
        })());
        b.ac = 1;
        if (this.k != null) {
            this.k.i(b, b.y);
        }
        this.b3.qu = RectUtil.r(a, b.ac);
    };
    ShapeSeriesViewBase.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        if (this.b6.a == null) {
            return;
        }
        for (var b = 0; b < this.b6.a.count; b++) {
            var c = typeCast(Path.$, this.b6.a._inner[b]);
            if (c._visibility != 1) {
                this.e.a5.exportPathData(a, c, "shape" + b, ["Main "]);
            }
        }
    };
    ShapeSeriesViewBase.$t = markType(ShapeSeriesViewBase, 'ShapeSeriesViewBase', SeriesView.$);
    return ShapeSeriesViewBase;
}(SeriesView));
export { ShapeSeriesViewBase };
//# sourceMappingURL=ShapeSeriesBase_combined.js.map
