UNPKG

igniteui-angular-charts

Version:

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

1,552 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.f("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.