UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

3,452 lines 112 kB
/*
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 { __extends, __values } from "tslib";
import { Base, Point_$type, typeCast, runOn, delegateCombine, fromEnum, markType, EnumUtil, String_$type, delegateRemove, IEnumerable_$type, enumGetBox, Number_$type, markDep } from "igniteui-angular-core";
import { IOuterLabelWidthDecider_$type } from "./IOuterLabelWidthDecider";
import { IFunnelLabelSizeDecider_$type } from "./IFunnelLabelSizeDecider";
import { ServiceProvider } from "./ServiceProvider";
import { MessageChannel } from "./MessageChannel";
import { MouseLeaveMessage } from "./MouseLeaveMessage";
import { MouseMoveMessage } from "./MouseMoveMessage";
import { MouseButtonMessage } from "./MouseButtonMessage";
import { Rect } from "igniteui-angular-core";
import { RenderingContext } from "igniteui-angular-core";
import { SetAreaSizeMessage } from "./SetAreaSizeMessage";
import { RenderingMessage } from "./RenderingMessage";
import { Polygon } from "igniteui-angular-core";
import { PointCollection } from "igniteui-angular-core";
import { TextBlock } from "igniteui-angular-core";
import { RenderSliceMessage } from "./RenderSliceMessage";
import { List$1 } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { RenderOuterLabelMessage } from "./RenderOuterLabelMessage";
import { SliceInfo } from "./SliceInfo";
import { TooltipValueChangedMessage } from "./TooltipValueChangedMessage";
import { TooltipUpdateMessage } from "./TooltipUpdateMessage";
import { FunnelDataContext } from "./FunnelDataContext";
import { PropertyChangedMessage } from "./PropertyChangedMessage";
import { FontUtil } from "igniteui-angular-core";
import { CanvasViewRenderer } from "igniteui-angular-core";
import { DOMEventProxy } from "igniteui-angular-core";
import { BrushCollection } from "igniteui-angular-core";
import { BrushUtil } from "igniteui-angular-core";
import { MessageHandler } from "./MessageHandler";
import { ClearMessage } from "./ClearMessage";
import { ClearTooltipMessage } from "./ClearTooltipMessage";
import { ContainerSizeChangedMessage } from "./ContainerSizeChangedMessage";
import { ViewportChangedMessage } from "./ViewportChangedMessage";
import { ViewPropertyChangedMessage } from "./ViewPropertyChangedMessage";
import { ObjectColumn } from "./ObjectColumn";
import { Size } from "igniteui-angular-core";
import { Visibility_$type } from "igniteui-angular-core";
import { isNaN_ } from "igniteui-angular-core";
import { stringReplace } from "igniteui-angular-core";
import { SliceInfoList } from "./SliceInfoList";
import { DoubleAnimator } from "igniteui-angular-core";
import { Bezier } from "./Bezier";
import { DoubleColumn } from "./DoubleColumn";
import { OuterLabelAlignment_$type } from "./OuterLabelAlignment";
import { FunnelSliceDisplay_$type } from "./FunnelSliceDisplay";
import { IItemProvider_$type } from "./IItemProvider";
import { SliceSelectionManager } from "./SliceSelectionManager";
import { FunnelFrame } from "./FunnelFrame";
import { Style } from "igniteui-angular-core";
import { IChartLegend_$type } from "igniteui-angular-core";
import { DataTemplate } from "igniteui-angular-core";
import { DataUpdatedMessage } from "./DataUpdatedMessage";
import { UserSelectedItemsChangedMessage } from "./UserSelectedItemsChangedMessage";
import { LabelSizeChangedMessage } from "./LabelSizeChangedMessage";
import { NotifyCollectionChangedEventArgs } from "igniteui-angular-core";
import { FrameRenderCompleteMessage } from "./FrameRenderCompleteMessage";
import { IntColumn } from "./IntColumn";
import { PointList } from "./PointList";
import { Convert } from "igniteui-angular-core";
import { HighlightedValueDisplayMode_$type } from "igniteui-angular-core";
import { ILegendSeries_$type } from "igniteui-angular-core";
import { UIElement } from "igniteui-angular-core";
import { ContentControl } from "igniteui-angular-core";
import { FunnelSliceDataContext } from "./FunnelSliceDataContext";
import { Control } from "igniteui-angular-core";
import { SliceClickedMessage } from "./SliceClickedMessage";
import { SelectedItemsChangedMessage } from "./SelectedItemsChangedMessage";
import { SliceMouseMessage } from "./SliceMouseMessage";
import { ILegendOwner_$type } from "igniteui-angular-core";
import { ILegendTemplateProvider_$type } from "igniteui-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { FastItemsSource } from "igniteui-angular-core";
import { FunnelChartSelectedItemsCollection } from "./FunnelChartSelectedItemsCollection";
import { Dictionary$2 } from "igniteui-angular-core";
import { FunnelLegendTemplates } from "./FunnelLegendTemplates";
import { FunnelChartSelectedItemsChangedEventArgs } from "./FunnelChartSelectedItemsChangedEventArgs";
import { DeviceUtils } from "igniteui-angular-core";
import { FunnelSliceClickedEventArgs } from "./FunnelSliceClickedEventArgs";
import { FunnelSliceEventArgs } from "./FunnelSliceEventArgs";
import { FunnelChartVisualData } from "./FunnelChartVisualData";
import { RectData } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
/**
 * @hidden
 */
var XamFunnelView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(XamFunnelView, _super);
    function XamFunnelView() {
        var _this = _super.call(this) || this;
        _this.g = null;
        _this.h = null;
        _this.f = null;
        _this.bg = null;
        _this.ad = null;
        _this.ae = null;
        _this.ah = null;
        _this.ai = null;
        _this.ag = null;
        _this.af = null;
        _this.o = null;
        _this.q = null;
        _this.r = null;
        _this.p = null;
        _this.j = null;
        _this.be = null;
        _this.bf = null;
        _this.k = null;
        _this.l = null;
        _this.x = -1;
        _this.y = -1;
        _this.z = -1;
        _this.u = 0;
        _this.v = 0;
        _this.aj = null;
        _this.c = null;
        _this.e = null;
        _this.t = 1;
        _this.w = NaN;
        _this.t = 1;
        _this.w = NaN;
        _this.f = new MessageChannel();
        _this.a9();
        _this.a8();
        var a = _this.g = new MessageHandler();
        a.b(ClearMessage.$, runOn(_this, _this.ap));
        a.b(RenderSliceMessage.$, runOn(_this, _this.a6));
        a.b(RenderOuterLabelMessage.$, runOn(_this, _this.a5));
        a.b(SetAreaSizeMessage.$, runOn(_this, _this.ba));
        a.b(TooltipValueChangedMessage.$, runOn(_this, _this.bc));
        a.b(TooltipUpdateMessage.$, runOn(_this, _this.bb));
        a.b(ClearTooltipMessage.$, runOn(_this, _this.ar));
        a.b(PropertyChangedMessage.$, runOn(_this, _this.a3));
        a.b(ContainerSizeChangedMessage.$, function (b) { return _this.as(); });
        _this.as();
        return _this;
    }
    Object.defineProperty(XamFunnelView.prototype, "i", {
        get: function () {
            return this.h;
        },
        set: function (a) {
            var b = this.h;
            this.h = a;
            this.a1(b, this.h);
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelView.prototype.am = function (a) {
        this.f.i(new MouseLeaveMessage());
    };
    XamFunnelView.prototype.an = function (a, b, c) {
        var d = new MouseMoveMessage();
        d.c = a;
        this.f.i(d);
    };
    XamFunnelView.prototype.al = function (a) {
        var b = new MouseButtonMessage();
        b.h = a;
        b.c = 1;
        b.e = this.j.al ? 1 : 0;
        b.f = this.j.bi;
        this.f.i(b);
    };
    XamFunnelView.prototype.ao = function (a) {
        var b = new MouseButtonMessage();
        b.h = a;
        b.c = 0;
        b.e = this.j.al ? 1 : 0;
        b.f = this.j.bi;
        this.f.i(b);
    };
    XamFunnelView.prototype.ap = function (a) {
        var b = this.bg;
        if (Rect.l_op_Equality(b, null)) {
            return;
        }
        var c = b.left, d = b.top, e = b.width, f = b.height;
        this.aq(this.q, c, d, e, f);
        this.aq(this.o, c, d, e, f);
        this.aq(this.p, c, d, e, f);
        this.aq(this.r, c, d, e, f);
    };
    XamFunnelView.prototype.aq = function (a, b, c, d, e) {
        if (a != null) {
            if (a.d && this.t != 1) {
                a.aa();
                a.ab(this.t, this.t);
            }
            a.l(b, c, d, e);
            if (a.d && this.t != 1) {
                a.z();
            }
        }
    };
    XamFunnelView.prototype.ba = function (a) {
        var b = a.m;
        var c = a.e;
        if (c == "LeftPanel") {
            this.u = b;
        }
        if (c == "RightPanel") {
            this.v = b;
        }
    };
    XamFunnelView.prototype.a6 = function (a) {
        var b = a.g;
        var c = this.q;
        if (c.d && this.t != 1) {
            c.aa();
            c.ab(this.t, this.t);
        }
        var d = new Polygon();
        var e = new PointCollection(0);
        for (var f = 0; f < b.bd.count; f++) {
            var g = b.bd._inner[f];
            e.add({ $type: Point_$type, x: g.x + this.u + b.a7.x, y: g.y + b.a7.y });
        }
        d.an = e;
        d.ad = a.h;
        d._opacity = b.t;
        d._fill = b.ao;
        d._stroke = a.h < 1 ? b.ao : b.at;
        if (b.bj != null) {
            c.j(d, b.bj);
            b.ao = d._fill;
            b.at = d._stroke;
            b.u = d.ad;
            b.t = d._opacity;
        }
        c.u(d);
        if (b.bm == 0) {
            var h = new Polygon();
            var i = new PointCollection(0);
            for (var j = 0; j < b.bc.count; j++) {
                var k = b.bc._inner[j];
                i.add({ $type: Point_$type, x: k.x + this.u + b.a7.x, y: k.y + b.a7.y });
            }
            h.an = i;
            h.ad = a.h;
            h._opacity = b.t;
            h._fill = b.ap;
            h._stroke = a.h < 1 ? b.ap : b.aq;
            if (b.bj != null) {
                c.j(h, b.bj);
                b.ao = h._fill;
                b.at = h._stroke;
                b.u = h.ad;
                b.t = h._opacity;
            }
            c.u(h);
        }
        b.u = d.ad;
        if (b.i) {
            var l = new TextBlock();
            if (this.bf == null) {
                this.bf = new Brush();
                this.bf._fill = this.ak("ui-funnel-slice", "color", -1);
            }
            l.ao = this.bf;
            c.ad(this.m());
            var m = b.ab.toString();
            var n = c.g(m);
            var o = this.ab();
            l.al = m;
            l.o = b.a4.y + b.a7.y - (o / 2);
            l.n = b.a4.x + this.u + b.a7.x - (n / 2);
            b.bg = new Rect(0, l.n, l.o, n, o);
            b.bn = l._visibility;
            c.x(l);
        }
        if (c.d && this.t != 1) {
            c.z();
        }
    };
    XamFunnelView.prototype.a5 = function (a) {
        var b = 0;
        if (this.v > 0) {
            b = this.bg.width - this.v;
        }
        var c = a;
        var d = this.p;
        if (d.d && this.t != 1) {
            d.aa();
            d.ab(this.t, this.t);
        }
        var e = new TextBlock();
        e.al = c.j.toString();
        d.ad(this.n());
        if (this.be == null) {
            this.be = new Brush();
            this.be._fill = this.ad.rootWrapper.getStyleProperty("color");
        }
        e.ao = this.be;
        var f = this.ac();
        var g = c.l.y - f / 2;
        var h = d.g(e.al);
        e.n = b;
        e.o = g;
        c.f.b.bh = new Rect(0, b, g, h, f);
        d.x(e);
        if (d.d && this.t != 1) {
            d.z();
        }
    };
    XamFunnelView.prototype.az = function () {
        if (this.j != null) {
            this.j.bh(this.ai, "");
        }
    };
    XamFunnelView.prototype.ax = function (a) {
        this.av(a);
        if (this.j != null) {
            this.j.at(this.ai, "");
        }
    };
    XamFunnelView.prototype.bc = function (a) {
        this.aj = a.g;
    };
    XamFunnelView.prototype.bb = function (a) {
        this.at(a);
    };
    XamFunnelView.prototype.ar = function (a) {
        this.at(null);
    };
    XamFunnelView.prototype.at = function (a) {
        var x_ = 0, y_ = 0;
        var t_ = null, v_ = null, i_ = this.ad;
        {
            if (a != null) {
                t_ = this.aj;
                x_ = a.i.x + 6;
                y_ = a.i.y + 6;
                v_ = a.g.item;
            }
            var ren_ = this.ad;
            var dc_ = null;
            if (a != null) {
                dc_ = a.g;
            }
            if (dc_ == null) {
                dc_ = new FunnelDataContext();
            }
            dc_.item = v_;
            var tt_ = this.aj;
            if (tt_ != null) {
                if (v_ != null) {
                    tt_.updateToolTip(dc_);
                    tt_.setRawPosition(x_, y_);
                }
                else {
                    tt_.hideToolTip();
                }
            }
        }
    };
    XamFunnelView.prototype.a3 = function (a) {
        var b = a;
        var c = b.g;
        switch (c) {
            case "Container":
                this.ay(b.d);
                break;
            case "TextStyle":
                this.l = FontUtil.toFontInfo(this.ad, b.d.toString());
                break;
            case "OuterLabelTextStyle":
                this.k = FontUtil.toFontInfo(this.ad, b.d.toString());
                break;
            case "ActualPixelScalingRatio":
                if (isNaN_(this.w) || this.w == 0) {
                    this.t = b.d;
                }
                break;
            case "OuterLabelTextColor":
                this.be = typeCast(Brush.$, b.d);
                break;
            case "LabelTextColor":
                this.bf = typeCast(Brush.$, b.d);
                break;
        }
    };
    XamFunnelView.prototype.a4 = function (a) {
        if (this.ad != null) {
            this.ad.setTimeout(a, 0);
        }
        else {
            window.setTimeout(a, 0);
        }
    };
    XamFunnelView.prototype.ay = function (a) {
        if (a == null) {
            if (this.j != null) {
                this.j.av();
            }
            this.ad = null;
            this.ae = this.ah = this.ag = this.ai = null;
            this.o = this.q = this.p = this.r = null;
            this.j = null;
            return;
        }
        var b = a;
        var c = this.ad = b;
        c.rootWrapper.setStyleProperty("position", "relative");
        for (var d = 0; d < 4; d++) {
            var e = this.ad.createElement("canvas");
            e.setStyleProperty("position", "absolute");
            c.append(e);
            var f = new RenderingContext(new CanvasViewRenderer(), this.ad.get2DCanvasContext(e));
            if (d == 0) {
                this.ae = e;
                this.o = f;
            }
            if (d == 1) {
                this.ah = e;
                this.q = f;
            }
            if (d == 2) {
                this.ag = e;
                this.p = f;
            }
            if (d == 3) {
                this.ai = e;
                this.r = f;
            }
        }
        this.af = this.ad.createElement("span");
        this.af.setStyleProperty("position", "absolute");
        this.af.setStyleProperty("display", "none");
        c.append(this.af);
        this.j = new DOMEventProxy(this.ai, this.ad, false);
        var g = this.j;
        g.onMouseOver = delegateCombine(g.onMouseOver, runOn(this, this.an));
        var h = this.j;
        h.onMouseLeave = delegateCombine(h.onMouseLeave, runOn(this, this.am));
        var i = this.j;
        i.onMouseDown = delegateCombine(i.onMouseDown, runOn(this, this.al));
        var j = this.j;
        j.onMouseUp = delegateCombine(j.onMouseUp, runOn(this, this.ao));
        this.as();
    };
    XamFunnelView.prototype.aa = function () {
        var a = this.ak("ui-funnel-slice", "border-top-width", -1);
        return (a == null) ? -1 : parseInt(a);
    };
    XamFunnelView.prototype.m = function () {
        var a = this.l;
        if (a == null) {
            this.l = FontUtil.getFontForClass(this.ad, "ui-funnel-slice");
            a = this.l;
        }
        return a;
    };
    XamFunnelView.prototype.n = function () {
        var a = this.k;
        if (a == null) {
            this.k = a = FontUtil.getFont(this.ad);
        }
        return a;
    };
    XamFunnelView.prototype.ab = function () {
        var a = this.z;
        if (a < 0) {
            var b = this.l;
            a = FontUtil.getCurrentFontHeight(this.ad, b);
            this.z = a;
        }
        return a;
    };
    XamFunnelView.prototype.ac = function () {
        var a = this.y;
        if (a < 0) {
            var b = this.k;
            a = FontUtil.getCurrentFontHeight(this.ad, b);
            this.y = a;
        }
        return a;
    };
    XamFunnelView.prototype.d = function (a) {
        if (this.c != null) {
            return a ? this.c : this.e;
        }
        var b = BrushUtil.h("chart", this.ad, this.c, this.e);
        this.c = b.p2;
        this.e = b.p3;
        return a ? this.c : this.e;
    };
    XamFunnelView.prototype.ak = function (a, b, c) {
        var d = this.af;
        if (d == null) {
            return null;
        }
        d.addClass(a);
        var e = d.getStyleProperty(b);
        if (e == null || e.length == 0 || e == "null" || e == "transparent") {
            e = null;
        }
        if (c >= 0) {
            var f = new Brush();
            if (e != null && e.length != stringReplace(e, "(0, 0, 0, 0", "").length) {
                e = null;
            }
            f._fill = e == null ? XamFunnelView.a[c % XamFunnelView.a.length] : e;
            this.c.item(c, f);
            var g = null;
            if (e != null) {
                g = d.getStyleProperty("border-top-color");
                if (g == null || g.length == 0 || g == "null" || g == "transparent") {
                    g = e;
                }
            }
            f = new Brush();
            f._fill = (g == null) ? XamFunnelView.b[c % XamFunnelView.b.length] : g;
            this.e.item(c, f);
        }
        d.removeClass(a);
        return e;
    };
    XamFunnelView.prototype.a7 = function (a, b, c) {
        var d = new PropertyChangedMessage();
        d.g = a;
        d.e = b;
        d.d = c;
        this.f.i(d);
    };
    XamFunnelView.prototype.av = function (a) {
        var b = a.b4;
        var c = a.by;
        if (!isNaN_(b) && b != 0) {
            return;
        }
        if (window.devicePixelRatio != undefined && window.devicePixelRatio != c) {
            a.by = window.devicePixelRatio;
        }
    };
    XamFunnelView.prototype.aw = function (a) {
        this.g.c(a);
    };
    XamFunnelView.prototype.a1 = function (a, b) {
        if (a != null) {
            var c = typeCast(MessageChannel.$, a.b("RenderingMessages"));
            if (c != null) {
                c.h(runOn(this, this.aw));
            }
            this.f.g();
        }
        if (b != null) {
            var d = typeCast(MessageChannel.$, b.b("RenderingMessages"));
            if (d != null) {
                d.e(runOn(this, this.aw));
            }
            var e = typeCast(MessageChannel.$, b.b("InteractionMessages"));
            this.f.f(e);
        }
    };
    XamFunnelView.prototype.bd = function (a, b, c, d, e) {
        a.setAttribute("width", b.toString());
        a.setAttribute("height", c.toString());
        a.setStyleProperty("width", d.toString() + "px");
        a.setStyleProperty("height", e.toString() + "px");
    };
    XamFunnelView.prototype.as = function () {
        if (this.ad == null) {
            return;
        }
        var a = this.ad.rootWrapper.width();
        var b = this.ad.rootWrapper.height();
        this.bg = new Rect(0, 0, 0, a, b);
        if (this.j != null) {
            this.j.bl = this.bg;
        }
        this.bd(this.ae, a * this.t, b * this.t, a, b);
        this.bd(this.ah, a * this.t, b * this.t, a, b);
        this.bd(this.ag, a * this.t, b * this.t, a, b);
        this.bd(this.ai, a * this.t, b * this.t, a, b);
        var c = new ViewportChangedMessage();
        c.e = a;
        c.d = b;
        this.f.i(c);
    };
    XamFunnelView.prototype.a0 = function () {
        this.as();
    };
    XamFunnelView.prototype.a9 = function () {
        var a = new ViewPropertyChangedMessage();
        a.g = "OuterLabelWidthDecider";
        a.e = null;
        a.d = typeCast(IOuterLabelWidthDecider_$type, this);
        this.f.i(a);
    };
    XamFunnelView.prototype.a8 = function () {
        var a = new ViewPropertyChangedMessage();
        a.g = "FunnelLabelSizeDecider";
        a.e = null;
        a.d = typeCast(IFunnelLabelSizeDecider_$type, this);
        this.f.i(a);
    };
    XamFunnelView.prototype.decideWidth = function (a) {
        var e_1, _a;
        var b = a == null ? null : a.a;
        if (b == null) {
            return 0;
        }
        var c = 0;
        this.p.ad(this.n());
        try {
            for (var _b = __values(fromEnum(b)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                if (d != null) {
                    c = Math.max(this.p.g(d.toString()), c);
                }
            }
        }
        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 c;
    };
    XamFunnelView.prototype.decideLabelSize = function (a, b) {
        var c = 0;
        if (a.b.i) {
            this.p.ad(this.m());
            c = this.p.g(a.b.ab.toString());
        }
        return new Size(1, c, b ? this.ab() : this.ac());
    };
    XamFunnelView.prototype.s = function (a, f_) {
        if (f_ == null) {
            return true;
        }
        var b = a.a;
        var c_ = this.ad;
        c_ = c_ ? c_.data('igFunnelChart') : null;
        if (b == null || c_ == null) {
            return false;
        }
        var i_ = b.count;
        var c = new Array(i_);
        while (i_-- > 0) {
            var v_ = b.item(i_);
            c[i_] = f_(v_, i_, c_);
        }
        a.b(c);
        return true;
    };
    XamFunnelView.prototype.au = function () {
    };
    XamFunnelView.prototype.a2 = function () {
    };
    XamFunnelView.$t = markType(XamFunnelView, 'XamFunnelView', Base.$, [IOuterLabelWidthDecider_$type, IFunnelLabelSizeDecider_$type]);
    XamFunnelView.a = ["#7000ff", "#70ff00", "#00f0f0", "#ff0070", "#ff00ff"];
    XamFunnelView.b = ["#7000dd", "#70dd00", "#00d0d0", "#dd0070", "#dd00dd"];
    return XamFunnelView;
}(Base));
export { XamFunnelView };
/**
 * @hidden
 */
var XamFunnelController = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(XamFunnelController, _super);
    function XamFunnelController() {
        var _this = _super.call(this) || this;
        _this.br = null;
        _this.ag = null;
        _this.av = null;
        _this.cj = null;
        _this.ck = null;
        _this.cf = null;
        _this.cg = null;
        _this.bd = false;
        _this.bi = false;
        _this.aw = null;
        _this.aj = null;
        _this.z = null;
        _this.am = null;
        _this.al = null;
        _this.aq = null;
        _this.ar = null;
        _this.cp = null;
        _this.cm = null;
        _this.cl = null;
        _this.a6 = false;
        _this.by = 0;
        _this.bx = 0;
        _this.w = null;
        _this.v = null;
        _this.t = null;
        _this.p = null;
        _this.a2 = false;
        _this.a5 = false;
        _this.bw = 0;
        _this.a4 = false;
        _this.bs = 0;
        _this.a = null;
        _this.b = null;
        _this.ad = 0;
        _this.m = 0;
        _this.az = false;
        _this.bv = 0;
        _this.a7 = false;
        _this.dz = null;
        _this.dy = null;
        _this.ay = false;
        _this.b9 = 0;
        _this.ca = 0;
        _this.r = null;
        _this.ab = null;
        _this.ah = null;
        _this.g = null;
        _this.e = null;
        _this.f = null;
        _this.d4 = null;
        _this.d5 = null;
        _this.a9 = false;
        _this.a3 = false;
        _this.a8 = false;
        _this.a1 = false;
        _this.d9 = 1;
        _this.bt = 0.5;
        _this.co = null;
        _this.cn = null;
        _this.bu = -1;
        _this.a0 = false;
        _this.l = null;
        _this.o = null;
        _this.dt = null;
        _this.ds = null;
        _this.d3 = null;
        _this.ax = new DoubleAnimator(0, 1, 2000);
        var a = _this.ax;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(_this, _this.c3));
        _this.k = new FunnelFrame();
        _this.j = new FunnelFrame();
        _this.h = new FunnelFrame();
        _this.ai = new SliceSelectionManager();
        _this.ao = new DoubleColumn();
        _this.an = new DoubleColumn();
        _this.at = new ObjectColumn();
        _this.au = new ObjectColumn();
        _this.y = new MessageChannel();
        _this.x = new MessageChannel();
        _this.aa = new MessageHandler();
        _this.aa.b(PropertyChangedMessage.$, runOn(_this, _this.di));
        _this.aa.b(DataUpdatedMessage.$, runOn(_this, _this.cz));
        _this.aa.b(ViewportChangedMessage.$, runOn(_this, _this.dq));
        _this.aa.b(ViewPropertyChangedMessage.$, runOn(_this, _this.dr));
        _this.aa.b(MouseMoveMessage.$, runOn(_this, _this.c9));
        _this.aa.b(MouseButtonMessage.$, runOn(_this, _this.c7));
        _this.aa.b(MouseLeaveMessage.$, runOn(_this, _this.c8));
        _this.aa.b(UserSelectedItemsChangedMessage.$, runOn(_this, _this.dp));
        _this.aa.b(LabelSizeChangedMessage.$, runOn(_this, _this.c5));
        _this.aa.b(ContainerSizeChangedMessage.$, function (b) { return _this.y.i(b); });
        _this.br = function (b, c) {
            _this.bl = true;
            _this.dj();
        };
        return _this;
    }
    XamFunnelController.prototype.c3 = function (a, b) {
        this.b6 = this.ax.o;
        if (this.b6 == 1) {
            this.bb = false;
            this.c0(this.h);
        }
        if (this.bb) {
            var c = 1 - this.b6;
            FunnelFrame.k(this.j, this.k, this.h, this.b6);
            this.c0(this.j);
        }
    };
    Object.defineProperty(XamFunnelController.prototype, "ax", {
        get: function () {
            return this.aw;
        },
        set: function (a) {
            this.aw = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ak", {
        get: function () {
            return this.aj;
        },
        set: function (a) {
            this.aj = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "aa", {
        get: function () {
            return this.z;
        },
        set: function (a) {
            this.z = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ao", {
        get: function () {
            return this.am;
        },
        set: function (a) {
            this.am = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "an", {
        get: function () {
            return this.al;
        },
        set: function (a) {
            this.al = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "at", {
        get: function () {
            if (!this.bd && this.av != null) {
                this.bd = this.av.s(this.aq, this.cf);
            }
            return this.aq;
        },
        set: function (a) {
            this.aq = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "au", {
        get: function () {
            if (!this.bi && this.av != null) {
                this.bi = this.av.s(this.ar, this.cg);
            }
            return this.ar;
        },
        set: function (a) {
            this.ar = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "cu", {
        get: function () {
            return this.cp;
        },
        set: function (a) {
            this.cp = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "cr", {
        get: function () {
            return this.cm;
        },
        set: function (a) {
            this.cm = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "cq", {
        get: function () {
            return this.cl;
        },
        set: function (a) {
            this.cl = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bl", {
        get: function () {
            return this.a6;
        },
        set: function (a) {
            this.a6 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "b8", {
        get: function () {
            return this.by;
        },
        set: function (a) {
            this.by = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "b7", {
        get: function () {
            return this.bx;
        },
        set: function (a) {
            this.bx = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "y", {
        get: function () {
            return this.w;
        },
        set: function (a) {
            this.w = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "x", {
        get: function () {
            return this.v;
        },
        set: function (a) {
            this.v = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "u", {
        get: function () {
            return this.t;
        },
        set: function (a) {
            this.t = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "q", {
        get: function () {
            return this.p;
        },
        set: function (a) {
            this.p = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "be", {
        get: function () {
            return this.a2;
        },
        set: function (a) {
            this.a2 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bj", {
        get: function () {
            return this.a5;
        },
        set: function (a) {
            this.a5 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "b6", {
        get: function () {
            return this.bw;
        },
        set: function (a) {
            this.bw = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bg", {
        get: function () {
            return this.a4;
        },
        set: function (a) {
            this.a4 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bz", {
        get: function () {
            return this.bs;
        },
        set: function (a) {
            this.bs = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "c", {
        get: function () {
            if ((this.a == null || this.a.count < 1) && this.av != null) {
                this.a = this.av.d(true);
            }
            return this.a;
        },
        set: function (a) {
            this.a = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "d", {
        get: function () {
            if ((this.b == null || this.b.count < 1) && this.av != null) {
                this.b = this.av.d(false);
            }
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ae", {
        get: function () {
            return this.ad;
        },
        set: function (a) {
            this.ad = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "n", {
        get: function () {
            return this.m;
        },
        set: function (a) {
            this.m = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bb", {
        get: function () {
            return this.az;
        },
        set: function (a) {
            this.az = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "b5", {
        get: function () {
            return this.bv;
        },
        set: function (a) {
            this.bv = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bo", {
        get: function () {
            return this.a7;
        },
        set: function (a) {
            this.a7 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "d2", {
        get: function () {
            return this.dz;
        },
        set: function (a) {
            this.dz = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "d1", {
        get: function () {
            return this.dy;
        },
        set: function (a) {
            this.dy = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ba", {
        get: function () {
            return this.ay;
        },
        set: function (a) {
            this.ay = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "cd", {
        get: function () {
            return this.b9;
        },
        set: function (a) {
            this.b9 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ce", {
        get: function () {
            return this.ca;
        },
        set: function (a) {
            this.ca = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "s", {
        get: function () {
            return this.r;
        },
        set: function (a) {
            this.r = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ac", {
        get: function () {
            return this.ab;
        },
        set: function (a) {
            var b = this.ab;
            this.ab = a;
            this.db(b, this.ab);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ai", {
        get: function () {
            return this.ah;
        },
        set: function (a) {
            this.ah = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "k", {
        get: function () {
            return this.g;
        },
        set: function (a) {
            this.g = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "h", {
        get: function () {
            return this.e;
        },
        set: function (a) {
            this.e = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "j", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            this.f = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "d7", {
        get: function () {
            return this.d4;
        },
        set: function (a) {
            this.d4 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "d8", {
        get: function () {
            return this.d5;
        },
        set: function (a) {
            this.d5 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bq", {
        get: function () {
            return this.a9;
        },
        set: function (a) {
            this.a9 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bf", {
        get: function () {
            return this.a3;
        },
        set: function (a) {
            this.a3 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bp", {
        get: function () {
            return this.a8;
        },
        set: function (a) {
            this.a8 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "bc", {
        get: function () {
            return this.a1;
        },
        set: function (a) {
            this.a1 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ea", {
        get: function () {
            return this.d9;
        },
        set: function (a) {
            this.d9 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "b2", {
        get: function () {
            return this.bt;
        },
        set: function (a) {
            this.bt = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "ct", {
        get: function () {
            return this.co;
        },
        set: function (a) {
            this.co = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "cs", {
        get: function () {
            return this.cn;
        },
        set: function (a) {
            this.cn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "b3", {
        get: function () {
            var a = this.bu;
            if (a < 0 && this.av != null) {
                this.bu = this.av.aa();
                a = this.bu;
            }
            return a < 0 ? 1 : a;
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelController.prototype.db = function (a, b) {
        if (a != null) {
            var c = typeCast(MessageChannel.$, a.b("ConfigurationMessages"));
            if (c != null) {
                c.h(runOn(this, this.c6));
            }
            c = typeCast(MessageChannel.$, a.b("InteractionMessages"));
            if (c != null) {
                c.h(runOn(this, this.c6));
            }
            this.y.g();
            this.x.g();
        }
        if (b != null) {
            var d = typeCast(MessageChannel.$, b.b("ConfigurationMessages"));
            if (d != null) {
                d.e(runOn(this, this.c6));
            }
            d = typeCast(MessageChannel.$, b.b("InteractionMessages"));
            if (d != null) {
                d.e(runOn(this, this.c6));
            }
            var e = typeCast(MessageChannel.$, b.b("RenderingMessages"));
            this.y.f(e);
            var f = typeCast(MessageChannel.$, b.b("ModelUpdateMessages"));
            this.x.f(f);
        }
        this.bl = true;
    };
    XamFunnelController.prototype.c6 = function (a) {
        this.aa.c(a);
        var b = typeCast(RenderingMessage.$, a);
        if (b != null) {
            this.bl = b.c;
        }
        this.dj();
    };
    XamFunnelController.prototype.bn = function () {
        return this.b7 >= 0 && this.b8 >= 0;
    };
    XamFunnelController.prototype.bh = function () {
        return this.ao != null && this.ao.a != null && this.ao.a.count > 0 && (this.an == null || this.an.a == null || (this.an.a.count == 0 || this.an.a.count == this.ao.a.count)) && this.u != null && this.q != null && this.c != null && this.c.count > 0 && this.d != null && this.d.count > 0 && this.bn();
    };
    XamFunnelController.prototype.dj = function () {
        if (!this.bl) {
            return;
        }
        if (!this.bh()) {
            this.cy();
            return;
        }
        this.bl = false;
        var a = this.u.decideWidth(this.as());
        if (a > this.b8) {
            a = 0;
        }
        if (!this.bj) {
            a = 0;
        }
        var b = this.b8 - a;
        var c = a > 0;
        var d = this.be;
        var e = b >= 0;
        if (e || c) {
            this.dg(e, c, d, b, a);
        }
    };
    XamFunnelController.prototype.cy = function () {
        if (this.bm() && this.b6 > 0) {
            this.ax.w();
        }
        this.dl("LeftLabels");
        this.dl("RightLabels");
        this.dl("SliceArea");
        this.cx();
        this.h.b.clear();
        this.j.b.clear();
        this.k.b.clear();
    };
    XamFunnelController.prototype.cx = function () {
        var a = new FrameRenderCompleteMessage();
        this.y.i(a);
    };
    XamFunnelController.prototype.dg = function (a, b, c, d, e) {
        if (this.bb) {
            var f = this.k;
            this.k = this.j;
            this.j = f;
        }
        else {
            var g = this.k;
            this.k = this.h;
            this.h = g;
        }
        this.dh(this.h, a, b, c, d, e);
        this.ax.w();
        this.b6 = 0;
        if (this.bm()) {
            FunnelFrame.k(this.j, this.k, this.h, this.b6);
            this.c0(this.j);
            this.bb = true;
            this.ax.v();
        }
        else {
            this.c0(this.h);
        }
    };
    XamFunnelController.prototype.b4 = function (a) {
        if (isNaN_(a)) {
            return 0;
        }
        return Math.abs(a);
    };
    XamFunnelController.prototype.dh = function (a, b, c, d, e, f) {
        var e_2, _a, e_3, _b;
        var g = e / 2;
        this.a0 = this.bo;
        if (this.a0) {
            this.c4(e, g);
        }
        else {
            this.ak = null;
        }
        var h = this.n == 1;
        var i = this.ap();
        var j = 0;
        try {
            for (var _c = __values(fromEnum(i.a)), _d = _c.next(); !_d.done; _d = _c.next()) {
                var k = _d.value;
                j += this.b4(this.ao.a.item(k));
            }
        }
        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;
            }
        }
        if (j == 0) {
            h = false;
        }
        var l = this.b7 / i.a.count;
        var m = 0;
        var n = 0;
        n = this.b3 / 2;
        a.j = f;
        a.f = d;
        a.h = c;
        a.g = this.ae == 0;
        a.b = new SliceInfoList();
        var o = 0;
        try {
            for (var _e = __values(fromEnum(i.a)), _f = _e.next(); !_f.done; _f = _e.next()) {
                var p = _f.value;
                var q = void 0;
                if (h) {
                    q = (this.b4(this.ao.a.item(p)) / j) * this.b7;
                }
                else {
                    q = l;
                }
                var r = this.b1(e, m + n);
                var s = m + q;
                var t = this.b1(e, s - n);
                var u = r / 2;
                var v = t / 2;
                var w = new SliceInfo();
                var x = w.b;
                x.q = m;
                x.p = s;
                var y = new Rect(4);
                var z = new Rect(4);
                var aa = 0;
                if (v > u) {
                    aa = g - v;
                }
                else {
                    aa = g - u;
                }
                var ab = m;
                x.bm = this.ea;
                x.r = this.b2;
                x.ae(this.dw(p), this.dx(p), x.r, this.ea == 0);
                x.bj = this.d6(p);
                x.j = this.ai.c(p);
                if (b) {
                    w.h = true;
                    x.a8 = { $type: Point_$type, x: g - u - aa + n, y: m - ab + n };
                    x.a9 = { $type: Point_$type, x: g + u - aa - n, y: m - ab + n };
                    x.a5 = { $type: Point_$type, x: g - v - aa + n, y: s - ab - n };
                    x.a6 = { $type: Point_$type, x: g + v - aa - n, y: s - ab - n };
                    x.a3 = x.a9;
                    x.a2 = x.a8;
                    if (this.a0) {
                        this.cv(x, m + n, s - n, g, aa - n, ab);
                    }
                }
                if (d) {
                    x.i = true;
                    x.a4 = { $type: Point_$type, x: g - aa, y: (m + s) / 2 - ab };
                    x.ab = this.ch(p);
                    var ac = this.q.decideLabelSize(w, true);
                    if (ac.width > e) {
                        x.i = false;
                    }
                    if (ac.height > q) {
                        x.i = false;
                    }
                    y.height = ac.height;
                    y.width = ac.width;
                    y.x = x.a4.x;
                    y.y = x.a4.y;
                    x.bg = y;
                }
                else {
                    x.i = false;
                    x.ab = this.ch(p);
                }
                if (d || b) {
                    x.a7 = { $type: Point_$type, x: aa, y: ab };
                    x.item = this.ao.a.item(p);
                    x.w = p;
                }
                if (b) {
                    if (this.an != null && this.an.a != null && !isNaN_(this.an.a.item(p))) {
                        x.aa = this.an.a.item(p);
                        x.af();
                        var ad = x.s;
                        var ae = x.a8;
                        var af = x.a5;
                        var ag = x.a6;
                        var ah = (af.x - ae.x) * ad;
                        var ai = af.y - (af.y - ae.y) * ad;
                        x.a2 = { $type: Point_$type, x: af.x - ah, y: ai };
                        x.a3 = { $type: Point_$type, x: ag.x + ah, y: ai };
                        x.ah();
                    }
                    x.ad();
                }
                if (c) {
                    w.g = true;
                    w.n = { $type: Point_$type, x: 0, y: (m + s) / 2 };
                    w.l = this.ci(p);
                    var aj = this.q.decideLabelSize(w, false);
                    if (aj.height > q) {
                        w.g = false;
                    }
                    z.height = aj.height;
                    z.width = aj.width;
                    y.x = w.n.x;
                    y.y = w.n.y;
                    x.bh = z;
                }
                else {
                    w.g = false;
                    w.l = this.ci(p);
                }
                w.j = p;
                a.b.add(w);
                m += q;
                o++;
            }
        }
        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;
            }
        }
        if ((this.at != null && this.at.a != null && this.at.a.count > 0) || (this.au != null && this.au.a != null && this.au.a.count > 0)) {
            this.dk(a);
        }
        a.b.ae();
    };
    XamFunnelController.prototype.cv = function (a, b, c, d, e, f) {
        var g = this.ak.b(b);
        var h = this.ak.b(c);
        var i = new PointList();
        var j = new PointList();
        var k = g.b;
        var l = h.b;
        for (var m = k; m <= l; m++) {
            i.add({ $type: Point_$type, x: this.ak.e._inner[m].c.x - e, y: this.ak.e._inner[m].c.y - f });
        }
        e += this.b3;
        for (var n = l; n >= k; n--) {
            var o = this.ak.e._inner[n].c;
            j.add({ $type: Point_$type, x: d + d - o.x - e, y: o.y - f });
        }
        a.c = i;
        a.e = j;
    };
    XamFunnelController.prototype.bk = function (a, b) {
        if (a.x != b.x || a.y != b.y) {
            return true;
        }
        return false;
    };
    XamFunnelController.prototype.c4 = function (a, b) {
        var c;
        var d;
        var e = 0, f = this.b7;
        e = this.b3 / 2;
        f -= e;
        if (this.bf) {
            c = { $type: Point_$type, x: b - (a * this.bz / 2), y: e };
            d = { $type: Point_$type, x: b - (a / 2), y: f };
        }
        else {
            c = { $type: Point_$type, x: b - (a / 2), y: e };
            d = { $type: Point_$type, x: b - (a * this.bz / 2), y: f };
        }
        var g = this.d2.y < this.d1.y ? this.d2 : this.d1;
        var h = this.d1.y > this.d2.y ? this.d1 : this.d2;
        if (g.y < 0) {
            g.y = 0;
        }
        if (h.y > 1) {
            h.y = 1;
        }
        if (this.bf) {
            var i = h.x;
            h.x = g.x;
            g.x = i;
            i = g.y;
            g.y = 1 - h.y;
            h.y = 1 - i;
        }
        var j = { $type: Point_$type, x: a * g.x, y: this.b7 * g.y };
        var k = { $type: Point_$type, x: a * h.x, y: this.b7 * h.y };
        if (this.ak == null || this.bk(c, this.ak.q) || this.bk(j, this.ak.r) || this.bk(k, this.ak.s) || this.bk(d, this.ak.t)) {
            this.ak = new Bezier(c, j, k, d, 2, b);
        }
        if (this.ak == null) {
            this.a0 = false;
        }
        else {
            this.a0 = this.ak.d;
        }
    };
    XamFunnelController.prototype.ci = function (a) {
        var b = this.au;
        var c = b == null ? null : b.a;
        return c == null || a >= c.count ? null : c.item(a);
    };
    XamFunnelController.prototype.ch = function (a) {
        var b = this.at;
        var c = b == null ? null : b.a;
        return c == null || a >= c.count ? null : c.item(a);
    };
    XamFunnelController.prototype.d6 = function (a) {
        if (this.ai.c(a)) {
            return this.d7;
        }
        if (this.ai.d(a) && this.bq) {
            return this.d8;
        }
        return null;
    };
    XamFunnelController.prototype.dx = function (a) {
        return this.d.item(a % this.d.count);
    };
    XamFunnelController.prototype.dw = function (a) {
        return this.c.item(a % this.c.count);
    };
    XamFunnelController.prototype.b1 = function (a, b) {
        var c = a * this.bz;
        if (this.a0) {
            var d = this.ak.b(b).c.x;
            return ((a / 2) - d) * 2;
        }
        else {
            if (this.bf) {
                return a - ((a - c) * ((this.b7 - b) / this.b7));
            }
            else {
                return a - ((a - c) * (b / this.b7));
            }
        }
    };
    XamFunnelController.prototype.ap = function () {
        var _this = this;
        var a = new IntColumn();
        a.b(this.ao.a.count);
        a.c(function (b, c) {
            if (_this.ao.a.item(b) < _this.ao.a.item(c)) {
                return _this.bf ? -1 : 1;
            }
            if (_this.ao.a.item(b) > _this.ao.a.item(c)) {
                return _this.bf ? 1 : -1;
            }
            return 0;
        });
        return a;
    };
    XamFunnelController.prototype.c0 = function (a) {
        this.c1(a);
    };
    XamFunnelController.prototype.c2 = function () {
        if (this.l != null) {
            this.c1(this.l);
        }
    };
    XamFunnelController.prototype.c1 = function (a) {
        var e_4, _a, e_5, _b;
        this.dl("LeftLabels");
        this.dl("RightLabels");
        this.dl("SliceArea");
        if (a.g) {
            this.dm("LeftPanel", a.j);
            this.dm("RightPanel", 0);
        }
        else {
            this.dm("LeftPanel", 0);
            this.dm("RightPanel", a.j);
        }
        this.ag = a.b;
        try {
            for (var _c = __values(fromEnum(a.b)), _d = _c.next(); !_d.done; _d = _c.next()) {
                var b = _d.value;
                if (b.h) {
                    var c = new RenderSliceMessage();
                    c.e = "SliceArea";
                    c.g = b.b;
                    c.h = this.b3;
                    this.y.i(c);
                }
            }
        }
        catch (e_4_1) {
            e_4 = { error: e_4_1 };
        }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return))
                    _a.call(_c);
            }
            finally {
                if (e_4)
                    throw e_4.error;
            }
        }
        try {
            for (var _e = __values(fromEnum(a.b)), _f = _e.next(); !_f.done; _f = _e.next()) {
                var d = _f.value;
                if (d.g) {
                    var e = new RenderOuterLabelMessage();
                    if (a.g) {
                        e.e = "LeftLabels";
                    }
                    else {
                        e.e = "RightLabels";
                    }
                    e.j = d.l;
                    e.l = d.n;
                    e.h = a.j;
                    e.f = d;
                    this.y.i(e);
                }
            }
        }
        catch (e_5_1) {
            e_5 = { error: e_5_1 };
        }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return))
                    _b.call(_e);
            }
            finally {
                if (e_5)
                    throw e_5.error;
            }
        }
        var f = new FrameRenderCompleteMessage();
        this.y.i(f);
    };
    XamFunnelController.prototype.dm = function (a, b) {
        var c = new SetAreaSizeMessage();
        c.e = a;
        c.i = true;
        c.m = b;
        this.y.i(c);
    };
    XamFunnelController.prototype.bm = function () {
        return this.b5 > 0;
    };
    XamFunnelController.prototype.dl = function (a) {
        var b = new ClearMessage();
        b.e = a;
        this.y.i(b);
    };
    XamFunnelController.prototype.as = function () {
        return this.au;
    };
    XamFunnelController.prototype.cz = function (a) {
        this.bl = true;
    };
    XamFunnelController.prototype.cb = function (a) {
        return Convert.toInt32(a);
    };
    XamFunnelController.prototype.di = function (a) {
        var b = a;
        var c = b.d;
        switch (b.g) {
            case "TextStyle":
                this.ct = c != null ? c.toString() : "";
                var d = new PropertyChangedMessage();
                d.g = b.g;
                d.e = b.e;
                d.d = c;
                this.y.i(d);
                this.bl = true;
                break;
            case "OuterLabelTextStyle":
                this.cs = c != null ? c.toString() : "";
                var e = new PropertyChangedMessage();
                e.g = b.g;
                e.e = b.e;
                e.d = c;
                this.y.i(e);
                this.bl = true;
                break;
            case "ValueColumn":
                this.ao.b(c);
                this.bl = true;
                break;
            case "HighlightValueColumn":
                this.an.b(c);
                this.bl = true;
                break;
            case "ActualHighlightValueDisplayMode":
                this.ea = EnumUtil.getEnumValue(HighlightedValueDisplayMode_$type, c) == 2 ? 0 : 1;
                this.bl = true;
                break;
            case "ActualHighlightValueOpacity":
                this.b2 = c;
                this.bl = true;
                break;
            case "InnerLabelColumn":
                this.bd = false;
                this.cj = c;
                this.at.b(c);
                this.bl = true;
                break;
            case "InnerLabelVisibility":
                this.be = c;
                this.bl = true;
                break;
            case "OuterLabelVisibility":
                this.bj = c;
                this.bl = true;
                break;
            case "OuterLabelColumn":
                this.bi = false;
                this.ck = c;
                this.au.b(c);
                this.bl = true;
                break;
            case "ValueMemberPath":
                this.cu = typeCast(String_$type, c);
                break;
            case "OuterLabelMemberPath":
                this.cr = typeCast(String_$type, c);
                break;
            case "InnerLabelMemberPath":
                this.cq = typeCast(String_$type, c);
                break;
            case "BottomEdgeWidth":
                this.bz = c;
                if (this.bz > 1) {
                    this.bz = 1;
                }
                if (this.bz < 0.001) {
                    this.bz = 0.001;
                }
                this.bl = true;
                break;
            case "Brushes":
                if (b.e != null) {
                    var f = b.e;
                    f.collectionChanged = delegateRemove(f.collectionChanged, this.br);
                }
                if (c != null) {
                    var g = c;
                    g.collectionChanged = delegateCombine(g.collectionChanged, this.br);
                }
                this.c = typeCast(BrushCollection.$, c);
                this.bl = true;
                break;
            case "Outlines":
                this.d = typeCast(BrushCollection.$, c);
                this.bl = true;
                break;
            case "OuterLabelAlignment":
                this.ae = EnumUtil.getEnumValue(OuterLabelAlignment_$type, c);
                this.bl = true;
                break;
            case "FunnelSliceDisplay":
                this.n = EnumUtil.getEnumValue(FunnelSliceDisplay_$type, c);
                this.bl = true;
                break;
            case "FormatInnerLabel":
                this.at.b(this.cj);
                this.bd = false;
                this.cf = c;
                this.bl = true;
                break;
            case "FormatOuterLabel":
                this.au.b(this.ck);
                this.cg = c;
                this.bi = false;
                this.bl = true;
                break;
            case "IsInverted":
                this.bf = c;
                this.bl = true;
                break;
            case "TransitionDuration":
                this.ax.r = this.cb(c);
                this.b5 = this.ax.r;
                break;
            case "AllowSliceSelection":
                this.ba = c;
                break;
            case "SelectedSliceStyle":
                this.d7 = c;
                this.bl = true;
                break;
            case "UnselectedSliceStyle":
                this.d8 = c;
                this.bl = true;
                break;
            case "UseUnselectedStyle":
                this.bq = c;
                this.bl = true;
                break;
            case "UseBezierCurve":
                this.bo = c;
                this.bl = true;
                break;
            case "UpperBezierControlPoint":
                this.d2 = c;
                this.bl = true;
                break;
            case "LowerBezierControlPoint":
                this.d1 = c;
                this.bl = true;
                break;
            case "ItemProvider":
                this.s = c;
                break;
            case "ToolTip":
                var h = new TooltipValueChangedMessage();
                if (c != null) {
                    this.bc = true;
                }
                else {
                    this.bc = false;
                    var i = new ClearTooltipMessage();
                    this.y.i(i);
                }
                h.g = c;
                this.y.i(h);
                break;
            case "Legend":
                this.da(c);
                this.bl = true;
                break;
            case "LegendItemTemplate":
                this.dv = c;
                this.bl = true;
                break;
            case "LegendItemBadgeTemplate":
                this.du = c;
                this.bl = true;
                break;
            case "UseOuterLabelsForLegend":
                this.bp = c;
                this.bl = true;
                break;
            case "OutlineThickness":
                this.bu = c;
                this.bl = true;
                this.y.i(b);
                break;
            case "Container":
            case "PixelScalingRatio":
            case "ActualPixelScalingRatio":
            case "OuterLabelTextColor":
            case "LabelTextColor":
                if (b.g == "Container") {
                    var j = b.d;
                    this.ax.u(j);
                }
                var k = new PropertyChangedMessage();
                k.g = b.g;
                k.e = b.e;
                k.d = c;
                this.y.i(k);
                break;
        }
    };
    Object.defineProperty(XamFunnelController.prototype, "dv", {
        get: function () {
            return this.dt;
        },
        set: function (a) {
            this.dt = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelController.prototype, "du", {
        get: function () {
            return this.ds;
        },
        set: function (a) {
            this.ds = a;
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelController.prototype.da = function (a) {
        if (this.o != null) {
            this.o.clearLegendItemsForSeries(this.ac.b("Model"));
        }
        this.o = a;
    };
    XamFunnelController.prototype.dk = function (a) {
        var e_6, _a;
        var _this = this;
        var b = new List$1(UIElement.$, 0);
        var _loop_1 = function (c) {
            var d = new ContentControl();
            var e = "";
            if (c.b.ab != null) {
                if (this_1.bp && c.l != null) {
                    e = c.l.toString();
                }
                else {
                    e = c.b.ab.toString();
                }
            }
            else if (c.l != null) {
                e = c.l.toString();
            }
            var f = null;
            var g = null;
            if (f == null && c.b.ao != null) {
                f = c.b.ao;
            }
            if (g == null && c.b.at != null) {
                g = c.b.at;
            }
            var h = null;
            if (this_1.s != null) {
                h = this_1.s.getItem(c.b.w);
            }
            d.content = ((function () {
                var $ret = new FunnelSliceDataContext();
                $ret.series = _this.ac.b("Model");
                $ret.item = h;
                $ret.itemBrush = f;
                $ret.itemLabel = e;
                $ret.thickness = _this.b3;
                $ret.outline = g;
                $ret.itemOutline = g;
                return $ret;
            })());
            d.ah = this_1.dv;
            b.add(d);
        };
        var this_1 = this;
        try {
            for (var _b = __values(fromEnum(a.b)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                _loop_1(c);
            }
        }
        catch (e_6_1) {
            e_6 = { error: e_6_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_6)
                    throw e_6.error;
            }
        }
        if (this.o != null) {
            if (this.o.isItemwise) {
                var i = this.o;
                i.createItemwiseLegendItems(b, this.ac.b("Model"));
            }
        }
    };
    XamFunnelController.prototype.dr = function (a) {
        var b = a;
        switch (b.g) {
            case "OuterLabelWidthDecider":
                this.u = typeCast(IOuterLabelWidthDecider_$type, b.d);
                this.bl = true;
                break;
            case "FunnelLabelSizeDecider":
                this.q = typeCast(IFunnelLabelSizeDecider_$type, b.d);
                this.bl = true;
                break;
        }
    };
    XamFunnelController.prototype.dq = function (a) {
        var b = a;
        this.b8 = b.e;
        this.b7 = b.d;
        this.bl = true;
    };
    XamFunnelController.prototype.c7 = function (a) {
        var b = a;
        if (b.e == 1) {
            return;
        }
        if (b.c == 1) {
            this.ce = this.cd;
        }
        else if (b.c == 0) {
            var c = this.ce;
            this.ce = -1;
            if (b.f == 0) {
            }
            else if (b.f != 2) {
                return;
            }
            if (c == this.cd) {
                this.dc(c);
            }
        }
    };
    XamFunnelController.prototype.dc = function (a) {
        if (a < 0 || a > this.ao.a.count - 1) {
            return;
        }
        if (this.ba) {
            this.ai.k(a, this.ao.a.item(a));
            var b = this.ai.a();
            var c = new SelectedItemsChangedMessage();
            c.c = b;
            this.x.i(c);
            this.bl = true;
        }
        var d = new SliceClickedMessage();
        d.c = a;
        d.item = this.ao.a.item(a);
        d.f = this.d3;
        this.x.i(d);
    };
    XamFunnelController.prototype.de = function (a) {
        if (this.ao != null && a >= 0 && a < this.ao.a.count) {
            var b = new SliceMouseMessage();
            b.e = a;
            b.item = this.ao.a.item(a);
            b.c = 0;
            b.i = this.d3;
            this.x.i(b);
        }
    };
    XamFunnelController.prototype.df = function (a, b) {
        if (this.ao != null && a >= 0 && a < this.ao.a.count) {
            var c = new SliceMouseMessage();
            c.e = a;
            c.item = this.ao.a.item(a);
            c.c = 2;
            c.i = this.d3;
            c.h = b;
            this.x.i(c);
        }
    };
    XamFunnelController.prototype.dd = function (a) {
        if (this.ao != null && a >= 0 && a < this.ao.a.count) {
            var b = new SliceMouseMessage();
            b.e = a;
            b.item = this.ao.a.item(a);
            b.c = 1;
            b.i = this.d3;
            this.x.i(b);
        }
    };
    XamFunnelController.prototype.c9 = function (a) {
        var b = a;
        var c = this.cd;
        this.cd = this.cc(b.c);
        if (c != this.cd) {
            if (c != -1) {
                this.de(c);
            }
            if (this.cd != -1) {
                this.dd(this.cd);
            }
        }
        else {
            if (this.cd != -1) {
                this.df(this.cd, b.c);
            }
        }
        if (this.bc) {
            this.dn(b.c);
        }
    };
    XamFunnelController.prototype.c8 = function (a) {
        var b = this.cd;
        this.cd = -1;
        if (b != -1) {
            this.de(b);
        }
        var c = new ClearTooltipMessage();
        this.y.i(c);
    };
    XamFunnelController.prototype.dn = function (a) {
        var b = new FunnelDataContext();
        if (this.s != null && this.cd >= 0 && this.cd < this.s.count) {
            b.item = this.s.getItem(this.cd);
        }
        b.b = this.cd;
        if (b.b < 0) {
            var c = new ClearTooltipMessage();
            this.y.i(c);
            return;
        }
        var d = new TooltipUpdateMessage();
        d.g = b;
        d.i = this.d0(a, b);
        this.y.i(d);
    };
    XamFunnelController.prototype.d0 = function (a, b) {
        var c = { $type: Point_$type, x: a.x + 10, y: a.y + 10 };
        return c;
    };
    XamFunnelController.prototype.cc = function (a) {
        if (!this.bh()) {
            return -1;
        }
        var b = a.y;
        var c = a.x;
        var d = this.i();
        if (d.g) {
            c -= d.j;
        }
        var e = this.af(b);
        if (e == null) {
            return -1;
        }
        var f = this.b0();
        var g = this.b1(f, b);
        var h = g / 2;
        var i = f / 2;
        var j = new Rect(0, e.b.a8.x, e.b.a8.y, Math.max(e.b.a6.x - e.b.a8.x, 0), Math.max(e.b.a6.y - e.b.a8.y, 0));
        if (c >= (i - h) && c <= (i + h)) {
            this.d3 = j;
            return e.j;
        }
        else {
            return -1;
        }
    };
    XamFunnelController.prototype.b0 = function () {
        var a = this.i();
        return this.b8 - a.j;
    };
    XamFunnelController.prototype.af = function (a) {
        var b = this.i();
        var c = b.b.ad(a);
        if (c >= 0 && c < b.b.count) {
            return b.b._inner[c];
        }
        return null;
    };
    XamFunnelController.prototype.i = function () {
        var a = null;
        if (this.bb) {
            a = this.j;
        }
        else {
            a = this.h;
        }
        return a;
    };
    XamFunnelController.prototype.dp = function (a) {
        var b = a;
        this.ai.i(b.c, this.ao);
        this.bl = true;
    };
    XamFunnelController.prototype.c5 = function (a) {
        this.cw(a);
    };
    XamFunnelController.prototype.cw = function (a) {
        var b = this.i();
        if (a.c == -1) {
            this.bl = true;
        }
        else {
            var c = b.b._inner[a.c];
            if (a.b) {
                if (a.d.width > b.j) {
                    this.bl = true;
                }
                if (a.d.height != a.e.height) {
                    this.bl = true;
                }
                if (a.d.height > c.b.a6.y - c.b.a9.y) {
                    this.bl = true;
                }
            }
            else {
                if (a.d.height > c.b.a6.y - c.b.a9.y) {
                    this.bl = true;
                }
            }
        }
    };
    XamFunnelController.$t = markType(XamFunnelController, 'XamFunnelController');
    return XamFunnelController;
}(Base));
export { XamFunnelController };
/**
 * @hidden
 */
var XamFunnelChart = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(XamFunnelChart, _super);
    function XamFunnelChart() {
        var _this = _super.call(this) || this;
        _this.at = null;
        _this.av = null;
        _this.as = null;
        _this.a0 = null;
        _this.b5 = null;
        _this.ba = null;
        _this.b6 = null;
        _this.a7 = null;
        _this.bu = 0.5;
        _this.a4 = 1;
        _this.a8 = null;
        _this.a9 = null;
        _this.b7 = null;
        _this.b8 = null;
        _this.ak = new FunnelChartSelectedItemsCollection();
        _this.br = new Dictionary$2(Base.$, Base.$, 0);
        _this.selectedItemsChanged = null;
        _this.cf = null;
        _this.ce = null;
        _this.sliceClicked = null;
        _this.sliceEnter = null;
        _this.sliceLeave = null;
        _this.sliceHover = null;
        _this.cc = null;
        _this.bw = NaN;
        _this.bv = 1;
        _this.fn = null;
        _this.fo = null;
        _this.bv = 1;
        _this.bw = NaN;
        _this.ak.ag(runOn(_this, _this.ei));
        _this.au = new MessageHandler();
        _this.au.b(SliceClickedMessage.$, runOn(_this, _this.em));
        _this.au.b(SliceMouseMessage.$, runOn(_this, _this.en));
        _this.au.b(SelectedItemsChangedMessage.$, runOn(_this, _this.ej));
        _this.as = new MessageChannel();
        _this.b5 = function (a, b) { return _this.dy(b.action, b.position, b.count, b.propertyName); };
        _this.b6 = function (a, b) { return _this.d3(b.action, b.position, b.count, b.propertyName); };
        _this.ek();
        _this.ab = XamFunnelChart.$;
        _this.a0 = new XamFunnelConnector(new XamFunnelView(), _this);
        _this.legendItemTemplate = ((function () {
            var $ret = new DataTemplate();
            $ret.render = FunnelLegendTemplates.e;
            $ret.measure = FunnelLegendTemplates.c;
            return $ret;
        })());
        _this.legendItemBadgeTemplate = ((function () {
            var $ret = new DataTemplate();
            $ret.render = FunnelLegendTemplates.d;
            $ret.measure = FunnelLegendTemplates.f;
            return $ret;
        })());
        return _this;
    }
    Object.defineProperty(XamFunnelChart.prototype, "isFragment", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "isLayer", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.destroy = function () {
        this.provideContainer(null);
    };
    Object.defineProperty(XamFunnelChart.prototype, "au", {
        get: function () {
            return this.at;
        },
        set: function (a) {
            this.at = a;
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.ek = function () {
        this.ee(XamFunnelChart.$$p[1], 0, this.bz);
        this.ee(XamFunnelChart.$$p[10], enumGetBox(Visibility_$type, this.fv), enumGetBox(Visibility_$type, this.fv));
        this.ee(XamFunnelChart.$$p[17], enumGetBox(OuterLabelAlignment_$type, this.ax), enumGetBox(OuterLabelAlignment_$type, this.ax));
        this.ee(XamFunnelChart.$$p[4], enumGetBox(FunnelSliceDisplay_$type, this.an), enumGetBox(FunnelSliceDisplay_$type, this.an));
        this.ee(XamFunnelChart.$$p[26], this.fs, this.fs);
        this.ee(XamFunnelChart.$$p[16], this.fr, this.fr);
        this.el();
    };
    XamFunnelChart.prototype.el = function () {
        var a = new PropertyChangedMessage();
        a.g = "ItemProvider";
        a.e = null;
        a.d = this;
        this.as.i(a);
    };
    Object.defineProperty(XamFunnelChart.prototype, "aw", {
        get: function () {
            return this.av;
        },
        set: function (a) {
            var b = this.av;
            this.av = a;
            this.eg(b, this.av);
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.eg = function (a, b) {
        if (a != null) {
            var c = typeCast(MessageChannel.$, a.b("ModelUpdateMessages"));
            if (c != null) {
                c.h(runOn(this, this.d5));
            }
            this.as.g();
        }
        if (b != null) {
            var d = typeCast(MessageChannel.$, b.b("ModelUpdateMessages"));
            if (d != null) {
                d.e(runOn(this, this.d5));
            }
            var e = typeCast(MessageChannel.$, b.b("ConfigurationMessages"));
            this.as.f(e);
        }
    };
    XamFunnelChart.prototype.d5 = function (a) {
        this.au.c(a);
    };
    XamFunnelChart.prototype.dy = function (a, b, c, d) {
        var e = ((function () {
            var $ret = new DataUpdatedMessage();
            $ret.g = b;
            $ret.f = c;
            $ret.i = d;
            return $ret;
        })());
        switch (a) {
            case 3:
                e.c = 3;
                break;
            case 1:
                e.c = 1;
                break;
            case 0:
                e.c = 0;
                break;
            case 2:
                e.c = 2;
                break;
            case 4:
                e.c = 4;
                break;
        }
        this.ee("ValueColumn", this.bg, this.bg);
        this.ee("InnerLabelColumn", this.bc, this.bc);
        this.ee("OuterLabelColumn", this.bd, this.bd);
        this.as.i(e);
    };
    Object.defineProperty(XamFunnelChart.prototype, "bg", {
        get: function () {
            return this.ba;
        },
        set: function (a) {
            if (this.ba != a) {
                var b = this.ba;
                this.ba = a;
                this.ee("ValueColumn", b, this.ba);
            }
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.d3 = function (a, b, c, d) {
        var e = ((function () {
            var $ret = new DataUpdatedMessage();
            $ret.g = b;
            $ret.f = c;
            $ret.i = d;
            return $ret;
        })());
        switch (a) {
            case 3:
                e.c = 3;
                break;
            case 1:
                e.c = 1;
                break;
            case 0:
                e.c = 0;
                break;
            case 2:
                e.c = 2;
                break;
            case 4:
                e.c = 4;
                break;
        }
        this.ee("HighlightValueColumn", this.bb, this.bb);
        this.as.i(e);
    };
    Object.defineProperty(XamFunnelChart.prototype, "bb", {
        get: function () {
            return this.a7;
        },
        set: function (a) {
            if (this.a7 != a) {
                var b = this.a7;
                this.a7 = a;
                this.ep();
                this.ee("HighlightValueColumn", b, this.a7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "bx", {
        get: function () {
            return this.bu;
        },
        set: function (a) {
            var b = this.bu;
            this.bu = a;
            if (b != this.bu) {
                this.ee("ActualHighlightValueOpacity", b, a);
            }
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.eq = function () {
        this.bx = isNaN_(this.b1) ? 0.5 : Math.max(0, Math.min(this.b1, 1));
    };
    Object.defineProperty(XamFunnelChart.prototype, "a5", {
        get: function () {
            return this.a4;
        },
        set: function (a) {
            this.a4 = a;
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.ep = function () {
        var a = this.a5;
        if (this.a6 != 1) {
            if (this.bb == null || this.bg == null || this.bb.count != this.bg.count) {
                this.a5 = 1;
            }
            else {
                this.a5 = 2;
            }
        }
        else {
            this.a5 = 1;
        }
        if (this.a5 != a) {
            this.ee("ActualHighlightValueDisplayMode", enumGetBox(HighlightedValueDisplayMode_$type, a), enumGetBox(HighlightedValueDisplayMode_$type, this.a5));
        }
    };
    Object.defineProperty(XamFunnelChart.prototype, "a6", {
        get: function () {
            return EnumUtil.getEnumValue(HighlightedValueDisplayMode_$type, this.c(XamFunnelChart.ez));
        },
        set: function (a) {
            this.h(XamFunnelChart.ez, enumGetBox(HighlightedValueDisplayMode_$type, a));
            this.ep();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "bc", {
        get: function () {
            return this.a8;
        },
        set: function (a) {
            if (this.a8 != a) {
                var b = this.a8;
                this.a8 = a;
                this.ee("InnerLabelColumn", b, this.bc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "bd", {
        get: function () {
            return this.a9;
        },
        set: function (a) {
            if (this.a9 != a) {
                var b = this.a9;
                this.a9 = a;
                this.ee("OuterLabelColumn", b, this.bd);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "b9", {
        get: function () {
            return this.b7;
        },
        set: function (a) {
            var b = this.b7;
            this.b7 = a;
            this.ee("FormatInnerLabel", b, a);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "ca", {
        get: function () {
            return this.b8;
        },
        set: function (a) {
            var b = this.b8;
            this.b8 = a;
            this.ee("FormatOuterLabel", b, a);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "selectedItems", {
        get: function () {
            return this.ak;
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.ef = function (a, b) {
        if (this.selectedItemsChanged != null) {
            this.selectedItemsChanged(a, b);
        }
    };
    Object.defineProperty(XamFunnelChart.prototype, "dl", {
        get: function () {
            return this.cf;
        },
        set: function (a) {
            var b = this.cf;
            this.cf = a;
            this.ee("TextStyle", b, a);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "dd", {
        get: function () {
            return this.ce;
        },
        set: function (a) {
            var b = this.ce;
            this.ce = a;
            this.ee("OuterLabelTextStyle", b, a);
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.onDetachedFromUI = function () {
        this.a0.e.az();
    };
    XamFunnelChart.prototype.onAttachedToUI = function () {
        this.a0.e.ax(this);
    };
    XamFunnelChart.prototype.ee = function (a, b, c) {
        if (this.bk(a, b, c) || this.bj(a, b, c) || this.bi(a, b, c) || this.bm(a, b, c) || this.bl(a, b, c)) {
            return;
        }
        if (a == "PixelScalingRatio") {
            if (isNaN_(DeviceUtils.a(this.b4))) {
                this.by = 1;
            }
            else {
                this.by = DeviceUtils.a(this.b4);
            }
        }
        if (a == XamFunnelChart.$$p[6]) {
            this.eq();
            return;
        }
        this.as.i(((function () {
            var $ret = new PropertyChangedMessage();
            $ret.g = a;
            $ret.e = b;
            $ret.d = c;
            return $ret;
        })()));
    };
    XamFunnelChart.prototype.bi = function (a, b, c) {
        if (a == XamFunnelChart.$$p[2] || a == XamFunnelChart.$$p[21]) {
            this.as.i(((function () {
                var $ret = new PropertyChangedMessage();
                $ret.g = a;
                $ret.e = b == null ? null : b;
                $ret.d = c == null ? null : c;
                return $ret;
            })()));
            return true;
        }
        return false;
    };
    XamFunnelChart.prototype.bk = function (a, b, c) {
        var _this = this;
        if (a == XamFunnelChart.$$p[12]) {
            if (b != null) {
                this.a2 = null;
                if (this.a3 != null && this.highlightedItemsSource == null) {
                    this.a3 = null;
                }
            }
            if (c != null) {
                this.selectedItems.clear();
                this.a2 = ((function () {
                    var $ret = new FastItemsSource();
                    $ret.e = _this.itemsSource;
                    return $ret;
                })());
                if (this.highlightedItemsSource == null) {
                    this.a3 = ((function () {
                        var $ret = new FastItemsSource();
                        $ret.e = _this.itemsSource;
                        return $ret;
                    })());
                }
            }
            return true;
        }
        else if (a == XamFunnelChart.$$p[3]) {
            if (b != null) {
                var d = b;
                d.event = delegateRemove(d.event, this.b5);
            }
            if (c != null) {
                var e = c;
                e.event = delegateCombine(e.event, this.b5);
            }
            this.d2(a, b, c);
            return true;
        }
        else if (a == XamFunnelChart.$$p[30] || a == XamFunnelChart.$$p[9] || a == XamFunnelChart.$$p[18]) {
            this.d2(a, b, c);
            return false;
        }
        return false;
    };
    XamFunnelChart.prototype.bj = function (a, b, c) {
        var _this = this;
        if (a == XamFunnelChart.$$p[7]) {
            if (b != null) {
                this.a3 = null;
            }
            if (c != null) {
                this.selectedItems.clear();
                this.a3 = ((function () {
                    var $ret = new FastItemsSource();
                    $ret.e = _this.highlightedItemsSource;
                    return $ret;
                })());
            }
            else if (this.itemsSource != null) {
                this.selectedItems.clear();
                this.a3 = ((function () {
                    var $ret = new FastItemsSource();
                    $ret.e = _this.itemsSource;
                    return $ret;
                })());
            }
            this.ep();
            return true;
        }
        else if (a == XamFunnelChart.$$p[5]) {
            if (b != null) {
                var d = b;
                d.event = delegateRemove(d.event, this.b6);
            }
            if (c != null) {
                var e = c;
                e.event = delegateCombine(e.event, this.b6);
            }
            this.d1(a, b, c);
            return true;
        }
        else if (a == XamFunnelChart.$$p[8]) {
            this.d1(a, b, c);
            return false;
        }
        return false;
    };
    XamFunnelChart.prototype.be = function (a, b) {
        return a.registerColumn(b, null, false);
    };
    XamFunnelChart.prototype.bf = function (a, b) {
        return a.registerColumnObject(b, null, false);
    };
    XamFunnelChart.prototype.d2 = function (a, b, c) {
        if (this.a2 == null) {
            var d = typeCast(FastItemsSource.$, b);
            if (d != null) {
                if (this.bg != null) {
                    d.deregisterColumn(this.bg);
                }
                if (this.bc != null) {
                    d.deregisterColumn(this.bc);
                }
                if (this.bd != null) {
                    d.deregisterColumn(this.bd);
                }
                this.bg = null;
                this.bc = null;
                this.bd = null;
            }
            return;
        }
        if (b != null && typeof b === 'string') {
            switch (a) {
                case XamFunnelChart.$$p[30]:
                    this.a2.deregisterColumn(this.bg);
                    this.bg = null;
                    break;
                case XamFunnelChart.$$p[9]:
                    this.a2.deregisterColumn(this.bc);
                    this.bc = null;
                    break;
                case XamFunnelChart.$$p[18]:
                    this.a2.deregisterColumn(this.bd);
                    this.bd = null;
                    break;
            }
        }
        if (c != null && typeCast(FastItemsSource.$, c) !== null) {
            if (this.dw != null) {
                this.bg = this.be(c, this.dw);
            }
            if (this.cz != null) {
                this.bc = this.bf(c, this.cz);
            }
            if (this.da != null) {
                this.bd = this.bf(c, this.da);
            }
        }
        if (c != null && typeof c === 'string') {
            switch (a) {
                case XamFunnelChart.$$p[30]:
                    this.bg = this.be(this.a2, this.dw);
                    break;
                case XamFunnelChart.$$p[9]:
                    this.bc = this.bf(this.a2, this.cz);
                    break;
                case XamFunnelChart.$$p[18]:
                    this.bd = this.bf(this.a2, this.da);
                    break;
            }
        }
    };
    XamFunnelChart.prototype.d1 = function (a, b, c) {
        if (this.a3 == null) {
            var d = typeCast(FastItemsSource.$, b);
            if (d != null) {
                if (this.bb != null) {
                    d.deregisterColumn(this.bb);
                }
                this.bb = null;
            }
            this.ep();
            return;
        }
        if (b != null && typeof b === 'string') {
            switch (a) {
                case XamFunnelChart.$$p[8]:
                    this.a3.deregisterColumn(this.bb);
                    this.bb = null;
                    break;
            }
        }
        if (c != null && typeCast(FastItemsSource.$, c) !== null) {
            if (this.cs != null) {
                this.bb = this.be(c, this.cs);
            }
        }
        if (c != null && typeof c === 'string') {
            switch (a) {
                case XamFunnelChart.$$p[8]:
                    this.bb = this.be(this.a3, this.cs);
                    break;
            }
        }
        this.ep();
    };
    XamFunnelChart.prototype.bm = function (a, b, c) {
        if (a == XamFunnelChart.$$p[10] || a == XamFunnelChart.$$p[19]) {
            var d_1 = EnumUtil.getEnumValue(Visibility_$type, b) == 0;
            var e_7 = EnumUtil.getEnumValue(Visibility_$type, c) == 0;
            this.as.i(((function () {
                var $ret = new PropertyChangedMessage();
                $ret.g = a;
                $ret.d = e_7;
                $ret.e = d_1;
                return $ret;
            })()));
            return true;
        }
        return false;
    };
    XamFunnelChart.prototype.bl = function (a, b, c) {
        if (a == XamFunnelChart.$$p[24]) {
            var d = new PropertyChangedMessage();
            d.g = a;
            if (b != null) {
                d.e = b;
            }
            if (c != null) {
                d.d = c;
            }
            this.as.i(d);
            return true;
        }
        return false;
    };
    XamFunnelChart.prototype.em = function (a) {
        var b = a;
        if (this.sliceClicked != null) {
            var c = new FunnelSliceClickedEventArgs();
            c.index = b.c;
            c.bounds = b.f;
            if (this.a2.count > b.c && b.c >= 0) {
                c.item = this.a2.item(b.c);
            }
            this.sliceClicked(this, c);
        }
    };
    XamFunnelChart.prototype.en = function (a) {
        var b = a;
        switch (b.c) {
            case 1:
                {
                    if (this.sliceEnter != null) {
                        var c = new FunnelSliceEventArgs();
                        c.index = b.e;
                        c.bounds = b.i;
                        if (this.a2.count > b.e && b.e >= 0) {
                            c.item = this.a2.item(b.e);
                        }
                        this.sliceEnter(this, c);
                    }
                    break;
                }
            case 0:
                {
                    if (this.sliceLeave != null) {
                        var d = new FunnelSliceEventArgs();
                        d.index = b.e;
                        d.bounds = b.i;
                        if (this.a2.count > b.e && b.e >= 0) {
                            d.item = this.a2.item(b.e);
                        }
                        this.sliceLeave(this, d);
                    }
                    break;
                }
            case 2:
                {
                    if (this.sliceHover != null) {
                        var e = new FunnelSliceEventArgs();
                        e.index = b.e;
                        e.bounds = b.i;
                        e.position = b.h;
                        if (this.a2.count > b.e && b.e >= 0) {
                            e.item = this.a2.item(b.e);
                        }
                        this.sliceHover(this, e);
                    }
                    break;
                }
        }
    };
    XamFunnelChart.prototype.ej = function (a) {
        var b = a;
        var c = this.a2;
        var d = new Dictionary$2(Base.$, Base.$, 0);
        var e = new List$1(Base.$, 0);
        var h = b.c;
        for (var g = 0; g < h.length; g++) {
            var f = h[g];
            if (f >= 0 && f < c.count) {
                var i = c.item(f);
                e.add1(i);
                if (!d.containsKey(i)) {
                    d.addItem(i, i);
                }
            }
        }
        this.d4(this.ak.ae, this.br, e, d);
    };
    XamFunnelChart.prototype.ei = function (a, b) {
        var e_8, _a;
        var c = new List$1(Number_$type, 0);
        try {
            for (var _b = __values(fromEnum(this.ak.ae)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                var e = this.a2.indexOf(d);
                if (e >= 0 && !c.contains(e)) {
                    c.add(e);
                }
            }
        }
        catch (e_8_1) {
            e_8 = { error: e_8_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_8)
                    throw e_8.error;
            }
        }
        var f = new UserSelectedItemsChangedMessage();
        f.c = c.toArray();
        this.as.i(f);
        if (b.action == 4 && b.newItems == null && b.oldItems == null) {
            return;
        }
        var g = new FunnelChartSelectedItemsCollection();
        if (b.oldItems != null) {
            for (var h = 0; h < b.oldItems.count; h++) {
                g.add1(b.oldItems.item(h));
            }
        }
        var i = new FunnelChartSelectedItemsCollection();
        if (b.newItems != null) {
            for (var j = 0; j < b.newItems.count; j++) {
                i.add1(b.newItems.item(j));
            }
        }
        var k = this.selectedItems;
        this.ef(this, new FunnelChartSelectedItemsChangedEventArgs(g, i, k));
    };
    XamFunnelChart.prototype.d4 = function (a, b, c, d) {
        var e_9, _a, e_10, _b, e_11, _c;
        var e = new List$1(Base.$, 0);
        try {
            for (var _d = __values(fromEnum(a)), _e = _d.next(); !_e.done; _e = _d.next()) {
                var f = _e.value;
                if (!d.containsKey(f)) {
                    e.add1(f);
                }
            }
        }
        catch (e_9_1) {
            e_9 = { error: e_9_1 };
        }
        finally {
            try {
                if (_e && !_e.done && (_a = _d.return))
                    _a.call(_d);
            }
            finally {
                if (e_9)
                    throw e_9.error;
            }
        }
        try {
            for (var _f = __values(fromEnum(e)), _g = _f.next(); !_g.done; _g = _f.next()) {
                var g = _g.value;
                a.remove(g);
                b.removeItem(g);
            }
        }
        catch (e_10_1) {
            e_10 = { error: e_10_1 };
        }
        finally {
            try {
                if (_g && !_g.done && (_b = _f.return))
                    _b.call(_f);
            }
            finally {
                if (e_10)
                    throw e_10.error;
            }
        }
        try {
            for (var _h = __values(fromEnum(c)), _j = _h.next(); !_j.done; _j = _h.next()) {
                var h = _j.value;
                if (!b.containsKey(h)) {
                    a.add(h);
                    b.addItem(h, h);
                }
            }
        }
        catch (e_11_1) {
            e_11 = { error: e_11_1 };
        }
        finally {
            try {
                if (_j && !_j.done && (_c = _h.return))
                    _c.call(_h);
            }
            finally {
                if (e_11)
                    throw e_11.error;
            }
        }
    };
    XamFunnelChart.prototype.getItem = function (a) {
        return this.a2.item(a);
    };
    Object.defineProperty(XamFunnelChart.prototype, "count", {
        get: function () {
            return this.a2 != null ? this.a2.count : 0;
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.d0 = function () {
        this.a0.i();
    };
    XamFunnelChart.prototype.provideContainer = function (a) {
        var b = this.cc;
        this.cc = a;
        this.ee("Container", b, this.cc);
    };
    XamFunnelChart.prototype.notifyResized = function () {
        this.a0.g();
        this.as.i(new ContainerSizeChangedMessage());
    };
    XamFunnelChart.prototype.eb = function (source_, a, b, c) {
        this.d7(source_, new NotifyCollectionChangedEventArgs(2, 2, c, b, a));
    };
    XamFunnelChart.prototype.d6 = function (source_) {
        this.d7(source_, new NotifyCollectionChangedEventArgs(0, 4));
    };
    XamFunnelChart.prototype.d8 = function (source_, a, b) {
        this.d7(source_, new NotifyCollectionChangedEventArgs(1, 0, b, a));
    };
    XamFunnelChart.prototype.d9 = function (source_, a, b) {
        this.d7(source_, new NotifyCollectionChangedEventArgs(1, 1, b, a));
    };
    XamFunnelChart.prototype.d7 = function (s_, a) {
        if (s_.dataView && s_.dataSource) {
            s_ = s_.dataView();
        }
        ;
        if (s_ == this.itemsSource) {
            var b = this.a2;
            if (b != null) {
                b.handleCollectionChanged(a);
            }
        }
    };
    XamFunnelChart.prototype.a1 = function () {
        var a = this.a0;
        return a == null ? null : a.c;
    };
    XamFunnelChart.prototype.ay = function () {
        var a = this.a1();
        return a == null ? null : a.ai;
    };
    Object.defineProperty(XamFunnelChart.prototype, "ag", {
        get: function () {
            var a = this.ay();
            return a == null ? null : a.a();
        },
        set: function (a) {
            var b = this.ay();
            if (b == null) {
                return;
            }
            var c = this.a1();
            b.f();
            var d = a == null ? 0 : a.length;
            while (d-- > 0) {
                b.k(a[d], c.ao.a.item(a[d]));
            }
            c.bl = true;
            c.dj();
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.prototype.eo = function (a) {
        var b = this.ay();
        if (b == null) {
            return;
        }
        var c = this.a1();
        var d = c.ao.a.item(a);
        if (d != null) {
            c.ai.k(a, d);
            c.bl = true;
            c.dj();
        }
    };
    XamFunnelChart.prototype.az = function () {
        var a = new FunnelChartVisualData();
        var b = this.a0.c.ag;
        if (b != null) {
            for (var c = 0; c < b.count; c++) {
                var d = b._inner[c].d();
                a.slices.add(d);
            }
        }
        a.opacity = this._opacity;
        a.isInverted = this.bn;
        a.selectedItems = this.selectedItems.ae;
        a.name = this.name;
        a.viewport = new RectData(0, 0, this.a0.c.b8, this.a0.c.b7);
        return a;
    };
    XamFunnelChart.prototype.cm = function () {
        var a = this.az();
        a.scaleByViewport();
        return a.serialize();
    };
    XamFunnelChart.prototype.resolveLegendIndex = function () {
        return -1;
    };
    XamFunnelChart.prototype.forSubItems = function (a) {
    };
    Object.defineProperty(XamFunnelChart.prototype, "b4", {
        get: function () {
            return this.bw;
        },
        set: function (a) {
            if (isNaN_(a) || a == 0) {
                return;
            }
            var b = this.bw;
            this.bw = a;
            this.ee("PixelScalingRatio", b, this.bw);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "by", {
        get: function () {
            return this.bv;
        },
        set: function (a) {
            var b = this.bv;
            this.bv = a;
            if (this.bv != b) {
                this.ee("ActualPixelScalingRatio", b, this.bv);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "container", {
        get: function () {
            return this;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "isStacked", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "isVertical", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "isUsableInLegend", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "hasSubItems", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "hasMarkers", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "fp", {
        get: function () {
            return this.fn;
        },
        set: function (a) {
            var b = this.fp;
            if (a != b) {
                this.fn = a;
                this.ee("OuterLabelTextColor", b, this.fp);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelChart.prototype, "fq", {
        get: function () {
            return this.fo;
        },
        set: function (a) {
            var b = this.fq;
            if (a != b) {
                this.fo = a;
                this.ee("LabelTextColor", b, this.fq);
            }
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelChart.$t = markType(XamFunnelChart, 'XamFunnelChart', Control.$, [IItemProvider_$type, ILegendOwner_$type, ILegendTemplateProvider_$type, ILegendSeries_$type]);
    XamFunnelChart.ez = DependencyProperty.i("HighlightValueDisplayMode", HighlightedValueDisplayMode_$type, XamFunnelChart.$, new PropertyMetadata(2, enumGetBox(HighlightedValueDisplayMode_$type, 0), function (a, b) { return a.ee("HighlightValueDisplayMode", b.oldValue, b.newValue); }));
    XamFunnelChart.$$p = markDep(DependencyProperty, PropertyMetadata, XamFunnelChart, 'ee', ['AllowSliceSelection:bh:er', [0, false], 'BottomEdgeWidth:bz:es', [1, 0.35], 'Brushes:ah:et', [BrushCollection.$, null], 'FastItemsSource:a2:eu', [FastItemsSource.$], 'FunnelSliceDisplay:an:ev', [FunnelSliceDisplay_$type, enumGetBox(FunnelSliceDisplay_$type, 0)], 'HighlightFastItemsSource:a3:ey', [FastItemsSource.$], 'HighlightValueOpacity:b1:e0', [1, 0.5], 'HighlightedItemsSource::ew', [IEnumerable_$type, null], 'HighlightedValueMemberPath:cs:ex', [2, null], 'InnerLabelMemberPath:cz:e1', [2, null], 'InnerLabelVisibility:fv:e2', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'IsInverted:bn:e3', [0, false], 'ItemsSource::e4', [IEnumerable_$type, null], 'LegendItemBadgeTemplate::e5', [DataTemplate.$, null], 'LegendItemTemplate::e6', [DataTemplate.$, null], 'Legend::e7', [IChartLegend_$type, null], 'LowerBezierControlPoint:fr:e8', [Point_$type, { $type: Point_$type, x: 0.5, y: 1 }], 'OuterLabelAlignment:ax:e9', [OuterLabelAlignment_$type, enumGetBox(OuterLabelAlignment_$type, 0)], 'OuterLabelMemberPath:da:fa', [2, null], 'OuterLabelVisibility:fw:fb', [Visibility_$type, enumGetBox(Visibility_$type, 1)], 'OutlineThickness:b2:fd', [1, -1], 'Outlines:ai:fc', [BrushCollection.$, null], 'SelectedSliceStyle:ft:fe', [Style.$, null], 'ToolTip:cd:ff', [4, null], 'TransitionDuration:cb:fg', [1, 0], 'UnselectedSliceStyle:fu:fh', [Style.$, null], 'UpperBezierControlPoint:fs:fi', [Point_$type, { $type: Point_$type, x: 0.5, y: 0 }], 'UseBezierCurve:bo:fj', [0, false], 'UseOuterLabelsForLegend:bp:fk', [0, false], 'UseUnselectedStyle:bq:fl', [0, false], 'ValueMemberPath:dw:fm', [2, null]]);
    return XamFunnelChart;
}(Control));
export { XamFunnelChart };
/**
 * @hidden
 */
var XamFunnelConnector = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(XamFunnelConnector, _super);
    function XamFunnelConnector(a, b) {
        var _this = _super.call(this) || this;
        _this.d = null;
        _this.b = null;
        _this.a = null;
        var c = new ServiceProvider();
        c.c("ConfigurationMessages", new MessageChannel());
        c.c("RenderingMessages", new MessageChannel());
        c.c("InteractionMessages", new MessageChannel());
        c.c("ModelUpdateMessages", new MessageChannel());
        a.av(b);
        var d = new XamFunnelController();
        d.av = a;
        d.ac = c;
        a.i = c;
        _this.b = d;
        _this.d = a;
        b.aw = c;
        _this.a = b;
        c.c("Model", _this.a);
        return _this;
    }
    Object.defineProperty(XamFunnelConnector.prototype, "e", {
        get: function () {
            return this.d;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(XamFunnelConnector.prototype, "c", {
        get: function () {
            return this.b;
        },
        enumerable: false,
        configurable: true
    });
    XamFunnelConnector.prototype.g = function () {
        this.c.av.av(this.a);
    };
    XamFunnelConnector.prototype.h = function (a) {
        this.d = a;
        var b = this.b.ac;
        this.b.ac = null;
        this.b.ac = b;
        this.d.i = b;
    };
    XamFunnelConnector.prototype.f = function () {
        if (this.d != null) {
            this.d.i = null;
        }
    };
    XamFunnelConnector.prototype.i = function () {
        this.b.dj();
    };
    XamFunnelConnector.$t = markType(XamFunnelConnector, 'XamFunnelConnector');
    return XamFunnelConnector;
}(Base));
export { XamFunnelConnector };