var AngularSvgPanZoom;
!function (a) {
    var b = function () {
        function a(a, b) {
            var c = this;
            this.spz = a, this.restrict = "A", this.link = function (a, b, d) {
                var e = function (a) {
                    c.$rootScope.$broadcast("beforeZoom", a)
                }, f = function (a) {
                    c.$rootScope.$broadcast("onZoom", a)
                }, g = function (a) {
                    c.$rootScope.$broadcast("beforePan", a)
                }, h = function (a) {
                    c.$rootScope.$broadcast("onPan", a)
                }, i = c.CheckForBoolean(d.panEnabled, !0), j = c.CheckForBoolean(d.controlIconsEnabled, !1), k = c.CheckForBoolean(d.zoomEnabled, !0), l = c.CheckForBoolean(d.dblClickZoomEnabled, !0), m = d.zoomScaleSensitivity || .2, n = d.minZoom || .5, o = d.maxZoom || 10, p = c.CheckForBoolean(d.fit, !0), q = c.CheckForBoolean(d.center, !0), r = d.refreshRate || "auto", s = d.beforeZoom || e, t = d.onZoom || f, u = d.beforePan || g, v = d.onPan || h;
                c.spz(b[0], {
                    panEnabled: i,
                    controlIconsEnabled: j,
                    zoomEnabled: k,
                    dblClickZoomEnabled: l,
                    zoomScaleSensitivity: m,
                    minZoom: n,
                    maxZoom: o,
                    fit: p,
                    center: q,
                    refreshRate: r,
                    beforeZoom: s,
                    onZoom: t,
                    beforePan: u,
                    onPan: v
                })
            }, this.$rootScope = b
        }

        return a.prototype.CheckForBoolean = function (a, b) {
            return void 0 === a ? b : "false" === a ? !1 : !0
        }, a
    }();
    a.SvgPanZoomDirective = b
}(AngularSvgPanZoom || (AngularSvgPanZoom = {})), angular.module("SvgPanZoom", []).constant("spz", svgPanZoom).directive("svgPanZoom", ["spz", "$rootScope", function (a, b) {
    return new AngularSvgPanZoom.SvgPanZoomDirective(a, b)
}]);