/*!
 * QuantumUI Free v1.0.0 (http://quantumui.org)
 * Copyright 2014-2015 Mehmet Otkun, quantumui.org
 */

/*!
 * QuantumUI Free v1.0.0 (http://quantumui.org)
 * Copyright 2014-2015 Mehmet Otkun, quantumui.org
 */
String.prototype.trim || (String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g, "") }), String.prototype.trimEnd = function (a) { var b = this.trim(); if (null == a || "" == a || a.length > 1 || b.length < 2) return b; var c = b.slice(b.length - 1, b.length); return c == a ? b.slice(0, this.length - 1) : b }, String.prototype.trimStart = function (a) { var b = this.trim(); if (null == a || "" == a || a.length > 1 || b.length < 2) return b; var c = b.slice(0, 1); return c == a ? b.slice(1, b.length) : b }, String.prototype.capitaliseFirstLetter = function () { return this.charAt(0).toUpperCase() + this.slice(1) }, "function" != typeof String.prototype.endsWith && (String.prototype.endsWith = function (a) { return -1 !== this.indexOf(a, this.length - a.length) }), String.prototype.toTitleCase = function (a) { var a = this || ""; return a.replace(/\w\S*/g, function (a) { return a.charAt(0).toUpperCase() + a.substr(1).toLowerCase() }) }, String.prototype.replaceAll = function (a, b) { var c = this || ""; return c.replace(new RegExp(a, "g"), b) }, "function" != typeof String.prototype.startsWith && (String.prototype.startsWith = function (a) { return this.slice(0, a.length) == a }), "function" != typeof String.prototype.endsWith && (String.prototype.endsWith = function (a) { return this.slice(-a.length) == a }), window.addResizeEvent = function (a) { window.addEventListener ? window.addEventListener("resize", a, !0) : window.attachEvent && window.attachEvent("onresize", a) }, +function (a, b) { "use strict"; var c = a.requestAnimationFrame || a.webkitRequestAnimationFrame || a.mozRequestAnimationFrame || a.oRequestAnimationFrame || a.msRequestAnimationFrame || function (a) { setTimeout(function () { a.call(null, !1) }, 150) }; b.element.prototype.removeClasses = function (a) { var c = this, d = b.isArray(a) ? a : b.isStrign(a) ? a.split(" ") : []; return b.forEach(d, function (a) { a && c.removeClass(a) }), this }, b.element.prototype.animationEnd = function (a) { var b = this; return b.one("animationend webkitAnimationEnd oAnimationEnd oanimationend MSAnimationEnd", function (b) { a(b) }), c(function (b) { b === !1 && a(b) }), this }, b.element.prototype.transitionEnd = function (a) { var b = this; return b.one("transitionend webkitTransitionEnd oTransitionEnd otransitionend", function (b) { a(b) }), c(function (b) { b === !1 && a(b) }), this }; var d = b.module("ngQuantum.directives", []); b.forEach(["Append", "Prepend", "Bind"], function (a) { d.directive("nq" + a, ["$compile", function (c) { return { restrict: "A", link: function (d, e, f) { function g(a) { switch (i) { case "nqAppend": e.append(a); break; case "nqPrepend": e.prepend(a); break; case "nqBind": e.html(""), e.append(a) } } function h(a) { if (b.isElement(a)) g(a); else if (b.isString(a)) if (a.indexOf("{{") > -1 || a.indexOf("ng-bind") > -1) { var e = b.element(a); c(e)(d), g(e) } else g(a.indexOf("</") > -1 && a.indexOf(">") > -1 ? b.element(a) : a) } var i = "nq" + a; e.addClass("nq-" + a.toLowerCase()).data("$nqbind", f[i]), d.$watch(f[i], function (a) { h(a) }) } } }]) }) }(window, window.angular), angular.module("ngQuantum.services.color", ["ngQuantum.services.helpers"]).factory("$color", ["$helpers", function (a) { var b = {}; return b.value = { h: 1, s: 1, b: 1, a: 1 }, b.setColor = function (c) { if (c) { c = c.toLowerCase(); for (var d in a.stringParsers) if (a.stringParsers.hasOwnProperty(d)) { var e = a.stringParsers[d], f = e.re.exec(c), g = f && e.parse(f); g && (b.value = b.RGBtoHSB.apply(null, g)) } } return b }, b.RGBtoHSB = function (a, b, c, d) { a /= 255, b /= 255, c /= 255; var e, f, g, h; return g = Math.max(a, b, c), h = g - Math.min(a, b, c), e = 0 === h ? null : g === a ? (b - c) / h : g === b ? (c - a) / h + 2 : (a - b) / h + 4, e = (e + 360) % 6 * 60 / 360, f = 0 === h ? 0 : h / g, { h: e || 1, s: f, b: g, a: d || 1 } }, b.setHue = function (a) { b.value.h = 0 == a ? 0 : 1 == a ? 1 : a % 1 }, b.setSaturation = function (a) { b.value.s = 0 == a ? 0 : 1 == a ? 1 : a % 1 }, b.setLightness = function (a) { b.value.b = 0 == a ? 0 : 1 == a ? 1 : a % 1 }, b.setAlpha = function (a) { b.value.a = parseInt(100 * (0 == a ? 0 : 1 == a ? 1 : a % 1), 10) / 100 }, b.toRGB = function (a, c, d, e) { a || (a = b.value.h, c = b.value.s, d = b.value.b), a *= 360; var f, g, h, i, j; return a = a % 360 / 60, j = d * c, i = j * (1 - Math.abs(a % 2 - 1)), f = g = h = d - j, a = ~~a, f += [j, i, 0, 0, i, j][a], g += [i, j, j, i, 0, 0][a], h += [0, 0, i, j, j, i][a], { r: Math.round(255 * f), g: Math.round(255 * g), b: Math.round(255 * h), a: e || b.value.a } }, b.toHex = function (a, c, d, e) { var f = b.toRGB(a, c, d, e); return "#" + (1 << 24 | parseInt(f.r, 10) << 16 | parseInt(f.g, 10) << 8 | parseInt(f.b, 10)).toString(16).substr(1) }, b.rgb = function () { var a = b.toRGB(); return "rgb(" + a.r + "," + a.g + "," + a.b + ")" }, b.rgba = function () { var a = b.toRGB(); return "rgba(" + a.r + "," + a.g + "," + a.b + "," + a.a + ")" }, b.hex = function () { return b.toHex() }, b }]), angular.module("ngQuantum.services.helpers", []).factory("$helpers", ["$injector", "$window", function ($injector, $window) { var fn = {}; fn.injectModule = function (a, b) { b = b ? b : a; var c, d = "Module " + b + " is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument."; try { c = $injector.get(a) } catch (e) { console.error("ngquantum WARNING:", d) } return c }, fn.isTouch = function () { return "createTouch" in $window.document && null != window.ontouchstart }; var isTouch = fn.isTouch(); return fn.isHtml = function (a) { return /<[a-z][\s\S]*>/i.test(a) }, fn.ensureNumber = function (a, b) { return a ? angular.isString(a) ? parseFloat(a) : angular.isNumber(a) ? a : b || 0 : b || 0 }, fn.parseConstant = function (value) { if (/^(true|false|\d+|\-?[0-9]\d+)$/.test(value)) return eval(value); if (angular.isString(value)) { if ("[" == value[0] || "{" == value[0] && "{{" !== value[1]) try { return eval(value) } catch (e) { return value.trimStart("'").trimEnd("'") } return value.trimStart("'").trimEnd("'") } return value }, fn.parseOptions = function (a, b, c) { return a && angular.isDefined(a.$$element) && (c = c || "qo", angular.forEach(a.$attr, function (c, d) { if (c.length && c.indexOf("qo-") > -1) { var e = fn.getOptionKey(d); b[e] = fn.parseConstant(a[d]) } })), b }, fn.observeOptions = function (a, b, c, d) { if (a && angular.isDefined(a.$$element) && (d = d || "qo", a.$$observers)) for (var e in a.$$observers) if (e.length > 2 && e.startsWith(d)) { var f = fn.getOptionKey(e, d.length); a.$observe(e, function (a) { b[f] = fn.parseConstant(a), c && c(f) }) } return b }, fn.id = function (a, b) { var c = a ? a : "nq-", d = b || 1e3; return c + Math.floor(Math.random() * d + 1) }, fn.getOptionKey = function (a, b) { if (b = b || 2, a && a.length > b) { var c = a.slice(b); return c.charAt(0).toLowerCase() + c.slice(1) } return a }, fn.formatUrl = function (a, b) { a = a.trimEnd("/"); for (var c in b) b[c] && (a += "/" + b[c]); return a }, fn.getFieldValue = function (a, b) { if (b.indexOf(".") < 0) return a[b]; for (var c = b.split("."), d = a, e = 0; e < c.length && d; e++)d = d[c[e]]; return d }, fn.bindTriggers = function (a, b, c) { var d = b.split(" "), e = !1; return angular.forEach(d, function (b) { "click" === b ? (a.on("click", c.toggle), e = !0) : "manual" !== b && (a.on("hover" === b ? "mouseenter" : "focus", c.enter), a.on("hover" === b ? "mouseleave" : "blur", c.leave), "hover" !== b && a.on(isTouch ? "touchstart" : "mousedown", c.$onFocusElementMouseDown)) }), e }, fn.unBindTriggers = function (a, b, c) { for (var d = b.split(" "), e = d.length; e--;) { var f = d[e]; "click" === f ? a.off("click keyup", c.toggle) : "manual" !== f && (a.off("hover" === f ? "mouseenter" : "focus", c.enter), a.off("hover" === f ? "mouseleave" : "blur", c.leave), "hover" !== f && a.off(isTouch ? "touchstart" : "mousedown", c.$onFocusElementMouseDown)) } }, fn.stringParsers = [{ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, parse: function (a) { return [a[1], a[2], a[3], a[4]] } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, parse: function (a) { return [2.55 * a[1], 2.55 * a[2], 2.55 * a[3], a[4]] } }, { re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/, parse: function (a) { return [parseInt(a[1], 16), parseInt(a[2], 16), parseInt(a[3], 16)] } }, { re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/, parse: function (a) { return [parseInt(a[1] + a[1], 16), parseInt(a[2] + a[2], 16), parseInt(a[3] + a[3], 16)] } }], fn.docHeight = function () { var a = document.body, b = document.documentElement, c = Math.max(a.scrollHeight, a.offsetHeight, b.clientHeight, b.scrollHeight, b.offsetHeight); return c }, fn }]), angular.module("ngQuantum.services.lazy", []).provider("$lazyRequest", function () { this.timeout = 2e3; this.$get = ["$timeout", "$rootScope", "$http", function (a, b) { function c(c, d) { return d = d || 0, b.$$phase ? (b.$pendingRequestCount = b.$pendingRequestCount || 0, b.$pendingRequestCount++) : b.$apply(function () { b.$pendingRequestCount = b.$pendingRequestCount || 0, b.$pendingRequestCount++ }), a(function () { var a = c(); return a && angular.isDefined(a.then) && a.then(function () { b.$pendingRequestCount > 0 && b.$pendingRequestCount-- }), a }, d) } return c }] }), angular.module("ngQuantum.services.mouse", []).provider("$mouseConfig", function () { this.adjustOldDeltas = !0, this.normalizeOffset = !0, this.$get = function () { return this } }).factory("$mouse", ["$injector", "$window", "$mouseConfig", function (a, b, c) { function d(a, b, d) { var b = b || window.event, g = [].slice.call(arguments, 1), j = 0, k = 0, l = 0, m = 0, n = 0, o = 0, p = angular.extend({}, b); if (p.type = "mousewheel", p.preventDefault = function () { b.preventDefault ? b.preventDefault() : b.returnValue = !1 }, p.stopPropagation = function () { b.stopPropagation ? b.stopPropagation() : b.cancelBubble = !1 }, "detail" in b && (l = -1 * b.detail), "wheelDelta" in b && (l = b.wheelDelta), "wheelDeltaY" in b && (l = b.wheelDeltaY), "wheelDeltaX" in b && (k = -1 * b.wheelDeltaX), "axis" in b && b.axis === b.HORIZONTAL_AXIS && (k = -1 * l, l = 0), j = 0 === l ? k : l, "deltaY" in b && (l = -1 * b.deltaY, j = l), "deltaX" in b && (k = b.deltaX, 0 === l && (j = -1 * k)), 0 !== l || 0 !== k) { if (1 === b.deltaMode) { var q = a.data()["mousewheel-line-height"]; j *= q, l *= q, k *= q } else if (2 === b.deltaMode) { var r = a.data()["mousewheel-page-height"]; j *= r, l *= r, k *= r } if (m = Math.max(Math.abs(l), Math.abs(k)), (!i || i > m) && (i = m, e(b, m) && (i /= 40)), e(b, m) && (j /= 40, k /= 40, l /= 40), j = Math[j >= 1 ? "floor" : "ceil"](j / i), k = Math[k >= 1 ? "floor" : "ceil"](k / i), l = Math[l >= 1 ? "floor" : "ceil"](l / i), c.normalizeOffset && a[0].getBoundingClientRect) { var s = a[0].getBoundingClientRect(); n = p.clientX - s.left, o = p.clientY - s.top } return p.deltaX = k, p.deltaY = l, p.deltaFactor = i, p.offsetX = n, p.offsetY = o, p.deltaMode = 0, g.unshift(p, j, k, l), h && clearTimeout(h), h = setTimeout(f, 200), d(p) } } function e(a, b) { return c.adjustOldDeltas && "mousewheel" === a.type && b % 120 === 0 } function f() { i = null } function g(a) { var b = a.offsetParent ? a.offsetParent() : a.parent(); return b.length || (b = angular.element("body")), parseInt(b.css("fontSize"), 10) || parseInt(a.css("fontSize"), 10) || 16 } var h, i, j = "createTouch" in b.document && null != window.ontouchstart, k = "onwheel" in document || document.documentMode >= 9 ? "wheel" : "mousewheel DomMouseScroll, MozMousePixelScroll", l = (Array.prototype.slice, {}); return l.relativeX = function (a, b) { if (a.target == b[0] && a.offsetX) return a.offsetX; var c = a.pageX || a.clientX || ("undefined" != typeof a.originalEvent ? a.originalEvent.touches[0].clientX : a.touches[0].clientX); return c - b.offset().left }, l.relativeY = function (a, b) { if (a.target == b[0] && a.offsetY) return a.offsetY; var c = a.pageY || a.clientY || ("undefined" != typeof a.originalEvent ? a.originalEvent.touches[0].clientY : a.touches[0].clientY); return c - b.offset().top }, l.relativePos = function (a, b) { return { top: l.relativeY(a, b), left: l.relativeX(a, b) } }, l.down = function (a, b) { var c = j ? "touchstart" : "mousedown"; return a.on(c, b) }, l.move = function (a, b, c) { var d = c && c.touches || j ? "touchmove" : "mousemove"; return a.on(d, b) }, l.up = function (a, b, c) { var d = c && c.touches || j ? "touchend" : "mouseup"; return a.on(d, b) }, l.offDown = function (a, b) { var c = j ? "touchstart" : "mousedown"; return b ? a.off(c, b) : a.off(c) }, l.offMove = function (a, b) { var c = j ? "touchmove" : "mousemove"; return b ? a.off(c, b) : a.off(c) }, l.offUp = function (a, b) { var c = j ? "touchend" : "mouseup"; return b ? a.off(c, b) : a.off(c) }, l.offEnter = function (a, b) { var c = j ? "touchstart" : "mouseenter"; return b ? a.off(c, b) : a.off(c) }, l.onWheel = function (a, b) { return j ? !1 : void a.on(k, function (c) { return a.data("mousewheel-line-height", g(a)), a.data("mousewheel-page-height", a.height()), d(a, c, b) }) }, l.offWheel = function (a, b) { return j ? !1 : (a.data("mousewheel-line-height", ""), a.data("mousewheel-page-height", ""), b ? a.off(k, b) : a.off(k)) }, l }]), angular.module("ngQuantum.services.parseOptions", []).provider("$parseOptions", function () { var a = this.defaults = { regexp: /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/ }; this.$get = ["$parse", "$q", function (b, c) { function d(d, e) { function f(a) { return a.map(function (a) { var b, c, d, e = {}; return e[n] = a, b = m(e), c = q(e) || b, d = p(e), { label: b, value: c, group: d ? { label: d } : void 0, disabled: a.disabled } }) } function g(a) { var b = []; return angular.forEach(a.children(), function (a) { if (angular.element(a).is("option")) b.push(h(angular.element(a))); else if (angular.element(a).is("optgroup")) { var c = i(angular.element(a)); angular.forEach(angular.element(a).children(), function (a) { b.push(h(angular.element(a), c)) }) } }), b } function h(a, b) { return { value: a.prop("value"), label: a.text(), group: b, disabled: a.prop("disabled") || b && b.disabled } } function i(a) { return { label: a.attr("label"), disabled: a.prop("disabled") } } var j = {}, k = angular.extend({}, a); j.$values = []; var l, m, n, o, p, q, r; return j.init = function () { j.$match = l = d.match(k.regexp), m = b(l[2] || l[1]), n = l[4] || l[6], o = l[5], p = b(l[3] || ""), q = b(l[2] ? l[1] : n), r = b(l[7]) }, j.valuesFn = function (a, b) { return c.when(r(a, b)).then(function (a) { return j.$values = a ? f(a) : {}, j.$values }) }, j.parseInit = function () { j.$values = g(e) }, j.valuesParse = function (a) { return c.when(a).then(function (a) { return j.$values = g(a) || [], j.$values }) }, e ? j.parseInit() : j.init(), j } return d }] }), angular.module("ngQuantum.services.placement", ["ngQuantum.services.helpers"]).factory("$placement", ["$helpers", function (a) { function b(a, b) { var c = a[0], d = "function" == typeof c.getBoundingClientRect ? c.getBoundingClientRect() : { width: c.offsetWidth, height: c.offsetHeight }, e = {}; for (var f in d) e[f] = d[f]; var g = b.insideFixed ? a.position() : a.offset(), h = angular.extend({}, e, g); return h } function c(a, b, c, d) { var e, f = a.split("-"); switch (f[0]) { case "right": e = { top: b.top + b.height / 2 - d / 2, left: b.left + b.width }; break; case "bottom": e = { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 }; break; case "left": e = { top: b.top + b.height / 2 - d / 2, left: b.left - c }; break; default: e = { top: b.top - d, left: b.left + b.width / 2 - c / 2 } }if (!f[1]) return e; if ("top" === f[0] || "bottom" === f[0]) switch (f[1]) { case "left": e.left = b.left; break; case "right": e.left = b.left + b.width - c } else if ("left" === f[0] || "right" === f[0]) switch (f[1]) { case "top": e.top = b.top - d + b.height; break; case "bottom": e.top = b.top }return e } function d(a, b, c, d) { var e = a[0].offsetWidth, f = a[0].offsetHeight, g = a.parent(); d && (d == d == "body" ? window : angular.element(d)[0]); var h = document.documentElement.scrollTop || document.body.scrollTop, i = d ? d.innerWidth : g.outerWidth(), j = d ? d.innerHeight : g.outerHeight(), k = d ? 0 : g.offset().left; return b = "bottom" == b && c.top + c.height + f - h > j ? "top" : "top" == b && c.top - h - f < 0 ? "bottom" : "right" == b && c.right + e > i ? "left" : "left" == b && c.left - e < k ? "right" : b } var e = {}; return e.applyPlacement = function (f, g, h) { if (f && g) { var i = h.placement, j = b(f, h); h.originalPlacement = i; var k = /\s?auto?\s?/i, l = k.test(i); l && (i = i.replace(k, "") || "top"), l && (i = d(f, i, j, h.container), g.removeClass(h.originalPlacement).addClass(i)); var m = g.outerWidth(!0), n = g.outerHeight(!0), o = c(i, j, m, n); o.top = o.top + a.ensureNumber(h.offsetTop), o.left = o.left + a.ensureNumber(h.offsetLeft); var p = parseInt(g.css("margin-top"), 10), q = parseInt(g.css("margin-left"), 10); return isNaN(p) && (p = 0), isNaN(q) && (q = 0), o.top = o.top + p, o.left = o.left + q, h.insideFixed ? g.css(o) : g.offset(o), e.ensurePosition(g, f, h), h } }, e.verticalPlacement = function (a, b) { var c = window.screen.height || 0, d = a.height() || 0, e = c - d - 10; if (e > 0) { var f = 0; switch (b.placement) { case "center": f = e / 2; break; case "bottom": f = e; break; case "near-top": f = e / 3; break; case "near-bottom": f = e / 3 * 2; break; default: f = 0 }a.css("top", f) } }, e.ensurePosition = function (b, c, d) { var e = d.insideFixed ? b.position() : b.offset(), f = window.screen.width, g = a.docHeight(), h = b.width(), i = b.height(), j = (c.height(), d.insideFixed ? c.position() : c.offset()), k = b.attr("class"); e.left < 0 ? (b.css("left", 0), b.attr("class", k.replace("right", "left"))) : e.left > f - h && (b.css("left", c.width() - h), b.attr("class", k.replace("left", "right"))), e.top < 0 ? (b.css("top", j.top), b.attr("class", k.replace("bottom", "top"))) : e.top > g - i && (b.css("left", j.top - i), b.attr("class", k.replace("top", "bottom"))) }, e.replaceArrow = function (a, b, c, d) { a.find(".arrow").css(d, b ? 50 * (1 - b / c) + "%" : "") }, e }]), +function (a, b) { "use strict"; b.module("ngQuantum.services", ["ngQuantum.services.lazy", "ngQuantum.services.mouse", "ngQuantum.services.helpers", "ngQuantum.services.parseOptions", "ngQuantum.services.templateHelper", "ngQuantum.services.placement", "ngQuantum.services.color"]) }(window, window.angular), angular.module("ngQuantum.services.templateHelper", []).factory("templateHelper", ["$http", "$q", "$templateCache", "$timeout", function (a, b, c) { var d = {}; return d.fetchTemplate = function (d) { return b.when(c.get(d) || a.get(d)).then(function (a) { return angular.isObject(a) ? a.data : a }) }, d.fetchContentTemplate = function (a) { return a.$promise.then(function (b) { var c = angular.element(b), e = c.find('[ng-bind="content"], [ng-bind-html="content"]'), f = a.$options.contentTemplate; return angular.isString(f) && f.indexOf(".html") > -1 ? d.fetchTemplate(a.$options.contentTemplate).then(function (a) { return e.length ? (e.removeAttr("ng-bind").removeAttr("ng-bind-html").html(a), c) : a }) : b }) }, d.fetchContent = function (a) { return b.when(a).then(function (a) { return a }) }, d }]), +function () { "use strict"; angular.module("ngQuantum.alert", ["ngQuantum.popMaster", "ngQuantum.services.helpers"]).run(["$templateCache", function (a) { a.put("alert/alert.tpl.html", '<div class="alert alert-dismissable" tabindex="-1" ng-class="alertType"><div class="alert-inner"><div class="alert-bg" ng-class="alertType"></div><a role="button" tabindex="0" class="close" ng-click="$hide()"><i ng-class="$closeIcon"></i></a> <strong class="alert-title" ng-if="title" ng-bind="title"></strong><span  ng-if="title" ng-bind-html="content"></span><div ng-if="!title" ng-bind-html="content"></div></div></div>') }]).provider("$alert", function () { var a = this.defaults = { effect: "fade-in", typeClass: "alert", prefixEvent: "alert", placement: "top-right", fireEmit: !0, template: "alert/alert.tpl.html", container: !1, directive: "nqAlert", instanceName: "alert", backdrop: !1, displayReflow: !0, clearExists: !1, keyboard: !0, trigger: "click", show: !0, html: !0, independent: !0, preventReplace: !0, alertType: "info", duration: 3e3, autoDestroy: !1, onHide: !1, closeIcon: "fic fu-cross" }; this.$get = ["$timeout", "$rootScope", "$popMaster", "$compile", "$helpers", "$sce", "$parse", function (b, c, d, e, f, g, h) { function i(c, i, j, k) { function l() { var a = ""; o.placement && (a = "." + o.placement), p = angular.element("body").find(".alert-container" + a), (!p || p.length < 1) && (p = angular.element('<div class="alert-container ' + o.placement + '"></div>'), p.prependTo("body")), o.container = p } var m, n = {}; angular.isString(c) && (c = { content: c, title: i, alertType: j || a.alertType, placement: k || a.placement }), c.$scope || (c.autoDestroy = !0), angular.isObject(i) && (m = i), m && (c = f.parseOptions(m, c)); var o = angular.extend({}, a, c); o.containerSelf && (o.container = o.containerSelf); var p; o.container || l(), n = d(null, o); var q = n.$scope; m ? o = n.$options = f.observeOptions(m, n.$options) : (o.content && (q.content = o.content), o.title && (q.title = o.title)), m && m.onHide && (o.onHide = h(m.onHide)); var r = n.show; n.show = function () { q.$closeIcon = o.closeIcon, o.alertType && (q.alertType = "alert-" + o.alertType), p && p.show(); var a = r(); return e(n.$target)(q), o.duration && b(function () { n && n.hide() }, f.ensureNumber(o.duration, 3e3)), a }; var s = n.hide; return n.hide = function () { var a = s(); return a && a.then(function () { if (o.onHide && o.onHide(q), p) { var a = p.children(); (!a || a.length < 1) && p.hide() } o.autoDestroy && n && n.destroy() }), a }, m && (angular.forEach(["title", "content"], function (a) { var b = "qs" + a.capitaliseFirstLetter(); m[b] && (q[a] = g.trustAsHtml(m[b])), m.$$observers && m.$$observers[b] && m.$observe(b, function (b) { q[a] = g.trustAsHtml(b) }) }), m && angular.isDefined(o.directive) && m[o.directive] && o.$scope.$watch(m[o.directive], function (a) { angular.isObject(a) ? angular.extend(q, a) : q.content = a }, !0)), q.$on("$destroy", function () { n && !n.isDestroyed && n.destroy(), n = null }), n } return i }] }).directive("nqAlert", ["$alert", function (a) { return { restrict: "EAC", scope: !0, link: function (b, c, d) { var e, f = { $scope: b }; f.uniqueId = d.qoUniqueId || d.id || f.$scope.$id, !angular.isDefined(d.qsContent) && (b.content = c.html(), c.html("")), angular.isDefined(d.qoContainer) && "self" == d.qoContainer && (f.containerSelf = c), !d.qoShow && (f.show = !1); var g = a(f, d); angular.isDefined(d.qsShowOn) && b.$watch(d.qsShowOn, function (a) { (e || a) && g.toggle(), e = !0 }), angular.isDefined(d.qoContainer) && "self" != !d.qoContainer || c.on("click", function () { g.toggle() }) } } }]) }(), function (a, b) { "use strict"; var c = { effect: "slide-left", speed: "fastest", side: "left", opened: !1, pinned: !1, collapsed: !1, collapsible: !1, pinnable: !1, pinnedScreenSize: 1300, collapsedScreenSize: 991, closedScreenSize: 767, position: "fixed", offCanvas: "mobile", offCanvasBody: "body", container: "self", theme: !1, backDrop: !1, topOffset: 50, scrollOffsetTop: !1, bottomOffset: 0, width: !1, enlargeHover: !1 }; b.module("ngQuantum.aside", ["ngQuantum.services.helpers"]).provider("$aside", function () { var d = this.defaults = c; this.$get = ["$rootScope", "$animate", "$timeout", "$window", function (c, e, f, g) { function h(h, j, k) { function l() { h.addClass("aside"), m(), y.opened ? (x.open(), y.pinned && x.togglePin(!0), y.collapsed && x.toggleCollapse(!0)) : x.close(), q(), o(), r(), u(y.theme), s(y.position), t(y.offCanvas), n() } function m() { B && A.removeClasses([y.side + "-aside-opened", y.side + "-aside-collapsed", y.side + "-aside-pinned"]), h && h.removeClasses(C) } function n(a) { a = a || g.innerWidth, a != x.windowWidth && (y.closedScreenSize && y.closedScreenSize >= a ? x.close() : (y.collapsedScreenSize && y.collapsedScreenSize >= a && x.toggleCollapse(!0), y.pinnedScreenSize && y.pinnedScreenSize <= a && x.togglePin(!0)), x.windowWidth = a) } function o() { w && (w.off(), w.remove()), y.backDrop && (w = b.element('<div class="aside-overlay"></div>').on("click", function () { x ? x.close() : w.remove() })) } function p(a, b) { switch (a) { case "theme": u(b); break; case "position": s(b); break; case "offCanvas": t(b); break; case "topOffset": h.css("top", b); break; case "bottomOffset": h.css("bottom", b); break; case "backDrop": o(); break; case "side": x.close(), x.open() } } function q() { h.addClass("aside-" + y.side), h.css("top", y.topOffset && y.topOffset || 0), h.css("bottom", y.bottomOffset && y.bottomOffset || 0), y.width && h.css("width", y.width), y.collapsible && B && A.addClass(y.side + "-aside-collapsible") } function r() { if (y.container && "self" !== y.container) { var a = b.element(y.container); a.length && (v = b.element(a[0]), v.append(h)) } } function s(a) { y.position && (h.removeClass("aside-" + y.position), B && A.removeClass(y.side + "-aside-" + y.position)), a && (h.addClass("aside-" + a), B && A.addClass(y.side + "-aside-" + a)) } function t(a) { y.offCanvas && (h.removeClass("off-canvas-" + y.offCanvas), B && A.removeClass(y.side + "-off-canvas-" + y.offCanvas)), a && (h.addClass("off-canvas-" + a), B && A.addClass(y.side + "-off-canvas-" + a)) } function u(a) { y.theme && h.removeClass("aside-" + y.theme), a && h.addClass("aside-" + a) } var v, w, x = {}, y = x.$options = b.extend({}, d, j), z = y.$scope || c.$new(), A = b.element(y.offCanvasBody), B = y.pinnable || y.collapsible, C = ["aside-pinned", "aside-collapsed", "aside-opened", "aside-closed"]; return k && k.$$observers && b.forEach(k.$$observers, function (a, c) { b.isDefined(y[c]) && k.$observe(c, function (a) { a != y[c] && (p(c, a), y[c] = a) }) }), x.toggle = function () { x.$isOpen ? x.close() : x.open(), z.$$phase || z.$digest() }, x.toggleCollapse = function (a) { if (y.collapsible) if (x.$collapsed) { if (a) return; h.removeClass("aside-collapsed"), B && A.removeClass(y.side + "-aside-collapsed"), f(function () { x.$collapsed = !1 }, 0), y.enlargeHover && !i && (h.off("mouseenter mouseleave"), x.$isOpen && h.on("mouseleave", function () { x.toggleCollapse() })) } else { if (!x.$isOpen || 0 == a) return; y.enlargeHover && !i && (h.off("mouseenter mouseleave"), h.on("mouseenter", function () { x.toggleCollapse() })), h.addClass("aside-collapsed"), B && A.addClass(y.side + "-aside-collapsed"), f(function () { x.$collapsed = !0 }, 0) } }, x.close = function () { 0 != x.$isOpen && (y.effect ? (h.off("mouseenter mouseleave"), h.removeClass("aside-opened"), h.show(), h.addClass(y.speed), e.removeClass(h, y.effect).then(function () { h.hide(), h.addClass("aside-closed"), h.removeClass(y.speed), h.removeClass("ng-animate") })) : (h.removeClass("aside-opened"), h.addClass("aside-closed"), h.removeClass(y.speed), h.removeClass(y.effect)), m(), f(function () { x.$isOpen = !1 }, 0), w && w.detach()) }, x.open = function () { x.$isOpen || (m(), h.removeClass("aside-closed"), v && v.append(h), y.effect ? (h.show(), h.addClass(y.speed), h.animationEnd(function () { h.removeClass(y.speed), h.removeClass("ng-animate") }), e.addClass(h, y.effect), h.addClass("aside-opened")) : h.addClass("aside-opened"), B && A.addClass(y.side + "-aside-opened"), x.$isOpen = !0, x.togglePin(x.$pinned || !1), x.toggleCollapse(x.$collapsed || !1), w && h.after(w), f(function () { x.$collapsed = !1, x.$isOpen = !0 }, 0)) }, x.togglePin = function (a) { if (y.pinnable) { if (x.$pinned) { if (a) return x.$isOpen ? (h.addClass("aside-pinned"), B && A.addClass(y.side + "-aside-pinned"), void (x.$pinned = !0)) : void x.open(); h.removeClass("aside-pinned"), B && A.removeClass(y.side + "-aside-pinned"), x.$pinned = !1 } else { if (!x.$isOpen || 0 == a) return; h.addClass("aside-pinned"), B && A.addClass(y.side + "-aside-pinned"), x.$pinned = !0 } y.enlargeHover && "false" != y.enlargeHover ? (h.off("mouseenter mouseleave"), h.on("mouseenter", function () { x.toggleCollapse() })) : h.off("mouseenter mouseleave") } }, a.addResizeEvent(function () { f(function () { var a = g.innerWidth; n(a) }, 0) }), l(), z.$$postDigest(function () { z.$aside = x }), b.element(a).on("scroll", function () { if (y.scrollOffsetTop && y.topOffset > 0) { var c = b.element(a).scrollTop(); c > y.topOffset ? h.css("top", 0) : 0 == c ? h.css("top", y.topOffset) : h.css("top", y.topOffset - c) } }), z.$on("$destroy", function () { w && (w.off(), w.remove()), h && h.off(), m() }), b.element(document).ready(function () { setTimeout(function () { h.height() > a.innerHeight && (h.css("position", "relative"), setTimeout(function () { h.css("position", "") }, 100)) }, 10) }), x } var i = "createTouch" in g.document && null != a.ontouchstart; return h }] }).directive("nqAside", ["$aside", "$helpers", function (a, d) { return { restrict: "AC", scope: !0, link: function (e, f, g) { var h = { $scope: e, id: g.id || "aside-" + e.$id }; b.forEach(c, function (a, c) { b.isDefined(g[c]) && g[c].indexOf("{{") < 0 && (h[c] = d.parseConstant(g[c])) }); var i = f.find(".aside-header"); if (i.length) { var j = i.outerHeight(!0); f.css("padding-top", j), i.css("margin-top", -j) } var k = f.find(".aside-footer"); if (k.length) { var l = k.outerHeight(!0); f.css("padding-bottom", l) } var m = new a(f, h, g), n = g.nqAside; n && (e.$parent[n] = m) } } }]).directive("asideToggle", ["$timeout", function (a) { return { restrict: "A", link: function (c, d, e) { d.on("click", function () { var c = e.asideToggle ? b.element(e.asideToggle) : !1; if (c.length) { var d = c.scope(); d && d.$aside && a(function () { d.$aside.toggle() }, 0) } }) } } }]) }(window, window.angular), +function (a, b) { "use strict"; var c = b.module("ngQuantum.button", ["ngAnimate", "ngQuantum.services.helpers"]).provider("$button", function () { var a = this.defaults = { activeClass: "active", toggleEvent: "click", activeIcon: "" }; this.$get = function () { return { defaults: a } } }); b.forEach(["CheckboxGroup", "RadioGroup"], function (a) { c.directive("nq" + a, function () { return { restrict: "A", require: "ngModel", compile: function (c, d) { var e = "CheckboxGroup" == a ? "checkbox" : "radio"; c.attr("data-toggle", "buttons"), c.removeAttr("ng-model"); var f, g, h = c.find('input[type="' + e + '"]'); "checkbox" == e && (f = d.trueValue, g = d.falseValue), b.forEach(h, function (a) { var c = b.element(a); c.attr("nq-" + e + "-button", ""), "checkbox" == e ? (c.attr("ng-model", d.ngModel + "." + c.attr("value")), !c.attr("ng-true-value") && f && c.attr("ng-true-value", f), !c.attr("ng-false-value") && g && c.attr("ng-false-value", g)) : c.attr("ng-model", d.ngModel), c.attr("name", d.ngModel), d.showTick && c.attr("show-tick", d.showTick), d.ngChange && (b.isDefined(c.attr("ng-change")) ? c.attr("ng-change", c.attr("ng-change") + ";" + d.ngChange) : c.attr("ng-change", d.ngChange)) }) } } }) }), b.forEach(["Checkbox", "Radio", "Toggle"], function (a) { c.directive("nq" + a + "Button", ["$button", "$helpers", function (c, d) { return { restrict: "A", require: "ngModel", link: function (e, f, g, h) { var i = c.defaults; a = a.toLowerCase(), "toggle" == a && (a = "checkbox"); var j, k, l = g.type === a, m = l ? f.parent() : f; "checkbox" == a ? (j = b.isDefined(g.ngTrueValue) ? d.parseConstant(g.ngTrueValue) : !0, k = b.isDefined(g.ngFalseValue) ? d.parseConstant(g.ngFalseValue) : !1) : j = g.ngValue ? e.$eval(g.ngValue) : d.parseConstant(g.value), 1 == d.parseConstant(g.showTick) && m.addClass("tick-right"), "left" == g.showTick && m.addClass("tick-left"), b.isDefined(g.checked) && h.$setViewValue(j), e.$watch(g.ngModel, function () { var a = b.equals(d.parseConstant(h.$modelValue), j); !a && f.removeAttr("checked"), m.toggleClass(i.activeClass, a) }), l || f.bind(i.toggleEvent, function () { var b = "radio" == a ? j : h.$modelValue && d.parseConstant(h.$modelValue) == j ? k : j; h.$setViewValue(b), e.$apply() }) } } }]) }) }(window, window.angular), +function (a, b) {
	"use strict"; b.module("ngQuantum.carousel", ["ngQuantum.services.helpers"]).run(["$templateCache", function (a) { a.put("carousel/carousel.tpl.html", '<div class="carousel" ng-style="{width:$outerWidth}"><ol class="carousel-indicators"><li ng-repeat="item in items"  indicator-transclude="item" ng-class="{active: item.active}" ng-click="item.select($index)"><span class="indicator-no">{{$index + 1}}</span></li></ol><div class="carousel-inner" ng-transclude ng-style="{height:$innerHeight}"></div><div class="carousel-control left"  ng-click="$prev()"><span class="icon-prev"></span></div><div class="carousel-control right" ng-click="$next()"><span class="icon-next"></span></div></div>') }]).provider("$carousel", function () { var a = this.defaults = { effect: "slide-left-right", type: "carousel", speed: "fastest", prefixEvent: "carousel", directive: "nqCarousel", instanceName: "carousel", keyboard: !0, hoverStop: !0, showIndicator: !0, showPrevNext: !0, showPause: !0, showPlay: !0, autoPlay: !0, outerWidth: "650px", innerHeight: "405px", interval: 5e3 }; this.$get = ["$timeout", "$interval", "$filter", "$compile", "$sce", "$animate", function (c, d) { function e(e, f, g) { function h() { k.hoverStop && (e.on("mouseenter", function () { j.pause() }), e.on("mouseleave", function () { j.play() })) } var i, j = {}, k = j.$options = b.extend({}, a, g), l = j.items = f.items = [], m = j.$lastIndex = 0; return b.forEach(["next", "prev", "play", "pause"], function (a) { f["$" + a] = function (b) { j[a](b) } }), b.forEach(["outerWidth", "innerHeight"], function (a) { f["$" + a] = k[a] }), (e.hasClass("thumb-navigation") || e.hasClass("number-navigation")) && (j.$watchIndicator = !0), j.init = function () { k.autoPlay && (j.play(), h()), c(function () { parseInt(f.$outerWidth) > e.width() && (f.$innerHeight = parseInt(f.$innerHeight) / parseInt(f.$outerWidth) * e.width() + "px") }, 800) }, j.select = function (a) { var c = l[a]; b.forEach(l, function (a) { a.active && a !== c && (a.active = !1, a.activeClasses = "") }), c && (c.active = !0, m = j.$lastIndex = a) }, j.pause = function () { d.cancel(i) }, j.play = function () { i = d(j.next, k.interval) }, j.next = function () { var a = m < l.length - 1 ? m + 1 : 0; j.select(a) }, j.prev = function () { var a = m > 0 ? m - 1 : l.length - 1; j.select(a) }, j.addItem = function (a) { l.push(a), 1 === l.length ? a.active = !0 : a.active && j.select(l.indexOf(a)) }, j.removeItem = function (a) { var b = l.indexOf(a); if (a.active && l.length > 1) { var c = b == l.length - 1 ? b - 1 : b + 1; j.select(c) } l.splice(b, 1) }, j.init(), j } return e }] }).directive("nqCarousel", ["$carousel", "$helpers", function (a, c) { return { restrict: "EA", transclude: !0, replace: !0, scope: {}, templateUrl: "carousel/carousel.tpl.html", controller: ["$scope", "$element", "$attrs", function (d, e, f) { var g = this, h = {}; b.forEach(["effect", "speed", "interval", "keyboard", "hoverStop", "autoPlay", "outerWidth", "innerHeight"], function (a) { b.isDefined(f[a]) && (h[a] = c.parseConstant(f[a])) }); var i = new a(e, d, h); return g = b.extend(g, i) }] } }]).directive("carouselItem", ["$parse", function () { return { require: "^nqCarousel", restrict: "EA", replace: !0, template: '<div class="item" carousel-item-transclude="" ng-swipe-left="$parent.$next()"  ng-swipe-right="$parent.$prev()"></div>', transclude: !0, scope: { active: "=?", heading: "@" }, controller: function () { }, compile: function (a, c, d) { return function (a, c, e, f) { a.effect = f.$options.effect, a.speed = f.$options.speed, b.isDefined(e.effect) && (a.effect = e.effect), b.isDefined(e.speed) && (a.effect = e.speed), a.select = function (b) { b = b || a.$index || 0, f.select(b) }, f.addItem(a), a.$on("$destroy", function () { f.removeItem(a) }), a.$transcludeFn = d } } } }]).directive("indicatorTransclude", [function () {
		return {
			restrict: "A", require: "^nqCarousel", link: function (a, c, d, e) {
				var f = a.$eval(d.indicatorTransclude); e.$watchIndicator && a.$first && (e.thumbWidth = c.width(), e.thumbHeight = c.height(), e.visibleThumb = parseInt((c.closest(".carousel").width() - 100) / e.thumbWidth)), a.$watch(function () { return f.thumbImage }, function (a) { a && b.element(a).on("load", function () { { var a = document.createElement("canvas"), b = e.thumbWidth, d = e.thumbHeight; e.$options.outherWidth } a.width = b - 2, a.height = d - 2, a.getContext("2d").drawImage(this, 0, 0, b - 2, d - 2), c.html(a) }) }), e.$watchIndicator && a.$watch(function () {
					return e.$lastIndex
				}, function (b) { e.visibleThumb > 0 && (a.$index + e.visibleThumb < b + 2 ? c.hide() : "none" == c.css("display") && c.show()) })
			}
		}
	}]).directive("carouselItemTransclude", ["$animate", "$timeout", function (a) { return { restrict: "A", require: "^carouselItem", link: function (c, d) { function e() { d.show(), c.effect && (d.addClass(c.speed), a.addClass(d, c.effect).then(function () { })) } function f() { c.effect ? (a.removeClass(d, c.effect).then(function () { d.hide() }), d.animationEnd(function () { !c.active && d.hide() })) : d.hide() } c.$watch("$transcludeFn", function () { c.$transcludeFn(c.$parent, function (a) { b.forEach(a, function (a) { var e = b.element(a); e.hasClass("thumb-image") ? c.thumbImage = e : e.hasClass("generate-thumb") ? (c.thumbImage = e, d.append(a)) : d.append(a) }) }) }), c.$watch("active", function (a) { a ? e() : f() }) } } }])
}(window, window.angular), +function (a, b, c) { "use strict"; b.module("ngQuantum.collapse", []).provider("$collapse", function () { var a = this.defaults = { dimension: "height", collapsed: !0 }; this.$get = ["$timeout", "$rootScope", function (c, d) { function e(c, e, f) { function g() { if (k.collapsed) { h = c[0].style.position || "", c.css("position", "absolute").show(); var a = "height" == j ? "outerHeight" : "outerWidth"; i = c[a](), c.css("display", "")[j](0).css("position", h), c.addClass("in collapsing"), setTimeout(function () { c[j](i).transitionEnd(function () { c.removeClass("collapsing"), k.collapsed = !1, l.onToggle && l.onToggle(!1), c[j]("") }) }, 1) } else i = c[j](), c[j](i), setTimeout(function () { c.addClass("collapsing")[j](0).transitionEnd(function () { c[j](""), c.removeClass("collapsing").removeClass("in").css(j, ""), k.collapsed = !0, l.onToggle && l.onToggle(!0) }) }, 1) } var h, i, j, k = {}, l = k.$options = b.extend({}, a, f); return j = l.dimension, k.collapsed = l.collapsed, c.addClass("collapse"), k.collapsed || (c.addClass("in"), i = c[j]()), e && e.on("click", function (a) { a.preventDefault(), a.stopPropagation(), g() }), l.checkRouting && d.$on("$locationChangeStart", function () { k.collapsed || (k.collapsed = !1, g()) }), k.toggle = g, k } return e }] }).directive("nqAccordion", function () { return { restrict: "A", require: "?ngModel", compile: function (a, c) { var d = c.ngModel; d || (d = "accordionModel" + Math.floor(1e3 * Math.random() + 1).toString()), a.removeAttr("ng-model"); var e = a.find("> .panel"); b.forEach(e, function (a, c) { var e = b.element(a), f = e.find(".panel-collapse"); if (f.length) { var g = f.attr("id"); g || (g = d + Math.floor(1e3 * Math.random() + 1).toString(), f.attr("id", g)); var h = e.find(".panel-title > a"); h.length || (h = e.find(".panel-title")), h.length || (h = e.find(".panel-heading")), h.length && (h.attr("target-index", c), h.attr("target-id", "#" + g), h.attr("data-ng-click", d + "=" + d + "==" + c + "?20000000:" + c), h.attr("ng-model", d), h.attr("nq-collapse", "")) } }) } } }).directive("nqCollapse", ["$collapse", function (a) { return { restrict: "EAC", require: "?ngModel", compile: function (d, e) { var f = !0, g = b.element(e.targetId), h = b.isDefined(e.dimension) && "width" == e.dimension ? e.dimension : "height"; !b.isDefined(e.collapsed) || "false" != e.collapsed && 0 != e.collapsed || (f = !1); var i, j = { collapsed: f, dimension: h, checkRouting: e.checkRouting || d.hasClass("navbar-toggle") }, k = e.targetIndex ? parseInt(e.targetIndex) : 0, l = b.isDefined(e.ngModel) ? null : d; return g.length && (i = new a(g, l, j)), function (a, d, f) { i && b.isDefined(e.ngModel) && a.$watch(f.ngModel, function (a) { a != c && (a != k && i.collapsed || i.toggle()) }) } } } }]) }(window, window.angular), +function (a, b) { "use strict"; b.module("ngQuantum.colorpicker", ["ngQuantum.popMaster"]).run(["$templateCache", function (a) { a.put("colorpicker/colorpicker.tpl.html", '<div class="popover colorpicker"><ul class="nav palettes-list clearfix"><li ng-repeat="color in palettes"  ng-click="$parent.$select($index)"><span class="color-pick titip-top" data-title="{{color}}" ng-style="{\'background-color\':color}"></span></li></ul><div class="clearfix"><span class="color-pick titip-top" data-title="{{selectedColor}}" ng-style="{\'background-color\':selectedColor}"></span>&nbsp;&nbsp;<span class="color-pick titip-top" ng-click="$select(\'transparent\')" data-title="Set Transparent" style="background-color:transparent;"></span><small class="pull-right color-more-label" ng-click="$showPicker()">{{$options.moreText || \'More\'}} <i ng-class="$options.iconDown" class="angle-down"></i><i ng-class="$options.iconUp" class="angle-up"></i></small></div><div class="color-selector-panel"><ul class="clearfix nav-color-current"><li class="color-current-label">Current</li><li><span class="color-current"  ng-style="{\'background-color\':selectedColor || newColor }"></span><span class="color-new" ng-style="{\'background-color\':newColor || selectedColor}"></span></li><li class="color-new-label">New</li></ul><div class="clearfix"><div class="color-saturation"><span class="sat-point"></span></div><div class="color-hue"><span class="hue-slider"></span></div></div><div class="clearfix alpha-row"><div class="color-alpha"><span class="alpha-slider titip-top titip-yellow titip-xs"><span class="titip-content">{{$alphaValue}}%</span></span></div><div class="color-button"><button type="button" class="btn btn-default" ng-click="$select()">ok</button></div></div></div></div>') }]).provider("$colorPicker", function () { var a = this.defaults = { palette: ["#000000", "#424242", "#636363", "#9C9C94", "#CEC6CE", "#EFEFEF", "#F7F7F7", "#FFFFFF", "#FF0000", "#FF9C00", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF", "#9C00FF", "#FF00FF", "#F7C6CE", "#FFE7CE", "#FFEFC6", "#D6EFD6", "#CEDEE7", "#CEE7F7", "#D6D6E7", "#E7D6DE", "#E79C9C", "#FFC69C", "#FFE79C", "#B5D6A5", "#A5C6CE", "#9CC6EF", "#B5A5D6", "#D6A5BD", "#E76363", "#F7AD6B", "#FFD663", "#94BD7B", "#73A5AD", "#6BADDE", "#8C7BC6", "#C67BA5", "#CE0000", "#E79439", "#EFC631", "#6BA54A", "#4A7B8C", "#3984C6", "#634AA5", "#A54A7B", "#9C0000", "#B56308", "#BD9400", "#397B21", "#104A5A", "#085294", "#311873", "#731842", "#630000", "#7B3900", "#846300", "#295218", "#083139", "#003163", "#21104A", "#4A1031"], paletteOnly: !0, showAlpha: !0, defaultColor: "#000000", effect: "sing", typeClass: "popover", prefixClass: "colorpicker", prefixEvent: "colorpicker", instanceName: "colorpicker", placement: "bottom-left", template: "colorpicker/colorpicker.tpl.html", trigger: "click", container: "body", showArrow: !0, allowWrite: !1, autoHide: !1, iconDown: "fic fu-angle-d", iconUp: "fic fu-angle-u", moreText: "More", html: !0, displayReflow: !1, fireEmit: !0, keyboard: !0, overseeingTarget: !0 }; this.$get = ["$rootScope", "$popMaster", "$document", "$color", "$mouse", "$helpers", function (c, d, e, f, g, h) { function i(c, i, j) { function k() { C = H.$target, !C && 10 > I ? setTimeout(function () { k(), I++ }, 50) : (!K.$color && (K.$color = f), A = C.find(".color-hue"), z = C.find(".color-alpha"), B = C.find(".color-saturation"), E = A.find(".hue-slider"), F = B.find(".sat-point"), G = z.find(".alpha-slider")) } function l() { D || t(), n(), o(), p() } function m() { g.offDown(B), g.offDown(F), g.offDown(A), g.offDown(E), g.offDown(z), g.offDown(G) } function n() { g.down(A, q), g.down(E, function () { g.offMove(e, q), g.move(e, q); var a = function () { g.offMove(e, q), g.offUp(e, a) }; g.up(e, a) }) } function o() { g.down(B, r), g.down(F, function () { g.offMove(e, r), g.move(e, r); var a = function () { g.offMove(e, r), g.offUp(e, a) }; g.up(e, a) }) } function p() { g.down(z, s), g.down(G, function () { g.offMove(e, s), g.move(e, s); var a = function () { g.offMove(e, s), G.removeClass("titip-active"), g.offUp(e, a) }; g.up(e, a) }) } function q(a) { var b = g.relativeY(a, A); b = b > D.hh ? D.hh : 0 > b ? 0 : b, E.css({ top: b - D.hsh / 2 }), w(b / D.hh) } function r(a) { var b = g.relativePos(a, B), c = b.left, d = b.top; d = d > D.hh ? D.hh : 0 > d ? 0 : d, c = c > D.aw ? D.aw : 0 > c ? 0 : c, F.css({ left: c - D.spw / 2, top: d - D.sph / 2 }), x(c / D.sw, 1 - d / D.sh) } function s(a) { G.addClass("titip-active"); var b = g.relativeX(a, z); b = b > D.aw ? D.aw : 0 > b ? 0 : b, G.css({ left: b - D.asw / 2 }), y(b / D.aw) } function t() { D = { hh: A.height(), hsh: E.outerHeight(), sw: B.width(), sh: B.height(), sph: F.outerHeight(), spw: F.outerWidth(), aw: z.width(), asw: G.outerWidth() } } function u() { var a = K.$color.hex(); z.css("background-image", "linear-gradient(to right, rgba(255,255,255, 0), " + a + ")"), K.newColor = K.$color.rgba(), !K.$$phase && K.$apply(function () { K.newColor = K.$color.rgba() }) } function v() { D || t(); var a = { left: K.$color.value.s * D.sw - D.spw / 2, top: (1 - K.$color.value.b) * D.sw - D.sph / 2 }; F.css(a), E.css({ top: K.$color.value.h * D.hh - D.hsh / 2 }), G.css({ left: K.$color.value.a * D.aw - D.asw / 2 }), K.$alphaValue = parseInt(100 * K.$color.value.a), B.css("background-color", f.toHex(K.$color.value.h, 1, 1, 1)), u() } function w(a) { K.$color.setHue(a), B.css("background-color", f.toHex(a, 1, 1, 1)), u() } function x(a, b) { K.$color.setSaturation(a), K.$color.setLightness(b), u() } function y(a) { K.$color.setAlpha(a), K.$apply(function () { K.$alphaValue = parseInt(100 * a) }), u() } var z, A, B, C, D, E, F, G, H = {}, I = 0; i = h.parseOptions(j, i); var J = b.extend({}, a, i), H = new d(c, J), K = H.$scope; J = H.$options = h.observeOptions(j, H.$options), K.$$postDigest(function () { K.palettes = J.palette, K.$select = H.select, K.$alphaValue = 100, K.$options = H.$options }), K.$showPicker = function () { H.$target.toggleClass("picker-open"), H.$target.hasClass("picker-open") ? (l(), v()) : m() }; var L = H.init; H.init = function () { L(), k(), K.selectedColor = K.newColor = K.selectedColor || J.defaultColor || "#FF0000", K.$color.setColor(K.selectedColor) }; var M = H.show; H.show = function () { return M() }; var N = H.hide; H.hide = function () { var a = N(); return m(), H.$target.removeClass("picker-open"), a }; var O = H.destroy; return H.destroy = function () { O(), m(), K.$destroy() }, H.select = function (a) { var b = K.selectedColor || "#FF0000"; a ? "transparent" == a ? b = "transparent" : (b = K.palettes[a], K.$color.setColor(b)) : K.$color && (b = 1 == K.$color.value.a ? K.$color.hex() : K.$color.rgba(), H.$target.removeClass("picker-open")), K.selectedColor = b }, H } return i }] }).directive("nqColorPicker", ["$colorPicker", function (a) { return { restrict: "AC", require: "ngModel", link: function (b, c, d, e) { var f = { $scope: b.$new() }, g = new a(c, f, d); b.$watch(d.ngModel, function (a) { a && a !== g.$scope.selectedColor && (g.$scope.selectedColor = a) }), g.$scope.$watch("selectedColor", function (a, b) { a && a !== b && (e.$setViewValue(g.$scope.selectedColor), e.$render()) }), b.$on("$destroy", function () { g && g.destroy(), g = null }) } } }]) }(window, window.angular), function (a) { a && (a.fn.clearTime = function () { return this.hours(0), this.minutes(0), this.seconds(0), this.milliseconds(0), this }, a.fn.isWeekend = function () { var a = this.day(); return 6 == a || 0 == a || !1 }, a.fn.isToday = function () { return this.clone().clearTime().valueOf() == a().clearTime().valueOf() }, a.fn.toObject = function () { var a = this; return { year: a.year(), month: a.month(), date: a.date(), hour: a.hours(), minute: a.minutes(), second: a.seconds(), millisecond: a.milliseconds() } }) }(window.moment), +function (a, b) { "use strict"; b.module("ngQuantum.datepicker", ["ngQuantum.popMaster"]).run(["$templateCache", function (a) { a.put("datepicker/datepicker.tpl.html", '<div tabindex="-1" class="calendar-panel" role="listbox"><div tabindex="-1" class="calendar-header" role="listbox"></div><div tabindex="-1" class="calendar-body" role="listbox"></div><div tabindex="-1" class="calendar-footer" role="listbox"></div></div>') }]).provider("$datepicker", function () { var c = this.defaults = { format: "MM-DD-YYYY", timeFormat: "HH:mm:ss", headerFormat: "MMMM YYYY", timepicker: !1, datepicker: !0, rangepicker: !1, timeView: !1, showEvents: !1, weekNumber: !1, minDate: !1, minDateFrom: !1, maxDate: !1, startDate: !1, minHour: 0, maxHour: 23, divideHour: 4, defaultTime: !1, timesSet: [], todayButton: !0, rangeType: "day", minRange: 1, maxRange: !1, defaultSelect: !0, allowBlank: !1, showYears: !0, minYear: 1950, maxYear: 2050, dayOfWeekStart: 1, disableWeekends: !1, disableWeekdays: [], specialDays: [], dayHeader: "shortest", effect: "flip-y", typeClass: "datepicker", prefixClass: "calendar", prefixEvent: "datepicker", instanceName: "datepicker", placement: "bottom-left", template: "datepicker/datepicker.tpl.html", trigger: "click", container: "body", showArrow: !0, allowWrite: !1, autoHide: !0, html: !0, displayReflow: !1, fireEmit: !0, keyboard: !0, show: !1, inline: !1, theme: "default", selectable: !0, readonly: !0, overseeingTarget: !0, modelType: "date", nextIcon: "fic fu-angle-r", prevIcon: "fic fu-angle-l", todayIcon: "fic fu-restore", closeIcon: "fic fu-cross", timeIcon: "fic fu-time", downIcon: "fic fu-angle-d", upIcon: "fic fu-angle-u" }; this.$get = ["$compile", "$popMaster", "$parse", "$helpers", "$timeout", function (d, e, f, g, h) { function i(i, j, k, l) { function m(a) { K = T.$target, K && (p(K), K.addClass(J.rangepicker ? "picker-datarange" : J.timepicker ? "picker-datetime" : "picker-date"), J.datepicker && u(), J.timepicker && x(), J.showYears && J.datepicker && v(), J.datepicker && !a && n(), J.timepicker && !J.datepicker && (T.$builded = !0)) } function n() { if (M || m(!0), !J.timepicker || J.datepicker) { var a = y(U.currentDate); if (!S || a != S) { S = a; var b = T.caches[a]; b || (b = o(a)), I(function () { U.dayArray = b.dayArray }), M.find("td.selected").removeClass("selected"), Q.html(b.content), d(M)(U), T.$builded = !0 } } } function o(a) { var b = U.currentDate, c = [], d = b.month(), e = b.clone().startOf("month"), f = e.clone().endOf("month"), g = parseInt(J.dayOfWeekStart), h = e.clone().day(g), i = f.clone().day(g); h > e && h.add(-7, "day"), f >= i && i.add(7, "day"); for (var j = i.diff(h, "day"), k = 0; j > k; k++) { var l = h.clone().add(k, "day"), m = { day: l.date(), month: l.month(), isWeekend: l.isWeekend() }; J.disableWeekdays.length && J.disableWeekdays.indexOf(l.day()) > -1 && (m.unselectable = !0), d != l.month() && (m.outMonth = !0), J.weekNumber && (m.week = l.week()), U.minDate && l < U.minDate && (m.unselectable = !0), U.maxDate && l > U.maxDate && (m.unselectable = !0), c.push(m) } return T.caches[a] = { dayArray: c }, U.dayArray = c, T.caches[a].content = s(), T.caches[a] } function p(a) { L = a.find(".calendar-header"), M = a.find(".calendar-body"), N = a.find(".calendar-footer") } function q(a, c) { var d = b.isString(a) ? moment(a, J.format) : b.isDate(a) ? moment(a) : moment.isMoment(a) ? a.clone() : c; return moment.isMoment(d) ? d : moment() } function r() { if (J.datepicker || J.timepicker || (J.datepicker = !0), b.isArray(J.disableWeekdays) || (J.disableWeekdays = []), J.disableWeekends && (J.disableWeekdays = J.disableWeekdays.concat([0, 6])), J.minDate && (U.minDate = "today" == J.minDate ? moment() : q(J.minDate, moment()), J.minYear = U.minDate.year(), U.minDate.clearTime()), J.maxDate && (U.maxDate = q(J.maxDate, moment()), J.maxYear = U.maxDate.year(), U.maxDate.clearTime()), U.startDate = J.startDate ? q(J.startDate, moment()) : U.minDate && moment() < U.minDate ? U.minDate.clone() : U.maxDate && moment() > U.maxDate ? U.maxDate.clone() : moment(), U.currentDate = U.startDate.clone(), U.format = J.format, J.disableWeekdays.length) for (; J.disableWeekdays.indexOf(U.currentDate.day()) > -1;)U.currentDate.add(-1, "day"); if (J.timepicker) { if (J.minHour = b.isNumber(J.minHour) && J.minHour >= 0 ? J.minHour : 8, J.maxHour = b.isNumber(J.maxHour) && J.maxHour || 22, J.divideHour = b.isNumber(J.divideHour) && J.divideHour || 4, (J.minHour < 0 || J.minHour > 23) && (J.minHour = 0)(J.maxHour > 24 || J.maxHour < 2) && (J.maxHour = 24), J.divideHour > 30) J.divideHour = 0; else for (; 60 % J.divideHour != 0;)J.divideHour++; C() } else U.currentDate.clearTime(); U.currentDate.hour() < J.minHour && U.currentDate.hour(J.minHour).minute(0).second(0), J.defaultRange || (J.defaultRange = J.minRange), U.selectedDay = U.currentDate.month() + "-" + U.currentDate.date() } function s() { if (M || m(!0), !P) { P = b.element("<table/>").addClass("calendar-table"); var a = b.element("<thead/>").appendTo(P); Q = b.element("<tbody/>").appendTo(P); var c = (b.element("<tfoot/>").appendTo(P), "shortest" == J.dayHeader ? moment.localeData()._weekdaysMin || moment.localeData()._weekdaysShort : moment.localeData()._weekdaysShort); if (J.dayOfWeekStart > 0) { var d = c.slice(J.dayOfWeekStart, 7), e = c.slice(0, J.dayOfWeekStart); c = d.concat(e) } var f = b.element("<tr><th>" + c.join("</th><th>") + "</th></tr>").appendTo(a); J.weekNumber && (P.addClass("has-week-no"), f.prepend('<th class="cal-week-no">W</th>')); var g = function () { return P.width() }; U.$watch(g, function () { })(), U.$watch(g, function () { setTimeout(function () { O && O.css("width", P.width()) }, 0) }), M.html(P) } return t() } function t() { var a = b.element("<tbody/>"), c = parseInt(U.dayArray.length / 7); U.dayArray.length % 7 > 0 && c++; for (var d = 0, e = 0; c > e; e++) { var f = b.element("<tr></tr>").appendTo(a), g = 7 * (e + 1); g > U.dayArray.length && (g = U.dayArray.length); var h = U.dayArray.slice(7 * e, g); J.weekNumber && f.append('<th class="cal-week-no">' + h[0].week + "</th>"), b.forEach(h, function (a) { var c = a.month + "-" + a.day, e = b.element('<td cal-date-item="' + d + '" ng-class="{selected:selectedDay==\'' + c + "'}\">" + a.day + "</td>").appendTo(f); a.unselectable && e.addClass("unselectable"), a.isWeekend && e.addClass("weekend"), a.outMonth && e.addClass("out-month"), d++ }) } return a.html() } function u() { var a = '<table class="cal-header-table"><tr><td class="before"><button data-title="Before" class="titip-top" type="button" ng-click="$before()"><i ng-class="$options.prevIcon"></i></button></td><td class="date-head"><span>{{currentMonthTitle}}</span></td><td class="today"><button data-title="Today" class="titip-top" type="button" ng-click="$today($event)"><i ng-class="$options.todayIcon"></i></button></td><td class="next"><button data-title="Next" class="titip-top" type="button" ng-click="$next()"><i ng-class="$options.nextIcon"></i></button></td><td class="hide-cal"><button data-title="Close" class="titip-top" type="button" ng-click="$hide()"><i ng-class="$options.closeIcon"></i></button></td></tr></table>'; a = b.element(a), d(a)(U), L.html(a) } function v() { if (J.showYears) { O = b.element('<div class="year-selector" ng-hide="yearsArray.length < 2" nq-scroll="" data-qo-axis="x" data-qo-bar-size="slimmest" data-qo-placement-offset="0" data-qo-visible="true"></div>').appendTo(N); var a = b.element('<div class="selector-inner"></div>').appendTo(O); J.theme && O.attr("data-qo-theme", J.theme), w(), a.append('<a role="button" tabindex="1" id="year-{{year}}" ng-repeat="year in yearsArray" ng-click="$gotoYear(year, $event)" ng-class="{active:currentYear == year}"><span>{{year}}</span></a>'), T.yearSelector = O, d(O)(U) } } function w() { U.yearsArray = []; for (var a = J.minYear; a <= J.maxYear; a++)U.yearsArray.push(a) } function x() { if (J.timepicker) { var a = b.element('<div role="presentation" tabindex="-1" class="dp-container clearfix"></div>').appendTo(M), c = b.element('<div class="tp-container clearfix"></div>').appendTo(M), e = (b.element('<div class="tp-switcher" time-picker-switch="" data-time-icon="$options.timeIcon"  data-close-icon="$options.closeIcon"></div>').appendTo(c), D().appendTo(c)); d(c)(U), U.timePickerTemp = T.timePickerTemp = e, M = a, U.$toggleTimepicker = function () { I(function () { U.timePickerTemp.toggle(), T.yearSelector && T.yearSelector.toggle(), L.toggle(), a.toggle(), c.toggleClass("tp-visible"), U.$timeViewActive = !U.$timeViewActive, U.$timeViewActive && ("list" == J.timeView && A(), a.focus()) }) } } } function y(a) { return a.year() + a.month() } function z() { T.yearSelector && h(function () { var a = "#year-" + (U.currentYear - 3), b = T.yearSelector.data("$scrollBar"); b && b.scrollTo(a) }, 0) } function A() { T.timeListContainer && h(function () { var a = T.timeListContainer.find("a.active"); if (a.length) { var b = T.timeListContainer.data("$scrollBar"), c = a[0].offsetTop - 30; b && b.scrollTo(c), a.first().focus() } else T.timeListContainer.find("a").first().focus() }, 0) } function B(a) { switch (a) { case "date": case "day": case "month": case "year": U.$broadcast("pickerDateChanged"); break; case "hour": case "second": case "minute": case "time": U.$broadcast("pickerTimeChanged"); break; default: U.$broadcast("pickerDatetimeChanged") }I(function () { U.currentDateObject = U.currentDate.toObject() }) } function C() { if ("list" == J.timeView) { J.format = J.format.replace(":ss", "").replace("ss", ""); var a = U.currentDate.hour(); a < J.minHour ? U.currentDate.hour(J.minHour) : a > J.maxHour && U.currentDate.hour(J.maxHour); var b = U.currentDate.minutes(); b -= b % parseInt(60 / J.divideHour), U.currentDate.minute(b), U.currentDate.second(0), U.currentTimeString = U.currentDate.format("HH:mm") } } function D() { var a = b.element('<div class="cal-timepicker"></div>'), c = J.format.indexOf("HH") > -1, d = J.format.indexOf("mm") > -1, e = J.format.indexOf("ss") > -1; if ("list" != J.timeView) { var f = '<table class="tp-table"><tbody><tr>'; f += c ? '<td><button ng-class="\'btn-\' + $options.theme" type="button" class="btn tp-up" ng-click="$changeTime(\'up\',\'hour\')"><i ng-class="$options.upIcon"></i></button></td>' : "", f += c ? '<td class="tp-seperator"></td>' : "", f += d ? '<td><button ng-class="\'btn-\' + $options.theme" type="button" class="btn tp-up" ng-click="$changeTime(\'up\',\'minute\')"><i ng-class="$options.upIcon"></i></button></td>' : "", f += d ? '<td class="tp-seperator"></td>' : "", f += e ? '<td><button ng-class="\'btn-\' + $options.theme" type="button" class="btn tp-up" ng-click="$changeTime(\'up\',\'second\')"><i ng-class="$options.upIcon"></i></button></td>' : "", f += "</tr><tr>", f += c ? '<td tp-bind-time="hour"></td>' : "", f += c ? '<td class="tp-seperator">:</td>' : "", f += d ? '<td tp-bind-time="minute"></td>' : "", f += d ? '<td class="tp-seperator">:</td>' : "", f += e ? '<td tp-bind-time="second"></td>' : "", f += "</tr><tr>", f += c ? '<td><button ng-class="\'btn-\' + $options.theme" type="button" class="btn tp-down" ng-click="$changeTime(\'down\',\'hour\')"><i ng-class="$options.downIcon"></i></button></td>' : "", f += c ? '<td class="tp-seperator"></td>' : "", f += d ? '<td><button ng-class="\'btn-\' + $options.theme" type="button" class="btn tp-down" ng-click="$changeTime(\'down\',\'minute\')"><i ng-class="$options.downIcon"></i></button></td>' : "", f += d ? '<td class="tp-seperator"></td>' : "", f += e ? '<td><button ng-class="\'btn-\' + $options.theme" type="button" class="btn tp-down" ng-click="$changeTime(\'down\',\'second\')"><i ng-class="$options.downIcon"></i></button></td>' : "", f += "</tr></tbody></table>", a.append(f) } else { var g = []; if (J.timesSet.length) b.forEach(J.timesSet, function (a) { a = a.replace(" ", ""), E(a) && g.push(a) }); else { for (var h = J.minHour, i = J.maxHour, j = J.divideHour, k = 60 / j, l = h; i > l; l++)for (var m = 0; j > m; m++) { var n = m * k, o = 10 > l ? "0" + l : l; o += ":", o += 10 > n ? "0" + n : n, g.push(o) } g.push(i + ":00") } U.timesList = g; var p = b.element('<div class="tp-time-list" nq-scroll="" data-qo-bar-size="slimmest" data-qo-placement-offset="0" data-qo-visible="true"><a class="tp-time" role="button" tabindex="1" ng-repeat="time in timesList" tp-time-list-item="time"  ng-class="{active:$parent.currentTimeString == time}"></a></div>'); J.theme && p.attr("data-qo-theme", "$options.theme"), a.append(p), T.timeListContainer = p } return a } function E(a) { return /^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(a) } function F() { U.hasModel && h(function () { l.$setViewValue("date" == J.modelType ? U.currentDate.clone().toDate() : U.currentDate.format(U.format)), l.$commitViewValue() }, 0) } function G() { if (b.forEach(["onDateChange", "onTimeChange", "onChange"], function (a) { b.isDefined(J[a]) && !b.isFunction(J[a]) && (J[a] = f(J[a])) }), l) { U.hasModel = !0; var a = l.$render; l.$render = function () { if ("date" == J.modelType) { var b = U.currentDate.format(U.format); "input" === i[0].tagName.toLowerCase() ? i.val(b) : i.html(b) } else a() }, U.$parent.$watch(k.ngModel, function (a) { a && I(function () { var c; if (b.isDate(a) ? (J.modelType = "date", c = moment(a)) : c = b.isString(a) ? moment(a, U.format) : moment.isMoment(a) ? a : moment(), !c.isValid()) throw "Type Error: " + k.ngModel + " is not a valid Date, moment or date string..."; if (J.timepicker) { var d = c.hour(); d < J.minHour && c.hour(J.minHour), d > J.maxHour && c.hour(J.maxHour).minute(0) } U.currentDate = c.clone(), U.selectedDay = U.currentDate.month() + "-" + U.currentDate.date(), U.modelSetted || (U.modelSetted = !0, B(), n()), l.$render(), U.modelDate = U.currentDate.clone().toDate(), J.autoHide && !J.timepicker && T.hide() }) }) } if (J.minDateFrom) { var c = b.element(J.minDateFrom); if (c.length) { var d = !1, e = c.data("$datepicker"), g = e && e.$scope; g && g.$watch("modelDate", function (a) { a && I(function () { var b = moment(a); U.minDate = b.clone().add(J.minRange, J.rangeType), U.currentDate = b.clone().add(J.defaultRange, J.rangeTypee), U.selectedDay = U.currentDate.month() + "-" + U.currentDate.date(), T.caches = {}, J.minYear = U.minDate.year(), J.maxRange && (U.maxDate = b.clone().add(J.maxRange, J.rangeType), J.maxYear = U.maxDate.year()), w(), n(), B(), d = !0 }) }), g && g.$on(J.prefixEvent + ".hide", function () { d && T.show(), d = !1 }) } } if (J.iconId) { var h = b.element(J.iconId); h.length && (h.on("click", function () { T.toggle() }), U.$on("$destroy", function () { h.off("click") })) } U.$watch("selectedIndex", function (a, b) { if (a != b) { var c = a; c >= U.dayArray.length && (c = U.dayArray.length - 1); var d = U.dayArray[c]; U.selectedDay = d.month + "-" + d.day; var e = d.month - U.currentDate.month(); 0 != e && (e > 0 && 11 != e || -11 == e ? T.next() : (0 > e || 11 == e) && T.before()), U.currentDate.date(d.day), U.currentDate.month(d.month), B("date"), F() } }), U.$watch("currentDateObject.month", function (a, b) { a != b && b && (U.selectedDay = U.selectedDay.replace(b + "-", a + "-")) }), U.$on("pickerTimeChanged", function () { H(), b.isFunction(J.onTimeChange) && J.onTimeChange(U, { $currentDate: U.currentDate.toDate() }), b.isFunction(J.onChange) && J.onChange(U, { $currentDate: U.currentDate.toDate() }) }), U.$on("pickerDatetimeChanged", function () { H(), b.isFunction(J.onChange) && J.onChange(U, { $currentDate: U.currentDate.toDate() }) }), U.$on("pickerDateChanged", function () { H(), b.isFunction(J.onDateChange) && J.onDateChange(U, { $currentDate: U.currentDate.toDate() }), b.isFunction(J.onChange) && J.onChange(U, { $currentDate: U.currentDate.toDate() }) }) } function H() { "list" == J.timeView && A(), U.currentMonthTitle = U.currentDate.format(J.headerFormat), U.currentYear = U.currentDate.year(), J.showYears && z() } function I(a) { U.$$phase ? a() : U.$apply(function () { a() }) } j = g.parseOptions(k, j); var J = b.extend({}, c, j); J.inline && (J.show = !0, J.trigger = !1, J.showArrow = !1, J.container = "self", i.addClass("calendar-inline"), J.effect = !1, J.autoHide = !1, J.readonly = !1); var K, L, M, N, O, P, Q, R, S, T = new e(i, J), U = T.$scope; U.$options = J = g.observeOptions(k, J), T.caches = {}, b.forEach(["next", "before", "today", "gotoYear"], function (a) { U["$" + a] = function (b) { U.$$postDigest(function () { T[a](b) }) } }), U.$gotoYear = function (a, b) { b && (b.preventDefault(), T.preventHide = !0), U.$$postDigest(function () { T.gotoYear(a) }) }, U.$select = function (a, b) { U.$$postDigest(function () { T.select(a, b) }) }, U.$setTime = function (a) { U.$$postDigest(function () { T.setTime(a) }) }, U.$changeTime = function (a, b, c) { U.$$postDigest(function () { T.changeTime(a, b, c) }) }; var V = T.init; T.init = function () { r(), V(), R || (R = !0, G()), J.allowWrite || i.on("keydown", function () { return !1 }), K = T.$target }; var W = T.show; T.show = function () { T.$builded || m(); var a = W(); return a && a.then(function () { H(), K.focus() }), J.keyboard && T.$target && (b.element(document).off("keydown", T.$onKeyDown), b.element(document).on("keydown", T.$onKeyDown)), a }; var X = T.hide; T.hide = function () { if (T.preventHide) return T.preventHide = !1, !1; var a = X(); return a && a.then(function () { U.$timeViewActive && J.datepicker && U.$toggleTimepicker(), i && i.focus() }), J.keyboard && T.$target && b.element(document).off("keydown", T.$onKeyDown), a }; var Y = T.destroy; return T.destroy = function () { Y(), U.$destroy() }, T.next = function () { T.changeDate("up", "month", 1) }, T.before = function () { T.changeDate("down", "month", 1) }, T.changeDate = function (c, d, e) { var f = e ? b.isNumber(e) ? e : a.isNaN(parseInt(e)) ? 1 : parseInt(e) : 1; f = "down" == c ? -f : f, d = d || "day"; var g = U.currentDate.clone().add(f, d); U.minDate && g.clone().endOf("month") < U.minDate || U.maxDate && g.clone().startOf("month") > U.maxDate || I(function () { if (U.minDate && g < U.minDate && (g = U.minDate.clone()), U.maxDate && g > U.maxDate && (g = U.maxDate.clone()), J.disableWeekdays.length) for (; J.disableWeekdays.indexOf(g.day()) > -1;)g.add(1, "day"); U.selectedDay = g.month() + "-" + g.date(), U.currentDate = g.clone(), B(d), n() }) }, T.today = function (a) { a && (a.preventDefault(), T.preventHide = !0), I(function () { U.currentDate = U.minDate && U.startDate < U.minDate ? U.minDate.clone() : U.maxDate && U.startDate > U.maxDate ? U.maxDate.clone() : U.startDate.clone(), n(), U.modelSetted = !0, F(), B(), U.selectedDay = U.currentDate.month() + "-" + U.currentDate.date() }) }, T.gotoYear = function (a) { I(function () { U.currentDate.year(a), n(), U.modelSetted = !0, F(), B("year") }) }, T.setTime = function (b) { var c = U.currentDate.clone(), d = parseInt(b.split(":")[0]), e = parseInt(b.split(":")[1]) || 0; a.isNaN(d) && (d = J.minHour), c.hour(d), c.minute(e), I(function () { U.currentDate = c, U.modelSetted = !0, F(), B("time") }), J.datepicker ? U.$toggleTimepicker() : J.autoHide && T.hide() }, T.changeTime = function (c, d, e) { var f = e ? b.isNumber(e) ? e : a.isNaN(parseInt(e)) ? 1 : parseInt(e) : 1; f = "down" == c ? -f : f; var g = U.currentDate.clone().add(f, d), h = g.hour(); h >= J.minHour && h <= J.maxHour && (U.currentDate = g.clone(), U.modelSetted = !0, F(), B(d)) }, T.$onKeyDown = function (a) { if (!/(13|37|38|39|40)/.test(a.keyCode)) return !0; if (!a.isDefaultPrevented()) { var c, d, e = U.$timeViewActive, f = a.keyCode; if (e) 13 == f && (J.timepicker && J.datepicker && a.ctrlKey ? U.$toggleTimepicker() : "a" == a.target.tagName.toLowerCase() && b.element(a.target).triggerHandler("click")); else { switch (a.preventDefault(), f) { case 37: case 38: c = "down", d = a.ctrlKey ? 37 == f ? "month" : "year" : 37 == f ? "day" : "week"; break; case 39: case 40: c = "up", d = a.ctrlKey ? 39 == f ? "month" : "year" : 39 == f ? "day" : "week" }13 == f ? a.altKey ? T.today() : F() : c && d && T.changeDate(c, d, 1) } } return !0 }, T } return i }] }).directive("timePickerSwitch", function () { return { restrict: "AC", link: function (a, c, d) { var e = b.element('<a href="#" class="tps-btn"></a>').append('<i class="' + a.$eval(d.timeIcon) + '"></i>').appendTo(c), f = b.element("<span>Time</span>").appendTo(e); a.$on("pickerTimeChanged", function () { var b = "list" == a.$options.timeView ? "HH:mm" : "HH:mm:ss"; f.html(a.currentDate.format(b)) }), c.on("click", function (b) { b.preventDefault(), b.stopPropagation(), a.$options.datepicker ? a.$toggleTimepicker() : a.$apply(function () { a.$hide() }) }), a.$options.datepicker || a.$$postDigest(function () { a.$toggleTimepicker() }), c.append('<a class="tp-close" title="Close"><i class="' + a.$eval(d.closeIcon) + '"></i></a>'), a.$on("$destroy", function () { c.off("click") }) } } }).directive("tpBindTime", function () { return { restrict: "AC", link: function (a, b, c) { var d = c.tpBindTime; a.$watch("currentDateObject." + d, function () { switch (d) { case "hour": b.html(a.currentDate.format("HH")); break; case "minute": b.html(a.currentDate.format("mm")); break; case "second": b.html(a.currentDate.format("ss")) } }) } } }).directive("tpTimeListItem", function () { return { restrict: "AC", link: function (a, b) { var c = a.time; b.html("<span>" + c + "</span>"), b.on("click", function () { a.$parent.$apply(function () { a.$parent.currentTimeString = c, a.$parent.$setTime(c) }) }), a.$on("$destroy", function () { b.off("click") }) } } }).directive("calDateItem", function () { return { restrict: "AC", link: function (a, b, c) { { var d = parseInt(c.calDateItem); a.$options } b.hasClass("unselectable") || b.on("click", function (b) { b.preventDefault(), a.$parent.$apply(function () { a.selectedIndex != d ? a.selectedIndex = d : a.$hide() }) }), a.$on("$destroy", function () { b.off("click") }) } } }).directive("nqDatepicker", ["$datepicker", function (a) { return { restrict: "EAC", require: "?ngModel", link: function (c, d, e, f) { var g = { $scope: c.$new() }; if (b.isDefined(e.qoMode)) { var h = e.qoMode; /datetime|time/.test(h) && (g.timepicker = !0, e.qoFormat ? "time" == h && (g.datepicker = !1) : "datetime" == h ? g.format = "MM-DD-YYYY HH:mm:ss" : (g.format = "HH:mm:ss", g.datepicker = !1)) } var i = new a(d, g, e, f); d.data("$datepicker", i), c.$on("$destroy", function () { i && i.destroy(), g = null, i = null }) } } }]) }(window, window.angular), angular.module("ngQuantum.dropdown", ["ngQuantum.popMaster"]).run(["$templateCache", function (a) { "use strict"; a.put("dropdown/dropdown.tpl.html", '<ul tabindex="-1" class="dropdown-menu" role="menu"><li role="presentation" ng-class="{divider: item.divider}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$parent.$eval(item.click);$hide();" ng-bind="item.text"></a></li></ul>') }]).provider("$dropdown", function () {
	var a = this.defaults = { effect: "flip-x", typeClass: "dropdown", prefixEvent: "dropdown", placement: "bottom-left", template: "dropdown/dropdown.tpl.html", trigger: "click", directive: "nqDropdown", instanceName: "dropdown", ensurePlacement: !0, showArrow: !1, fireEmit: !0, displayReflow: !1, keyboard: !0, fixWidth: !0 }; this.$get = ["$timeout", "$rootScope", "$popMaster", "$helpers", function (b, c, d, e) {
		function f(b, c, f) {
			var g = {}; c = angular.extend(c, e.parseOptions(f, c)); var h = angular.extend({}, a, c); if (!h.independent) { var i; h.target ? i = angular.element(h.target) : (i = angular.element(b.find(".dropdown-container, .dropdown-menu")[0]), i.length < 1 && (i = angular.element(b.next(".dropdown-container, .dropdown-menu")[0]))), i.length > 0 && (h.targetElement = i) } g = new d(b, h), h = g.$options = e.observeOptions(f, g.$options); var j = g.$scope; g.$onKeyDown = function (a) { if (/(38|40|13)/.test(a.keyCode)) { a.preventDefault(), a.stopPropagation(); var b = g.$target.find('[role="menuitem"]:visible'); if (g.$target.focus(), b.length) { var c = j.lastIndex > -1 ? j.lastIndex : -1; if (38 == a.keyCode && c > 0 && c-- , 40 == a.keyCode && c < b.length - 1 && c++ , ~c || (c = 0), 13 === a.keyCode) return angular.element(b[c]).trigger("click"); b.eq(c).focus(), j.lastIndex = c } } }; var k = g.show; g.show = function (a) {
				var c = k(a); if (angular.element(document).off("keydown.nqDropdown.api.data"), angular.element(document).on("keydown.nqDropdown.api.data", g.$onKeyDown), j.$$phase ? g.$target.focus() : j.$apply(function () {
					g.$target.focus()
				}), !h.independent && h.fixWidth) { var d = b.outerWidth(!0), e = g.$target.outerWidth(!0); d > e && g.$target.css("min-width", d) } return b.parent().addClass("open"), c
			}; var l = g.hide; return g.hide = function (a) { return j.lastIndex = -1, angular.element(document).off("keydown.nqDropdown.api.data"), b.parent().removeClass("open"), l(a) }, f && angular.isDefined(h.directive) && f[h.directive] && h.$scope.$watch(f[h.directive], function (a) { j.content = a }, !0), h.autoDestroy && j.$on("$destroy", function () { g && g.destroy(), g = null }), g
		} return f
	}]
}).directive("nqDropdown", ["$dropdown", "templateHelper", function (a) { return { restrict: "EA", link: function (b, c, d) { var e = { $scope: b.$new() }; e.uniqueId = d.qoUniqueId || d.id || e.$scope.$id, d.qoTrigger && d.qoTrigger.indexOf("hover") > -1 && (e.holdHoverDelta = !0, e.delayHide = 100, e.delayShow = 10); var f = {}; angular.isDefined(d.qoIndependent) ? (e.independent = !0, e.html = !0, e.displayReflow = !1, e.targetElement = c, e.fireEmit = !0, f = new a(null, e, d)) : f = new a(c, e, d), b.$on("$destroy", function () { f = null }), c.data("$nqDropdown", f) } } }]), angular.module("ngQuantum.loading", ["ngQuantum.services.lazy"]).run(["$http", "$rootScope", "$timeout", function (a, b, c) { b.$watch(function () { return a.pendingRequests.length }, function (a, d) { b.$pendingRequestCount = b.$pendingRequestCount || 0, c(function () { b.$pendingRequestCount = b.$pendingRequestCount + (a - d) }, 0) }) }]).provider("$loading", function () { var a = this.defaults = { placement: "top", container: "body", backdrop: !1, timeout: 2e3, delayHide: 500, theme: !1, showBar: !0, showSpinner: !0, spinnerIcon: '<i class="fic spin-icon fu-spinner-fan spin"></i>', busyText: "Loading..." }; this.$get = ["$timeout", "$rootScope", "$compile", "$http", function (b, c, d, e) { function f(f, g, h) { function i() { var a = '<div class="loading-container"  ng-class="loadingTheme"><div class="progress" ng-show="showBar"><div class="progress-bar active" ng-class="progressTheme" role="progressbar" ng-style="{\'width\':currentRate + \'%\'}" aria-valuenow="{{currentRate}}" aria-valuemin="0" aria-valuemax="100"></div></div><div class="spinner-container"><div class="busy-text">' + k.spinnerIcon + " {{busyText}}</div></div></div>"; return a } var j = {}; angular.isString(f) && (f = { busyText: f, theme: g, placement: h }); var k = j.$options = angular.extend({}, a, f), l = angular.isElement(k.container) ? k.container : angular.element(k.container); l.length || (l = angular.element("body")); var m = j.$scope = k.$scope || c.$new(), n = angular.element(i()), o = "body" == k.container ? "prepend" : "append"; return d(n)(m), b(function () { l[o](n) }, 0), m.busyText = k.busyText, k.theme && (m.loadingTheme = "loading-" + k.theme, m.progressTheme = "progress-bar-" + k.theme), m.showBar = k.showBar, m.showSpinner = k.showSpinner, m.currentRate = 0, k.placement && n.addClass("loading-" + k.placement), j.show = function () { n.css("display", "block"), j.isShown = !0, k.showBar && b(function () { m.currentRate = 0, j.updateProgress() }, 0), k.timeout !== !1 && b(function () { j.hide() }, k.timeout) }, j.hide = function () { j.isShown && (m.currentRate = 100, b(function () { n.css("display", "none"), m.currentRate = 0, j.isShown = !1 }, k.delayHide)) }, j.updateProgress = function (a) { !j.isShown || e.$pendingRequestCount > 0 || (a ? m.currentRate = a : (m.currentRate < 100 && (m.currentRate = m.currentRate + (m.currentRate < 80 ? 5 : parseInt(100 - m.currentRate) / 2)), b(function () { m.currentRate < 99 && j.updateProgress() }, 20))) }, m.$on("$destroy", function () { j = null }), c.$watch("$pendingRequestCount", function (a) { 0 >= a && (e.$pendingRequestCount = 0, b(function () { j.hide() }, 10)) }), j } return f }] }), angular.module("ngQuantum.loadingButton", ["ngQuantum.services.helpers"]).provider("$loadingButton", function () { var a = this.defaults = { timeout: 2e3, onError: angular.noop, onSuccess: angular.noop, loadingText: "Loading...", showIcons: !0, spinner: '<i class="fic fu-spinner-circle spin"></i> ', successIcon: '<i class="fic fu-check  flash"></i>', errorIcon: '<i class="fic fu-cross-c flash red"></i> ', timeoutIcon: '<i class="fic fu-bell-off"></i> ' }; this.$get = function () { return { defaults: a } } }).directive("nqLoadingButton", ["$parse", "$loadingButton", "$helpers", "$timeout", "$q", function (a, b, c, d, e) { return { restrict: "A", link: function (d, f, g) { function h(a) { f.css("display", "none"), f.after(k), e.when(i(d, { $event: a })).then(function (b) { return f.css("display", ""), k.remove(), m && f.prepend(m), m && setTimeout(function () { m.remove() }, j.timeout), j.onSuccess(d, { $event: a, $data: b }), b }, function (b) { f.css("display", ""), k.remove(), l && f.prepend(l), j.onError(d, { $event: a, $data: b }), l && setTimeout(function () { l.remove() }, j.timeout) }) } var i = a(g.nqLoadingButton), j = angular.extend({}, b.defaults); angular.forEach(["onSuccess", "onTimeout", "onError"], function (b) { angular.isDefined(g[b]) && (j[b] = a(g[b])) }), angular.forEach(["loadingText", "showIcons", "timeout"], function (a) { angular.isDefined(g[a]) && (j[a] = c.parseConstant(g[a])) }); var k = f.clone(); k.attr("disabled", "disabled").html(j.loadingText), j.showIcons && k.prepend(j.spinner); var l, m; j.showIcons && (m = angular.isElement(j.successIcon) ? j.successIcon : angular.element(j.successIcon), l = angular.isElement(j.errorIcon) ? j.errorIcon : angular.element(j.errorIcon)), f.on("click", function (a) { d.$apply(function () { h(a) }) }) } } }]), angular.module("ngQuantum.modal", ["ngQuantum.popMaster"]).run(["$templateCache", function (a) { "use strict"; a.put("modal/modal.tpl.html", '<div class="modal" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body"  ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">{{closeText}}</button></div><button type="button" class="close" ng-click="$hide()" ng-bind-html="closeIcon">&nbsp;</button></div></div></div>'), a.put("modalbox/alertbox.tpl.html", '<div class="modal" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body"><div class="modal-body-inner" ng-bind="content"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="$hide()">{{okText}}</button></div><button type="button" class="close" ng-click="$hide()" ng-bind-html="closeIcon">&nbsp;</button></div></div></div>'), a.put("modalbox/confirmbox.tpl.html", '<div class="modal" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body"><div class="modal-body-inner" ng-bind="content"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="$cancel()">{{cancelText}}</button> <button type="button" class="btn btn-success" ng-click="$confirm()">{{confirmText}}</button></div><button type="button" class="close" ng-click="$cancel()" ng-bind-html="closeIcon">&nbsp;</button></div></div></div>'), a.put("modalbox/promptbox.tpl.html", '<div class="modal" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body"><div class="modal-body-inner" ng-bind="content"></div><div class="margin-t form-group"><label for="promptModel">{{promptLabel}}</label><input type="text" class="form-control" name="promptModel" ng-model="promptModel"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="$cancel()">{{cancelText}}</button> <button type="button" class="btn btn-success" ng-click="$confirm()">{{confirmText}}</button></div><button type="button" class="close" ng-click="$cancel()" ng-bind-html="closeIcon">&nbsp;</button></div></div></div>') }]).provider("$modal", function () { var a = this.defaults = { effect: "from-top", backdropEffect: "fade-in", animateTarget: ".modal-dialog", typeClass: "modal", prefixEvent: "modal", directive: "nqModal", placement: "near-top", uniqueId: "nq-modal", trigger: "click", clearExists: !1, template: "modal/modal.tpl.html", contentTemplate: !1, container: !1, element: null, backdrop: !0, keyboard: !0, closeText: "Close", closeIcon: '<i class="fic fu-cross"></i>', buildOnShow: !0, html: !1, size: !1, displayReflow: !1, show: !1, autoDestroy: !1 }; this.$get = ["$window", "$compile", "$http", "$sce", "$timeout", "$helpers", "$popMaster", function (b, c, d, e, f, g, h) { function i(b, c) { function d() { "static" === p.backdrop ? n.focus() : n.hide() } function f(a) { var b = n.$target.find(".custom-footer"); !b.length && p.htmlObject && (b = q.content.find(".custom-footer")), !b.length && a && a.find && (b = a.find(".custom-footer")); var c = n.$target.find(".modal-footer"); b.length && c.length && (c.replaceWith(b.addClass("modal-footer")), n.customFooter = b) } function i(a) { var b = n.$target.find(".custom-header"); !b.length && p.htmlObject && (b = q.content.find(".custom-header")), !b.length && a && a.find && (b = a.find(".custom-header")); var c = n.$target.find(".modal-header"); b.length && c.length && (q.title = !0, c.replaceWith(b.addClass("modal-header"))) } function j() { if (!n.$target) return setTimeout(function () { j() }, 10), !1; var a = n.$target.find(".modal-content"), b = (n.$target.find(".modal-body"), n.$target.find(".modal-header")), c = n.$target.find(".modal-footer"), d = n.$target.find(".modal-dialog"); if (p.screenMode) k(a, b, c); else { var e = n.$target.innerHeight(), f = d.outerHeight(!0); f > e ? (n.$target.addClass("modal-fix-height"), k(a, b, c)) : m(d, e - d.innerHeight()) } } function k(a, b, c) { var d = b.length ? b.outerHeight(!0) : 0, e = c.length ? c.outerHeight(!0) : 0; a.css({ "padding-top": d, "padding-bottom": e }), b.css("margin-top", -d) } function l() { n.$target.removeClass("modal-fix-height"), n.$target.find(".modal-content").css({ "padding-top": "", "padding-bottom": "" }), n.$target.find(".modal-header").css("margin-top", ""), n.$target.find(".modal-dialog").css("top", "") } function m(a, b) { if (b > 0) { var c = 0; switch (p.placement) { case "center": c = b / 2; break; case "bottom": c = b; break; case "near-top": c = b / 3; break; case "near-bottom": c = b / 3 * 2; break; default: c = 0 }a.css("top", c) } } var n = {}, o = b.element; b.$scope || (b.autoDestroy = !0, b.show = !0, b.html = !0, b.fireEmit = !0), c && (b = g.parseOptions(c, b)); var p = b = angular.extend({}, a, b); p.container = "body", p.preventReplace = !0, n = new h(o, p), p = c ? n.$options = g.observeOptions(c, n.$options) : n.$options; var q = n.$scope; b.content && (q.content = b.content), b.title && (q.title = b.title), q.closeText = p.closeText, q.closeIcon = p.closeIcon; var r = angular.element('<div class="' + p.typeClass + '-backdrop"/>'), s = n.init; n.init = function () { s(), n.$promise.then(function (a) { p.backdrop && r.prependTo(n.$target), p.screenMode ? n.$target.addClass("screen-mode") : n.$animateTarget && p.size && n.$animateTarget.addClass("modal-" + p.size), n.footerCheck(a), i(a), "hover" == p.trigger && o.off("mouseleave", n.leave) }) }; var t = n.destroy; n.destroy = function () { t(), r && (r.off("click"), r.remove(), r = null) }; var u = n.show; n.show = function () { var a = u(); return p.backdrop && (p.backdropEffect && (r.addClass("in"), r.show()), "static" !== p.backdrop && r.on("click", d)), "hover" == p.trigger && g.unBindTriggers(o, "hover", n), n.$animateTarget && p.size && n.$animateTarget.addClass("modal-" + p.size), setTimeout(function () { j() }, 0), a }; var v = n.hide; return n.hide = function () { p.backdrop && (p.backdropEffect && (r.addClass("fade"), r.removeClass("in")), "static" !== p.backdrop && r && r.off("click")), "hover" == p.trigger && o && g.bindTriggers(o, "hover", n); var a = v(); return a.then(function () { n.$animateTarget && p.size && n.$animateTarget.removeClass("modal-" + p.size), l(), p.autoDestroy && n && n.destroy() }), a }, n.footerCheck = f, c && (angular.forEach(["title", "content"], function (a) { var b = "qs" + a.capitaliseFirstLetter(); c[b] && (q[a] = e.trustAsHtml(c[b])), c.$$observers && c.$$observers[b] && c.$observe(b, function (b) { q[a] = e.trustAsHtml(b) }) }), angular.isDefined(p.directive) && c[p.directive] && p.$scope.$watch(c[p.directive], function (a) { angular.isObject(a) ? angular.isArray(a) ? q.content = a : angular.extend(q, a) : q.content = a }, !0)), q.$on("$destroy", function () { n && !n.isDestroyed && n.destroy(), n = null }), n } g.injectModule("$animate", "ngAnimate"), angular.forEach, angular.element(b.document.body); return i }] }).directive("nqModal", ["$modal", function (a) { return { restrict: "EAC", scope: !0, link: function (b, c, d) { var e = { $scope: b }; e.uniqueId = d.qoUniqueId || d.id || b.$id; var f = {}; angular.isDefined(d.qoIndependent) ? (e.htmlObject = !0, b.content = c, e.buildOnShow = !1, f = a(e, d)) : (e.element = c, e.html = !0, f = a(e, d)), c.data("$nqModal", f) } } }]).directive("modalBodyInner", function () { return { restrict: "C", require: "?nqModal", link: function (a, b) { b.on("scroll", function () { a.$broadcast("staticContentScroll", this.scrollTop) }) } } }), angular.module("ngQuantum.modalBox", ["ngQuantum.modal"]).provider("$modalBox", function () { var a = this.defaults = { effect: "slit", boxType: "alert", typeClass: "modalbox", instanceName: "modal", prefixEvent: "modalbox", directive: "nqModalBox", placement: "near-top", uniqueId: "nq-modalbox", trigger: "click", okText: "OK", cancelText: "Cancel", confirmText: "Confirm", template: !1, showIcon: !0, promptModel: "$promptValue", alertTemplate: "modalbox/alertbox.tpl.html", confirmTemplate: "modalbox/confirmbox.tpl.html", promptTemplate: "modalbox/promptbox.tpl.html" }; this.$get = ["$modal", "$parse", "$helpers", function (b, c) { function d(d, e) { function f() { switch (d.boxType) { case "alert": d.template = d.alertTemplate || a.alertTemplate; break; case "confirm": d.template = d.confirmTemplate || a.confirmTemplate; break; case "prompt": d.template = d.promptTemplate || a.promptTemplate; break; default: d.template = d.template || a.alertTemplate } } f(); var g, h = {}, i = (d.element, angular.extend({}, a, d)); e && angular.forEach(["afterOk", "afterConfirm", "afterCancel", "afterCustom"], function (a) { angular.isDefined(e[a]) && (i[a] = c(e[a])) }), h = new b(i, e), i = d = h.$options; var j = h.$scope; angular.forEach(["okText", "cancelText", "confirmText", "promptLabel"], function (a) { j[a] = i[a] }); var k = h.init; h.init = function () { k(), i.showIcon || h.$target.addClass("no-icon") }; var l = h.show; h.show = function () { "prompt" == i.boxType && (j.promptModel = ""); var a = l(); return g && g.on("click", h.hide), a }; var m = h.hide; h.hide = function () { return angular.isFunction(i.afterOk) && !g && i.afterOk(j), g && (angular.isFunction(i.afterCustom) && i.afterCustom(j), g.off("click", h.hide)), m() }; var n = h.footerCheck; return h.footerCheck = function () { n(arguments), h.customFooter && h.customFooter.length && (g = h.customFooter.find("button")) }, j.$confirm = function () { j.$$postDigest(function () { h.hide(), angular.isFunction(i.afterConfirm) && (j.$parent.$apply(function () { "prompt" == i.boxType && (j.$parent[i.promptModel] = j.promptModel) }), i.afterConfirm(j)) }) }, j.$cancel = function () { j.$$postDigest(function () { h.hide(), angular.isFunction(i.afterCancel) && i.afterCancel(j) }) }, j.$on("$destroy", function () { h && !h.isDestroyed && h.destroy(), h = null }), h } return d }] }).directive("nqModalBox", ["$modalBox", "$helpers", function (a, b) { return { restrict: "EAC", scope: !0, link: function (c, d, e) { var f = { $scope: c }; angular.forEach(["boxType", "promptLabel", "promptModel", "alertTemplate", "confirmTemplate", "promptTemplate", "showIcon", "okText", "cancelText", "confirmText"], function (a) { angular.isDefined(e[a]) && (f[a] = b.parseConstant(e[a])) }), f.uniqueId = e.uniqueId || e.id || c.$id, f.element = d; var g = {}; if (angular.isDefined(e.contentTarget)) { var h = angular.element(e.contentTarget); h.length || (h = angular.element('<span><span class="label label-warning">Warning :</span> No content element find</span>')), f.htmlObject = !0, f.buildOnShow = !1, c.content = h, g = new a(f, e) } else f.element = d, f.html = !0, g = new a(f, e); c.$on("$destroy", function () { g = null }), d.data("$nqModalBox", g) } } }]) + function (a, b, c) { var d = ["placement", "delayShow", "delayHide", "effect", "speed", "theme", "showArrow", "holdHoverDelta"], e = b.module("ngQuantum.popMaster", ["ngQuantum.services", "ngQuantum.directives"]).provider("$popMaster", function () { var d = this.defaults = { effect: "fade-in", speed: "fastest", typeClass: "pop", prefixEvent: "pop", fireEmit: !1, fireBroadcast: !1, container: !1, placement: "top", offsetTop: 0, offsetLeft: 0, targetElement: !1, template: b.element('<div style="min-width:100px; padding:3px; border:1px; solid #aaa">You should prepare a content will replace here...</div>'), contentTemplate: !1, trigger: "hover focus", keyboard: !1, html: !1, show: !1, clearExists: !0, autoDestroy: !0, displayReflow: !0, theme: !1, delayShow: 0, delayHide: 0 }; this.$get = ["$window", "$rootScope", "$compile", "$parse", "$http", "$timeout", "$animate", "$placement", "$helpers", "templateHelper", "$q", function (e, f, g, h, i, j, k, l, m, n, o) { function p(e, h) { function i() { !B.buildOnShow || B.show ? (B.targetElement ? A.$promise = n.fetchContent(B.targetElement) : (A.$promise = b.isElement(B.template) ? n.fetchContent(B.template) : B.template.indexOf(".html") > -1 ? n.fetchTemplate(B.template) : n.fetchContent(b.element(B.template)), K = !0), B.contentTemplate && (A.$promise = n.fetchContentTemplate(A), K = !0), A.$promise.then(function (a) { b.isElement(a) ? G = a : (B.html && (a = a.replace(s, 'ng-bind-html="')), B.htmlObject && (a = a.replace(/ng-bind="content"/gi, 'nq-bind="content"').replace(/ng-bind-html="content"/gi, 'nq-bind="content"')), G = q.apply(a)), B.buildOnShow = !1, A.init() })) : A.$promise = o.when(A.init()), e && B.readonly && e.attr("readonly", !0) } function p(a) { if (a.isDefaultPrevented()) return !1; var c = A.$currentElement && A.$currentElement || e; return a.target === c[0] ? !1 : c.has(b.element(a.target)) ? !1 : !B.multiple && !B.overseeingTarget || a.target != A.$target[0] && !A.$target.has(a.target) ? a.target !== c[0] && A.leave() : !1 } function u(a) { if (A.$target[0] == a.target || A.$target.has(b.element(a.target))) { if ("mouseenter" == a.type) return F = "in"; if ("mouseleave" == a.type) return A.leave() } } function v() { if ("self" === B.container) I = e; else if (B.container) { var a; e && (a = e.closest(".modal")), I = a && a.length ? a : b.isElement(B.container) ? B.container : b.element(B.container) } e || I && !(I.length < 1) || (I = b.element("body")), H = A.$target = K ? g(G)(D, function () { }) : G, y(), z(), H.addClass("pop-master"), B.typeClass && H.addClass(B.typeClass), B.displayReflow && B.effect ? H && H.remove() : (H.hide(), I ? /input|button/.test(I[0].tagName.toLowerCase()) ? I.after(H) : I.append(H) : e.after(H)), A.applyEvents(), B.animateTarget ? (J = H.find(B.animateTarget), J.length < 0 ? J = H : A.$animateTarget = J) : J = H, D.builded = !0, H.data("$scope") || H.data("$scope", D) } function w(a) { A.$hoverShown = !1, B.keyboard && !B.isInput && (b.element(document).off("keyup", A.$onKeyUp), b.element(document).off("keyup", A.$onFocusKeyUp)), B.blur && "focus" === B.trigger && e && e.blur(), e && e.removeClass("active"), B.clearExists && (B.hasClick || B.clearStrict) && b.element("body").off("click", p), B.holdHoverDelta && H.off("mouseenter mouseleave", u), a && a.call(A), H && H.css({ top: "", left: "" }).removeClass(C).removeClass(B.speed), B.theme && H.removeClass(B.theme).removeClass(B.instanceName + "-" + B.theme), A.$isHidding = !1 } function x(a) { A.$hoverShown = !0, B.keyboard && !B.isInput && ("focus" !== B.trigger ? b.element(document).on("keyup", A.$onKeyUp) : e && b.element(document).on("keyup", A.$onFocusKeyUp)), e && e.addClass("active"), B.clearExists && (B.hasClick || B.clearStrict) && b.element("body").on("click", p), B.holdHoverDelta && H.on("mouseenter mouseleave", u), a && a.call(A) } function y() { if (B.ensurePlacement && (!B.container || I && "fixed" === I.css("position"))) { if (I && "fixed" === I.css("position")) return B.insideFixed = !0, !1; var c = H.add(H.parents()), d = b.element(a).width() / 2, e = b.element(a).height() / 2; b.forEach(c, function (a) { var c = b.element(a); if ("fixed" === c.css("position")) { B.insideFixed = !0; var f = c.css("bottom"); return ("auto" != f || "initial" != f) && parseInt(f) < e && B.placement.indexOf("bottom-") > -1 ? (B.placement = B.placement.replace("bottom", "top"), B.offsetTop = -1 * B.offsetTop, !1) : (f = c.css("top"), ("auto" != f || "initial" != f) && parseInt(f) < e && B.placement.indexOf("top-") > -1 ? (B.placement = B.placement.replace("top", "bottom"), B.offsetTop = -1 * B.offsetTop, !1) : (f = c.css("left"), ("auto" != f || "initial" != f) && parseInt(f) < d && B.placement.indexOf("left-") > -1 ? (B.placement = B.placement.replace("left", "right"), B.offsetLeft = -1 * B.offsetLeft, !1) : (f = c.css("right"), ("auto" != f || "initial" != f) && parseInt(f) < d && B.placement.indexOf("right-") > -1 ? (B.placement = B.placement.replace("right", "left"), B.offsetLeft = -1 * B.offsetLeft, !1) : !1))) } }) } } function z() { B.insideFixed && "modal" !== B.typeClass && (D.$on("staticContentScroll", function () { }), D.$on("staticContentScroll", function () { A.$isShown && A.$applyPlacement() })) } var A = {}; A.$currentElement = c; var B = A.$options = h = b.extend({}, d, h), C = B.placement, D = A.$scope = B.$scope || f.$new(); B.delayShow = m.ensureNumber(B.delayShow), B.delayHide = m.ensureNumber(B.delayHide), (b.isDefined(B.onShow) || b.isDefined(B.onHide)) && (B.fireBroadcast = B.fireEmit = !0), B.instanceName || (B.instanceName = B.typeClass); A.$originalOptions = b.extend({}, B); r && (B.keyboard = !1), b.forEach(["hide", "show", "toggle"], function (a) { D["$" + a] = function () { D.$$postDigest(function () { A[a]() }) } }), A.$isShown = D.$isShown = !1; var E, F, G, H, I, J, K; return B.hasClick = !1, A.init = function () { e && B.trigger && (m.unBindTriggers(e, B.trigger, A), B.hasClick = m.bindTriggers(e, B.trigger, A)), (!B.buildOnShow || B.show) && v(), B.show && D.$$postDigest(function () { "focus" === B.trigger && e ? e.focus() : A.show() }) }, A.destroy = function () { A.isDestroyed = !0, b.element("body").off("click", p), e && B.trigger && m.unBindTriggers(e, B.trigger, A), H && (H.off(), H.remove(), H = null), !B.$scope && D.$destroy() }, A.enter = function () { var a; return this !== A && (A.$currentElement = b.element(this)), clearTimeout(E), F = "in", B.delayShow ? (E = setTimeout(function () { "in" === F && (a = A.show()) }, B.delayShow), a) : A.show() }, A.show = function (a) { var c, d; if (B.buildOnShow) return B.show = !0, B.buildOnShow = !1, i(), !1; if (B = A.$options, A.$isShown || A.$isShowing || A.$isHidding) return !1; B.clearExists && A.clearExists(), e = A.$currentElement || e; var f; e && (f = e.closest(".modal")), f && f.length && (I = f); var g = I ? I : null, h = I ? b.element(g[0].lastChild) : e; return h && h.length < 1 && (h = null), !H || H.length < 1 ? v() : y(), B.theme && (H.removeClass(c), c = B.instanceName + "-" + B.theme, H.addClass(c)), b.isFunction(A.beforeShow) && A.beforeShow(e, H), H.removeClass(C), C = B.placement, H.css({ display: "block", top: "", left: "" }).addClass(C), H.removeClass("with-arrow"), A.$isShowing = !0, B.effect ? B.displayReflow ? (H.addClass(B.effect).addClass(B.speed), B.effect.indexOf("collapse") > -1 && H.height(H.outerHeight()), d = k.enter(H, g, h).then(function () { x(a), A.fireEvents("show"), A.$isShowing = !1, j(function () { A.$isShown = D.$isShown = !0 }, 0) }), t && t(A.$applyPlacement)) : (J.removeClass("ng-animate").removeClass(B.speed).removeClass(B.effect + "-remove").removeClass(B.effect + "-remove-active"), A.$applyPlacement(), J.addClass(B.speed), B.effect.indexOf("collapse") > -1 && J.height(H.outerHeight()), J.css("display", "block"), J && J.css("visibility", ""), H && H.css("display", "block"), d = k.addClass(J, B.effect).then(function () { x(a), A.fireEvents("show"), J.show(), A.$isShowing = !1, j(function () { A.$isShown = D.$isShown = !0 }, 0) })) : (A.$applyPlacement(), d = o.when(x(a)), A.fireEvents("show"), A.$isShowing = !1, A.$isShown = D.$isShown = !0), D.$$phase || D.$digest(), /dropdown|popover|datepicker|colorpicker/.test(B.instanceName) && B.showArrow && H.addClass("with-arrow"), d }, A.leave = function (a) { var c; this !== A && (A.$currentElement = b.element(this)), clearTimeout(E), F = "out"; var d = B.delayHide || 0; return a && "mouseleave" == a.type && (A.$isShowing = !1, !d && (d = 10)), E = setTimeout(function () { "out" === F && (c = A.hide()) }, d), c }, A.hide = function (a) { var b; if (!H) return !1; if (!B.forceHide) { if (!A.$isShown) return !1; if (A.$isShowing || A.$isHidding) return !1 } return A.beforeHide && A.beforeHide(), A.$isHidding = !0, e = A.$currentElement && A.$currentElement || e, B.effect ? B.displayReflow ? b = k.leave(H).then(function () { w(a), B.effect.indexOf("collapse") > -1 && H.css("height", ""), A.fireEvents("hide"), j(function () { A.$isShown = D.$isShown = !1 }, 0) }) : (J.animationEnd(function () { !A.$isShowing && J.hide() }), J && J.css("visibility", "hidden"), b = k.removeClass(J, B.effect).then(function () { J.hide(), H && (H.hide(), B.effect.indexOf("collapse") > -1 && J && J.css("height", ""), w(a), A.fireEvents("hide"), j(function () { A.$isShown = D.$isShown = !1 }, 0)) })) : H && (H.hide(), b = o.when(w(a)), A.fireEvents("hide"), A.$isShown = D.$isShown = !1), D.$$phase || D.$digest(), b }, A.toggle = function (a) { b.isElement(a) ? A.$currentElement = a : this !== A && (A.$currentElement = b.element(this)), A.$isShown ? A.leave() : A.enter() }, A.focus = function () { H && H.focus() }, A.clearExists = function () { var a = b.element("." + B.typeClass); b.forEach(a, function (a) { var c = b.element(a).scope(); c && c.$id != D.$id && c.$isShown && c.$hide() }) }, A.$onKeyUp = function (a) { 27 === a.which && A.hide() }, A.$onFocusKeyUp = function (a) { 27 === a.which && e.blur() }, A.$onFocusElementMouseDown = function (a) { return B.isInput ? !0 : (a.preventDefault(), a.stopPropagation(), void (A.$isShown ? e.blur() : e.focus())) }, A.$applyPlacement = function () { B.inline || (I && "self" !== B.container && H.appendTo(I), B.preventReplace || (l.applyPlacement(A.$toElement && A.$toElement || A.$currentElement && A.$currentElement || e, H, B), H && H.css({ position: "" }))) }, A.fireEvents = function (a) { B.fireEmit && D.$emit(B.prefixEvent + "." + a, H), B.fireBroadcast && D.$broadcast(B.prefixEvent + "." + a, H) }, A.applyEvents = function () { b.isDefined(B.onShow) && D.$on(B.prefixEvent + ".show", function () { B.$scope.$eval(B.onShow), B.$scope.$apply() }), B.onHide && D.$on(B.prefixEvent + ".hide", function () { B.$scope.$eval(B.onHide), B.$scope.$apply() }) }, f.$on("$locationChangeStart", function () { A && A.$isShown && A.leave() }), i(), A } var q = String.prototype.trim, r = m.isTouch(), s = /ng-bind="/gi, t = m.injectModule("$$rAF", "ngAnimate"); return p }] }); b.forEach(["Modal", "Dropdown", "Popover"], function (a) { e.directive("nqToggle" + a, ["$helpers", "$rootScope", "$sce", "$timeout", function (c, e, f, g) { return { restrict: "EA", priority: 1e3, link: function (e, h, i) { function j() { n = m.data("$nq" + a), p = b.isDefined(i.trigger) ? i.trigger : "click", b.isObject(n) && (r = b.extend({}, n.$originalOptions, r), p = b.isDefined(i.trigger) ? i.trigger : r.trigger || "click", p.indexOf("click") && (r.hasClick = !0), h.on(p, function () { n.$isShown ? n.hide(function () { n.togglerId && o !== n.togglerId && g(function () { k() }, 10) }) : k() })) } function k() { n.$currentElement = h, n.$options = b.extend({}, r), n.togglerId = o, l(), n.show() } function l() { var a = n.$scope; if (b.isDefined(i.qsTitle) && (a.title = f.trustAsHtml(e.$eval(i.qsTitle) || i.qsTitle)), b.isDefined(i.qsContent)) { var c = e.$eval(i.qsContent) || i.qsContent; b.isObject(c) ? b.extend(a, c) : a.content = f.trustAsHtml(c) } } var m, n, o, p, q = i["nqToggle" + a], r = {}; q && (m = b.element(q)), !q || m && !m.length || (o = c.id(), b.forEach(d, function (a) { b.isDefined(i[a]) && i.$observe(a, function (b) { r[a] = b }) }), g(function () { j() }, 300), e.$on("$destroy", function () { h.off(p) })) } } }]) }) }(window, window.angular), angular.module("ngQuantum.popover", ["ngQuantum.popMaster"]).run(["$templateCache", function (a) { "use strict"; a.put("popover/popover.tpl.html", '<div class="popover"><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind-html="content"></div></div>') }]).provider("$popover", function () { var a = this.defaults = { effect: "flip-y", placement: "right", template: "popover/popover.tpl.html", contentTemplate: !1, trigger: "click", keyboard: !0, html: !1, title: "", content: "", clearExists: !1, delay: 0, showArrow: !0, container: "body", directive: "nqPopover", instanceName: "popover", typeClass: "popover", prefixEvent: "popover", displayReflow: !1, theme: !1 }; this.$get = ["$popMaster", "$sce", "$helpers", function (b, c, d) { function e(e, f, g) { f = d.parseOptions(g, f); var h = angular.extend({}, a, f); if (!h.independent && !h.useTemplate) { var i; h.target ? i = angular.element(h.target) : (i = angular.element(e.find(".popover")[0]), i.length < 1 && (i = angular.element(e.next(".popover")[0]))), i.length > 0 && (h.targetElement = i) } var j = new b(e, h, g), k = j.$scope; return h = j.$options = d.observeOptions(g, j.$options), h.content && (j.$scope.content = h.content), g && (angular.forEach(["title", "content"], function (a) { var b = "qs" + a.capitaliseFirstLetter(); g[b] && (k[a] = c.trustAsHtml(g[b])), g.$$observers && g.$$observers[b] && g.$observe(b, function (b) { k[a] = c.trustAsHtml(b) }) }), g && angular.isDefined(h.directive) && g[h.directive] && k.$watch(g[h.directive], function (a) { angular.isObject(a) ? angular.extend(k, a) : k.content = a }, !0)), k.$on("$destroy", function () { j.destroy(), j = null }), j } return e }] }).directive("nqPopover", ["$popover", function (a) { return { restrict: "EAC", scope: !0, link: function (b, c, d) { var e = { $scope: b }; e.uniqueId = d.qoUniqueId || d.id || e.$scope.$id, d.qoTrigger && d.qoTrigger.indexOf("hover") > -1 && (e.holdHoverDelta = !0, e.delayHide = 100, e.delayShow = 10), (angular.isDefined(d.qsTitle) || angular.isDefined(d.qsContent) || d.nqPopover || angular.isDefined(d.qoTemplate) || angular.isDefined(d.qoContentTemplate)) && (e.useTemplate = !0); var f = {}; angular.isDefined(d.qoIndependent) ? (e.independent = !0, e.html = !0, e.useTemplate = !1, e.targetElement = c, f = a(null, e, d)) : f = a(c, e, d), b.$on("$destroy", function () { f = null }), c.data("$nqPopover", f) } } }]), /chrome/.test(navigator.userAgent.toLowerCase()) && angular.element("html").addClass("webkitscrollbar"), angular.module("ngQuantum.scrollbar", ["ngQuantum.services.helpers", "ngQuantum.services.mouse"]).provider("$scrollbar", function () {
	var a = this.defaults = { barSize: "slimest", barOffset: 10, maxWidth: !1, placementOffset: !1, maxHeight: !1, useWebkit: !1, showButtons: !1, hideRail: !1, padHorizontal: !1, allDigest: !1, step: 30, duration: 200, theme: !1, allTags: !0, forceWrapper: !1, forceScroll: !1, wrapContainer: !1, axis: "y", verticalPlacement: "right", horizontalPlacement: "bottom", visible: !1, keyboard: !0 }; this.$get = ["$mouse", "$window", "$compile", "$timeout", "$q", "$rootScope", "$helpers", function (b, c, d, e, f, g, h) {
		function i(c, f, i) {
			function k() { if (/y|x|both/.test(D.axis) || (D.axis = "y"), !angular.isNumber(D.barOffset) && (D.barOffset = 10), !angular.isNumber(D.step) && (D.step = 30), /slimmest|slim|normal|thick|thickest/.test(D.barSize)) switch (E.sizeClass = "bar-" + D.barSize, D.barSize) { case "slimmest": H.barSize = 4; break; case "slim": H.barSize = 8; break; case "normal": H.barSize = 12; break; case "thick": H.barSize = 16; break; case "thickest": H.barSize = 20; break; default: H.barSize = 6 } else H.barSize = parseInt(D.barSize) || 6; H.buttonSize = H.barSize <= 12 ? 12 : H.barSize, "both" == D.axis && D.barOffset < H.buttonSize && (D.barOffset = H.buttonSize + 5), D.useWebkit && angular.element("html").hasClass("webkitscrollbar") && (E.useWebkit = !0) } function l() {
				if (!A || !A.$templateReady) {
				A.$templateReady = !0, v(), B.addClass("scrollable"); var a = B.css("position"); if (E.elPosition = a, E.useWebkit) return /y|both/.test(D.axis) && B.css("overflow-y", "auto"), void (/x|both/.test(D.axis) && B.css("overflow-x", "auto")); "y" == D.axis ? B.css("overflow-y", "hidden") : "x" == D.axis ? B.css("overflow-x", "hidden") : B.css("overflow", "hidden"), /relative|absolute|fixed/.test(a) || B.css("position", "relative"); var b = C ? C : B; if (/y|both/.test(D.axis) && (G.bar = angular.element('<div class="scrollbar vertical-bar"></div>').appendTo(b).addClass("bar-" + D.verticalPlacement), G.track = angular.element('<div class="scrollbar-track"></div>').appendTo(G.bar), G.trackInner = angular.element('<div class="track-inner"></div>').appendTo(G.track).css("width", H.barSize), G.thumb = angular.element('<div class="scrollbar-thumb"></div>').appendTo(G.trackInner), D.showButtons && (G.increment = angular.element('<a class="bar-increment" ng-click="$increase(\'y\')"><span></span></a>').appendTo(G.bar).css("height", H.buttonSize), G.decrement = angular.element('<a class="bar-decrement" ng-click="$decrease(\'y\')"><span></span></a>').prependTo(G.bar).css("height", H.buttonSize), d(G.bar)(E)), angular.isNumber(D.placementOffset) && G.bar.css(D.verticalPlacement, D.placementOffset), G.placementOffset = parseInt(G.bar.css(D.verticalPlacement)) || 0, j || (G.trackInner.on("click", function (a) { if (a.target == this) { var b = a.offsetY; b > G.stepSize && (b -= G.thumb.height()); var c = parseInt(b / G.thumbStep), d = D.step * c, e = c * G.thumbStep; q(d, e) } }), G.thumb.on("mousedown", function (a) { var b = G.stepSize; return 1 != a.which ? !0 : void angular.element(document).on("mousemove.scrollbar", function (c) { var d = c.pageY - a.pageY + b, e = d / G.thumbStep, f = D.step * e, g = e * G.thumbStep; q(f, g) }) }))), /x|both/.test(D.axis)) {
					var c = D.showButtons ? H.buttonSize : H.barSize; if (F.bar = angular.element('<div class="scrollbar horizontal-bar"></div>').appendTo(b).addClass("bar-" + D.horizontalPlacement), F.track = angular.element('<div class="scrollbar-track"></div>').appendTo(F.bar), F.trackInner = angular.element('<div class="track-inner"></div>').appendTo(F.track).css("height", H.barSize), F.thumb = angular.element('<div class="scrollbar-thumb"></div>').appendTo(F.trackInner), D.showButtons && (F.increment = angular.element('<a class="bar-increment" ng-click="$increase(\'x\')"><span></span></a>').appendTo(F.bar), F.decrement = angular.element('<a class="bar-decrement" ng-click="$decrease(\'x\')"><span></span></a>').prependTo(F.bar), d(F.bar)(E)), D.padHorizontal) if ("top" == D.horizontalPlacement) { var e = parseInt(B.css("padding-top")) || 0; B.css("padding-top", c + e + 10) } else { var e = parseInt(B.css("padding-bottom")) || 0; B.css("padding-bottom", c + e + 10) } angular.isNumber(D.placementOffset) && F.bar.css(D.horizontalPlacement, D.placementOffset), F.placementOffset = parseInt(F.bar.css(D.horizontalPlacement)) || 0, j || (F.trackInner.on("click", function (a) {
						if (a.target == this) {
							var b = a.offsetX;
							b > F.stepSize && (b -= F.thumb.width()); var c = parseInt(b / F.thumbStep), d = D.step * c, e = c * F.thumbStep; s(d, e)
						}
					}), F.thumb.on("mousedown", function (a) { angular.element(document).off(".scrollbar"); var b = F.stepSize; return 1 != a.which ? !0 : void angular.element(document).on("mousemove.scrollbar", function (c) { var d = c.pageX - a.pageX + b, e = d / F.thumbStep, f = D.step * e, g = e * F.thumbStep; s(f, g) }) }))
				} !j && angular.element("body").on("mouseup", function () { angular.element(document).off(".scrollbar") }), B.addClass("show-bar-button")
				}
			} function m() { if (!E.useWebkit || j) { if (D.allDigest) E.$watch(function () { setTimeout(function () { n() }, 0) }); else { var a = B || c; /y|both/.test(D.axis) && E.$watch(function () { return a[0].scrollHeight }, function () { setTimeout(function () { n() }, 0) }), /x|both/.test(D.axis) && E.$watch(function () { return a[0].scrollWidth }, function () { setTimeout(function () { n() }, 0) }) } j ? (c.on("touchstart", function (a) { var b = G.stepSize || 0, c = F.stepSize || 0, d = a.originalEvent.touches[0] || a.originalEvent.changedTouches[0]; G.bar && G.bar.css("visibility", "visible"), F.bar && F.bar.css("visibility", "visible"), angular.element(document).on("touchmove.scrollbar", function (e) { var f = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0], g = d.pageY - f.pageY + b, h = d.pageX - f.pageX + c, i = !1; if (/y|both/.test(D.axis) && (G.maxOffset || "y" != D.axis || (i = !0), E.scrollTop == G.maxOffset && d.pageY > f.pageY && (i = !0), 0 == E.scrollTop && d.pageY < f.pageY && (i = !0)), /x|both/.test(D.axis) && (F.maxOffset || "x" != D.axis || (i = !0), E.scrollLeft == F.maxOffset && d.pageX > f.pageX && (i = !0), 0 == E.scrollLeft && d.pageX > f.pageX && (i = !0)), "both" != D.axis || G.maxOffset || F.maxOffset || (i = !0), i) return !0; if (a.preventDefault(), e.preventDefault(), /y|both/.test(D.axis)) { var j = g / G.thumbStep, k = D.step * j, l = j * G.thumbStep; q(k, l) } if (/x|both/.test(D.axis)) { var j = h / F.thumbStep, m = D.step * j, n = j * F.thumbStep; s(m, n) } }) }), angular.element(document).on("touchend.scrollbar touchcancel.scrollbar", function () { G.bar && G.bar.css("visibility", "hidden"), F.bar && F.bar.css("visibility", "hidden"), angular.element(document).off("touchmove") })) : (b.onWheel(c, o), c.on("mouseenter", function () { /y|both/.test(D.axis) && !E._scrollHeight && n(), /x|both/.test(D.axis) && !E._scrollWidth && n(), D.keyboard && (angular.element(document).off(".scrollbarkeyboard", A.$onKeyDown), angular.element(document).on("keydown.scrollbarkeyboard", A.$onKeyDown)) }), D.keyboard && c.on("mouseleave", function () { angular.element(document).off("keydown", A.$onKeyDown) })) } A.$eventsBuilded = !0 } function n() { if (!(B && B.height() < 0 || !B && c && c.height() < 1)) { G.bar && G.bar.hide(), F.bar && F.bar.hide(); var a = c[0].tagName, b = 0, d = 0, e = D.showButtons ? H.buttonSize : H.barSize; /td|th|table/.test(a.toLowerCase()) ? B ? (d = B[0].scrollHeight - e, b = B[0].scrollWidth) : (d = c[0].clientHeight - e, b = c[0].clientWidth) : (d = c[0].scrollHeight - e, b = c[0].scrollWidth), /y|both/.test(D.axis) && (d > 0 && E.maxHeight < d && B && B.outerHeight() >= E.maxHeight && B[0].scrollHeight > B[0].clientHeight ? (E._scrollHeight = d, y(d), G.bar && G.bar.css("visibilty", "").show(), G.bar.visible = !0) : (B.scrollTop(0), G.bar && G.bar.css("visibilty", "hidden"), G.bar.visible = !1), E.scrollTop > 0 && B.height() < d && B.scrollTop(E.scrollTop)), /x|both/.test(D.axis) && (b > 0 && E.maxWidth < b && B.outerWidth() >= E.maxWidth && B && B[0].scrollWidth > B[0].clientWidth ? (E._scrollWidth = b, z(b), F.bar && F.bar.css("visibilty", "").show(), F.bar.visible = !0) : (B.scrollLeft(0), F.bar && F.bar.css("visibilty", "hidden"), F.bar.visible = !1), E.scrollLeft > 0 && B.width() < b && B.scrollLeft(E.scrollLeft)) } } function o(a) { if ("y" == D.axis) { if (!G.bar.visible) return !0; if (E._scrollHeight || n(), !G.maxOffset) return !0; if (E.scrollTop >= G.maxOffset && a.deltaY < 0) return !0; if (0 == E.scrollTop && a.deltaY > 0) return !0; a.preventDefault(), p(a) } else if ("x" == D.axis) { if (!F.bar.visible) return !0; if (!F.maxOffset) return !0; if (E.scrollLeft >= F.maxOffset && a.deltaY < 0) return !0; if (0 == E.scrollLeft && a.deltaY > 0) return !0; a.preventDefault(), r(a) } else if ("both" == D.axis) if (G.maxOffset && E.scrollTop < G.maxOffset && a.deltaY < 0) a.preventDefault(), p(a); else if (F.maxOffset && E.scrollLeft < F.maxOffset && a.deltaY < 0) a.preventDefault(), r(a); else if (E.scrollLeft > 0 && a.deltaY > 0) a.preventDefault(), r(a); else { if (!(E.scrollTop > 0 && a.deltaY > 0)) return !0; a.preventDefault(), p(a) } } function p(a) { var b = E.scrollTop; b = a.deltaY > 0 ? b - D.step : b + D.step; var c = a.deltaY > 0 ? G.stepSize - G.thumbStep : G.stepSize + G.thumbStep; q(b, c) } function q(a, b) { a = t(a, G.maxOffset), b = t(b, G.maxThumbOffset), G.stepSize = b, B.scrollTop(a), G.thumb && G.thumb.css("top", b + "px"), G.bar && G.bar.css("top", a + D.barOffset + "px"), F.bar && F.bar.css(D.horizontalPlacement, -(a - F.placementOffset)), E.scrollTop = a } function r(a) { var b = E.scrollLeft; b = a.deltaY > 0 ? b - D.step : b + D.step; var c = a.deltaY > 0 ? F.stepSize - F.thumbStep : F.stepSize + F.thumbStep; s(b, c) } function s(a, b) { a = t(a, F.maxOffset), b = t(b, F.maxThumbOffset), F.stepSize = b, B.scrollLeft(a), F.thumb && F.thumb.css("left", b + "px"), F.bar && F.bar.css("left", a + D.barOffset + "px"), G.bar && G.bar.css(D.verticalPlacement, -(a - G.placementOffset)), E.scrollLeft = a } function t(a, b) { var c = a; return a > b && (c = b + .1), 0 > a && (c = 0), c } function u(a, b, c) { var d = a, e = d.stepSize && d.thumbStep && d.stepSize / d.thumbStep, f = c, g = f - 2 * D.barOffset, h = f * f / b; d.barSize = g, d.trackSize = g, D.showButtons && (d.trackSize = g - 2 * H.buttonSize - 6), d.thumbSize = h, d.maxOffset = b - f; var i = d.trackSize - h; return d.maxThumbOffset = i, d.thumbStep = (d.trackSize - h) / (d.maxOffset / D.step), d.stepSize = e ? e * d.thumbStep : 0, d.stepSize > d.maxThumbOffset && (d.stepSize = d.maxThumbOffset), d } function v() { var a = c[0].tagName; w(), /ul|ol/.test(a.toLowerCase()) && !E.useWebkit ? (C = angular.element('<li class="scrollbar-list-item"></li>').appendTo(c), B = c) : "table" == a.toLowerCase() ? (B = angular.element('<div class="scrollbar-container"></div>').insertBefore(c).append(c), x()) : /td|th/.test(a.toLowerCase()) ? (B = angular.element('<div class="scrollbar-container"></div>').appendTo(c), x()) : (B = c, (D.maxWidth || D.maxHeight) && x()), E.sizeClass && B.addClass(E.sizeClass), D.theme && B.addClass("bar-" + D.theme), D.visible && B.addClass("bar-visible"), D.hideRail && B.addClass("hide-rail"), !E.useWebkit && B.addClass("no-webkit"), !D.showButtons && B.addClass("hide-bar-button") } function w() { var a = !1; H.width = D.maxWidth ? D.maxWidth : c.css("max-width") || c.css("width"), H.height = D.maxHeight ? D.maxHeight : c.css("max-height") || c.css("height"), E.maxWidth = angular.isNumber(H.width) ? H.width : angular.isString(H.width) ? -1 !== H.width.indexOf("%") ? c.parent().innerWidth() * (parseFloat(H.width) / 100 || 0) : parseFloat(H.width) || 0 : 0, E.maxHeight = angular.isNumber(H.height) ? H.height : angular.isString(H.height) ? -1 !== H.height.indexOf("%") ? function () { return a = !0, c.parent().innerHeight() * (parseFloat(H.height) / 100 || 0) }() : parseFloat(H.height) || 0 : 0 } function x(a) { var b = a ? a : B; /y|both/.test(D.axis) && b.css("max-height", H.height), /x|both/.test(D.axis) && b.css("max-width", H.width) } function y(a) { a = a || B[0].scrollHeight; var b = B[0].scrollHeight - B.outerHeight(); if (b < E.scrollTop && (E.scrollTop = b), a && /y|both/.test(D.axis)) { var c = B.outerHeight(!0); G = u(G, a, c), A && A.$templateReady || l(), G.bar.css({ top: (E.scrollTop || 0) + D.barOffset + "px", bottom: D.barOffset + "px", height: G.barSize + "px" }), G.thumb.css({ height: G.thumbSize + "px", top: G.stepSize + "px" }), G.track.css({ height: G.trackSize + 6 + "px" }) } } function z(a) { a = a || B[0].scrollWidth; var b = B[0].scrollWidth - B.outerWidth(); if (b < E.scrollLeft && (E.scrollTop = b), a && /x|both/.test(D.axis)) { var c = B.outerWidth(!0); F = u(F, a, c), A.$templateReady || l(), F.bar.css({ left: (E.scrollLeft || 0) + D.barOffset + "px", right: D.barOffset + "px", width: F.barSize + "px" }), F.thumb.css({ width: F.thumbSize + "px", left: F.stepSize + "px" }), F.track.css({ width: F.trackSize + 6 + "px" }) } } var A = {}; f = h.parseOptions(i, f); var B, C, D = angular.extend({}, a, f), E = D.$scope && D.$scope.$new() || g.$new(), F = {}, G = {}, H = {}; h.observeOptions(i, D), A.$scope = E, A.$options = D, E.scrollTop = 0, E.scrollLeft = 0, c.data("$scrollBar", A), angular.forEach(["increase", "decrease"], function (a) { E["$" + a] = function (b) { E.$$postDigest(function () { A[a](b) }) } }), A.increase = function (a) { var b = "y" == a ? G : F, c = D.step + ("y" == a ? E.scrollTop : E.scrollLeft), d = b.stepSize + b.thumbStep; "y" == a ? q(c, d) : s(c, d) }, A.decrease = function (a) { var b = "y" == a ? G : F, c = ("y" == a ? E.scrollTop : E.scrollLeft) - D.step, d = b.stepSize - b.thumbStep; "y" == a ? q(c, d) : s(c, d) }, A.init = function () { k(), l(), A.$eventsBuilded || m() }, A.destroy = function () { c && c.off(), angular.element(document).off(".scrollbar"), angular.element(document).off("keydown", A.$onKeyDown), E.$destroy(), A = null }, A.$onKeyDown = function (a) { if (/(37|38|39|40)/.test(a.keyCode) && !a.isDefaultPrevented()) { a.preventDefault(); var b = a.keyCode, c = a; switch (b) { case 37: case 38: c.deltaY = 1; break; case 39: case 40: c.deltaY = -1 }o(c) } }, A.scrollStepTop = function (a) { if (angular.isNumber(a)) { var b = a / D.step * G.thumbStep + G.stepSize; q(E.scrollTop + a, b) } }, A.scrollTo = function (a, b, d) { if (angular.isNumber(a)) { !b && (b = "y"); var e = "x" != b ? G : F, f = a / D.step * e.thumbStep; "y" == b ? q(a, f) : s(a, f) } else { var g = []; angular.isString(a) ? g = c.find(a) : angular.isElement(a) && (g = a), g.length && (/y|both/.test(D.axis) && setTimeout(function () { var a = g[0].offsetTop - (d || 0), b = a / D.step * G.thumbStep; q(a, b) }, 0), /x|both/.test(D.axis) && setTimeout(function () { var a = g[0].offsetLeft, b = a / D.step * F.thumbStep; s(a, b) }, 0)) } }, A.refresh = function (a) { a = a || 700, setTimeout(function () { w(), n() }, a) }, D.$scope && D.$scope.$on("$destroy", function () { A.destroy() }); var I = function () { e(function () { A.refresh(200) }, 100) }; return window.addResizeEvent(I), angular.element(document).ready(function () { setTimeout(function () { I() }, 200) }), A.init(), A
		} var j = "createTouch" in c.document; return i
	}]
}).directive("nqScroll", ["$scrollbar", "$timeout", function (a) { return { restrict: "AC", isolate: !1, link: function (b, c, d) { setTimeout(function () { var e = a(c, { $scope: b }, d); d.barModel && (b[d.barModel] = e) }, 10) } } }]) + function (a, b, c) { "use strict"; var d = b.module("ngQuantum.select", ["ngQuantum.popMaster", "ngQuantum.scrollbar"]).run(["$templateCache", function (a) { a.put("select/select.tpl.html", '<div tabindex="-1" class="listbox-panel ng-cloak" role="listbox"><div class="scrollable" role="listbox"><ul tabindex="-1" class="listbox"><li role="presentation" tabindex="-1" ng-repeat="match in $matches track by $index"><span class="select-option option-label"  role="option" tabindex="-1" ng-click="$select(match)" ng-bind="match.label"></span> </li></ul></div></div>'), a.put("select/selectgroup.tpl.html", '<div tabindex="-1" role="listbox" class="listbox-panel ng-cloak"><div tabindex="-1" class="scrollable" role="listbox"> <ul tabindex="-1" class="listbox"> <li tabindex="-1" role="presentation" ng-repeat="match in $groupMatches">  <span class="select-option" ng-if="!match.items" role="option" tabindex="-1" ng-disabled="match.disabled" ng-click="$select(match)"> <span class="option-label" ng-bind="match.label"></span> </span> <div tabindex="-1" class="option-group" ng-if="match.items" ng-disabled="match.disabled"> <span class="group-label" ng-bind="match.label"></span> <ul tabindex="-1">  <li tabindex="-1" role="presentation" data-ng-repeat="item in match.items track by $index"> <span class="select-option" role="option" tabindex="-1" ng-disabled="item.disabled" ng-click="$select(item)"><span class="option-label" ng-bind="item.label"></span></span></li></ul></div></li></ul></div></div>') }]).provider("$select", function () { var a = this.defaults = { effect: "sing", typeClass: "select", prefixClass: "select", buttonClass: "btn-default", navClass: "nav-mixed", prefixEvent: "select", placement: "bottom-left", template: "select/select.tpl.html", groupTemplate: "select/selectgroup.tpl.html", trigger: "click", fireEmit: !1, lazyAjax: !0, container: "body", displayReflow: !1, disableClear: !1, keyboard: !0, multiple: !1, filterable: !0, highlight: !0, showTick: !0, urlPrefix: !1, isQuerystring: !1, cacheResult: !0, caseSensitive: !0, seperator: ", ", html: !0, clearIcon: '<span class="clear-icon fu-cross"></span>', spinner: '<span class="spin-icon fu-spinner-fan spin"></span>', noMatch: "No result found...", placeholder: "Please select...", filterText: "search...", charText: "Please enter {{$remainingChar}} or more characters", searchingText: "Searching...", maxLength: 3, maxTextLength: 30, minTextLength: 3, minChar: 3, forceHide: !1, selectedRemovable: !0 }; this.$get = ["$filter", "$window", "$http", "$compile", "$rootScope", "$popMaster", "$parseOptions", "$timeout", "$q", "$scrollbar", "$lazyRequest", "$helpers", function (d, e, f, g, h, i, j, k, l, m, n, o) { function p(e, h, p, r, s) { function t() { I.renderComplated = !0; var a, c; if (C(), "input" == K.displayType) h.$modelValue && u(); else if (K.multiple && b.isArray(h.$modelValue) ? (a = h.$modelValue.map(function (a) { return c = I.$getIndex(a), b.isDefined(c) ? (I.optionData[c].selected = !0, I.optionData[c].label) : !1 }).filter(b.isDefined), a = a.join(K.seperator)) : (c = I.$getIndex(h.$viewValue), b.isDefined(c) ? (I.optionData[c].selected = !0, a = I.optionData[c].label) : a = !1), a) { if (e.html(a), !K.disableClear && !K.multiple) { var d = b.element(M); d.one("click", function (a) { a.preventDefault(), a.stopPropagation(), k(function () { N.$lastSelected && (N.$lastSelected.selected = !1), h.$setViewValue(null), h.$render() }, 0) }), e.append(d) } } else e.html(K.placeholder) } function u() { var a = e.find("li"); if (b.forEach(a, function (b, c) { c < a.length - 1 && b.remove() }), b.isArray(h.$modelValue)) b.forEach(h.$modelValue, function (a, b) { var c = I.$getIndex(a); c > -1 && (I.optionData[c].selected = !0, D.before(v(I.optionData[c], b))) }); else { var c = I.$getIndex(h.$modelValue); c > -1 && (I.optionData[c].selected = !0, D.before(v(I.optionData[c], h.$modelValue))) } I.$isShown && I.$applyPlacement() } function v(a, c) { var d = b.element('<li class="active"></li>'); d.on("click", function (a) { a.preventDefault(), a.stopPropagation() }); var e = b.element(K.clearIcon).one("click", function (e) { e.preventDefault(), e.stopPropagation(), h.$modelValue = b.isArray(h.$modelValue) ? h.$modelValue.splice(c, 1) : null, d.off(), d.remove(), N.$apply(function () { a.selected = !1, a.filtered = !1 }) }); return d.append(b.element("<a></a>").append(a.label).append(e)) } function w(a) { setTimeout(function () { if (K.highlight && O) { var c = O.find(".option-label"); c.length && b.forEach(c, function (c) { var d = b.element(c); d.html(a ? d.text().replace(new RegExp("(" + a + ")", "gi"), '<span class="highlight">$1</span>') : d.text()) }) } }, 100) } function x(a, b) { if (K.customFilter) { if (!a && !b) return; var e = 0; d("filter")(I.optionData, function (b) { L && b.selected ? b.filtered = !0 : b.label.search(new RegExp(a, "i")) < 0 ? b.filtered = !0 : (b.filtered = !1, e++) }), N.$noResultFound = !e } else a ? I.updateMatches(d("filter")(I.optionData, N.filterModel), L) : !a && b && I.updateMatches(c, L); w(a) } function y(a, b) { a && (N.$remainingChar = K.minChar - a.length, N.$noResultFound = !1, 0 == N.$remainingChar && N.lastTerm != a ? I.loadRemote(a) : x(a, b)) } function z(a, c) { var d = K.urlPrefix || ""; return d += c && K.postUrl ? K.postUrl : K.url, a && (N.urlParams.length && b.forEach(N.urlParams, function (a, b) { var c = A(a, b); K.isQuerystring ? (d += 0 == b ? "?" : "&", d += c.param + "=" + c.value) : d += "/" + c.value }), K.isQuerystring ? (d += N.urlParams.length ? "&" : "?", d += "term=" + a) : d += "/" + a), d } function A(a, c) { var d = { param: "p" + c }; if (b.isObject(a)) { for (var e in a) if (0 == e && (d.param = a[0]), 1 == e) { d.value = a[1]; break } } else d.value = a; return d } function B() { (b.isDefined(r.required) || b.isDefined(r.ngRequired)) && h.$setValidity("required", h.$modelValue), K.minRequired && b.isArray(h.$modelValue) && h.$setValidity("min-required", h.$modelValue.length >= K.minRequired) } function C() { b.forEach(I.optionData, function (a) { a.selected = !1 }) } p = o.parseOptions(r, p), !p.template && p.grouped && (p.template = a.groupTemplate); var D, E, F, G, H, I = {}, J = b.element(['<input ng-hide="$hideFilter" ng-model="filterModel.label" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="{{$placeholder}}" class="select-input form-control" role="combobox" aria-expanded="true"', , ' aria-autocomplete="list" style="max-width:100%;" />'].join("")), K = b.extend({}, a, p), L = h.isTagsInput = "nqTagsInput" == K.directive, M = K.clearIcon; K.filterable && (F = b.isString(K.noMatch) && K.noMatch.length > 2 && "#" == K.noMatch.substr(0, 1) ? b.element(document).find(K.noMatch) : b.element("<span>" + K.noMatch + "</span>"), !F.length && (F = null), F && F.addClass("no-match").attr("ng-show", "$noResultFound")), K.inline && (K.show = !0, K.trigger = !1, K.showArrow = !1, K.container = !1, e.addClass("listbox-inline"), K.effect = !1, K.autoHide = !1), I = new i(e, K); var N = I.$scope; K = I.$options = o.observeOptions(r, I.$options), I.optionData = [], N.$matches = [], N.urlParams = [], I.searchInput = J, N.$selectedIndex = K.multiple ? [] : -1, N.$isMultiple = K.multiple, N.$remainingChar = K.minChar, N.$placeholder = "input" == K.displayType ? K.placeholder : K.filterText, N.$select = function (a) { N.$$postDigest(function () { I.select(a) }) }; var O, P = I.init; I.init = function () { if (P(), "input" !== K.displayType && e.addClass(K.buttonClass), O = I.$target, K.filterable && O && (g(J)(N), "input" == K.displayType ? (K.navClass && e.addClass(K.navClass), K.inputSize && e.addClass(K.inputSize), D = b.element("<li></li>").append(J.removeClass("form-control").removeClass("input-xs")), e.append(D), !K.multiple && e.addClass("single-option")) : (K.buttonClass && e.addClass(K.buttonClass), O.prepend(J), J.on("click", function (a) { a.preventDefault(), J.focus() }))), F && (g(F)(N), O.append(F)), K.showTick && O.addClass("show-tick"), K.url && !K.remoteSearch && (K.lazyAjax ? n(function () { return I.loadRemote() }, 0) : I.loadRemote()), K.remoteSearch && (G = b.element('<span ng-show="$remainingChar > 0"></span>').append(K.charText), H = b.element('<span class="search-label" ng-show="$dataLoading"></span>').append(K.searchingText), K.spinner && H.append(K.spinner), g(G)(N), g(H)(N), O.append(G), O.append(H)), I.complated = !0, I.renderComplated || I.render(), !("input" == K.displayType) && e.addClass("select-toggle"), J && J.attr("maxlength", K.maxTextLength), O) { var a = O.find(".scrollable"), c = { keyword: !1, barSize: "slimmest", placementOffset: -2, $scope: N }; E = m(a, c) } }, I.update = function (a) { var c = d("filter")(I.optionData, { selected: !0 }); I.optionData = a, b.forEach(c, function (a) { I.addOption(a) }), I.updateMatches() }, I.addOption = function (a) { var c = d("filter")(I.optionData, function (c) { return !K.caseSensitive && b.isString(c.label) ? c.label.toLowerCase() == (b.isString(a.label) ? a.label.toLowerCase() : a.label) : c.value == a.value }); return c.length ? c[0] : (I.optionData.push(a), N.$matches = I.optionData, I.optionData[I.optionData.length - 1]) }, I.changeOption = function (a, b) { K[a] = b }, I.updateMatches = function (a, b) { N.$matches = a || I.optionData, K.grouped && (N.$groupMatches = d("groupOption")(N.$matches)), N.$noResultFound = !N.$matches.length, b && (N.$noResultFound = !d("filter")(N.$matches, function (a) { return 1 != a.filtered }).length, N.$noResultFound ? I.hide() : I.show()) }, I.select = function (a) { if (K.multiple) { if (!a.selected && K.maxLength && h.$modelValue && h.$modelValue.length == K.maxLength) return; N.$apply(function () { a.selected = L ? !0 : a.selected ? !1 : !0, a.filtered = L && a.selected }); var b = []; d("filter")(I.optionData, function (a) { a.selected && b.push(a.value) }), k(function () { h.$setViewValue(b) }, 0) } else N.fistChanged || d("filter")(I.optionData, function (a) { a.selected && (N.$lastSelected = a, N.fistChanged = !0) }), N.$apply(function () { a.selected = !0 }), N.$lastSelected && !(N.$lastSelected === a) && (N.$lastSelected.selected = !1), N.$lastSelected = a, k(function () { h.$setViewValue(a.value) }, 0); k(function () { I.render() }, 0), K.multiple || ("focus" === K.trigger ? e[0].blur() : (I.$isShown || I.$isHidding) && I.hide()), L && I.hide(), N.$emit("$select.select", a), J.val("") }, I.$getIndex = function (a) { var b = I.optionData.length, c = b; if (b) { for (c = b; c-- && I.optionData[c].value !== a;); if (!(0 > c)) return c } }, I.$onMouseDown = function (a) { if (a.preventDefault(), a.stopPropagation(), q) { var c = b.element(a.target); c.triggerHandler("click") } }, I.$onKeyDown = function (a) { if (!/(38|40|13)/.test(a.keyCode)) return !0; a.preventDefault(), a.stopPropagation(); var c = O.find(".select-option:visible"); if (c && c.length) { O.focus(); var e = N.$lastIndex > -1 ? N.$lastIndex : -1; if (-1 == e) { var f = b.element(O.find(".selected")[0]), g = f.length && f.scope().$index; e = b.isDefined(g) ? g : f.hasClass("select-option") ? f.parent().index() : f.closest(".select-option").index() } if (e >= c.length && (e = 0), 38 == a.keyCode && e > 0 && e-- , 40 == a.keyCode && e < c.length - 1 && e++ , ~e || (e = 0), 13 === a.keyCode) { var h = d("filter")(N.$matches, function (a) { return 1 != a.filtered })[e]; if (h) return I.select(h) } c.eq(e).focus(), N.$lastIndex = e } }; var Q = I.show; I.show = function () { var a = Q(); K.multiple && I.$target.addClass("select-multiple"), K.keyboard && I.$target && (b.element(document).off("keydown", I.$onKeyDown), b.element(document).on("keydown", I.$onKeyDown)), I.$target.css("min-width", e.outerWidth(!0)), a && a.then(function () { K.filterable && ("nqTagsInput" != K.directive && (N.filterModel = { label: "" }), setTimeout(function () { J.focus() }, 0)), E && E.scrollTo(".selected", null, 60), I.$target.on(q ? "touchstart" : "mousedown", I.$onMouseDown) }) }; var R = I.hide; if (I.hide = function () { if (I.$target.off(q ? "touchstart" : "mousedown", I.$onMouseDown), K.keyboard && I.$target && b.element(document).off("keydown", I.$onKeyDown), "nqTagsInput" != K.directive && J.val(""), N.$lastIndex = -1, K.inline) return l.when(""); var a = R() || l.when(""); a.then(function () { "nqTagsInput" != K.directive && (N.filterModel = { label: "" }, setTimeout(function () { J.blur() }, 0)) }) }, I.render = function () { h.$modelValue && K.modelIsLabel ? I.complated && (b.isArray(h.$modelValue) ? b.forEach(h.$modelValue, function (a) { var b = { label: a, value: a, selected: !0, filtered: L }; b = I.addOption(b) }) : K.modelIsLabel && I.addOption({ label: h.$modelValue, value: h.$modelValue, selected: !0, filtered: L }), t()) : h.$modelValue && K.remoteSearch && !I.optionData.length ? K.lazyAjax ? n(function () { return I.loadRemote(null, h.$modelValue) }, 0) : I.loadRemote(null, h.$modelValue) : I.complated && t(), B() }, I.loadRemote = function (a, b) { N.$dataLoading = !0; var c = b && b.length ? !0 : !1, d = z(a, c), e = { url: d }; return e.method = c ? "POST" : "GET", e.cache = K.cacheResult, c && (e.data = { ModelValue: b }), f(e).success(function (b) { K.resultKey ? N[K.resultKey] = b.data ? b.data : b : N.selectOptions = b.data ? b.data : b, N.$dataLoading = !1, N.$noResultFound = b.data ? !b.data.length : !b.length, !I.fistLoad && setTimeout(function () { t() }, 0), I.fistLoad = !0, a && (N.lastTerm = a) }).error(function () { N.$dataLoading = !1, N.$noResultFound = !0 }) }, K.filterable && N.$watch("filterModel.label", function (a, b) { K.remoteSearch ? y(a, b) : x(a, b), J && a && J.css("min-width", .7 * a.length + "em"); var c = a ? 0 : ".selected"; E && a && E.scrollTo(c, "y", 10) }), r && b.forEach(["urlParams"], function (a) { r[a] && r.$observe(a, function (b) { N[a] = b }) }), b.isDefined(r.ngOptions)) { var S = j(r.ngOptions), T = S.$match[7].replace(/\|.+/, "").trim(); N.$watch(T, function () { S.valuesFn(N, h).then(function (a) { a && b.isArray(a) && (I.update(a), I.render()) }) }) } else s.is("select") ? l.when(s).then(function (a) { var c = j(null, a); c.$values && b.isArray(c.$values) && (I.update(c.$values), h.$render()) }) : h.$render(); return b.isDefined(r.ngChange) && N.$parent.$watch(function () { return h.$modelValue }, function () { N.$parent.$eval(r.ngChange) }), I } var q = (b.element(e.document.body), "createTouch" in e.document); return p }] }).provider("$tagsInput", function () { var a = this.defaults = { maxLength: 10, typeClass: "tagsInput", navClass: "nav-mixed", prefixEvent: "tagsInput", allowedChars: "[A-Za-z0-9ŞşIıĞğÜüÇçÖö ]", clearStrict: !0, placeholder: "type...", modelIsLabel: !0, preventDublication: !0, caseSensitive: !1, maxTextLength: 30, minTextLength: 3 }; this.$get = ["$select", "$filter", function (c) { function d(d, e, f, g, h) { if ("nqTagsInput" != f.directive) return new c(d, e, f, g, h); var i = b.extend({}, a, f); i.trigger = !1; var j = new c(d, e, i, g, h), k = j.init, l = j.$scope; return j.init = function () { k(), j.searchInput.on("keypress", j.$onKeyEnter), j.searchInput.on("keypress", j.$onKeyPress) }, j.$onKeyEnter = function (a) { if (13 === a.keyCode) { if (b.isArray(e.$modelValue) && !(e.$modelValue.length < i.maxLength)) return !1; var c = l.filterModel.label; if (c && c.length >= i.minTextLength) { c.length > i.maxTextLength && (c = c.substr(0, c.length)); var d = { label: c, value: c }; d = j.addOption(d), d.selected || j.select(d), j.searchInput.val("") } } }, j.$onKeyPress = function (a) { var b = String.fromCharCode(a.which); return new RegExp("^" + i.allowedChars + "$").test(b) ? void 0 : !1 }, g.nqTagsInput && l.$parent.$watch(g.nqTagsInput, function (a) { b.isArray(a) && b.forEach(a, function (a) { if (b.isObject(a)) { if (a.label || a.value) { var c = { label: a.label || a.value, value: a.value || a.label }; j.addOption(c), j.changeOption("modelIsLabel", !1) } } else { var c = { label: a, value: a }; j.addOption(c) } }) }), l.$parent.$watch(g.ngModel, function (a) { a && (e.$setViewValue(a), j.render()) }), j } return d }] }); b.forEach(["nqSelect", "nqTagsInput"], function (a) { d.directive(a, ["$compile", "$tagsInput", "$parseOptions", function (c, d) { return { restrict: "EAC", scope: !0, require: ["ngModel", a], controller: function () { }, link: function (c, e, f, g) { function h() { "input" == i.displayType || "input" == f.qoDisplayType ? (i.filterable = !0, e = b.element('<ul class="nav nav-pills select-render-nav form-control"></ul>'), k.hide()) : e = b.element('<button type="button" class="btn form-control">Please select...</button>'), k.before(e) } var i = { $scope: c }, j = g[0]; "nqTagsInput" == a && (i.displayType = "input", i.multiple = !0), i.directive = a; var k = e; if (f.ngOptions ? i.grouped = f.ngOptions.indexOf("group by") > -1 : e.is("select") && (i.grouped = e.find("optgroup").length), e.is("select") || e.is("input")) k.addClass("disable-animation"), k.css("display", "none"), h(); else if (b.isDefined(f.ngOptions)) "input" == f.qoDisplayType && h(); else { h(), k.addClass("listbox"); var l = b.element('<div tabindex="-1" class="scrollable" role="listbox"></div>'); l.append(k.show()), i.targetElement = b.element('<div tabindex="-1" role="listbox" class="listbox-panel"></div>').append(l) } var m = new d(e, j, i, f, k); g[1].addOption = m.addOption, g[1].changeOption = m.changeOption, g[1].select = m.select, j.$render = m.render, c.$on("$destroy", function () { m.destroy(), i = null, m = null }) } } }]) }), d.directive("selectOption", [function () { return { restrict: "AC", scope: !0, require: "?^nqSelect", link: function (a, c, d, e) { var f, g, h = {}; if (b.isDefined(d.ngRepeat)) f = d.ngRepeat.split(" ")[0]; else if (b.isDefined(c.parent().attr("ng-repeat") || c.parent().attr("data-ng-repeat"))) { var i = c.parent().attr("ng-repeat") || c.parent().attr("data-ng-repeat"); i && (f = i.split(" ")[0]) } g = f + ".selected", e && (a.$watch(e.changeOption, function () { b.isDefined(e.changeOption) && e.changeOption("customFilter", !0) }), c.addClass("select-option"), c.attr("tabindex", -1), c.attr("role", "option"), h.label = a.$eval(d.optionLabel) || d.optionLabel, h.value = a.$eval(d.optionValue) || d.optionValue || h.label, a.$watch(e.changeOption, function () { b.isDefined(e.addOption) && (a._selectOption = e.addOption(h)) }), g = "_selectOption.selected", c.on("click", function () { e.select(a._selectOption) }), a.$watch("_selectOption.filtered", function (a) { a ? c.hide() : c.show() })), a.$watch(g, function (a) { a ? c.addClass("selected") : c.removeClass("selected") }), a.$on("$destroy", function () { c && c.remove() }) } } }]), d.filter("groupOption", ["$filter", function (a) { return function (c) { function d(c) { var d = a("filter")(e, function (a) { return b.isObject(c.group) ? a.label === c.group.label : a.label == c }); d.length ? (d = d[0], d.items.push(c)) : (d = b.isObject(c.group) ? b.copy(c.group) : { label: c }, d.items = [], d.items.push(c), e.push(d)) } if (!c || !c.length) return []; var e = []; return b.forEach(c, function (a) { a.group ? d(a) : e.push(a) }), e } }]) }(window, window.angular), angular.module("ngQuantum.slider", ["ngQuantum.services.mouse", "ngQuantum.services.helpers"]).provider("$slider", function () {
	var a = this.defaults = { keyboard: !0, decimalPlace: 0, step: 1, min: 0, max: 100, doubleThumb: !1, diff: 10, size: !1, sizeClass: !1, showTooltip: !0, tooltipVisible: !1, showRuller: !1, showLabel: !1, tickSize: 10, valuePrefix: !1, valueSuffix: !1, formatValue: !1, direction: "horizontal", theme: !1, thumbClass: !1 }; this.$get = ["$rootScope", "$document", "$mouse", "$parse", function (b, c, d, e) {
		function f(f, g) {
			function h() { H.values = G.doubleThumb ? [E.value0 || G.min, E.value1 || G.max] : E.value0 || G.min } function i() { d.down(z, function (a) { (a.target == z[0] || a.target == A[0]) && (E.eventNo = 0, l(a)) }), d.down(B, function () { E.eventNo = 1, d.move(c, l), d.up(F, k) }), C && d.down(C, function () { E.eventNo = 2, d.move(c, l), d.up(F, k) }) } function j() { d.offDown(z), d.offDown(B), C && d.offDown(C), d.offMove(c, l), d.offUp(F, k) } function k() { d.offMove(c, l), G.showTooltip && !G.tooltipVisible && (B.removeClass("titip-active"), C && C.removeClass("titip-active")), angular.element("body").removeClass("unselectable"), d.offUp(F, k) } function l(a) { a.preventDefault(), a.stopPropagation(), angular.element("body").addClass("unselectable"), D || u(), G.showTooltip && !G.tooltipVisible && (B.addClass("titip-active"), C && C.addClass("titip-active")), "vertical" == G.direction ? m(a) : n(a), H.$apply(h) } function m(a) { var b = 1, c = d.relativeY(a, y); c = D.trh - c, c = c > D.trh ? D.trh : 0 > c ? 0 : c; var e = Math.abs(c - E.lastOffset) >= D.stepSize || 0 == c || c == D.trh; (G.doubleThumb && 2 == E.eventNo || G.doubleThumb && 0 == E.eventNo && (c > E.lastOffset2 || Math.abs(c - E.lastOffset) > Math.abs(c - E.lastOffset2))) && (e = Math.abs(c - E.lastOffset2) >= D.stepSize || 0 == c || c == D.trh, b = 2), (D.stepSize < 0 || e) && (2 == b ? r(c) : q(c)) } function n(a) { var b = 1, c = d.relativeX(a, y); c = c > D.trw ? D.trw : 0 > c ? 0 : c; var e = Math.abs(c - E.lastOffset) >= D.stepSize || 0 == c || c == D.trw; (G.doubleThumb && 2 == E.eventNo || G.doubleThumb && 0 == E.eventNo && (c > E.lastOffset2 || Math.abs(c - E.lastOffset) > Math.abs(c - E.lastOffset2))) && (e = Math.abs(c - E.lastOffset2) >= D.stepSize || 0 == c || c == D.trw, b = 2), (D.stepSize < 0 || e) && (2 == b ? p(c) : o(c)) } function o(a) { D.diffPixel && a + D.diffPixel > E.lastOffset2 && (a = E.lastOffset2 - D.diffPixel + 1); var b = s(a); if (E.lastOffset = a, B.css({ left: a }), G.showTooltip && B.attr("data-title", t(b)), G.doubleThumb) { var c = E.lastOffset2 > a ? D.trw - E.lastOffset2 : 0; A.css({ left: a, right: c }) } else A.css({ left: 0, right: D.trw - a }); E.value0 = b } function p(a) { D.diffPixel && a - D.diffPixel < E.lastOffset && (a = E.lastOffset + D.diffPixel); var b = s(a); E.lastOffset2 = a, C.css({ left: a }), G.showTooltip && C.attr("data-title", t(b)); var c = E.lastOffset > 0 ? E.lastOffset : 0; A.css({ right: D.trw - a, left: c }), E.value1 = b } function q(a) { D.diffPixel && a + D.diffPixel > E.lastOffset2 && (a = E.lastOffset2 - D.diffPixel + 1); var b = s(a); if (E.lastOffset = a, B.css({ bottom: a }), G.showTooltip && B.attr("data-title", t(b)), G.doubleThumb) { var c = E.lastOffset2 > a ? D.trh - E.lastOffset2 : 0; A.css({ bottom: a, top: c }) } else A.css({ bottom: 0, top: D.trh - a }); E.value0 = b } function r(a) { D.diffPixel && a - D.diffPixel < E.lastOffset && (a = E.lastOffset + D.diffPixel); var b = s(a); E.lastOffset2 = a, C.css({ bottom: a }), G.showTooltip && C.attr("data-title", t(b)); var c = E.lastOffset > 0 ? E.lastOffset : 0; A.css({ bottom: c, top: D.trh - a }), E.value1 = b } function s(a) { return G.decimalPlace ? parseFloat(Math.round(100 * (a * D.stepRate + parseFloat(G.min))) / 100).toFixed(G.decimalPlace) : Math.floor(a * D.stepRate) + parseFloat(G.min) } function t(a) { return G.callValueFunction ? G.callValueFunction.call(null, a) : G.formatValue ? G.callValueFunction(H, { $value: a }) : (G.valuePrefix && (a = G.valuePrefix + a), G.valueSuffix && (a += G.valueSuffix), a) } function u() { D = { trw: z.width(), thh: B.outerHeight(), thw: B.outerWidth(), trh: z.height() }; var a = {}; "vertical" == G.direction ? (a["margin-bottom"] = -(D.thh / 2), a["margin-left"] = -((D.thw - D.trw) / 2)) : (a["margin-left"] = -(D.thw / 2), a["margin-top"] = -((D.thh - D.trh) / 2)), B.css(a), C && C.css(a), v() } function v() { var a = (G.max - G.min) / G.step; "vertical" == G.direction ? (D.stepRate = a / D.trh, D.stepSize = D.trh / a) : (D.stepRate = a / D.trw, D.stepSize = D.trw / a), G.diff && G.doubleThumb && (D.diffPixel = Math.round(D.stepSize * G.diff)) } function w() { y = angular.element('<div class="range-slider"></div>').insertBefore(f).append(f), z = angular.element('<div class="slider-track"></div>').appendTo(y), A = angular.element('<div class="slider-selection"></div>').appendTo(z), B = angular.element('<div class="slider-thumb"></div>').appendTo(z), G.theme && y.addClass("slider-" + G.theme), G.thumbClass && B.addClass(G.thumbClass), G.doubleThumb && (C = angular.element('<div class="slider-thumb"></div>').appendTo(z), G.thumbClass && C.addClass(G.thumbClass)) } function x() { var a = angular.element('<div class="slider-ruller"></div>').appendTo(y); if (G.showRuller) { var b = angular.element('<div class="slider-ticks"></div>').appendTo(a); if (G.tickSize > 20 && (G.tickSize = 20), G.tickSize > 0) for (var c = 0; c < G.tickSize - 1; c++)b.append('<span  class="slider-tick"></span>') } G.showLabel && a.append('<div class="slider-values"><div class="values-min">' + t(G.min) + '</div><div class="values-max">' + t(G.max) + "</div></div>") } var y, z, A, B, C, D, E = {}, F = angular.element("body"), G = angular.extend({}, a, g); a.formatValue && (G.callValueFunction = a.formatValue), G.formatValue && (G.formatValue = e(G.formatValue), G.callValueFunction = !1), 0 == G.formatValue && (G.callValueFunction = !1); var H = E.$scope = G.$scope && G.$scope.$new() || b.$new(); return E.lastOffset = 0, E.lastOffset2 = 0, E.init = function () {
			w(), y.addClass("slider-" + ("vertical" == G.direction ? "vertical" : "horizontal")), G.size && ("vertical" == G.direction ? y.height(G.size) : y.width(G.size)), G.sizeClass && y.addClass("slider-" + G.sizeClass), u(), i(); var a = "titip-" + ("vertical" == G.direction ? "left" : "top") + " titip-sm"; G.tooltipVisible && (a += " titip-sm titip-active"), (G.showTooltip || G.tooltipVisible) && (B.addClass(a), C && C.addClass(a)), G.doubleThumb && (E.lastOffset2 = "vertical" == G.direction ? D.trh : D.trw), E.setValues(), (G.showRuller || G.showLabel) && x()
			}, E.setValues = function (a) { if (a || (h(), a = H.values), G.doubleThumb) { angular.isArray(a) || (a = [a, G.max]); var b = (a[0] - G.min) / D.stepRate, c = (a[1] - G.min) / D.stepRate; "vertical" == G.direction ? (b = b > D.trh ? D.trh : 0 > b ? 0 : b, q(b), c = c > D.trh ? D.trh : 0 > c ? 0 : c, r(c)) : (b = b > D.trw ? D.trw : 0 > b ? 0 : b, o(b), c = c > D.trw ? D.trw : 0 > c ? 0 : c, p(c)) } else { var d = (a - G.min) / D.stepRate; "vertical" == G.direction ? (d = d > D.trh ? D.trh : 0 > d ? 0 : d, q(d)) : (d = d > D.trw ? D.trw : 0 > d ? 0 : d, o(d)) } H.$$postDigest(h) }, E.toggleDisable = function (a) { a ? (y.addClass("slider-disabled"), j()) : (y.removeClass("slider-disabled"), j(), i()) }, E.destroy = function () { j(), H.$destroy() }, E.init(), E
		} return f
	}]
}).directive("nqSlider", ["$slider", "$helpers", function (a, b) { return { restrict: "AC", require: "ngModel", link: function (c, d, e, f) { var g = { $scope: c }, h = ["disabled", "keyboard", "decimalPlace", "step", "min", "max", "doubleThumb", "showLabel", "diff", "size", "sizeClass", "showRuller", "direction", "theme", "thumbClass", "valuePrefix", "valueSuffix", "formatValue"]; angular.forEach(h, function (a) { angular.isDefined(e[a]) && (g[a] = b.parseConstant(e[a])) }); var i = new a(d, g); c.$watch(e.ngModel, function (a) { a && a != i.$scope.values && i.setValues(a) }), e.$observe("disabled", function (a, b) { a ? i.toggleDisable(!0) : b && i.toggleDisable(!1) }), i.$scope.$watch("values", function (a, b) { a && a !== b && f.$setViewValue(a) }), c.$on("$destroy", function () { i.destroy(), i = null }) } } }]), angular.module("ngQuantum.switchButton", ["ngQuantum.services.helpers"]).run(["$templateCache", function (a) { "use strict"; a.put("switch/switchbutton.tpl.html", '<div class="btn-group btn-switch"><label class="btn" ng-class="$buttonTheme"><span ng-class="{visibleswitch:$checked}" ng-bind-html="$trueLabel"></span><span class="switch-bg" ng-class="{visibleswitch:!$checked}"></span><span class="switch-label" ng-class="{visibleswitch:!$checked}" ng-bind-html="$labelText"></span></label><label class="btn" ng-class="$buttonTheme"><span ng-class="{visibleswitch:!$checked}" ng-bind-html="$falseLabel"></span><span class="switch-bg" ng-class="{visibleswitch:$checked}"></span><span class="switch-label" ng-class="{visibleswitch:$checked}" ng-bind-html="$labelText"></span></label></div>') }]).provider("$switchButton", function () { var a = this.defaults = { trueLabel: "ON", falseLabel: "OFF", trueValue: !0, falseValue: !1, labelText: "&nbsp;", effect: "slide-left", theme: "default", btnSize: !1 }; this.$get = function () { return { defaults: a } } }).directive("nqSwitchButton", ["$switchButton", "$helpers", function (a, b) { return { restrict: "AC", scope: {}, templateUrl: "switch/switchbutton.tpl.html", require: "ngModel", link: function (c, d, e, f) { var g = d.children(); d.after(g), d.hide(); var h = angular.extend({}, a.defaults); if (angular.forEach(["theme", "effect", "btnSize"], function (a) { angular.isDefined(e[a]) && (h[a] = e[a]) }), angular.forEach(["trueLabel", "falseLabel", "labelText"], function (a) { angular.isDefined(e[a]) && (h[a] = b.parseConstant(e[a])), c["$" + a] = h[a] }), h.effect && g.addClass(h.effect), !h.theme && "default" == h.theme, h.theme) { for (var i = h.theme.split(","), j = "", k = 0; k < i.length; k++)j += "btn-" + i[k] + " "; c.$$postDigest(function () { c.$buttonTheme = j }) } h.btnSize && g.addClass("btn-group-" + h.btnSize); var l = h.trueValue || !0, m = h.falseValue || !1; angular.isDefined(e.ngTrueValue) && (l = e.ngTrueValue), angular.isDefined(e.ngFalseValue) && (l = e.ngFalseValue), c.$parent.$watch(e.ngModel, function (a) { a != l || c.$checked ? a == m && c.$checked && (c.$checked = !1) : c.$checked = !0 }), g.on("click", function (a) { return c.$disabled ? (a.preventDefault(), !1) : void c.$apply(function () { e.$set("checked", !c.$checked) }) }), e.$observe("checked", function (a) { c.$checked = a, f.$setViewValue(a ? l : m) }), e.$observe("disabled", function (a) { c.$disabled = a, c.$disabled ? g.addClass("btn-disabled") : g.removeClass("btn-disabled") }), c.$on("$destroy", function () { g.off("click"), g = null, h = null }) } } }]), angular.module("ngQuantum.tabset", ["ngQuantum.services.helpers"]).run(["$templateCache", function (a) { "use strict"; a.put("tabs/tabset.tpl.html", '<div class="tab-container {{theme}}"><ul class="nav {{navClasses}}" nav-placement="{{placement}}"><li ng-repeat="pane in panes | orderBy:$paneindex" ng-class="{active: pane.active, disabled: pane.disabled}"><a role="button" tabindex="0" tab-heading-transclude="pane">{{pane.heading}}</a></li></ul><div class="tab-content clearfix" ng-transclude></div></div>'), a.put("tabs/tabset.responsive.tpl.html", '<div class="tab-container {{theme}}"><ul class="nav {{navClasses}}" nav-placement="{{placement}}"><li ng-repeat="pane in panes" ng-show="!pane.stored"  ng-class="{active: pane.active, disabled: pane.disabled}"><a role="button" tabindex="0" tab-heading-transclude="pane">{{pane.heading}}</a></li><li ng-show="showMore"><a role="button" tabindex="0" nq-dropdown="" class="dropdown-toggle" data-placement="{{ddPlacement}}">More</a><ul class="dropdown-menu"><li ng-repeat="pane in panes | filter:{stored:true}" ng-class="{active: pane.active, disabled: pane.disabled}"><a role="button" tabindex="0" ng-click="pane.select()" ng-bind-html="pane.htmlString"></a></li></ul></li></ul><div class="tab-content" ng-transclude></div></div>') }]).provider("$tabset", function () { var a = this.defaults = { effect: "slide-right-left", type: "tabs", speed: "fastest", placement: "top", justified: !1, prefixEvent: "tabs", directive: "nqTab", instanceName: "tabs", fireEmit: !1, fireBroadcast: !1, keyboard: !1, theme: !1, trigger: "click", responsive: !0, delay: 0 }; this.$get = ["$timeout", "$filter", "$compile", "$sce", "$animate", function () { function b(b, c) { var d = {}, e = d.$options = angular.extend({}, a, c), f = d.panes = b.panes = [], g = "nav-" + e.type; return e.justified ? g += " nav-justified" : /right|left/.test(e.placement) && (g += " nav-stacked", e.responsive = !1), b.ddPlacement = "bottom-right", b.navClasses = g, b.theme = (e.theme && "nav-" + e.theme) + " tab-" + e.placement, b.placement = e.placement, "bottom" == e.placement && (b.ddPlacement = "top-right"), d.select = function (a) { angular.forEach(f, function (b) { b.active && b !== a && (b.active = !1, b.activeClasses = "", b.onDeselect()) }), a.active = !0, a.onSelect() }, d.addPane = function (a) { f.push(a), 1 === f.length ? a.active = !0 : a.active && d.select(a), d.lastStoredIndex++ }, d.removePane = function (a) { var b = f.indexOf(a); if (a.active && f.length > 1) { var c = b == f.length - 1 ? b - 1 : b + 1; d.select(f[c]) } f.splice(b, 1) }, d.panesWidth = 0, d.lastStoredIndex = -1, d } return b }] }).directive("nqTabset", ["$tabset", "$compile", "$timeout", "$helpers", function (a, b, c, d) { return { restrict: "EA", transclude: !0, replace: !0, scope: {}, templateUrl: function (a, b) { return angular.isDefined(b.template) ? b.template : b.responsive && !/right|left/.test(b.placement) ? "tabs/tabset.responsive.tpl.html" : "tabs/tabset.tpl.html" }, controller: ["$scope", "$element", "$attrs", function (b, c, e) { var f = this, g = {}; angular.forEach(["theme", "justified", "effect", "type", "speed", "placement", "keyboard", "trigger", "responsive"], function (a) { angular.isDefined(e[a]) && (g[a] = d.parseConstant(e[a])) }); var h = new a(b, g); return f = angular.extend(f, h), e.tabsetModel && (b.$parent[e.tabsetModel] = f), f }], link: function (a, c, d, e) { function f(b, c) { !c && (c = 0), !b && (b = 0); var d = Math.abs(e.panesWidth - b); if (b && e.panes.length && !(10 > d)) if (b < e.panesWidth) for ((e.panes.length <= e.lastStoredIndex || -1 == e.lastStoredIndex) && (e.lastStoredIndex = e.panes.length - 1); b < e.panesWidth && e.lastStoredIndex > 0;) { var f = e.panes[e.lastStoredIndex]; f.stored || (e.panesWidth -= f.widht, f.stored = !0, a.showMore = !0), e.lastStoredIndex-- } else if (b > e.panesWidth) for (; b > e.panesWidth && e.panes.length > e.lastStoredIndex;) { var f = e.panes[e.lastStoredIndex]; f && 1 == f.stored && (e.panesWidth += f.widht, f.stored = !1), e.lastStoredIndex++ , e.panes.length == e.lastStoredIndex && (a.showMore = !1) } } d.nqTabset && a.$parent.$watch(d.nqTabset, function (d) { var e = c.find(".tab-content"); if (d && d.length && e.length) for (var f = 0; f < d.length; f++) { var g = angular.element('<div data-nq-tab=""></div>').append('<span data-tab-heading="">' + d[f].heading + "</span>").append(d[f].content); e.append(g), b(g)(a) } }, !0), e.$options.responsive && a.$watch(function () { return c.width() }, function (b) { setTimeout(function () { a.$apply(function () { f(c.innerWidth() - 90, b) }) }, 0) }) } } }]).directive("nqTab", ["$parse", "$timeout", function (a, b) { return { require: "^nqTabset", restrict: "EA", replace: !0, template: '<div class="tab-pane clearfix" tab-content-transclude=""></div>', transclude: !0, scope: { heading: "@", onSelect: "&select", onDeselect: "&deselect" }, controller: function () { }, compile: function (c, d, e) { return function (c, d, f, g) { c.effect = g.$options.effect, c.speed = g.$options.speed, angular.isDefined(f.effect) && (c.effect = f.effect), angular.isDefined(f.speed) && (c.effect = f.speed), angular.isDefined(f.active) && c.$$postDigest(function () { c.select() }), c.$watch("active", function (a) { a && g.select(c) }), c.disabled = !1, f.disabled && c.$parent.$watch(a(f.disabled), function (a) { c.disabled = !!a }), c.select = function () { c.disabled || (c.active = !0) }, c.$paneindex = d.index() || c.$index, g.addPane(c), c.$on("$destroy", function () { g.removePane(c) }), b(function () { c.$transcludeFn = e }, 0) } } } }]).directive("tabHeadingTransclude", ["$compile", function (a) { return { restrict: "A", require: "^nqTabset", link: function (b, c, d, e) { var f = b.$eval(d.tabHeadingTransclude); b.$watch(function () { return f.headingElement }, function (d) { d ? (c.html(a(angular.element(d))(b)), f.widht = c.parent().outerWidth(!0)) : f.widht = c.parent().outerWidth(!0), f.oldWidth && (e.panesWidth -= f.oldWidth), f.oldWidth = f.widht, e.panesWidth += f.widht, f.htmlString = c.html() }), c.on("click", function (a) { a.preventDefault(), a.stopPropagation(), console.log(f), f.active || b.$apply(function () { f.select() }) }) } } }]).directive("navPlacement", [function () { return { restrict: "A", require: "^nqTabset", link: function (a, b, c) { c.$observe("navPlacement", function (a) { /bottom|right/.test(a) && b.parent().append(b) }) } } }]).directive("tabContentTransclude", ["$animate", "$timeout", function (a) { function b(a) { return a.tagName && (a.hasAttribute("tab-heading") || a.hasAttribute("data-tab-heading") || "tab-heading" === a.tagName.toLowerCase() || "data-tab-heading" === a.tagName.toLowerCase()) } return { restrict: "A", require: "^nqTab", link: function (c, d) { function e() { if (d.css("display", "block"), d.css("visibility", "visible"), c.effect) { d.addClass(c.speed); var b = d.closest(".tab-content"); b.css("overflow", "hidden"), a.addClass(d, c.effect).then(function () { b.css("overflow", "") }) } } function f() { d.css("visibility", "hidden"), d.css("display", "none"), c.effect && (d.removeClass(c.speed), d.removeClass(c.effect)) } c.$watch("$transcludeFn", function (a) { a && c.$transcludeFn(c.$parent, function (a) { angular.forEach(a, function (a) { b(a) ? c.headingElement = a : d.append(a) }) }) }), c.$watch("active", function (a) { a ? e() : f() }) } } }]), angular.module("ngQuantum.tooltip", ["ngQuantum.popMaster"]).run(["$templateCache", function (a) { "use strict"; a.put("tooltip/tooltip.tpl.html", '<div class="tooltip in" ng-show="title"><div class="tooltip-arrow"></div><div class="tooltip-inner" ng-bind="title"></div></div>') }]).provider("$tooltip", function () { this.$get = ["$sce", "$rootScope", "$popMaster", "$helpers", function (a, b, c, d) { function e(a, b, e) { var g = {}; b = d.parseOptions(e, b); var h = b = angular.extend({}, f, b); g = new c(a, h); var i = g.$scope; return h = g.$options = d.observeOptions(e, g.$options), h.title && (i.title = h.title), e && (e.qsTitle && (i.title = e.qsTitle), e.$$observers && e.$$observers.qsTitle && e.$observe("qsTitle", function (a, b) { i.title = a, angular.isDefined(b) && g.$applyPlacement() })), i.$on("$destroy", function () { g && g.destroy(), g = null }), g } var f = this.defaults = { title: !1, template: "tooltip/tooltip.tpl.html", directive: "nqTooltip", typeClass: "tooltip", prefixEvent: "tooltip", container: "body", displayReflow: !0, autoDestroy: !1, forceHide: !0, clearExists: !1 }; return e }] }).directive("nqTooltip", ["$tooltip", function (a) { return { restrict: "EAC", link: function (b, c, d) { var e = { $scope: b.$new() }; "input" == c[0].tagName.toLowerCase() && (e.isInput = !0); a(c, e, d); b.$on("$destroy", function () { e.$scope.$destroy() }) } } }]), angular.module("ngQuantum", ["ngQuantum.directives", "ngQuantum.tooltip", "ngQuantum.aside", "ngQuantum.dropdown", "ngQuantum.modal", "ngQuantum.modalBox", "ngQuantum.alert", "ngQuantum.popover", "ngQuantum.button", "ngQuantum.loading", "ngQuantum.loadingButton", "ngQuantum.tabset", "ngQuantum.carousel", "ngQuantum.collapse", "ngQuantum.select", "ngQuantum.datepicker", "ngQuantum.scrollbar", "ngQuantum.colorpicker", "ngQuantum.switchButton", "ngQuantum.slider"]);
//# sourceMappingURL=quantumui.min.js.map