/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { Base, runOn, delegateCombine, delegateRemove, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox } from "igniteui-react-core/ES5/type";
import { RenderingContext } from "igniteui-react-core/ES5/RenderingContext";
import { DefaultTrackThumbVisual } from "./DefaultTrackThumbVisual";
import { DefaultTrackRangeVisual } from "./DefaultTrackRangeVisual";
import { DefaultTrackBarVisual } from "./DefaultTrackBarVisual";
import { DefaultTrackShadeVisual } from "./DefaultTrackShadeVisual";
import { DefaultTrackThumbCalloutVisual } from "./DefaultTrackThumbCalloutVisual";
import { FontInfo } from "igniteui-react-core/ES5/FontInfo";
import { Rect } from "igniteui-react-core/ES5/Rect";
import { TranslateTransform } from "igniteui-react-core/ES5/TranslateTransform";
import { DoubleAnimator } from "igniteui-react-core/ES5/DoubleAnimator";
import { CanvasViewRenderer } from "igniteui-react-core/ES5/CanvasViewRenderer";
import { CanvasGestureDOMEventProxy } from "igniteui-react-core/ES5/CanvasGestureDOMEventProxy";
import { FontUtil } from "igniteui-react-core/ES5/FontUtil";
import { Size } from "igniteui-react-core/ES5/Size";
import { truncate, isNaN_ } from "igniteui-react-core/ES5/number";
import { ITrackOwner_$type } from "./ITrackOwner";
import { TrackThumb } from "./TrackThumb";
import { TrackThumbRange } from "./TrackThumbRange";
import { ZoomSliderOrientation_$type } from "./ZoomSliderOrientation";
import { ZoomSliderResolvingAxisValueEventArgs } from "./ZoomSliderResolvingAxisValueEventArgs";
import { RectChangedEventArgs } from "igniteui-react-core/ES5/RectChangedEventArgs";
import { Thickness } from "igniteui-react-core/ES5/Thickness";
import { NotImplementedException } from "igniteui-react-core/ES5/NotImplementedException";
import { EasingFunctions } from "igniteui-react-core/ES5/EasingFunctions";
var ZoomSliderView = /** @class */ (function (_super) {
    tslib_1.__extends(ZoomSliderView, _super);
    function ZoomSliderView(a) {
        var _this = _super.call(this) || this;
        _this.p = false;
        _this.i = null;
        _this.h = null;
        _this.c = null;
        _this.b = null;
        _this.e = null;
        _this.d = null;
        _this.g = null;
        _this.f = null;
        _this.j = null;
        _this.u = null;
        _this.v = null;
        _this.o = null;
        _this.s = 0;
        _this.q = false;
        _this.x = 0;
        _this.w = 0;
        _this.m = null;
        _this.a = null;
        _this.t = null;
        _this.l = null;
        _this.y = -1;
        _this.r = 10;
        _this.k = 0;
        _this.j = a;
        _this.i = new DefaultTrackThumbVisual();
        _this.h = new DefaultTrackThumbVisual();
        _this.c = new DefaultTrackRangeVisual();
        _this.b = new DefaultTrackBarVisual();
        _this.e = new DefaultTrackShadeVisual();
        _this.d = new DefaultTrackShadeVisual();
        _this.g = new DefaultTrackThumbCalloutVisual();
        _this.f = new DefaultTrackThumbCalloutVisual();
        _this.m = _this.n();
        _this.aj();
        return _this;
    }
    ZoomSliderView.prototype.ak = function () {
        if (!this.p) {
            if (this.u != null) {
                this.p = true;
                this.u.setTimeout(runOn(this, this.au), 0);
            }
        }
    };
    ZoomSliderView.prototype.ah = function () {
        this.au();
    };
    ZoomSliderView.prototype.au = function () {
        if (!this.p) {
            return;
        }
        this.p = false;
        this.j.ee();
        this.ap();
    };
    ZoomSliderView.prototype.ap = function () {
        if (this.o == null) {
            return;
        }
        var a = this.j.fr.width;
        var b = this.j.fr.height;
        var c = Math.round(a * this.s);
        var d = Math.round(b * this.s);
        if (this.x != c || this.w != d) {
            this.v.setAttribute("width", c.toString());
            this.v.setAttribute("height", d.toString());
            this.v.setStyleProperty("width", a.toString() + "px");
            this.v.setStyleProperty("height", b.toString() + "px");
            this.x = truncate(Math.round(c));
            this.w = truncate(Math.round(d));
        }
        if (this.o.d && this.s != 1) {
            this.o.z();
            this.o.aa(this.s, this.s);
        }
        this.o.k(this.j.fr.left, this.j.fr.top, this.j.fr.width, this.j.fr.height);
        this.as(this.i.allPaths, this.i.translateX, this.i.translateY);
        this.as(this.h.allPaths, this.h.translateX, this.h.translateY);
        this.as(this.c.allPaths, this.c.translateX, this.c.translateY);
        this.as(this.b.allPaths, this.b.translateX, this.b.translateY);
        this.as(this.e.allPaths, this.e.translateX, this.e.translateY);
        this.as(this.d.allPaths, this.d.translateX, this.d.translateY);
        this.as(this.g.allPaths, this.g.translateX, this.g.translateY);
        this.as(this.f.allPaths, this.f.translateX, this.f.translateY);
        this.at(this.g.calloutText, this.g.textTranslateX, this.g.textTranslateY);
        this.at(this.f.calloutText, this.f.textTranslateX, this.f.textTranslateY);
        this.aq(this.b.allPaths);
        this.aq(this.c.allPaths);
        this.aq(this.e.allPaths);
        this.aq(this.d.allPaths);
        this.aq(this.i.allPaths);
        this.aq(this.h.allPaths);
        this.aq(this.g.allPaths);
        this.aq(this.f.allPaths);
        this.ar(this.g.calloutText);
        this.ar(this.f.calloutText);
        if (this.o.d && this.s != 1) {
            this.o.y();
        }
    };
    ZoomSliderView.prototype.ar = function (a) {
        if (a.j != null) {
            this.o.z();
        }
        this.o.j(a.j);
        this.o.w(a);
        if (a.j != null) {
            this.o.y();
        }
    };
    ZoomSliderView.prototype.aq = function (a) {
        for (var b = 0; b < a.count; b++) {
            var c = a.item(b);
            if (c.j != null) {
                this.o.z();
            }
            this.o.j(c.j);
            this.o.s(c);
            if (c.j != null) {
                this.o.y();
            }
        }
    };
    ZoomSliderView.prototype.at = function (a, b, c) {
        if (a.j == null) {
            a.j = new TranslateTransform();
        }
        var d = a.j;
        d.j = b;
        d.k = c;
    };
    ZoomSliderView.prototype.as = function (a, b, c) {
        for (var d = 0; d < a.count; d++) {
            var e = a.item(d);
            if (e.j == null) {
                e.j = new TranslateTransform();
            }
            var f = e.j;
            f.j = b;
            f.k = c;
        }
    };
    ZoomSliderView.prototype.aj = function () {
        var _this = this;
        if (this.t == null) {
            this.t = function (a) {
                var b = _this.j.bl;
                var c = _this.j.a5;
                if (!isNaN_(b) && b != 0) {
                    return;
                }
                if (window.devicePixelRatio != undefined && window.devicePixelRatio != c) {
                    _this.j.a5 = window.devicePixelRatio;
                }
            };
            window.addEventListener("resize", this.t, false);
        }
        this.t(null);
    };
    ZoomSliderView.prototype.an = function (a) {
        var _this = this;
        if (a == null) {
            this.v = null;
            this.u = null;
            this.o = null;
            this.z();
            if (this.t != null) {
                window.removeEventListener("resize", this.t, false);
                this.t = null;
            }
            return;
        }
        this.s = (isNaN_(this.j.bl) ? this.j.a5 : this.j.bl);
        var b = a;
        this.u = b;
        this.j.l.u(this.u);
        this.u.rootWrapper.addClass("ui-zoomslider-container");
        var c = this.s;
        var d = Math.round(b.rootWrapper.width());
        var e = Math.round(b.rootWrapper.height());
        var f = d * c;
        var g = e * c;
        this.u.rootWrapper.setStyleProperty("position", "relative");
        var h = this.u.createElement("canvas");
        h.setStyleProperty("position", "absolute");
        this.u.append(h);
        this.x = truncate(Math.round(f));
        this.w = truncate(Math.round(g));
        h.setAttribute("width", f.toString());
        h.setAttribute("height", g.toString());
        h.setStyleProperty("width", d.toString() + "px");
        h.setStyleProperty("height", e.toString() + "px");
        this.v = h;
        var i = this.u.get2DCanvasContext(this.v);
        this.o = new RenderingContext(new CanvasViewRenderer(), i);
        this.o.ac(this.m);
        this.z();
        this.a = new CanvasGestureDOMEventProxy(this.u.rootWrapper, this.u, false);
        var j = this.a;
        j.onContactStarted = delegateCombine(j.onContactStarted, runOn(this, this.ag));
        var k = this.a;
        k.onContactMoved = delegateCombine(k.onContactMoved, runOn(this, this.af));
        var l = this.a;
        l.onContactCompleted = delegateCombine(l.onContactCompleted, runOn(this, this.ae));
        this.a.ai = function (m) { return _this.j.fp.containsPoint(m); };
        this.j.dl(0, 0, d, e);
        this.r = FontUtil.getCurrentFontHeight(this.u, this.m);
        this.j.trackDirty();
    };
    ZoomSliderView.prototype.ae = function (a, b) {
        this.j.df(a);
    };
    ZoomSliderView.prototype.af = function (a, b) {
        this.j.dg(a);
    };
    ZoomSliderView.prototype.ag = function (a, b) {
        this.j.af(a);
    };
    ZoomSliderView.prototype.z = function () {
        if (this.a != null) {
            var a = this.a;
            a.onContactStarted = delegateRemove(a.onContactStarted, runOn(this, this.ag));
            var b = this.a;
            b.onContactMoved = delegateRemove(b.onContactMoved, runOn(this, this.af));
            var c = this.a;
            c.onContactCompleted = delegateRemove(c.onContactCompleted, runOn(this, this.ae));
            this.a.ai = null;
            this.a.an();
        }
    };
    ZoomSliderView.prototype.ao = function () {
    };
    ZoomSliderView.prototype.al = function () {
        var a = Math.round(this.u.rootWrapper.width());
        var b = Math.round(this.u.rootWrapper.height());
        this.j.dl(0, 0, a, b);
        if (this.a != null) {
            this.a.bc = this.j.fr;
        }
    };
    ZoomSliderView.prototype.ai = function () {
    };
    ZoomSliderView.prototype.n = function () {
        return ((function () {
            var $ret = new FontInfo();
            $ret.n = "Verdana";
            $ret.d = 10;
            return $ret;
        })());
    };
    ZoomSliderView.prototype.av = function (a, b, c) {
        if (a.ak != b) {
            a.ak = b;
        }
        if (this.l != c) {
            this.l = c;
            this.m = this.l;
            this.r = FontUtil.getCurrentFontHeight(this.u, this.m);
            this.o.ac(this.l);
            this.j.trackDirty();
        }
    };
    ZoomSliderView.prototype.ab = function () {
        if (this.k != 3) {
            this.k = 3;
            this.u.rootWrapper.setStyleProperty("cursor", "move");
        }
    };
    ZoomSliderView.prototype.ad = function () {
        if (this.k != 2) {
            this.k = 2;
            this.u.rootWrapper.setStyleProperty("cursor", "ns-resize");
        }
    };
    ZoomSliderView.prototype.aa = function () {
        if (this.k != 0) {
            this.k = 0;
            this.u.rootWrapper.setStyleProperty("cursor", "inherit");
        }
    };
    ZoomSliderView.prototype.ac = function () {
        if (this.k != 1) {
            this.k = 1;
            this.u.rootWrapper.setStyleProperty("cursor", "ew-resize");
        }
    };
    ZoomSliderView.prototype.aw = function (a) {
        var b = this.r;
        var c = this.o.f(a.ak);
        return new Size(1, c, b);
    };
    ZoomSliderView.prototype.am = function () {
        this.s = this.j.a5;
        this.ak();
    };
    ZoomSliderView.$t = markType(ZoomSliderView, 'ZoomSliderView');
    return ZoomSliderView;
}(Base));
export { ZoomSliderView };
var ZoomSlider = /** @class */ (function (_super) {
    tslib_1.__extends(ZoomSlider, _super);
    function ZoomSlider() {
        var _this = _super.call(this) || this;
        _this.b = null;
        _this.a = null;
        _this.c = null;
        _this.g = null;
        _this.propertyChanged = null;
        _this.bq = 500;
        _this.ay = 1;
        _this.a0 = NaN;
        _this.ah = 1;
        _this.resolvingAxisValue = null;
        _this.fo = new Rect(0, 0, 0, 1, 1);
        _this.x = false;
        _this.ag = false;
        _this.windowRectChanged = null;
        _this.i = 0;
        _this.h = 0;
        _this.fn = null;
        _this.fm = null;
        _this.ft = new Thickness(1, 5, 5, 5, 5);
        _this.fr = null;
        _this.fp = null;
        _this.fq = null;
        _this.az = 1E-05;
        _this.a2 = 0;
        _this.am = 0;
        _this.a4 = 5;
        _this.a3 = 5;
        _this.ai = 16;
        _this.d = 0;
        _this.ev = null;
        _this.aw = 1;
        _this.aq = 1;
        _this.en = null;
        _this.ew = null;
        _this.eo = null;
        _this.ex = null;
        _this.ep = null;
        _this.ax = 10;
        _this.ar = 10;
        _this.av = 22;
        _this.ap = 22;
        _this.et = null;
        _this.eu = null;
        _this.au = 1;
        _this.el = null;
        _this.em = null;
        _this.ao = 1;
        _this.eg = null;
        _this.eh = null;
        _this.aj = 0;
        _this.ey = null;
        _this.ez = null;
        _this.a1 = 1;
        _this.e0 = null;
        _this.eq = null;
        _this.es = null;
        _this.er = null;
        _this.at = 1;
        _this.ei = null;
        _this.ek = null;
        _this.ej = null;
        _this.an = 1;
        _this.r = false;
        _this.m = null;
        _this.o = null;
        _this.k = null;
        _this.al = 0;
        _this.ak = 0;
        _this.as = 0;
        _this.q = false;
        _this.h = 6;
        _this.fr = Rect.empty;
        _this.fp = Rect.empty;
        _this.fq = Rect.empty;
        _this.g = new ZoomSliderView(_this);
        _this.m = _this.g.n();
        _this.b = new TrackThumb();
        _this.b.d = 0;
        _this.a = new TrackThumb();
        _this.a.d = 1;
        _this.c = new TrackThumbRange();
        _this.c.f = _this.b;
        _this.c.e = _this.a;
        _this.b.i = 0;
        _this.a.i = 1;
        _this.c.r = 1;
        _this.c.n = 0.5;
        _this.c.m = 0;
        _this.c.l = 1;
        _this.b.f = _this.c;
        _this.a.f = _this.c;
        _this.c.f = _this.b;
        _this.c.e = _this.a;
        _this.b.b = _this;
        _this.a.b = _this;
        _this.c.b = _this;
        _this.k = new DoubleAnimator(0, 1, _this.br);
        var a = _this.k;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(_this, _this.c3));
        _this.k.b = EasingFunctions.exponentialEase;
        return _this;
    }
    Object.defineProperty(ZoomSlider.prototype, "br", {
        get: function () {
            return this.bq;
        },
        set: function (a) {
            var b = this.bq;
            this.bq = a;
            if (b != this.bq) {
                this.dj("PanTransitionDuration", b, this.bq);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bj", {
        get: function () {
            return this.ay;
        },
        set: function (a) {
            var b = this.ay;
            this.ay = a;
            if (b != this.ay) {
                this.dj("MaxZoomWidth", b, this.ay);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bl", {
        get: function () {
            return this.a0;
        },
        set: function (a) {
            var b = this.a0;
            this.a0 = a;
            if (b != this.a0) {
                this.dj("PixelScalingRatio", b, this.a0);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a5", {
        get: function () {
            return this.ah;
        },
        set: function (a) {
            var b = this.ah;
            this.ah = a;
            if (b != this.ah) {
                this.dj("ActualPixelScalingRatio", b, this.ah);
            }
        },
        enumerable: true,
        configurable: true
    });
    ZoomSlider.prototype.dl = function (a, b, c, d) {
        this.fr = new Rect(0, a, b, c, d);
        if (this.e == 0) {
            var e = Math.max(0, this.fr.width - (this.bn + this.a8));
            this.fp = new Rect(0, this.fr.left + this.bn, this.fr.top, e, this.fr.height);
            var f = Math.max(0, this.fp.width - (this.bp + this.bo));
            this.fq = new Rect(0, this.fp.left + this.bp, this.fp.top, f, this.fp.height - this.a6);
        }
        else {
            this.fp = new Rect(0, this.fr.left, this.fr.top + this.bn, this.fr.width, this.fr.height - (this.bn + this.a8));
            this.fq = new Rect(0, this.fp.left, this.fp.top + this.bp, this.fp.width - this.a6, this.fp.height - (this.bp + this.bo));
        }
        this.trackDirty();
    };
    ZoomSlider.prototype.ee = function () {
        if (!this.q) {
            return;
        }
        this.q = false;
        var a = this.g.i;
        var b = this.g.h;
        var c = this.g.c;
        var d = this.g.b;
        var e = this.g.e;
        var f = this.g.d;
        if (this.ac) {
            var g = this.bt();
            var h = this.bs();
            this.d0(g, this.b);
            this.dz(h, this.b.i);
            this.d0(h, this.a);
            this.dz(h, this.a.i);
        }
        else {
            this.ed(a, this.b);
            this.ed(b, this.a);
        }
        if (this.aa) {
        }
        else {
            this.eb(c, this.c);
        }
        if (this.z) {
        }
        else {
            this.dx(d);
        }
        if (this.ab) {
        }
        else {
            this.d7(e);
            this.d2(f);
        }
        this.ef();
    };
    Object.defineProperty(ZoomSlider.prototype, "fs", {
        get: function () {
            return this.fo;
        },
        set: function (a) {
            var b = this.fo;
            this.fo = a;
            if (Rect.l_op_Inequality(b, this.fo)) {
                this.dj("WindowRect", b, this.fo);
            }
        },
        enumerable: true,
        configurable: true
    });
    ZoomSlider.prototype.ef = function () {
        var a = this.fs.width;
        var b = this.fs.height;
        var c = this.fs.left;
        var d = this.fs.top;
        var e = c;
        var f = d;
        var g = a;
        var h = b;
        if (this.e == 0) {
            e = this.b.i;
            g = this.c.r;
        }
        else {
            f = this.b.i;
            h = this.c.r;
        }
        if (e != c || f != d || g != a || h != b) {
            this.x = true;
            var i = this.fs;
            this.fs = new Rect(0, e, f, g, h);
            this.dn(i, this.fs);
            this.x = false;
        }
    };
    ZoomSlider.prototype.dn = function (a, b) {
        if (this.ag) {
            return;
        }
        if (this.windowRectChanged != null) {
            this.windowRectChanged(this, new RectChangedEventArgs(a, b));
        }
    };
    ZoomSlider.prototype.df = function (a) {
        if (this.h != 6) {
            this.g.ao();
        }
        this.i = this.j(a);
        this.h = 6;
        this.c6();
        this.c7();
    };
    ZoomSlider.prototype.c7 = function () {
        this.g.g.isVisible = false;
        this.g.ak();
    };
    ZoomSlider.prototype.c6 = function () {
        this.g.f.isVisible = false;
        this.g.ak();
    };
    ZoomSlider.prototype.dh = function (a, b) {
        this.i = this.j(a);
    };
    ZoomSlider.prototype.af = function (a) {
        this.i = this.j(a);
        if (this.i == 6) {
            return false;
        }
        this.c4();
        if (this.ad(this.i)) {
            this.dv(a, this.i);
            this.g.ai();
            return true;
        }
        if (this.y(this.i)) {
            return this.ae(a, this.i);
        }
        return false;
    };
    ZoomSlider.prototype.ae = function (a, b) {
        switch (b) {
            case 5:
            case 2:
            case 3:
                this.dq(a);
                return true;
        }
        return false;
    };
    ZoomSlider.prototype.dq = function (a) {
        var b;
        if (this.e == 0) {
            b = (a.x - this.fq.left) / this.fq.width;
        }
        else {
            b = (a.y - this.fq.top) / this.fq.height;
        }
        if (b < 0 || b > 1) {
            return;
        }
        if (b + (this.c.r / 2) > 1) {
            b = 1 - (this.c.r / 2);
        }
        if (b - (this.c.r / 2) < 0) {
            b = (this.c.r / 2);
        }
        if (this.br > 0) {
            this.dw(b);
        }
        else {
            this.c.n = b;
        }
    };
    ZoomSlider.prototype.dv = function (a, b) {
        this.h = b;
        this.fn = a;
        this.fm = a;
    };
    ZoomSlider.prototype.ad = function (a) {
        switch (a) {
            case 0:
            case 1:
            case 4: return true;
        }
        return false;
    };
    ZoomSlider.prototype.y = function (a) {
        switch (a) {
            case 5:
            case 2:
            case 3: return true;
        }
        return false;
    };
    ZoomSlider.prototype.dg = function (a) {
        this.i = this.j(a);
        if (this.h != 6) {
            if (this.e == 0) {
                this.db(a);
            }
            else {
                this.dk(a);
            }
        }
        else {
            this.c8();
        }
    };
    ZoomSlider.prototype.c8 = function () {
        if (this.i == 4) {
            this.g.ab();
        }
        else if (this.i == 0 || this.i == 1) {
            if (this.e == 1) {
                this.g.ad();
            }
            else {
                this.g.ac();
            }
        }
        else {
            this.g.aa();
        }
    };
    ZoomSlider.prototype.dk = function (a) {
        var b = a.y - this.fm.y;
        b = b / this.fq.height;
        this.fm = a;
        switch (this.h) {
            case 0:
                this.b.j(b);
                this.d9(this.b);
                this.c9();
                break;
            case 1:
                this.a.j(b);
                this.d4(this.a);
                this.c9();
                break;
            case 4:
                this.c.o(b);
                this.d9(this.b);
                this.d4(this.a);
                this.c9();
                break;
        }
    };
    ZoomSlider.prototype.d4 = function (a) {
        var b;
        var c;
        if (this.e == 0) {
            b = a.i;
            c = a.i * this.fq.width + this.fq.left;
            if (this.r) {
                var d_1 = b;
                if (this.resolvingAxisValue != null) {
                    var e = ((function () {
                        var $ret = new ZoomSliderResolvingAxisValueEventArgs();
                        $ret.position = b;
                        $ret.value = d_1;
                        return $ret;
                    })());
                    this.resolvingAxisValue(this, e);
                    d_1 = e.value;
                }
                this.dt(c, this.fq.top, d_1);
            }
        }
        else {
            b = a.i;
            c = a.i * this.fq.height + this.fq.top;
            if (this.r) {
                var f_1 = b;
                if (this.resolvingAxisValue != null) {
                    var g = ((function () {
                        var $ret = new ZoomSliderResolvingAxisValueEventArgs();
                        $ret.position = b;
                        $ret.value = f_1;
                        return $ret;
                    })());
                    this.resolvingAxisValue(this, g);
                    f_1 = g.value;
                }
                this.dt(c, this.fq.top, f_1);
            }
        }
    };
    ZoomSlider.prototype.dt = function (a, b, c) {
        var d = this.g.f;
        d.isVisible = true;
        var e = "";
        if (c != null) {
            e = c.toString();
        }
        this.g.av(d.calloutText, e, this.n());
        var f = this.g.aw(d.calloutText);
        var g = this.fu();
        f = new Size(1, f.width + g.c + g.d, f.height + g.e + g.b);
        var h = this.a.i * this.fq.width + this.fq.left;
        var i = this.b.i * this.fq.width + this.fq.left;
        var j = 0;
        var k = 0;
        if ((this.fr.right - h) <= f.width) {
            j = h - f.width;
        }
        else {
            j = h;
        }
        if (j < i) {
            k = this.fq.top;
        }
        else {
            k = this.fq.bottom - f.height;
        }
        d.width = f.width;
        d.height = f.height;
        d.translateX = j;
        d.translateY = k;
        d.textTranslateX = j + g.c;
        d.textTranslateY = k + g.e;
    };
    ZoomSlider.prototype.d9 = function (a) {
        var b;
        var c;
        if (this.e == 0) {
            b = a.i;
            c = a.i * this.fq.width + this.fq.left;
            if (this.r) {
                var d_2 = b;
                if (this.resolvingAxisValue != null) {
                    var e = ((function () {
                        var $ret = new ZoomSliderResolvingAxisValueEventArgs();
                        $ret.position = b;
                        $ret.value = d_2;
                        return $ret;
                    })());
                    this.resolvingAxisValue(this, e);
                    d_2 = e.value;
                }
                this.du(c, this.fq.top, d_2);
            }
        }
        else {
            b = a.i;
            c = a.i * this.fq.height + this.fq.top;
            if (this.r) {
                var f_2 = b;
                if (this.resolvingAxisValue != null) {
                    var g = ((function () {
                        var $ret = new ZoomSliderResolvingAxisValueEventArgs();
                        $ret.position = b;
                        $ret.value = f_2;
                        return $ret;
                    })());
                    this.resolvingAxisValue(this, g);
                    f_2 = g.value;
                }
                this.du(c, this.fq.top, f_2);
            }
        }
    };
    ZoomSlider.prototype.fu = function () {
        return this.ft;
    };
    ZoomSlider.prototype.du = function (a, b, c) {
        var d = this.g.g;
        d.isVisible = true;
        var e = "";
        if (c != null) {
            e = c.toString();
        }
        this.g.av(d.calloutText, e, this.n());
        var f = this.g.aw(d.calloutText);
        var g = this.fu();
        f = new Size(1, f.width + g.c + g.d, f.height + g.e + g.b);
        var h = this.b.i * this.fq.width + this.fq.left;
        var i = this.a.i * this.fq.width + this.fq.left;
        var j = 0;
        var k = 0;
        if (h >= f.width) {
            j = h - f.width;
        }
        else {
            j = h;
        }
        if (j > i) {
            k = this.fq.top;
        }
        else {
            k = this.fq.bottom - f.height;
        }
        d.width = f.width;
        d.height = f.height;
        d.translateX = j;
        d.translateY = k;
        d.textTranslateX = j + g.c;
        d.textTranslateY = k + g.e;
    };
    ZoomSlider.prototype.n = function () {
        if (this.o != null) {
            return this.o;
        }
        return this.m;
    };
    ZoomSlider.prototype.db = function (a) {
        var b = a.x - this.fm.x;
        this.fm = a;
        b = b / this.fq.width;
        switch (this.h) {
            case 0:
                this.b.j(b);
                this.d9(this.b);
                this.c9();
                break;
            case 1:
                this.a.j(b);
                this.d4(this.a);
                this.c9();
                break;
            case 4:
                this.c.o(b);
                this.d9(this.b);
                this.d4(this.a);
                this.c9();
                break;
        }
    };
    ZoomSlider.prototype.dd = function (a) {
        this.i = this.j(a);
    };
    ZoomSlider.prototype.de = function (a) {
        this.i = this.j(a);
    };
    ZoomSlider.prototype.j = function (a) {
        if (this.w(a, this.b, this.g.i)) {
            return 0;
        }
        if (this.w(a, this.a, this.g.h)) {
            return 1;
        }
        if (this.v(a, this.c, this.g.c)) {
            return 4;
        }
        if (this.u(a, this.b)) {
            return 2;
        }
        if (this.t(a, this.a)) {
            return 3;
        }
        if (this.s(a)) {
            return 5;
        }
        return 6;
    };
    ZoomSlider.prototype.s = function (a) {
        if (this.e == 0) {
            if (a.y > this.fq.bottom && a.x >= this.fq.left && a.x <= this.fq.right && a.y <= this.fp.bottom) {
                return true;
            }
        }
        else {
            if (a.x > this.fq.right && a.y >= this.fq.top && a.y <= this.fq.bottom && a.x <= this.fp.right) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.v = function (a, b, c) {
        if (this.e == 0) {
            var d = (b.n) * this.fq.width + this.fq.left;
            var e = d - c.width / 2;
            var f = d + c.width / 2;
            if (a.y >= this.fp.top && a.y <= this.fp.bottom && a.x >= e && a.x <= f) {
                return true;
            }
        }
        else {
            var g = (b.n) * this.fq.height + this.fq.top;
            var h = g - c.height / 2;
            var i = g + c.height / 2;
            if (a.x >= this.fp.left && a.x <= this.fp.right && a.y >= h && a.y <= i) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.u = function (a, b) {
        if (this.e == 0) {
            var c = b.i * this.fq.width + this.fq.left;
            if (a.y >= this.fp.top && a.x >= this.fp.left && a.x <= this.fp.right && a.x <= c && a.y <= this.fq.bottom) {
                return true;
            }
        }
        else {
            var d = b.i * this.fq.height + this.fq.top;
            if (a.y >= this.fp.top && a.x >= this.fp.left && a.x <= this.fp.right && a.y <= d && a.x <= this.fq.right) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.t = function (a, b) {
        if (this.e == 0) {
            var c = b.i * this.fq.width + this.fq.left;
            if (a.y >= this.fp.top && a.x >= this.fp.left && a.x <= this.fp.right && a.x >= c && a.y <= this.fq.bottom) {
                return true;
            }
        }
        else {
            var d = b.i * this.fq.height + this.fq.top;
            if (a.y >= this.fp.top && a.y <= this.fp.bottom && a.x >= this.fp.left && a.x <= this.fp.right && a.y >= d && a.x <= this.fq.right) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.w = function (a, b, c) {
        if (this.e == 0) {
            var d = b.i * this.fq.width + this.fq.left;
            var e = this.fq.top + this.fq.height / 2;
            var f = new Rect(0, d - c.width / 2, e - c.height / 2, c.width, c.height);
            if (f.containsPoint(a)) {
                return true;
            }
        }
        else {
            var g = b.i * this.fq.height + this.fq.top;
            var h = this.fq.left + this.fq.width / 2;
            var i = new Rect(0, h - c.width / 2, g - c.height / 2, c.width, c.height);
            if (i.containsPoint(a)) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.eb = function (a, b) {
        if (this.e == 0) {
            a.orientation = this.e;
            a.width = Math.max(15, this.fq.width * b.r);
            a.height = this.a6;
            a.translateX = (this.fq.left + this.fq.width * b.n);
            a.translateY = this.fq.bottom + this.a6 / 2;
        }
        else {
            a.orientation = this.e;
            a.height = Math.max(15, this.fq.height * b.r);
            a.width = this.a6;
            a.translateY = (this.fq.top + this.fq.height * b.n);
            a.translateX = this.fq.right + this.a6 / 2;
        }
    };
    ZoomSlider.prototype.d2 = function (a) {
        var b = this.a.i;
        if (this.e == 0) {
            var c = this.fq.left + b * this.fq.width;
            a.height = this.fq.height;
            a.translateX = c + (this.fp.right - c) / 2;
            a.translateY = this.fq.top + this.fq.height / 2;
            a.width = (this.fp.right - c);
            a.orientation = 1;
        }
        else {
            var d = this.fq.top + b * this.fq.height;
            a.width = this.fq.width;
            a.translateY = d + (this.fp.bottom - d) / 2;
            a.translateX = this.fp.left + this.fq.width / 2;
            a.height = (this.fp.bottom - d);
            a.orientation = 3;
        }
    };
    ZoomSlider.prototype.d7 = function (a) {
        var b = this.b.i;
        if (this.e == 0) {
            var c = this.fq.left + b * this.fq.width;
            a.height = this.fq.height;
            a.translateX = c - (c - this.fp.left) / 2;
            a.translateY = this.fq.top + this.fq.height / 2;
            a.width = c - this.fp.left;
            a.orientation = 0;
        }
        else {
            var d = this.fq.top + b * this.fq.height;
            a.width = this.fq.width;
            a.translateY = d - (d - this.fp.top) / 2;
            a.translateX = this.fp.left + this.fq.width / 2;
            a.height = d - this.fp.top;
            a.orientation = 2;
        }
    };
    ZoomSlider.prototype.dx = function (a) {
        if (this.e == 0) {
            a.height = this.a6;
            a.width = this.fq.width;
            a.translateX = this.fq.left + this.fq.width / 2;
            a.translateY = this.fp.bottom - this.a6 / 2;
        }
        else {
            a.width = this.a6;
            a.height = this.fq.height;
            a.translateY = this.fq.top + this.fq.height / 2;
            a.translateX = this.fp.right - this.a6 / 2;
        }
    };
    ZoomSlider.prototype.ed = function (a, b) {
        if (this.e == 0) {
            a.orientation = this.e;
            a.translateX = this.fq.left + this.fq.width * b.i;
            a.translateY = this.fq.top + this.fq.height / 2;
        }
        else {
            a.orientation = this.e;
            a.translateY = this.fq.top + this.fq.height * b.i;
            a.translateX = this.fq.left + this.fq.width / 2;
        }
    };
    ZoomSlider.prototype.d0 = function (a, b) {
    };
    ZoomSlider.prototype.dz = function (a, b) {
    };
    ZoomSlider.prototype.bs = function () {
        throw new NotImplementedException(0);
    };
    ZoomSlider.prototype.bt = function () {
        throw new NotImplementedException(0);
    };
    Object.defineProperty(ZoomSlider.prototype, "bk", {
        get: function () {
            return this.az;
        },
        set: function (a) {
            var b = this.az;
            this.az = a;
            if (b != this.az) {
                this.dj("MinZoomWidth", b, this.az);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bn", {
        get: function () {
            return this.a2;
        },
        set: function (a) {
            var b = this.a2;
            this.a2 = a;
            if (b != this.a2) {
                this.dj("StartInset", b, this.a2);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a8", {
        get: function () {
            return this.am;
        },
        set: function (a) {
            var b = this.am;
            this.am = a;
            if (b != this.am) {
                this.dj("EndInset", b, this.am);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bp", {
        get: function () {
            return this.a4;
        },
        set: function (a) {
            var b = this.a4;
            this.a4 = a;
            if (b != this.a4) {
                this.dj("TrackStartInset", b, this.a4);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bo", {
        get: function () {
            return this.a3;
        },
        set: function (a) {
            var b = this.a3;
            this.a3 = a;
            if (b != this.a3) {
                this.dj("TrackEndInset", b, this.a3);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a6", {
        get: function () {
            return this.ai;
        },
        set: function (a) {
            var b = this.ai;
            this.ai = a;
            if (b != this.ai) {
                this.dj("BarExtent", b, this.ai);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            var b = this.d;
            this.d = a;
            if (b != this.d) {
                this.dj("Orientation", enumGetBox(ZoomSliderOrientation_$type, b), enumGetBox(ZoomSliderOrientation_$type, this.d));
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fg", {
        get: function () {
            return this.ev;
        },
        set: function (a) {
            var b = this.ev;
            this.ev = a;
            if (b != this.ev) {
                this.dj("LowerThumbBrush", b, this.ev);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bh", {
        get: function () {
            return this.aw;
        },
        set: function (a) {
            var b = this.aw;
            this.aw = a;
            if (b != this.aw) {
                this.dj("LowerThumbStrokeThickness", b, this.aw);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bc", {
        get: function () {
            return this.aq;
        },
        set: function (a) {
            var b = this.aq;
            this.aq = a;
            if (b != this.aq) {
                this.dj("HigherThumbStrokeThickness", b, this.aq);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e8", {
        get: function () {
            return this.en;
        },
        set: function (a) {
            var b = this.en;
            this.en = a;
            if (b != this.en) {
                this.dj("HigherThumbBrush", b, this.en);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fh", {
        get: function () {
            return this.ew;
        },
        set: function (a) {
            var b = this.ew;
            this.ew = a;
            if (b != this.ew) {
                this.dj("LowerThumbOutline", b, this.ew);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e9", {
        get: function () {
            return this.eo;
        },
        set: function (a) {
            var b = this.eo;
            this.eo = a;
            if (b != this.eo) {
                this.dj("HigherThumbOutline", b, this.eo);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fi", {
        get: function () {
            return this.ex;
        },
        set: function (a) {
            var b = this.ex;
            this.ex = a;
            if (b != this.ex) {
                this.dj("LowerThumbRidgesBrush", b, this.ex);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fa", {
        get: function () {
            return this.ep;
        },
        set: function (a) {
            var b = this.ep;
            this.ep = a;
            if (b != this.ep) {
                this.dj("HigherThumbRidgesBrush", b, this.ep);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bi", {
        get: function () {
            return this.ax;
        },
        set: function (a) {
            var b = this.ax;
            this.ax = a;
            if (b != this.ax) {
                this.dj("LowerThumbWidth", b, this.ax);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bd", {
        get: function () {
            return this.ar;
        },
        set: function (a) {
            var b = this.ar;
            this.ar = a;
            if (b != this.ar) {
                this.dj("HigherThumbWidth", b, this.ar);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bg", {
        get: function () {
            return this.av;
        },
        set: function (a) {
            var b = this.av;
            this.av = a;
            if (b != this.av) {
                this.dj("LowerThumbHeight", b, this.av);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bb", {
        get: function () {
            return this.ap;
        },
        set: function (a) {
            var b = this.ap;
            this.ap = a;
            if (b != this.ap) {
                this.dj("HigherThumbHeight", b, this.ap);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fe", {
        get: function () {
            return this.et;
        },
        set: function (a) {
            var b = this.et;
            this.et = a;
            if (b != this.et) {
                this.dj("LowerShadeBrush", b, this.et);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ff", {
        get: function () {
            return this.eu;
        },
        set: function (a) {
            var b = this.eu;
            this.eu = a;
            if (b != this.eu) {
                this.dj("LowerShadeOutline", b, this.eu);
            }
        },
        enumerable: true,
        configurable: true
    });
    ZoomSlider.prototype.destroy = function () {
        this.provideContainer(null);
    };
    Object.defineProperty(ZoomSlider.prototype, "bf", {
        get: function () {
            return this.au;
        },
        set: function (a) {
            var b = this.au;
            this.au = a;
            if (b != this.au) {
                this.dj("LowerShadeStrokeThickness", b, this.au);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e6", {
        get: function () {
            return this.el;
        },
        set: function (a) {
            var b = this.el;
            this.el = a;
            if (b != this.el) {
                this.dj("HigherShadeBrush", b, this.el);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e7", {
        get: function () {
            return this.em;
        },
        set: function (a) {
            var b = this.em;
            this.em = a;
            if (b != this.em) {
                this.dj("HigherShadeOutline", b, this.em);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ba", {
        get: function () {
            return this.ao;
        },
        set: function (a) {
            var b = this.ao;
            this.ao = a;
            if (b != this.ao) {
                this.dj("HigherShadeStrokeThickness", b, this.ao);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e1", {
        get: function () {
            return this.eg;
        },
        set: function (a) {
            var b = this.eg;
            this.eg = a;
            if (b != this.eg) {
                this.dj("BarBrush", b, this.eg);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e2", {
        get: function () {
            return this.eh;
        },
        set: function (a) {
            var b = this.eh;
            this.eh = a;
            if (b != this.eh) {
                this.dj("BarOutline", b, this.eh);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a7", {
        get: function () {
            return this.aj;
        },
        set: function (a) {
            var b = this.aj;
            this.aj = a;
            if (b != this.aj) {
                this.dj("BarStrokeThickness", b, this.aj);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fj", {
        get: function () {
            return this.ey;
        },
        set: function (a) {
            var b = this.ey;
            this.ey = a;
            if (b != this.ey) {
                this.dj("RangeThumbBrush", b, this.ey);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fk", {
        get: function () {
            return this.ez;
        },
        set: function (a) {
            var b = this.ez;
            this.ez = a;
            if (b != this.ez) {
                this.dj("RangeThumbOutline", b, this.ez);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bm", {
        get: function () {
            return this.a1;
        },
        set: function (a) {
            var b = this.a1;
            this.a1 = a;
            if (b != this.a1) {
                this.dj("RangeThumbStrokeThickness", b, this.a1);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fl", {
        get: function () {
            return this.e0;
        },
        set: function (a) {
            var b = this.e0;
            this.e0 = a;
            if (b != this.e0) {
                this.dj("RangeThumbRidgesBrush", b, this.e0);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fb", {
        get: function () {
            return this.eq;
        },
        set: function (a) {
            var b = this.eq;
            this.eq = a;
            if (b != this.eq) {
                this.dj("LowerCalloutBrush", b, this.eq);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fd", {
        get: function () {
            return this.es;
        },
        set: function (a) {
            var b = this.es;
            this.es = a;
            if (b != this.es) {
                this.dj("LowerCalloutTextColor", b, this.es);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fc", {
        get: function () {
            return this.er;
        },
        set: function (a) {
            var b = this.er;
            this.er = a;
            if (b != this.er) {
                this.dj("LowerCalloutOutline", b, this.er);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "be", {
        get: function () {
            return this.at;
        },
        set: function (a) {
            var b = this.at;
            this.at = a;
            if (b != this.at) {
                this.dj("LowerCalloutStrokeThickness", b, this.at);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e3", {
        get: function () {
            return this.ei;
        },
        set: function (a) {
            var b = this.ei;
            this.ei = a;
            if (b != this.ei) {
                this.dj("HigherCalloutBrush", b, this.ei);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e5", {
        get: function () {
            return this.ek;
        },
        set: function (a) {
            var b = this.ek;
            this.ek = a;
            if (b != this.ek) {
                this.dj("HigherCalloutTextColor", b, this.ek);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e4", {
        get: function () {
            return this.ej;
        },
        set: function (a) {
            var b = this.ej;
            this.ej = a;
            if (b != this.ej) {
                this.dj("HigherCalloutOutline", b, this.ej);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a9", {
        get: function () {
            return this.an;
        },
        set: function (a) {
            var b = this.an;
            this.an = a;
            if (b != this.an) {
                this.dj("HigherCalloutStrokeThickness", b, this.an);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ac", {
        get: function () {
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "aa", {
        get: function () {
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "z", {
        get: function () {
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ab", {
        get: function () {
            return false;
        },
        enumerable: true,
        configurable: true
    });
    ZoomSlider.prototype.dj = function (a, b, c) {
        this.dr(a, b, c);
        if (this.propertyChanged != null) {
            this.propertyChanged(this, new PropertyChangedEventArgs(a));
        }
    };
    ZoomSlider.prototype.dr = function (a, b, c) {
        switch (a) {
            case "PixelScalingRatio":
                this.a5 = this.bl;
                break;
            case "ActualPixelScalingRatio":
                if (this.g != null) {
                    this.g.am();
                }
                break;
            case "Orientation":
                this.di();
                this.trackDirty();
                break;
            case "TrackStartInset":
            case "TrackEndInset":
            case "StartInset":
            case "EndInset":
                this.dc();
                this.trackDirty();
                break;
            case "MaxZoomWidth":
            case "MinZoomWidth":
                this.dp();
                this.trackDirty();
                break;
            case "WindowRect":
                if (!this.x) {
                    this.ag = true;
                    this.dm();
                    this.trackDirty();
                    this.c9();
                    this.ag = false;
                }
                break;
            case "LowerThumbBrush":
            case "LowerThumbOutline":
            case "LowerThumbRidgesBrush":
            case "LowerThumbStrokeThickness":
                this.ea();
                this.g.ak();
                break;
            case "LowerThumbWidth":
            case "LowerThumbHeight":
                this.g.i.width = this.bi;
                this.g.i.height = this.bg;
                this.trackDirty();
                break;
            case "HigherThumbBrush":
            case "HigherThumbOutline":
            case "HigherThumbRidgesBrush":
            case "HigherThumbStrokeThickness":
                this.d5();
                this.g.ak();
                break;
            case "HigherThumbWidth":
            case "HigherThumbHeight":
                this.g.i.width = this.bi;
                this.g.i.height = this.bg;
                this.trackDirty();
                break;
            case "LowerShadeBrush":
            case "LowerShadeOutline":
            case "LowerShadeStrokeThickness":
                this.d8();
                this.g.ak();
                break;
            case "HigherShadeBrush":
            case "HigherShadeOutline":
            case "HigherShadeStrokeThickness":
                this.d3();
                this.g.ak();
                break;
            case "RangeThumbBrush":
            case "RangeThumbOutline":
            case "RangeThumbRidgesBrush":
            case "RangeThumbStrokeThickness":
                this.ec();
                this.g.ak();
                break;
            case "BarBrush":
            case "BarOutline":
            case "BarStrokeThickness":
                this.dy();
                this.g.ak();
                break;
            case "LowerCalloutBrush":
            case "LowerCalloutOutline":
            case "LowerCalloutTextColor":
            case "LowerCalloutStrokeThickness":
                this.d6();
                this.g.ak();
                break;
            case "HigherCalloutBrush":
            case "HigherCalloutOutline":
            case "HigherCalloutTextColor":
            case "HigherCalloutStrokeThickness":
                this.d1();
                this.g.ak();
                break;
        }
    };
    ZoomSlider.prototype.dy = function () {
        var a = this.g.b;
        if (this.e1 == null) {
            a.barBox._fill = a.getBarBoxDefaultBrush();
        }
        else {
            a.barBox._fill = this.e1;
        }
        if (this.e2 == null) {
            a.barBox._stroke = a.getBarBoxDefaultOutline();
        }
        else {
            a.barBox._stroke = this.e2;
        }
        if (this.a7 == NaN) {
            a.barBox.ac = a.getBarBoxDefaultStrokeThickness();
        }
        else {
            a.barBox.ac = this.a7;
        }
    };
    ZoomSlider.prototype.d6 = function () {
        var a = this.g.g;
        if (this.fb == null) {
            a.calloutBox._fill = a.getCalloutBoxDefaultBrush();
        }
        else {
            a.calloutBox._fill = this.fb;
        }
        if (this.fc == null) {
            a.calloutBox._stroke = a.getCalloutBoxDefaultStroke();
        }
        else {
            a.calloutBox._stroke = this.fc;
        }
        if (this.fd == null) {
            a.calloutText.am = a.getCalloutTextDefaultBrush();
        }
        else {
            a.calloutText.am = this.fd;
        }
        if (this.be == NaN) {
            a.calloutBox.ac = a.getCalloutBoxDefaultStrokeThickness();
        }
        else {
            a.calloutBox.ac = this.be;
        }
    };
    ZoomSlider.prototype.d1 = function () {
        var a = this.g.f;
        if (this.e3 == null) {
            a.calloutBox._fill = a.getCalloutBoxDefaultBrush();
        }
        else {
            a.calloutBox._fill = this.e3;
        }
        if (this.e4 == null) {
            a.calloutBox._stroke = a.getCalloutBoxDefaultStroke();
        }
        else {
            a.calloutBox._stroke = this.e4;
        }
        if (this.e5 == null) {
            a.calloutText.am = a.getCalloutTextDefaultBrush();
        }
        else {
            a.calloutText.am = this.e5;
        }
        if (this.a9 == NaN) {
            a.calloutBox.ac = a.getCalloutBoxDefaultStrokeThickness();
        }
        else {
            a.calloutBox.ac = this.a9;
        }
    };
    ZoomSlider.prototype.ea = function () {
        var a = this.g.i;
        if (this.fg == null) {
            a.thumbBox._fill = a.getThumbBoxDefaultBrush();
        }
        else {
            a.thumbBox._fill = this.fg;
        }
        if (this.fh == null) {
            a.thumbBox._stroke = a.getThumbBoxDefaultStroke();
        }
        else {
            a.thumbBox._stroke = this.fh;
        }
        if (this.fi == null) {
            a.thumbRidges._stroke = a.getThumbRidgesDefaultStroke();
        }
        else {
            a.thumbRidges._stroke = this.fi;
        }
        if (this.bh == NaN) {
            a.thumbBox.ac = a.getThumbBoxDefaultStrokeThickness();
        }
        else {
            a.thumbBox.ac = this.bh;
        }
    };
    ZoomSlider.prototype.ec = function () {
        var a = this.g.c;
        if (this.fj == null) {
            a.thumbBox._fill = a.getThumbBoxDefaultBrush();
        }
        else {
            a.thumbBox._fill = this.fj;
        }
        if (this.fk == null) {
            a.thumbBox._stroke = a.getThumbBoxDefaultStroke();
        }
        else {
            a.thumbBox._stroke = this.fk;
        }
        if (this.fl == null) {
            a.thumbRidges._stroke = a.getThumbRidgesDefaultStroke();
        }
        else {
            a.thumbRidges._stroke = this.fl;
        }
        if (this.bm == NaN) {
            a.thumbBox.ac = a.getThumbBoxDefaultStrokeThickness();
        }
        else {
            a.thumbBox.ac = this.bm;
        }
    };
    ZoomSlider.prototype.d8 = function () {
        var a = this.g.e;
        if (this.fe == null) {
            a.shadeBox._fill = a.getShadeBoxDefaultBrush();
        }
        else {
            a.shadeBox._fill = this.fe;
        }
        if (this.ff == null) {
            a.shadeOutline._stroke = a.getShadeOutlineDefaultBrush();
        }
        else {
            a.shadeOutline._stroke = this.ff;
        }
        if (this.bf == NaN) {
            a.shadeOutline.ac = a.getShadeOutlineDefaultStrokeThickness();
        }
        else {
            a.shadeOutline.ac = this.bf;
        }
    };
    ZoomSlider.prototype.d3 = function () {
        var a = this.g.d;
        if (this.e6 == null) {
            a.shadeBox._fill = a.getShadeBoxDefaultBrush();
        }
        else {
            a.shadeBox._fill = this.e6;
        }
        if (this.e7 == null) {
            a.shadeOutline._stroke = a.getShadeOutlineDefaultBrush();
        }
        else {
            a.shadeOutline._stroke = this.e7;
        }
        if (this.ba == NaN) {
            a.shadeOutline.ac = a.getShadeOutlineDefaultStrokeThickness();
        }
        else {
            a.shadeOutline.ac = this.ba;
        }
    };
    ZoomSlider.prototype.d5 = function () {
        var a = this.g.h;
        if (this.e8 == null) {
            a.thumbBox._fill = a.getThumbBoxDefaultBrush();
        }
        else {
            a.thumbBox._fill = this.e8;
        }
        if (this.e9 == null) {
            a.thumbBox._stroke = a.getThumbBoxDefaultStroke();
        }
        else {
            a.thumbBox._stroke = this.e9;
        }
        if (this.fa == null) {
            a.thumbRidges._stroke = a.getThumbRidgesDefaultStroke();
        }
        else {
            a.thumbRidges._stroke = this.fa;
        }
        if (this.bc == NaN) {
            a.thumbBox.ac = a.getThumbBoxDefaultStrokeThickness();
        }
        else {
            a.thumbBox.ac = this.bc;
        }
    };
    ZoomSlider.prototype.dm = function () {
        if (this.x) {
            return;
        }
        if (this.e == 0) {
            this.b.i = this.fs.left;
            this.a.i = this.fs.right;
            this.c.r = this.fs.width;
            this.c.n = this.fs.left + this.fs.width / 2;
        }
        else {
            this.b.i = this.fs.top;
            this.a.i = this.fs.bottom;
            this.c.r = this.fs.height;
            this.c.n = this.fs.top + this.fs.height / 2;
        }
    };
    ZoomSlider.prototype.dp = function () {
        this.c.m = this.bk;
        this.c.l = this.bj;
    };
    ZoomSlider.prototype.dc = function () {
        if (this.fr.isEmpty) {
            return;
        }
        this.dl(this.fr.left, this.fr.top, this.fr.width, this.fr.height);
    };
    ZoomSlider.prototype.di = function () {
        if (this.e == 0) {
            this.g.i.width = this.bi;
            this.g.i.height = this.bg;
            this.g.h.width = this.bd;
            this.g.h.height = this.bb;
        }
        else {
            this.g.i.height = this.bi;
            this.g.i.width = this.bg;
            this.g.h.height = this.bd;
            this.g.h.width = this.bb;
        }
        if (this.fr.isEmpty) {
            return;
        }
        this.dl(this.fr.left, this.fr.top, this.fr.width, this.fr.height);
    };
    ZoomSlider.prototype.provideContainer = function (a) {
        this.g.an(a);
    };
    ZoomSlider.prototype.notifySizeChanged = function () {
        this.g.al();
    };
    Object.defineProperty(ZoomSlider.prototype, "l", {
        get: function () {
            return this.k;
        },
        enumerable: true,
        configurable: true
    });
    ZoomSlider.prototype.dw = function (a) {
        this.al = a;
        this.ak = this.c.n;
        this.as = this.ak;
        this.k.v();
    };
    ZoomSlider.prototype.c4 = function () {
        if (this.k.f()) {
            this.k.w();
        }
    };
    ZoomSlider.prototype.c3 = function (a, b) {
        var c = this.k.o;
        var d = this.ak + c * (this.al - this.ak);
        var e = d - this.as;
        this.as = d;
        this.c.o(e);
        if (this.k.f()) {
            this.d9(this.b);
            this.d4(this.a);
            this.c9();
        }
        else {
            this.c7();
            this.c6();
        }
    };
    ZoomSlider.prototype.c9 = function () {
        this.g.ah();
    };
    ZoomSlider.prototype.trackDirty = function () {
        this.q = true;
        if (this.g == null) {
            return;
        }
        this.g.ak();
    };
    ZoomSlider.$t = markType(ZoomSlider, 'ZoomSlider', Base.$, [ITrackOwner_$type, INotifyPropertyChanged_$type]);
    return ZoomSlider;
}(Base));
export { ZoomSlider };
