/**
 * @license AngularJS v1.6.9
 * (c) 2010-2018 Google, Inc. http://angularjs.org
 * License: MIT
 */
!function (e) { "use strict"; var t = { objectMaxDepth: 5 }; function n(e) { if (!j(e)) return t; R(e.objectMaxDepth) && (t.objectMaxDepth = r(e.objectMaxDepth) ? e.objectMaxDepth : NaN) } function r(e) { return B(e) && e > 0 } function i(e, n) { return n = n || Error, function () { var r, i, a = arguments[0], o = arguments[1], s = "[" + (e ? e + ":" : "") + a + "] ", l = fe(arguments, 2).map((function (e) { return Ke(e, t.objectMaxDepth) })); for (s += o.replace(/\{\d+\}/g, (function (e) { var t = +e.slice(1, -1); return t < l.length ? l[t] : e })), s += "\nhttp://errors.angularjs.org/1.6.9/" + (e ? e + "/" : "") + a, i = 0, r = "?"; i < l.length; i++, r = "&")s += r + "p" + i + "=" + encodeURIComponent(l[i]); return new n(s) } } var a = /^\/(.+)\/([a-z]*)$/, o = "validity", s = Object.prototype.hasOwnProperty, l = function (e) { return U(e) ? e.toLowerCase() : e }, c = function (e) { return U(e) ? e.toUpperCase() : e }; "i" !== "I".toLowerCase() && (l = function (e) { return U(e) ? e.replace(/[A-Z]/g, (function (e) { return String.fromCharCode(32 | e.charCodeAt(0)) })) : e }, c = function (e) { return U(e) ? e.replace(/[a-z]/g, (function (e) { return String.fromCharCode(-33 & e.charCodeAt(0)) })) : e }); var u, d, f, p, h = [].slice, m = [].splice, g = [].push, v = Object.prototype.toString, $ = Object.getPrototypeOf, y = i("ng"), b = e.angular || (e.angular = {}), w = 0; function S(e) { if (null == e || J(e)) return !1; if (z(e) || U(e) || d && e instanceof d) return !0; var t = "length" in Object(e) && e.length; return B(t) && (t >= 0 && (t - 1 in e || e instanceof Array) || "function" == typeof e.item) } function C(e, t, n) { var r, i; if (e) if (G(e)) for (r in e) "prototype" !== r && "length" !== r && "name" !== r && e.hasOwnProperty(r) && t.call(n, e[r], r, e); else if (z(e) || S(e)) { var a = "object" != typeof e; for (r = 0, i = e.length; r < i; r++)(a || r in e) && t.call(n, e[r], r, e) } else if (e.forEach && e.forEach !== C) e.forEach(t, n, e); else if (q(e)) for (r in e) t.call(n, e[r], r, e); else if ("function" == typeof e.hasOwnProperty) for (r in e) e.hasOwnProperty(r) && t.call(n, e[r], r, e); else for (r in e) s.call(e, r) && t.call(n, e[r], r, e); return e } function x(e, t, n) { for (var r = Object.keys(e).sort(), i = 0; i < r.length; i++)t.call(n, e[r[i]], r[i]); return r } function k(e) { return function (t, n) { e(n, t) } } function D() { return ++w } function E(e, t) { t ? e.$$hashKey = t : delete e.$$hashKey } function T(e, t, n) { for (var r = e.$$hashKey, i = 0, a = t.length; i < a; ++i) { var o = t[i]; if (j(o) || G(o)) for (var s = Object.keys(o), l = 0, c = s.length; l < c; l++) { var u = s[l], d = o[u]; n && j(d) ? H(d) ? e[u] = new Date(d.valueOf()) : K(d) ? e[u] = new RegExp(d) : d.nodeName ? e[u] = d.cloneNode(!0) : ne(d) ? e[u] = d.clone() : (j(e[u]) || (e[u] = z(d) ? [] : {}), T(e[u], [d], !0)) : e[u] = d } } return E(e, r), e } function A(e) { return T(e, h.call(arguments, 1), !1) } function I(e) { return T(e, h.call(arguments, 1), !0) } function M(e) { return parseInt(e, 10) } u = e.document.documentMode; var O = Number.isNaN || function (e) { return e != e }; function P(e, t) { return A(Object.create(e), t) } function F() { } function _(e) { return e } function N(e) { return function () { return e } } function L(e) { return G(e.toString) && e.toString !== v } function V(e) { return void 0 === e } function R(e) { return void 0 !== e } function j(e) { return null !== e && "object" == typeof e } function q(e) { return null !== e && "object" == typeof e && !$(e) } function U(e) { return "string" == typeof e } function B(e) { return "number" == typeof e } function H(e) { return "[object Date]" === v.call(e) } F.$inject = [], _.$inject = []; var z = Array.isArray; function W(e) { switch (v.call(e)) { case "[object Error]": case "[object Exception]": case "[object DOMException]": return !0; default: return e instanceof Error } } function G(e) { return "function" == typeof e } function K(e) { return "[object RegExp]" === v.call(e) } function J(e) { return e && e.window === e } function Q(e) { return e && e.$evalAsync && e.$watch } function Y(e) { return "boolean" == typeof e } function Z(e) { return e && G(e.then) } var X = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/; var ee = function (e) { return U(e) ? e.trim() : e }, te = function (e) { return e.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08") }; function ne(e) { return !(!e || !(e.nodeName || e.prop && e.attr && e.find)) } function re(e) { return l(e.nodeName || e[0] && e[0].nodeName) } function ie(e, t) { return -1 !== Array.prototype.indexOf.call(e, t) } function ae(e, t) { var n = e.indexOf(t); return n >= 0 && e.splice(n, 1), n } function oe(e, t, n) { var i, a, o = [], l = []; if (n = r(n) ? n : NaN, t) { if ((a = t) && B(a.length) && X.test(v.call(a)) || (i = t, "[object ArrayBuffer]" === v.call(i))) throw y("cpta", "Can't copy! TypedArray destination cannot be mutated."); if (e === t) throw y("cpi", "Can't copy! Source and destination are identical."); return z(t) ? t.length = 0 : C(t, (function (e, n) { "$$hashKey" !== n && delete t[n] })), o.push(e), l.push(t), c(e, t, n) } return u(e, n); function c(e, t, n) { if (--n < 0) return "..."; var r, i = t.$$hashKey; if (z(e)) for (var a = 0, o = e.length; a < o; a++)t.push(u(e[a], n)); else if (q(e)) for (r in e) t[r] = u(e[r], n); else if (e && "function" == typeof e.hasOwnProperty) for (r in e) e.hasOwnProperty(r) && (t[r] = u(e[r], n)); else for (r in e) s.call(e, r) && (t[r] = u(e[r], n)); return E(t, i), t } function u(e, t) { if (!j(e)) return e; var n = o.indexOf(e); if (-1 !== n) return l[n]; if (J(e) || Q(e)) throw y("cpws", "Can't copy! Making copies of Window or Scope instances is not supported."); var r = !1, i = function (e) { switch (v.call(e)) { case "[object Int8Array]": case "[object Int16Array]": case "[object Int32Array]": case "[object Float32Array]": case "[object Float64Array]": case "[object Uint8Array]": case "[object Uint8ClampedArray]": case "[object Uint16Array]": case "[object Uint32Array]": return new e.constructor(u(e.buffer), e.byteOffset, e.length); case "[object ArrayBuffer]": if (!e.slice) { var t = new ArrayBuffer(e.byteLength); return new Uint8Array(t).set(new Uint8Array(e)), t } return e.slice(0); case "[object Boolean]": case "[object Number]": case "[object String]": case "[object Date]": return new e.constructor(e.valueOf()); case "[object RegExp]": var n = new RegExp(e.source, e.toString().match(/[^/]*$/)[0]); return n.lastIndex = e.lastIndex, n; case "[object Blob]": return new e.constructor([e], { type: e.type }) }if (G(e.cloneNode)) return e.cloneNode(!0) }(e); return void 0 === i && (i = z(e) ? [] : Object.create($(e)), r = !0), o.push(e), l.push(i), r ? c(e, i, t) : i } } function se(e, t) { return e === t || e != e && t != t } function le(e, t) { if (e === t) return !0; if (null === e || null === t) return !1; if (e != e && t != t) return !0; var n, r, i, a = typeof e; if (a === typeof t && "object" === a) { if (!z(e)) { if (H(e)) return !!H(t) && se(e.getTime(), t.getTime()); if (K(e)) return !!K(t) && e.toString() === t.toString(); if (Q(e) || Q(t) || J(e) || J(t) || z(t) || H(t) || K(t)) return !1; for (r in i = je(), e) if ("$" !== r.charAt(0) && !G(e[r])) { if (!le(e[r], t[r])) return !1; i[r] = !0 } for (r in t) if (!(r in i) && "$" !== r.charAt(0) && R(t[r]) && !G(t[r])) return !1; return !0 } if (!z(t)) return !1; if ((n = e.length) === t.length) { for (r = 0; r < n; r++)if (!le(e[r], t[r])) return !1; return !0 } } return !1 } var ce = function () { if (!R(ce.rules)) { var t = e.document.querySelector("[ng-csp]") || e.document.querySelector("[data-ng-csp]"); if (t) { var n = t.getAttribute("ng-csp") || t.getAttribute("data-ng-csp"); ce.rules = { noUnsafeEval: !n || -1 !== n.indexOf("no-unsafe-eval"), noInlineStyle: !n || -1 !== n.indexOf("no-inline-style") } } else ce.rules = { noUnsafeEval: function () { try { return new Function(""), !1 } catch (e) { return !0 } }(), noInlineStyle: !1 } } return ce.rules }, ue = function () { if (R(ue.name_)) return ue.name_; var t, n, r, i, a = De.length; for (n = 0; n < a; ++n)if (r = De[n], t = e.document.querySelector("[" + r.replace(":", "\\:") + "jq]")) { i = t.getAttribute(r + "jq"); break } return ue.name_ = i }; function de(e, t, n) { return e.concat(h.call(t, n)) } function fe(e, t) { return h.call(e, t || 0) } function pe(e, t) { var n = arguments.length > 2 ? fe(arguments, 2) : []; return !G(t) || t instanceof RegExp ? t : n.length ? function () { return arguments.length ? t.apply(e, de(n, arguments, 0)) : t.apply(e, n) } : function () { return arguments.length ? t.apply(e, arguments) : t.call(e) } } function he(t, n) { var r = n; return "string" == typeof t && "$" === t.charAt(0) && "$" === t.charAt(1) ? r = void 0 : J(n) ? r = "$WINDOW" : n && e.document === n ? r = "$DOCUMENT" : Q(n) && (r = "$SCOPE"), r } function me(e, t) { if (!V(e)) return B(t) || (t = t ? 2 : null), JSON.stringify(e, he, t) } function ge(e) { return U(e) ? JSON.parse(e) : e } var ve = /:/g; function $e(e, t) { e = e.replace(ve, ""); var n = Date.parse("Jan 01, 1970 00:00:00 " + e) / 6e4; return O(n) ? t : n } function ye(e, t, n) { n = n ? -1 : 1; var r = e.getTimezoneOffset(); return function (e, t) { return (e = new Date(e.getTime())).setMinutes(e.getMinutes() + t), e }(e, n * ($e(t, r) - r)) } function be(e) { e = d(e).clone().empty(); var t = d("<div>").append(e).html(); try { return e[0].nodeType === Be ? l(t) : t.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/, (function (e, t) { return "<" + l(t) })) } catch (e) { return l(t) } } function we(e) { try { return decodeURIComponent(e) } catch (e) { } } function Se(e) { var t = {}; return C((e || "").split("&"), (function (e) { var n, r, i; e && (r = e = e.replace(/\+/g, "%20"), -1 !== (n = e.indexOf("=")) && (r = e.substring(0, n), i = e.substring(n + 1)), R(r = we(r)) && (i = !R(i) || we(i), s.call(t, r) ? z(t[r]) ? t[r].push(i) : t[r] = [t[r], i] : t[r] = i)) })), t } function Ce(e) { var t = []; return C(e, (function (e, n) { z(e) ? C(e, (function (e) { t.push(ke(n, !0) + (!0 === e ? "" : "=" + ke(e, !0))) })) : t.push(ke(n, !0) + (!0 === e ? "" : "=" + ke(e, !0))) })), t.length ? t.join("&") : "" } function xe(e) { return ke(e, !0).replace(/%26/gi, "&").replace(/%3D/gi, "=").replace(/%2B/gi, "+") } function ke(e, t) { return encodeURIComponent(e).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%3B/gi, ";").replace(/%20/g, t ? "%20" : "+") } var De = ["ng-", "data-ng-", "ng:", "x-ng-"]; var Ee = function (t) { var n = t.currentScript; if (!n) return !0; if (!(n instanceof e.HTMLScriptElement || n instanceof e.SVGScriptElement)) return !1; var r = n.attributes; return [r.getNamedItem("src"), r.getNamedItem("href"), r.getNamedItem("xlink:href")].every((function (e) { if (!e) return !0; if (!e.value) return !1; var n = t.createElement("a"); if (n.href = e.value, t.location.origin === n.origin) return !0; switch (n.protocol) { case "http:": case "https:": case "ftp:": case "blob:": case "file:": case "data:": return !0; default: return !1 } })) }(e.document); function Te(t, n) { var r, i, a = {}; if (C(De, (function (e) { var n = e + "app"; !r && t.hasAttribute && t.hasAttribute(n) && (r = t, i = t.getAttribute(n)) })), C(De, (function (e) { var n, a = e + "app"; !r && (n = t.querySelector("[" + a.replace(":", "\\:") + "]")) && (r = n, i = n.getAttribute(a)) })), r) { if (!Ee) return void e.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."); a.strictDi = null !== function (e, t) { var n, r, i = De.length; for (r = 0; r < i; ++r)if (n = De[r] + t, U(n = e.getAttribute(n))) return n; return null }(r, "strict-di"), n(r, i ? [i] : [], a) } } function Ae(t, n, r) { j(r) || (r = {}); r = A({ strictDi: !1 }, r); var i = function () { if ((t = d(t)).injector()) { var i = t[0] === e.document ? "document" : be(t); throw y("btstrpd", "App already bootstrapped with this element '{0}'", i.replace(/</, "&lt;").replace(/>/, "&gt;")) } (n = n || []).unshift(["$provide", function (e) { e.value("$rootElement", t) }]), r.debugInfoEnabled && n.push(["$compileProvider", function (e) { e.debugInfoEnabled(!0) }]), n.unshift("ng"); var a = Qt(n, r.strictDi); return a.invoke(["$rootScope", "$rootElement", "$compile", "$injector", function (e, t, n, r) { e.$apply((function () { t.data("$injector", r), n(t)(e) })) }]), a }, a = /^NG_ENABLE_DEBUG_INFO!/, o = /^NG_DEFER_BOOTSTRAP!/; if (e && a.test(e.name) && (r.debugInfoEnabled = !0, e.name = e.name.replace(a, "")), e && !o.test(e.name)) return i(); e.name = e.name.replace(o, ""), b.resumeBootstrap = function (e) { return C(e, (function (e) { n.push(e) })), i() }, G(b.resumeDeferredBootstrap) && b.resumeDeferredBootstrap() } function Ie() { e.name = "NG_ENABLE_DEBUG_INFO!" + e.name, e.location.reload() } function Me(e) { var t = b.element(e).injector(); if (!t) throw y("test", "no injector found for element argument to getTestability"); return t.get("$$testability") } var Oe = /[A-Z]/g; function Pe(e, t) { return t = t || "_", e.replace(Oe, (function (e, n) { return (n ? t : "") + e.toLowerCase() })) } var Fe = !1; function _e(e, t, n) { if (!e) throw y("areq", "Argument '{0}' is {1}", t || "?", n || "required"); return e } function Ne(e, t, n) { return n && z(e) && (e = e[e.length - 1]), _e(G(e), t, "not a function, got " + (e && "object" == typeof e ? e.constructor.name || "Object" : typeof e)), e } function Le(e, t) { if ("hasOwnProperty" === e) throw y("badname", "hasOwnProperty is not a valid {0} name", t) } function Ve(e, t, n) { if (!t) return e; for (var r, i = t.split("."), a = e, o = i.length, s = 0; s < o; s++)r = i[s], e && (e = (a = e)[r]); return !n && G(e) ? pe(a, e) : e } function Re(e) { for (var t, n = e[0], r = e[e.length - 1], i = 1; n !== r && (n = n.nextSibling); i++)(t || e[i] !== n) && (t || (t = d(h.call(e, 0, i))), t.push(n)); return t || e } function je() { return Object.create(null) } function qe(e) { if (null == e) return ""; switch (typeof e) { case "string": break; case "number": e = "" + e; break; default: e = !L(e) || z(e) || H(e) ? me(e) : e.toString() }return e } var Ue = 1, Be = 3, He = 8, ze = 9, We = 11; function Ge(e, t) { if (z(e)) { t = t || []; for (var n = 0, r = e.length; n < r; n++)t[n] = e[n] } else if (j(e)) for (var i in t = t || {}, e) "$" === i.charAt(0) && "$" === i.charAt(1) || (t[i] = e[i]); return t || e } function Ke(e, t) { return "function" == typeof e ? e.toString().replace(/ \{[\s\S]*$/, "") : V(e) ? "undefined" : "string" != typeof e ? function (e, t) { var n = []; return r(t) && (e = b.copy(e, null, t)), JSON.stringify(e, (function (e, t) { if (j(t = he(e, t))) { if (n.indexOf(t) >= 0) return "..."; n.push(t) } return t })) }(e, t) : e } var Je = { full: "1.6.9", major: 1, minor: 6, dot: 9, codeName: "fiery-basilisk" }; pt.expando = "ng339"; var Qe = pt.cache = {}, Ye = 1; pt._data = function (e) { return this.cache[e[this.expando]] || {} }; var Ze = /-([a-z])/g, Xe = /^-ms-/, et = { mouseleave: "mouseout", mouseenter: "mouseover" }, tt = i("jqLite"); function nt(e, t) { return t.toUpperCase() } function rt(e) { return e.replace(Ze, nt) } var it = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, at = /<|&#?\w+;/, ot = /<([\w:-]+)/, st = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, lt = { option: [1, '<select multiple="multiple">', "</select>"], thead: [1, "<table>", "</table>"], col: [2, "<table><colgroup>", "</colgroup></table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], _default: [0, "", ""] }; function ct(e) { return !at.test(e) } function ut(e) { var t = e.nodeType; return t === Ue || !t || t === ze } function dt(e, t) { var n, r, i, a, o = t.createDocumentFragment(), s = []; if (ct(e)) s.push(t.createTextNode(e)); else { for (n = o.appendChild(t.createElement("div")), r = (ot.exec(e) || ["", ""])[1].toLowerCase(), i = lt[r] || lt._default, n.innerHTML = i[1] + e.replace(st, "<$1></$2>") + i[2], a = i[0]; a--;)n = n.lastChild; s = de(s, n.childNodes), (n = o.firstChild).textContent = "" } return o.textContent = "", o.innerHTML = "", C(s, (function (e) { o.appendChild(e) })), o } lt.optgroup = lt.option, lt.tbody = lt.tfoot = lt.colgroup = lt.caption = lt.thead, lt.th = lt.td; var ft = e.Node.prototype.contains || function (e) { return !!(16 & this.compareDocumentPosition(e)) }; function pt(t) { if (t instanceof pt) return t; var n, r, i, a; if (U(t) && (t = ee(t), n = !0), !(this instanceof pt)) { if (n && "<" !== t.charAt(0)) throw tt("nosel", "Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element"); return new pt(t) } n ? Ct(this, (r = t, i = i || e.document, (a = it.exec(r)) ? [i.createElement(a[1])] : (a = dt(r, i)) ? a.childNodes : [])) : G(t) ? Tt(t) : Ct(this, t) } function ht(e) { return e.cloneNode(!0) } function mt(e, t) { !t && ut(e) && d.cleanData([e]), e.querySelectorAll && d.cleanData(e.querySelectorAll("*")) } function gt(e, t, n, r) { if (R(r)) throw tt("offargs", "jqLite#off() does not support the `selector` argument"); var i = $t(e), a = i && i.events, o = i && i.handle; if (o) if (t) { var s = function (t) { var r = a[t]; R(n) && ae(r || [], n), R(n) && r && r.length > 0 || (e.removeEventListener(t, o), delete a[t]) }; C(t.split(" "), (function (e) { s(e), et[e] && s(et[e]) })) } else for (t in a) "$destroy" !== t && e.removeEventListener(t, o), delete a[t] } function vt(e, t) { var n = e.ng339, r = n && Qe[n]; if (r) { if (t) return void delete r.data[t]; r.handle && (r.events.$destroy && r.handle({}, "$destroy"), gt(e)), delete Qe[n], e.ng339 = void 0 } } function $t(e, t) { var n = e.ng339, r = n && Qe[n]; return t && !r && (e.ng339 = n = ++Ye, r = Qe[n] = { events: {}, data: {}, handle: void 0 }), r } function yt(e, t, n) { if (ut(e)) { var r, i = R(n), a = !i && t && !j(t), o = !t, s = $t(e, !a), l = s && s.data; if (i) l[rt(t)] = n; else { if (o) return l; if (a) return l && l[rt(t)]; for (r in t) l[rt(r)] = t[r] } } } function bt(e, t) { return !!e.getAttribute && (" " + (e.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " ").indexOf(" " + t + " ") > -1 } function wt(e, t) { if (t && e.setAttribute) { var n = (" " + (e.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " "), r = n; C(t.split(" "), (function (e) { e = ee(e), r = r.replace(" " + e + " ", " ") })), r !== n && e.setAttribute("class", ee(r)) } } function St(e, t) { if (t && e.setAttribute) { var n = (" " + (e.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " "), r = n; C(t.split(" "), (function (e) { e = ee(e), -1 === r.indexOf(" " + e + " ") && (r += e + " ") })), r !== n && e.setAttribute("class", ee(r)) } } function Ct(e, t) { if (t) if (t.nodeType) e[e.length++] = t; else { var n = t.length; if ("number" == typeof n && t.window !== t) { if (n) for (var r = 0; r < n; r++)e[e.length++] = t[r] } else e[e.length++] = t } } function xt(e, t) { return kt(e, "$" + (t || "ngController") + "Controller") } function kt(e, t, n) { e.nodeType === ze && (e = e.documentElement); for (var r = z(t) ? t : [t]; e;) { for (var i = 0, a = r.length; i < a; i++)if (R(n = d.data(e, r[i]))) return n; e = e.parentNode || e.nodeType === We && e.host } } function Dt(e) { for (mt(e, !0); e.firstChild;)e.removeChild(e.firstChild) } function Et(e, t) { t || mt(e); var n = e.parentNode; n && n.removeChild(e) } function Tt(t) { function n() { e.document.removeEventListener("DOMContentLoaded", n), e.removeEventListener("load", n), t() } "complete" === e.document.readyState ? e.setTimeout(t) : (e.document.addEventListener("DOMContentLoaded", n), e.addEventListener("load", n)) } var At = pt.prototype = { ready: Tt, toString: function () { var e = []; return C(this, (function (t) { e.push("" + t) })), "[" + e.join(", ") + "]" }, eq: function (e) { return d(e >= 0 ? this[e] : this[this.length + e]) }, length: 0, push: g, sort: [].sort, splice: [].splice }, It = {}; C("multiple,selected,checked,disabled,readOnly,required,open".split(","), (function (e) { It[l(e)] = e })); var Mt = {}; C("input,select,option,textarea,button,form,details".split(","), (function (e) { Mt[e] = !0 })); var Ot = { ngMinlength: "minlength", ngMaxlength: "maxlength", ngMin: "min", ngMax: "max", ngPattern: "pattern", ngStep: "step" }; function Pt(e, t) { var n = It[t.toLowerCase()]; return n && Mt[re(e)] && n } function Ft(e, t, n) { n.call(e, t) } function _t(e, t, n) { var r = t.relatedTarget; r && (r === e || ft.call(e, r)) || n.call(e, t) } function Nt() { this.$get = function () { return A(pt, { hasClass: function (e, t) { return e.attr && (e = e[0]), bt(e, t) }, addClass: function (e, t) { return e.attr && (e = e[0]), St(e, t) }, removeClass: function (e, t) { return e.attr && (e = e[0]), wt(e, t) } }) } } function Lt(e, t) { var n = e && e.$$hashKey; if (n) return "function" == typeof n && (n = e.$$hashKey()), n; var r = typeof e; return n = "function" === r || "object" === r && null !== e ? e.$$hashKey = r + ":" + (t || D)() : r + ":" + e } C({ data: yt, removeData: vt, hasData: function (e) { for (var t in Qe[e.ng339]) return !0; return !1 }, cleanData: function (e) { for (var t = 0, n = e.length; t < n; t++)vt(e[t]) } }, (function (e, t) { pt[t] = e })), C({ data: yt, inheritedData: kt, scope: function (e) { return d.data(e, "$scope") || kt(e.parentNode || e, ["$isolateScope", "$scope"]) }, isolateScope: function (e) { return d.data(e, "$isolateScope") || d.data(e, "$isolateScopeNoTemplate") }, controller: xt, injector: function (e) { return kt(e, "$injector") }, removeAttr: function (e, t) { e.removeAttribute(t) }, hasClass: bt, css: function (e, t, n) { if (t = function (e) { return rt(e.replace(Xe, "ms-")) }(t), !R(n)) return e.style[t]; e.style[t] = n }, attr: function (e, t, n) { var r, i = e.nodeType; if (i !== Be && 2 !== i && i !== He && e.getAttribute) { var a = l(t), o = It[a]; if (!R(n)) return r = e.getAttribute(t), o && null !== r && (r = a), null === r ? void 0 : r; null === n || !1 === n && o ? e.removeAttribute(t) : e.setAttribute(t, o ? a : n) } }, prop: function (e, t, n) { if (!R(n)) return e[t]; e[t] = n }, text: function () { return e.$dv = "", e; function e(e, t) { if (V(t)) { var n = e.nodeType; return n === Ue || n === Be ? e.textContent : "" } e.textContent = t } }(), val: function (e, t) { if (V(t)) { if (e.multiple && "select" === re(e)) { var n = []; return C(e.options, (function (e) { e.selected && n.push(e.value || e.text) })), n } return e.value } e.value = t }, html: function (e, t) { if (V(t)) return e.innerHTML; mt(e, !0), e.innerHTML = t }, empty: Dt }, (function (e, t) { pt.prototype[t] = function (t, n) { var r, i, a = this.length; if (e !== Dt && V(2 === e.length && e !== bt && e !== xt ? t : n)) { if (j(t)) { for (r = 0; r < a; r++)if (e === yt) e(this[r], t); else for (i in t) e(this[r], i, t[i]); return this } for (var o = e.$dv, s = V(o) ? Math.min(a, 1) : a, l = 0; l < s; l++) { var c = e(this[l], t, n); o = o ? o + c : c } return o } for (r = 0; r < a; r++)e(this[r], t, n); return this } })), C({ removeData: vt, on: function (e, t, n, r) { if (R(r)) throw tt("onargs", "jqLite#on() does not support the `selector` or `eventData` parameters"); if (ut(e)) { var i = $t(e, !0), a = i.events, o = i.handle; o || (o = i.handle = function (e, t) { var n = function (n, r) { n.isDefaultPrevented = function () { return n.defaultPrevented }; var i = t[r || n.type], a = i ? i.length : 0; if (a) { if (V(n.immediatePropagationStopped)) { var o = n.stopImmediatePropagation; n.stopImmediatePropagation = function () { n.immediatePropagationStopped = !0, n.stopPropagation && n.stopPropagation(), o && o.call(n) } } n.isImmediatePropagationStopped = function () { return !0 === n.immediatePropagationStopped }; var s = i.specialHandlerWrapper || Ft; a > 1 && (i = Ge(i)); for (var l = 0; l < a; l++)n.isImmediatePropagationStopped() || s(e, n, i[l]) } }; return n.elem = e, n }(e, a)); for (var s = t.indexOf(" ") >= 0 ? t.split(" ") : [t], l = s.length, c = function (t, r, i) { var s = a[t]; s || ((s = a[t] = []).specialHandlerWrapper = r, "$destroy" === t || i || e.addEventListener(t, o)), s.push(n) }; l--;)t = s[l], et[t] ? (c(et[t], _t), c(t, void 0, !0)) : c(t) } }, off: gt, one: function (e, t, n) { (e = d(e)).on(t, (function r() { e.off(t, n), e.off(t, r) })), e.on(t, n) }, replaceWith: function (e, t) { var n, r = e.parentNode; mt(e), C(new pt(t), (function (t) { n ? r.insertBefore(t, n.nextSibling) : r.replaceChild(t, e), n = t })) }, children: function (e) { var t = []; return C(e.childNodes, (function (e) { e.nodeType === Ue && t.push(e) })), t }, contents: function (e) { return e.contentDocument || e.childNodes || [] }, append: function (e, t) { var n = e.nodeType; if (n === Ue || n === We) for (var r = 0, i = (t = new pt(t)).length; r < i; r++) { var a = t[r]; e.appendChild(a) } }, prepend: function (e, t) { if (e.nodeType === Ue) { var n = e.firstChild; C(new pt(t), (function (t) { e.insertBefore(t, n) })) } }, wrap: function (e, t) { var n, r, i; n = e, r = d(t).eq(0).clone()[0], (i = n.parentNode) && i.replaceChild(r, n), r.appendChild(n) }, remove: Et, detach: function (e) { Et(e, !0) }, after: function (e, t) { var n = e, r = e.parentNode; if (r) for (var i = 0, a = (t = new pt(t)).length; i < a; i++) { var o = t[i]; r.insertBefore(o, n.nextSibling), n = o } }, addClass: St, removeClass: wt, toggleClass: function (e, t, n) { t && C(t.split(" "), (function (t) { var r = n; V(r) && (r = !bt(e, t)), (r ? St : wt)(e, t) })) }, parent: function (e) { var t = e.parentNode; return t && t.nodeType !== We ? t : null }, next: function (e) { return e.nextElementSibling }, find: function (e, t) { return e.getElementsByTagName ? e.getElementsByTagName(t) : [] }, clone: ht, triggerHandler: function (e, t, n) { var r, i, a, o = t.type || t, s = $t(e), l = s && s.events, c = l && l[o]; c && (r = { preventDefault: function () { this.defaultPrevented = !0 }, isDefaultPrevented: function () { return !0 === this.defaultPrevented }, stopImmediatePropagation: function () { this.immediatePropagationStopped = !0 }, isImmediatePropagationStopped: function () { return !0 === this.immediatePropagationStopped }, stopPropagation: F, type: o, target: e }, t.type && (r = A(r, t)), i = Ge(c), a = n ? [r].concat(n) : [r], C(i, (function (t) { r.isImmediatePropagationStopped() || t.apply(e, a) }))) } }, (function (e, t) { pt.prototype[t] = function (t, n, r) { for (var i, a = 0, o = this.length; a < o; a++)V(i) ? R(i = e(this[a], t, n, r)) && (i = d(i)) : Ct(i, e(this[a], t, n, r)); return R(i) ? i : this } })), pt.prototype.bind = pt.prototype.on, pt.prototype.unbind = pt.prototype.off; var Vt = Object.create(null); function Rt() { this._keys = [], this._values = [], this._lastKey = NaN, this._lastIndex = -1 } Rt.prototype = { _idx: function (e) { return e === this._lastKey || (this._lastKey = e, this._lastIndex = this._keys.indexOf(e)), this._lastIndex }, _transformKey: function (e) { return O(e) ? Vt : e }, get: function (e) { e = this._transformKey(e); var t = this._idx(e); if (-1 !== t) return this._values[t] }, set: function (e, t) { e = this._transformKey(e); var n = this._idx(e); -1 === n && (n = this._lastIndex = this._keys.length), this._keys[n] = e, this._values[n] = t }, delete: function (e) { e = this._transformKey(e); var t = this._idx(e); return -1 !== t && (this._keys.splice(t, 1), this._values.splice(t, 1), this._lastKey = NaN, this._lastIndex = -1, !0) } }; var jt = Rt, qt = [function () { this.$get = [function () { return jt }] }], Ut = /^([^(]+?)=>/, Bt = /^[^(]*\(\s*([^)]*)\)/m, Ht = /,/, zt = /^\s*(_?)(\S+?)\1\s*$/, Wt = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm, Gt = i("$injector"); function Kt(e) { return Function.prototype.toString.call(e) } function Jt(e) { var t = Kt(e).replace(Wt, ""); return t.match(Ut) || t.match(Bt) } function Qt(e, t) { t = !0 === t; var n = {}, r = "Provider", i = [], a = new jt, o = { $provide: { provider: h(m), factory: h(v), service: h((function (e, t) { return v(e, ["$injector", function (e) { return e.instantiate(t) }]) })), value: h((function (e, t) { return v(e, N(t), !1) })), constant: h((function (e, t) { Le(e, "constant"), o[e] = t, l[e] = t })), decorator: function (e, t) { var n = s.get(e + r), i = n.$get; n.$get = function () { var e = d.invoke(i, n); return d.invoke(t, null, { $delegate: e }) } } } }, s = o.$injector = y(o, (function (e, t) { throw b.isString(t) && i.push(t), Gt("unpr", "Unknown provider: {0}", i.join(" <- ")) })), l = {}, c = y(l, (function (e, t) { var n = s.get(e + r, t); return d.invoke(n.$get, n, void 0, e) })), d = c; o["$injector" + r] = { $get: N(c) }, d.modules = s.modules = je(); var f = $(e); return (d = c.get("$injector")).strictDi = t, C(f, (function (e) { e && d.invoke(e) })), d.loadNewModules = function (e) { C($(e), (function (e) { e && d.invoke(e) })) }, d; function h(e) { return function (t, n) { if (!j(t)) return e(t, n); C(t, k(e)) } } function m(e, t) { if (Le(e, "service"), (G(t) || z(t)) && (t = s.instantiate(t)), !t.$get) throw Gt("pget", "Provider '{0}' must define $get factory method.", e); return o[e + r] = t } function g(e, t) { return function () { var n = d.invoke(t, this); if (V(n)) throw Gt("undef", "Provider '{0}' must return a value from $get factory method.", e); return n } } function v(e, t, n) { return m(e, { $get: !1 !== n ? g(e, t) : t }) } function $(e) { _e(V(e) || z(e), "modulesToLoad", "not an array"); var t, n = []; return C(e, (function (e) { if (!a.get(e)) { a.set(e, !0); try { U(e) ? (t = p(e), d.modules[e] = t, n = n.concat($(t.requires)).concat(t._runBlocks), r(t._invokeQueue), r(t._configBlocks)) : G(e) || z(e) ? n.push(s.invoke(e)) : Ne(e, "module") } catch (t) { throw z(e) && (e = e[e.length - 1]), t.message && t.stack && -1 === t.stack.indexOf(t.message) && (t = t.message + "\n" + t.stack), Gt("modulerr", "Failed to instantiate module {0} due to:\n{1}", e, t.stack || t.message || t) } } function r(e) { var t, n; for (t = 0, n = e.length; t < n; t++) { var r = e[t], i = s.get(r[0]); i[r[1]].apply(i, r[2]) } } })), n } function y(e, a) { function s(t, r) { if (e.hasOwnProperty(t)) { if (e[t] === n) throw Gt("cdep", "Circular dependency found: {0}", t + " <- " + i.join(" <- ")); return e[t] } try { return i.unshift(t), e[t] = n, e[t] = a(t, r), e[t] } catch (r) { throw e[t] === n && delete e[t], r } finally { i.shift() } } function l(e, n, r) { for (var i = [], a = Qt.$$annotate(e, t, r), o = 0, l = a.length; o < l; o++) { var c = a[o]; if ("string" != typeof c) throw Gt("itkn", "Incorrect injection token! Expected service name as string, got {0}", c); i.push(n && n.hasOwnProperty(c) ? n[c] : s(c, r)) } return i } return { invoke: function (e, t, n, r) { "string" == typeof n && (r = n, n = null); var i = l(e, n, r); return z(e) && (e = e[e.length - 1]), function (e) { if (u || "function" != typeof e) return !1; var t = e.$$ngIsClass; return Y(t) || (t = e.$$ngIsClass = /^(?:class\b|constructor\()/.test(Kt(e))), t }(e) ? (i.unshift(null), new (Function.prototype.bind.apply(e, i))) : e.apply(t, i) }, instantiate: function (e, t, n) { var r = z(e) ? e[e.length - 1] : e, i = l(e, t, n); return i.unshift(null), new (Function.prototype.bind.apply(r, i)) }, get: s, annotate: Qt.$$annotate, has: function (t) { return o.hasOwnProperty(t + r) || e.hasOwnProperty(t) } } } } function Yt() { var t = !0; this.disableAutoScrolling = function () { t = !1 }, this.$get = ["$window", "$location", "$rootScope", function (n, r, i) { var a = n.document; function o(e) { if (e) { e.scrollIntoView(); var t = function () { var e = s.yOffset; if (G(e)) e = e(); else if (ne(e)) { var t = e[0]; e = "fixed" !== n.getComputedStyle(t).position ? 0 : t.getBoundingClientRect().bottom } else B(e) || (e = 0); return e }(); if (t) { var r = e.getBoundingClientRect().top; n.scrollBy(0, r - t) } } else n.scrollTo(0, 0) } function s(e) { var t, n, i; (e = U(e) ? e : B(e) ? e.toString() : r.hash()) ? (t = a.getElementById(e)) ? o(t) : (n = a.getElementsByName(e), i = null, Array.prototype.some.call(n, (function (e) { if ("a" === re(e)) return i = e, !0 })), (t = i) ? o(t) : "top" === e && o(null)) : o(null) } return t && i.$watch((function () { return r.hash() }), (function (t, n) { var r, a; t === n && "" === t || (r = function () { i.$evalAsync(s) }, "complete" === (a = a || e).document.readyState ? a.setTimeout(r) : d(a).on("load", r)) })), s }] } Qt.$$annotate = function (e, t, n) { var r, i; if ("function" == typeof e) { if (!(r = e.$inject)) { if (r = [], e.length) { if (t) throw U(n) && n || (n = e.name || function (e) { var t = Jt(e); return t ? "function(" + (t[1] || "").replace(/[\s\r\n]+/, " ") + ")" : "fn" }(e)), Gt("strictdi", "{0} is not using explicit annotation and cannot be invoked in strict mode", n); C(Jt(e)[1].split(Ht), (function (e) { e.replace(zt, (function (e, t, n) { r.push(n) })) })) } e.$inject = r } } else z(e) ? (Ne(e[i = e.length - 1], "fn"), r = e.slice(0, i)) : Ne(e, "fn", !0); return r }; var Zt = i("$animate"), Xt = "ng-animate"; function en(e, t) { return e || t ? e ? t ? (z(e) && (e = e.join(" ")), z(t) && (t = t.join(" ")), e + " " + t) : e : t : "" } function tn(e) { return j(e) ? e : {} } var nn = function () { this.$get = F }, rn = function () { var e = new jt, t = []; this.$get = ["$$AnimateRunner", "$rootScope", function (n, r) { return { enabled: F, on: F, off: F, pin: F, push: function (o, s, l, c) { c && c(), (l = l || {}).from && o.css(l.from), l.to && o.css(l.to), (l.addClass || l.removeClass) && function (n, o, s) { var l = e.get(n) || {}, c = i(l, o, !0), u = i(l, s, !1); (c || u) && (e.set(n, l), t.push(n), 1 === t.length && r.$$postDigest(a)) }(o, l.addClass, l.removeClass); var u = new n; return u.complete(), u } }; function i(e, t, n) { var r = !1; return t && C(t = U(t) ? t.split(" ") : z(t) ? t : [], (function (t) { t && (r = !0, e[t] = n) })), r } function a() { C(t, (function (t) { var n = e.get(t); if (n) { var r = function (e) { U(e) && (e = e.split(" ")); var t = je(); return C(e, (function (e) { e.length && (t[e] = !0) })), t }(t.attr("class")), i = "", a = ""; C(n, (function (e, t) { e !== !!r[t] && (e ? i += (i.length ? " " : "") + t : a += (a.length ? " " : "") + t) })), C(t, (function (e) { i && St(e, i), a && wt(e, a) })), e.delete(t) } })), t.length = 0 } }] }, an = ["$provide", function (e) { var t = this, n = null, r = null; this.$$registeredAnimations = Object.create(null), this.register = function (n, r) { if (n && "." !== n.charAt(0)) throw Zt("notcsel", "Expecting class selector starting with '.' got '{0}'.", n); var i = n + "-animation"; t.$$registeredAnimations[n.substr(1)] = i, e.factory(i, r) }, this.customFilter = function (e) { return 1 === arguments.length && (r = G(e) ? e : null), r }, this.classNameFilter = function (e) { if (1 === arguments.length && ((n = e instanceof RegExp ? e : null) && new RegExp("[(\\s|\\/)]" + Xt + "[(\\s|\\/)]").test(n.toString()))) throw n = null, Zt("nongcls", '$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.', Xt); return n }, this.$get = ["$$animateQueue", function (e) { function t(e, t, n) { if (n) { var r = function (e) { for (var t = 0; t < e.length; t++) { var n = e[t]; if (1 === n.nodeType) return n } }(n); !r || r.parentNode || r.previousElementSibling || (n = null) } n ? n.after(e) : t.prepend(e) } return { on: e.on, off: e.off, pin: e.pin, enabled: e.enabled, cancel: function (e) { e.end && e.end() }, enter: function (n, r, i, a) { return r = r && d(r), i = i && d(i), t(n, r = r || i.parent(), i), e.push(n, "enter", tn(a)) }, move: function (n, r, i, a) { return r = r && d(r), i = i && d(i), t(n, r = r || i.parent(), i), e.push(n, "move", tn(a)) }, leave: function (t, n) { return e.push(t, "leave", tn(n), (function () { t.remove() })) }, addClass: function (t, n, r) { return (r = tn(r)).addClass = en(r.addclass, n), e.push(t, "addClass", r) }, removeClass: function (t, n, r) { return (r = tn(r)).removeClass = en(r.removeClass, n), e.push(t, "removeClass", r) }, setClass: function (t, n, r, i) { return (i = tn(i)).addClass = en(i.addClass, n), i.removeClass = en(i.removeClass, r), e.push(t, "setClass", i) }, animate: function (t, n, r, i, a) { return (a = tn(a)).from = a.from ? A(a.from, n) : n, a.to = a.to ? A(a.to, r) : r, i = i || "ng-inline-animate", a.tempClasses = en(a.tempClasses, i), e.push(t, "animate", a) } } }] }], on = function () { this.$get = ["$$rAF", function (e) { var t = []; function n(n) { t.push(n), t.length > 1 || e((function () { for (var e = 0; e < t.length; e++)t[e](); t = [] })) } return function () { var e = !1; return n((function () { e = !0 })), function (t) { e ? t() : n(t) } } }] }, sn = function () { this.$get = ["$q", "$sniffer", "$$animateAsyncRun", "$$isDocumentHidden", "$timeout", function (e, t, n, r, i) { function a(e) { this.setHost(e); var t = n(); this._doneCallbacks = [], this._tick = function (e) { r() ? function (e) { i(e, 0, !1) }(e) : t(e) }, this._state = 0 } return a.chain = function (e, t) { var n = 0; !function r() { if (n === e.length) return void t(!0); e[n]((function (e) { !1 !== e ? (n++, r()) : t(!1) })) }() }, a.all = function (e, t) { var n = 0, r = !0; function i(i) { r = r && i, ++n === e.length && t(r) } C(e, (function (e) { e.done(i) })) }, a.prototype = { setHost: function (e) { this.host = e || {} }, done: function (e) { 2 === this._state ? e() : this._doneCallbacks.push(e) }, progress: F, getPromise: function () { if (!this.promise) { var t = this; this.promise = e((function (e, n) { t.done((function (t) { !1 === t ? n() : e() })) })) } return this.promise }, then: function (e, t) { return this.getPromise().then(e, t) }, catch: function (e) { return this.getPromise().catch(e) }, finally: function (e) { return this.getPromise().finally(e) }, pause: function () { this.host.pause && this.host.pause() }, resume: function () { this.host.resume && this.host.resume() }, end: function () { this.host.end && this.host.end(), this._resolve(!0) }, cancel: function () { this.host.cancel && this.host.cancel(), this._resolve(!1) }, complete: function (e) { var t = this; 0 === t._state && (t._state = 1, t._tick((function () { t._resolve(e) }))) }, _resolve: function (e) { 2 !== this._state && (C(this._doneCallbacks, (function (t) { t(e) })), this._doneCallbacks.length = 0, this._state = 2) } }, a }] }, ln = function () { this.$get = ["$$rAF", "$q", "$$AnimateRunner", function (e, t, n) { return function (t, r) { var i = r || {}; i.$$prepared || (i = oe(i)), i.cleanupStyles && (i.from = i.to = null), i.from && (t.css(i.from), i.from = null); var a, o = new n; return { start: s, end: s }; function s() { return e((function () { !function () { i.addClass && (t.addClass(i.addClass), i.addClass = null); i.removeClass && (t.removeClass(i.removeClass), i.removeClass = null); i.to && (t.css(i.to), i.to = null) }(), a || o.complete(), a = !0 })), o } } }] }; function cn(e, t, n, r) { var i = this, a = e.location, o = e.history, s = e.setTimeout, l = e.clearTimeout, c = {}; i.isMock = !1; var u = 0, f = []; function p(e) { try { e.apply(null, fe(arguments, 1)) } finally { if (0 === --u) for (; f.length;)try { f.pop()() } catch (e) { n.error(e) } } } i.$$completeOutstandingRequest = p, i.$$incOutstandingRequestCount = function () { u++ }, i.notifyWhenNoOutstandingRequests = function (e) { 0 === u ? e() : f.push(e) }; var h, m, g = a.href, v = t.find("base"), $ = null, y = r.history ? function () { try { return o.state } catch (e) { } } : F; k(), i.url = function (t, n, s) { if (V(s) && (s = null), a !== e.location && (a = e.location), o !== e.history && (o = e.history), t) { var l = m === s; if (g === t && (!r.history || l)) return i; var c = g && or(g) === or(t); return g = t, m = s, !r.history || c && l ? (c || ($ = t), n ? a.replace(t) : c ? a.hash = function (e) { var t = e.indexOf("#"); return -1 === t ? "" : e.substr(t) }(t) : a.href = t, a.href !== t && ($ = t)) : (o[n ? "replaceState" : "pushState"](s, "", t), k()), $ && ($ = t), i } return $ || a.href.replace(/%27/g, "'") }, i.state = function () { return h }; var b = [], w = !1; function S() { $ = null, D() } var x = null; function k() { le(h = V(h = y()) ? null : h, x) && (h = x), x = h, m = h } function D() { var e = m; k(), g === i.url() && e === h || (g = i.url(), m = h, C(b, (function (e) { e(i.url(), h) }))) } i.onUrlChange = function (t) { return w || (r.history && d(e).on("popstate", S), d(e).on("hashchange", S), w = !0), b.push(t), t }, i.$$applicationDestroyed = function () { d(e).off("hashchange popstate", S) }, i.$$checkUrlChange = D, i.baseHref = function () { var e = v.attr("href"); return e ? e.replace(/^(https?:)?\/\/[^/]*/, "") : "" }, i.defer = function (e, t) { var n; return u++, n = s((function () { delete c[n], p(e) }), t || 0), c[n] = !0, n }, i.defer.cancel = function (e) { return !!c[e] && (delete c[e], l(e), p(F), !0) } } function un() { this.$get = ["$window", "$log", "$sniffer", "$document", function (e, t, n, r) { return new cn(e, r, t, n) }] } function dn() { this.$get = function () { var e = {}; function t(t, n) { if (t in e) throw i("$cacheFactory")("iid", "CacheId '{0}' is already taken!", t); var r = 0, a = A({}, n, { id: t }), o = je(), s = n && n.capacity || Number.MAX_VALUE, l = je(), c = null, u = null; return e[t] = { put: function (e, t) { if (!V(t)) { if (s < Number.MAX_VALUE) d(l[e] || (l[e] = { key: e })); return e in o || r++, o[e] = t, r > s && this.remove(u.key), t } }, get: function (e) { if (s < Number.MAX_VALUE) { var t = l[e]; if (!t) return; d(t) } return o[e] }, remove: function (e) { if (s < Number.MAX_VALUE) { var t = l[e]; if (!t) return; t === c && (c = t.p), t === u && (u = t.n), f(t.n, t.p), delete l[e] } e in o && (delete o[e], r--) }, removeAll: function () { o = je(), r = 0, l = je(), c = u = null }, destroy: function () { o = null, a = null, l = null, delete e[t] }, info: function () { return A({}, a, { size: r }) } }; function d(e) { e !== c && (u ? u === e && (u = e.n) : u = e, f(e.n, e.p), f(e, c), (c = e).n = null) } function f(e, t) { e !== t && (e && (e.p = t), t && (t.n = e)) } } return t.info = function () { var t = {}; return C(e, (function (e, n) { t[n] = e.info() })), t }, t.get = function (t) { return e[t] }, t } } function fn() { this.$get = ["$cacheFactory", function (e) { return e("templates") }] } var pn = i("$compile"); var hn = new function () { }; function mn(t, n) { var r = {}, i = "Directive", a = /^\s*directive:\s*([\w-]+)\s+(.*)$/, o = /(([\w-]+)(?::([^;]+))?;?)/, c = function (e) { var t, n = {}, r = e.split(","); for (t = 0; t < r.length; t++)n[r[t]] = !0; return n }("ngSrc,ngSrcset,src,srcset"), f = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/, p = /^(on[a-z]+|formaction)$/, h = je(); function m(e, t, n) { var r = /^\s*([@&<]|=(\*?))(\??)\s*([\w$]*)\s*$/, i = je(); return C(e, (function (e, a) { if (e in h) i[a] = h[e]; else { var o = e.match(r); if (!o) throw pn("iscp", "Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}", t, a, e, n ? "controller bindings definition" : "isolate scope definition"); i[a] = { mode: o[1][0], collection: "*" === o[2], optional: "?" === o[3], attrName: o[4] || a }, o[4] && (h[e] = i[a]) } })), i } function g(e, t) { var n = { isolateScope: null, bindToController: null }; if (j(e.scope) && (!0 === e.bindToController ? (n.bindToController = m(e.scope, t, !0), n.isolateScope = {}) : n.isolateScope = m(e.scope, t, !1)), j(e.bindToController) && (n.bindToController = m(e.bindToController, t, !0)), n.bindToController && !e.controller) throw pn("noctrl", "Cannot bind to controller without directive '{0}'s controller.", t); return n } this.directive = function e(n, a) { return _e(n, "name"), Le(n, "directive"), U(n) ? (!function (e) { var t = e.charAt(0); if (!t || t !== l(t)) throw pn("baddir", "Directive/Component name '{0}' is invalid. The first character must be a lowercase letter", e); if (e !== e.trim()) throw pn("baddir", "Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces", e) }(n), _e(a, "directiveFactory"), r.hasOwnProperty(n) || (r[n] = [], t.factory(n + i, ["$injector", "$exceptionHandler", function (e, t) { var i = []; return C(r[n], (function (r, a) { try { var o = e.invoke(r); G(o) ? o = { compile: N(o) } : !o.compile && o.link && (o.compile = N(o.link)), o.priority = o.priority || 0, o.index = a, o.name = o.name || n, o.require = function (e) { var t = e.require || e.controller && e.name; return !z(t) && j(t) && C(t, (function (e, n) { var r = e.match(f); e.substring(r[0].length) || (t[n] = r[0] + n) })), t }(o), o.restrict = function (e, t) { if (e && (!U(e) || !/[EACM]/.test(e))) throw pn("badrestrict", "Restrict property '{0}' of directive '{1}' is invalid", e, t); return e || "EA" }(o.restrict, n), o.$$moduleName = r.$$moduleName, i.push(o) } catch (e) { t(e) } })), i }])), r[n].push(a)) : C(n, k(e)), this }, this.component = function e(t, n) { if (!U(t)) return C(t, k(pe(this, e))), this; var r = n.controller || function () { }; function i(e) { function t(t) { return G(t) || z(t) ? function (n, r) { return e.invoke(t, this, { $element: n, $attrs: r }) } : t } var i = n.template || n.templateUrl ? n.template : "", a = { controller: r, controllerAs: xn(n.controller) || n.controllerAs || "$ctrl", template: t(i), templateUrl: t(n.templateUrl), transclude: n.transclude, scope: {}, bindToController: n.bindings || {}, restrict: "E", require: n.require }; return C(n, (function (e, t) { "$" === t.charAt(0) && (a[t] = e) })), a } return C(n, (function (e, t) { "$" === t.charAt(0) && (i[t] = e, G(r) && (r[t] = e)) })), i.$inject = ["$injector"], this.directive(t, i) }, this.aHrefSanitizationWhitelist = function (e) { return R(e) ? (n.aHrefSanitizationWhitelist(e), this) : n.aHrefSanitizationWhitelist() }, this.imgSrcSanitizationWhitelist = function (e) { return R(e) ? (n.imgSrcSanitizationWhitelist(e), this) : n.imgSrcSanitizationWhitelist() }; var $ = !0; this.debugInfoEnabled = function (e) { return R(e) ? ($ = e, this) : $ }; var y = !1; this.preAssignBindingsEnabled = function (e) { return R(e) ? (y = e, this) : y }; var b = !1; this.strictComponentBindingsEnabled = function (e) { return R(e) ? (b = e, this) : b }; var w = 10; this.onChangesTtl = function (e) { return arguments.length ? (w = e, this) : w }; var S = !0; this.commentDirectivesEnabled = function (e) { return arguments.length ? (S = e, this) : S }; var x = !0; this.cssClassDirectivesEnabled = function (e) { return arguments.length ? (x = e, this) : x }, this.$get = ["$injector", "$interpolate", "$exceptionHandler", "$templateRequest", "$parse", "$controller", "$rootScope", "$sce", "$animate", "$$sanitizeUri", function (t, n, h, m, k, D, E, T, I, M) { var O, N = /^\w/, L = e.document.createElement("div"), q = S, B = x, H = w; function K() { try { if (!--H) throw O = void 0, pn("infchng", "{0} $onChanges() iterations reached. Aborting!\n", w); E.$apply((function () { for (var e = [], t = 0, n = O.length; t < n; ++t)try { O[t]() } catch (t) { e.push(t) } if (O = void 0, e.length) throw e })) } finally { H++ } } function J(e, t) { if (t) { var n, r, i, a = Object.keys(t); for (n = 0, r = a.length; n < r; n++)this[i = a[n]] = t[i] } else this.$attr = {}; this.$$element = e } function Z(e, t) { try { e.addClass(t) } catch (e) { } } J.prototype = { $normalize: yn, $addClass: function (e) { e && e.length > 0 && I.addClass(this.$$element, e) }, $removeClass: function (e) { e && e.length > 0 && I.removeClass(this.$$element, e) }, $updateClass: function (e, t) { var n = bn(e, t); n && n.length && I.addClass(this.$$element, n); var r = bn(t, e); r && r.length && I.removeClass(this.$$element, r) }, $set: function (e, t, n, r) { var i, a = Pt(this.$$element[0], e), o = Ot[e], s = e; if (a ? (this.$$element.prop(e, t), r = a) : o && (this[o] = t, s = o), this[e] = t, r ? this.$attr[e] = r : (r = this.$attr[e]) || (this.$attr[e] = r = Pe(e, "-")), "a" === (i = re(this.$$element)) && ("href" === e || "xlinkHref" === e) || "img" === i && "src" === e) this[e] = t = M(t, "src" === e); else if ("img" === i && "srcset" === e && R(t)) { for (var l = "", c = ee(t), u = /\s/.test(c) ? /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/ : /(,)/, d = c.split(u), f = Math.floor(d.length / 2), p = 0; p < f; p++) { var m = 2 * p; l += M(ee(d[m]), !0), l += " " + ee(d[m + 1]) } var g = ee(d[2 * p]).split(/\s/); l += M(ee(g[0]), !0), 2 === g.length && (l += " " + ee(g[1])), this[e] = t = l } !1 !== n && (null === t || V(t) ? this.$$element.removeAttr(r) : N.test(r) ? this.$$element.attr(r, t) : function (e, t, n) { L.innerHTML = "<span " + t + ">"; var r = L.firstChild.attributes, i = r[0]; r.removeNamedItem(i.name), i.value = n, e.attributes.setNamedItem(i) }(this.$$element[0], r, t)); var v = this.$$observers; v && C(v[s], (function (e) { try { e(t) } catch (e) { h(e) } })) }, $observe: function (e, t) { var n = this, r = n.$$observers || (n.$$observers = je()), i = r[e] || (r[e] = []); return i.push(t), E.$evalAsync((function () { i.$$inter || !n.hasOwnProperty(e) || V(n[e]) || t(n[e]) })), function () { ae(i, t) } } }; var X = n.startSymbol(), te = n.endSymbol(), ne = "{{" === X && "}}" === te ? _ : function (e) { return e.replace(/\{\{/g, X).replace(/}}/g, te) }, ie = /^ngAttr[A-Z]/, oe = /^(.+)Start$/; return ce.$$addBindingInfo = $ ? function (e, t) { var n = e.data("$binding") || []; z(t) ? n = n.concat(t) : n.push(t), e.data("$binding", n) } : F, ce.$$addBindingClass = $ ? function (e) { Z(e, "ng-binding") } : F, ce.$$addScopeInfo = $ ? function (e, t, n, r) { var i = n ? r ? "$isolateScopeNoTemplate" : "$isolateScope" : "$scope"; e.data(i, t) } : F, ce.$$addScopeClass = $ ? function (e, t) { Z(e, t ? "ng-isolate-scope" : "ng-scope") } : F, ce.$$createComment = function (t, n) { var r = ""; return $ && (r = " " + (t || "") + ": ", n && (r += n + " ")), e.document.createComment(r) }, ce; function ce(e, t, n, r, i) { e instanceof d || (e = d(e)); var a = ue(e, t, e, n, r, i); ce.$$addScopeClass(e); var o = null; return function (t, n, r) { if (!e) throw pn("multilink", "This element has already been linked."); _e(t, "scope"), i && i.needsNewScope && (t = t.$parent.$new()); var s, l, c, u = (r = r || {}).parentBoundTranscludeFn, f = r.transcludeControllers, p = r.futureParentElement; if (u && u.$$boundTransclude && (u = u.$$boundTransclude), o || (l = (s = p) && s[0], o = l && "foreignobject" !== re(l) && v.call(l).match(/SVG/) ? "svg" : "html"), c = "html" !== o ? d(Ae(o, d("<div>").append(e).html())) : n ? At.clone.call(e) : e, f) for (var h in f) c.data("$" + h + "Controller", f[h].instance); return ce.$$addScopeInfo(c, t), n && n(c, t), a && a(t, c, c, u), n || (e = a = null), c } } function ue(e, t, n, r, i, a) { for (var o, s, l, c, f, p, h, m = [], g = z(e) || e instanceof d, v = 0; v < e.length; v++)o = new J, 11 === u && de(e, v, g), (l = (s = me(e[v], [], o, 0 === v ? r : void 0, i)).length ? ye(s, e[v], o, t, n, null, [], [], a) : null) && l.scope && ce.$$addScopeClass(o.$$element), f = l && l.terminal || !(c = e[v].childNodes) || !c.length ? null : ue(c, l ? (l.transcludeOnThisElement || !l.templateOnThisElement) && l.transclude : t), (l || f) && (m.push(v, l, f), p = !0, h = h || l), a = null; return p ? function (e, n, r, i) { var a, o, s, l, c, u, f, p; if (h) { var g = n.length; for (p = new Array(g), c = 0; c < m.length; c += 3)p[f = m[c]] = n[f] } else p = n; for (c = 0, u = m.length; c < u;)s = p[m[c++]], a = m[c++], o = m[c++], a ? (a.scope ? (l = e.$new(), ce.$$addScopeInfo(d(s), l)) : l = e, a(o, l, s, r, a.transcludeOnThisElement ? he(e, a.transclude, i) : !a.templateOnThisElement && i ? i : !i && t ? he(e, t) : null)) : o && o(e, s.childNodes, void 0, i) } : null } function de(e, t, n) { var r, i = e[t], a = i.parentNode; if (i.nodeType === Be) for (; (r = a ? i.nextSibling : e[t + 1]) && r.nodeType === Be;)i.nodeValue = i.nodeValue + r.nodeValue, r.parentNode && r.parentNode.removeChild(r), n && r === e[t + 1] && e.splice(t + 1, 1) } function he(e, t, n) { function r(r, i, a, o, s) { return r || ((r = e.$new(!1, s)).$$transcluded = !0), t(r, i, { parentBoundTranscludeFn: n, transcludeControllers: a, futureParentElement: o }) } var i = r.$$slots = je(); for (var a in t.$$slots) t.$$slots[a] ? i[a] = he(e, t.$$slots[a], n) : i[a] = null; return r } function me(e, t, r, i, s) { var l, c, u, d = e.nodeType, f = r.$attr; switch (d) { case Ue: Ce(t, yn(c = re(e)), "E", i, s); for (var p, h, m, g, v, $, y = e.attributes, b = 0, w = y && y.length; b < w; b++) { var S = !1, C = !1; h = (p = y[b]).name, v = p.value, g = yn(h), ($ = ie.test(g)) && (h = h.replace(vn, "").substr(8).replace(/_(.)/g, (function (e, t) { return t.toUpperCase() }))); var x = g.match(oe); x && xe(x[1]) && (S = h, C = h.substr(0, h.length - 5) + "end", h = h.substr(0, h.length - 6)), f[m = yn(h.toLowerCase())] = h, !$ && r.hasOwnProperty(m) || (r[m] = v, Pt(e, m) && (r[m] = !0)), Ie(e, t, v, m, $), Ce(t, m, "A", i, s, S, C) } if ("input" === c && "hidden" === e.getAttribute("type") && e.setAttribute("autocomplete", "off"), !B) break; if (j(u = e.className) && (u = u.animVal), U(u) && "" !== u) for (; l = o.exec(u);)Ce(t, m = yn(l[2]), "C", i, s) && (r[m] = ee(l[3])), u = u.substr(l.index + l[0].length); break; case Be: !function (e, t) { var r = n(t, !0); r && e.push({ priority: 0, compile: function (e) { var t = e.parent(), n = !!t.length; return n && ce.$$addBindingClass(t), function (e, t) { var i = t.parent(); n || ce.$$addBindingClass(i), ce.$$addBindingInfo(i, r.expressions), e.$watch(r, (function (e) { t[0].nodeValue = e })) } } }) }(t, e.nodeValue); break; case He: if (!q) break; !function (e, t, n, r, i) { try { var o = a.exec(e.nodeValue); if (o) { var s = yn(o[1]); Ce(t, s, "M", r, i) && (n[s] = ee(o[2])) } } catch (e) { } }(e, t, r, i, s) }return t.sort(Ee), t } function ge(e, t, n) { var r = [], i = 0; if (t && e.hasAttribute && e.hasAttribute(t)) do { if (!e) throw pn("uterdir", "Unterminated attribute, found '{0}' but no matching '{1}' found.", t, n); e.nodeType === Ue && (e.hasAttribute(t) && i++, e.hasAttribute(n) && i--), r.push(e), e = e.nextSibling } while (i > 0); else r.push(e); return d(r) } function ve(e, t, n) { return function (r, i, a, o, s) { return i = ge(i[0], t, n), e(r, i, a, o, s) } } function $e(e, t, n, r, i, a) { var o; return e ? ce(t, n, r, i, a) : function () { return o || (o = ce(t, n, r, i, a), t = n = a = null), o.apply(this, arguments) } } function ye(e, t, n, r, i, a, o, s, l) { l = l || {}; for (var c, u, f, p, m, g = -Number.MAX_VALUE, v = l.newScopeDirective, $ = l.controllerDirectives, b = l.newIsolateScopeDirective, w = l.templateDirective, S = l.nonTlbTranscludeDirective, x = !1, k = !1, E = l.hasElementTranscludeDirective, T = n.$$element = d(t), I = a, M = r, O = !1, P = !1, F = 0, _ = e.length; F < _; F++) { var N = (c = e[F]).$$start, L = c.$$end; if (N && (T = ge(t, N, L)), f = void 0, g > c.priority) break; if ((m = c.scope) && (c.templateUrl || (j(m) ? (Te("new/isolated scope", b || v, c, T), b = c) : Te("new/isolated scope", b, c, T)), v = v || c), u = c.name, !O && (c.replace && (c.templateUrl || c.template) || c.transclude && !c.$$tlb)) { for (var R, q = F + 1; R = e[q++];)if (R.transclude && !R.$$tlb || R.replace && (R.templateUrl || R.template)) { P = !0; break } O = !0 } if (!c.templateUrl && c.controller && ($ = $ || je(), Te("'" + u + "' controller", $[u], c, T), $[u] = c), m = c.transclude) if (x = !0, c.$$tlb || (Te("transclusion", S, c, T), S = c), "element" === m) E = !0, g = c.priority, f = T, T = n.$$element = d(ce.$$createComment(u, n[u])), t = T[0], Me(i, fe(f), t), f[0].$$parentNode = f[0].parentNode, M = $e(P, f, r, g, I && I.name, { nonTlbTranscludeDirective: S }); else { var U = je(); if (j(m)) { f = []; var B = je(), H = je(); for (var W in C(m, (function (e, t) { var n = "?" === e.charAt(0); e = n ? e.substring(1) : e, B[e] = t, U[t] = null, H[t] = n })), C(T.contents(), (function (e) { var t = B[yn(re(e))]; t ? (H[t] = !0, U[t] = U[t] || [], U[t].push(e)) : f.push(e) })), C(H, (function (e, t) { if (!e) throw pn("reqslot", "Required transclusion slot `{0}` was not filled.", t) })), U) U[W] && (U[W] = $e(P, U[W], r)) } else f = d(ht(t)).contents(); T.empty(), (M = $e(P, f, r, void 0, void 0, { needsNewScope: c.$$isolateScope || c.$$newScope })).$$slots = U } if (c.template) if (k = !0, Te("template", w, c, T), w = c, m = G(c.template) ? c.template(T, n) : c.template, m = ne(m), c.replace) { if (I = c, f = ct(m) ? [] : wn(Ae(c.templateNamespace, ee(m))), t = f[0], 1 !== f.length || t.nodeType !== Ue) throw pn("tplrt", "Template for directive '{0}' must have exactly one root element. {1}", u, ""); Me(i, T, t); var K = { $attr: {} }, Y = me(t, [], K), Z = e.splice(F + 1, e.length - (F + 1)); (b || v) && Se(Y, b, v), e = e.concat(Y).concat(Z), ke(n, K), _ = e.length } else T.html(m); if (c.templateUrl) k = !0, Te("template", w, c, T), w = c, c.replace && (I = c), ie = De(e.splice(F, e.length - F), T, n, i, x && M, o, s, { controllerDirectives: $, newScopeDirective: v !== c && v, newIsolateScopeDirective: b, templateDirective: w, nonTlbTranscludeDirective: S }), _ = e.length; else if (c.compile) try { p = c.compile(T, n, M); var X = c.$$originalDirective || c; G(p) ? te(null, pe(X, p), N, L) : p && te(pe(X, p.pre), pe(X, p.post), N, L) } catch (e) { h(e, be(T)) } c.terminal && (ie.terminal = !0, g = Math.max(g, c.priority)) } return ie.scope = v && !0 === v.scope, ie.transcludeOnThisElement = x, ie.templateOnThisElement = k, ie.transclude = M, l.hasElementTranscludeDirective = E, ie; function te(e, t, n, r) { e && (n && (e = ve(e, n, r)), e.require = c.require, e.directiveName = u, (b === c || c.$$isolateScope) && (e = Oe(e, { isolateScope: !0 })), o.push(e)), t && (n && (t = ve(t, n, r)), t.require = c.require, t.directiveName = u, (b === c || c.$$isolateScope) && (t = Oe(t, { isolateScope: !0 })), s.push(t)) } function ie(e, r, i, a, l) { var c, u, f, p, m, g, S, x, k, T; for (var I in t === i ? (k = n, x = n.$$element) : k = new J(x = d(i), n), m = r, b ? p = r.$new(!0) : v && (m = r.$parent), l && (S = function (e, t, n, r) { var i; Q(e) || (r = n, n = t, t = e, e = void 0); E && (i = g); n || (n = E ? x.parent() : x); if (!r) return l(e, t, i, n, _); var a = l.$$slots[r]; if (a) return a(e, t, i, n, _); if (V(a)) throw pn("noslot", 'No parent directive that requires a transclusion with slot name "{0}". Element: {1}', r, be(x)) }, S.$$boundTransclude = l, S.isSlotFilled = function (e) { return !!l.$$slots[e] }), $ && (g = function (e, t, n, r, i, a, o) { var s = je(); for (var l in r) { var c = r[l], u = { $scope: c === o || c.$$isolateScope ? i : a, $element: e, $attrs: t, $transclude: n }, d = c.controller; "@" === d && (d = t[c.name]); var f = D(d, u, !0, c.controllerAs); s[c.name] = f, e.data("$" + c.name + "Controller", f.instance) } return s }(x, k, S, $, p, r, b)), b && (ce.$$addScopeInfo(x, p, !0, !(w && (w === b || w === b.$$originalDirective))), ce.$$addScopeClass(x, !0), p.$$isolateBindings = b.$$isolateBindings, (T = Le(r, k, p, p.$$isolateBindings, b)).removeWatches && p.$on("$destroy", T.removeWatches)), g) { var M = $[I], O = g[I], P = M.$$bindings.bindToController; if (y) { O.bindingInfo = P ? Le(m, k, O.instance, P, M) : {}; var F = O(); F !== O.instance && (O.instance = F, x.data("$" + M.name + "Controller", F), O.bindingInfo.removeWatches && O.bindingInfo.removeWatches(), O.bindingInfo = Le(m, k, O.instance, P, M)) } else O.instance = O(), x.data("$" + M.name + "Controller", O.instance), O.bindingInfo = Le(m, k, O.instance, P, M) } for (C($, (function (e, t) { var n = e.require; e.bindToController && !z(n) && j(n) && A(g[t].instance, we(t, n, x, g)) })), C(g, (function (e) { var t = e.instance; if (G(t.$onChanges)) try { t.$onChanges(e.bindingInfo.initialChanges) } catch (e) { h(e) } if (G(t.$onInit)) try { t.$onInit() } catch (e) { h(e) } G(t.$doCheck) && (m.$watch((function () { t.$doCheck() })), t.$doCheck()), G(t.$onDestroy) && m.$on("$destroy", (function () { t.$onDestroy() })) })), c = 0, u = o.length; c < u; c++)Fe(f = o[c], f.isolateScope ? p : r, x, k, f.require && we(f.directiveName, f.require, x, g), S); var _ = r; for (b && (b.template || null === b.templateUrl) && (_ = p), e && e(_, i.childNodes, void 0, l), c = s.length - 1; c >= 0; c--)Fe(f = s[c], f.isolateScope ? p : r, x, k, f.require && we(f.directiveName, f.require, x, g), S); C(g, (function (e) { var t = e.instance; G(t.$postLink) && t.$postLink() })) } } function we(e, t, n, r) { var i; if (U(t)) { var a = t.match(f), o = t.substring(a[0].length), s = a[1] || a[3], l = "?" === a[2]; if ("^^" === s ? n = n.parent() : i = (i = r && r[o]) && i.instance, !i) { var c = "$" + o + "Controller"; i = s ? n.inheritedData(c) : n.data(c) } if (!i && !l) throw pn("ctreq", "Controller '{0}', required by directive '{1}', can't be found!", o, e) } else if (z(t)) { i = []; for (var u = 0, d = t.length; u < d; u++)i[u] = we(e, t[u], n, r) } else j(t) && (i = {}, C(t, (function (t, a) { i[a] = we(e, t, n, r) }))); return i || null } function Se(e, t, n) { for (var r = 0, i = e.length; r < i; r++)e[r] = P(e[r], { $$isolateScope: t, $$newScope: n }) } function Ce(e, n, a, o, s, l, c) { if (n === s) return null; var u = null; if (r.hasOwnProperty(n)) for (var d, f = t.get(n + i), p = 0, h = f.length; p < h; p++)if (d = f[p], (V(o) || o > d.priority) && -1 !== d.restrict.indexOf(a)) { if (l && (d = P(d, { $$start: l, $$end: c })), !d.$$bindings) { var m = d.$$bindings = g(d, d.name); j(m.isolateScope) && (d.$$isolateBindings = m.isolateScope) } e.push(d), u = d } return u } function xe(e) { if (r.hasOwnProperty(e)) for (var n = t.get(e + i), a = 0, o = n.length; a < o; a++)if (n[a].multiElement) return !0; return !1 } function ke(e, t) { var n = t.$attr, r = e.$attr; C(e, (function (r, i) { "$" !== i.charAt(0) && (t[i] && t[i] !== r && (r.length ? r += ("style" === i ? ";" : " ") + t[i] : r = t[i]), e.$set(i, r, !0, n[i])) })), C(t, (function (t, i) { e.hasOwnProperty(i) || "$" === i.charAt(0) || (e[i] = t, "class" !== i && "style" !== i && (r[i] = n[i])) })) } function De(e, t, n, r, i, a, o, s) { var l, c, u = [], f = t[0], p = e.shift(), g = P(p, { templateUrl: null, transclude: null, replace: null, $$originalDirective: p }), v = G(p.templateUrl) ? p.templateUrl(t, n) : p.templateUrl, $ = p.templateNamespace; return t.empty(), m(v).then((function (h) { var m, y, b, w; if (h = ne(h), p.replace) { if (b = ct(h) ? [] : wn(Ae($, ee(h))), m = b[0], 1 !== b.length || m.nodeType !== Ue) throw pn("tplrt", "Template for directive '{0}' must have exactly one root element. {1}", p.name, v); y = { $attr: {} }, Me(r, t, m); var S = me(m, [], y); j(p.scope) && Se(S, !0), e = S.concat(e), ke(n, y) } else m = f, t.html(h); for (e.unshift(g), l = ye(e, m, n, i, t, p, a, o, s), C(r, (function (e, n) { e === m && (r[n] = t[0]) })), c = ue(t[0].childNodes, i); u.length;) { var x = u.shift(), k = u.shift(), D = u.shift(), E = u.shift(), T = t[0]; if (!x.$$destroyed) { if (k !== f) { var A = k.className; s.hasElementTranscludeDirective && p.replace || (T = ht(m)), Me(D, d(k), T), Z(d(T), A) } w = l.transcludeOnThisElement ? he(x, l.transclude, E) : E, l(c, x, T, r, w) } } u = null })).catch((function (e) { W(e) && h(e) })), function (e, t, n, r, i) { var a = i; t.$$destroyed || (u ? u.push(t, n, r, a) : (l.transcludeOnThisElement && (a = he(t, l.transclude, i)), l(c, t, n, r, a))) } } function Ee(e, t) { var n = t.priority - e.priority; return 0 !== n ? n : e.name !== t.name ? e.name < t.name ? -1 : 1 : e.index - t.index } function Te(e, t, n, r) { function i(e) { return e ? " (module: " + e + ")" : "" } if (t) throw pn("multidir", "Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}", t.name, i(t.$$moduleName), n.name, i(n.$$moduleName), e, be(r)) } function Ae(t, n) { switch (t = l(t || "html")) { case "svg": case "math": var r = e.document.createElement("div"); return r.innerHTML = "<" + t + ">" + n + "</" + t + ">", r.childNodes[0].childNodes; default: return n } } function Ie(e, t, r, i, a) { var o = function (e, t) { if ("srcdoc" === t) return T.HTML; var n = re(e); if ("src" === t || "ngSrc" === t) { if (-1 === ["img", "video", "audio", "source", "track"].indexOf(n)) return T.RESOURCE_URL } else if ("xlinkHref" === t || "form" === n && "action" === t || "link" === n && "href" === t) return T.RESOURCE_URL }(e, i), s = !a, l = c[i] || a, u = n(r, s, o, l); if (u) { if ("multiple" === i && "select" === re(e)) throw pn("selmulti", "Binding to the 'multiple' attribute is not supported. Element: {0}", be(e)); if (p.test(i)) throw pn("nodomevents", "Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead."); t.push({ priority: 100, compile: function () { return { pre: function (e, t, a) { var s = a.$$observers || (a.$$observers = je()), c = a[i]; c !== r && (u = c && n(c, !0, o, l), r = c), u && (a[i] = u(e), (s[i] || (s[i] = [])).$$inter = !0, (a.$$observers && a.$$observers[i].$$scope || e).$watch(u, (function (e, t) { "class" === i && e !== t ? a.$updateClass(e, t) : a.$set(i, e) }))) } } } }) } } function Me(t, n, r) { var i, a, o = n[0], s = n.length, l = o.parentNode; if (t) for (i = 0, a = t.length; i < a; i++)if (t[i] === o) { t[i++] = r; for (var c = i, u = c + s - 1, f = t.length; c < f; c++, u++)u < f ? t[c] = t[u] : delete t[c]; t.length -= s - 1, t.context === o && (t.context = r); break } l && l.replaceChild(r, o); var p = e.document.createDocumentFragment(); for (i = 0; i < s; i++)p.appendChild(n[i]); for (d.hasData(o) && (d.data(r, d.data(o)), d(o).off("$destroy")), d.cleanData(p.querySelectorAll("*")), i = 1; i < s; i++)delete n[i]; n[0] = r, n.length = 1 } function Oe(e, t) { return A((function () { return e.apply(null, arguments) }), e, t) } function Fe(e, t, n, r, i, a) { try { e(t, n, r, i, a) } catch (e) { h(e, be(n)) } } function Ne(e, t) { if (b) throw pn("missingattr", "Attribute '{0}' of '{1}' is non-optional and must be set!", e, t) } function Le(e, t, r, i, a) { var o, l = [], c = {}; function u(t, n, i) { G(r.$onChanges) && !se(n, i) && (O || (e.$$postDigest(K), O = []), o || (o = {}, O.push(d)), o[t] && (i = o[t].previousValue), o[t] = new gn(i, n)) } function d() { r.$onChanges(o), o = void 0 } return C(i, (function (i, o) { var d, f, p, h, m, g = i.attrName, v = i.optional; switch (i.mode) { case "@": v || s.call(t, g) || (Ne(g, a.name), r[o] = t[g] = void 0), m = t.$observe(g, (function (e) { if (U(e) || Y(e)) { var t = r[o]; u(o, e, t), r[o] = e } })), t.$$observers[g].$$scope = e, U(d = t[g]) ? r[o] = n(d)(e) : Y(d) && (r[o] = d), c[o] = new gn(hn, r[o]), l.push(m); break; case "=": if (!s.call(t, g)) { if (v) break; Ne(g, a.name), t[g] = void 0 } if (v && !t[g]) break; f = k(t[g]), h = f.literal ? le : se, p = f.assign || function () { throw d = r[o] = f(e), pn("nonassign", "Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!", t[g], g, a.name) }, d = r[o] = f(e); var $ = function (t) { return h(t, r[o]) || (h(t, d) ? p(e, t = r[o]) : r[o] = t), d = t }; $.$stateful = !0, m = i.collection ? e.$watchCollection(t[g], $) : e.$watch(k(t[g], $), null, f.literal), l.push(m); break; case "<": if (!s.call(t, g)) { if (v) break; Ne(g, a.name), t[g] = void 0 } if (v && !t[g]) break; var y = (f = k(t[g])).literal, b = r[o] = f(e); c[o] = new gn(hn, r[o]), m = e.$watch(f, (function (e, t) { if (t === e) { if (t === b || y && le(t, b)) return; t = b } u(o, e, t), r[o] = e }), y), l.push(m); break; case "&": if (v || s.call(t, g) || Ne(g, a.name), (f = t.hasOwnProperty(g) ? k(t[g]) : F) === F && v) break; r[o] = function (t) { return f(e, t) } } })), { initialChanges: c, removeWatches: l.length && function () { for (var e = 0, t = l.length; e < t; ++e)l[e]() } } } }] } function gn(e, t) { this.previousValue = e, this.currentValue = t } mn.$inject = ["$provide", "$$sanitizeUriProvider"], gn.prototype.isFirstChange = function () { return this.previousValue === hn }; var vn = /^((?:x|data)[:\-_])/i, $n = /[:\-_]+(.)/g; function yn(e) { return e.replace(vn, "").replace($n, (function (e, t, n) { return n ? t.toUpperCase() : t })) } function bn(e, t) { var n = "", r = e.split(/\s+/), i = t.split(/\s+/); e: for (var a = 0; a < r.length; a++) { for (var o = r[a], s = 0; s < i.length; s++)if (o === i[s]) continue e; n += (n.length > 0 ? " " : "") + o } return n } function wn(e) { var t = (e = d(e)).length; if (t <= 1) return e; for (; t--;) { var n = e[t]; (n.nodeType === He || n.nodeType === Be && "" === n.nodeValue.trim()) && m.call(e, t, 1) } return e } var Sn = i("$controller"), Cn = /^(\S+)(\s+as\s+([\w$]+))?$/; function xn(e, t) { if (t && U(t)) return t; if (U(e)) { var n = Cn.exec(e); if (n) return n[3] } } function kn() { var e = {}, t = !1; this.has = function (t) { return e.hasOwnProperty(t) }, this.register = function (t, n) { Le(t, "controller"), j(t) ? A(e, t) : e[t] = n }, this.allowGlobals = function () { t = !0 }, this.$get = ["$injector", "$window", function (n, r) { return function (i, o, s, l) { var c, u, d, f; if (s = !0 === s, l && U(l) && (f = l), U(i)) { if (!(u = i.match(Cn))) throw Sn("ctrlfmt", "Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.", i); if (d = u[1], f = f || u[3], !(i = e.hasOwnProperty(d) ? e[d] : Ve(o.$scope, d, !0) || (t ? Ve(r, d, !0) : void 0))) throw Sn("ctrlreg", "The controller with the name '{0}' is not registered.", d); Ne(i, d, !0) } if (s) { var p = (z(i) ? i[i.length - 1] : i).prototype; return c = Object.create(p || null), f && a(o, f, c, d || i.name), A((function () { var e = n.invoke(i, c, o, d); return e !== c && (j(e) || G(e)) && (c = e, f && a(o, f, c, d || i.name)), c }), { instance: c, identifier: f }) } return c = n.instantiate(i, o, d), f && a(o, f, c, d || i.name), c }; function a(e, t, n, r) { if (!e || !j(e.$scope)) throw i("$controller")("noscp", "Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.", r, t); e.$scope[t] = n } }] } function Dn() { this.$get = ["$window", function (e) { return d(e.document) }] } function En() { this.$get = ["$document", "$rootScope", function (e, t) { var n = e[0], r = n && n.hidden; function i() { r = n.hidden } return e.on("visibilitychange", i), t.$on("$destroy", (function () { e.off("visibilitychange", i) })), function () { return r } }] } function Tn() { this.$get = ["$log", function (e) { return function (t, n) { e.error.apply(e, arguments) } }] } var An = function () { this.$get = ["$document", function (e) { return function (t) { return t ? !t.nodeType && t instanceof d && (t = t[0]) : t = e[0].body, t.offsetWidth + 1 } }] }, In = "application/json", Mn = { "Content-Type": In + ";charset=utf-8" }, On = /^\[|^\{(?!\{)/, Pn = { "[": /]$/, "{": /}$/ }, Fn = /^\)]\}',?\n/, _n = i("$http"); function Nn(e) { return j(e) ? H(e) ? e.toISOString() : me(e) : e } function Ln() { this.$get = function () { return function (e) { if (!e) return ""; var t = []; return x(e, (function (e, n) { null === e || V(e) || G(e) || (z(e) ? C(e, (function (e) { t.push(ke(n) + "=" + ke(Nn(e))) })) : t.push(ke(n) + "=" + ke(Nn(e)))) })), t.join("&") } } } function Vn() { this.$get = function () { return function (e) { if (!e) return ""; var t = []; return function e(n, r, i) { if (null === n || V(n)) return; z(n) ? C(n, (function (t, n) { e(t, r + "[" + (j(t) ? n : "") + "]") })) : j(n) && !H(n) ? x(n, (function (t, n) { e(t, r + (i ? "" : "[") + n + (i ? "" : "]")) })) : t.push(ke(r) + "=" + ke(Nn(n))) }(e, "", !0), t.join("&") } } } function Rn(e, t) { if (U(e)) { var n = e.replace(Fn, "").trim(); if (n) { var r = t("Content-Type"), i = r && 0 === r.indexOf(In); if (i || (o = (a = n).match(On)) && Pn[o[0]].test(a)) try { e = ge(n) } catch (t) { if (!i) return e; throw _n("baddata", 'Data must be a valid JSON object. Received: "{0}". Parse error: "{1}"', e, t) } } } var a, o; return e } function jn(e) { var t, n = je(); function r(e, t) { e && (n[e] = n[e] ? n[e] + ", " + t : t) } return U(e) ? C(e.split("\n"), (function (e) { t = e.indexOf(":"), r(l(ee(e.substr(0, t))), ee(e.substr(t + 1))) })) : j(e) && C(e, (function (e, t) { r(l(t), ee(e)) })), n } function qn(e) { var t; return function (n) { if (t || (t = jn(e)), n) { var r = t[l(n)]; return void 0 === r && (r = null), r } return t } } function Un(e, t, n, r) { return G(r) ? r(e, t, n) : (C(r, (function (r) { e = r(e, t, n) })), e) } function Bn(e) { return 200 <= e && e < 300 } function Hn() { var e = this.defaults = { transformResponse: [Rn], transformRequest: [function (e) { return !j(e) || (t = e, "[object File]" === v.call(t)) || function (e) { return "[object Blob]" === v.call(e) }(e) || function (e) { return "[object FormData]" === v.call(e) }(e) ? e : me(e); var t }], headers: { common: { Accept: "application/json, text/plain, */*" }, post: Ge(Mn), put: Ge(Mn), patch: Ge(Mn) }, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", paramSerializer: "$httpParamSerializer", jsonpCallbackParam: "callback" }, t = !1; this.useApplyAsync = function (e) { return R(e) ? (t = !!e, this) : t }; var n = this.interceptors = []; this.$get = ["$browser", "$httpBackend", "$$cookieReader", "$cacheFactory", "$rootScope", "$q", "$injector", "$sce", function (r, a, o, s, u, d, f, p) { var h = s("$http"); e.paramSerializer = U(e.paramSerializer) ? f.get(e.paramSerializer) : e.paramSerializer; var m = []; function g(n) { if (!j(n)) throw i("$http")("badreq", "Http request configuration must be an object.  Received: {0}", n); if (!U(p.valueOf(n.url))) throw i("$http")("badreq", "Http request configuration url must be a string or a $sce trusted object.  Received: {0}", n.url); var s = A({ method: "get", transformRequest: e.transformRequest, transformResponse: e.transformResponse, paramSerializer: e.paramSerializer, jsonpCallbackParam: e.jsonpCallbackParam }, n); s.headers = function (t) { var n, r, i, a = e.headers, o = A({}, t.headers); a = A({}, a.common, a[l(t.method)]); e: for (n in a) { for (i in r = l(n), o) if (l(i) === r) continue e; o[n] = a[n] } return function (e, t) { var n, r = {}; return C(e, (function (e, i) { G(e) ? null != (n = e(t)) && (r[i] = n) : r[i] = e })), r }(o, Ge(t)) }(n), s.method = c(s.method), s.paramSerializer = U(s.paramSerializer) ? f.get(s.paramSerializer) : s.paramSerializer, r.$$incOutstandingRequestCount(); var v = [], $ = [], y = d.resolve(s); return C(m, (function (e) { (e.request || e.requestError) && v.unshift(e.request, e.requestError), (e.response || e.responseError) && $.push(e.response, e.responseError) })), y = (y = b(y, v)).then((function (n) { var r = n.headers, i = Un(n.data, qn(r), void 0, n.transformRequest); V(i) && C(r, (function (e, t) { "content-type" === l(t) && delete r[t] })); V(n.withCredentials) && !V(e.withCredentials) && (n.withCredentials = e.withCredentials); return function (n, r) { var i, s, c = d.defer(), f = c.promise, m = n.headers, v = "jsonp" === l(n.method), $ = n.url; v ? $ = p.getTrustedResourceUrl($) : U($) || ($ = p.valueOf($)); $ = function (e, t) { t.length > 0 && (e += (-1 === e.indexOf("?") ? "?" : "&") + t); return e }($, n.paramSerializer(n.params)), v && ($ = function (e, t) { var n = e.split("?"); if (n.length > 2) throw _n("badjsonp", 'Illegal use more than one "?", in url, "{1}"', e); return C(Se(n[1]), (function (n, r) { if ("JSON_CALLBACK" === n) throw _n("badjsonp", 'Illegal use of JSON_CALLBACK in url, "{0}"', e); if (r === t) throw _n("badjsonp", 'Illegal use of callback param, "{0}", in url, "{1}"', t, e) })), e += (-1 === e.indexOf("?") ? "?" : "&") + t + "=JSON_CALLBACK", e }($, n.jsonpCallbackParam)); g.pendingRequests.push(n), f.then(k, k), !n.cache && !e.cache || !1 === n.cache || "GET" !== n.method && "JSONP" !== n.method || (i = j(n.cache) ? n.cache : j(e.cache) ? e.cache : h); i && (R(s = i.get($)) ? Z(s) ? s.then(x, x) : z(s) ? S(s[1], s[0], Ge(s[2]), s[3], s[4]) : S(s, 200, {}, "OK", "complete") : i.put($, f)); if (V(s)) { var y = oi(n.url) ? o()[n.xsrfCookieName || e.xsrfCookieName] : void 0; y && (m[n.xsrfHeaderName || e.xsrfHeaderName] = y), a(n.method, $, r, w, m, n.timeout, n.withCredentials, n.responseType, b(n.eventHandlers), b(n.uploadEventHandlers)) } return f; function b(e) { if (e) { var n = {}; return C(e, (function (e, r) { n[r] = function (n) { function r() { e(n) } t ? u.$applyAsync(r) : u.$$phase ? r() : u.$apply(r) } })), n } } function w(e, n, r, a, o) { function s() { S(n, e, r, a, o) } i && (Bn(e) ? i.put($, [e, n, jn(r), a, o]) : i.remove($)), t ? u.$applyAsync(s) : (s(), u.$$phase || u.$apply()) } function S(e, t, r, i, a) { (Bn(t = t >= -1 ? t : 0) ? c.resolve : c.reject)({ data: e, status: t, headers: qn(r), config: n, statusText: i, xhrStatus: a }) } function x(e) { S(e.data, e.status, Ge(e.headers()), e.statusText, e.xhrStatus) } function k() { var e = g.pendingRequests.indexOf(n); -1 !== e && g.pendingRequests.splice(e, 1) } }(n, i).then(w, w) })), y = (y = b(y, $)).finally((function () { r.$$completeOutstandingRequest(F) })); function b(e, t) { for (var n = 0, r = t.length; n < r;) { var i = t[n++], a = t[n++]; e = e.then(i, a) } return t.length = 0, e } function w(e) { var t = A({}, e); return t.data = Un(e.data, e.headers, e.status, s.transformResponse), Bn(e.status) ? t : d.reject(t) } } return C(n, (function (e) { m.unshift(U(e) ? f.get(e) : f.invoke(e)) })), g.pendingRequests = [], function (e) { C(arguments, (function (e) { g[e] = function (t, n) { return g(A({}, n || {}, { method: e, url: t })) } })) }("get", "delete", "head", "jsonp"), function (e) { C(arguments, (function (e) { g[e] = function (t, n, r) { return g(A({}, r || {}, { method: e, url: t, data: n })) } })) }("post", "put", "patch"), g.defaults = e, g }] } function zn() { this.$get = function () { return function () { return new e.XMLHttpRequest } } } function Wn() { this.$get = ["$browser", "$jsonpCallbacks", "$document", "$xhrFactory", function (e, t, n, r) { return function (e, t, n, r, i) { return function (i, o, s, c, u, d, f, p, h, m) { if (o = o || e.url(), "jsonp" === l(i)) var g = r.createCallback(o), v = a(o, g, (function (e, t) { var n = 200 === e && r.getResponse(g); k(c, e, n, "", t, "complete"), r.removeCallback(g) })); else { var $ = t(i, o); $.open(i, o, !0), C(u, (function (e, t) { R(e) && $.setRequestHeader(t, e) })), $.onload = function () { var e = $.statusText || "", t = "response" in $ ? $.response : $.responseText, n = 1223 === $.status ? 204 : $.status; 0 === n && (n = t ? 200 : "file" === ai(o).protocol ? 404 : 0), k(c, n, t, $.getAllResponseHeaders(), e, "complete") }; var y = function () { k(c, -1, null, null, "", "error") }, b = function () { k(c, -1, null, null, "", "abort") }, w = function () { k(c, -1, null, null, "", "timeout") }; if ($.onerror = y, $.onabort = b, $.ontimeout = w, C(h, (function (e, t) { $.addEventListener(t, e) })), C(m, (function (e, t) { $.upload.addEventListener(t, e) })), f && ($.withCredentials = !0), p) try { $.responseType = p } catch (e) { if ("json" !== p) throw e } $.send(V(s) ? null : s) } if (d > 0) var S = n(x, d); else Z(d) && d.then(x); function x() { v && v(), $ && $.abort() } function k(e, t, r, i, a, o) { R(S) && n.cancel(S), v = $ = null, e(t, r, i, a, o) } }; function a(e, t, n) { e = e.replace("JSON_CALLBACK", t); var a = i.createElement("script"), o = null; return a.type = "text/javascript", a.src = e, a.async = !0, o = function (e) { a.removeEventListener("load", o), a.removeEventListener("error", o), i.body.removeChild(a), a = null; var s = -1, l = "unknown"; e && ("load" !== e.type || r.wasCalled(t) || (e = { type: "error" }), l = e.type, s = "error" === e.type ? 404 : 200), n && n(s, l) }, a.addEventListener("load", o), a.addEventListener("error", o), i.body.appendChild(a), o } }(e, r, e.defer, t, n[0]) }] } var Gn = b.$interpolateMinErr = i("$interpolate"); function Kn() { var e = "{{", t = "}}"; this.startSymbol = function (t) { return t ? (e = t, this) : e }, this.endSymbol = function (e) { return e ? (t = e, this) : t }, this.$get = ["$parse", "$exceptionHandler", "$sce", function (n, r, i) { var a = e.length, o = t.length, s = new RegExp(e.replace(/./g, c), "g"), l = new RegExp(t.replace(/./g, c), "g"); function c(e) { return "\\\\\\" + e } function u(n) { return n.replace(s, e).replace(l, t) } function d(e, t, n, r) { var i = e.$watch((function (e) { return i(), r(e) }), t, n); return i } function f(s, l, c, f) { if (!s.length || -1 === s.indexOf(e)) { var p; if (!l) (p = N(u(s))).exp = s, p.expressions = [], p.$$watchDelegate = d; return p } f = !!f; for (var h, m, g, v = 0, $ = [], y = [], b = s.length, w = [], S = []; v < b;) { if (-1 === (h = s.indexOf(e, v)) || -1 === (m = s.indexOf(t, h + a))) { v !== b && w.push(u(s.substring(v))); break } v !== h && w.push(u(s.substring(v, h))), g = s.substring(h + a, m), $.push(g), y.push(n(g, k)), v = m + o, S.push(w.length), w.push("") } if (c && w.length > 1 && Gn.throwNoconcat(s), !l || $.length) { var C = function (e) { for (var t = 0, n = $.length; t < n; t++) { if (f && V(e[t])) return; w[S[t]] = e[t] } return w.join("") }, x = function (e) { return c ? i.getTrusted(c, e) : i.valueOf(e) }; return A((function (e) { var t = 0, n = $.length, i = new Array(n); try { for (; t < n; t++)i[t] = y[t](e); return C(i) } catch (e) { r(Gn.interr(s, e)) } }), { exp: s, expressions: $, $$watchDelegate: function (e, t) { var n; return e.$watchGroup(y, (function (r, i) { var a = C(r); t.call(this, a, r !== i ? n : a, e), n = a })) } }) } function k(e) { try { return e = x(e), f && !R(e) ? e : qe(e) } catch (e) { r(Gn.interr(s, e)) } } } return f.startSymbol = function () { return e }, f.endSymbol = function () { return t }, f }] } function Jn() { this.$get = ["$rootScope", "$window", "$q", "$$q", "$browser", function (e, t, n, r, i) { var a = {}; function o(o, s, l, c) { var u = arguments.length > 4, d = u ? fe(arguments, 4) : [], f = t.setInterval, p = t.clearInterval, h = 0, m = R(c) && !c, g = (m ? r : n).defer(), v = g.promise; return l = R(l) ? l : 0, v.$$intervalId = f((function () { m ? i.defer($) : e.$evalAsync($), g.notify(h++), l > 0 && h >= l && (g.resolve(h), p(v.$$intervalId), delete a[v.$$intervalId]), m || e.$apply() }), s), a[v.$$intervalId] = g, v; function $() { u ? o.apply(null, d) : o(h) } } return o.cancel = function (e) { return !(!e || !(e.$$intervalId in a)) && (qr(a[e.$$intervalId].promise), a[e.$$intervalId].reject("canceled"), t.clearInterval(e.$$intervalId), delete a[e.$$intervalId], !0) }, o }] } Gn.throwNoconcat = function (e) { throw Gn("noconcat", "Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce", e) }, Gn.interr = function (e, t) { return Gn("interr", "Can't interpolate: {0}\n{1}", e, t.toString()) }; var Qn = function () { this.$get = function () { var e = b.callbacks, t = {}; return { createCallback: function (n) { var r = "_" + (e.$$counter++).toString(36), i = "angular.callbacks." + r, a = function (e) { var t = function (e) { t.data = e, t.called = !0 }; return t.id = e, t }(r); return t[i] = e[r] = a, i }, wasCalled: function (e) { return t[e].called }, getResponse: function (e) { return t[e].data }, removeCallback: function (n) { var r = t[n]; delete e[r.id], delete t[n] } } } }, Yn = /^([^?#]*)(\?([^#]*))?(#(.*))?$/, Zn = { http: 80, https: 443, ftp: 21 }, Xn = i("$location"); function er(e) { for (var t = e.split("/"), n = t.length; n--;)t[n] = xe(t[n].replace(/%2F/g, "/")); return t.join("/") } function tr(e, t) { var n = ai(e); t.$$protocol = n.protocol, t.$$host = n.hostname, t.$$port = M(n.port) || Zn[n.protocol] || null } var nr = /^\s*[\\/]{2,}/; function rr(e, t, n) { if (nr.test(e)) throw Xn("badpath", 'Invalid url "{0}".', e); var r = "/" !== e.charAt(0); r && (e = "/" + e); var i = ai(e), a = r && "/" === i.pathname.charAt(0) ? i.pathname.substring(1) : i.pathname; t.$$path = function (e, t) { for (var n = e.split("/"), r = n.length; r--;)n[r] = decodeURIComponent(n[r]), t && (n[r] = n[r].replace(/\//g, "%2F")); return n.join("/") }(a, n), t.$$search = Se(i.search), t.$$hash = decodeURIComponent(i.hash), t.$$path && "/" !== t.$$path.charAt(0) && (t.$$path = "/" + t.$$path) } function ir(e, t) { return e.slice(0, t.length) === t } function ar(e, t) { if (ir(t, e)) return t.substr(e.length) } function or(e) { var t = e.indexOf("#"); return -1 === t ? e : e.substr(0, t) } function sr(e) { return e.replace(/(#.+)|#$/, "$1") } function lr(e, t, n) { this.$$html5 = !0, n = n || "", tr(e, this), this.$$parse = function (e) { var n = ar(t, e); if (!U(n)) throw Xn("ipthprfx", 'Invalid url "{0}", missing path prefix "{1}".', e, t); rr(n, this, !0), this.$$path || (this.$$path = "/"), this.$$compose() }, this.$$compose = function () { var e = Ce(this.$$search), n = this.$$hash ? "#" + xe(this.$$hash) : ""; this.$$url = er(this.$$path) + (e ? "?" + e : "") + n, this.$$absUrl = t + this.$$url.substr(1), this.$$urlUpdatedByLocation = !0 }, this.$$parseLinkUrl = function (r, i) { return i && "#" === i[0] ? (this.hash(i.slice(1)), !0) : (R(a = ar(e, r)) ? (o = a, s = n && R(a = ar(n, a)) ? t + (ar("/", a) || a) : e + o) : R(a = ar(t, r)) ? s = t + a : t === r + "/" && (s = t), s && this.$$parse(s), !!s); var a, o, s } } function cr(e, t, n) { tr(e, this), this.$$parse = function (r) { var i, a = ar(e, r) || ar(t, r); V(a) || "#" !== a.charAt(0) ? this.$$html5 ? i = a : (i = "", V(a) && (e = r, this.replace())) : V(i = ar(n, a)) && (i = a), rr(i, this, !1), this.$$path = function (e, t, n) { var r, i = /^\/[A-Z]:(\/.*)/; ir(t, n) && (t = t.replace(n, "")); if (i.exec(t)) return e; return (r = i.exec(e)) ? r[1] : e }(this.$$path, i, e), this.$$compose() }, this.$$compose = function () { var t = Ce(this.$$search), r = this.$$hash ? "#" + xe(this.$$hash) : ""; this.$$url = er(this.$$path) + (t ? "?" + t : "") + r, this.$$absUrl = e + (this.$$url ? n + this.$$url : ""), this.$$urlUpdatedByLocation = !0 }, this.$$parseLinkUrl = function (t, n) { return or(e) === or(t) && (this.$$parse(t), !0) } } function ur(e, t, n) { this.$$html5 = !0, cr.apply(this, arguments), this.$$parseLinkUrl = function (r, i) { return i && "#" === i[0] ? (this.hash(i.slice(1)), !0) : (e === or(r) ? a = r : (o = ar(t, r)) ? a = e + n + o : t === r + "/" && (a = t), a && this.$$parse(a), !!a); var a, o }, this.$$compose = function () { var t = Ce(this.$$search), r = this.$$hash ? "#" + xe(this.$$hash) : ""; this.$$url = er(this.$$path) + (t ? "?" + t : "") + r, this.$$absUrl = e + n + this.$$url, this.$$urlUpdatedByLocation = !0 } } var dr = { $$absUrl: "", $$html5: !1, $$replace: !1, absUrl: fr("$$absUrl"), url: function (e) { if (V(e)) return this.$$url; var t = Yn.exec(e); return (t[1] || "" === e) && this.path(decodeURIComponent(t[1])), (t[2] || t[1] || "" === e) && this.search(t[3] || ""), this.hash(t[5] || ""), this }, protocol: fr("$$protocol"), host: fr("$$host"), port: fr("$$port"), path: pr("$$path", (function (e) { return "/" === (e = null !== e ? e.toString() : "").charAt(0) ? e : "/" + e })), search: function (e, t) { switch (arguments.length) { case 0: return this.$$search; case 1: if (U(e) || B(e)) e = e.toString(), this.$$search = Se(e); else { if (!j(e)) throw Xn("isrcharg", "The first argument of the `$location#search()` call must be a string or an object."); C(e = oe(e, {}), (function (t, n) { null == t && delete e[n] })), this.$$search = e } break; default: V(t) || null === t ? delete this.$$search[e] : this.$$search[e] = t }return this.$$compose(), this }, hash: pr("$$hash", (function (e) { return null !== e ? e.toString() : "" })), replace: function () { return this.$$replace = !0, this } }; function fr(e) { return function () { return this[e] } } function pr(e, t) { return function (n) { return V(n) ? this[e] : (this[e] = t(n), this.$$compose(), this) } } function hr() { var e = "!", t = { enabled: !1, requireBase: !0, rewriteLinks: !0 }; this.hashPrefix = function (t) { return R(t) ? (e = t, this) : e }, this.html5Mode = function (e) { return Y(e) ? (t.enabled = e, this) : j(e) ? (Y(e.enabled) && (t.enabled = e.enabled), Y(e.requireBase) && (t.requireBase = e.requireBase), (Y(e.rewriteLinks) || U(e.rewriteLinks)) && (t.rewriteLinks = e.rewriteLinks), this) : t }, this.$get = ["$rootScope", "$browser", "$sniffer", "$rootElement", "$window", function (n, r, i, a, o) { var s, l, c, u, f = r.baseHref(), p = r.url(); if (t.enabled) { if (!f && t.requireBase) throw Xn("nobase", "$location in HTML5 mode requires a <base> tag to be present!"); c = (u = p).substring(0, u.indexOf("/", u.indexOf("//") + 2)) + (f || "/"), l = i.history ? lr : ur } else c = or(p), l = cr; var h = function (e) { return e.substr(0, or(e).lastIndexOf("/") + 1) }(c); (s = new l(c, h, "#" + e)).$$parseLinkUrl(p, p), s.$$state = r.state(); var m = /^\s*(javascript|mailto):/i; function g(e, t, n) { var i = s.url(), a = s.$$state; try { r.url(e, t, n), s.$$state = r.state() } catch (e) { throw s.url(i), s.$$state = a, e } } a.on("click", (function (e) { var i = t.rewriteLinks; if (i && !e.ctrlKey && !e.metaKey && !e.shiftKey && 2 !== e.which && 2 !== e.button) { for (var l = d(e.target); "a" !== re(l[0]);)if (l[0] === a[0] || !(l = l.parent())[0]) return; if (!U(i) || !V(l.attr(i))) { var c = l.prop("href"), u = l.attr("href") || l.attr("xlink:href"); j(c) && "[object SVGAnimatedString]" === c.toString() && (c = ai(c.animVal).href), m.test(c) || !c || l.attr("target") || e.isDefaultPrevented() || s.$$parseLinkUrl(c, u) && (e.preventDefault(), s.absUrl() !== r.url() && (n.$apply(), o.angular["ff-684208-preventDefault"] = !0)) } } })), sr(s.absUrl()) !== sr(p) && r.url(s.absUrl(), !0); var v = !0; return r.onUrlChange((function (e, t) { ir(e, h) ? (n.$evalAsync((function () { var r, i = s.absUrl(), a = s.$$state; e = sr(e), s.$$parse(e), s.$$state = t, r = n.$broadcast("$locationChangeStart", e, i, t, a).defaultPrevented, s.absUrl() === e && (r ? (s.$$parse(i), s.$$state = a, g(i, !1, a)) : (v = !1, $(i, a))) })), n.$$phase || n.$digest()) : o.location.href = e })), n.$watch((function () { if (v || s.$$urlUpdatedByLocation) { s.$$urlUpdatedByLocation = !1; var e = sr(r.url()), t = sr(s.absUrl()), a = r.state(), o = s.$$replace, l = e !== t || s.$$html5 && i.history && a !== s.$$state; (v || l) && (v = !1, n.$evalAsync((function () { var t = s.absUrl(), r = n.$broadcast("$locationChangeStart", t, e, s.$$state, a).defaultPrevented; s.absUrl() === t && (r ? (s.$$parse(e), s.$$state = a) : (l && g(t, o, a === s.$$state ? null : s.$$state), $(e, a))) }))) } s.$$replace = !1 })), s; function $(e, t) { n.$broadcast("$locationChangeSuccess", s.absUrl(), e, s.$$state, t) } }] } function mr() { var e = !0, t = this; this.debugEnabled = function (t) { return R(t) ? (e = t, this) : e }, this.$get = ["$window", function (n) { var r, i = u || /\bEdge\//.test(n.navigator && n.navigator.userAgent); return { log: a("log"), info: a("info"), warn: a("warn"), error: a("error"), debug: (r = a("debug"), function () { e && r.apply(t, arguments) }) }; function a(e) { var t = n.console || {}, r = t[e] || t.log || F; return function () { var e = []; return C(arguments, (function (t) { e.push(function (e) { return W(e) && (e.stack && i ? e = e.message && -1 === e.stack.indexOf(e.message) ? "Error: " + e.message + "\n" + e.stack : e.stack : e.sourceURL && (e = e.message + "\n" + e.sourceURL + ":" + e.line)), e }(t)) })), Function.prototype.apply.call(r, t, e) } } }] } C([ur, cr, lr], (function (e) { e.prototype = Object.create(dr), e.prototype.state = function (t) { if (!arguments.length) return this.$$state; if (e !== lr || !this.$$html5) throw Xn("nostate", "History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API"); return this.$$state = V(t) ? null : t, this.$$urlUpdatedByLocation = !0, this } })); var gr = i("$parse"), vr = {}.constructor.prototype.valueOf; function $r(e) { return e + "" } var yr = je(); C("+ - * / % === !== == != < > <= >= && || ! = |".split(" "), (function (e) { yr[e] = !0 })); var br = { n: "\n", f: "\f", r: "\r", t: "\t", v: "\v", "'": "'", '"': '"' }, wr = function (e) { this.options = e }; wr.prototype = { constructor: wr, lex: function (e) { for (this.text = e, this.index = 0, this.tokens = []; this.index < this.text.length;) { var t = this.text.charAt(this.index); if ('"' === t || "'" === t) this.readString(t); else if (this.isNumber(t) || "." === t && this.isNumber(this.peek())) this.readNumber(); else if (this.isIdentifierStart(this.peekMultichar())) this.readIdent(); else if (this.is(t, "(){}[].,;:?")) this.tokens.push({ index: this.index, text: t }), this.index++; else if (this.isWhitespace(t)) this.index++; else { var n = t + this.peek(), r = n + this.peek(2), i = yr[t], a = yr[n], o = yr[r]; if (i || a || o) { var s = o ? r : a ? n : t; this.tokens.push({ index: this.index, text: s, operator: !0 }), this.index += s.length } else this.throwError("Unexpected next character ", this.index, this.index + 1) } } return this.tokens }, is: function (e, t) { return -1 !== t.indexOf(e) }, peek: function (e) { var t = e || 1; return this.index + t < this.text.length && this.text.charAt(this.index + t) }, isNumber: function (e) { return "0" <= e && e <= "9" && "string" == typeof e }, isWhitespace: function (e) { return " " === e || "\r" === e || "\t" === e || "\n" === e || "\v" === e || " " === e }, isIdentifierStart: function (e) { return this.options.isIdentifierStart ? this.options.isIdentifierStart(e, this.codePointAt(e)) : this.isValidIdentifierStart(e) }, isValidIdentifierStart: function (e) { return "a" <= e && e <= "z" || "A" <= e && e <= "Z" || "_" === e || "$" === e }, isIdentifierContinue: function (e) { return this.options.isIdentifierContinue ? this.options.isIdentifierContinue(e, this.codePointAt(e)) : this.isValidIdentifierContinue(e) }, isValidIdentifierContinue: function (e, t) { return this.isValidIdentifierStart(e, t) || this.isNumber(e) }, codePointAt: function (e) { return 1 === e.length ? e.charCodeAt(0) : (e.charCodeAt(0) << 10) + e.charCodeAt(1) - 56613888 }, peekMultichar: function () { var e = this.text.charAt(this.index), t = this.peek(); if (!t) return e; var n = e.charCodeAt(0), r = t.charCodeAt(0); return n >= 55296 && n <= 56319 && r >= 56320 && r <= 57343 ? e + t : e }, isExpOperator: function (e) { return "-" === e || "+" === e || this.isNumber(e) }, throwError: function (e, t, n) { n = n || this.index; var r = R(t) ? "s " + t + "-" + this.index + " [" + this.text.substring(t, n) + "]" : " " + n; throw gr("lexerr", "Lexer Error: {0} at column{1} in expression [{2}].", e, r, this.text) }, readNumber: function () { for (var e = "", t = this.index; this.index < this.text.length;) { var n = l(this.text.charAt(this.index)); if ("." === n || this.isNumber(n)) e += n; else { var r = this.peek(); if ("e" === n && this.isExpOperator(r)) e += n; else if (this.isExpOperator(n) && r && this.isNumber(r) && "e" === e.charAt(e.length - 1)) e += n; else { if (!this.isExpOperator(n) || r && this.isNumber(r) || "e" !== e.charAt(e.length - 1)) break; this.throwError("Invalid exponent") } } this.index++ } this.tokens.push({ index: t, text: e, constant: !0, value: Number(e) }) }, readIdent: function () { var e = this.index; for (this.index += this.peekMultichar().length; this.index < this.text.length;) { var t = this.peekMultichar(); if (!this.isIdentifierContinue(t)) break; this.index += t.length } this.tokens.push({ index: e, text: this.text.slice(e, this.index), identifier: !0 }) }, readString: function (e) { var t = this.index; this.index++; for (var n = "", r = e, i = !1; this.index < this.text.length;) { var a = this.text.charAt(this.index); if (r += a, i) { if ("u" === a) { var o = this.text.substring(this.index + 1, this.index + 5); o.match(/[\da-f]{4}/i) || this.throwError("Invalid unicode escape [\\u" + o + "]"), this.index += 4, n += String.fromCharCode(parseInt(o, 16)) } else { n += br[a] || a } i = !1 } else if ("\\" === a) i = !0; else { if (a === e) return this.index++, void this.tokens.push({ index: t, text: r, constant: !0, value: n }); n += a } this.index++ } this.throwError("Unterminated quote", t) } }; var Sr = function (e, t) { this.lexer = e, this.options = t }; function Cr(e, t) { return void 0 !== e ? e : t } function xr(e, t) { return void 0 === e ? t : void 0 === t ? e : e + t } Sr.Program = "Program", Sr.ExpressionStatement = "ExpressionStatement", Sr.AssignmentExpression = "AssignmentExpression", Sr.ConditionalExpression = "ConditionalExpression", Sr.LogicalExpression = "LogicalExpression", Sr.BinaryExpression = "BinaryExpression", Sr.UnaryExpression = "UnaryExpression", Sr.CallExpression = "CallExpression", Sr.MemberExpression = "MemberExpression", Sr.Identifier = "Identifier", Sr.Literal = "Literal", Sr.ArrayExpression = "ArrayExpression", Sr.Property = "Property", Sr.ObjectExpression = "ObjectExpression", Sr.ThisExpression = "ThisExpression", Sr.LocalsExpression = "LocalsExpression", Sr.NGValueParameter = "NGValueParameter", Sr.prototype = { ast: function (e) { this.text = e, this.tokens = this.lexer.lex(e); var t = this.program(); return 0 !== this.tokens.length && this.throwError("is an unexpected token", this.tokens[0]), t }, program: function () { for (var e = []; ;)if (this.tokens.length > 0 && !this.peek("}", ")", ";", "]") && e.push(this.expressionStatement()), !this.expect(";")) return { type: Sr.Program, body: e } }, expressionStatement: function () { return { type: Sr.ExpressionStatement, expression: this.filterChain() } }, filterChain: function () { for (var e = this.expression(); this.expect("|");)e = this.filter(e); return e }, expression: function () { return this.assignment() }, assignment: function () { var e = this.ternary(); if (this.expect("=")) { if (!Ar(e)) throw gr("lval", "Trying to assign a value to a non l-value"); e = { type: Sr.AssignmentExpression, left: e, right: this.assignment(), operator: "=" } } return e }, ternary: function () { var e, t, n = this.logicalOR(); return this.expect("?") && (e = this.expression(), this.consume(":")) ? (t = this.expression(), { type: Sr.ConditionalExpression, test: n, alternate: e, consequent: t }) : n }, logicalOR: function () { for (var e = this.logicalAND(); this.expect("||");)e = { type: Sr.LogicalExpression, operator: "||", left: e, right: this.logicalAND() }; return e }, logicalAND: function () { for (var e = this.equality(); this.expect("&&");)e = { type: Sr.LogicalExpression, operator: "&&", left: e, right: this.equality() }; return e }, equality: function () { for (var e, t = this.relational(); e = this.expect("==", "!=", "===", "!==");)t = { type: Sr.BinaryExpression, operator: e.text, left: t, right: this.relational() }; return t }, relational: function () { for (var e, t = this.additive(); e = this.expect("<", ">", "<=", ">=");)t = { type: Sr.BinaryExpression, operator: e.text, left: t, right: this.additive() }; return t }, additive: function () { for (var e, t = this.multiplicative(); e = this.expect("+", "-");)t = { type: Sr.BinaryExpression, operator: e.text, left: t, right: this.multiplicative() }; return t }, multiplicative: function () { for (var e, t = this.unary(); e = this.expect("*", "/", "%");)t = { type: Sr.BinaryExpression, operator: e.text, left: t, right: this.unary() }; return t }, unary: function () { var e; return (e = this.expect("+", "-", "!")) ? { type: Sr.UnaryExpression, operator: e.text, prefix: !0, argument: this.unary() } : this.primary() }, primary: function () { var e, t; for (this.expect("(") ? (e = this.filterChain(), this.consume(")")) : this.expect("[") ? e = this.arrayDeclaration() : this.expect("{") ? e = this.object() : this.selfReferential.hasOwnProperty(this.peek().text) ? e = oe(this.selfReferential[this.consume().text]) : this.options.literals.hasOwnProperty(this.peek().text) ? e = { type: Sr.Literal, value: this.options.literals[this.consume().text] } : this.peek().identifier ? e = this.identifier() : this.peek().constant ? e = this.constant() : this.throwError("not a primary expression", this.peek()); t = this.expect("(", "[", ".");)"(" === t.text ? (e = { type: Sr.CallExpression, callee: e, arguments: this.parseArguments() }, this.consume(")")) : "[" === t.text ? (e = { type: Sr.MemberExpression, object: e, property: this.expression(), computed: !0 }, this.consume("]")) : "." === t.text ? e = { type: Sr.MemberExpression, object: e, property: this.identifier(), computed: !1 } : this.throwError("IMPOSSIBLE"); return e }, filter: function (e) { for (var t = [e], n = { type: Sr.CallExpression, callee: this.identifier(), arguments: t, filter: !0 }; this.expect(":");)t.push(this.expression()); return n }, parseArguments: function () { var e = []; if (")" !== this.peekToken().text) do { e.push(this.filterChain()) } while (this.expect(",")); return e }, identifier: function () { var e = this.consume(); return e.identifier || this.throwError("is not a valid identifier", e), { type: Sr.Identifier, name: e.text } }, constant: function () { return { type: Sr.Literal, value: this.consume().value } }, arrayDeclaration: function () { var e = []; if ("]" !== this.peekToken().text) do { if (this.peek("]")) break; e.push(this.expression()) } while (this.expect(",")); return this.consume("]"), { type: Sr.ArrayExpression, elements: e } }, object: function () { var e, t = []; if ("}" !== this.peekToken().text) do { if (this.peek("}")) break; e = { type: Sr.Property, kind: "init" }, this.peek().constant ? (e.key = this.constant(), e.computed = !1, this.consume(":"), e.value = this.expression()) : this.peek().identifier ? (e.key = this.identifier(), e.computed = !1, this.peek(":") ? (this.consume(":"), e.value = this.expression()) : e.value = e.key) : this.peek("[") ? (this.consume("["), e.key = this.expression(), this.consume("]"), e.computed = !0, this.consume(":"), e.value = this.expression()) : this.throwError("invalid key", this.peek()), t.push(e) } while (this.expect(",")); return this.consume("}"), { type: Sr.ObjectExpression, properties: t } }, throwError: function (e, t) { throw gr("syntax", "Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].", t.text, e, t.index + 1, this.text, this.text.substring(t.index)) }, consume: function (e) { if (0 === this.tokens.length) throw gr("ueoe", "Unexpected end of expression: {0}", this.text); var t = this.expect(e); return t || this.throwError("is unexpected, expecting [" + e + "]", this.peek()), t }, peekToken: function () { if (0 === this.tokens.length) throw gr("ueoe", "Unexpected end of expression: {0}", this.text); return this.tokens[0] }, peek: function (e, t, n, r) { return this.peekAhead(0, e, t, n, r) }, peekAhead: function (e, t, n, r, i) { if (this.tokens.length > e) { var a = this.tokens[e], o = a.text; if (o === t || o === n || o === r || o === i || !t && !n && !r && !i) return a } return !1 }, expect: function (e, t, n, r) { var i = this.peek(e, t, n, r); return !!i && (this.tokens.shift(), i) }, selfReferential: { this: { type: Sr.ThisExpression }, $locals: { type: Sr.LocalsExpression } } }; var kr = 1, Dr = 2; function Er(e, t, n) { var r, i, a, o = e.isPure = function (e, t) { switch (e.type) { case Sr.MemberExpression: if (e.computed) return !1; break; case Sr.UnaryExpression: return kr; case Sr.BinaryExpression: return "+" !== e.operator && kr; case Sr.CallExpression: return !1 }return void 0 === t ? Dr : t }(e, n); switch (e.type) { case Sr.Program: r = !0, C(e.body, (function (e) { Er(e.expression, t, o), r = r && e.expression.constant })), e.constant = r; break; case Sr.Literal: e.constant = !0, e.toWatch = []; break; case Sr.UnaryExpression: Er(e.argument, t, o), e.constant = e.argument.constant, e.toWatch = e.argument.toWatch; break; case Sr.BinaryExpression: Er(e.left, t, o), Er(e.right, t, o), e.constant = e.left.constant && e.right.constant, e.toWatch = e.left.toWatch.concat(e.right.toWatch); break; case Sr.LogicalExpression: Er(e.left, t, o), Er(e.right, t, o), e.constant = e.left.constant && e.right.constant, e.toWatch = e.constant ? [] : [e]; break; case Sr.ConditionalExpression: Er(e.test, t, o), Er(e.alternate, t, o), Er(e.consequent, t, o), e.constant = e.test.constant && e.alternate.constant && e.consequent.constant, e.toWatch = e.constant ? [] : [e]; break; case Sr.Identifier: e.constant = !1, e.toWatch = [e]; break; case Sr.MemberExpression: Er(e.object, t, o), e.computed && Er(e.property, t, o), e.constant = e.object.constant && (!e.computed || e.property.constant), e.toWatch = e.constant ? [] : [e]; break; case Sr.CallExpression: a = !!e.filter && function (e, t) { return !e(t).$stateful }(t, e.callee.name), r = a, i = [], C(e.arguments, (function (e) { Er(e, t, o), r = r && e.constant, i.push.apply(i, e.toWatch) })), e.constant = r, e.toWatch = a ? i : [e]; break; case Sr.AssignmentExpression: Er(e.left, t, o), Er(e.right, t, o), e.constant = e.left.constant && e.right.constant, e.toWatch = [e]; break; case Sr.ArrayExpression: r = !0, i = [], C(e.elements, (function (e) { Er(e, t, o), r = r && e.constant, i.push.apply(i, e.toWatch) })), e.constant = r, e.toWatch = i; break; case Sr.ObjectExpression: r = !0, i = [], C(e.properties, (function (e) { Er(e.value, t, o), r = r && e.value.constant, i.push.apply(i, e.value.toWatch), e.computed && (Er(e.key, t, !1), r = r && e.key.constant, i.push.apply(i, e.key.toWatch)) })), e.constant = r, e.toWatch = i; break; case Sr.ThisExpression: case Sr.LocalsExpression: e.constant = !1, e.toWatch = [] } } function Tr(e) { if (1 === e.length) { var t = e[0].expression, n = t.toWatch; return 1 !== n.length || n[0] !== t ? n : void 0 } } function Ar(e) { return e.type === Sr.Identifier || e.type === Sr.MemberExpression } function Ir(e) { if (1 === e.body.length && Ar(e.body[0].expression)) return { type: Sr.AssignmentExpression, left: e.body[0].expression, right: { type: Sr.NGValueParameter }, operator: "=" } } function Mr(e) { this.$filter = e } function Or(e) { this.$filter = e } function Pr(e, t, n) { this.ast = new Sr(e, n), this.astCompiler = n.csp ? new Or(t) : new Mr(t) } function Fr(e) { return G(e.valueOf) ? e.valueOf() : vr.call(e) } function _r() { var e, t, n = je(), r = { true: !0, false: !1, null: null, undefined: void 0 }; this.addLiteral = function (e, t) { r[e] = t }, this.setIdentifierFns = function (n, r) { return e = n, t = r, this }, this.$get = ["$filter", function (i) { var a = { csp: ce().noUnsafeEval, literals: oe(r), isIdentifierStart: G(e) && e, isIdentifierContinue: G(t) && t }; return o.$$getAst = function (e) { return new Pr(new wr(a), i, a).getAst(e).ast }, o; function o(e, t) { var r, o; switch (typeof e) { case "string": if (e = e.trim(), !(r = n[o = e])) (r = new Pr(new wr(a), i, a).parse(e)).constant ? r.$$watchDelegate = d : r.oneTime ? r.$$watchDelegate = r.literal ? u : c : r.inputs && (r.$$watchDelegate = l), n[o] = r; return f(r, t); case "function": return f(e, t); default: return f(F, t) } } function s(e, t, n) { return null == e || null == t ? e === t : !("object" == typeof e && "object" == typeof (e = Fr(e)) && !n) && (e === t || e != e && t != t) } function l(e, t, n, r, i) { var a, o = r.inputs; if (1 === o.length) { var l = s; return o = o[0], e.$watch((function (e) { var t = o(e); return s(t, l, o.isPure) || (a = r(e, void 0, void 0, [t]), l = t && Fr(t)), a }), t, n, i) } for (var c = [], u = [], d = 0, f = o.length; d < f; d++)c[d] = s, u[d] = null; return e.$watch((function (e) { for (var t = !1, n = 0, i = o.length; n < i; n++) { var l = o[n](e); (t || (t = !s(l, c[n], o[n].isPure))) && (u[n] = l, c[n] = l && Fr(l)) } return t && (a = r(e, void 0, void 0, u)), a }), t, n, i) } function c(e, t, n, r, i) { var a, o; return a = r.inputs ? l(e, s, n, r, i) : e.$watch((function (e) { return r(e) }), s, n); function s(e, n, r) { o = e, G(t) && t(e, n, r), R(e) && r.$$postDigest((function () { R(o) && a() })) } } function u(e, t, n, r) { var i, a; return i = e.$watch((function (e) { return r(e) }), (function (e, n, r) { a = e, G(t) && t(e, n, r), o(e) && r.$$postDigest((function () { o(a) && i() })) }), n), i; function o(e) { var t = !0; return C(e, (function (e) { R(e) || (t = !1) })), t } } function d(e, t, n, r) { var i = e.$watch((function (e) { return i(), r(e) }), t, n); return i } function f(e, t) { if (!t) return e; var n = e.$$watchDelegate, r = !1, i = n !== u && n !== c ? function (n, i, a, o) { var s = r && o ? o[0] : e(n, i, a, o); return t(s, n, i) } : function (n, r, i, a) { var o = e(n, r, i, a), s = t(o, n, r); return R(o) ? s : o }; return r = !e.inputs, n && n !== l ? (i.$$watchDelegate = n, i.inputs = e.inputs) : t.$stateful || (i.$$watchDelegate = l, i.inputs = e.inputs ? e.inputs : [e]), i.inputs && (i.inputs = i.inputs.map((function (e) { return e.isPure === Dr ? function (t) { return e(t) } : e }))), i } }] } function Nr() { var e = !0; this.$get = ["$rootScope", "$exceptionHandler", function (t, n) { return Vr((function (e) { t.$evalAsync(e) }), n, e) }], this.errorOnUnhandledRejections = function (t) { return R(t) ? (e = t, this) : e } } function Lr() { var e = !0; this.$get = ["$browser", "$exceptionHandler", function (t, n) { return Vr((function (e) { t.defer(e) }), n, e) }], this.errorOnUnhandledRejections = function (t) { return R(t) ? (e = t, this) : e } } function Vr(e, t, n) { var r = i("$q", TypeError), a = 0, o = []; function s() { return new l } function l() { var e = this.promise = new c; this.resolve = function (t) { f(e, t) }, this.reject = function (t) { h(e, t) }, this.notify = function (t) { g(e, t) } } function c() { this.$$state = { status: 0 } } function u() { for (; !a && o.length;) { var e = o.shift(); if (!Rr(e)) { jr(e); var n = "Possibly unhandled rejection: " + Ke(e.value); W(e.value) ? t(e.value, n) : t(n) } } } function d(r) { !n || r.pending || 2 !== r.status || Rr(r) || (0 === a && 0 === o.length && e(u), o.push(r)), !r.processScheduled && r.pending && (r.processScheduled = !0, ++a, e((function () { !function (r) { var i, o, s; s = r.pending, r.processScheduled = !1, r.pending = void 0; try { for (var l = 0, c = s.length; l < c; ++l) { jr(r), o = s[l][0], i = s[l][r.status]; try { G(i) ? f(o, i(r.value)) : 1 === r.status ? f(o, r.value) : h(o, r.value) } catch (e) { h(o, e), e && !0 === e.$$passToExceptionHandler && t(e) } } } finally { --a, n && 0 === a && e(u) } }(r) }))) } function f(e, t) { e.$$state.status || (t === e ? m(e, r("qcycle", "Expected promise to be resolved with value other than itself '{0}'", t)) : p(e, t)) } function p(e, t) { var n, r = !1; try { (j(t) || G(t)) && (n = t.then), G(n) ? (e.$$state.status = -1, n.call(t, (function (t) { if (r) return; r = !0, p(e, t) }), i, (function (t) { g(e, t) }))) : (e.$$state.value = t, e.$$state.status = 1, d(e.$$state)) } catch (e) { i(e) } function i(t) { r || (r = !0, m(e, t)) } } function h(e, t) { e.$$state.status || m(e, t) } function m(e, t) { e.$$state.value = t, e.$$state.status = 2, d(e.$$state) } function g(n, r) { var i = n.$$state.pending; n.$$state.status <= 0 && i && i.length && e((function () { for (var e, n, a = 0, o = i.length; a < o; a++) { n = i[a][0], e = i[a][3]; try { g(n, G(e) ? e(r) : r) } catch (e) { t(e) } } })) } function v(e) { var t = new c; return h(t, e), t } function $(e, t, n) { var r = null; try { G(n) && (r = n()) } catch (e) { return v(e) } return Z(r) ? r.then((function () { return t(e) }), v) : t(e) } function y(e, t, n, r) { var i = new c; return f(i, e), i.then(t, n, r) } A(c.prototype, { then: function (e, t, n) { if (V(e) && V(t) && V(n)) return this; var r = new c; return this.$$state.pending = this.$$state.pending || [], this.$$state.pending.push([r, e, t, n]), this.$$state.status > 0 && d(this.$$state), r }, catch: function (e) { return this.then(null, e) }, finally: function (e, t) { return this.then((function (t) { return $(t, b, e) }), (function (t) { return $(t, v, e) }), t) } }); var b = y; function w(e) { if (!G(e)) throw r("norslvr", "Expected resolverFn, got '{0}'", e); var t = new c; return e((function (e) { f(t, e) }), (function (e) { h(t, e) })), t } return w.prototype = c.prototype, w.defer = s, w.reject = v, w.when = y, w.resolve = b, w.all = function (e) { var t = new c, n = 0, r = z(e) ? [] : {}; return C(e, (function (e, i) { n++, y(e).then((function (e) { r[i] = e, --n || f(t, r) }), (function (e) { h(t, e) })) })), 0 === n && f(t, r), t }, w.race = function (e) { var t = s(); return C(e, (function (e) { y(e).then(t.resolve, t.reject) })), t.promise }, w } function Rr(e) { return !!e.pur } function jr(e) { e.pur = !0 } function qr(e) { jr(e.$$state) } function Ur() { this.$get = ["$window", "$timeout", function (e, t) { var n = e.requestAnimationFrame || e.webkitRequestAnimationFrame, r = e.cancelAnimationFrame || e.webkitCancelAnimationFrame || e.webkitCancelRequestAnimationFrame, i = !!n, a = i ? function (e) { var t = n(e); return function () { r(t) } } : function (e) { var n = t(e, 16.66, !1); return function () { t.cancel(n) } }; return a.supported = i, a }] } function Br() { var e = 10, t = i("$rootScope"), n = null, r = null; this.digestTtl = function (t) { return arguments.length && (e = t), e }, this.$get = ["$exceptionHandler", "$parse", "$browser", function (i, a, o) { function l(e) { e.currentScope.$$destroyed = !0 } function c(e) { 9 === u && (e.$$childHead && c(e.$$childHead), e.$$nextSibling && c(e.$$nextSibling)), e.$parent = e.$$nextSibling = e.$$prevSibling = e.$$childHead = e.$$childTail = e.$root = e.$$watchers = null } function d() { this.$id = D(), this.$$phase = this.$parent = this.$$watchers = this.$$nextSibling = this.$$prevSibling = this.$$childHead = this.$$childTail = null, this.$root = this, this.$$destroyed = !1, this.$$listeners = {}, this.$$listenerCount = {}, this.$$watchersCount = 0, this.$$isolateBindings = null } d.prototype = { constructor: d, $new: function (e, t) { var n; return t = t || this, e ? (n = new d).$root = this.$root : (this.$$ChildScope || (this.$$ChildScope = function (e) { function t() { this.$$watchers = this.$$nextSibling = this.$$childHead = this.$$childTail = null, this.$$listeners = {}, this.$$listenerCount = {}, this.$$watchersCount = 0, this.$id = D(), this.$$ChildScope = null } return t.prototype = e, t }(this)), n = new this.$$ChildScope), n.$parent = t, n.$$prevSibling = t.$$childTail, t.$$childHead ? (t.$$childTail.$$nextSibling = n, t.$$childTail = n) : t.$$childHead = t.$$childTail = n, (e || t !== this) && n.$on("$destroy", l), n }, $watch: function (e, t, r, i) { var o = a(e), s = G(t) ? t : F; if (o.$$watchDelegate) return o.$$watchDelegate(this, s, r, o, e); var l = this, c = l.$$watchers, u = { fn: s, last: w, get: o, exp: i || e, eq: !!r }; return n = null, c || ((c = l.$$watchers = []).$$digestWatchIndex = -1), c.unshift(u), c.$$digestWatchIndex++, y(this, 1), function () { var e = ae(c, u); e >= 0 && (y(l, -1), e < c.$$digestWatchIndex && c.$$digestWatchIndex--), n = null } }, $watchGroup: function (e, t) { var n = new Array(e.length), r = new Array(e.length), i = [], a = this, o = !1, s = !0; if (!e.length) { var l = !0; return a.$evalAsync((function () { l && t(r, r, a) })), function () { l = !1 } } if (1 === e.length) return this.$watch(e[0], (function (e, i, a) { r[0] = e, n[0] = i, t(r, e === i ? r : n, a) })); function c() { o = !1, s ? (s = !1, t(r, r, a)) : t(r, n, a) } return C(e, (function (e, t) { var s = a.$watch(e, (function (e, i) { r[t] = e, n[t] = i, o || (o = !0, a.$evalAsync(c)) })); i.push(s) })), function () { for (; i.length;)i.shift()() } }, $watchCollection: function (e, t) { m.$stateful = !0; var n, r, i, o = this, l = t.length > 1, c = 0, u = a(e, m), d = [], f = {}, p = !0, h = 0; function m(e) { var t, i, a, o; if (!V(n = e)) { if (j(n)) if (S(n)) { r !== d && (h = (r = d).length = 0, c++), t = n.length, h !== t && (c++, r.length = h = t); for (var l = 0; l < t; l++)o = r[l], a = n[l], o != o && a != a || o === a || (c++, r[l] = a) } else { for (i in r !== f && (r = f = {}, h = 0, c++), t = 0, n) s.call(n, i) && (t++, a = n[i], o = r[i], i in r ? o != o && a != a || o === a || (c++, r[i] = a) : (h++, r[i] = a, c++)); if (h > t) for (i in c++, r) s.call(n, i) || (h--, delete r[i]) } else r !== n && (r = n, c++); return c } } return this.$watch(u, (function () { if (p ? (p = !1, t(n, n, o)) : t(n, i, o), l) if (j(n)) if (S(n)) { i = new Array(n.length); for (var e = 0; e < n.length; e++)i[e] = n[e] } else for (var r in i = {}, n) s.call(n, r) && (i[r] = n[r]); else i = n })) }, $digest: function () { var a, s, l, c, u, d, m, y, b, S = e, C = this, k = []; v("$digest"), o.$$checkUrlChange(), this === f && null !== r && (o.defer.cancel(r), x()), n = null; do { u = !1, m = C; for (var D = 0; D < p.length; D++) { try { (0, (b = p[D]).fn)(b.scope, b.locals) } catch (e) { i(e) } n = null } p.length = 0; e: do { if (c = m.$$watchers) for (c.$$digestWatchIndex = c.length; c.$$digestWatchIndex--;)try { if (a = c[c.$$digestWatchIndex]) if ((s = (0, a.get)(m)) === (l = a.last) || (a.eq ? le(s, l) : O(s) && O(l))) { if (a === n) { u = !1; break e } } else u = !0, n = a, a.last = a.eq ? oe(s, null) : s, (0, a.fn)(s, l === w ? s : l, m), S < 5 && (k[y = 4 - S] || (k[y] = []), k[y].push({ msg: G(a.exp) ? "fn: " + (a.exp.name || a.exp.toString()) : a.exp, newVal: s, oldVal: l })) } catch (e) { i(e) } if (!(d = m.$$watchersCount && m.$$childHead || m !== C && m.$$nextSibling)) for (; m !== C && !(d = m.$$nextSibling);)m = m.$parent } while (m = d); if ((u || p.length) && !S--) throw $(), t("infdig", "{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}", e, k) } while (u || p.length); for ($(); g < h.length;)try { h[g++]() } catch (e) { i(e) } h.length = g = 0, o.$$checkUrlChange() }, $destroy: function () { if (!this.$$destroyed) { var e = this.$parent; for (var t in this.$broadcast("$destroy"), this.$$destroyed = !0, this === f && o.$$applicationDestroyed(), y(this, -this.$$watchersCount), this.$$listenerCount) b(this, this.$$listenerCount[t], t); e && e.$$childHead === this && (e.$$childHead = this.$$nextSibling), e && e.$$childTail === this && (e.$$childTail = this.$$prevSibling), this.$$prevSibling && (this.$$prevSibling.$$nextSibling = this.$$nextSibling), this.$$nextSibling && (this.$$nextSibling.$$prevSibling = this.$$prevSibling), this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = F, this.$on = this.$watch = this.$watchGroup = function () { return F }, this.$$listeners = {}, this.$$nextSibling = null, c(this) } }, $eval: function (e, t) { return a(e)(this, t) }, $evalAsync: function (e, t) { f.$$phase || p.length || o.defer((function () { p.length && f.$digest() })), p.push({ scope: this, fn: a(e), locals: t }) }, $$postDigest: function (e) { h.push(e) }, $apply: function (e) { try { v("$apply"); try { return this.$eval(e) } finally { $() } } catch (e) { i(e) } finally { try { f.$digest() } catch (e) { throw i(e), e } } }, $applyAsync: function (e) { var t = this; e && m.push((function () { t.$eval(e) })), e = a(e), null === r && (r = o.defer((function () { f.$apply(x) }))) }, $on: function (e, t) { var n = this.$$listeners[e]; n || (this.$$listeners[e] = n = []), n.push(t); var r = this; do { r.$$listenerCount[e] || (r.$$listenerCount[e] = 0), r.$$listenerCount[e]++ } while (r = r.$parent); var i = this; return function () { var r = n.indexOf(t); -1 !== r && (delete n[r], b(i, 1, e)) } }, $emit: function (e, t) { var n, r, a, o = [], s = this, l = !1, c = { name: e, targetScope: s, stopPropagation: function () { l = !0 }, preventDefault: function () { c.defaultPrevented = !0 }, defaultPrevented: !1 }, u = de([c], arguments, 1); do { for (n = s.$$listeners[e] || o, c.currentScope = s, r = 0, a = n.length; r < a; r++)if (n[r]) try { n[r].apply(null, u) } catch (e) { i(e) } else n.splice(r, 1), r--, a--; if (l) break; s = s.$parent } while (s); return c.currentScope = null, c }, $broadcast: function (e, t) { var n = this, r = n, a = n, o = { name: e, targetScope: n, preventDefault: function () { o.defaultPrevented = !0 }, defaultPrevented: !1 }; if (!n.$$listenerCount[e]) return o; for (var s, l, c, u = de([o], arguments, 1); r = a;) { for (o.currentScope = r, l = 0, c = (s = r.$$listeners[e] || []).length; l < c; l++)if (s[l]) try { s[l].apply(null, u) } catch (e) { i(e) } else s.splice(l, 1), l--, c--; if (!(a = r.$$listenerCount[e] && r.$$childHead || r !== n && r.$$nextSibling)) for (; r !== n && !(a = r.$$nextSibling);)r = r.$parent } return o.currentScope = null, o } }; var f = new d, p = f.$$asyncQueue = [], h = f.$$postDigestQueue = [], m = f.$$applyAsyncQueue = [], g = 0; return f; function v(e) { if (f.$$phase) throw t("inprog", "{0} already in progress", f.$$phase); f.$$phase = e } function $() { f.$$phase = null } function y(e, t) { do { e.$$watchersCount += t } while (e = e.$parent) } function b(e, t, n) { do { e.$$listenerCount[n] -= t, 0 === e.$$listenerCount[n] && delete e.$$listenerCount[n] } while (e = e.$parent) } function w() { } function x() { for (; m.length;)try { m.shift()() } catch (e) { i(e) } r = null } }] } function Hr() { var e = /^\s*(https?|s?ftp|mailto|tel|file):/, t = /^\s*((https?|ftp|file|blob):|data:image\/)/; this.aHrefSanitizationWhitelist = function (t) { return R(t) ? (e = t, this) : e }, this.imgSrcSanitizationWhitelist = function (e) { return R(e) ? (t = e, this) : t }, this.$get = function () { return function (n, r) { var i, a = r ? t : e; return "" === (i = ai(n && n.trim()).href) || i.match(a) ? n : "unsafe:" + i } } } Mr.prototype = { compile: function (e) { var t = this; this.state = { nextId: 0, filters: {}, fn: { vars: [], body: [], own: {} }, assign: { vars: [], body: [], own: {} }, inputs: [] }, Er(e, t.$filter); var n, r = ""; if (this.stage = "assign", n = Ir(e)) { this.state.computing = "assign"; var i = this.nextId(); this.recurse(n, i), this.return_(i), r = "fn.assign=" + this.generateFunction("assign", "s,v,l") } var a = Tr(e.body); t.stage = "inputs", C(a, (function (e, n) { var r = "fn" + n; t.state[r] = { vars: [], body: [], own: {} }, t.state.computing = r; var i = t.nextId(); t.recurse(e, i), t.return_(i), t.state.inputs.push({ name: r, isPure: e.isPure }), e.watchId = n })), this.state.computing = "fn", this.stage = "main", this.recurse(e); var o = '"' + this.USE + " " + this.STRICT + '";\n' + this.filterPrefix() + "var fn=" + this.generateFunction("fn", "s,l,a,i") + r + this.watchFns() + "return fn;", s = new Function("$filter", "getStringValue", "ifDefined", "plus", o)(this.$filter, $r, Cr, xr); return this.state = this.stage = void 0, s }, USE: "use", STRICT: "strict", watchFns: function () { var e = [], t = this.state.inputs, n = this; return C(t, (function (t) { e.push("var " + t.name + "=" + n.generateFunction(t.name, "s")), t.isPure && e.push(t.name, ".isPure=" + JSON.stringify(t.isPure) + ";") })), t.length && e.push("fn.inputs=[" + t.map((function (e) { return e.name })).join(",") + "];"), e.join("") }, generateFunction: function (e, t) { return "function(" + t + "){" + this.varsPrefix(e) + this.body(e) + "};" }, filterPrefix: function () { var e = [], t = this; return C(this.state.filters, (function (n, r) { e.push(n + "=$filter(" + t.escape(r) + ")") })), e.length ? "var " + e.join(",") + ";" : "" }, varsPrefix: function (e) { return this.state[e].vars.length ? "var " + this.state[e].vars.join(",") + ";" : "" }, body: function (e) { return this.state[e].body.join("") }, recurse: function (e, t, n, r, i, a) { var o, s, l, c, u, d = this; if (r = r || F, !a && R(e.watchId)) return t = t || this.nextId(), void this.if_("i", this.lazyAssign(t, this.computedMember("i", e.watchId)), this.lazyRecurse(e, t, n, r, i, !0)); switch (e.type) { case Sr.Program: C(e.body, (function (t, n) { d.recurse(t.expression, void 0, void 0, (function (e) { s = e })), n !== e.body.length - 1 ? d.current().body.push(s, ";") : d.return_(s) })); break; case Sr.Literal: c = this.escape(e.value), this.assign(t, c), r(t || c); break; case Sr.UnaryExpression: this.recurse(e.argument, void 0, void 0, (function (e) { s = e })), c = e.operator + "(" + this.ifDefined(s, 0) + ")", this.assign(t, c), r(c); break; case Sr.BinaryExpression: this.recurse(e.left, void 0, void 0, (function (e) { o = e })), this.recurse(e.right, void 0, void 0, (function (e) { s = e })), c = "+" === e.operator ? this.plus(o, s) : "-" === e.operator ? this.ifDefined(o, 0) + e.operator + this.ifDefined(s, 0) : "(" + o + ")" + e.operator + "(" + s + ")", this.assign(t, c), r(c); break; case Sr.LogicalExpression: t = t || this.nextId(), d.recurse(e.left, t), d.if_("&&" === e.operator ? t : d.not(t), d.lazyRecurse(e.right, t)), r(t); break; case Sr.ConditionalExpression: t = t || this.nextId(), d.recurse(e.test, t), d.if_(t, d.lazyRecurse(e.alternate, t), d.lazyRecurse(e.consequent, t)), r(t); break; case Sr.Identifier: t = t || this.nextId(), n && (n.context = "inputs" === d.stage ? "s" : this.assign(this.nextId(), this.getHasOwnProperty("l", e.name) + "?l:s"), n.computed = !1, n.name = e.name), d.if_("inputs" === d.stage || d.not(d.getHasOwnProperty("l", e.name)), (function () { d.if_("inputs" === d.stage || "s", (function () { i && 1 !== i && d.if_(d.isNull(d.nonComputedMember("s", e.name)), d.lazyAssign(d.nonComputedMember("s", e.name), "{}")), d.assign(t, d.nonComputedMember("s", e.name)) })) }), t && d.lazyAssign(t, d.nonComputedMember("l", e.name))), r(t); break; case Sr.MemberExpression: o = n && (n.context = this.nextId()) || this.nextId(), t = t || this.nextId(), d.recurse(e.object, o, void 0, (function () { d.if_(d.notNull(o), (function () { e.computed ? (s = d.nextId(), d.recurse(e.property, s), d.getStringValue(s), i && 1 !== i && d.if_(d.not(d.computedMember(o, s)), d.lazyAssign(d.computedMember(o, s), "{}")), c = d.computedMember(o, s), d.assign(t, c), n && (n.computed = !0, n.name = s)) : (i && 1 !== i && d.if_(d.isNull(d.nonComputedMember(o, e.property.name)), d.lazyAssign(d.nonComputedMember(o, e.property.name), "{}")), c = d.nonComputedMember(o, e.property.name), d.assign(t, c), n && (n.computed = !1, n.name = e.property.name)) }), (function () { d.assign(t, "undefined") })), r(t) }), !!i); break; case Sr.CallExpression: t = t || this.nextId(), e.filter ? (s = d.filter(e.callee.name), l = [], C(e.arguments, (function (e) { var t = d.nextId(); d.recurse(e, t), l.push(t) })), c = s + "(" + l.join(",") + ")", d.assign(t, c), r(t)) : (s = d.nextId(), o = {}, l = [], d.recurse(e.callee, s, o, (function () { d.if_(d.notNull(s), (function () { C(e.arguments, (function (t) { d.recurse(t, e.constant ? void 0 : d.nextId(), void 0, (function (e) { l.push(e) })) })), c = o.name ? d.member(o.context, o.name, o.computed) + "(" + l.join(",") + ")" : s + "(" + l.join(",") + ")", d.assign(t, c) }), (function () { d.assign(t, "undefined") })), r(t) }))); break; case Sr.AssignmentExpression: s = this.nextId(), o = {}, this.recurse(e.left, void 0, o, (function () { d.if_(d.notNull(o.context), (function () { d.recurse(e.right, s), c = d.member(o.context, o.name, o.computed) + e.operator + s, d.assign(t, c), r(t || c) })) }), 1); break; case Sr.ArrayExpression: l = [], C(e.elements, (function (t) { d.recurse(t, e.constant ? void 0 : d.nextId(), void 0, (function (e) { l.push(e) })) })), c = "[" + l.join(",") + "]", this.assign(t, c), r(t || c); break; case Sr.ObjectExpression: l = [], u = !1, C(e.properties, (function (e) { e.computed && (u = !0) })), u ? (t = t || this.nextId(), this.assign(t, "{}"), C(e.properties, (function (e) { e.computed ? (o = d.nextId(), d.recurse(e.key, o)) : o = e.key.type === Sr.Identifier ? e.key.name : "" + e.key.value, s = d.nextId(), d.recurse(e.value, s), d.assign(d.member(t, o, e.computed), s) }))) : (C(e.properties, (function (t) { d.recurse(t.value, e.constant ? void 0 : d.nextId(), void 0, (function (e) { l.push(d.escape(t.key.type === Sr.Identifier ? t.key.name : "" + t.key.value) + ":" + e) })) })), c = "{" + l.join(",") + "}", this.assign(t, c)), r(t || c); break; case Sr.ThisExpression: this.assign(t, "s"), r(t || "s"); break; case Sr.LocalsExpression: this.assign(t, "l"), r(t || "l"); break; case Sr.NGValueParameter: this.assign(t, "v"), r(t || "v") } }, getHasOwnProperty: function (e, t) { var n = e + "." + t, r = this.current().own; return r.hasOwnProperty(n) || (r[n] = this.nextId(!1, e + "&&(" + this.escape(t) + " in " + e + ")")), r[n] }, assign: function (e, t) { if (e) return this.current().body.push(e, "=", t, ";"), e }, filter: function (e) { return this.state.filters.hasOwnProperty(e) || (this.state.filters[e] = this.nextId(!0)), this.state.filters[e] }, ifDefined: function (e, t) { return "ifDefined(" + e + "," + this.escape(t) + ")" }, plus: function (e, t) { return "plus(" + e + "," + t + ")" }, return_: function (e) { this.current().body.push("return ", e, ";") }, if_: function (e, t, n) { if (!0 === e) t(); else { var r = this.current().body; r.push("if(", e, "){"), t(), r.push("}"), n && (r.push("else{"), n(), r.push("}")) } }, not: function (e) { return "!(" + e + ")" }, isNull: function (e) { return e + "==null" }, notNull: function (e) { return e + "!=null" }, nonComputedMember: function (e, t) { return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t) ? e + "." + t : e + '["' + t.replace(/[^$_a-zA-Z0-9]/g, this.stringEscapeFn) + '"]' }, computedMember: function (e, t) { return e + "[" + t + "]" }, member: function (e, t, n) { return n ? this.computedMember(e, t) : this.nonComputedMember(e, t) }, getStringValue: function (e) { this.assign(e, "getStringValue(" + e + ")") }, lazyRecurse: function (e, t, n, r, i, a) { var o = this; return function () { o.recurse(e, t, n, r, i, a) } }, lazyAssign: function (e, t) { var n = this; return function () { n.assign(e, t) } }, stringEscapeRegex: /[^ a-zA-Z0-9]/g, stringEscapeFn: function (e) { return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4) }, escape: function (e) { if (U(e)) return "'" + e.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'"; if (B(e)) return e.toString(); if (!0 === e) return "true"; if (!1 === e) return "false"; if (null === e) return "null"; if (void 0 === e) return "undefined"; throw gr("esc", "IMPOSSIBLE") }, nextId: function (e, t) { var n = "v" + this.state.nextId++; return e || this.current().vars.push(n + (t ? "=" + t : "")), n }, current: function () { return this.state[this.state.computing] } }, Or.prototype = { compile: function (e) { var t, n, r = this; Er(e, r.$filter), (t = Ir(e)) && (n = this.recurse(t)); var i, a = Tr(e.body); a && (i = [], C(a, (function (e, t) { var n = r.recurse(e); n.isPure = e.isPure, e.input = n, i.push(n), e.watchId = t }))); var o = []; C(e.body, (function (e) { o.push(r.recurse(e.expression)) })); var s = 0 === e.body.length ? F : 1 === e.body.length ? o[0] : function (e, t) { var n; return C(o, (function (r) { n = r(e, t) })), n }; return n && (s.assign = function (e, t, r) { return n(e, r, t) }), i && (s.inputs = i), s }, recurse: function (e, t, n) { var r, i, a, o = this; if (e.input) return this.inputs(e.input, e.watchId); switch (e.type) { case Sr.Literal: return this.value(e.value, t); case Sr.UnaryExpression: return i = this.recurse(e.argument), this["unary" + e.operator](i, t); case Sr.BinaryExpression: case Sr.LogicalExpression: return r = this.recurse(e.left), i = this.recurse(e.right), this["binary" + e.operator](r, i, t); case Sr.ConditionalExpression: return this["ternary?:"](this.recurse(e.test), this.recurse(e.alternate), this.recurse(e.consequent), t); case Sr.Identifier: return o.identifier(e.name, t, n); case Sr.MemberExpression: return r = this.recurse(e.object, !1, !!n), e.computed || (i = e.property.name), e.computed && (i = this.recurse(e.property)), e.computed ? this.computedMember(r, i, t, n) : this.nonComputedMember(r, i, t, n); case Sr.CallExpression: return a = [], C(e.arguments, (function (e) { a.push(o.recurse(e)) })), e.filter && (i = this.$filter(e.callee.name)), e.filter || (i = this.recurse(e.callee, !0)), e.filter ? function (e, n, r, o) { for (var s = [], l = 0; l < a.length; ++l)s.push(a[l](e, n, r, o)); var c = i.apply(void 0, s, o); return t ? { context: void 0, name: void 0, value: c } : c } : function (e, n, r, o) { var s, l = i(e, n, r, o); if (null != l.value) { for (var c = [], u = 0; u < a.length; ++u)c.push(a[u](e, n, r, o)); s = l.value.apply(l.context, c) } return t ? { value: s } : s }; case Sr.AssignmentExpression: return r = this.recurse(e.left, !0, 1), i = this.recurse(e.right), function (e, n, a, o) { var s = r(e, n, a, o), l = i(e, n, a, o); return s.context[s.name] = l, t ? { value: l } : l }; case Sr.ArrayExpression: return a = [], C(e.elements, (function (e) { a.push(o.recurse(e)) })), function (e, n, r, i) { for (var o = [], s = 0; s < a.length; ++s)o.push(a[s](e, n, r, i)); return t ? { value: o } : o }; case Sr.ObjectExpression: return a = [], C(e.properties, (function (e) { e.computed ? a.push({ key: o.recurse(e.key), computed: !0, value: o.recurse(e.value) }) : a.push({ key: e.key.type === Sr.Identifier ? e.key.name : "" + e.key.value, computed: !1, value: o.recurse(e.value) }) })), function (e, n, r, i) { for (var o = {}, s = 0; s < a.length; ++s)a[s].computed ? o[a[s].key(e, n, r, i)] = a[s].value(e, n, r, i) : o[a[s].key] = a[s].value(e, n, r, i); return t ? { value: o } : o }; case Sr.ThisExpression: return function (e) { return t ? { value: e } : e }; case Sr.LocalsExpression: return function (e, n) { return t ? { value: n } : n }; case Sr.NGValueParameter: return function (e, n, r) { return t ? { value: r } : r } } }, "unary+": function (e, t) { return function (n, r, i, a) { var o = e(n, r, i, a); return o = R(o) ? +o : 0, t ? { value: o } : o } }, "unary-": function (e, t) { return function (n, r, i, a) { var o = e(n, r, i, a); return o = R(o) ? -o : -0, t ? { value: o } : o } }, "unary!": function (e, t) { return function (n, r, i, a) { var o = !e(n, r, i, a); return t ? { value: o } : o } }, "binary+": function (e, t, n) { return function (r, i, a, o) { var s = xr(e(r, i, a, o), t(r, i, a, o)); return n ? { value: s } : s } }, "binary-": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o), l = t(r, i, a, o), c = (R(s) ? s : 0) - (R(l) ? l : 0); return n ? { value: c } : c } }, "binary*": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) * t(r, i, a, o); return n ? { value: s } : s } }, "binary/": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) / t(r, i, a, o); return n ? { value: s } : s } }, "binary%": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) % t(r, i, a, o); return n ? { value: s } : s } }, "binary===": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) === t(r, i, a, o); return n ? { value: s } : s } }, "binary!==": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) !== t(r, i, a, o); return n ? { value: s } : s } }, "binary==": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) == t(r, i, a, o); return n ? { value: s } : s } }, "binary!=": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) != t(r, i, a, o); return n ? { value: s } : s } }, "binary<": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) < t(r, i, a, o); return n ? { value: s } : s } }, "binary>": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) > t(r, i, a, o); return n ? { value: s } : s } }, "binary<=": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) <= t(r, i, a, o); return n ? { value: s } : s } }, "binary>=": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) >= t(r, i, a, o); return n ? { value: s } : s } }, "binary&&": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) && t(r, i, a, o); return n ? { value: s } : s } }, "binary||": function (e, t, n) { return function (r, i, a, o) { var s = e(r, i, a, o) || t(r, i, a, o); return n ? { value: s } : s } }, "ternary?:": function (e, t, n, r) { return function (i, a, o, s) { var l = e(i, a, o, s) ? t(i, a, o, s) : n(i, a, o, s); return r ? { value: l } : l } }, value: function (e, t) { return function () { return t ? { context: void 0, name: void 0, value: e } : e } }, identifier: function (e, t, n) { return function (r, i, a, o) { var s = i && e in i ? i : r; n && 1 !== n && s && null == s[e] && (s[e] = {}); var l = s ? s[e] : void 0; return t ? { context: s, name: e, value: l } : l } }, computedMember: function (e, t, n, r) { return function (i, a, o, s) { var l, c, u = e(i, a, o, s); return null != u && (l = $r(l = t(i, a, o, s)), r && 1 !== r && u && !u[l] && (u[l] = {}), c = u[l]), n ? { context: u, name: l, value: c } : c } }, nonComputedMember: function (e, t, n, r) { return function (i, a, o, s) { var l = e(i, a, o, s); r && 1 !== r && l && null == l[t] && (l[t] = {}); var c = null != l ? l[t] : void 0; return n ? { context: l, name: t, value: c } : c } }, inputs: function (e, t) { return function (n, r, i, a) { return a ? a[t] : e(n, r, i) } } }, Pr.prototype = { constructor: Pr, parse: function (e) { var t = this.getAst(e), n = this.astCompiler.compile(t.ast); return n.literal = function (e) { return 0 === e.body.length || 1 === e.body.length && (e.body[0].expression.type === Sr.Literal || e.body[0].expression.type === Sr.ArrayExpression || e.body[0].expression.type === Sr.ObjectExpression) }(t.ast), n.constant = function (e) { return e.constant }(t.ast), n.oneTime = t.oneTime, n }, getAst: function (e) { var t = !1; return ":" === (e = e.trim()).charAt(0) && ":" === e.charAt(1) && (t = !0, e = e.substring(2)), { ast: this.ast.ast(e), oneTime: t } } }; var zr = i("$sce"), Wr = { HTML: "html", CSS: "css", URL: "url", RESOURCE_URL: "resourceUrl", JS: "js" }, Gr = /_([a-z])/g; function Kr(e) { return e.replace(Gr, nt) } function Jr(e) { var t = []; return R(e) && C(e, (function (e) { t.push(function (e) { if ("self" === e) return e; if (U(e)) { if (e.indexOf("***") > -1) throw zr("iwcard", "Illegal sequence *** in string matcher.  String: {0}", e); return e = te(e).replace(/\\\*\\\*/g, ".*").replace(/\\\*/g, "[^:/.?&;]*"), new RegExp("^" + e + "$") } if (K(e)) return new RegExp("^" + e.source + "$"); throw zr("imatcher", 'Matchers may only be "self", string patterns or RegExp objects') }(e)) })), t } function Qr() { this.SCE_CONTEXTS = Wr; var e = ["self"], t = []; this.resourceUrlWhitelist = function (t) { return arguments.length && (e = Jr(t)), e }, this.resourceUrlBlacklist = function (e) { return arguments.length && (t = Jr(e)), t }, this.$get = ["$injector", function (n) { var r = function (e) { throw zr("unsafe", "Attempting to use an unsafe value in a safe context.") }; function i(e, t) { return "self" === e ? oi(t) : !!e.exec(t.href) } function a(e) { var t = function (e) { this.$$unwrapTrustedValue = function () { return e } }; return e && (t.prototype = new e), t.prototype.valueOf = function () { return this.$$unwrapTrustedValue() }, t.prototype.toString = function () { return this.$$unwrapTrustedValue().toString() }, t } n.has("$sanitize") && (r = n.get("$sanitize")); var o = a(), s = {}; return s[Wr.HTML] = a(o), s[Wr.CSS] = a(o), s[Wr.URL] = a(o), s[Wr.JS] = a(o), s[Wr.RESOURCE_URL] = a(s[Wr.URL]), { trustAs: function (e, t) { var n = s.hasOwnProperty(e) ? s[e] : null; if (!n) throw zr("icontext", "Attempted to trust a value in invalid context. Context: {0}; Value: {1}", e, t); if (null === t || V(t) || "" === t) return t; if ("string" != typeof t) throw zr("itype", "Attempted to trust a non-string value in a content requiring a string: Context: {0}", e); return new n(t) }, getTrusted: function (n, a) { if (null === a || V(a) || "" === a) return a; var o = s.hasOwnProperty(n) ? s[n] : null; if (o && a instanceof o) return a.$$unwrapTrustedValue(); if (n === Wr.RESOURCE_URL) { if (function (n) { var r, a, o = ai(n.toString()), s = !1; for (r = 0, a = e.length; r < a; r++)if (i(e[r], o)) { s = !0; break } if (s) for (r = 0, a = t.length; r < a; r++)if (i(t[r], o)) { s = !1; break } return s }(a)) return a; throw zr("insecurl", "Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}", a.toString()) } if (n === Wr.HTML) return r(a); throw zr("unsafe", "Attempting to use an unsafe value in a safe context.") }, valueOf: function (e) { return e instanceof o ? e.$$unwrapTrustedValue() : e } } }] } function Yr() { var e = !0; this.enabled = function (t) { return arguments.length && (e = !!t), e }, this.$get = ["$parse", "$sceDelegate", function (t, n) { if (e && u < 8) throw zr("iequirks", "Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information."); var r = Ge(Wr); r.isEnabled = function () { return e }, r.trustAs = n.trustAs, r.getTrusted = n.getTrusted, r.valueOf = n.valueOf, e || (r.trustAs = r.getTrusted = function (e, t) { return t }, r.valueOf = _), r.parseAs = function (e, n) { var i = t(n); return i.literal && i.constant ? i : t(n, (function (t) { return r.getTrusted(e, t) })) }; var i = r.parseAs, a = r.getTrusted, o = r.trustAs; return C(Wr, (function (e, t) { var n = l(t); r[Kr("parse_as_" + n)] = function (t) { return i(e, t) }, r[Kr("get_trusted_" + n)] = function (t) { return a(e, t) }, r[Kr("trust_as_" + n)] = function (t) { return o(e, t) } })), r }] } function Zr() { this.$get = ["$window", "$document", function (e, t) { var n = {}, r = !(!(e.nw && e.nw.process) && e.chrome && (e.chrome.app && e.chrome.app.runtime || !e.chrome.app && e.chrome.runtime && e.chrome.runtime.id)) && e.history && e.history.pushState, i = M((/android (\d+)/.exec(l((e.navigator || {}).userAgent)) || [])[1]), a = /Boxee/i.test((e.navigator || {}).userAgent), o = t[0] || {}, s = o.body && o.body.style, c = !1, d = !1; return s && (c = !(!("transition" in s) && !("webkitTransition" in s)), d = !(!("animation" in s) && !("webkitAnimation" in s))), { history: !(!r || i < 4 || a), hasEvent: function (e) { if ("input" === e && u) return !1; if (V(n[e])) { var t = o.createElement("div"); n[e] = "on" + e in t } return n[e] }, csp: ce(), transitions: c, animations: d, android: i } }] } var Xr = i("$compile"); function ei() { var e; this.httpOptions = function (t) { return t ? (e = t, this) : e }, this.$get = ["$exceptionHandler", "$templateCache", "$http", "$q", "$sce", function (t, n, r, i, a) { function o(s, l) { o.totalPendingRequests++, U(s) && !V(n.get(s)) || (s = a.getTrustedResourceUrl(s)); var c = r.defaults && r.defaults.transformResponse; return z(c) ? c = c.filter((function (e) { return e !== Rn })) : c === Rn && (c = null), r.get(s, A({ cache: n, transformResponse: c }, e)).finally((function () { o.totalPendingRequests-- })).then((function (e) { return n.put(s, e.data), e.data }), (function (e) { l || (e = Xr("tpload", "Failed to load template: {0} (HTTP status: {1} {2})", s, e.status, e.statusText), t(e)); return i.reject(e) })) } return o.totalPendingRequests = 0, o }] } function ti() { this.$get = ["$rootScope", "$browser", "$location", function (e, t, n) { var r = { findBindings: function (e, t, n) { var r = e.getElementsByClassName("ng-binding"), i = []; return C(r, (function (e) { var r = b.element(e).data("$binding"); r && C(r, (function (r) { n ? new RegExp("(^|\\s)" + te(t) + "(\\s|\\||$)").test(r) && i.push(e) : -1 !== r.indexOf(t) && i.push(e) })) })), i }, findModels: function (e, t, n) { for (var r = ["ng-", "data-ng-", "ng\\:"], i = 0; i < r.length; ++i) { var a = "[" + r[i] + "model" + (n ? "=" : "*=") + '"' + t + '"]', o = e.querySelectorAll(a); if (o.length) return o } }, getLocation: function () { return n.url() }, setLocation: function (t) { t !== n.url() && (n.url(t), e.$digest()) }, whenStable: function (e) { t.notifyWhenNoOutstandingRequests(e) } }; return r }] } function ni() { this.$get = ["$rootScope", "$browser", "$q", "$$q", "$exceptionHandler", function (e, t, n, r, i) { var a = {}; function o(o, s, l) { G(o) || (l = s, s = o, o = F); var c, u = fe(arguments, 3), d = R(l) && !l, f = (d ? r : n).defer(), p = f.promise; return c = t.defer((function () { try { f.resolve(o.apply(null, u)) } catch (e) { f.reject(e), i(e) } finally { delete a[p.$$timeoutId] } d || e.$apply() }), s), p.$$timeoutId = c, a[c] = f, p } return o.cancel = function (e) { return !(!e || !(e.$$timeoutId in a)) && (qr(a[e.$$timeoutId].promise), a[e.$$timeoutId].reject("canceled"), delete a[e.$$timeoutId], t.defer.cancel(e.$$timeoutId)) }, o }] } var ri = e.document.createElement("a"), ii = ai(e.location.href); function ai(e) { var t = e; return u && (ri.setAttribute("href", t), t = ri.href), ri.setAttribute("href", t), { href: ri.href, protocol: ri.protocol ? ri.protocol.replace(/:$/, "") : "", host: ri.host, search: ri.search ? ri.search.replace(/^\?/, "") : "", hash: ri.hash ? ri.hash.replace(/^#/, "") : "", hostname: ri.hostname, port: ri.port, pathname: "/" === ri.pathname.charAt(0) ? ri.pathname : "/" + ri.pathname } } function oi(e) { var t = U(e) ? ai(e) : e; return t.protocol === ii.protocol && t.host === ii.host } function si() { this.$get = N(e) } function li(e) { var t = e[0] || {}, n = {}, r = ""; function i(e) { try { return decodeURIComponent(e) } catch (t) { return e } } return function () { var e, a, o, s, l, c = function (e) { try { return e.cookie || "" } catch (e) { return "" } }(t); if (c !== r) for (e = (r = c).split("; "), n = {}, o = 0; o < e.length; o++)(s = (a = e[o]).indexOf("=")) > 0 && (l = i(a.substring(0, s)), V(n[l]) && (n[l] = i(a.substring(s + 1)))); return n } } function ci() { this.$get = li } function ui(e) { var t = "Filter"; function n(r, i) { if (j(r)) { var a = {}; return C(r, (function (e, t) { a[t] = n(t, e) })), a } return e.factory(r + t, i) } this.register = n, this.$get = ["$injector", function (e) { return function (n) { return e.get(n + t) } }], n("currency", vi), n("date", Ai), n("filter", di), n("json", Ii), n("limitTo", Pi), n("lowercase", Mi), n("number", $i), n("orderBy", _i), n("uppercase", Oi) } function di() { return function (e, t, n, r) { if (!S(e)) { if (null == e) return e; throw i("filter")("notarray", "Expected array but received: {0}", e) } var a, o; switch (r = r || "$", pi(t)) { case "function": a = t; break; case "boolean": case "null": case "number": case "string": o = !0; case "object": a = function (e, t, n, r) { var i, a = j(e) && n in e; !0 === t ? t = le : G(t) || (t = function (e, t) { return !V(e) && (null === e || null === t ? e === t : !(j(t) || j(e) && !L(e)) && (e = l("" + e), t = l("" + t), -1 !== e.indexOf(t))) }); return i = function (i) { return a && !j(i) ? fi(i, e[n], t, n, !1) : fi(i, e, t, n, r) }, i }(t, n, r, o); break; default: return e }return Array.prototype.filter.call(e, a) } } function fi(e, t, n, r, i, a) { var o = pi(e), s = pi(t); if ("string" === s && "!" === t.charAt(0)) return !fi(e, t.substring(1), n, r, i); if (z(e)) return e.some((function (e) { return fi(e, t, n, r, i) })); switch (o) { case "object": var l; if (i) { for (l in e) if (l.charAt && "$" !== l.charAt(0) && fi(e[l], t, n, r, !0)) return !0; return !a && fi(e, t, n, r, !1) } if ("object" === s) { for (l in t) { var c = t[l]; if (!G(c) && !V(c)) { var u = l === r; if (!fi(u ? e : e[l], c, n, r, u, u)) return !1 } } return !0 } return n(e, t); case "function": return !1; default: return n(e, t) } } function pi(e) { return null === e ? "null" : typeof e } li.$inject = ["$document"], ui.$inject = ["$provide"]; var hi = 22, mi = ".", gi = "0"; function vi(e) { var t = e.NUMBER_FORMATS; return function (e, n, r) { V(n) && (n = t.CURRENCY_SYM), V(r) && (r = t.PATTERNS[1].maxFrac); var i = n ? /\u00A4/g : /\s*\u00A4\s*/g; return null == e ? e : yi(e, t.PATTERNS[1], t.GROUP_SEP, t.DECIMAL_SEP, r).replace(i, n) } } function $i(e) { var t = e.NUMBER_FORMATS; return function (e, n) { return null == e ? e : yi(e, t.PATTERNS[0], t.GROUP_SEP, t.DECIMAL_SEP, n) } } function yi(e, t, n, r, i) { if (!U(e) && !B(e) || isNaN(e)) return ""; var a, o = !isFinite(e), s = !1, l = Math.abs(e) + "", c = ""; if (o) c = "∞"; else { a = function (e) { var t, n, r, i, a, o = 0; for ((n = e.indexOf(mi)) > -1 && (e = e.replace(mi, "")), (r = e.search(/e/i)) > 0 ? (n < 0 && (n = r), n += +e.slice(r + 1), e = e.substring(0, r)) : n < 0 && (n = e.length), r = 0; e.charAt(r) === gi; r++); if (r === (a = e.length)) t = [0], n = 1; else { for (a--; e.charAt(a) === gi;)a--; for (n -= r, t = [], i = 0; r <= a; r++, i++)t[i] = +e.charAt(r) } return n > hi && (t = t.splice(0, hi - 1), o = n - 1, n = 1), { d: t, e: o, i: n } }(l), function (e, t, n, r) { var i = e.d, a = i.length - e.i, o = (t = V(t) ? Math.min(Math.max(n, a), r) : +t) + e.i, s = i[o]; if (o > 0) { i.splice(Math.max(e.i, o)); for (var l = o; l < i.length; l++)i[l] = 0 } else { a = Math.max(0, a), e.i = 1, i.length = Math.max(1, o = t + 1), i[0] = 0; for (var c = 1; c < o; c++)i[c] = 0 } if (s >= 5) if (o - 1 < 0) { for (var u = 0; u > o; u--)i.unshift(0), e.i++; i.unshift(1), e.i++ } else i[o - 1]++; for (; a < Math.max(0, t); a++)i.push(0); var d = i.reduceRight((function (e, t, n, r) { return t += e, r[n] = t % 10, Math.floor(t / 10) }), 0); d && (i.unshift(d), e.i++) }(a, i, t.minFrac, t.maxFrac); var u = a.d, d = a.i, f = a.e, p = []; for (s = u.reduce((function (e, t) { return e && !t }), !0); d < 0;)u.unshift(0), d++; d > 0 ? p = u.splice(d, u.length) : (p = u, u = [0]); var h = []; for (u.length >= t.lgSize && h.unshift(u.splice(-t.lgSize, u.length).join("")); u.length > t.gSize;)h.unshift(u.splice(-t.gSize, u.length).join("")); u.length && h.unshift(u.join("")), c = h.join(n), p.length && (c += r + p.join("")), f && (c += "e+" + f) } return e < 0 && !s ? t.negPre + c + t.negSuf : t.posPre + c + t.posSuf } function bi(e, t, n, r) { var i = ""; for ((e < 0 || r && e <= 0) && (r ? e = 1 - e : (e = -e, i = "-")), e = "" + e; e.length < t;)e = gi + e; return n && (e = e.substr(e.length - t)), i + e } function wi(e, t, n, r, i) { return n = n || 0, function (a) { var o = a["get" + e](); return (n > 0 || o > -n) && (o += n), 0 === o && -12 === n && (o = 12), bi(o, t, r, i) } } function Si(e, t, n) { return function (r, i) { var a = r["get" + e](); return i[c((n ? "STANDALONE" : "") + (t ? "SHORT" : "") + e)][a] } } function Ci(e) { var t = new Date(e, 0, 1).getDay(); return new Date(e, 0, (t <= 4 ? 5 : 12) - t) } function xi(e) { return function (t) { var n, r = Ci(t.getFullYear()), i = +(n = t, new Date(n.getFullYear(), n.getMonth(), n.getDate() + (4 - n.getDay()))) - +r; return bi(1 + Math.round(i / 6048e5), e) } } function ki(e, t) { return e.getFullYear() <= 0 ? t.ERAS[0] : t.ERAS[1] } vi.$inject = ["$locale"], $i.$inject = ["$locale"]; var Di = { yyyy: wi("FullYear", 4, 0, !1, !0), yy: wi("FullYear", 2, 0, !0, !0), y: wi("FullYear", 1, 0, !1, !0), MMMM: Si("Month"), MMM: Si("Month", !0), MM: wi("Month", 2, 1), M: wi("Month", 1, 1), LLLL: Si("Month", !1, !0), dd: wi("Date", 2), d: wi("Date", 1), HH: wi("Hours", 2), H: wi("Hours", 1), hh: wi("Hours", 2, -12), h: wi("Hours", 1, -12), mm: wi("Minutes", 2), m: wi("Minutes", 1), ss: wi("Seconds", 2), s: wi("Seconds", 1), sss: wi("Milliseconds", 3), EEEE: Si("Day"), EEE: Si("Day", !0), a: function (e, t) { return e.getHours() < 12 ? t.AMPMS[0] : t.AMPMS[1] }, Z: function (e, t, n) { var r = -1 * n, i = r >= 0 ? "+" : ""; return i += bi(Math[r > 0 ? "floor" : "ceil"](r / 60), 2) + bi(Math.abs(r % 60), 2) }, ww: xi(2), w: xi(1), G: ki, GG: ki, GGG: ki, GGGG: function (e, t) { return e.getFullYear() <= 0 ? t.ERANAMES[0] : t.ERANAMES[1] } }, Ei = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/, Ti = /^-?\d+$/; function Ai(e) { var t = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; return function (n, r, i) { var a, o, s = "", l = []; if (r = r || "mediumDate", r = e.DATETIME_FORMATS[r] || r, U(n) && (n = Ti.test(n) ? M(n) : function (e) { var n; if (n = e.match(t)) { var r = new Date(0), i = 0, a = 0, o = n[8] ? r.setUTCFullYear : r.setFullYear, s = n[8] ? r.setUTCHours : r.setHours; n[9] && (i = M(n[9] + n[10]), a = M(n[9] + n[11])), o.call(r, M(n[1]), M(n[2]) - 1, M(n[3])); var l = M(n[4] || 0) - i, c = M(n[5] || 0) - a, u = M(n[6] || 0), d = Math.round(1e3 * parseFloat("0." + (n[7] || 0))); return s.call(r, l, c, u, d), r } return e }(n)), B(n) && (n = new Date(n)), !H(n) || !isFinite(n.getTime())) return n; for (; r;)(o = Ei.exec(r)) ? r = (l = de(l, o, 1)).pop() : (l.push(r), r = null); var c = n.getTimezoneOffset(); return i && (c = $e(i, c), n = ye(n, i, !0)), C(l, (function (t) { a = Di[t], s += a ? a(n, e.DATETIME_FORMATS, c) : "''" === t ? "'" : t.replace(/(^'|'$)/g, "").replace(/''/g, "'") })), s } } function Ii() { return function (e, t) { return V(t) && (t = 2), me(e, t) } } Ai.$inject = ["$locale"]; var Mi = N(l), Oi = N(c); function Pi() { return function (e, t, n) { return t = Math.abs(Number(t)) === 1 / 0 ? Number(t) : M(t), O(t) ? e : (B(e) && (e = e.toString()), S(e) ? (n = (n = !n || isNaN(n) ? 0 : M(n)) < 0 ? Math.max(0, e.length + n) : n, t >= 0 ? Fi(e, n, n + t) : 0 === n ? Fi(e, t, e.length) : Fi(e, Math.max(0, n + t), n)) : e) } } function Fi(e, t, n) { return U(e) ? e.slice(t, n) : h.call(e, t, n) } function _i(e) { return function (r, a, o, s) { if (null == r) return r; if (!S(r)) throw i("orderBy")("notarray", "Expected array but received: {0}", r); z(a) || (a = [a]), 0 === a.length && (a = ["+"]); var l = a.map((function (t) { var n = 1, r = _; if (G(t)) r = t; else if (U(t) && ("+" !== t.charAt(0) && "-" !== t.charAt(0) || (n = "-" === t.charAt(0) ? -1 : 1, t = t.substring(1)), "" !== t && (r = e(t)).constant)) { var i = r(); r = function (e) { return e[i] } } return { get: r, descending: n } })), c = o ? -1 : 1, u = G(s) ? s : n, d = Array.prototype.map.call(r, (function (e, n) { return { value: e, tieBreaker: { value: n, type: "number", index: n }, predicateValues: l.map((function (r) { return function (e, n) { var r = typeof e; null === e ? (r = "string", e = "null") : "object" === r && (e = function (e) { if (G(e.valueOf) && t(e = e.valueOf())) return e; if (L(e) && t(e = e.toString())) return e; return e }(e)); return { value: e, type: r, index: n } }(r.get(e), n) })) } })); return d.sort((function (e, t) { for (var r = 0, i = l.length; r < i; r++) { var a = u(e.predicateValues[r], t.predicateValues[r]); if (a) return a * l[r].descending * c } return (u(e.tieBreaker, t.tieBreaker) || n(e.tieBreaker, t.tieBreaker)) * c })), r = d.map((function (e) { return e.value })) }; function t(e) { switch (typeof e) { case "number": case "boolean": case "string": return !0; default: return !1 } } function n(e, t) { var n = 0, r = e.type, i = t.type; if (r === i) { var a = e.value, o = t.value; "string" === r ? (a = a.toLowerCase(), o = o.toLowerCase()) : "object" === r && (j(a) && (a = e.index), j(o) && (o = t.index)), a !== o && (n = a < o ? -1 : 1) } else n = r < i ? -1 : 1; return n } } function Ni(e) { return G(e) && (e = { link: e }), e.restrict = e.restrict || "AC", N(e) } _i.$inject = ["$parse"]; var Li = N({ restrict: "E", compile: function (e, t) { if (!t.href && !t.xlinkHref) return function (e, t) { if ("a" === t[0].nodeName.toLowerCase()) { var n = "[object SVGAnimatedString]" === v.call(t.prop("href")) ? "xlink:href" : "href"; t.on("click", (function (e) { t.attr(n) || e.preventDefault() })) } } } }), Vi = {}; C(It, (function (e, t) { if ("multiple" !== e) { var n = yn("ng-" + t), r = i; "checked" === e && (r = function (e, t, r) { r.ngModel !== r[n] && i(e, 0, r) }), Vi[n] = function () { return { restrict: "A", priority: 100, link: r } } } function i(e, r, i) { e.$watch(i[n], (function (e) { i.$set(t, !!e) })) } })), C(Ot, (function (e, t) { Vi[t] = function () { return { priority: 100, link: function (e, n, r) { if ("ngPattern" === t && "/" === r.ngPattern.charAt(0)) { var i = r.ngPattern.match(a); if (i) return void r.$set("ngPattern", new RegExp(i[1], i[2])) } e.$watch(r[t], (function (e) { r.$set(t, e) })) } } } })), C(["src", "srcset", "href"], (function (e) { var t = yn("ng-" + e); Vi[t] = function () { return { priority: 99, link: function (n, r, i) { var a = e, o = e; "href" === e && "[object SVGAnimatedString]" === v.call(r.prop("href")) && (o = "xlinkHref", i.$attr[o] = "xlink:href", a = null), i.$observe(t, (function (t) { t ? (i.$set(o, t), u && a && r.prop(a, i[o])) : "href" === e && i.$set(o, null) })) } } } })); var Ri = { $addControl: F, $$renameControl: function (e, t) { e.$name = t }, $removeControl: F, $setValidity: F, $setDirty: F, $setPristine: F, $setSubmitted: F }, ji = "ng-pending", qi = "ng-submitted"; function Ui(e, t, n, r, i) { this.$$controls = [], this.$error = {}, this.$$success = {}, this.$pending = void 0, this.$name = i(t.name || t.ngForm || "")(n), this.$dirty = !1, this.$pristine = !0, this.$valid = !0, this.$invalid = !1, this.$submitted = !1, this.$$parentForm = Ri, this.$$element = e, this.$$animate = r, Wi(this) } Ui.$inject = ["$element", "$attrs", "$scope", "$animate", "$interpolate"], Ui.prototype = { $rollbackViewValue: function () { C(this.$$controls, (function (e) { e.$rollbackViewValue() })) }, $commitViewValue: function () { C(this.$$controls, (function (e) { e.$commitViewValue() })) }, $addControl: function (e) { Le(e.$name, "input"), this.$$controls.push(e), e.$name && (this[e.$name] = e), e.$$parentForm = this }, $$renameControl: function (e, t) { var n = e.$name; this[n] === e && delete this[n], this[t] = e, e.$name = t }, $removeControl: function (e) { e.$name && this[e.$name] === e && delete this[e.$name], C(this.$pending, (function (t, n) { this.$setValidity(n, null, e) }), this), C(this.$error, (function (t, n) { this.$setValidity(n, null, e) }), this), C(this.$$success, (function (t, n) { this.$setValidity(n, null, e) }), this), ae(this.$$controls, e), e.$$parentForm = Ri }, $setDirty: function () { this.$$animate.removeClass(this.$$element, ja), this.$$animate.addClass(this.$$element, qa), this.$dirty = !0, this.$pristine = !1, this.$$parentForm.$setDirty() }, $setPristine: function () { this.$$animate.setClass(this.$$element, ja, qa + " " + qi), this.$dirty = !1, this.$pristine = !0, this.$submitted = !1, C(this.$$controls, (function (e) { e.$setPristine() })) }, $setUntouched: function () { C(this.$$controls, (function (e) { e.$setUntouched() })) }, $setSubmitted: function () { this.$$animate.addClass(this.$$element, qi), this.$submitted = !0, this.$$parentForm.$setSubmitted() } }, Gi({ clazz: Ui, set: function (e, t, n) { var r = e[t]; r ? -1 === r.indexOf(n) && r.push(n) : e[t] = [n] }, unset: function (e, t, n) { var r = e[t]; r && (ae(r, n), 0 === r.length && delete e[t]) } }); var Bi = function (e) { return ["$timeout", "$parse", function (t, n) { return { name: "form", restrict: e ? "EAC" : "E", require: ["form", "^^?form"], controller: Ui, compile: function (n, i) { n.addClass(ja).addClass(Va); var a = i.name ? "name" : !(!e || !i.ngForm) && "ngForm"; return { pre: function (e, n, i, o) { var s = o[0]; if (!("action" in i)) { var l = function (t) { e.$apply((function () { s.$commitViewValue(), s.$setSubmitted() })), t.preventDefault() }; n[0].addEventListener("submit", l), n.on("$destroy", (function () { t((function () { n[0].removeEventListener("submit", l) }), 0, !1) })) } (o[1] || s.$$parentForm).$addControl(s); var c = a ? r(s.$name) : F; a && (c(e, s), i.$observe(a, (function (t) { s.$name !== t && (c(e, void 0), s.$$parentForm.$$renameControl(s, t), (c = r(s.$name))(e, s)) }))), n.on("$destroy", (function () { s.$$parentForm.$removeControl(s), c(e, void 0), A(s, Ri) })) } } } }; function r(e) { return "" === e ? n('this[""]').assign : n(e).assign || F } }] }, Hi = Bi(), zi = Bi(!0); function Wi(e) { e.$$classCache = {}, e.$$classCache[Ra] = !(e.$$classCache[Va] = e.$$element.hasClass(Va)) } function Gi(e) { var t = e.clazz, n = e.set, r = e.unset; function i(e, t, n) { n && !e.$$classCache[t] ? (e.$$animate.addClass(e.$$element, t), e.$$classCache[t] = !0) : !n && e.$$classCache[t] && (e.$$animate.removeClass(e.$$element, t), e.$$classCache[t] = !1) } function a(e, t, n) { t = t ? "-" + Pe(t, "-") : "", i(e, Va + t, !0 === n), i(e, Ra + t, !1 === n) } t.prototype.$setValidity = function (e, t, o) { var s; V(t) ? function (e, t, r, i) { e[t] || (e[t] = {}); n(e[t], r, i) }(this, "$pending", e, o) : function (e, t, n, i) { e[t] && r(e[t], n, i); Ki(e[t]) && (e[t] = void 0) }(this, "$pending", e, o), Y(t) ? t ? (r(this.$error, e, o), n(this.$$success, e, o)) : (n(this.$error, e, o), r(this.$$success, e, o)) : (r(this.$error, e, o), r(this.$$success, e, o)), this.$pending ? (i(this, ji, !0), this.$valid = this.$invalid = void 0, a(this, "", null)) : (i(this, ji, !1), this.$valid = Ki(this.$error), this.$invalid = !this.$valid, a(this, "", this.$valid)), a(this, e, s = this.$pending && this.$pending[e] ? void 0 : !this.$error[e] && (!!this.$$success[e] || null)), this.$$parentForm.$setValidity(e, s, this) } } function Ki(e) { if (e) for (var t in e) if (e.hasOwnProperty(t)) return !1; return !0 } var Ji = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/, Qi = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i, Yi = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/, Zi = /^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/, Xi = /^(\d{4,})-(\d{2})-(\d{2})$/, ea = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, ta = /^(\d{4,})-W(\d\d)$/, na = /^(\d{4,})-(\d\d)$/, ra = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, ia = "keydown wheel mousedown", aa = je(); C("date,datetime-local,month,time,week".split(","), (function (e) { aa[e] = !0 })); var oa = { text: function (e, t, n, r, i, a) { la(e, t, n, r, i, a), sa(r) }, date: ua("date", Xi, ca(Xi, ["yyyy", "MM", "dd"]), "yyyy-MM-dd"), "datetime-local": ua("datetimelocal", ea, ca(ea, ["yyyy", "MM", "dd", "HH", "mm", "ss", "sss"]), "yyyy-MM-ddTHH:mm:ss.sss"), time: ua("time", ra, ca(ra, ["HH", "mm", "ss", "sss"]), "HH:mm:ss.sss"), week: ua("week", ta, (function (e, t) { if (H(e)) return e; if (U(e)) { ta.lastIndex = 0; var n = ta.exec(e); if (n) { var r = +n[1], i = +n[2], a = 0, o = 0, s = 0, l = 0, c = Ci(r), u = 7 * (i - 1); return t && (a = t.getHours(), o = t.getMinutes(), s = t.getSeconds(), l = t.getMilliseconds()), new Date(r, 0, c.getDate() + u, a, o, s, l) } } return NaN }), "yyyy-Www"), month: ua("month", na, ca(na, ["yyyy", "MM"]), "yyyy-MM"), number: function (e, t, n, r, i, a) { var o, s; da(e, t, n, r), fa(r), la(e, t, n, r, i, a), (R(n.min) || n.ngMin) && (r.$validators.min = function (e) { return r.$isEmpty(e) || V(o) || e >= o }, n.$observe("min", (function (e) { o = pa(e), r.$validate() }))); (R(n.max) || n.ngMax) && (r.$validators.max = function (e) { return r.$isEmpty(e) || V(s) || e <= s }, n.$observe("max", (function (e) { s = pa(e), r.$validate() }))); if (R(n.step) || n.ngStep) { var l; r.$validators.step = function (e, t) { return r.$isEmpty(t) || V(l) || ga(t, o || 0, l) }, n.$observe("step", (function (e) { l = pa(e), r.$validate() })) } }, url: function (e, t, n, r, i, a) { la(e, t, n, r, i, a), sa(r), r.$$parserName = "url", r.$validators.url = function (e, t) { var n = e || t; return r.$isEmpty(n) || Qi.test(n) } }, email: function (e, t, n, r, i, a) { la(e, t, n, r, i, a), sa(r), r.$$parserName = "email", r.$validators.email = function (e, t) { var n = e || t; return r.$isEmpty(n) || Yi.test(n) } }, radio: function (e, t, n, r) { var i = !n.ngTrim || "false" !== ee(n.ngTrim); V(n.name) && t.attr("name", D()); t.on("click", (function (e) { var a; t[0].checked && (a = n.value, i && (a = ee(a)), r.$setViewValue(a, e && e.type)) })), r.$render = function () { var e = n.value; i && (e = ee(e)), t[0].checked = e === r.$viewValue }, n.$observe("value", r.$render) }, range: function (e, t, n, r, i, a) { da(e, t, n, r), fa(r), la(e, t, n, r, i, a); var o = r.$$hasNativeValidators && "range" === t[0].type, s = o ? 0 : void 0, l = o ? 100 : void 0, c = o ? 1 : void 0, u = t[0].validity, d = R(n.min), f = R(n.max), p = R(n.step), h = r.$render; r.$render = o && R(u.rangeUnderflow) && R(u.rangeOverflow) ? function () { h(), r.$setViewValue(t.val()) } : h, d && (r.$validators.min = o ? function () { return !0 } : function (e, t) { return r.$isEmpty(t) || V(s) || t >= s }, m("min", (function (e) { if (s = pa(e), O(r.$modelValue)) return; if (o) { var n = t.val(); s > n && (n = s, t.val(n)), r.$setViewValue(n) } else r.$validate() }))); f && (r.$validators.max = o ? function () { return !0 } : function (e, t) { return r.$isEmpty(t) || V(l) || t <= l }, m("max", (function (e) { if (l = pa(e), O(r.$modelValue)) return; if (o) { var n = t.val(); l < n && (t.val(l), n = l < s ? s : l), r.$setViewValue(n) } else r.$validate() }))); p && (r.$validators.step = o ? function () { return !u.stepMismatch } : function (e, t) { return r.$isEmpty(t) || V(c) || ga(t, s || 0, c) }, m("step", (function (e) { if (c = pa(e), O(r.$modelValue)) return; o && r.$viewValue !== t.val() ? r.$setViewValue(t.val()) : r.$validate() }))); function m(e, r) { t.attr(e, n[e]), n.$observe(e, r) } }, checkbox: function (e, t, n, r, i, a, o, s) { var l = va(s, e, "ngTrueValue", n.ngTrueValue, !0), c = va(s, e, "ngFalseValue", n.ngFalseValue, !1); t.on("click", (function (e) { r.$setViewValue(t[0].checked, e && e.type) })), r.$render = function () { t[0].checked = r.$viewValue }, r.$isEmpty = function (e) { return !1 === e }, r.$formatters.push((function (e) { return le(e, l) })), r.$parsers.push((function (e) { return e ? l : c })) }, hidden: F, button: F, submit: F, reset: F, file: F }; function sa(e) { e.$formatters.push((function (t) { return e.$isEmpty(t) ? t : t.toString() })) } function la(e, t, n, r, i, a) { var s, c = l(t[0].type); if (!i.android) { var u = !1; t.on("compositionstart", (function () { u = !0 })), t.on("compositionend", (function () { u = !1, d() })) } var d = function (e) { if (s && (a.defer.cancel(s), s = null), !u) { var i = t.val(), o = e && e.type; "password" === c || n.ngTrim && "false" === n.ngTrim || (i = ee(i)), (r.$viewValue !== i || "" === i && r.$$hasNativeValidators) && r.$setViewValue(i, o) } }; if (i.hasEvent("input")) t.on("input", d); else { var f = function (e, t, n) { s || (s = a.defer((function () { s = null, t && t.value === n || d(e) }))) }; t.on("keydown", (function (e) { var t = e.keyCode; 91 === t || 15 < t && t < 19 || 37 <= t && t <= 40 || f(e, this, this.value) })), i.hasEvent("paste") && t.on("paste cut drop", f) } t.on("change", d), aa[c] && r.$$hasNativeValidators && c === n.type && t.on(ia, (function (e) { if (!s) { var t = this[o], n = t.badInput, r = t.typeMismatch; s = a.defer((function () { s = null, t.badInput === n && t.typeMismatch === r || d(e) })) } })), r.$render = function () { var e = r.$isEmpty(r.$viewValue) ? "" : r.$viewValue; t.val() !== e && t.val(e) } } function ca(e, t) { return function (n, r) { var i, a; if (H(n)) return n; if (U(n)) { if ('"' === n.charAt(0) && '"' === n.charAt(n.length - 1) && (n = n.substring(1, n.length - 1)), Ji.test(n)) return new Date(n); if (e.lastIndex = 0, i = e.exec(n)) return i.shift(), a = r ? { yyyy: r.getFullYear(), MM: r.getMonth() + 1, dd: r.getDate(), HH: r.getHours(), mm: r.getMinutes(), ss: r.getSeconds(), sss: r.getMilliseconds() / 1e3 } : { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 }, C(i, (function (e, n) { n < t.length && (a[t[n]] = +e) })), new Date(a.yyyy, a.MM - 1, a.dd, a.HH, a.mm, a.ss || 0, 1e3 * a.sss || 0) } return NaN } } function ua(e, t, n, r) { return function (i, a, o, s, l, c, u) { da(i, a, o, s), la(0, a, o, s, l, c); var d, f, p, h = s && s.$options.getOption("timezone"); (s.$$parserName = e, s.$parsers.push((function (e) { if (s.$isEmpty(e)) return null; if (t.test(e)) { var r = n(e, d); return h && (r = ye(r, h)), r } })), s.$formatters.push((function (e) { if (e && !H(e)) throw Wa("datefmt", "Expected `{0}` to be a date", e); return m(e) ? ((d = e) && h && (d = ye(d, h, !0)), u("date")(e, r, h)) : (d = null, "") })), R(o.min) || o.ngMin) && (s.$validators.min = function (e) { return !m(e) || V(f) || n(e) >= f }, o.$observe("min", (function (e) { f = g(e), s.$validate() }))); (R(o.max) || o.ngMax) && (s.$validators.max = function (e) { return !m(e) || V(p) || n(e) <= p }, o.$observe("max", (function (e) { p = g(e), s.$validate() }))); function m(e) { return e && !(e.getTime && e.getTime() != e.getTime()) } function g(e) { return R(e) && !H(e) ? n(e) || void 0 : e } } } function da(e, t, n, r) { var i = t[0]; (r.$$hasNativeValidators = j(i.validity)) && r.$parsers.push((function (e) { var n = t.prop(o) || {}; return n.badInput || n.typeMismatch ? void 0 : e })) } function fa(e) { e.$$parserName = "number", e.$parsers.push((function (t) { return e.$isEmpty(t) ? null : Zi.test(t) ? parseFloat(t) : void 0 })), e.$formatters.push((function (t) { if (!e.$isEmpty(t)) { if (!B(t)) throw Wa("numfmt", "Expected `{0}` to be a number", t); t = t.toString() } return t })) } function pa(e) { return R(e) && !B(e) && (e = parseFloat(e)), O(e) ? void 0 : e } function ha(e) { return (0 | e) === e } function ma(e) { var t = e.toString(), n = t.indexOf("."); if (-1 === n) { if (-1 < e && e < 1) { var r = /e-(\d+)$/.exec(t); if (r) return Number(r[1]) } return 0 } return t.length - n - 1 } function ga(e, t, n) { var r = Number(e), i = !ha(r), a = !ha(t), o = !ha(n); if (i || a || o) { var s = i ? ma(r) : 0, l = a ? ma(t) : 0, c = o ? ma(n) : 0, u = Math.max(s, l, c), d = Math.pow(10, u); r *= d, t *= d, n *= d, i && (r = Math.round(r)), a && (t = Math.round(t)), o && (n = Math.round(n)) } return (r - t) % n == 0 } function va(e, t, n, r, i) { var a; if (R(r)) { if (!(a = e(r)).constant) throw Wa("constexpr", "Expected constant expression for `{0}`, but saw `{1}`.", n, r); return a(t) } return i } var $a = ["$browser", "$sniffer", "$filter", "$parse", function (e, t, n, r) { return { restrict: "E", require: ["?ngModel"], link: { pre: function (i, a, o, s) { s[0] && (oa[l(o.type)] || oa.text)(i, a, o, s[0], t, e, n, r) } } } }], ya = /^(true|false|\d+)$/, ba = function () { function e(e, t, n) { var r = R(n) ? n : 9 === u ? "" : null; e.prop("value", r), t.$set("value", n) } return { restrict: "A", priority: 100, compile: function (t, n) { return ya.test(n.ngValue) ? function (t, n, r) { e(n, r, t.$eval(r.ngValue)) } : function (t, n, r) { t.$watch(r.ngValue, (function (t) { e(n, r, t) })) } } } }, wa = ["$compile", function (e) { return { restrict: "AC", compile: function (t) { return e.$$addBindingClass(t), function (t, n, r) { e.$$addBindingInfo(n, r.ngBind), n = n[0], t.$watch(r.ngBind, (function (e) { n.textContent = qe(e) })) } } } }], Sa = ["$interpolate", "$compile", function (e, t) { return { compile: function (n) { return t.$$addBindingClass(n), function (n, r, i) { var a = e(r.attr(i.$attr.ngBindTemplate)); t.$$addBindingInfo(r, a.expressions), r = r[0], i.$observe("ngBindTemplate", (function (e) { r.textContent = V(e) ? "" : e })) } } } }], Ca = ["$sce", "$parse", "$compile", function (e, t, n) { return { restrict: "A", compile: function (r, i) { var a = t(i.ngBindHtml), o = t(i.ngBindHtml, (function (t) { return e.valueOf(t) })); return n.$$addBindingClass(r), function (t, r, i) { n.$$addBindingInfo(r, i.ngBindHtml), t.$watch(o, (function () { var n = a(t); r.html(e.getTrustedHtml(n) || "") })) } } } }], xa = N({ restrict: "A", require: "ngModel", link: function (e, t, n, r) { r.$viewChangeListeners.push((function () { e.$eval(n.ngChange) })) } }); function ka(e, t) { var n; return e = "ngClass" + e, ["$parse", function (s) { return { restrict: "AC", link: function (l, c, u) { var d, f = u[e].trim(), p = ":" === f.charAt(0) && ":" === f.charAt(1), h = s(f, p ? o : a), m = p ? function (e) { var t = a(e); t !== d && y(t) } : y, g = c.data("$classCounts"), v = !0; function $(e, t) { var n = []; return C(e, (function (e) { (t > 0 || g[e]) && (g[e] = (g[e] || 0) + t, g[e] === +(t > 0) && n.push(e)) })), n.join(" ") } function y(e) { v === t && function (e, t) { var n = i(e), a = i(t), o = r(n, a), s = r(a, n), l = $(o, -1), c = $(s, 1); u.$addClass(c), u.$removeClass(l) }(d, e), d = e } g || (g = je(), c.data("$classCounts", g)), "ngClass" !== e && (n || (n = s("$index", (function (e) { return 1 & e }))), l.$watch(n, (function (e) { e === t ? (n = $(i(n = d), 1), u.$addClass(n)) : function (e) { e = $(i(e), -1), u.$removeClass(e) }(d); var n; v = e }))), l.$watch(h, m, p) } } }]; function r(e, t) { if (!e || !e.length) return []; if (!t || !t.length) return e; var n = []; e: for (var r = 0; r < e.length; r++) { for (var i = e[r], a = 0; a < t.length; a++)if (i === t[a]) continue e; n.push(i) } return n } function i(e) { return e && e.split(" ") } function a(e) { var t = e; return z(e) ? t = e.map(a).join(" ") : j(e) && (t = Object.keys(e).filter((function (t) { return e[t] })).join(" ")), t } function o(e) { var t = e; if (z(e)) t = e.map(o); else if (j(e)) { var n = !1; t = Object.keys(e).filter((function (t) { var r = e[t]; return !n && V(r) && (n = !0), r })), n && t.push(void 0) } return t } } var Da = ka("", !0), Ea = ka("Odd", 0), Ta = ka("Even", 1), Aa = Ni({ compile: function (e, t) { t.$set("ngCloak", void 0), e.removeClass("ng-cloak") } }), Ia = [function () { return { restrict: "A", scope: !0, controller: "@", priority: 500 } }], Ma = {}, Oa = { blur: !0, focus: !0 }; C("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "), (function (e) { var t = yn("ng-" + e); Ma[t] = ["$parse", "$rootScope", function (n, r) { return { restrict: "A", compile: function (i, a) { var o = n(a[t]); return function (t, n) { n.on(e, (function (n) { var i = function () { o(t, { $event: n }) }; Oa[e] && r.$$phase ? t.$evalAsync(i) : t.$apply(i) })) } } } }] })); var Pa = ["$animate", "$compile", function (e, t) { return { multiElement: !0, transclude: "element", priority: 600, terminal: !0, restrict: "A", $$tlb: !0, link: function (n, r, i, a, o) { var s, l, c; n.$watch(i.ngIf, (function (n) { n ? l || o((function (n, a) { l = a, n[n.length++] = t.$$createComment("end ngIf", i.ngIf), s = { clone: n }, e.enter(n, r.parent(), r) })) : (c && (c.remove(), c = null), l && (l.$destroy(), l = null), s && (c = Re(s.clone), e.leave(c).done((function (e) { !1 !== e && (c = null) })), s = null)) })) } } }], Fa = ["$templateRequest", "$anchorScroll", "$animate", function (e, t, n) { return { restrict: "ECA", priority: 400, terminal: !0, transclude: "element", controller: b.noop, compile: function (r, i) { var a = i.ngInclude || i.src, o = i.onload || "", s = i.autoscroll; return function (r, i, l, c, u) { var d, f, p, h = 0, m = function () { f && (f.remove(), f = null), d && (d.$destroy(), d = null), p && (n.leave(p).done((function (e) { !1 !== e && (f = null) })), f = p, p = null) }; r.$watch(a, (function (a) { var l = function (e) { !1 === e || !R(s) || s && !r.$eval(s) || t() }, f = ++h; a ? (e(a, !0).then((function (e) { if (!r.$$destroyed && f === h) { var t = r.$new(); c.template = e; var s = u(t, (function (e) { m(), n.enter(e, null, i).done(l) })); p = s, (d = t).$emit("$includeContentLoaded", a), r.$eval(o) } }), (function () { r.$$destroyed || f === h && (m(), r.$emit("$includeContentError", a)) })), r.$emit("$includeContentRequested", a)) : (m(), c.template = null) })) } } } }], _a = ["$compile", function (t) { return { restrict: "ECA", priority: -400, require: "ngInclude", link: function (n, r, i, a) { if (v.call(r[0]).match(/SVG/)) return r.empty(), void t(dt(a.template, e.document).childNodes)(n, (function (e) { r.append(e) }), { futureParentElement: r }); r.html(a.template), t(r.contents())(n) } } }], Na = Ni({ priority: 450, compile: function () { return { pre: function (e, t, n) { e.$eval(n.ngInit) } } } }), La = function () { return { restrict: "A", priority: 100, require: "ngModel", link: function (e, t, n, r) { var i = n.ngList || ", ", a = "false" !== n.ngTrim, o = a ? ee(i) : i; r.$parsers.push((function (e) { if (!V(e)) { var t = []; return e && C(e.split(o), (function (e) { e && t.push(a ? ee(e) : e) })), t } })), r.$formatters.push((function (e) { if (z(e)) return e.join(i) })), r.$isEmpty = function (e) { return !e || !e.length } } } }, Va = "ng-valid", Ra = "ng-invalid", ja = "ng-pristine", qa = "ng-dirty", Ua = "ng-untouched", Ba = "ng-touched", Ha = "ng-empty", za = "ng-not-empty", Wa = i("ngModel"); function Ga(e, t, n, r, i, a, o, s, l) { var c; this.$viewValue = Number.NaN, this.$modelValue = Number.NaN, this.$$rawModelValue = void 0, this.$validators = {}, this.$asyncValidators = {}, this.$parsers = [], this.$formatters = [], this.$viewChangeListeners = [], this.$untouched = !0, this.$touched = !1, this.$pristine = !0, this.$dirty = !1, this.$valid = !0, this.$invalid = !1, this.$error = {}, this.$$success = {}, this.$pending = void 0, this.$name = l(n.name || "", !1)(e), this.$$parentForm = Ri, this.$options = Ka, this.$$updateEvents = "", this.$$updateEventHandler = this.$$updateEventHandler.bind(this), this.$$parsedNgModel = i(n.ngModel), this.$$parsedNgModelAssign = this.$$parsedNgModel.assign, this.$$ngModelGet = this.$$parsedNgModel, this.$$ngModelSet = this.$$parsedNgModelAssign, this.$$pendingDebounce = null, this.$$parserValid = void 0, this.$$currentValidationRunId = 0, Object.defineProperty(this, "$$scope", { value: e }), this.$$attr = n, this.$$element = r, this.$$animate = a, this.$$timeout = o, this.$$parse = i, this.$$q = s, this.$$exceptionHandler = t, Wi(this), (c = this).$$scope.$watch((function (e) { var t = c.$$ngModelGet(e); return t === c.$modelValue || c.$modelValue != c.$modelValue && t != t || c.$$setModelValue(t), t })) } Ga.$inject = ["$scope", "$exceptionHandler", "$attrs", "$element", "$parse", "$animate", "$timeout", "$q", "$interpolate"], Ga.prototype = { $$initGetterSetters: function () { if (this.$options.getOption("getterSetter")) { var e = this.$$parse(this.$$attr.ngModel + "()"), t = this.$$parse(this.$$attr.ngModel + "($$$p)"); this.$$ngModelGet = function (t) { var n = this.$$parsedNgModel(t); return G(n) && (n = e(t)), n }, this.$$ngModelSet = function (e, n) { G(this.$$parsedNgModel(e)) ? t(e, { $$$p: n }) : this.$$parsedNgModelAssign(e, n) } } else if (!this.$$parsedNgModel.assign) throw Wa("nonassign", "Expression '{0}' is non-assignable. Element: {1}", this.$$attr.ngModel, be(this.$$element)) }, $render: F, $isEmpty: function (e) { return V(e) || "" === e || null === e || e != e }, $$updateEmptyClasses: function (e) { this.$isEmpty(e) ? (this.$$animate.removeClass(this.$$element, za), this.$$animate.addClass(this.$$element, Ha)) : (this.$$animate.removeClass(this.$$element, Ha), this.$$animate.addClass(this.$$element, za)) }, $setPristine: function () { this.$dirty = !1, this.$pristine = !0, this.$$animate.removeClass(this.$$element, qa), this.$$animate.addClass(this.$$element, ja) }, $setDirty: function () { this.$dirty = !0, this.$pristine = !1, this.$$animate.removeClass(this.$$element, ja), this.$$animate.addClass(this.$$element, qa), this.$$parentForm.$setDirty() }, $setUntouched: function () { this.$touched = !1, this.$untouched = !0, this.$$animate.setClass(this.$$element, Ua, Ba) }, $setTouched: function () { this.$touched = !0, this.$untouched = !1, this.$$animate.setClass(this.$$element, Ba, Ua) }, $rollbackViewValue: function () { this.$$timeout.cancel(this.$$pendingDebounce), this.$viewValue = this.$$lastCommittedViewValue, this.$render() }, $validate: function () { if (!O(this.$modelValue)) { var e = this.$$lastCommittedViewValue, t = this.$$rawModelValue, n = this.$valid, r = this.$modelValue, i = this.$options.getOption("allowInvalid"), a = this; this.$$runValidators(t, e, (function (e) { i || n === e || (a.$modelValue = e ? t : void 0, a.$modelValue !== r && a.$$writeModelToScope()) })) } }, $$runValidators: function (e, t, n) { this.$$currentValidationRunId++; var r, i, a = this.$$currentValidationRunId, o = this; (function () { var e = o.$$parserName || "parse"; if (!V(o.$$parserValid)) return o.$$parserValid || (C(o.$validators, (function (e, t) { s(t, null) })), C(o.$asyncValidators, (function (e, t) { s(t, null) }))), s(e, o.$$parserValid), o.$$parserValid; s(e, null); return !0 })() ? !function () { var n = !0; if (C(o.$validators, (function (r, i) { var a = Boolean(r(e, t)); n = n && a, s(i, a) })), !n) return C(o.$asyncValidators, (function (e, t) { s(t, null) })), !1; return !0 }() ? l(!1) : (r = [], i = !0, C(o.$asyncValidators, (function (n, a) { var o = n(e, t); if (!Z(o)) throw Wa("nopromise", "Expected asynchronous validator to return a promise but got '{0}' instead.", o); s(a, void 0), r.push(o.then((function () { s(a, !0) }), (function () { i = !1, s(a, !1) }))) })), r.length ? o.$$q.all(r).then((function () { l(i) }), F) : l(!0)) : l(!1); function s(e, t) { a === o.$$currentValidationRunId && o.$setValidity(e, t) } function l(e) { a === o.$$currentValidationRunId && n(e) } }, $commitViewValue: function () { var e = this.$viewValue; this.$$timeout.cancel(this.$$pendingDebounce), (this.$$lastCommittedViewValue !== e || "" === e && this.$$hasNativeValidators) && (this.$$updateEmptyClasses(e), this.$$lastCommittedViewValue = e, this.$pristine && this.$setDirty(), this.$$parseAndValidate()) }, $$parseAndValidate: function () { var e = this.$$lastCommittedViewValue, t = this; if (this.$$parserValid = !V(e) || void 0, this.$$parserValid) for (var n = 0; n < this.$parsers.length; n++)if (V(e = this.$parsers[n](e))) { this.$$parserValid = !1; break } O(this.$modelValue) && (this.$modelValue = this.$$ngModelGet(this.$$scope)); var r = this.$modelValue, i = this.$options.getOption("allowInvalid"); function a() { t.$modelValue !== r && t.$$writeModelToScope() } this.$$rawModelValue = e, i && (this.$modelValue = e, a()), this.$$runValidators(e, this.$$lastCommittedViewValue, (function (n) { i || (t.$modelValue = n ? e : void 0, a()) })) }, $$writeModelToScope: function () { this.$$ngModelSet(this.$$scope, this.$modelValue), C(this.$viewChangeListeners, (function (e) { try { e() } catch (e) { this.$$exceptionHandler(e) } }), this) }, $setViewValue: function (e, t) { this.$viewValue = e, this.$options.getOption("updateOnDefault") && this.$$debounceViewValueCommit(t) }, $$debounceViewValueCommit: function (e) { var t = this.$options.getOption("debounce"); B(t[e]) ? t = t[e] : B(t.default) && (t = t.default), this.$$timeout.cancel(this.$$pendingDebounce); var n = this; t > 0 ? this.$$pendingDebounce = this.$$timeout((function () { n.$commitViewValue() }), t) : this.$$scope.$root.$$phase ? this.$commitViewValue() : this.$$scope.$apply((function () { n.$commitViewValue() })) }, $overrideModelOptions: function (e) { this.$options = this.$options.createChild(e), this.$$setUpdateOnEvents() }, $processModelValue: function () { var e = this.$$format(); this.$viewValue !== e && (this.$$updateEmptyClasses(e), this.$viewValue = this.$$lastCommittedViewValue = e, this.$render(), this.$$runValidators(this.$modelValue, this.$viewValue, F)) }, $$format: function () { for (var e = this.$formatters, t = e.length, n = this.$modelValue; t--;)n = e[t](n); return n }, $$setModelValue: function (e) { this.$modelValue = this.$$rawModelValue = e, this.$$parserValid = void 0, this.$processModelValue() }, $$setUpdateOnEvents: function () { this.$$updateEvents && this.$$element.off(this.$$updateEvents, this.$$updateEventHandler), this.$$updateEvents = this.$options.getOption("updateOn"), this.$$updateEvents && this.$$element.on(this.$$updateEvents, this.$$updateEventHandler) }, $$updateEventHandler: function (e) { this.$$debounceViewValueCommit(e && e.type) } }, Gi({ clazz: Ga, set: function (e, t) { e[t] = !0 }, unset: function (e, t) { delete e[t] } }); var Ka, Ja = ["$rootScope", function (e) { return { restrict: "A", require: ["ngModel", "^?form", "^?ngModelOptions"], controller: Ga, priority: 1, compile: function (t) { return t.addClass(ja).addClass(Ua).addClass(Va), { pre: function (e, t, n, r) { var i = r[0], a = r[1] || i.$$parentForm, o = r[2]; o && (i.$options = o.$options), i.$$initGetterSetters(), a.$addControl(i), n.$observe("name", (function (e) { i.$name !== e && i.$$parentForm.$$renameControl(i, e) })), e.$on("$destroy", (function () { i.$$parentForm.$removeControl(i) })) }, post: function (t, n, r, i) { var a = i[0]; function o() { a.$setTouched() } a.$$setUpdateOnEvents(), n.on("blur", (function () { a.$touched || (e.$$phase ? t.$evalAsync(o) : t.$apply(o)) })) } } } } }], Qa = /(\s+|^)default(\s+|$)/; function Ya(e) { this.$$options = e } Ya.prototype = { getOption: function (e) { return this.$$options[e] }, createChild: function (e) { var t = !1; return C(e = A({}, e), (function (n, r) { "$inherit" === n ? "*" === r ? t = !0 : (e[r] = this.$$options[r], "updateOn" === r && (e.updateOnDefault = this.$$options.updateOnDefault)) : "updateOn" === r && (e.updateOnDefault = !1, e[r] = ee(n.replace(Qa, (function () { return e.updateOnDefault = !0, " " })))) }), this), t && (delete e["*"], Xa(e, this.$$options)), Xa(e, Ka.$$options), new Ya(e) } }, Ka = new Ya({ updateOn: "", updateOnDefault: !0, debounce: 0, getterSetter: !1, allowInvalid: !1, timezone: null }); var Za = function () { function e(e, t) { this.$$attrs = e, this.$$scope = t } return e.$inject = ["$attrs", "$scope"], e.prototype = { $onInit: function () { var e = this.parentCtrl ? this.parentCtrl.$options : Ka, t = this.$$scope.$eval(this.$$attrs.ngModelOptions); this.$options = e.createChild(t) } }, { restrict: "A", priority: 10, require: { parentCtrl: "?^^ngModelOptions" }, bindToController: !0, controller: e } }; function Xa(e, t) { C(t, (function (t, n) { R(e[n]) || (e[n] = t) })) } var eo = Ni({ terminal: !0, priority: 1e3 }), to = i("ngOptions"), no = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/, ro = ["$compile", "$document", "$parse", function (t, n, r) { var i = e.document.createElement("option"), a = e.document.createElement("optgroup"); return { restrict: "A", terminal: !0, require: ["select", "ngModel"], link: { pre: function (e, t, n, r) { r[0].registerOption = F }, post: function (e, o, s, l) { for (var c = l[0], u = l[1], f = s.multiple, p = 0, h = o.children(), m = h.length; p < m; p++)if ("" === h[p].value) { c.hasEmptyOption = !0, c.emptyOption = h.eq(p); break } o.empty(); var g, v = !!c.emptyOption; d(i.cloneNode(!1)).val("?"); var $ = function (e, t, n) { var i = e.match(no); if (!i) throw to("iexp", "Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}", e, be(t)); var a = i[5] || i[7], o = i[6], s = / as /.test(i[0]) && i[1], l = i[9], c = r(i[2] ? i[1] : a), u = s && r(s) || c, d = l && r(l), f = l ? function (e, t) { return d(n, t) } : function (e) { return Lt(e) }, p = function (e, t) { return f(e, y(e, t)) }, h = r(i[2] || i[1]), m = r(i[3] || ""), g = r(i[4] || ""), v = r(i[8]), $ = {}, y = o ? function (e, t) { return $[o] = t, $[a] = e, $ } : function (e) { return $[a] = e, $ }; function b(e, t, n, r, i) { this.selectValue = e, this.viewValue = t, this.label = n, this.group = r, this.disabled = i } function w(e) { var t; if (!o && S(e)) t = e; else for (var n in t = [], e) e.hasOwnProperty(n) && "$" !== n.charAt(0) && t.push(n); return t } return { trackBy: l, getTrackByValue: p, getWatchables: r(v, (function (e) { for (var t = [], r = w(e = e || []), a = r.length, o = 0; o < a; o++) { var s = e === r ? o : r[o], l = e[s], c = y(l, s), u = f(l, c); if (t.push(u), i[2] || i[1]) { var d = h(n, c); t.push(d) } if (i[4]) { var p = g(n, c); t.push(p) } } return t })), getOptions: function () { for (var e = [], t = {}, r = v(n) || [], i = w(r), a = i.length, o = 0; o < a; o++) { var s = r === i ? o : i[o], c = r[s], d = y(c, s), $ = u(n, d), S = f($, d), C = new b(S, $, h(n, d), m(n, d), g(n, d)); e.push(C), t[S] = C } return { items: e, selectValueMap: t, getOptionFromViewValue: function (e) { return t[p(e)] }, getViewValueFromOption: function (e) { return l ? oe(e.viewValue) : e.viewValue } } } } }(s.ngOptions, o, e), y = n[0].createDocumentFragment(); function b(e, t) { var n = i.cloneNode(!1); t.appendChild(n), function (e, t) { e.element = t, t.disabled = e.disabled, e.label !== t.label && (t.label = e.label, t.textContent = e.label); t.value = e.selectValue }(e, n) } function w(e) { var t = g.getOptionFromViewValue(e), n = t && t.element; return n && !n.selected && (n.selected = !0), t } c.generateUnknownOptionValue = function (e) { return "?" }, f ? (c.writeValue = function (e) { if (g) { var t = e && e.map(w) || []; g.items.forEach((function (e) { e.element.selected && !ie(t, e) && (e.element.selected = !1) })) } }, c.readValue = function () { var e = o.val() || [], t = []; return C(e, (function (e) { var n = g.selectValueMap[e]; n && !n.disabled && t.push(g.getViewValueFromOption(n)) })), t }, $.trackBy && e.$watchCollection((function () { if (z(u.$viewValue)) return u.$viewValue.map((function (e) { return $.getTrackByValue(e) })) }), (function () { u.$render() }))) : (c.writeValue = function (e) { if (g) { var t = o[0].options[o[0].selectedIndex], n = g.getOptionFromViewValue(e); t && t.removeAttribute("selected"), n ? (o[0].value !== n.selectValue && (c.removeUnknownOption(), o[0].value = n.selectValue, n.element.selected = !0), n.element.setAttribute("selected", "selected")) : c.selectUnknownOrEmptyOption(e) } }, c.readValue = function () { var e = g.selectValueMap[o.val()]; return e && !e.disabled ? (c.unselectEmptyOption(), c.removeUnknownOption(), g.getViewValueFromOption(e)) : null }, $.trackBy && e.$watch((function () { return $.getTrackByValue(u.$viewValue) }), (function () { u.$render() }))), v && (t(c.emptyOption)(e), o.prepend(c.emptyOption), c.emptyOption[0].nodeType === He ? (c.hasEmptyOption = !1, c.registerOption = function (e, t) { "" === t.val() && (c.hasEmptyOption = !0, c.emptyOption = t, c.emptyOption.removeClass("ng-scope"), u.$render(), t.on("$destroy", (function () { var e = c.$isEmptyOptionSelected(); c.hasEmptyOption = !1, c.emptyOption = void 0, e && u.$render() }))) }) : c.emptyOption.removeClass("ng-scope")), e.$watchCollection($.getWatchables, (function () { var e = g && c.readValue(); if (g) for (var t = g.items.length - 1; t >= 0; t--) { var n = g.items[t]; R(n.group) ? Et(n.element.parentNode) : Et(n.element) } g = $.getOptions(); var r = {}; if (g.items.forEach((function (e) { var t; R(e.group) ? ((t = r[e.group]) || (t = a.cloneNode(!1), y.appendChild(t), t.label = null === e.group ? "null" : e.group, r[e.group] = t), b(e, t)) : b(e, y) })), o[0].appendChild(y), u.$render(), !u.$isEmpty(e)) { var i = c.readValue(); ($.trackBy || f ? le(e, i) : e === i) || (u.$setViewValue(i), u.$render()) } })) } } } }], io = ["$locale", "$interpolate", "$log", function (e, t, n) { var r = /{}/g, i = /^when(Minus)?(.+)$/; return { link: function (a, o, s) { var c, u = s.count, d = s.$attr.when && o.attr(s.$attr.when), f = s.offset || 0, p = a.$eval(d) || {}, h = {}, m = t.startSymbol(), g = t.endSymbol(), v = m + u + "-" + f + g, $ = b.noop; function y(e) { o.text(e || "") } C(s, (function (e, t) { var n = i.exec(t); if (n) { var r = (n[1] ? "-" : "") + l(n[2]); p[r] = o.attr(s.$attr[t]) } })), C(p, (function (e, n) { h[n] = t(e.replace(r, v)) })), a.$watch(u, (function (t) { var r = parseFloat(t), i = O(r); if (i || r in p || (r = e.pluralCat(r - f)), !(r === c || i && O(c))) { $(); var o = h[r]; V(o) ? (null != t && n.debug("ngPluralize: no rule defined for '" + r + "' in " + d), $ = F, y()) : $ = a.$watch(o, y), c = r } })) } } }], ao = ["$parse", "$animate", "$compile", function (e, t, n) { var r = "$$NG_REMOVED", a = i("ngRepeat"), o = function (e, t, n, r, i, a, o) { e[n] = r, i && (e[i] = a), e.$index = t, e.$first = 0 === t, e.$last = t === o - 1, e.$middle = !(e.$first || e.$last), e.$odd = !(e.$even = 0 == (1 & t)) }, l = function (e) { return e.clone[0] }, c = function (e) { return e.clone[e.clone.length - 1] }; return { restrict: "A", multiElement: !0, transclude: "element", priority: 1e3, terminal: !0, $$tlb: !0, compile: function (i, u) { var d = u.ngRepeat, f = n.$$createComment("end ngRepeat", d), p = d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); if (!p) throw a("iexp", "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.", d); var h = p[1], m = p[2], g = p[3], v = p[4]; if (!(p = h.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/))) throw a("iidexp", "'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.", h); var $, y, b, w, x = p[3] || p[1], k = p[2]; if (g && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(g) || /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(g))) throw a("badident", "alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.", g); var D = { $id: Lt }; return v ? $ = e(v) : (b = function (e, t) { return Lt(t) }, w = function (e) { return e }), function (e, n, i, u, p) { $ && (y = function (t, n, r) { return k && (D[k] = t), D[x] = n, D.$index = r, $(e, D) }); var h = je(); e.$watchCollection(m, (function (i) { var u, m, v, $, D, E, T, A, I, M, O, P, F = n[0], _ = je(); if (g && (e[g] = i), S(i)) I = i, A = y || b; else for (var N in A = y || w, I = [], i) s.call(i, N) && "$" !== N.charAt(0) && I.push(N); for ($ = I.length, O = new Array($), u = 0; u < $; u++)if (D = i === I ? u : I[u], E = i[D], T = A(D, E, u), h[T]) M = h[T], delete h[T], _[T] = M, O[u] = M; else { if (_[T]) throw C(O, (function (e) { e && e.scope && (h[e.id] = e) })), a("dupes", "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}", d, T, E); O[u] = { id: T, scope: void 0, clone: void 0 }, _[T] = !0 } for (var L in h) { if (P = Re((M = h[L]).clone), t.leave(P), P[0].parentNode) for (u = 0, m = P.length; u < m; u++)P[u][r] = !0; M.scope.$destroy() } for (u = 0; u < $; u++)if (D = i === I ? u : I[u], E = i[D], (M = O[u]).scope) { v = F; do { v = v.nextSibling } while (v && v[r]); l(M) !== v && t.move(Re(M.clone), null, F), F = c(M), o(M.scope, u, x, E, k, D, $) } else p((function (e, n) { M.scope = n; var r = f.cloneNode(!1); e[e.length++] = r, t.enter(e, null, F), F = r, M.clone = e, _[M.id] = M, o(M.scope, u, x, E, k, D, $) })); h = _ })) } } } }], oo = "ng-hide", so = "ng-hide-animate", lo = ["$animate", function (e) { return { restrict: "A", multiElement: !0, link: function (t, n, r) { t.$watch(r.ngShow, (function (t) { e[t ? "removeClass" : "addClass"](n, oo, { tempClasses: so }) })) } } }], co = ["$animate", function (e) { return { restrict: "A", multiElement: !0, link: function (t, n, r) { t.$watch(r.ngHide, (function (t) { e[t ? "addClass" : "removeClass"](n, oo, { tempClasses: so }) })) } } }], uo = Ni((function (e, t, n) { e.$watch(n.ngStyle, (function (e, n) { n && e !== n && C(n, (function (e, n) { t.css(n, "") })), e && t.css(e) }), !0) })), fo = ["$animate", "$compile", function (e, t) { return { require: "ngSwitch", controller: ["$scope", function () { this.cases = {} }], link: function (n, r, i, a) { var o = i.ngSwitch || i.on, s = [], l = [], c = [], u = [], d = function (e, t) { return function (n) { !1 !== n && e.splice(t, 1) } }; n.$watch(o, (function (n) { for (var r, i; c.length;)e.cancel(c.pop()); for (r = 0, i = u.length; r < i; ++r) { var o = Re(l[r].clone); u[r].$destroy(), (c[r] = e.leave(o)).done(d(c, r)) } l.length = 0, u.length = 0, (s = a.cases["!" + n] || a.cases["?"]) && C(s, (function (n) { n.transclude((function (r, i) { u.push(i); var a = n.element; r[r.length++] = t.$$createComment("end ngSwitchWhen"); var o = { clone: r }; l.push(o), e.enter(r, a.parent(), a) })) })) })) } } }], po = Ni({ transclude: "element", priority: 1200, require: "^ngSwitch", multiElement: !0, link: function (e, t, n, r, i) { var a = n.ngSwitchWhen.split(n.ngSwitchWhenSeparator).sort().filter((function (e, t, n) { return n[t - 1] !== e })); C(a, (function (e) { r.cases["!" + e] = r.cases["!" + e] || [], r.cases["!" + e].push({ transclude: i, element: t }) })) } }), ho = Ni({ transclude: "element", priority: 1200, require: "^ngSwitch", multiElement: !0, link: function (e, t, n, r, i) { r.cases["?"] = r.cases["?"] || [], r.cases["?"].push({ transclude: i, element: t }) } }), mo = i("ngTransclude"), go = ["$compile", function (e) { return { restrict: "EAC", compile: function (t) { var n = e(t.contents()); return t.empty(), function (e, t, r, i, a) { if (!a) throw mo("orphan", "Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}", be(t)); r.ngTransclude === r.$attr.ngTransclude && (r.ngTransclude = ""); var o = r.ngTransclude || r.ngTranscludeSlot; function s() { n(e, (function (e) { t.append(e) })) } a((function (e, n) { e.length && function (e) { for (var t = 0, n = e.length; t < n; t++) { var r = e[t]; if (r.nodeType !== Be || r.nodeValue.trim()) return !0 } }(e) ? t.append(e) : (s(), n.$destroy()) }), null, o), o && !a.isSlotFilled(o) && s() } } } }], vo = ["$templateCache", function (e) { return { restrict: "E", terminal: !0, compile: function (t, n) { if ("text/ng-template" === n.type) { var r = n.id, i = t[0].text; e.put(r, i) } } } }], $o = { $setViewValue: F, $render: F }; function yo(e, t) { e.prop("selected", t), e.attr("selected", t) } var bo = ["$element", "$scope", function (t, n) { var r = this, i = new jt; r.selectValueMap = {}, r.ngModelCtrl = $o, r.multiple = !1, r.unknownOption = d(e.document.createElement("option")), r.hasEmptyOption = !1, r.emptyOption = void 0, r.renderUnknownOption = function (e) { var n = r.generateUnknownOptionValue(e); r.unknownOption.val(n), t.prepend(r.unknownOption), yo(r.unknownOption, !0), t.val(n) }, r.updateUnknownOption = function (e) { var n = r.generateUnknownOptionValue(e); r.unknownOption.val(n), yo(r.unknownOption, !0), t.val(n) }, r.generateUnknownOptionValue = function (e) { return "? " + Lt(e) + " ?" }, r.removeUnknownOption = function () { r.unknownOption.parent() && r.unknownOption.remove() }, r.selectEmptyOption = function () { r.emptyOption && (t.val(""), yo(r.emptyOption, !0)) }, r.unselectEmptyOption = function () { r.hasEmptyOption && yo(r.emptyOption, !1) }, n.$on("$destroy", (function () { r.renderUnknownOption = F })), r.readValue = function () { var e = t.val(), n = e in r.selectValueMap ? r.selectValueMap[e] : e; return r.hasOption(n) ? n : null }, r.writeValue = function (e) { var n = t[0].options[t[0].selectedIndex]; if (n && yo(d(n), !1), r.hasOption(e)) { r.removeUnknownOption(); var i = Lt(e); t.val(i in r.selectValueMap ? i : e); var a = t[0].options[t[0].selectedIndex]; yo(d(a), !0) } else r.selectUnknownOrEmptyOption(e) }, r.addOption = function (e, t) { if (t[0].nodeType !== He) { Le(e, '"option value"'), "" === e && (r.hasEmptyOption = !0, r.emptyOption = t); var n = i.get(e) || 0; i.set(e, n + 1), o() } }, r.removeOption = function (e) { var t = i.get(e); t && (1 === t ? (i.delete(e), "" === e && (r.hasEmptyOption = !1, r.emptyOption = void 0)) : i.set(e, t - 1)) }, r.hasOption = function (e) { return !!i.get(e) }, r.$hasEmptyOption = function () { return r.hasEmptyOption }, r.$isUnknownOptionSelected = function () { return t[0].options[0] === r.unknownOption[0] }, r.$isEmptyOptionSelected = function () { return r.hasEmptyOption && t[0].options[t[0].selectedIndex] === r.emptyOption[0] }, r.selectUnknownOrEmptyOption = function (e) { null == e && r.emptyOption ? (r.removeUnknownOption(), r.selectEmptyOption()) : r.unknownOption.parent().length ? r.updateUnknownOption(e) : r.renderUnknownOption(e) }; var a = !1; function o() { a || (a = !0, n.$$postDigest((function () { a = !1, r.ngModelCtrl.$render() }))) } var s = !1; function l(e) { s || (s = !0, n.$$postDigest((function () { n.$$destroyed || (s = !1, r.ngModelCtrl.$setViewValue(r.readValue()), e && r.ngModelCtrl.$render()) }))) } r.registerOption = function (e, t, n, i, a) { if (n.$attr.ngValue) { var s, c = NaN; n.$observe("value", (function (e) { var n, i = t.prop("selected"); R(c) && (r.removeOption(s), delete r.selectValueMap[c], n = !0), c = Lt(e), s = e, r.selectValueMap[c] = e, r.addOption(e, t), t.attr("value", c), n && i && l() })) } else i ? n.$observe("value", (function (e) { var n; r.readValue(); var i = t.prop("selected"); R(s) && (r.removeOption(s), n = !0), s = e, r.addOption(e, t), n && i && l() })) : a ? e.$watch(a, (function (e, i) { n.$set("value", e); var a = t.prop("selected"); i !== e && r.removeOption(i), r.addOption(e, t), i && a && l() })) : r.addOption(n.value, t); n.$observe("disabled", (function (e) { ("true" === e || e && t.prop("selected")) && (r.multiple ? l(!0) : (r.ngModelCtrl.$setViewValue(null), r.ngModelCtrl.$render())) })), t.on("$destroy", (function () { var e = r.readValue(), t = n.value; r.removeOption(t), o(), (r.multiple && e && -1 !== e.indexOf(t) || e === t) && l(!0) })) } }], wo = function () { return { restrict: "E", require: ["select", "?ngModel"], controller: bo, priority: 1, link: { pre: function (e, t, n, r) { var i = r[0], a = r[1]; if (!a) return void (i.registerOption = F); if (i.ngModelCtrl = a, t.on("change", (function () { i.removeUnknownOption(), e.$apply((function () { a.$setViewValue(i.readValue()) })) })), n.multiple) { i.multiple = !0, i.readValue = function () { var e = []; return C(t.find("option"), (function (t) { if (t.selected && !t.disabled) { var n = t.value; e.push(n in i.selectValueMap ? i.selectValueMap[n] : n) } })), e }, i.writeValue = function (e) { C(t.find("option"), (function (t) { var n = !!e && (ie(e, t.value) || ie(e, i.selectValueMap[t.value])); n !== t.selected && yo(d(t), n) })) }; var o, s = NaN; e.$watch((function () { s !== a.$viewValue || le(o, a.$viewValue) || (o = Ge(a.$viewValue), a.$render()), s = a.$viewValue })), a.$isEmpty = function (e) { return !e || 0 === e.length } } }, post: function (e, t, n, r) { var i = r[1]; if (!i) return; var a = r[0]; i.$render = function () { a.writeValue(i.$viewValue) } } } } }, So = ["$interpolate", function (e) { return { restrict: "E", priority: 100, compile: function (t, n) { var r, i; return R(n.ngValue) || (R(n.value) ? r = e(n.value, !0) : (i = e(t.text(), !0)) || n.$set("value", t.text())), function (e, t, n) { var a = "$selectController", o = t.parent(), s = o.data(a) || o.parent().data(a); s && s.registerOption(e, t, n, r, i) } } } }], Co = function () { return { restrict: "A", require: "?ngModel", link: function (e, t, n, r) { r && (n.required = !0, r.$validators.required = function (e, t) { return !n.required || !r.$isEmpty(t) }, n.$observe("required", (function () { r.$validate() }))) } } }, xo = function () { return { restrict: "A", require: "?ngModel", link: function (e, t, n, r) { if (r) { var a, o = n.ngPattern || n.pattern; n.$observe("pattern", (function (e) { if (U(e) && e.length > 0 && (e = new RegExp("^" + e + "$")), e && !e.test) throw i("ngPattern")("noregexp", "Expected {0} to be a RegExp but was {1}. Element: {2}", o, e, be(t)); a = e || void 0, r.$validate() })), r.$validators.pattern = function (e, t) { return r.$isEmpty(t) || V(a) || a.test(t) } } } } }, ko = function () { return { restrict: "A", require: "?ngModel", link: function (e, t, n, r) { if (r) { var i = -1; n.$observe("maxlength", (function (e) { var t = M(e); i = O(t) ? -1 : t, r.$validate() })), r.$validators.maxlength = function (e, t) { return i < 0 || r.$isEmpty(t) || t.length <= i } } } } }, Do = function () { return { restrict: "A", require: "?ngModel", link: function (e, t, n, r) { if (r) { var i = 0; n.$observe("minlength", (function (e) { i = M(e) || 0, r.$validate() })), r.$validators.minlength = function (e, t) { return r.$isEmpty(t) || t.length >= i } } } } }; e.angular.bootstrap ? e.console && console.log("WARNING: Tried to load AngularJS more than once.") : (!function () { var t; if (!Fe) { var n = ue(); (f = V(n) ? e.jQuery : n ? e[n] : void 0) && f.fn.on ? (d = f, A(f.fn, { scope: At.scope, isolateScope: At.isolateScope, controller: At.controller, injector: At.injector, inheritedData: At.inheritedData }), t = f.cleanData, f.cleanData = function (e) { for (var n, r, i = 0; null != (r = e[i]); i++)(n = f._data(r, "events")) && n.$destroy && f(r).triggerHandler("$destroy"); t(e) }) : d = pt, b.element = d, Fe = !0 } }(), function (t) { A(t, { errorHandlingConfig: n, bootstrap: Ae, copy: oe, extend: A, merge: I, equals: le, element: d, forEach: C, injector: Qt, noop: F, bind: pe, toJson: me, fromJson: ge, identity: _, isUndefined: V, isDefined: R, isString: U, isFunction: G, isObject: j, isNumber: B, isElement: ne, isArray: z, version: Je, isDate: H, lowercase: l, uppercase: c, callbacks: { $$counter: 0 }, getTestability: Me, reloadWithDebugInfo: Ie, $$minErr: i, $$csp: ce, $$encodeUriSegment: xe, $$encodeUriQuery: ke, $$stringify: qe }), p = function (e) { var t = i("$injector"), n = i("ng"); function r(e, t, n) { return e[t] || (e[t] = n()) } var a = r(e, "angular", Object); return a.$$minErr = a.$$minErr || i, r(a, "module", (function () { var e = {}; return function (i, a, o) { var s = {}; return function (e, t) { if ("hasOwnProperty" === e) throw n("badname", "hasOwnProperty is not a valid {0} name", "module") }(i), a && e.hasOwnProperty(i) && (e[i] = null), r(e, i, (function () { if (!a) throw t("nomod", "Module '{0}' 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.", i); var e = [], r = [], l = [], c = d("$injector", "invoke", "push", r), u = { _invokeQueue: e, _configBlocks: r, _runBlocks: l, info: function (e) { if (R(e)) { if (!j(e)) throw n("aobj", "Argument '{0}' must be an object", "value"); return s = e, this } return s }, requires: a, name: i, provider: f("$provide", "provider"), factory: f("$provide", "factory"), service: f("$provide", "service"), value: d("$provide", "value"), constant: d("$provide", "constant", "unshift"), decorator: f("$provide", "decorator", r), animation: f("$animateProvider", "register"), filter: f("$filterProvider", "register"), controller: f("$controllerProvider", "register"), directive: f("$compileProvider", "directive"), component: f("$compileProvider", "component"), config: c, run: function (e) { return l.push(e), this } }; return o && c(o), u; function d(t, n, r, i) { return i || (i = e), function () { return i[r || "push"]([t, n, arguments]), u } } function f(t, n, r) { return r || (r = e), function (e, a) { return a && G(a) && (a.$$moduleName = i), r.push([t, n, arguments]), u } } })) } })) }(e), p("ng", ["ngLocale"], ["$provide", function (e) { e.provider({ $$sanitizeUri: Hr }), e.provider("$compile", mn).directive({ a: Li, input: $a, textarea: $a, form: Hi, script: vo, select: wo, option: So, ngBind: wa, ngBindHtml: Ca, ngBindTemplate: Sa, ngClass: Da, ngClassEven: Ta, ngClassOdd: Ea, ngCloak: Aa, ngController: Ia, ngForm: zi, ngHide: co, ngIf: Pa, ngInclude: Fa, ngInit: Na, ngNonBindable: eo, ngPluralize: io, ngRepeat: ao, ngShow: lo, ngStyle: uo, ngSwitch: fo, ngSwitchWhen: po, ngSwitchDefault: ho, ngOptions: ro, ngTransclude: go, ngModel: Ja, ngList: La, ngChange: xa, pattern: xo, ngPattern: xo, required: Co, ngRequired: Co, minlength: Do, ngMinlength: Do, maxlength: ko, ngMaxlength: ko, ngValue: ba, ngModelOptions: Za }).directive({ ngInclude: _a }).directive(Vi).directive(Ma), e.provider({ $anchorScroll: Yt, $animate: an, $animateCss: ln, $$animateJs: nn, $$animateQueue: rn, $$AnimateRunner: sn, $$animateAsyncRun: on, $browser: un, $cacheFactory: dn, $controller: kn, $document: Dn, $$isDocumentHidden: En, $exceptionHandler: Tn, $filter: ui, $$forceReflow: An, $interpolate: Kn, $interval: Jn, $http: Hn, $httpParamSerializer: Ln, $httpParamSerializerJQLike: Vn, $httpBackend: Wn, $xhrFactory: zn, $jsonpCallbacks: Qn, $location: hr, $log: mr, $parse: _r, $rootScope: Br, $q: Nr, $$q: Lr, $sce: Yr, $sceDelegate: Qr, $sniffer: Zr, $templateCache: fn, $templateRequest: ei, $$testability: ti, $timeout: ni, $window: si, $$rAF: Ur, $$jqLite: Nt, $$Map: qt, $$cookieReader: ci }) }]).info({ angularVersion: "1.6.9" }) }(b), b.module("ngLocale", [], ["$provide", function (e) { var t = "one", n = "other"; e.value("$locale", { DATETIME_FORMATS: { AMPMS: ["AM", "PM"], DAY: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], ERANAMES: ["Before Christ", "Anno Domini"], ERAS: ["BC", "AD"], FIRSTDAYOFWEEK: 6, MONTH: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], SHORTDAY: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], SHORTMONTH: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], STANDALONEMONTH: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], WEEKENDRANGE: [5, 6], fullDate: "EEEE, MMMM d, y", longDate: "MMMM d, y", medium: "MMM d, y h:mm:ss a", mediumDate: "MMM d, y", mediumTime: "h:mm:ss a", short: "M/d/yy h:mm a", shortDate: "M/d/yy", shortTime: "h:mm a" }, NUMBER_FORMATS: { CURRENCY_SYM: "$", DECIMAL_SEP: ".", GROUP_SEP: ",", PATTERNS: [{ gSize: 3, lgSize: 3, maxFrac: 3, minFrac: 0, minInt: 1, negPre: "-", negSuf: "", posPre: "", posSuf: "" }, { gSize: 3, lgSize: 3, maxFrac: 2, minFrac: 2, minInt: 1, negPre: "-¤", negSuf: "", posPre: "¤", posSuf: "" }] }, id: "en-us", localeID: "en_US", pluralCat: function (e, r) { var i = 0 | e, a = function (e, t) { var n = t; void 0 === n && (n = Math.min(function (e) { var t = (e += "").indexOf("."); return -1 == t ? 0 : e.length - t - 1 }(e), 3)); var r = Math.pow(10, n); return { v: n, f: (e * r | 0) % r } }(e, r); return 1 == i && 0 == a.v ? t : n } }) }]), d((function () { Te(e.document, Ae) }))) }(window), !window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),
    /**
     * @license AngularJS v1.6.9
     * (c) 2010-2018 Google, Inc. http://angularjs.org
     * License: MIT
     */
    function (e, t) { "use strict"; var n, r, i, a, o = 1, s = "-add", l = "-remove", c = "ng-animate", u = "$$ngAnimateChildren"; void 0 === e.ontransitionend && void 0 !== e.onwebkittransitionend ? ("-webkit-", n = "WebkitTransition", r = "webkitTransitionEnd transitionend") : (n = "transition", r = "transitionend"), void 0 === e.onanimationend && void 0 !== e.onwebkitanimationend ? ("-webkit-", i = "WebkitAnimation", a = "webkitAnimationEnd animationend") : (i = "animation", a = "animationend"); var d = "Duration", f = "Property", p = "Delay", h = "TimingFunction", m = i + p, g = i + d, v = n + p, $ = n + d, y = t.$$minErr("ng"); function b(e, t, n) { if (!e) throw y("areq", "Argument '{0}' is {1}", t || "?", n || "required"); return e } function w(e, t) { return e || t ? e ? t ? (Q(e) && (e = e.join(" ")), Q(t) && (t = t.join(" ")), e + " " + t) : e : t : "" } function S(e, t, n) { var r = ""; return e = Q(e) ? e : e && te(e) && e.length ? e.split(/\s+/) : [], J(e, (function (e, i) { e && e.length > 0 && (r += i > 0 ? " " : "", r += n ? t + e : e + t) })), r } function C(e) { if (e instanceof re) switch (e.length) { case 0: return e; case 1: if (e[0].nodeType === o) return e; break; default: return re(x(e)) }if (e.nodeType === o) return re(e) } function x(e) { if (!e[0]) return e; for (var t = 0; t < e.length; t++) { var n = e[t]; if (n.nodeType === o) return n } } function k(e) { return function (t, n) { n.addClass && (!function (e, t, n) { J(t, (function (t) { e.addClass(t, n) })) }(e, t, n.addClass), n.addClass = null), n.removeClass && (!function (e, t, n) { J(t, (function (t) { e.removeClass(t, n) })) }(e, t, n.removeClass), n.removeClass = null) } } function D(e) { if (!(e = e || {}).$$prepared) { var t = e.domOperation || ie; e.domOperation = function () { e.$$domOperationFired = !0, t(), t = ie }, e.$$prepared = !0 } return e } function E(e, t) { T(e, t), A(e, t) } function T(e, t) { t.from && (e.css(t.from), t.from = null) } function A(e, t) { t.to && (e.css(t.to), t.to = null) } function I(e, t, n) { var r = t.options || {}, i = n.options || {}, a = (r.addClass || "") + " " + (i.addClass || ""), o = (r.removeClass || "") + " " + (i.removeClass || ""), c = function (e, t, n) { var r = 1, i = -1, a = {}; e = c(e), t = c(t), J(t, (function (e, t) { a[t] = r })), n = c(n), J(n, (function (e, t) { a[t] = a[t] === r ? null : i })); var o = { addClass: "", removeClass: "" }; function c(e) { te(e) && (e = e.split(" ")); var t = {}; return J(e, (function (e) { e.length && (t[e] = !0) })), t } return J(a, (function (t, n) { var a, c; t === r ? (a = "addClass", c = !e[n] || e[n + l]) : t === i && (a = "removeClass", c = e[n] || e[n + s]), c && (o[a].length && (o[a] += " "), o[a] += n) })), o }(e.attr("class"), a, o); i.preparationClasses && (r.preparationClasses = _(i.preparationClasses, r.preparationClasses), delete i.preparationClasses); var u = r.domOperation !== ie ? r.domOperation : null; return K(r, i), u && (r.domOperation = u), c.addClass ? r.addClass = c.addClass : r.addClass = null, c.removeClass ? r.removeClass = c.removeClass : r.removeClass = null, t.addClass = r.addClass, t.removeClass = r.removeClass, r } function M(e) { return e instanceof re ? e[0] : e } function O(e, t) { var n = t ? "-" + t + "s" : ""; return F(e, [v, n]), [v, n] } function P(e, t) { var n = t ? "paused" : "", r = i + "PlayState"; return F(e, [r, n]), [r, n] } function F(e, t) { var n = t[0], r = t[1]; e.style[n] = r } function _(e, t) { return e ? t ? e + " " + t : e : t } var N = ["$interpolate", function (e) { return { link: function (t, n, r) { var i = r.ngAnimateChildren; function a(e) { e = "on" === e || "true" === e, n.data(u, e) } te(i) && 0 === i.length ? n.data(u, !0) : (a(e(i)(t)), r.$observe("ngAnimateChildren", a)) } } }], L = "$$animateCss", V = 1e3, R = { transitionDuration: $, transitionDelay: v, transitionProperty: n + f, animationDuration: g, animationDelay: m, animationIterationCount: i + "IterationCount" }, j = { transitionDuration: $, transitionDelay: v, animationDuration: g, animationDelay: m }; function q(e, t) { return [t ? m : v, e + "s"] } function U(e, t, n) { var r = Object.create(null), i = e.getComputedStyle(t) || {}; return J(n, (function (e, t) { var n, a, o = i[e]; if (o) { var s = o.charAt(0); ("-" === s || "+" === s || s >= 0) && (n = 0, a = o.split(/\s*,\s*/), J(a, (function (e) { "s" === e.charAt(e.length - 1) && (e = e.substring(0, e.length - 1)), e = parseFloat(e) || 0, n = n ? Math.max(e, n) : e })), o = n), 0 === o && (o = null), r[t] = o } })), r } function B(e) { return 0 === e || null != e } function H(e, t) { var r = n, i = e + "s"; return t ? r += d : i += " linear all", [r, i] } function z() { var e = Object.create(null); return { flush: function () { e = Object.create(null) }, count: function (t) { var n = e[t]; return n ? n.total : 0 }, get: function (t) { var n = e[t]; return n && n.value }, put: function (t, n) { e[t] ? e[t].total++ : e[t] = { total: 1, value: n } } } } function W(e, t, n) { J(n, (function (n) { e[n] = Y(e[n]) ? e[n] : t.style.getPropertyValue(n) })) } var G, K, J, Q, Y, Z, X, ee, te, ne, re, ie, ae = ["$animateProvider", function (e) { var t = z(), o = z(); this.$get = ["$window", "$$jqLite", "$$AnimateRunner", "$timeout", "$$forceReflow", "$sniffer", "$$rAFScheduler", "$$animateQueue", function (e, c, u, d, p, m, v, $) { var y = k(c), b = 0; function w(e, t) { var n = "$$ngAnimateParentKey", r = e.parentNode; return (r[n] || (r[n] = ++b)) + "-" + e.getAttribute("class") + "-" + t } var C = []; function x(e) { C.push(e), v.waitUntilQuiet((function () { t.flush(), o.flush(); for (var e = p(), n = 0; n < C.length; n++)C[n](e); C.length = 0 })) } function I(n, r, i) { var a = function (n, r, i, a) { var o = t.get(i); return o || "infinite" === (o = U(e, n, a)).animationIterationCount && (o.animationIterationCount = 1), t.put(i, o), o }(n, 0, i, R), o = a.animationDelay, s = a.transitionDelay; return a.maxDelay = o && s ? Math.max(o, s) : o || s, a.maxDuration = Math.max(a.animationDuration * a.animationIterationCount, a.transitionDuration), a } return function (p, v) { var b = v || {}; b.$$prepared || (b = D(G(b))); var C = {}, k = M(p); if (!k || !k.parentNode || !$.enabled()) return Me(); var _, N, R, z, K, Y, Z, X, ee, te, ne = [], re = p.attr("class"), ae = function (e) { var t = {}; return e && (e.to || e.from) && (t.to = e.to, t.from = e.from), t }(b), oe = []; if (0 === b.duration || !m.animations && !m.transitions) return Me(); var se = b.event && Q(b.event) ? b.event.join(" ") : b.event, le = "", ce = ""; se && b.structural ? le = S(se, "ng-", !0) : se && (le = se), b.addClass && (ce += S(b.addClass, s)), b.removeClass && (ce.length && (ce += " "), ce += S(b.removeClass, l)), b.applyClassesEarly && ce.length && y(p, b); var ue, de, fe, pe = [le, ce].join(" ").trim(), he = re + " " + pe, me = S(pe, "-active"), ge = ae.to && Object.keys(ae.to).length > 0; if (!((b.keyframeStyle || "").length > 0) && !ge && !pe) return Me(); if (b.stagger > 0) { var ve = parseFloat(b.stagger); de = { transitionDelay: ve, animationDelay: ve, transitionDuration: 0, animationDuration: 0 } } else ue = w(k, he), de = function (n, r, i, a) { var s; if (t.count(i) > 0 && !(s = o.get(i))) { var l = S(r, "-stagger"); c.addClass(n, l), (s = U(e, n, a)).animationDuration = Math.max(s.animationDuration, 0), s.transitionDuration = Math.max(s.transitionDuration, 0), c.removeClass(n, l), o.put(i, s) } return s || {} }(k, pe, ue, j); if (b.$$skipPreparationClasses || c.addClass(p, pe), b.transitionStyle) { var $e = [n, b.transitionStyle]; F(k, $e), ne.push($e) } if (b.duration >= 0) { fe = k.style[n].length > 0; var ye = H(b.duration, fe); F(k, ye), ne.push(ye) } if (b.keyframeStyle) { var be = [i, b.keyframeStyle]; F(k, be), ne.push(be) } var we = de ? b.staggerIndex >= 0 ? b.staggerIndex : t.count(ue) : 0, Se = 0 === we; Se && !b.skipBlocking && O(k, 9999); var Ce = I(k, 0, ue), xe = Ce.maxDelay; Y = Math.max(xe, 0), X = Ce.maxDuration; var ke, De = {}; if (De.hasTransitions = Ce.transitionDuration > 0, De.hasAnimations = Ce.animationDuration > 0, De.hasTransitionAll = De.hasTransitions && "all" === Ce.transitionProperty, De.applyTransitionDuration = ge && (De.hasTransitions && !De.hasTransitionAll || De.hasAnimations && !De.hasTransitions), De.applyAnimationDuration = b.duration && De.hasAnimations, De.applyTransitionDelay = B(b.delay) && (De.applyTransitionDuration || De.hasTransitions), De.applyAnimationDelay = B(b.delay) && De.hasAnimations, De.recalculateTimingStyles = ce.length > 0, (De.applyTransitionDuration || De.applyAnimationDuration) && (X = b.duration ? parseFloat(b.duration) : X, De.applyTransitionDuration && (De.hasTransitions = !0, Ce.transitionDuration = X, fe = k.style[n + f].length > 0, ne.push(H(X, fe))), De.applyAnimationDuration && (De.hasAnimations = !0, Ce.animationDuration = X, ne.push([g, X + "s"]))), 0 === X && !De.recalculateTimingStyles) return Me(); null != b.delay && ("boolean" != typeof b.delay && (ke = parseFloat(b.delay), Y = Math.max(ke, 0)), De.applyTransitionDelay && ne.push(q(ke)), De.applyAnimationDelay && ne.push(q(ke, !0))); return null == b.duration && Ce.transitionDuration > 0 && (De.recalculateTimingStyles = De.recalculateTimingStyles || Se), Z = Y * V, ee = X * V, b.skipBlocking || (De.blockTransition = Ce.transitionDuration > 0, De.blockKeyframeAnimation = Ce.animationDuration > 0 && de.animationDelay > 0 && 0 === de.animationDuration), b.from && (b.cleanupStyles && W(C, k, Object.keys(b.from)), T(p, b)), De.blockTransition || De.blockKeyframeAnimation ? Ie(X) : b.skipBlocking || O(k, !1), { $$willAnimate: !0, end: Ee, start: function () { if (!_) return z = new u(K = { end: Ee, cancel: Te, resume: null, pause: null }), x(Pe), z } }; function Ee() { Ae() } function Te() { Ae(!0) } function Ae(e) { if (!(_ || R && N)) { _ = !0, N = !1, b.$$skipPreparationClasses || c.removeClass(p, pe), c.removeClass(p, me), P(k, !1), O(k, !1), J(ne, (function (e) { k.style[e[0]] = "" })), y(p, b), E(p, b), Object.keys(C).length && J(C, (function (e, t) { e ? k.style.setProperty(t, e) : k.style.removeProperty(t) })), b.onDone && b.onDone(), oe && oe.length && p.off(oe.join(" "), Oe); var t = p.data(L); t && (d.cancel(t[0].timer), p.removeData(L)), z && z.complete(!e) } } function Ie(e) { De.blockTransition && O(k, e), De.blockKeyframeAnimation && P(k, !!e) } function Me() { return z = new u({ end: Ee, cancel: Te }), x(ie), Ae(), { $$willAnimate: !1, start: function () { return z }, end: Ee } } function Oe(e) { e.stopPropagation(); var t = e.originalEvent || e; if (t.target === k) { var n = t.$manualTimeStamp || Date.now(), r = parseFloat(t.elapsedTime.toFixed(3)); Math.max(n - te, 0) >= Z && r >= X && (R = !0, Ae()) } } function Pe() { if (!_) if (k.parentNode) { var e = function (e) { if (R) N && e && (N = !1, Ae()); else if (N = !e, Ce.animationDuration) { var t = P(k, N); N ? ne.push(t) : (r = t, i = (n = ne).indexOf(r), r >= 0 && n.splice(i, 1)) } var n, r, i }, t = we > 0 && (Ce.transitionDuration && 0 === de.transitionDuration || Ce.animationDuration && 0 === de.animationDuration) && Math.max(de.animationDelay, de.transitionDelay); t ? d(o, Math.floor(t * we * V), !1) : o(), K.resume = function () { e(!0) }, K.pause = function () { e(!1) } } else Ae(); function o() { if (!_) { if (Ie(!1), J(ne, (function (e) { var t = e[0], n = e[1]; k.style[t] = n })), y(p, b), c.addClass(p, me), De.recalculateTimingStyles) { if (he = k.getAttribute("class") + " " + pe, ue = w(k, he), Ce = I(k, 0, ue), xe = Ce.maxDelay, Y = Math.max(xe, 0), 0 === (X = Ce.maxDuration)) return void Ae(); De.hasTransitions = Ce.transitionDuration > 0, De.hasAnimations = Ce.animationDuration > 0 } if (De.applyAnimationDelay && (xe = "boolean" != typeof b.delay && B(b.delay) ? parseFloat(b.delay) : xe, Y = Math.max(xe, 0), Ce.animationDelay = xe, ke = q(xe, !0), ne.push(ke), k.style[ke[0]] = ke[1]), Z = Y * V, ee = X * V, b.easing) { var e, t = b.easing; De.hasTransitions && (e = n + h, ne.push([e, t]), k.style[e] = t), De.hasAnimations && (e = i + h, ne.push([e, t]), k.style[e] = t) } Ce.transitionDuration && oe.push(r), Ce.animationDuration && oe.push(a), te = Date.now(); var o = Z + 1.5 * ee, l = te + o, u = p.data(L) || [], f = !0; if (u.length) { var m = u[0]; (f = l > m.expectedEndTime) ? d.cancel(m.timer) : u.push(Ae) } if (f) { var g = d(s, o, !1); u[0] = { timer: g, expectedEndTime: l }, u.push(Ae), p.data(L, u) } oe.length && p.on(oe.join(" "), Oe), b.to && (b.cleanupStyles && W(C, k, Object.keys(b.to)), A(p, b)) } } function s() { var e = p.data(L); if (e) { for (var t = 1; t < e.length; t++)e[t](); p.removeData(L) } } } } }] }], oe = ["$$animationProvider", function (e) { e.drivers.push("$$animateCssDriver"); var t = "ng-animate-shim", n = "ng-anchor", r = "ng-anchor-out", i = "ng-anchor-in"; this.$get = ["$animateCss", "$rootScope", "$$AnimateRunner", "$rootElement", "$sniffer", "$$jqLite", "$document", function (e, a, o, s, l, c, u) { if (!l.animations && !l.transitions) return ie; var d, f = u[0].body, p = M(s), h = re((d = p).parentNode && 11 === d.parentNode.nodeType || f.contains(p) ? p : f); return function (a) { return a.from && a.to ? function (a, s, l, c) { var u = v(a), d = v(s), p = []; if (J(c, (function (a) { var s = function (a, s, l) { var c = re(M(s).cloneNode(!0)), u = m(b(c)); s.addClass(t), l.addClass(t), c.addClass(n), h.append(c); var d, p = y(); if (!p && !(d = w())) return S(); var v = p || d; return { start: function () { var e, t = v.start(); return t.done((function () { if (t = null, !d && (d = w())) return (t = d.start()).done((function () { t = null, S(), e.complete() })), t; S(), e.complete() })), e = new o({ end: n, cancel: n }); function n() { t && t.end() } } }; function $(e) { var t = {}, n = M(e).getBoundingClientRect(); return J(["width", "height", "top", "left"], (function (e) { var r = n[e]; switch (e) { case "top": r += f.scrollTop; break; case "left": r += f.scrollLeft }t[e] = Math.floor(r) + "px" })), t } function y() { var t = e(c, { addClass: r, delay: !0, from: $(s) }); return t.$$willAnimate ? t : null } function b(e) { return e.attr("class") || "" } function w() { var t = m(b(l)), n = g(t, u), a = g(u, t), o = e(c, { to: $(l), addClass: i + " " + n, removeClass: r + " " + a, delay: !0 }); return o.$$willAnimate ? o : null } function S() { c.remove(), s.removeClass(t), l.removeClass(t) } }(0, a.out, a.in); s && p.push(s) })), !u && !d && 0 === p.length) return; return { start: function () { var e = []; u && e.push(u.start()), d && e.push(d.start()), J(p, (function (t) { e.push(t.start()) })); var t = new o({ end: n, cancel: n }); return o.all(e, (function (e) { t.complete(e) })), t; function n() { J(e, (function (e) { e.end() })) } } } }(a.from, a.to, a.classes, a.anchors) : v(a) }; function m(e) { return e.replace(/\bng-\S+\b/g, "") } function g(e, t) { return te(e) && (e = e.split(" ")), te(t) && (t = t.split(" ")), e.filter((function (e) { return -1 === t.indexOf(e) })).join(" ") } function v(t) { var n = t.element, r = t.options || {}; t.structural && (r.event = t.event, r.structural = !0, r.applyClassesEarly = !0, "leave" === t.event && (r.onDone = r.domOperation)), r.preparationClasses && (r.event = _(r.event, r.preparationClasses)); var i = e(n, r); return i.$$willAnimate ? i : null } }] }], se = ["$animateProvider", function (e) { this.$get = ["$injector", "$$AnimateRunner", "$$jqLite", function (t, n, r) { var i = k(r); return function (r, a, o, s) { var l = !1; 3 === arguments.length && ee(o) && (s = o, o = null), s = D(s), o || (o = r.attr("class") || "", s.addClass && (o += " " + s.addClass), s.removeClass && (o += " " + s.removeClass)); var c, u, d, f, p, h = s.addClass, m = s.removeClass, g = function (n) { n = Q(n) ? n : n.split(" "); for (var r = [], i = {}, a = 0; a < n.length; a++) { var o = n[a], s = e.$$registeredAnimations[o]; s && !i[o] && (r.push(t.get(s)), i[o] = !0) } return r }(o); g.length && ("leave" === a ? (f = "leave", d = "afterLeave") : (f = "before" + a.charAt(0).toUpperCase() + a.substr(1), d = a), "enter" !== a && "move" !== a && (c = b(r, a, s, g, f)), u = b(r, a, s, g, d)); if (c || u) return { $$willAnimate: !0, end: function () { return p ? p.end() : ($(), (p = new n).complete(!0)), p }, start: function () { if (p) return p; var e; p = new n; var t = []; return c && t.push((function (t) { e = c(t) })), t.length ? t.push((function (e) { v(), e(!0) })) : v(), u && t.push((function (t) { e = u(t) })), p.setHost({ end: function () { i() }, cancel: function () { i(!0) } }), n.chain(t, r), p; function r(e) { $(), p.complete(e) } function i(t) { l || ((e || ie)(t), r(t)) } } }; function v() { s.domOperation(), i(r, s) } function $() { l = !0, v(), E(r, s) } function y(e, t, r, i, a) { var o = []; return J(i, (function (i) { var s = i[a]; s && o.push((function () { var i, a, o = !1, l = function (e) { o || (o = !0, (a || ie)(e), i.complete(!e)) }; return i = new n({ end: function () { l() }, cancel: function () { l(!0) } }), a = function (e, t, r, i, a) { var o; switch (r) { case "animate": o = [t, i.from, i.to, a]; break; case "setClass": o = [t, h, m, a]; break; case "addClass": o = [t, h, a]; break; case "removeClass": o = [t, m, a]; break; default: o = [t, a] }o.push(i); var s = e.apply(e, o); if (s) if (X(s.start) && (s = s.start()), s instanceof n) s.done(a); else if (X(s)) return s; return ie }(s, e, t, r, (function (e) { l(!1 === e) })), i })) })), o } function b(e, t, r, i, a) { var o, s, l = y(e, t, r, i, a); 0 === l.length && ("beforeSetClass" === a ? (o = y(e, "removeClass", r, i, "beforeRemoveClass"), s = y(e, "addClass", r, i, "beforeAddClass")) : "setClass" === a && (o = y(e, "removeClass", r, i, "removeClass"), s = y(e, "addClass", r, i, "addClass")), o && (l = l.concat(o)), s && (l = l.concat(s))); if (0 !== l.length) return function (e) { var t = []; return l.length && J(l, (function (e) { t.push(e()) })), t.length ? n.all(t, e) : e(), function (e) { J(t, (function (t) { e ? t.cancel() : t.end() })) } } } } }] }], le = ["$$animationProvider", function (e) { e.drivers.push("$$animateJsDriver"), this.$get = ["$$animateJs", "$$AnimateRunner", function (e, t) { return function (e) { if (e.from && e.to) { var r = n(e.from), i = n(e.to); if (!r && !i) return; return { start: function () { var e = []; r && e.push(r.start()), i && e.push(i.start()), t.all(e, (function (e) { n.complete(e) })); var n = new t({ end: a(), cancel: a() }); return n; function a() { return function () { J(e, (function (e) { e.end() })) } } } } } return n(e) }; function n(t) { var n = t.element, r = t.event, i = t.options, a = t.classes; return e(n, r, a, i) } }] }], ce = "data-ng-animate", ue = "$ngAnimatePin", de = ["$animateProvider", function (t) { var n = " ", r = this.rules = { skip: [], cancel: [], join: [] }; function i(e, t) { if (e && t) { var r = function (e) { if (!e) return null; var t = e.split(n), r = Object.create(null); return J(t, (function (e) { r[e] = !0 })), r }(t); return e.split(n).some((function (e) { return r[e] })) } } function a(e, t, n) { return r[e].some((function (e) { return e(t, n) })) } function c(e, t) { var n = (e.addClass || "").length > 0, r = (e.removeClass || "").length > 0; return t ? n && r : n || r } r.join.push((function (e, t) { return !e.structural && c(e) })), r.skip.push((function (e, t) { return !e.structural && !c(e) })), r.skip.push((function (e, t) { return "leave" === t.event && e.structural })), r.skip.push((function (e, t) { return t.structural && 2 === t.state && !e.structural })), r.cancel.push((function (e, t) { return t.structural && e.structural })), r.cancel.push((function (e, t) { return 2 === t.state && e.structural })), r.cancel.push((function (e, t) { if (t.structural) return !1; var n = e.addClass, r = e.removeClass, a = t.addClass, o = t.removeClass; return !(ne(n) && ne(r) || ne(a) && ne(o)) && (i(n, o) || i(r, a)) })), this.$get = ["$$rAF", "$rootScope", "$rootElement", "$document", "$$Map", "$$animation", "$$AnimateRunner", "$templateRequest", "$$jqLite", "$$forceReflow", "$$isDocumentHidden", function (n, r, i, d, f, p, h, m, g, v, $) { var y = new f, w = new f, T = null; var A = r.$watch((function () { return 0 === m.totalPendingRequests }), (function (e) { e && (A(), r.$$postDigest((function () { r.$$postDigest((function () { null === T && (T = !0) })) }))) })), O = Object.create(null), P = t.customFilter(), F = t.classNameFilter(), N = function () { return !0 }, L = P || N, V = F ? function (e, t) { var n = [e.getAttribute("class"), t.addClass, t.removeClass].join(" "); return F.test(n) } : N, R = k(g); function j(e, t) { return I(e, t, {}) } var q = e.Node.prototype.contains || function (e) { return this === e || !!(16 & this.compareDocumentPosition(e)) }; function U(e, t, n) { var r = x(t); return e.filter((function (e) { return !(e.node === r && (!n || e.callback === n)) })) } function B(e, t) { "close" !== e || t.parentNode || H.off(t) } var H = { on: function (e, t, n) { var r = x(t); O[e] = O[e] || [], O[e].push({ node: r, callback: n }), re(t).on("$destroy", (function () { y.get(r) || H.off(e, t, n) })) }, off: function (e, t, n) { if (1 !== arguments.length || te(arguments[0])) { var r = O[e]; r && (O[e] = 1 === arguments.length ? null : U(r, t, n)) } else for (var i in t = arguments[0], O) O[i] = U(O[i], t) }, pin: function (e, t) { b(Z(e), "element", "not an element"), b(Z(t), "parentElement", "not an element"), e.data(ue, t) }, push: function (e, t, f, m) { return (f = f || {}).domOperation = m, function (e, t, f) { var m = G(f), g = C(e), v = M(g), b = v && v.parentNode; m = D(m); var x = new h, k = (A = !1, function (e) { A ? e() : r.$$postDigest((function () { A = !0, e() })) }); var A; Q(m.addClass) && (m.addClass = m.addClass.join(" ")); m.addClass && !te(m.addClass) && (m.addClass = null); Q(m.removeClass) && (m.removeClass = m.removeClass.join(" ")); m.removeClass && !te(m.removeClass) && (m.removeClass = null); m.from && !ee(m.from) && (m.from = null); m.to && !ee(m.to) && (m.to = null); if (!(T && v && L(v, t, f) && V(v, m))) return ae(), x; var P = ["enter", "move", "leave"].indexOf(t) >= 0, F = $(), N = F || w.get(v), U = !N && y.get(v) || {}, H = !!U.state; N || H && 1 === U.state || (N = !function (e, t, n) { var r, a = d[0].body, s = M(i), l = e === a || "HTML" === e.nodeName, c = e === s, f = !1, p = w.get(e), h = re.data(e, ue); h && (t = M(h)); for (; t && (c || (c = t === s), t.nodeType === o);) { var m = y.get(t) || {}; if (!f) { var g = w.get(t); if (!0 === g && !1 !== p) { p = !0; break } !1 === g && (p = !1), f = m.structural } if (ne(r) || !0 === r) { var v = re.data(t, u); Y(v) && (r = v) } if (f && !1 === r) break; if (l || (l = t === a), l && c) break; t = c || !(h = re.data(t, ue)) ? t.parentNode : M(h) } return (!f || r) && !0 !== p && c && l }(v, b)); if (N) return F && ie(x, t, "start"), ae(), F && ie(x, t, "close"), x; P && function (e) { var t = e.querySelectorAll("[" + ce + "]"); J(t, (function (e) { var t = parseInt(e.getAttribute(ce), 10), n = y.get(e); if (n) switch (t) { case 2: n.runner.end(); case 1: y.delete(e) } })) }(v); var K = { structural: P, element: g, event: t, addClass: m.addClass, removeClass: m.removeClass, close: ae, options: m, runner: x }; if (H) { if (a("skip", K, U)) return 2 === U.state ? (ae(), x) : (I(g, U, K), U.runner); if (a("cancel", K, U)) if (2 === U.state) U.runner.end(); else { if (!U.structural) return I(g, U, K), U.runner; U.close() } else if (a("join", K, U)) { if (2 !== U.state) return function (e, t, n) { var r = ""; t && (r = S(t, "ng-", !0)), n.addClass && (r = _(r, S(n.addClass, s))), n.removeClass && (r = _(r, S(n.removeClass, l))), r.length && (n.preparationClasses = r, e.addClass(r)) }(g, P ? t : null, m), t = K.event = U.event, m = I(g, U, K), U.runner; j(g, K) } } else j(g, K); var Z = K.structural; Z || (Z = "animate" === K.event && Object.keys(K.options.to || {}).length > 0 || c(K)); if (!Z) return ae(), z(v), x; var X = (U.counter || 0) + 1; return K.counter = X, W(v, 1, K), r.$$postDigest((function () { g = C(e); var n = y.get(v), r = !n; n = n || {}; var i = (g.parent() || []).length > 0 && ("animate" === n.event || n.structural || c(n)); if (r || n.counter !== X || !i) return r && (R(g, m), E(g, m)), (r || P && n.event !== t) && (m.domOperation(), x.end()), void (i || z(v)); t = !n.structural && c(n, !0) ? "setClass" : n.event, W(v, 2); var a = p(g, t, n.options); x.setHost(a), ie(x, t, "start", {}), a.done((function (e) { ae(!e); var n = y.get(v); n && n.counter === X && z(v), ie(x, t, "close", {}) })) })), x; function ie(e, t, r, i) { k((function () { var e = function (e, t, n) { var r = [], i = O[n]; return i && J(i, (function (i) { (q.call(i.node, t) || "leave" === n && q.call(i.node, e)) && r.push(i.callback) })), r }(b, v, t); e.length ? n((function () { J(e, (function (e) { e(g, r, i) })), B(r, v) })) : B(r, v) })), e.progress(t, r, i) } function ae(e) { !function (e, t) { t.preparationClasses && (e.removeClass(t.preparationClasses), t.preparationClasses = null), t.activeClasses && (e.removeClass(t.activeClasses), t.activeClasses = null) }(g, m), R(g, m), E(g, m), m.domOperation(), x.complete(!e) } }(e, t, f) }, enabled: function (e, t) { var n = arguments.length; if (0 === n) t = !!T; else if (Z(e)) { var r = M(e); 1 === n ? t = !w.get(r) : w.set(r, !t) } else t = T = !!e; return t } }; return H; function z(e) { e.removeAttribute(ce), y.delete(e) } function W(e, t, n) { (n = n || {}).state = t, e.setAttribute(ce, t); var r = y.get(e), i = r ? K(r, n) : n; y.set(e, i) } }] }], fe = ["$animateProvider", function (e) { var t = "ng-animate-ref", n = this.drivers = [], r = "$$animationRunner"; function i(e) { return e.data(r) } this.$get = ["$$jqLite", "$rootScope", "$injector", "$$AnimateRunner", "$$Map", "$$rAFScheduler", function (e, a, o, s, l, u) { var d = [], f = k(e); return function (p, h, m) { m = D(m); var g = ["enter", "move", "leave"].indexOf(h) >= 0, v = new s({ end: function () { x() }, cancel: function () { x(!0) } }); if (!n.length) return x(), v; !function (e, t) { e.data(r, t) }(p, v); var $, y = w(p.attr("class"), w(m.addClass, m.removeClass)), b = m.tempClasses; return b && (y += " " + b, m.tempClasses = null), g && ($ = "ng-" + h + "-prepare", e.addClass(p, $)), d.push({ element: p, classes: y, event: h, structural: g, options: m, beforeStart: function () { p.addClass(c), b && e.addClass(p, b); $ && (e.removeClass(p, $), $ = null) }, close: x }), p.on("$destroy", C), d.length > 1 || a.$$postDigest((function () { var e = []; J(d, (function (t) { i(t.element) ? e.push(t) : t.close() })), d.length = 0; var r = function (e) { var n = [], r = {}; J(e, (function (e, i) { var a = M(e.element), o = e.event, s = ["enter", "move"].indexOf(o) >= 0, l = e.structural ? function (e) { var n = "[" + t + "]", r = e.hasAttribute(t) ? [e] : e.querySelectorAll(n), i = []; return J(r, (function (e) { var n = e.getAttribute(t); n && n.length && i.push(e) })), i }(a) : []; if (l.length) { var c = s ? "to" : "from"; J(l, (function (e) { var n = e.getAttribute(t); r[n] = r[n] || {}, r[n][c] = { animationID: i, element: re(e) } })) } else n.push(e) })); var i = {}, a = {}; return J(r, (function (t, r) { var o = t.from, s = t.to; if (o && s) { var l = e[o.animationID], c = e[s.animationID], u = o.animationID.toString(); if (!a[u]) { var d = a[u] = { structural: !0, beforeStart: function () { l.beforeStart(), c.beforeStart() }, close: function () { l.close(), c.close() }, classes: S(l.classes, c.classes), from: l, to: c, anchors: [] }; d.classes.length ? n.push(d) : (n.push(l), n.push(c)) } a[u].anchors.push({ out: o.element, in: s.element }) } else { var f = o ? o.animationID : s.animationID, p = f.toString(); i[p] || (i[p] = !0, n.push(e[f])) } })), n }(e), a = []; J(r, (function (e) { a.push({ domNode: M(e.from ? e.from.element : e.element), fn: function () { e.beforeStart(); var t, r = e.close; if (i(e.anchors ? e.from.element || e.to.element : e.element)) { var a = function (e) { for (var t = n.length - 1; t >= 0; t--) { var r = n[t], i = o.get(r)(e); if (i) return i } }(e); a && (t = a.start) } if (t) { var s = t(); s.done((function (e) { r(!e) })), function (e, t) { e.from && e.to ? (n(e.from.element), n(e.to.element)) : n(e.element); function n(e) { var n = i(e); n && n.setHost(t) } }(e, s) } else r() } }) })), u(function (e) { var t, n = { children: [] }, r = new l; for (t = 0; t < e.length; t++) { var i = e[t]; r.set(i.domNode, e[t] = { domNode: i.domNode, fn: i.fn, children: [] }) } for (t = 0; t < e.length; t++)a(e[t]); return function (e) { var t, n = [], r = []; for (t = 0; t < e.children.length; t++)r.push(e.children[t]); var i = r.length, a = 0, o = []; for (t = 0; t < r.length; t++) { var s = r[t]; i <= 0 && (i = a, a = 0, n.push(o), o = []), o.push(s.fn), s.children.forEach((function (e) { a++, r.push(e) })), i-- } return o.length && n.push(o), n }(n); function a(e) { if (e.processed) return e; e.processed = !0; var t, i = e.domNode, o = i.parentNode; for (r.set(i, e); o;) { if (t = r.get(o)) { t.processed || (t = a(t)); break } o = o.parentNode } return (t || n).children.push(e), e } }(a)) })), v; function S(e, t) { e = e.split(" "), t = t.split(" "); for (var n = [], r = 0; r < e.length; r++) { var i = e[r]; if ("ng-" !== i.substring(0, 3)) for (var a = 0; a < t.length; a++)if (i === t[a]) { n.push(i); break } } return n.join(" ") } function C() { var e = i(p); !e || "leave" === h && m.$$domOperationFired || e.end() } function x(t) { p.off("$destroy", C), function (e) { e.removeData(r) }(p), f(p, m), E(p, m), m.domOperation(), b && e.removeClass(p, b), p.removeClass(c), v.complete(!t) } } }] }]; t.module("ngAnimate", [], (function () { ie = t.noop, G = t.copy, K = t.extend, re = t.element, J = t.forEach, Q = t.isArray, te = t.isString, ee = t.isObject, ne = t.isUndefined, Y = t.isDefined, X = t.isFunction, Z = t.isElement })).info({ angularVersion: "1.6.9" }).directive("ngAnimateSwap", ["$animate", "$rootScope", function (e, t) { return { restrict: "A", transclude: "element", terminal: !0, priority: 600, link: function (t, n, r, i, a) { var o, s; t.$watchCollection(r.ngAnimateSwap || r.for, (function (r) { o && e.leave(o), s && (s.$destroy(), s = null), (r || 0 === r) && (s = t.$new(), a(s, (function (t) { o = t, e.enter(t, null, n) }))) })) } } }]).directive("ngAnimateChildren", N).factory("$$rAFScheduler", ["$$rAF", function (e) { var t, n; function r(e) { t = t.concat(e), i() } return t = r.queue = [], r.waitUntilQuiet = function (t) { n && n(), n = e((function () { n = null, t(), i() })) }, r; function i() { if (t.length) { for (var r = t.shift(), a = 0; a < r.length; a++)r[a](); n || e((function () { n || i() })) } } }]).provider("$$animateQueue", de).provider("$$animation", fe).provider("$animateCss", ae).provider("$$animateCssDriver", oe).provider("$$animateJs", se).provider("$$animateJsDriver", le) }(window, window.angular),
    /**
     * @license AngularJS v1.6.9
     * (c) 2010-2018 Google, Inc. http://angularjs.org
     * License: MIT
     */
    function (e, t) { "use strict"; var n, r, i, a, o, s = t.module("ngRoute", []).info({ angularVersion: "1.6.9" }).provider("$route", (function () { function e(e, n) { return t.extend(Object.create(e), n) } n = t.isArray, r = t.isObject, i = t.isDefined, a = t.noop; var s = {}; function c(e, t) { var n = t.caseInsensitiveMatch, r = { originalPath: e, regexp: e }, i = r.keys = []; return e = e.replace(/([().])/g, "\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g, (function (e, t, n, r) { var a = "?" === r || "*?" === r ? "?" : null, o = "*" === r || "*?" === r ? "*" : null; return i.push({ name: n, optional: !!a }), t = t || "", (a ? "" : t) + "(?:" + (a ? t : "") + (o ? "(.+?)" : "([^/]+)") + (a || "") + ")" + (a || "") })).replace(/([/$*])/g, "\\$1"), r.regexp = new RegExp("^" + e + "$", n ? "i" : ""), r } this.when = function (e, i) { var a = function (e, t) { if (n(e)) { t = t || []; for (var i = 0, a = e.length; i < a; i++)t[i] = e[i] } else if (r(e)) for (var o in t = t || {}, e) "$" === o.charAt(0) && "$" === o.charAt(1) || (t[o] = e[o]); return t || e }(i); if (t.isUndefined(a.reloadOnSearch) && (a.reloadOnSearch = !0), t.isUndefined(a.caseInsensitiveMatch) && (a.caseInsensitiveMatch = this.caseInsensitiveMatch), s[e] = t.extend(a, e && c(e, a)), e) { var o = "/" === e[e.length - 1] ? e.substr(0, e.length - 1) : e + "/"; s[o] = t.extend({ redirectTo: e }, c(o, a)) } return this }, this.caseInsensitiveMatch = !1, this.otherwise = function (e) { return "string" == typeof e && (e = { redirectTo: e }), this.when(null, e), this }, o = !0, this.eagerInstantiationEnabled = function (e) { return i(e) ? (o = e, this) : o }, this.$get = ["$rootScope", "$location", "$routeParams", "$q", "$injector", "$templateRequest", "$sce", "$browser", function (n, r, i, o, c, u, d, f) { var p, h, m = !1, g = { routes: s, reload: function () { m = !0; var e = { defaultPrevented: !1, preventDefault: function () { this.defaultPrevented = !0, m = !1 } }; n.$evalAsync((function () { v(e), e.defaultPrevented || $() })) }, updateParams: function (e) { if (!this.current || !this.current.$$route) throw l("norout", "Tried updating route when with no current route"); e = t.extend({}, this.current.params, e), r.path(S(this.current.$$route.originalPath, e)), r.search(e) } }; return n.$on("$locationChangeStart", v), n.$on("$locationChangeSuccess", $), g; function v(i) { var a = g.current; p = function () { var n, i; return t.forEach(s, (function (a, o) { !i && (n = function (e, t) { var n = t.keys, r = {}; if (!t.regexp) return null; var i = t.regexp.exec(e); if (!i) return null; for (var a = 1, o = i.length; a < o; ++a) { var s = n[a - 1], l = i[a]; s && l && (r[s.name] = l) } return r }(r.path(), a)) && ((i = e(a, { params: t.extend({}, r.search(), n), pathParams: n })).$$route = a) })), i || s.null && e(s.null, { params: {}, pathParams: {} }) }(), (h = p && a && p.$$route === a.$$route && t.equals(p.pathParams, a.pathParams) && !p.reloadOnSearch && !m) || !a && !p || n.$broadcast("$routeChangeStart", p, a).defaultPrevented && i && i.preventDefault() } function $() { var e = g.current, r = p; if (h) e.params = r.params, t.copy(e.params, i), n.$broadcast("$routeUpdate", e); else if (r || e) { m = !1, g.current = r; var s = o.resolve(r); f.$$incOutstandingRequestCount(), s.then(y).then(b).then((function (a) { return a && s.then(w).then((function (a) { r === g.current && (r && (r.locals = a, t.copy(r.params, i)), n.$broadcast("$routeChangeSuccess", r, e)) })) })).catch((function (t) { r === g.current && n.$broadcast("$routeChangeError", r, e, t) })).finally((function () { f.$$completeOutstandingRequest(a) })) } } function y(e) { var n = { route: e, hasRedirection: !1 }; if (e) if (e.redirectTo) if (t.isString(e.redirectTo)) n.path = S(e.redirectTo, e.params), n.search = e.params, n.hasRedirection = !0; else { var i = r.path(), a = r.search(), s = e.redirectTo(e.pathParams, i, a); t.isDefined(s) && (n.url = s, n.hasRedirection = !0) } else if (e.resolveRedirectTo) return o.resolve(c.invoke(e.resolveRedirectTo)).then((function (e) { return t.isDefined(e) && (n.url = e, n.hasRedirection = !0), n })); return n } function b(e) { var t = !0; if (e.route !== g.current) t = !1; else if (e.hasRedirection) { var n = r.url(), i = e.url; i ? r.url(i).replace() : i = r.path(e.path).search(e.search).replace().url(), i !== n && (t = !1) } return t } function w(e) { if (e) { var n = t.extend({}, e.resolve); t.forEach(n, (function (e, r) { n[r] = t.isString(e) ? c.get(e) : c.invoke(e, null, null, r) })); var r = function (e) { var n, r; t.isDefined(n = e.template) ? t.isFunction(n) && (n = n(e.params)) : t.isDefined(r = e.templateUrl) && (t.isFunction(r) && (r = r(e.params)), t.isDefined(r) && (e.loadedTemplateUrl = d.valueOf(r), n = u(r))); return n }(e); return t.isDefined(r) && (n.$template = r), o.all(n) } } function S(e, n) { var r = []; return t.forEach((e || "").split(":"), (function (e, t) { if (0 === t) r.push(e); else { var i = e.match(/(\w+)(?:[?*])?(.*)/), a = i[1]; r.push(n[a]), r.push(i[2] || ""), delete n[a] } })), r.join("") } }] })).run(c), l = t.$$minErr("ngRoute"); function c(e) { o && e.get("$route") } function u(e, n, r) { return { restrict: "ECA", terminal: !0, priority: 400, transclude: "element", link: function (i, a, o, s, l) { var c, u, d, f = o.autoscroll, p = o.onload || ""; function h() { d && (r.cancel(d), d = null), c && (c.$destroy(), c = null), u && ((d = r.leave(u)).done((function (e) { !1 !== e && (d = null) })), u = null) } function m() { var o = e.current && e.current.locals, s = o && o.$template; if (t.isDefined(s)) { var d = i.$new(), m = e.current, g = l(d, (function (e) { r.enter(e, null, u || a).done((function (e) { !1 === e || !t.isDefined(f) || f && !i.$eval(f) || n() })), h() })); u = g, (c = m.scope = d).$emit("$viewContentLoaded"), c.$eval(p) } else h() } i.$on("$routeChangeSuccess", m), m() } } } function d(e, t, n) { return { restrict: "ECA", priority: -400, link: function (r, i) { var a = n.current, o = a.locals; i.html(o.$template); var s = e(i.contents()); if (a.controller) { o.$scope = r; var l = t(a.controller, o); a.controllerAs && (r[a.controllerAs] = l), i.data("$ngControllerController", l), i.children().data("$ngControllerController", l) } r[a.resolveAs || "$resolve"] = o, s(r) } } } c.$inject = ["$injector"], s.provider("$routeParams", (function () { this.$get = function () { return {} } })), s.directive("ngView", u), s.directive("ngView", d), u.$inject = ["$route", "$anchorScroll", "$animate"], d.$inject = ["$compile", "$controller", "$route"] }(window, window.angular),
    /**
     * @license AngularJS v1.6.9
     * (c) 2010-2018 Google, Inc. http://angularjs.org
     * License: MIT
     */
    function (e, t) { "use strict"; function n(e, n, r) { var i = r.baseHref(), a = e[0]; return function (e, r, o) { a.cookie = function (e, r, a) { var o, s; s = (a = a || {}).expires, o = t.isDefined(a.path) ? a.path : i, t.isUndefined(r) && (s = "Thu, 01 Jan 1970 00:00:00 GMT", r = ""), t.isString(s) && (s = new Date(s)); var l = encodeURIComponent(e) + "=" + encodeURIComponent(r); l += o ? ";path=" + o : "", l += a.domain ? ";domain=" + a.domain : "", l += s ? ";expires=" + s.toUTCString() : ""; var c = (l += a.secure ? ";secure" : "").length + 1; return c > 4096 && n.warn("Cookie '" + e + "' possibly not set or overflowed because it was too large (" + c + " > 4096 bytes)!"), l }(e, r, o) } } t.module("ngCookies", ["ng"]).info({ angularVersion: "1.6.9" }).provider("$cookies", [function () { var e = this.defaults = {}; function n(n) { return n ? t.extend({}, e, n) : e } this.$get = ["$$cookieReader", "$$cookieWriter", function (e, r) { return { get: function (t) { return e()[t] }, getObject: function (e) { var n = this.get(e); return n ? t.fromJson(n) : n }, getAll: function () { return e() }, put: function (e, t, i) { r(e, t, n(i)) }, putObject: function (e, n, r) { this.put(e, t.toJson(n), r) }, remove: function (e, t) { r(e, void 0, n(t)) } } }] }]), t.module("ngCookies").factory("$cookieStore", ["$cookies", function (e) { return { get: function (t) { return e.getObject(t) }, put: function (t, n) { e.putObject(t, n) }, remove: function (t) { e.remove(t) } } }]), n.$inject = ["$document", "$log", "$browser"], t.module("ngCookies").provider("$$cookieWriter", (function () { this.$get = n })) }(window, window.angular),
    /**
     * @license AngularJS v1.6.9
     * (c) 2010-2018 Google, Inc. http://angularjs.org
     * License: MIT
     */
    function (e, t) { "use strict"; var n = t.$$minErr("$resource"), r = /^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/; function i(e, i) { if (!function (e) { return null != e && "" !== e && "hasOwnProperty" !== e && r.test("." + e) }(i)) throw n("badmember", 'Dotted member path "@{0}" is invalid.', i); for (var a = i.split("."), o = 0, s = a.length; o < s && t.isDefined(e); o++) { var l = a[o]; e = null !== e ? e[l] : void 0 } return e } function a(e, n) { for (var r in n = n || {}, t.forEach(n, (function (e, t) { delete n[t] })), e) !e.hasOwnProperty(r) || "$" === r.charAt(0) && "$" === r.charAt(1) || (n[r] = e[r]); return n } t.module("ngResource", ["ng"]).info({ angularVersion: "1.6.9" }).provider("$resource", (function () { var e = /^https?:\/\/\[[^\]]*][^/]*/, r = this; this.defaults = { stripTrailingSlashes: !0, cancellable: !1, actions: { get: { method: "GET" }, save: { method: "POST" }, query: { method: "GET", isArray: !0 }, remove: { method: "DELETE" }, delete: { method: "DELETE" } } }, this.$get = ["$http", "$log", "$q", "$timeout", function (o, s, l, c) { var u = t.noop, d = t.forEach, f = t.extend, p = t.copy, h = t.isArray, m = t.isDefined, g = t.isFunction, v = t.isNumber, $ = t.$$encodeUriQuery, y = t.$$encodeUriSegment; function b(e, t) { this.template = e, this.defaults = f({}, r.defaults, t), this.urlParams = {} } return b.prototype = { setUrlParams: function (t, r, i) { var a, o, s = this, l = i || s.template, c = "", u = s.urlParams = Object.create(null); d(l.split(/\W/), (function (e) { if ("hasOwnProperty" === e) throw n("badname", "hasOwnProperty is not a valid parameter name."); !new RegExp("^\\d+$").test(e) && e && new RegExp("(^|[^\\\\]):" + e + "(\\W|$)").test(l) && (u[e] = { isQueryParamValue: new RegExp("\\?.*=:" + e + "(?:\\W|$)").test(l) }) })), l = (l = l.replace(/\\:/g, ":")).replace(e, (function (e) { return c = e, "" })), r = r || {}, d(s.urlParams, (function (e, t) { a = r.hasOwnProperty(t) ? r[t] : s.defaults[t], m(a) && null !== a ? (o = e.isQueryParamValue ? $(a, !0) : y(a), l = l.replace(new RegExp(":" + t + "(\\W|$)", "g"), (function (e, t) { return o + t }))) : l = l.replace(new RegExp("(/?):" + t + "(\\W|$)", "g"), (function (e, t, n) { return "/" === n.charAt(0) ? n : t + n })) })), s.defaults.stripTrailingSlashes && (l = l.replace(/\/+$/, "") || "/"), l = l.replace(/\/\.(?=\w+($|\?))/, "."), t.url = c + l.replace(/\/(\\|%5C)\./, "/."), d(r, (function (e, n) { s.urlParams[n] || (t.params = t.params || {}, t.params[n] = e) })) } }, function (e, t, $, y) { var w = new b(e, y); function S(e) { return e.resource } function C(e) { a(e || {}, this) } return $ = f({}, r.defaults.actions, $), C.prototype.toJSON = function () { var e = f({}, this); return delete e.$promise, delete e.$resolved, delete e.$cancelRequest, e }, d($, (function (e, r) { var $ = !0 === e.hasBody || !1 !== e.hasBody && /^(POST|PUT|PATCH)$/i.test(e.method), y = e.timeout, b = m(e.cancellable) ? e.cancellable : w.defaults.cancellable; y && !v(y) && (s.debug("ngResource:\n  Only numeric values are allowed as `timeout`.\n  Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."), delete e.timeout, y = null), C[r] = function (s, m, v, x) { var k, D, E, T = {}; switch (arguments.length) { case 4: E = x, D = v; case 3: case 2: if (!g(m)) { T = s, k = m, D = v; break } if (g(s)) { D = s, E = m; break } D = m, E = v; case 1: g(s) ? D = s : $ ? k = s : T = s; break; case 0: break; default: throw n("badargs", "Expected up to 4 arguments [params, data, success, error], got {0} arguments", arguments.length) }var A, I, M = this instanceof C, O = M ? k : e.isArray ? [] : new C(k), P = {}, F = e.interceptor && e.interceptor.response || S, _ = e.interceptor && e.interceptor.responseError || void 0, N = !!E, L = !!_; d(e, (function (e, t) { switch (t) { default: P[t] = p(e); case "params": case "isArray": case "interceptor": case "cancellable": } })), !M && b && (A = l.defer(), P.timeout = A.promise, y && (I = c(A.resolve, y))), $ && (P.data = k), w.setUrlParams(P, f({}, function (e, n) { var r = {}; return n = f({}, t, n), d(n, (function (t, n) { g(t) && (t = t(e)), r[n] = t && t.charAt && "@" === t.charAt(0) ? i(e, t.substr(1)) : t })), r }(k, e.params || {}), T), e.url); var V = o(P).then((function (t) { var i = t.data; if (i) { if (h(i) !== !!e.isArray) throw n("badcfg", "Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})", r, e.isArray ? "array" : "object", h(i) ? "array" : "object", P.method, P.url); if (e.isArray) O.length = 0, d(i, (function (e) { "object" == typeof e ? O.push(new C(e)) : O.push(e) })); else { var o = O.$promise; a(i, O), O.$promise = o } } return t.resource = O, t }), (function (e) { return e.resource = O, l.reject(e) })); return V = (V = V.finally((function () { O.$resolved = !0, !M && b && (O.$cancelRequest = u, c.cancel(I), A = I = P.timeout = null) }))).then((function (e) { var t = F(e); return (D || u)(t, e.headers, e.status, e.statusText), t }), N || L ? function (e) { return N && !L && V.catch(u), N && E(e), L ? _(e) : l.reject(e) } : void 0), M ? V : (O.$promise = V, O.$resolved = !1, b && (O.$cancelRequest = function (e) { V.catch(u), null !== A && A.resolve(e) }), O) }, C.prototype["$" + r] = function (e, t, n) { g(e) && (n = t, t = e, e = {}); var i = C[r].call(this, e, this, t, n); return i.$promise || i } })), C } }] })) }(window, window.angular),
    /**
     * @license AngularJS v1.6.9
     * (c) 2010-2018 Google, Inc. http://angularjs.org
     * License: MIT
     */
    function (e, t) { "use strict"; var n, r, i, a, o, s, l, c, u, d = t.$$minErr("$sanitize"); t.module("ngSanitize", []).provider("$sanitize", (function () { var f = !1; this.$get = ["$$sanitizeUri", function (e) { return f && r(C, w), function (t) { var n = []; return c(t, u(n, (function (t, n) { return !/^unsafe:/.test(e(t, n)) }))), n.join("") } }], this.enableSvg = function (e) { return a(e) ? (f = e, this) : f }, n = t.bind, r = t.extend, i = t.forEach, a = t.isDefined, o = t.lowercase, s = t.noop, c = function (e, t) { null == e ? e = "" : "string" != typeof e && (e = "" + e); var n = A(e); if (!n) return ""; var r = 5; do { if (0 === r) throw d("uinput", "Failed to sanitize html because the input is unstable"); r--, e = n.innerHTML, n = A(e) } while (e !== n.innerHTML); var i = n.firstChild; for (; i;) { switch (i.nodeType) { case 1: t.start(i.nodeName.toLowerCase(), I(i.attributes)); break; case 3: t.chars(i.textContent) }var a; if (!((a = i.firstChild) || (1 === i.nodeType && t.end(i.nodeName.toLowerCase()), a = P("nextSibling", i)))) for (; null == a && (i = P("parentNode", i)) !== n;)a = P("nextSibling", i), 1 === i.nodeType && t.end(i.nodeName.toLowerCase()); i = a } for (; i = n.firstChild;)n.removeChild(i) }, u = function (e, t) { var r = !1, a = n(e, e.push); return { start: function (e, n) { e = o(e), !r && S[e] && (r = e), r || !0 !== C[e] || (a("<"), a(e), i(n, (function (n, r) { var i = o(r), s = "img" === e && "src" === i || "background" === i; !0 !== E[i] || !0 === x[i] && !t(n, s) || (a(" "), a(r), a('="'), a(M(n)), a('"')) })), a(">")) }, end: function (e) { e = o(e), r || !0 !== C[e] || !0 === m[e] || (a("</"), a(e), a(">")), e == r && (r = !1) }, chars: function (e) { r || a(M(e)) } } }, l = e.Node.prototype.contains || function (e) { return !!(16 & this.compareDocumentPosition(e)) }; var p = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, h = /([^#-~ |!])/g, m = T("area,br,col,hr,img,wbr"), g = T("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), v = T("rp,rt"), $ = r({}, v, g), y = r({}, g, T("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")), b = r({}, v, T("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")), w = T("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"), S = T("script,style"), C = r({}, m, y, b, $), x = T("background,cite,href,longdesc,src,xlink:href,xml:base"), k = T("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"), D = T("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan", !0), E = r({}, x, D, k); function T(e, t) { var n, r = {}, i = e.split(","); for (n = 0; n < i.length; n++)r[t ? o(i[n]) : i[n]] = !0; return r } var A = function (e, t) { var n; if (!t || !t.implementation) throw d("noinert", "Can't create an inert html document"); var r = ((n = t.implementation.createHTMLDocument("inert")).documentElement || n.getDocumentElement()).querySelector("body"); return r.innerHTML = '<svg><g onload="this.parentNode.remove()"></g></svg>', r.querySelector("svg") ? (r.innerHTML = '<svg><p><style><img src="</style><img src=x onerror=alert(1)//">', r.querySelector("svg img") ? function (t) { t = "<remove></remove>" + t; try { var n = (new e.DOMParser).parseFromString(t, "text/html").body; return n.firstChild.remove(), n } catch (e) { return } } : function (e) { r.innerHTML = e, t.documentMode && O(r); return r }) : function (t) { t = "<remove></remove>" + t; try { t = encodeURI(t) } catch (e) { return } var n = new e.XMLHttpRequest; n.responseType = "document", n.open("GET", "data:text/html;charset=utf-8," + t, !1), n.send(null); var r = n.response.body; return r.firstChild.remove(), r } }(e, e.document); function I(e) { for (var t = {}, n = 0, r = e.length; n < r; n++) { var i = e[n]; t[i.name] = i.value } return t } function M(e) { return e.replace(/&/g, "&amp;").replace(p, (function (e) { return "&#" + (1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320) + 65536) + ";" })).replace(h, (function (e) { return "&#" + e.charCodeAt(0) + ";" })).replace(/</g, "&lt;").replace(/>/g, "&gt;") } function O(t) { for (; t;) { if (t.nodeType === e.Node.ELEMENT_NODE) for (var n = t.attributes, r = 0, i = n.length; r < i; r++) { var a = n[r], o = a.name.toLowerCase(); "xmlns:ns1" !== o && 0 !== o.lastIndexOf("ns1:", 0) || (t.removeAttributeNode(a), r--, i--) } var s = t.firstChild; s && O(s), t = P("nextSibling", t) } } function P(e, t) { var n = t[e]; if (n && l.call(t, n)) throw d("elclob", "Failed to sanitize html because the element is clobbered: {0}", t.outerHTML || t.outerText); return n } })).info({ angularVersion: "1.6.9" }), t.module("ngSanitize").filter("linky", ["$sanitize", function (e) { var n = /((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i, r = /^mailto:/i, i = t.$$minErr("linky"), a = t.isDefined, o = t.isFunction, l = t.isObject, c = t.isString; return function (t, d, f) { if (null == t || "" === t) return t; if (!c(t)) throw i("notstring", "Expected string but received: {0}", t); for (var p, h, m, g = o(f) ? f : l(f) ? function () { return f } : function () { return {} }, v = t, $ = []; p = v.match(n);)h = p[0], p[2] || p[4] || (h = (p[3] ? "http://" : "mailto:") + h), m = p.index, y(v.substr(0, m)), b(h, p[0].replace(r, "")), v = v.substring(m + p[0].length); return y(v), e($.join("")); function y(e) { var t, n; e && $.push((t = e, u(n = [], s).chars(t), n.join(""))) } function b(e, t) { var n, r = g(e); for (n in $.push("<a "), r) $.push(n + '="' + r[n] + '" '); a(d) && !("target" in r) && $.push('target="', d, '" '), $.push('href="', e.replace(/"/g, "&quot;"), '">'), y(t), $.push("</a>") } } }]) }(window, window.angular),
    /**
     * @license AngularJS v1.6.9
     * (c) 2010-2018 Google, Inc. http://angularjs.org
     * License: MIT
     */
    function (e, t) { "use strict"; var n = t.module("ngAria", ["ng"]).info({ angularVersion: "1.6.9" }).provider("$aria", (function () { var e = { ariaHidden: !0, ariaChecked: !0, ariaReadonly: !0, ariaDisabled: !0, ariaRequired: !0, ariaInvalid: !0, ariaValue: !0, tabindex: !0, bindKeydown: !0, bindRoleForClick: !0 }; function n(t, n, r, a) { return function (o, s, l) { var c = l.$normalize(n); !e[c] || i(s, r) || l[c] || o.$watch(l[t], (function (e) { e = a ? !e : !!e, s.attr(n, e) })) } } this.config = function (n) { e = t.extend(e, n) }, this.$get = function () { return { config: function (t) { return e[t] }, $$watchExpr: n } } })), r = ["BUTTON", "A", "INPUT", "TEXTAREA", "SELECT", "DETAILS", "SUMMARY"], i = function (e, t) { if (-1 !== t.indexOf(e[0].nodeName)) return !0 }; n.directive("ngShow", ["$aria", function (e) { return e.$$watchExpr("ngShow", "aria-hidden", [], !0) }]).directive("ngHide", ["$aria", function (e) { return e.$$watchExpr("ngHide", "aria-hidden", [], !1) }]).directive("ngValue", ["$aria", function (e) { return e.$$watchExpr("ngValue", "aria-checked", r, !1) }]).directive("ngChecked", ["$aria", function (e) { return e.$$watchExpr("ngChecked", "aria-checked", r, !1) }]).directive("ngReadonly", ["$aria", function (e) { return e.$$watchExpr("ngReadonly", "aria-readonly", r, !1) }]).directive("ngRequired", ["$aria", function (e) { return e.$$watchExpr("ngRequired", "aria-required", r, !1) }]).directive("ngModel", ["$aria", function (e) { function t(t, n, a, o) { return e.config(n) && !a.attr(t) && (o || !i(a, r)) } function n(e, t) { return !t.attr("role") && t.attr("type") === e && !i(t, r) } return { restrict: "A", require: "ngModel", priority: 200, compile: function (r, i) { var a = function (e, t) { var n = e.type, r = e.role; return "checkbox" === (n || r) || "menuitemcheckbox" === r ? "checkbox" : "radio" === (n || r) || "menuitemradio" === r ? "radio" : "range" === n || "progressbar" === r || "slider" === r ? "range" : "" }(i); return { post: function (r, i, o, s) { var l = t("tabindex", "tabindex", i, !1); function c() { return s.$modelValue } switch (a) { case "radio": case "checkbox": n(a, i) && i.attr("role", a), t("aria-checked", "ariaChecked", i, !1) && r.$watch(c, "radio" === a ? function (e) { var t = o.value == s.$viewValue; i.attr("aria-checked", t) } : function () { i.attr("aria-checked", !s.$isEmpty(s.$viewValue)) }), l && i.attr("tabindex", 0); break; case "range": if (n(a, i) && i.attr("role", "slider"), e.config("ariaValue")) { var u = !i.attr("aria-valuemin") && (o.hasOwnProperty("min") || o.hasOwnProperty("ngMin")), d = !i.attr("aria-valuemax") && (o.hasOwnProperty("max") || o.hasOwnProperty("ngMax")), f = !i.attr("aria-valuenow"); u && o.$observe("min", (function (e) { i.attr("aria-valuemin", e) })), d && o.$observe("max", (function (e) { i.attr("aria-valuemax", e) })), f && r.$watch(c, (function (e) { i.attr("aria-valuenow", e) })) } l && i.attr("tabindex", 0) }!o.hasOwnProperty("ngRequired") && s.$validators.required && t("aria-required", "ariaRequired", i, !1) && o.$observe("required", (function () { i.attr("aria-required", !!o.required) })), t("aria-invalid", "ariaInvalid", i, !0) && r.$watch((function () { return s.$invalid }), (function (e) { i.attr("aria-invalid", !!e) })) } } } } }]).directive("ngDisabled", ["$aria", function (e) { return e.$$watchExpr("ngDisabled", "aria-disabled", r, !1) }]).directive("ngMessages", (function () { return { restrict: "A", require: "?ngMessages", link: function (e, t, n, r) { t.attr("aria-live") || t.attr("aria-live", "assertive") } } })).directive("ngClick", ["$aria", "$parse", function (e, t) { return { restrict: "A", compile: function (n, a) { var o = t(a.ngClick); return function (t, n, a) { i(n, r) || (e.config("bindRoleForClick") && !n.attr("role") && n.attr("role", "button"), e.config("tabindex") && !n.attr("tabindex") && n.attr("tabindex", 0), !e.config("bindKeydown") || a.ngKeydown || a.ngKeypress || a.ngKeyup || n.on("keydown", (function (e) { var n = e.which || e.keyCode; 32 !== n && 13 !== n || t.$apply((function () { o(t, { $event: e }) })) }))) } } } }]).directive("ngDblclick", ["$aria", function (e) { return function (t, n, a) { !e.config("tabindex") || n.attr("tabindex") || i(n, r) || n.attr("tabindex", 0) } }]) }(window, window.angular),
    /**
     * @license AngularJS v1.6.9
     * (c) 2010-2018 Google, Inc. http://angularjs.org
     * License: MIT
     */
    function (e, t) { "use strict"; var n, r, i, a; function o() { return ["$animate", function (e) { return { restrict: "AE", transclude: "element", priority: 1, terminal: !0, require: "^^ngMessages", link: function (t, n, i, a, o) { var s, l, c, u = n[0], d = i.ngMessage || i.when, f = i.ngMessageExp || i.whenExp, p = function (e) { s = e ? r(e) ? e : e.split(/[\s,]+/) : null, a.reRender() }; f ? (p(t.$eval(f)), t.$watchCollection(f, p)) : p(d), a.register(u, c = { test: function (e) { return function (e, t) { if (e) return r(e) ? e.indexOf(t) >= 0 : e.hasOwnProperty(t) }(s, e) }, attach: function () { l || o((function (t, r) { e.enter(t, null, n); var i = (l = t).$$attachId = a.getAttachId(); l.on("$destroy", (function () { l && l.$$attachId === i && (a.deregister(u), c.detach()), r.$destroy() })) })) }, detach: function () { if (l) { var t = l; l = null, e.leave(t) } } }), t.$on("$destroy", (function () { a.deregister(u) })) } } }] } t.module("ngMessages", [], (function () { n = t.forEach, r = t.isArray, i = t.isString, a = t.element })).info({ angularVersion: "1.6.9" }).directive("ngMessages", ["$animate", function (e) { var t = "ng-active", r = "ng-inactive"; return { require: "ngMessages", restrict: "AE", controller: ["$element", "$scope", "$attrs", function (i, s, l) { var c = this, u = 0, d = 0; this.getAttachId = function () { return d++ }; var f, p, h = this.messages = {}; function m(e, t) { for (var n = t, r = []; n && n !== e;) { var i = n.$$ngMessageNode; if (i && i.length) return h[i]; n.childNodes.length && -1 === r.indexOf(n) ? (r.push(n), n = n.childNodes[n.childNodes.length - 1]) : n.previousSibling ? n = n.previousSibling : (n = n.parentNode, r.push(n)) } } this.render = function (u) { f = !1, p = u = u || {}; for (var d = a(s, l.ngMessagesMultiple) || a(s, l.multiple), h = [], m = {}, g = c.head, v = !1, $ = 0; null != g;) { $++; var y = g.message, b = !1; v || n(u, (function (e, t) { if (!b && o(e) && y.test(t)) { if (m[t]) return; m[t] = !0, b = !0, y.attach() } })), b ? v = !d : h.push(y), g = g.next } n(h, (function (e) { e.detach() })), h.length !== $ ? e.setClass(i, t, r) : e.setClass(i, r, t) }, s.$watchCollection(l.ngMessages || l.for, c.render), this.reRender = function () { f || (f = !0, s.$evalAsync((function () { f && p && c.render(p) }))) }, this.register = function (e, t) { var n = u.toString(); h[n] = { message: t }, function (e, t, n) { var r = h[n]; if (c.head) { var i = m(e, t); i ? (r.next = i.next, i.next = r) : (r.next = c.head, c.head = r) } else c.head = r }(i[0], e, n), e.$$ngMessageNode = n, u++, c.reRender() }, this.deregister = function (e) { var t = e.$$ngMessageNode; delete e.$$ngMessageNode, function (e, t, n) { var r = h[n]; if (!r) return; var i = m(e, t); i ? i.next = r.next : c.head = r.next }(i[0], e, t), delete h[t], c.reRender() } }] }; function a(e, t) { return i(t) && 0 === t.length || o(e.$eval(t)) } function o(e) { return i(e) ? e.length : !!e } }]).directive("ngMessagesInclude", ["$templateRequest", "$document", "$compile", function (e, t, n) { return { restrict: "AE", require: "^^ngMessages", link: function (t, a, o) { var s = o.ngMessagesInclude || o.src; e(s).then((function (e) { t.$$destroyed || (i(e) && !e.trim() ? r(a, s) : n(e)(t, (function (e) { a.after(e), r(a, s) }))) })) } }; function r(e, r) { var i = n.$$createComment ? n.$$createComment("ngMessagesInclude", r) : t[0].createComment(" ngMessagesInclude: " + r + " "), o = a(i); e.after(o), e.remove() } }]).directive("ngMessage", o()).directive("ngMessageExp", o()) }(window, window.angular), function (e) { "use strict"; angular.module("vcRecaptcha", []) }(), function (e) { "use strict"; e.module("vcRecaptcha").provider("vcRecaptchaService", (function () { var t = this, n = {}; t.onLoadFunctionName = "vcRecaptchaApiLoaded", t.setDefaults = function (t) { e.copy(t, n) }, t.setSiteKey = function (e) { n.key = e }, t.setTheme = function (e) { n.theme = e }, t.setStoken = function (e) { n.stoken = e }, t.setSize = function (e) { n.size = e }, t.setType = function (e) { n.type = e }, t.setLang = function (e) { n.lang = e }, t.setBadge = function (e) { n.badge = e }, t.setOnLoadFunctionName = function (e) { t.onLoadFunctionName = e }, t.$get = ["$rootScope", "$window", "$q", "$document", "$interval", function (r, i, a, o, s) { function l() { if (!u) throw new Error("reCaptcha has not been loaded yet.") } function c() { return e.isFunction((i.grecaptcha || {}).render) } var u, d = a.defer(), f = d.promise, p = {}; i.vcRecaptchaApiLoadedCallback = i.vcRecaptchaApiLoadedCallback || []; var h = function () { u = i.grecaptcha, d.resolve(u) }; if (i.vcRecaptchaApiLoadedCallback.push(h), i[t.onLoadFunctionName] = function () { i.vcRecaptchaApiLoadedCallback.forEach((function (e) { e() })) }, c()) h(); else if (i.document.querySelector('script[src^="https://www.google.com/recaptcha/api.js"]')) var m = s((function () { c() && (s.cancel(m), h()) }), 25); else { var g = i.document.createElement("script"); g.async = !0, g.defer = !0, g.src = "https://www.google.com/recaptcha/api.js?onload=" + t.onLoadFunctionName + "&render=explicit", o.find("body")[0].appendChild(g) } return { create: function (e, t) { return t.sitekey = t.key || n.key, t.theme = t.theme || n.theme, t.stoken = t.stoken || n.stoken, t.size = t.size || n.size, t.type = t.type || n.type, t.hl = t.lang || n.lang, t.badge = t.badge || n.badge, t.sitekey || function () { throw new Error('You need to set the "key" attribute to your public reCaptcha key. If you don\'t have a key, please get one from https://www.google.com/recaptcha/admin/create') }(), (u ? a.when(u) : f).then((function (n) { var r = n.render(e, t); return p[r] = e, r })) }, reload: function (e) { l(), u.reset(e), r.$broadcast("reCaptchaReset", e) }, execute: function (e) { l(), u.execute(e) }, useLang: function (e, t) { var n = p[e]; if (!n) throw new Error("reCaptcha Widget ID not exists", e); var r = n.querySelector("iframe"); if (!t) return r && r.src && /[?&]hl=\w+/.test(r.src) ? r.src.replace(/.+[?&]hl=(\w+)([^\w].+)?/, "$1") : null; if (r && r.src) { var i = r.src; /[?&]hl=/.test(i) ? i = i.replace(/([?&]hl=)\w+/, "$1" + t) : i += (-1 === i.indexOf("?") ? "?" : "&") + "hl=" + t, r.src = i } }, getResponse: function (e) { return l(), u.getResponse(e) }, getInstance: function (e) { return p[e] }, destroy: function (e) { delete p[e] } } }] })) }(angular), function (e) { "use strict"; e.module("vcRecaptcha").directive("vcRecaptcha", ["$document", "$timeout", "vcRecaptchaService", function (t, n, r) { return { restrict: "A", require: "?^^form", scope: { response: "=?ngModel", key: "=?", stoken: "=?", theme: "=?", size: "=?", type: "=?", lang: "=?", badge: "=?", tabindex: "=?", required: "=?", onCreate: "&", onSuccess: "&", onExpire: "&", onError: "&" }, link: function (i, a, o, s) { function l() { s && s.$setValidity("recaptcha", null), r.destroy(i.widgetId), e.element(t[0].querySelectorAll(".pls-container")).parent().remove() } function c() { n((function () { i.response = "", d(), i.onExpire({ widgetId: i.widgetId }) })) } function u() { var e = arguments; n((function () { i.response = "", d(), i.onError({ widgetId: i.widgetId, arguments: e }) })) } function d() { s && s.$setValidity("recaptcha", !1 === i.required ? null : Boolean(i.response)) } i.widgetId = null, s && e.isDefined(o.required) && i.$watch("required", d); var f = i.$watch("key", (function (t) { r.create(a[0], { callback: function (e) { n((function () { i.response = e, d(), i.onSuccess({ response: e, widgetId: i.widgetId }) })) }, key: t, stoken: i.stoken || o.stoken || null, theme: i.theme || o.theme || null, type: i.type || o.type || null, lang: i.lang || o.lang || null, tabindex: i.tabindex || o.tabindex || null, size: i.size || o.size || null, badge: i.badge || o.badge || null, "expired-callback": c, "error-callback": o.onError ? u : void 0 }).then((function (t) { d(), i.widgetId = t, i.onCreate({ widgetId: t }), i.$on("$destroy", l), i.$on("reCaptchaReset", (function (n, r) { (e.isUndefined(r) || t === r) && (i.response = "", d()) })) })), f() })) } } }]) }(angular),
    /**
     * State-based routing for AngularJS
     * @version v0.3.2
     * @link http://angular-ui.github.com/
     * @license MIT License, http://www.opensource.org/licenses/MIT
     */
    "undefined" != typeof module && "undefined" != typeof exports && module.exports === exports && (module.exports = "ui.router"), function (e, t, n) { "use strict"; function r(e, t) { return q(new (q((function () { }), { prototype: e })), t) } function i(e) { return j(arguments, (function (t) { t !== e && j(t, (function (t, n) { e.hasOwnProperty(n) || (e[n] = t) })) })), e } function a(e) { if (Object.keys) return Object.keys(e); var t = []; return j(e, (function (e, n) { t.push(n) })), t } function o(e, t) { if (Array.prototype.indexOf) return e.indexOf(t, Number(arguments[2]) || 0); var n = e.length >>> 0, r = Number(arguments[2]) || 0; for ((r = r < 0 ? Math.ceil(r) : Math.floor(r)) < 0 && (r += n); r < n; r++)if (r in e && e[r] === t) return r; return -1 } function s(e, t, n, r) { var i, s = function (e, t) { var n = []; for (var r in e.path) { if (e.path[r] !== t.path[r]) break; n.push(e.path[r]) } return n }(n, r), l = {}, c = []; for (var u in s) if (s[u] && s[u].params && (i = a(s[u].params)).length) for (var d in i) o(c, i[d]) >= 0 || (c.push(i[d]), l[i[d]] = e[i[d]]); return q({}, l, t) } function l(e, t, n) { if (!n) for (var r in n = [], e) n.push(r); for (var i = 0; i < n.length; i++) { var a = n[i]; if (e[a] != t[a]) return !1 } return !0 } function c(e, t) { var n = {}; return j(e, (function (e) { n[e] = t[e] })), n } function u(e) { var t = {}, n = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1)); return j(n, (function (n) { n in e && (t[n] = e[n]) })), t } function d(e) { var t = {}, n = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1)); for (var r in e) -1 == o(n, r) && (t[r] = e[r]); return t } function f(e, t) { var n = R(e), r = n ? [] : {}; return j(e, (function (e, i) { t(e, i) && (r[n ? r.length : i] = e) })), r } function p(e, t) { var n = R(e) ? [] : {}; return j(e, (function (e, r) { n[r] = t(e, r) })), n } function h(e) { return e.then(n, (function () { })) && e } function m(e, t) { var r = {}, s = [], l = r, c = q(e.when(r), { $$promises: r, $$values: r }); this.study = function (r) { function u(e) { return V(e) && e.then && e.$$promises } if (!V(r)) throw new Error("'invocables' must be an object"); var f = a(r || {}), p = [], h = [], m = {}; return j(r, (function e(n, i) { if (2 !== m[i]) { if (h.push(i), 1 === m[i]) throw h.splice(0, o(h, i)), new Error("Cyclic dependency: " + h.join(" -> ")); if (m[i] = 1, L(n)) p.push(i, [function () { return t.get(n) }], s); else { var a = t.annotate(n); j(a, (function (t) { t !== i && r.hasOwnProperty(t) && e(r[t], t) })), p.push(i, n, a) } h.pop(), m[i] = 2 } })), r = h = m = null, function (r, a, o) { function s() { --b || (w || i(y, a.$$values), v.$$values = y, v.$$promises = v.$$promises || !0, delete v.$$inheritedValues, g.resolve(y)) } function h(e) { v.$$failure = e, g.reject(e) } function m(n, i, a) { function l(e) { u.reject(e), h(e) } function c() { if (!_(v.$$failure)) try { u.resolve(t.invoke(i, o, y)), u.promise.then((function (e) { y[n] = e, s() }), l) } catch (e) { l(e) } } var u = e.defer(), d = 0; j(a, (function (e) { $.hasOwnProperty(e) && !r.hasOwnProperty(e) && (d++, $[e].then((function (t) { y[e] = t, --d || c() }), l)) })), d || c(), $[n] = u.promise } if (u(r) && o === n && (o = a, a = r, r = null), r) { if (!V(r)) throw new Error("'locals' must be an object") } else r = l; if (a) { if (!u(a)) throw new Error("'parent' must be a promise returned by $resolve.resolve()") } else a = c; var g = e.defer(), v = g.promise, $ = v.$$promises = {}, y = q({}, r), b = 1 + p.length / 3, w = !1; if (_(a.$$failure)) return h(a.$$failure), v; a.$$inheritedValues && i(y, d(a.$$inheritedValues, f)), q($, a.$$promises), a.$$values ? (w = i(y, d(a.$$values, f)), v.$$inheritedValues = d(a.$$values, f), s()) : (a.$$inheritedValues && (v.$$inheritedValues = d(a.$$inheritedValues, f)), a.then(s, h)); for (var S = 0, C = p.length; S < C; S += 3)r.hasOwnProperty(p[S]) ? s() : m(p[S], p[S + 1], p[S + 2]); return v } }, this.resolve = function (e, t, n, r) { return this.study(e)(t, n, r) } } function g(e, t, n) { this.fromConfig = function (e, t, n) { return _(e.template) ? this.fromString(e.template, t) : _(e.templateUrl) ? this.fromUrl(e.templateUrl, t) : _(e.templateProvider) ? this.fromProvider(e.templateProvider, t, n) : null }, this.fromString = function (e, t) { return N(e) ? e(t) : e }, this.fromUrl = function (n, r) { return N(n) && (n = n(r)), null == n ? null : e.get(n, { cache: t, headers: { Accept: "text/html" } }).then((function (e) { return e.data })) }, this.fromProvider = function (e, t, r) { return n.invoke(e, null, r || { params: t }) } } function v(e, t, i) { function a(t, n, r, i) { if (y.push(t), v[t]) return v[t]; if (!/^\w+([-.]+\w+)*(?:\[\])?$/.test(t)) throw new Error("Invalid parameter name '" + t + "' in pattern '" + e + "'"); if ($[t]) throw new Error("Duplicate parameter name '" + t + "' in pattern '" + e + "'"); return $[t] = new F.Param(t, n, r, i), $[t] } function o(e, t, n, r) { var i = ["", ""], a = e.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&"); if (!t) return a; switch (n) { case !1: i = ["(", ")" + (r ? "?" : "")]; break; case !0: a = a.replace(/\/$/, ""), i = ["(?:/(", ")|/)?"]; break; default: i = ["(" + n + "|", ")?"] }return a + i[0] + t + i[1] } function s(i, a) { var o, s, l, c, u; return o = i[2] || i[3], u = t.params[o], l = e.substring(m, i.index), (s = a ? i[4] : i[4] || ("*" == i[1] ? ".*" : null)) && (c = F.type(s) || r(F.type("string"), { pattern: new RegExp(s, t.caseInsensitive ? "i" : n) })), { id: o, regexp: s, segment: l, type: c, cfg: u } } t = q({ params: {} }, V(t) ? t : {}); var l, c, u, d, f = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, p = /([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, h = "^", m = 0, g = this.segments = [], v = i ? i.params : {}, $ = this.params = i ? i.params.$$new() : new F.ParamSet, y = []; for (this.source = e; (l = f.exec(e)) && !((c = s(l, !1)).segment.indexOf("?") >= 0);)u = a(c.id, c.type, c.cfg, "path"), h += o(c.segment, u.type.pattern.source, u.squash, u.isOptional), g.push(c.segment), m = f.lastIndex; var b = (d = e.substring(m)).indexOf("?"); if (b >= 0) { var w = this.sourceSearch = d.substring(b); if (d = d.substring(0, b), this.sourcePath = e.substring(0, m + b), w.length > 0) for (m = 0; l = p.exec(w);)u = a((c = s(l, !0)).id, c.type, c.cfg, "search"), m = f.lastIndex } else this.sourcePath = e, this.sourceSearch = ""; h += o(d) + (!1 === t.strict ? "/?" : "") + "$", g.push(d), this.regexp = new RegExp(h, t.caseInsensitive ? "i" : n), this.prefix = g[0], this.$$paramNames = y } function $(e) { q(this, e) } function y(e, r) { function i(e) { var t = /^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(e.source); return null != t ? t[1].replace(/\\(.)/g, "$1") : "" } function a(e, t, n) { if (!n) return !1; var r = e.invoke(t, t, { $match: n }); return !_(r) || r } function o(r, i, a, o, d) { function f(e) { function t(e) { var t = e(a, r); return !!t && (L(t) && r.replace().url(t), !0) } if (!e || !e.defaultPrevented) { h && r.url(), h = n; var i, o = l.length; for (i = 0; i < o; i++)if (t(l[i])) return; c && t(c) } } function p() { return s = s || i.$on("$locationChangeSuccess", f) } var h, m = o.baseHref(), g = r.url(); return u || p(), { sync: function () { f() }, listen: function () { return p() }, update: function (e) { return e ? void (g = r.url()) : void (r.url() !== g && (r.url(g), r.replace())) }, push: function (e, t, i) { var a = e.format(t || {}); null !== a && t && t["#"] && (a += "#" + t["#"]), r.url(a), h = i && i.$$avoidResync ? r.url() : n, i && i.replace && r.replace() }, href: function (n, i, a) { if (!n.validates(i)) return null; var o = e.html5Mode(); t.isObject(o) && (o = o.enabled), o = o && d.history; var s = n.format(i); if (a = a || {}, o || null === s || (s = "#" + e.hashPrefix() + s), null !== s && i && i["#"] && (s += "#" + i["#"]), s = function (e, t, n) { return "/" === m ? e : t ? m.slice(0, -1) + e : n ? m.slice(1) + e : e }(s, o, a.absolute), !a.absolute || !s) return s; var l = !o && s ? "/" : "", c = r.port(); return c = 80 === c || 443 === c ? "" : ":" + c, [r.protocol(), "://", r.host(), c, l, s].join("") } } } var s, l = [], c = null, u = !1; this.rule = function (e) { if (!N(e)) throw new Error("'rule' must be a function"); return l.push(e), this }, this.otherwise = function (e) { if (L(e)) { var t = e; e = function () { return t } } else if (!N(e)) throw new Error("'rule' must be a function"); return c = e, this }, this.when = function (e, t) { var n, o = L(t); if (L(e) && (e = r.compile(e)), !o && !N(t) && !R(t)) throw new Error("invalid 'handler' in when()"); var s = { matcher: function (e, t) { return o && (n = r.compile(t), t = ["$match", function (e) { return n.format(e) }]), q((function (n, r) { return a(n, t, e.exec(r.path(), r.search())) }), { prefix: L(e.prefix) ? e.prefix : "" }) }, regex: function (e, t) { if (e.global || e.sticky) throw new Error("when() RegExp must not be global or sticky"); return o && (n = t, t = ["$match", function (e) { return function (e, t) { return e.replace(/\$(\$|\d{1,2})/, (function (e, n) { return t["$" === n ? 0 : Number(n)] })) }(n, e) }]), q((function (n, r) { return a(n, t, e.exec(r.path())) }), { prefix: i(e) }) } }, l = { matcher: r.isMatcher(e), regex: e instanceof RegExp }; for (var c in l) if (l[c]) return this.rule(s[c](e, t)); throw new Error("invalid 'what' in when()") }, this.deferIntercept = function (e) { e === n && (e = !0), u = e }, this.$get = o, o.$inject = ["$location", "$rootScope", "$injector", "$browser", "$sniffer"] } function b(e, i) { function d(e, t) { if (!e) return n; var r = L(e), i = r ? e : e.name, a = function (e) { return 0 === e.indexOf(".") || 0 === e.indexOf("^") }(i); if (a) { if (!t) throw new Error("No reference point given for path '" + i + "'"); t = d(t); for (var o = i.split("."), s = 0, l = o.length, c = t; s < l; s++)if ("" !== o[s] || 0 !== s) { if ("^" !== o[s]) break; if (!c.parent) throw new Error("Path '" + i + "' not valid for state '" + t.name + "'"); c = c.parent } else c = t; o = o.slice(s).join("."), i = c.name + (c.name && o ? "." : "") + o } var u = b[i]; return !u || !r && (r || u !== e && u.self !== e) ? n : u } function f(t) { var n = (t = r(t, { self: t, resolve: t.resolve || {}, toString: function () { return this.name } })).name; if (!L(n) || n.indexOf("@") >= 0) throw new Error("State must have a valid name"); if (b.hasOwnProperty(n)) throw new Error("State '" + n + "' is already defined"); var i = -1 !== n.indexOf(".") ? n.substring(0, n.lastIndexOf(".")) : L(t.parent) ? t.parent : V(t.parent) && L(t.parent.name) ? t.parent.name : ""; if (i && !b[i]) return function (e, t) { w[e] || (w[e] = []), w[e].push(t) }(i, t.self); for (var a in C) N(C[a]) && (t[a] = C[a](t, C.$delegates[a])); return b[n] = t, !t[S] && t.url && e.when(t.url, ["$match", "$stateParams", function (e, n) { y.$current.navigable == t && l(e, n) || y.transitionTo(t, e, { inherit: !0, location: !1 }) }]), function (e) { for (var t = w[e] || []; t.length;)f(t.shift()) }(n), t } function m(e) { for (var t = e.split("."), n = y.$current.name.split("."), r = 0, i = t.length; r < i; r++)"*" === t[r] && (n[r] = "*"); return "**" === t[0] && (n = n.slice(o(n, t[1]))).unshift("**"), "**" === t[t.length - 1] && (n.splice(o(n, t[t.length - 2]) + 1, Number.MAX_VALUE), n.push("**")), t.length == n.length && n.join("") === t.join("") } function g(e, i, o, u, f, g, w, C, x) { function k(t, n, r, a) { var o = e.$broadcast("$stateNotFound", t, n, r); if (o.defaultPrevented) return w.update(), I; if (!o.retry) return null; if (a.$retry) return w.update(), M; var s = y.transition = i.when(o.retry); return s.then((function () { return s !== y.transition ? (e.$broadcast("$stateChangeCancel", t.to, t.toParams, n, r), T) : (t.options.$retry = !0, y.transitionTo(t.to, t.toParams, t.options)) }), (function () { return I })), w.update(), s } function D(e, n, r, a, s, l) { var d = r ? n : c(e.params.$$keys(), n), p = { $stateParams: d }; s.resolve = f.resolve(e.resolve, p, s.resolve, e); var h = [s.resolve.then((function (e) { s.globals = e }))]; return a && h.push(a), i.all(h).then((function () { var n = []; return j(e.views, (function (r, i) { var a = r.resolve && r.resolve !== e.resolve ? r.resolve : {}; a.$template = [function () { return o.load(i, { view: r, locals: s.globals, params: d, notify: l.notify }) || "" }], n.push(f.resolve(a, s.globals, s.resolve, e).then((function (n) { if (N(r.controllerProvider) || R(r.controllerProvider)) { var o = t.extend({}, a, s.globals); n.$$controller = u.invoke(r.controllerProvider, null, o) } else n.$$controller = r.controller; n.$$state = e, n.$$controllerAs = r.controllerAs, n.$$resolveAs = r.resolveAs, s[i] = n }))) })), i.all(n).then((function () { return s.globals })) })).then((function (e) { return s })) } var E = new Error("transition superseded"), T = h(i.reject(E)), A = h(i.reject(new Error("transition prevented"))), I = h(i.reject(new Error("transition aborted"))), M = h(i.reject(new Error("transition failed"))); return $.locals = { resolve: null, globals: { $stateParams: {} } }, (y = { params: {}, current: $.self, $current: $, transition: null }).reload = function (e) { return y.transitionTo(y.current, g, { reload: e || !0, inherit: !1, notify: !0 }) }, y.go = function (e, t, n) { return y.transitionTo(e, t, q({ inherit: !0, relative: y.$current }, n)) }, y.transitionTo = function (t, n, a) { n = n || {}, a = q({ location: !0, inherit: !1, relative: null, notify: !0, reload: !1, $retry: !1 }, a || {}); var o = y.$current, l = y.params, f = o.path, p = d(t, a.relative), h = n["#"]; if (!_(p)) { var m = { to: t, toParams: n, options: a }, b = k(m, o.self, l, a); if (b) return b; if (n = m.toParams, p = d(t = m.to, (a = m.options).relative), !_(p)) { if (!a.relative) throw new Error("No such state '" + t + "'"); throw new Error("Could not resolve '" + t + "' from state '" + a.relative + "'") } } if (p[S]) throw new Error("Cannot transition to abstract state '" + t + "'"); if (a.inherit && (n = s(g, n || {}, y.$current, p)), !p.params.$$validates(n)) return M; n = p.params.$$values(n); var C = (t = p).path, x = 0, I = C[x], O = $.locals, P = []; if (a.reload) { if (L(a.reload) || V(a.reload)) { if (V(a.reload) && !a.reload.name) throw new Error("Invalid reload state object"); var F = !0 === a.reload ? f[0] : d(a.reload); if (a.reload && !F) throw new Error("No such reload state '" + (L(a.reload) ? a.reload : a.reload.name) + "'"); for (; I && I === f[x] && I !== F;)O = P[x] = I.locals, x++, I = C[x] } } else for (; I && I === f[x] && I.ownParams.$$equals(n, l);)O = P[x] = I.locals, x++, I = C[x]; if (v(t, n, o, l, O, a)) return h && (n["#"] = h), y.params = n, U(y.params, g), U(c(t.params.$$keys(), g), t.locals.globals.$stateParams), a.location && t.navigable && t.navigable.url && (w.push(t.navigable.url, n, { $$avoidResync: !0, replace: "replace" === a.location }), w.update(!0)), y.transition = null, i.when(y.current); if (n = c(t.params.$$keys(), n || {}), h && (n["#"] = h), a.notify && e.$broadcast("$stateChangeStart", t.self, n, o.self, l, a).defaultPrevented) return e.$broadcast("$stateChangeCancel", t.self, n, o.self, l), null == y.transition && w.update(), A; for (var N = i.when(O), R = x; R < C.length; R++, I = C[R])O = P[R] = r(O), N = D(I, n, I === t, N, O, a); var j = y.transition = N.then((function () { var r, i, s; if (y.transition !== j) return e.$broadcast("$stateChangeCancel", t.self, n, o.self, l), T; for (r = f.length - 1; r >= x; r--)(s = f[r]).self.onExit && u.invoke(s.self.onExit, s.self, s.locals.globals), s.locals = null; for (r = x; r < C.length; r++)(i = C[r]).locals = P[r], i.self.onEnter && u.invoke(i.self.onEnter, i.self, i.locals.globals); return y.transition !== j ? (e.$broadcast("$stateChangeCancel", t.self, n, o.self, l), T) : (y.$current = t, y.current = t.self, y.params = n, U(y.params, g), y.transition = null, a.location && t.navigable && w.push(t.navigable.url, t.navigable.locals.globals.$stateParams, { $$avoidResync: !0, replace: "replace" === a.location }), a.notify && e.$broadcast("$stateChangeSuccess", t.self, n, o.self, l), w.update(!0), y.current) })).then(null, (function (r) { return r === E ? T : y.transition !== j ? (e.$broadcast("$stateChangeCancel", t.self, n, o.self, l), T) : (y.transition = null, e.$broadcast("$stateChangeError", t.self, n, o.self, l, r).defaultPrevented || w.update(), i.reject(r)) })); return j }, y.is = function (e, t, r) { var i = d(e, (r = q({ relative: y.$current }, r || {})).relative); return _(i) ? y.$current === i && (!t || l(i.params.$$values(t), g)) : n }, y.includes = function (e, t, r) { if (r = q({ relative: y.$current }, r || {}), L(e) && function (e) { return e.indexOf("*") > -1 }(e)) { if (!m(e)) return !1; e = y.$current.name } var i = d(e, r.relative); if (!_(i)) return n; if (!_(y.$current.includes[i.name])) return !1; if (!t) return !0; for (var o = a(t), s = 0; s < o.length; s++) { var l = o[s], c = i.params[l]; if (c && !c.type.equals(g[l], t[l])) return !1 } return !0 }, y.href = function (e, t, r) { var i = d(e, (r = q({ lossy: !0, inherit: !0, absolute: !1, relative: y.$current }, r || {})).relative); if (!_(i)) return null; r.inherit && (t = s(g, t || {}, y.$current, i)); var a = i && r.lossy ? i.navigable : i; return a && a.url !== n && null !== a.url ? w.href(a.url, c(i.params.$$keys().concat("#"), t || {}), { absolute: r.absolute }) : null }, y.get = function (e, t) { if (0 === arguments.length) return p(a(b), (function (e) { return b[e].self })); var n = d(e, t || y.$current); return n && n.self ? n.self : null }, y } function v(e, t, n, r, i, a) { if (!a.reload && e === n && (i === n.locals || !1 === e.self.reloadOnSearch && function (e, t, n) { var r = e.params.$$keys().filter((function (t) { return "search" != e.params[t].location })), i = u.apply({}, [e.params].concat(r)); return new F.ParamSet(i).$$equals(t, n) }(n, r, t))) return !0 } var $, y, b = {}, w = {}, S = "abstract", C = { parent: function (e) { if (_(e.parent) && e.parent) return d(e.parent); var t = /^(.+)\.[^.]+$/.exec(e.name); return t ? d(t[1]) : $ }, data: function (e) { return e.parent && e.parent.data && (e.data = e.self.data = r(e.parent.data, e.data)), e.data }, url: function (e) { var t = e.url, n = { params: e.params || {} }; if (L(t)) return "^" == t.charAt(0) ? i.compile(t.substring(1), n) : (e.parent.navigable || $).url.concat(t, n); if (!t || i.isMatcher(t)) return t; throw new Error("Invalid url '" + t + "' in state '" + e + "'") }, navigable: function (e) { return e.url ? e : e.parent ? e.parent.navigable : null }, ownParams: function (e) { var t = e.url && e.url.params || new F.ParamSet; return j(e.params || {}, (function (e, n) { t[n] || (t[n] = new F.Param(n, null, e, "config")) })), t }, params: function (e) { var t = u(e.ownParams, e.ownParams.$$keys()); return e.parent && e.parent.params ? q(e.parent.params.$$new(), t) : new F.ParamSet }, views: function (e) { var t = {}; return j(_(e.views) ? e.views : { "": e }, (function (n, r) { r.indexOf("@") < 0 && (r += "@" + e.parent.name), n.resolveAs = n.resolveAs || e.resolveAs || "$resolve", t[r] = n })), t }, path: function (e) { return e.parent ? e.parent.path.concat(e) : [] }, includes: function (e) { var t = e.parent ? q({}, e.parent.includes) : {}; return t[e.name] = !0, t }, $delegates: {} }; ($ = f({ name: "", url: "^", views: null, abstract: !0 })).navigable = null, this.decorator = function (e, t) { return L(e) && !_(t) ? C[e] : N(t) && L(e) ? (C[e] && !C.$delegates[e] && (C.$delegates[e] = C[e]), C[e] = t, this) : this }, this.state = function (e, t) { return V(e) ? t = e : t.name = e, f(t), this }, this.$get = g, g.$inject = ["$rootScope", "$q", "$view", "$injector", "$resolve", "$stateParams", "$urlRouter", "$location", "$urlMatcherFactory"] } function w() { function e(e, t) { return { load: function (e, n) { var r; return (n = q({ template: null, controller: null, view: null, locals: null, notify: !0, async: !0, params: {} }, n)).view && (r = t.fromConfig(n.view, n.params, n.locals)), r } } } this.$get = e, e.$inject = ["$rootScope", "$templateFactory"] } function S(e, n, r, i, a) { function o(e, n) { if (c) return { enter: function (e, n, r) { t.version.minor > 2 ? c.enter(e, null, n).then(r) : c.enter(e, null, n, r) }, leave: function (e, n) { t.version.minor > 2 ? c.leave(e).then(n) : c.leave(e, n) } }; if (l) { var r = l && l(n, e); return { enter: function (e, t, n) { r.enter(e, null, t), n() }, leave: function (e, t) { r.leave(e), t() } } } return { enter: function (e, t, n) { t.after(e), n() }, leave: function (e, t) { e.remove(), t() } } } var s = n.has ? function (e) { return n.has(e) ? n.get(e) : null } : function (e) { try { return n.get(e) } catch (e) { return null } }, l = s("$animator"), c = s("$animate"), u = { restrict: "ECA", terminal: !0, priority: 400, transclude: "element", compile: function (n, s, l) { return function (n, s, c) { function u() { if (f && (f.remove(), f = null), h && (h.$destroy(), h = null), p) { var e = p.data("$uiViewAnim"); $.leave(p, (function () { e.$$animLeave.resolve(), f = null })), f = p, p = null } } function d(o) { var d, f = x(n, c, s, i), y = f && e.$current && e.$current.locals[f]; if (o || y !== m) { d = n.$new(), m = e.$current.locals[f], d.$emit("$viewContentLoading", f); var b = l(d, (function (e) { var i = a.defer(), o = a.defer(), l = { $animEnter: i.promise, $animLeave: o.promise, $$animLeave: o }; e.data("$uiViewAnim", l), $.enter(e, s, (function () { i.resolve(), h && h.$emit("$viewContentAnimationEnded"), (t.isDefined(v) && !v || n.$eval(v)) && r(e) })), u() })); p = b, (h = d).$emit("$viewContentLoaded", f), h.$eval(g) } } var f, p, h, m, g = c.onload || "", v = c.autoscroll, $ = o(c, n); s.inheritedData("$uiView"), n.$on("$stateChangeSuccess", (function () { d(!1) })), d(!0) } } }; return u } function C(e, n, r, i) { return { restrict: "ECA", priority: -400, compile: function (a) { var o = a.html(); return function (a, s, l) { var c = r.$current, u = x(a, l, s, i), d = c && c.locals[u]; if (d) { s.data("$uiView", { name: u, state: d.$$state }), s.html(d.$template ? d.$template : o); var f = t.extend({}, d); a[d.$$resolveAs] = f; var p = e(s.contents()); if (d.$$controller) { d.$scope = a, d.$element = s; var h = n(d.$$controller, d); d.$$controllerAs && (a[d.$$controllerAs] = h, a[d.$$controllerAs][d.$$resolveAs] = f), N(h.$onInit) && h.$onInit(), s.data("$ngControllerController", h), s.children().data("$ngControllerController", h) } p(a) } } } } } function x(e, t, n, r) { var i = r(t.uiView || t.name || "")(e), a = n.inheritedData("$uiView"); return i.indexOf("@") >= 0 ? i : i + "@" + (a ? a.state.name : "") } function k(e, t) { var n, r = e.match(/^\s*({[^}]*})\s*$/); if (r && (e = t + "(" + r[1] + ")"), !(n = e.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/)) || 4 !== n.length) throw new Error("Invalid state ref '" + e + "'"); return { state: n[1], paramExpr: n[3] || null } } function D(e) { var t = e.parent().inheritedData("$uiView"); if (t && t.state && t.state.name) return t.state } function E(e) { var t = "[object SVGAnimatedString]" === Object.prototype.toString.call(e.prop("href")), n = "FORM" === e[0].nodeName; return { attr: n ? "action" : t ? "xlink:href" : "href", isAnchor: "A" === e.prop("tagName").toUpperCase(), clickable: !n } } function T(e, t, n, r, i) { return function (a) { var o = a.which || a.button, s = i(); if (!(o > 1 || a.ctrlKey || a.metaKey || a.shiftKey || e.attr("target"))) { var l = n((function () { t.go(s.state, s.params, s.options) })); a.preventDefault(); var c = r.isAnchor && !s.href ? 1 : 0; a.preventDefault = function () { c-- <= 0 && n.cancel(l) } } } } function A(e, n) { return { restrict: "A", require: ["?^uiSrefActive", "?^uiSrefActiveEq"], link: function (r, i, a, o) { var s, l = k(a.uiSref, e.current.name), c = { state: l.state, href: null, params: null }, u = E(i), d = o[1] || o[0], f = null; c.options = q(function (e, t) { return { relative: D(e) || t.$current, inherit: !0 } }(i, e), a.uiSrefOpts ? r.$eval(a.uiSrefOpts) : {}); var p = function (n) { n && (c.params = t.copy(n)), c.href = e.href(l.state, c.params, c.options), f && f(), d && (f = d.$$addStateInfo(l.state, c.params)), null !== c.href && a.$set(u.attr, c.href) }; l.paramExpr && (r.$watch(l.paramExpr, (function (e) { e !== c.params && p(e) }), !0), c.params = t.copy(r.$eval(l.paramExpr))), p(), u.clickable && (s = T(i, e, n, u, (function () { return c })), i[i.on ? "on" : "bind"]("click", s), r.$on("$destroy", (function () { i[i.off ? "off" : "unbind"]("click", s) }))) } } } function I(e, t) { return { restrict: "A", require: ["?^uiSrefActive", "?^uiSrefActiveEq"], link: function (n, r, i, a) { function o(t) { d.state = t[0], d.params = t[1], d.options = t[2], d.href = e.href(d.state, d.params, d.options), f && f(), c && (f = c.$$addStateInfo(d.state, d.params)), d.href && i.$set(l.attr, d.href) } var s, l = E(r), c = a[1] || a[0], u = "[" + [i.uiState, i.uiStateParams || null, i.uiStateOpts || null].map((function (e) { return e || "null" })).join(", ") + "]", d = { state: null, params: null, options: null, href: null }, f = null; n.$watch(u, o, !0), o(n.$eval(u)), l.clickable && (s = T(r, e, t, l, (function () { return d })), r[r.on ? "on" : "bind"]("click", s), n.$on("$destroy", (function () { r[r.off ? "off" : "unbind"]("click", s) }))) } } } function M(e, t, n) { return { restrict: "A", controller: ["$scope", "$element", "$attrs", "$timeout", function (t, r, i, a) { function o(t, n, i) { var a = e.get(t, D(r)), o = s(t, n), l = { state: a || { name: t }, params: n, hash: o }; return m.push(l), g[o] = i, function () { var e = m.indexOf(l); -1 !== e && m.splice(e, 1) } } function s(e, n) { if (!L(e)) throw new Error("state should be a string"); return V(n) ? e + B(n) : (n = t.$eval(n), V(n) ? e + B(n) : e) } function l() { for (var e = 0; e < m.length; e++)d(m[e].state, m[e].params) ? c(r, g[m[e].hash]) : u(r, g[m[e].hash]), f(m[e].state, m[e].params) ? c(r, p) : u(r, p) } function c(e, t) { a((function () { e.addClass(t) })) } function u(e, t) { e.removeClass(t) } function d(t, n) { return e.includes(t.name, n) } function f(t, n) { return e.is(t.name, n) } var p, h, m = [], g = {}; p = n(i.uiSrefActiveEq || "", !1)(t); try { h = t.$eval(i.uiSrefActive) } catch (e) { } h = h || n(i.uiSrefActive || "", !1)(t), V(h) && j(h, (function (n, r) { if (L(n)) { var i = k(n, e.current.name); o(i.state, t.$eval(i.paramExpr), r) } })), this.$$addStateInfo = function (e, t) { if (!(V(h) && m.length > 0)) { var n = o(e, t, h); return l(), n } }, t.$on("$stateChangeSuccess", l), l() }] } } function O(e) { var t = function (t, n) { return e.is(t, n) }; return t.$stateful = !0, t } function P(e) { var t = function (t, n, r) { return e.includes(t, n, r) }; return t.$stateful = !0, t } var F, _ = t.isDefined, N = t.isFunction, L = t.isString, V = t.isObject, R = t.isArray, j = t.forEach, q = t.extend, U = t.copy, B = t.toJson; t.module("ui.router.util", ["ng"]), t.module("ui.router.router", ["ui.router.util"]), t.module("ui.router.state", ["ui.router.router", "ui.router.util"]), t.module("ui.router", ["ui.router.state"]), t.module("ui.router.compat", ["ui.router"]), m.$inject = ["$q", "$injector"], t.module("ui.router.util").service("$resolve", m), g.$inject = ["$http", "$templateCache", "$injector"], t.module("ui.router.util").service("$templateFactory", g), v.prototype.concat = function (e, t) { var n = { caseInsensitive: F.caseInsensitive(), strict: F.strictMode(), squash: F.defaultSquashPolicy() }; return new v(this.sourcePath + e + this.sourceSearch, q(n, t), this) }, v.prototype.toString = function () { return this.source }, v.prototype.exec = function (e, t) { function n(e) { function t(e) { return e.split("").reverse().join("") } var n = p(t(e).split(/-(?!\\)/), t); return p(n, (function (e) { return e.replace(/\\-/g, "-") })).reverse() } var r = this.regexp.exec(e); if (!r) return null; t = t || {}; var i, a, o, s, l, c = this.parameters(), u = c.length, d = this.segments.length - 1, f = {}; if (d !== r.length - 1) throw new Error("Unbalanced capture group in route '" + this.source + "'"); for (i = 0; i < d; i++) { for (o = c[i], s = this.params[o], l = r[i + 1], a = 0; a < s.replace.length; a++)s.replace[a].from === l && (l = s.replace[a].to); l && !0 === s.array && (l = n(l)), _(l) && (l = s.type.decode(l)), f[o] = s.value(l) } for (; i < u; i++) { for (f[o = c[i]] = this.params[o].value(t[o]), s = this.params[o], l = t[o], a = 0; a < s.replace.length; a++)s.replace[a].from === l && (l = s.replace[a].to); _(l) && (l = s.type.decode(l)), f[o] = s.value(l) } return f }, v.prototype.parameters = function (e) { return _(e) ? this.params[e] || null : this.$$paramNames }, v.prototype.validates = function (e) { return this.params.$$validates(e) }, v.prototype.format = function (e) { function t(e) { return encodeURIComponent(e).replace(/-/g, (function (e) { return "%5C%" + e.charCodeAt(0).toString(16).toUpperCase() })) } e = e || {}; var n = this.segments, r = this.parameters(), i = this.params; if (!this.validates(e)) return null; var a, o = !1, s = n.length - 1, l = r.length, c = n[0]; for (a = 0; a < l; a++) { var u = a < s, d = r[a], f = i[d], h = f.value(e[d]), m = f.isOptional && f.type.equals(f.value(), h), g = !!m && f.squash, v = f.type.encode(h); if (u) { var $ = n[a + 1], y = a + 1 === s; if (!1 === g) null != v && (c += R(v) ? p(v, t).join("-") : encodeURIComponent(v)), c += $; else if (!0 === g) { var b = c.match(/\/$/) ? /\/?(.*)/ : /(.*)/; c += $.match(b)[1] } else L(g) && (c += g + $); y && !0 === f.squash && "/" === c.slice(-1) && (c = c.slice(0, -1)) } else { if (null == v || m && !1 !== g) continue; if (R(v) || (v = [v]), 0 === v.length) continue; c += (o ? "&" : "?") + d + "=" + (v = p(v, encodeURIComponent).join("&" + d + "=")), o = !0 } } return c }, $.prototype.is = function (e, t) { return !0 }, $.prototype.encode = function (e, t) { return e }, $.prototype.decode = function (e, t) { return e }, $.prototype.equals = function (e, t) { return e == t }, $.prototype.$subPattern = function () { var e = this.pattern.toString(); return e.substr(1, e.length - 2) }, $.prototype.pattern = /.*/, $.prototype.toString = function () { return "{Type:" + this.name + "}" }, $.prototype.$normalize = function (e) { return this.is(e) ? e : this.decode(e) }, $.prototype.$asArray = function (e, t) { if (!e) return this; if ("auto" === e && !t) throw new Error("'auto' array mode is for query parameters only"); return new function (e, t) { function r(e, t) { return function () { return e[t].apply(e, arguments) } } function i(e) { return R(e) ? e : _(e) ? [e] : [] } function a(e) { switch (e.length) { case 0: return n; case 1: return "auto" === t ? e[0] : e; default: return e } } function o(e) { return !e } function s(e, t) { return function (n) { if (R(n) && 0 === n.length) return n; var r = p(n = i(n), e); return !0 === t ? 0 === f(r, o).length : a(r) } } this.encode = s(r(e, "encode")), this.decode = s(r(e, "decode")), this.is = s(r(e, "is"), !0), this.equals = function (e) { return function (t, n) { var r = i(t), a = i(n); if (r.length !== a.length) return !1; for (var o = 0; o < r.length; o++)if (!e(r[o], a[o])) return !1; return !0 } }(r(e, "equals")), this.pattern = e.pattern, this.$normalize = s(r(e, "$normalize")), this.name = e.name, this.$arrayMode = t }(this, e) }, t.module("ui.router.util").provider("$urlMatcherFactory", (function e() { function i(e) { return null != e ? e.toString().replace(/(~|\/)/g, (function (e) { return { "~": "~~", "/": "~2F" }[e] })) : e } function s(e) { return N(e) || R(e) && N(e[e.length - 1]) } function l() { for (; b.length;) { var e = b.shift(); if (e.pattern) throw new Error("You cannot override a type's .pattern at runtime."); t.extend(g[e.name], u.invoke(e.def)) } } function c(e) { q(this, e || {}) } F = this; var u, d = !1, h = !0, m = !1, g = {}, y = !0, b = [], w = { string: { encode: i, decode: function (e) { return null != e ? e.toString().replace(/(~~|~2F)/g, (function (e) { return { "~~": "~", "~2F": "/" }[e] })) : e }, is: function (e) { return null == e || !_(e) || "string" == typeof e }, pattern: /[^\/]*/ }, int: { encode: i, decode: function (e) { return parseInt(e, 10) }, is: function (e) { return _(e) && this.decode(e.toString()) === e }, pattern: /\d+/ }, bool: { encode: function (e) { return e ? 1 : 0 }, decode: function (e) { return 0 !== parseInt(e, 10) }, is: function (e) { return !0 === e || !1 === e }, pattern: /0|1/ }, date: { encode: function (e) { return this.is(e) ? [e.getFullYear(), ("0" + (e.getMonth() + 1)).slice(-2), ("0" + e.getDate()).slice(-2)].join("-") : n }, decode: function (e) { if (this.is(e)) return e; var t = this.capture.exec(e); return t ? new Date(t[1], t[2] - 1, t[3]) : n }, is: function (e) { return e instanceof Date && !isNaN(e.valueOf()) }, equals: function (e, t) { return this.is(e) && this.is(t) && e.toISOString() === t.toISOString() }, pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/, capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/ }, json: { encode: t.toJson, decode: t.fromJson, is: t.isObject, equals: t.equals, pattern: /[^\/]*/ }, any: { encode: t.identity, decode: t.identity, equals: t.equals, pattern: /.*/ } }; e.$$getDefaultValue = function (e) { if (!s(e.value)) return e.value; if (!u) throw new Error("Injectable functions cannot be called at configuration time"); return u.invoke(e.value) }, this.caseInsensitive = function (e) { return _(e) && (d = e), d }, this.strictMode = function (e) { return _(e) && (h = e), h }, this.defaultSquashPolicy = function (e) { if (!_(e)) return m; if (!0 !== e && !1 !== e && !L(e)) throw new Error("Invalid squash policy: " + e + ". Valid policies: false, true, arbitrary-string"); return m = e, e }, this.compile = function (e, t) { return new v(e, q({ strict: h, caseInsensitive: d }, t)) }, this.isMatcher = function (e) { if (!V(e)) return !1; var t = !0; return j(v.prototype, (function (n, r) { N(n) && (t = t && _(e[r]) && N(e[r])) })), t }, this.type = function (e, t, n) { if (!_(t)) return g[e]; if (g.hasOwnProperty(e)) throw new Error("A type named '" + e + "' has already been defined."); return g[e] = new $(q({ name: e }, t)), n && (b.push({ name: e, def: n }), y || l()), this }, j(w, (function (e, t) { g[t] = new $(q({ name: t }, e)) })), g = r(g, {}), this.$get = ["$injector", function (e) { return u = e, y = !1, l(), j(w, (function (e, t) { g[t] || (g[t] = new $(e)) })), this }], this.Param = function (e, r, i, l) { function c() { if (!u) throw new Error("Injectable functions cannot be called at configuration time"); var e = u.invoke(i.$$fn); if (null !== e && e !== n && !d.type.is(e)) throw new Error("Default value (" + e + ") for parameter '" + d.id + "' is not an instance of Type (" + d.type.name + ")"); return e } var d = this; i = function (e) { var t = V(e) ? a(e) : []; return -1 === o(t, "value") && -1 === o(t, "type") && -1 === o(t, "squash") && -1 === o(t, "array") && (e = { value: e }), e.$$fn = s(e.value) ? e.value : function () { return e.value }, e }(i), r = function (n, r, i) { if (n.type && r) throw new Error("Param '" + e + "' has two type configurations."); return r || (n.type ? t.isString(n.type) ? g[n.type] : n.type instanceof $ ? n.type : new $(n.type) : "config" === i ? g.any : g.string) }(i, r, l); var h = function () { var t = { array: "search" === l && "auto" }, n = e.match(/\[\]$/) ? { array: !0 } : {}; return q(t, n, i).array }(); "string" !== (r = h ? r.$asArray(h, "search" === l) : r).name || h || "path" !== l || i.value !== n || (i.value = ""); var v = i.value !== n, y = function (e, t) { var n = e.squash; if (!t || !1 === n) return !1; if (!_(n) || null == n) return m; if (!0 === n || L(n)) return n; throw new Error("Invalid squash policy: '" + n + "'. Valid policies: false, true, or arbitrary string") }(i, v), b = function (e, t, r, i) { var a, s, l = [{ from: "", to: r || t ? n : "" }, { from: null, to: r || t ? n : "" }]; return a = R(e.replace) ? e.replace : [], L(i) && a.push({ from: i, to: n }), s = p(a, (function (e) { return e.from })), f(l, (function (e) { return -1 === o(s, e.from) })).concat(a) }(i, h, v, y); q(this, { id: e, type: r, location: l, array: h, squash: y, replace: b, isOptional: v, value: function (e) { return e = function (e) { var t = p(f(d.replace, function (e) { return function (t) { return t.from === e } }(e)), (function (e) { return e.to })); return t.length ? t[0] : e }(e), _(e) ? d.type.$normalize(e) : c() }, dynamic: n, config: i, toString: function () { return "{Param:" + e + " " + r + " squash: '" + y + "' optional: " + v + "}" } }) }, c.prototype = { $$new: function () { return r(this, q(new c, { $$parent: this })) }, $$keys: function () { for (var e = [], t = [], n = this, r = a(c.prototype); n;)t.push(n), n = n.$$parent; return t.reverse(), j(t, (function (t) { j(a(t), (function (t) { -1 === o(e, t) && -1 === o(r, t) && e.push(t) })) })), e }, $$values: function (e) { var t = {}, n = this; return j(n.$$keys(), (function (r) { t[r] = n[r].value(e && e[r]) })), t }, $$equals: function (e, t) { var n = !0, r = this; return j(r.$$keys(), (function (i) { var a = e && e[i], o = t && t[i]; r[i].type.equals(a, o) || (n = !1) })), n }, $$validates: function (e) { var r, i, a, o, s, l = this.$$keys(); for (r = 0; r < l.length && (i = this[l[r]], (a = e[l[r]]) !== n && null !== a || !i.isOptional); r++) { if (o = i.type.$normalize(a), !i.type.is(o)) return !1; if (s = i.type.encode(o), t.isString(s) && !i.type.pattern.exec(s)) return !1 } return !0 }, $$parent: n }, this.ParamSet = c })), t.module("ui.router.util").run(["$urlMatcherFactory", function (e) { }]), y.$inject = ["$locationProvider", "$urlMatcherFactoryProvider"], t.module("ui.router.router").provider("$urlRouter", y), b.$inject = ["$urlRouterProvider", "$urlMatcherFactoryProvider"], t.module("ui.router.state").factory("$stateParams", (function () { return {} })).constant("$state.runtime", { autoinject: !0 }).provider("$state", b).run(["$injector", function (e) { e.get("$state.runtime").autoinject && e.get("$state") }]), w.$inject = [], t.module("ui.router.state").provider("$view", w), t.module("ui.router.state").provider("$uiViewScroll", (function () { var e = !1; this.useAnchorScroll = function () { e = !0 }, this.$get = ["$anchorScroll", "$timeout", function (t, n) { return e ? t : function (e) { return n((function () { e[0].scrollIntoView() }), 0, !1) } }] })), S.$inject = ["$state", "$injector", "$uiViewScroll", "$interpolate", "$q"], C.$inject = ["$compile", "$controller", "$state", "$interpolate"], t.module("ui.router.state").directive("uiView", S), t.module("ui.router.state").directive("uiView", C), A.$inject = ["$state", "$timeout"], I.$inject = ["$state", "$timeout"], M.$inject = ["$state", "$stateParams", "$interpolate"], t.module("ui.router.state").directive("uiSref", A).directive("uiSrefActive", M).directive("uiSrefActiveEq", M).directive("uiState", I), O.$inject = ["$state"], P.$inject = ["$state"], t.module("ui.router.state").filter("isState", O).filter("includedByState", P) }(window, window.angular), function (e) { function t(t) { try { e.module(t) } catch (e) { return !1 } return !0 } function n(e, n, r) { function i() { e.$on("$locationChangeStart", (function (e) { n.$_blockLocationChange && n.state().blockCount > 0 && e.preventDefault() })), e.$on("$locationChangeSuccess", (function () { n.$_blockLocationChange = r.blockBrowserNavigation })) } if (r.blockBrowserNavigation) if (t("ngRoute")) var a = e.$on("$viewContentLoaded", (function () { a(), i() })); else i() } var r = e.module("blockUI", []); r.config(["$provide", "$httpProvider", function (e, t) { e.decorator("$exceptionHandler", ["$delegate", "$injector", function (e, t) { var n, r; return function (i, a) { if ((r = r || t.get("blockUIConfig")).resetOnException) try { (n = n || t.get("blockUI")).instances.reset() } catch (e) { console.log("$exceptionHandler", i) } e(i, a) } }]), t.interceptors.push("blockUIHttpInterceptor") }]), r.run(["$document", "blockUIConfig", "$templateCache", function (e, t, n) { t.autoInjectBodyBlock && e.find("body").attr("block-ui", "main"), t.template && (t.templateUrl = "$$block-ui-template$$", n.put(t.templateUrl, t.template)) }]), r.config(["$provide", function (e) { e.decorator("$location", i) }]); var i = ["$delegate", "blockUI", "blockUIConfig", function (t, n, r) { if (r.blockBrowserNavigation) { n.$_blockLocationChange = !0; e.forEach(["url", "path", "search", "hash", "state"], (function (e) { var r = t[e]; t[e] = function () { var e = r.apply(t, arguments); return e === t && (n.$_blockLocationChange = !1), e } })) } return t }]; r.directive("blockUiContainer", ["blockUIConfig", "blockUiContainerLinkFn", function (e, t) { return { scope: !0, restrict: "A", templateUrl: e.templateUrl, compile: function () { return t } } }]).factory("blockUiContainerLinkFn", ["blockUI", "blockUIUtils", function () { return function (e, t) { var n = t.inheritedData("block-ui"); if (!n) throw new Error("No parent block-ui service instance located."); e.state = n.state() } }]), r.directive("blockUi", ["blockUiCompileFn", function (e) { return { scope: !0, restrict: "A", compile: e } }]).factory("blockUiCompileFn", ["blockUiPreLinkFn", function (e) { return function (t) { return t.append('<div block-ui-container class="block-ui-container"></div>'), { pre: e } } }]).factory("blockUiPreLinkFn", ["blockUI", "blockUIUtils", "blockUIConfig", function (e, t, r) { return function (i, a, o) { a.hasClass("block-ui") || a.addClass(r.cssClass), o.$observe("blockUiMessageClass", (function (e) { i.$_blockUiMessageClass = e })); var s = o.blockUi || "_" + i.$id, l = e.instances.get(s); if ("main" === s) n(i, l, r); else { var c = a.inheritedData("block-ui"); c && (l._parent = c) } i.$on("$destroy", (function () { l.release() })), l.addRef(), i.$_blockUiState = l.state(), i.$watch("$_blockUiState.blocking", (function (e) { a.attr("aria-busy", !!e), a.toggleClass("block-ui-visible", !!e) })), i.$watch("$_blockUiState.blockCount > 0", (function (e) { a.toggleClass("block-ui-active", !!e) })); var u = o.blockUiPattern; if (u) { var d = t.buildRegExp(u); l.pattern(d) } a.data("block-ui", l) } }]), r.constant("blockUIConfig", { templateUrl: "angular-block-ui/angular-block-ui.ng.html", delay: 250, message: "Loading ...", autoBlock: !0, resetOnException: !0, requestFilter: e.noop, autoInjectBodyBlock: !0, cssClass: "block-ui block-ui-anim-fade", blockBrowserNavigation: !1 }), r.factory("blockUIHttpInterceptor", ["$q", "$injector", "blockUIConfig", "$templateCache", function (e, t, n, r) { function i() { s = s || t.get("blockUI") } function a(e) { n.autoBlock && e && !e.$_noBlock && e.$_blocks && (i(), e.$_blocks.stop()) } function o(t) { try { a(t.config) } catch (e) { console.log("httpRequestError", e) } return e.reject(t) } var s; return { request: function (e) { if (n.autoBlock && ("GET" != e.method || !r.get(e.url))) { var t = n.requestFilter(e); !1 === t ? e.$_noBlock = !0 : (i(), e.$_blocks = s.instances.locate(e), e.$_blocks.start(t)) } return e }, requestError: o, response: function (e) { return e && a(e.config), e }, responseError: o } }]), r.factory("blockUI", ["blockUIConfig", "$timeout", "blockUIUtils", "$document", function (t, n, r, i) { function a(a) { var l, u = this, d = { id: a, blockCount: 0, message: t.message, blocking: !1 }, f = []; this._id = a, this._refs = 0, this.start = function (a) { function c() { l = null, d.blocking = !0 } a = a || {}, e.isString(a) ? a = { message: a } : e.forEach(s, (function (e) { if (a[e]) throw new Error("The property " + e + " is reserved for the block state.") })), e.extend(d, a), d.message = d.blockCount > 0 ? a.message || d.message || t.message : a.message || t.message, d.blockCount++; var f = e.element(i[0].activeElement); f.length && r.isElementInBlockScope(f, u) && (u._restoreFocus = f[0], n((function () { u._restoreFocus && u._restoreFocus !== o[0] && u._restoreFocus.blur() }))), l || 0 === t.delay ? 0 === t.delay && c() : l = n(c, t.delay) }, this._cancelStartTimeout = function () { l && (n.cancel(l), l = null) }, this.stop = function () { d.blockCount = Math.max(0, --d.blockCount), 0 === d.blockCount && u.reset(!0) }, this.isBlocking = function () { return d.blocking }, this.message = function (e) { d.message = e }, this.pattern = function (e) { return void 0 !== e && (u._pattern = e), u._pattern }, this.reset = function (t) { if (u._cancelStartTimeout(), d.blockCount = 0, d.blocking = !1, u._restoreFocus && (!i[0].activeElement || i[0].activeElement === o[0])) { try { u._restoreFocus.focus() } catch (e) { !function () { var e = u._restoreFocus; n((function () { if (e) try { e.focus() } catch (e) { } }), 100) }() } u._restoreFocus = null } try { t && e.forEach(f, (function (e) { e() })) } finally { f.length = 0 } }, this.done = function (e) { f.push(e) }, this.state = function () { return d }, this.addRef = function () { u._refs += 1 }, this.release = function () { --u._refs <= 0 && c.instances._destroy(u) } } var o = i.find("body"), s = ["id", "blockCount", "blocking"], l = []; l.get = function (e) { if (!isNaN(e)) throw new Error("BlockUI id cannot be a number"); var t = l[e]; return t || (t = l[e] = new a(e), l.push(t)), t }, l._destroy = function (t) { if (e.isString(t) && (t = l[t]), t) { t.reset(); var n = r.indexOf(l, t); l.splice(n, 1), delete l[t.state().id] } }, l.locate = function (e) { var t = []; r.forEachFnHook(t, "start"), r.forEachFnHook(t, "stop"); for (var n = l.length; n--;) { var i = l[n], a = i._pattern; a && a.test(e.url) && t.push(i) } return 0 === t.length && t.push(c), t }, r.forEachFnHook(l, "reset"); var c = l.get("main"); return c.addRef(), c.instances = l, c }]), r.factory("blockUIUtils", (function () { var t = e.element, n = { buildRegExp: function (e) { var t = e.match(/^\/(.*)\/([gim]*)$/); if (!t) throw Error("Incorrect regular expression format: " + e); return new RegExp(t[1], t[2]) }, forEachFn: function (e, t, n) { for (var r = e.length; r--;) { var i = e[r]; i[t].apply(i, n) } }, forEachFnHook: function (e, t) { e[t] = function () { n.forEachFn(this, t, arguments) } }, isElementInBlockScope: function (e, t) { for (var n = e.inheritedData("block-ui"); n;) { if (n === t) return !0; n = n._parent } return !1 }, findElement: function (e, r, i) { var a = null; if (r(e)) a = e; else for (var o, s = (o = i ? e.parent() : e.children()).length; !a && s--;)a = n.findElement(t(o[s]), r, i); return a }, indexOf: function (e, t, n) { for (var r = n || 0, i = e.length; i > r; r++)if (e[r] === t) return r; return -1 } }; return n })), e.module("blockUI").run(["$templateCache", function (e) { e.put("angular-block-ui/angular-block-ui.ng.html", '<div class="block-ui-overlay"></div><div class="block-ui-message-container" aria-live="assertive" aria-atomic="true"><div class="block-ui-message" ng-class="$_blockUiMessageClass">{{ state.message }}</div></div>') }]) }(angular),
    /*!
     * ui-select
     * http://github.com/angular-ui/ui-select
     * Version: 0.19.3 - 2016-08-17T06:16:41.345Z
     * License: MIT
     */
    function () { "use strict"; var e = { TAB: 9, ENTER: 13, ESC: 27, SPACE: 32, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, SHIFT: 16, CTRL: 17, ALT: 18, PAGE_UP: 33, PAGE_DOWN: 34, HOME: 36, END: 35, BACKSPACE: 8, DELETE: 46, COMMAND: 91, MAP: { 91: "COMMAND", 8: "BACKSPACE", 9: "TAB", 13: "ENTER", 16: "SHIFT", 17: "CTRL", 18: "ALT", 19: "PAUSEBREAK", 20: "CAPSLOCK", 27: "ESC", 32: "SPACE", 33: "PAGE_UP", 34: "PAGE_DOWN", 35: "END", 36: "HOME", 37: "LEFT", 38: "UP", 39: "RIGHT", 40: "DOWN", 43: "+", 44: "PRINTSCREEN", 45: "INSERT", 46: "DELETE", 48: "0", 49: "1", 50: "2", 51: "3", 52: "4", 53: "5", 54: "6", 55: "7", 56: "8", 57: "9", 59: ";", 61: "=", 65: "A", 66: "B", 67: "C", 68: "D", 69: "E", 70: "F", 71: "G", 72: "H", 73: "I", 74: "J", 75: "K", 76: "L", 77: "M", 78: "N", 79: "O", 80: "P", 81: "Q", 82: "R", 83: "S", 84: "T", 85: "U", 86: "V", 87: "W", 88: "X", 89: "Y", 90: "Z", 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111: "/", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "NUMLOCK", 145: "SCROLLLOCK", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'" }, isControl: function (t) { switch (t.which) { case e.COMMAND: case e.SHIFT: case e.CTRL: case e.ALT: return !0 }return !!(t.metaKey || t.ctrlKey || t.altKey) }, isFunctionKey: function (e) { return (e = e.which ? e.which : e) >= 112 && e <= 123 }, isVerticalMovement: function (t) { return ~[e.UP, e.DOWN].indexOf(t) }, isHorizontalMovement: function (t) { return ~[e.LEFT, e.RIGHT, e.BACKSPACE, e.DELETE].indexOf(t) }, toSeparator: function (t) { var n = { ENTER: "\n", TAB: "\t", SPACE: " " }[t]; return n || (e[t] ? void 0 : t) } }; void 0 === angular.element.prototype.querySelectorAll && (angular.element.prototype.querySelectorAll = function (e) { return angular.element(this[0].querySelectorAll(e)) }), void 0 === angular.element.prototype.closest && (angular.element.prototype.closest = function (e) { for (var t = this[0], n = t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.msMatchesSelector; t;) { if (n.bind(t)(e)) return t; t = t.parentElement } return !1 }); var t = 0, n = angular.module("ui.select", []).constant("uiSelectConfig", { theme: "bootstrap", selectAllEnabled: !0, searchEnabled: !0, sortable: !1, placeholder: "", refreshDelay: 1e3, closeOnSelect: !0, skipFocusser: !1, dropdownPosition: "auto", removeSelected: !0, resetSearchInput: !0, generateId: function () { return t++ }, appendToBody: !1 }).service("uiSelectMinErr", (function () { var e = angular.$$minErr("ui.select"); return function () { var t = e.apply(this, arguments).message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"), ""); return new Error(t) } })).directive("uisTranscludeAppend", (function () { return { link: function (e, t, n, r, i) { i(e, (function (e) { t.append(e) })) } } })).filter("highlight", (function () { return function (e, t) { return t && e ? ("" + e).replace(new RegExp(("" + t).replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"), "gi"), '<span class="ui-select-highlight">$&</span>') : e } })).factory("uisOffset", ["$document", "$window", function (e, t) { return function (n, r) { var i = n[0].getBoundingClientRect(); if (r) { var a = $(n).position(); return { width: i.width || n.prop("offsetWidth"), height: i.height || n.prop("offsetHeight"), top: a.top, left: a.left } } return { width: i.width || n.prop("offsetWidth"), height: i.height || n.prop("offsetHeight"), top: i.top + (t.pageYOffset || e[0].documentElement.scrollTop), left: i.left + (t.pageXOffset || e[0].documentElement.scrollLeft) } } }]); n.directive("uiSelectChoices", ["uiSelectConfig", "uisRepeatParser", "uiSelectMinErr", "$compile", "$window", function (e, t, n, r, i) { return { restrict: "EA", require: "^uiSelect", replace: !0, transclude: !0, templateUrl: function (t) { return t.addClass("ui-select-choices"), (t.parent().attr("theme") || e.theme) + "/choices.tpl.html" }, compile: function (r, a) { if (!a.repeat) throw n("repeat", "Expected 'repeat' expression."); var o = a.groupBy, s = a.groupFilter; if (o) { var l = r.querySelectorAll(".ui-select-choices-group"); if (1 !== l.length) throw n("rows", "Expected 1 .ui-select-choices-group but got '{0}'.", l.length); l.attr("ng-repeat", t.getGroupNgRepeatExpression()) } var c = t.parse(a.repeat), u = r.querySelectorAll(".ui-select-choices-row"); if (1 !== u.length) throw n("rows", "Expected 1 .ui-select-choices-row but got '{0}'.", u.length); u.attr("ng-repeat", c.repeatExpression(o)).attr("ng-if", "$select.open"); var d = r.querySelectorAll(".ui-select-choices-row-inner"); if (1 !== d.length) throw n("rows", "Expected 1 .ui-select-choices-row-inner but got '{0}'.", d.length); return d.attr("uis-transclude-append", ""), (i.document.addEventListener ? u : d).attr("ng-click", "$select.select(" + c.itemName + ",$select.skipFocusser,$event)"), function (t, n, r, i) { i.parseRepeatAttr(r.repeat, o, s), i.disableChoiceExpression = r.uiDisableChoice, i.onHighlightCallback = r.onHighlight, i.dropdownPosition = r.position ? r.position.toLowerCase() : e.dropdownPosition, t.$on("$destroy", (function () { u.remove() })), t.$watch("$select.search", (function (e) { e && !i.open && i.multiple && i.items && 0 != i.items.length && i.activate(!1, !0), i.activeIndex = i.tagging.isActivated ? -1 : 0, !r.minimumInputLength || i.search.length >= r.minimumInputLength ? i.refresh(r.refresh) : i.items = [] })), r.$observe("refreshDelay", (function () { var n = t.$eval(r.refreshDelay); i.refreshDelay = void 0 !== n ? n : e.refreshDelay })) } } } }]), n.controller("uiSelectCtrl", ["$scope", "$element", "$timeout", "$filter", "$$uisDebounce", "uisRepeatParser", "uiSelectMinErr", "uiSelectConfig", "$parse", "$injector", "$window", function (t, n, r, i, a, o, s, l, c, u, d) { var f, p = this, h = ""; if (p.placeholder = l.placeholder, p.searchEnabled = l.searchEnabled, p.sortable = l.sortable, p.refreshDelay = l.refreshDelay, p.paste = l.paste, p.resetSearchInput = l.resetSearchInput, p.removeSelected = l.removeSelected, p.closeOnSelect = !0, p.skipFocusser = !1, p.search = h, p.activeIndex = 0, p.items = [], p.open = !1, p.focus = !1, p.disabled = !1, p.selected = void 0, p.dropdownPosition = "auto", p.focusser = void 0, p.multiple = void 0, p.disableChoiceExpression = void 0, p.tagging = { isActivated: !1, fct: void 0 }, p.taggingTokens = { isActivated: !1, tokens: void 0 }, p.lockChoiceExpression = void 0, p.clickTriggeredSelect = !1, p.$filter = i, p.$element = n, p.$animate = function () { try { return u.get("$animate") } catch (e) { return null } }(), p.searchInput = n.querySelectorAll("input.ui-select-search"), 1 !== p.searchInput.length) throw s("searchInput", "Expected 1 input.ui-select-search but got '{0}'.", p.searchInput.length); function m() { p.resetSearchInput && (p.search = h, p.selected && p.items.length && !p.multiple && (p.activeIndex = function (e, t, n) { if (e.findIndex) return e.findIndex(t, n); for (var r, i = Object(e), a = i.length >>> 0, o = 0; o < a; o++)if (r = i[o], t.call(n, r, o, i)) return o; return -1 }(p.items, (function (e) { return angular.equals(this, e) }), p.selected))) } p.isEmpty = function () { return angular.isUndefined(p.selected) || null === p.selected || "" === p.selected || p.multiple && 0 === p.selected.length }, p.activate = function (e, i) { if (p.disabled || p.open) p.open && !p.searchEnabled && p.close(); else { i || m(), t.$broadcast("uis:activate"), p.open = !0, p.selectAllEnabled ? p.activeIndex = -1 : (p.activeIndex = p.activeIndex >= p.items.length ? 0 : p.activeIndex, -1 === p.activeIndex && !1 !== p.taggingLabel && (p.activeIndex = 0)); var a = n.querySelectorAll(".ui-select-choices-content"), o = n.querySelectorAll(".ui-select-search"); if (p.$animate && p.$animate.on && p.$animate.enabled(a[0])) { var s = function (t, n) { "start" === n && 0 === p.items.length ? (p.$animate.off("removeClass", o[0], s), r((function () { p.focusSearchInput(e) }))) : "close" === n && (p.$animate.off("enter", a[0], s), r((function () { p.focusSearchInput(e) }))) }; p.items.length > 0 ? p.$animate.on("enter", a[0], s) : p.$animate.on("removeClass", o[0], s) } else r((function () { p.focusSearchInput(e), !p.tagging.isActivated && p.items.length > 1 && w() })) } }, p.focusSearchInput = function (e) { p.search = e || p.search, p.searchInput[0].focus() }, p.findGroupByName = function (e) { return p.groups && p.groups.filter((function (t) { return t.name === e }))[0] }, p.parseRepeatAttr = function (e, n, r) { p.setItemsFn = n ? function (e) { var i = t.$eval(n); if (p.groups = [], angular.forEach(e, (function (e) { var t = angular.isFunction(i) ? i(e) : e[i], n = p.findGroupByName(t); n ? n.items.push(e) : p.groups.push({ name: t, items: [e] }) })), r) { var a = t.$eval(r); angular.isFunction(a) ? p.groups = a(p.groups) : angular.isArray(a) && (p.groups = function (e, t) { var n, r, i = []; for (n = 0; n < t.length; n++)for (r = 0; r < e.length; r++)e[r].name == [t[n]] && i.push(e[r]); return i }(p.groups, a)) } p.items = [], p.groups.forEach((function (e) { p.items = p.items.concat(e.items) })) } : function (e) { p.items = e }, p.parserResult = o.parse(e), p.isGrouped = !!n, p.itemProperty = p.parserResult.itemName; var i = p.parserResult.source, a = function () { var e = i(t); t.$uisSource = Object.keys(e).map((function (t) { var n = {}; return n[p.parserResult.keyName] = t, n.value = e[t], n })) }; p.parserResult.keyName && (a(), p.parserResult.source = c("$uisSource" + p.parserResult.filters), t.$watch(i, (function (e, t) { e !== t && a() }), !0)), p.refreshItems = function (e) { e = e || p.parserResult.source(t); var n = p.selected; if (p.isEmpty() || angular.isArray(n) && !n.length || !p.multiple || !p.removeSelected) p.setItemsFn(e); else if (null != e) { var r = e.filter((function (e) { return angular.isArray(n) ? n.every((function (t) { return !angular.equals(e, t) })) : !angular.equals(e, n) })); p.setItemsFn(r) } "auto" !== p.dropdownPosition && "up" !== p.dropdownPosition || t.calculateDropdownPos(), t.$broadcast("uis:refresh") }, t.$watchCollection(p.parserResult.source, (function (e) { if (null == e) p.items = []; else { if (!angular.isArray(e)) throw s("items", "Expected an array but got '{0}'.", e); p.refreshItems(e), angular.isDefined(p.ngModel.$modelValue) && (p.ngModel.$modelValue = null) } })) }, p.refresh = function (e) { void 0 !== e && (f && r.cancel(f), f = r((function () { t.$eval(e) }), p.refreshDelay)) }, p.isActive = function (e) { if (!p.open) return !1; var t = p.items.indexOf(e[p.itemProperty]), n = t == p.activeIndex; return !(!n || t < 0) && (n && !angular.isUndefined(p.onHighlightCallback) && e.$eval(p.onHighlightCallback), n) }; var g = function (e) { return p.selected && angular.isArray(p.selected) && p.selected.filter((function (t) { return angular.equals(t, e) })).length > 0 }, v = []; function $(e) { return v.indexOf(e) > -1 } p.isDisabled = function (e) { if (p.open) { var t = e[p.itemProperty], n = !1; if (p.items.indexOf(t) >= 0 && (angular.isDefined(p.disableChoiceExpression) || p.multiple)) { if (t.isTag) return !1; p.multiple && (n = g(t)), !n && angular.isDefined(p.disableChoiceExpression) && (n = !!e.$eval(p.disableChoiceExpression)), function (e, t) { var n = v.indexOf(e); t && -1 === n && v.push(e), !t && n > -1 && v.splice(n, 1) }(t, n) } return n } }, p.toggleSelectAll = function (e) { if (2 == e) t.$broadcast("uis:unselectall"); else { var n = p.items; angular.forEach(p.selected, (function (e) { n.push(e) })), t.$broadcast("uis:selectall", n) } }, p.select = function (e, n, i) { if (void 0 === e || !$(e)) { if (!p.items && !p.search && !p.tagging.isActivated) return; if (!e || !$(e)) { if (p.clickTriggeredSelect = !1, i && "click" === i.type && e && (p.clickTriggeredSelect = !0), p.tagging.isActivated && !1 === p.clickTriggeredSelect) { if (!1 === p.taggingLabel) if (p.activeIndex < 0) { if (void 0 === e && (e = void 0 !== p.tagging.fct ? p.tagging.fct(p.search) : p.search), !e || angular.equals(p.items[0], e)) return } else e = p.items[p.activeIndex]; else if (0 === p.activeIndex) { if (void 0 === e) return; if (void 0 !== p.tagging.fct && "string" == typeof e) { if (!(e = p.tagging.fct(e))) return } else "string" == typeof e && (e = e.replace(p.taggingLabel, "").trim()) } if (g(e)) return void p.close(n) } m(), t.$broadcast("uis:select", e); var a = {}; a[p.parserResult.itemName] = e, r((function () { p.onSelectCallback(t, { $item: e, $model: p.parserResult.modelMapper(t, a) }) })), p.closeOnSelect && p.close(n) } } }, p.close = function (e) { p.open && (p.ngModel && p.ngModel.$setTouched && p.ngModel.$setTouched(), p.open = !1, m(), t.$broadcast("uis:close", e)) }, p.setFocus = function () { p.focus || p.focusInput[0].focus() }, p.clear = function (e) { p.select(void 0), e.stopPropagation(), r((function () { p.focusser[0].focus() }), 0, !1) }, p.toggle = function (e) { p.open ? (p.close(), e.preventDefault(), e.stopPropagation()) : p.activate() }, p.isLocked = function () { return !1 }, t.$watch((function () { return angular.isDefined(p.lockChoiceExpression) && "" !== p.lockChoiceExpression }), (function (e) { if (!e) return; var t = []; p.isLocked = function (e, n) { var r = !1, i = p.selected[n]; return i && (e ? function (e, n) { var r = t.indexOf(e); n && -1 === r && t.push(e), !n && r > -1 && t.splice(r, 0) }(i, r = !!e.$eval(p.lockChoiceExpression)) : r = function (e) { return t.indexOf(e) > -1 }(i)), r } })); var y = null, b = !1; function w() { var e = n.querySelectorAll(".ui-select-choices-content"), t = e.querySelectorAll(".ui-select-choices-row"); if (t.length < 1) throw s("choices", "Expected multiple .ui-select-choices-row but got '{0}'.", t.length); if (!(p.activeIndex < 0)) { var r = t[p.activeIndex], i = r.offsetTop + r.clientHeight - e[0].scrollTop, a = e[0].offsetHeight; i > a ? e[0].scrollTop += i - a : i < r.clientHeight && (p.isGrouped && 0 === p.activeIndex ? e[0].scrollTop = 0 : e[0].scrollTop -= r.clientHeight - i) } } p.sizeSearchInput = function () { var e = p.searchInput[0], n = p.searchInput.parent().parent()[0], i = function () { return n.clientWidth * !!e.offsetParent }, a = function (t) { if (0 === t) return !1; var n = t - e.offsetLeft - 10; return n < 50 && (n = t), p.searchInput.css("width", n + "px"), !0 }; p.searchInput.css("width", "10px"), r((function () { null !== y || a(i()) || (y = t.$watch((function () { b || (b = !0, t.$$postDigest((function () { b = !1, a(i()) && (y(), y = null) }))) }), angular.noop)) })) }, p.searchInput.on("keydown", (function (n) { var i = n.which; ~[e.ENTER, e.ESC].indexOf(i) && (n.preventDefault(), n.stopPropagation()), t.$apply((function () { var t = !1; if ((p.items.length > 0 || p.tagging.isActivated) && (function (t) { var n = !0; switch (t) { case e.DOWN: !p.open && p.multiple ? p.activate(!1, !0) : p.activeIndex < p.items.length - 1 && p.activeIndex++; break; case e.UP: !p.open && p.multiple ? p.activate(!1, !0) : (p.activeIndex > 0 || 0 === p.search.length && p.tagging.isActivated && p.activeIndex > -1 || p.selectAllEnabled && p.activeIndex > -1) && p.activeIndex--; break; case e.TAB: p.open && -1 == p.activeIndex ? (p.toggleSelectAll(0), p.close()) : p.multiple && !p.open || p.select(p.items[p.activeIndex], !0); break; case e.ENTER: p.open && -1 == p.activeIndex ? (p.toggleSelectAll(0), p.close()) : p.open && (p.tagging.isActivated || p.activeIndex >= 0) ? p.select(p.items[p.activeIndex], p.skipFocusser) : p.activate(!1, !0); break; case e.ESC: p.close(); break; default: n = !1 }return n }(i) || p.searchEnabled || (n.preventDefault(), n.stopPropagation()), p.taggingTokens.isActivated)) { for (var a = 0; a < p.taggingTokens.tokens.length; a++)p.taggingTokens.tokens[a] === e.MAP[n.keyCode] && p.search.length > 0 && (t = !0); t && r((function () { p.searchInput.triggerHandler("tagged"); var t = p.search.replace(e.MAP[n.keyCode], "").trim(); p.tagging.fct && (t = p.tagging.fct(t)), t && p.select(t, !0) })) } })), e.isVerticalMovement(i) && p.items.length > 0 && w(), i !== e.ENTER && i !== e.ESC || (n.preventDefault(), n.stopPropagation()) })), p.searchInput.on("paste", (function (t) { var n; if (n = window.clipboardData && window.clipboardData.getData ? window.clipboardData.getData("Text") : (t.originalEvent || t).clipboardData.getData("text/plain"), (n = p.search + n) && n.length > 0) if (p.taggingTokens.isActivated) { for (var r = [], i = 0; i < p.taggingTokens.tokens.length; i++) { var a = e.toSeparator(p.taggingTokens.tokens[i]) || p.taggingTokens.tokens[i]; if (n.indexOf(a) > -1) { r = n.split(a); break } } 0 === r.length && (r = [n]); var o = p.search; angular.forEach(r, (function (e) { var t = p.tagging.fct ? p.tagging.fct(e) : e; t && p.select(t, !0) })), p.search = o || h, t.preventDefault(), t.stopPropagation() } else p.paste && (p.paste(n), p.search = h, t.preventDefault(), t.stopPropagation()) })), p.searchInput.on("tagged", (function () { r((function () { m() })) })); var S = a((function () { p.sizeSearchInput() }), 50); angular.element(d).bind("resize", S), t.$on("$destroy", (function () { p.searchInput.off("keyup keydown tagged blur paste"), angular.element(d).off("resize", S) })) }]), n.directive("uiSelect", ["$document", "uiSelectConfig", "uiSelectMinErr", "uisOffset", "$compile", "$parse", "$timeout", function (e, t, n, r, i, a, o) { return { restrict: "EA", templateUrl: function (e, n) { return (n.theme || t.theme) + (angular.isDefined(n.multiple) ? "/select-multiple.tpl.html" : "/select.tpl.html") }, replace: !0, transclude: !0, require: ["uiSelect", "^ngModel"], scope: !0, controller: "uiSelectCtrl", controllerAs: "$select", compile: function (i, s) { var l = /{(.*)}\s*{(.*)}/.exec(s.ngClass); if (l) { var c = "{" + l[1] + ", " + l[2] + "}"; s.ngClass = c, i.attr("ng-class", c) } return angular.isDefined(s.multiple) ? i.append("<ui-select-multiple/>").removeAttr("multiple") : i.append("<ui-select-single/>"), s.inputId && (i.querySelectorAll("input.ui-select-search")[0].id = s.inputId), function (i, s, l, c, u) { var d = c[0], f = c[1]; function p(e) { if (d.open) { if (!(window.jQuery ? window.jQuery.contains(s[0], e.target) : s[0].contains(e.target)) && !d.clickTriggeredSelect) { var t; if (d.skipFocusser) t = !0; else { var n = angular.element(e.target).controller("uiSelect"); (t = n && n !== d) || (t = ~["input", "button", "textarea", "select"].indexOf(e.target.tagName.toLowerCase())) } d.close(t), i.$digest() } d.clickTriggeredSelect = !1 } } d.generatedId = t.generateId(), d.baseTitle = l.title || "Select box", d.focusserTitle = d.baseTitle + " focus", d.focusserId = "focusser-" + d.generatedId, d.selectAllEnabledAttr = "true" == (l.uiSelectAllEnabled || "true"), d.closeOnSelect = angular.isDefined(l.closeOnSelect) ? a(l.closeOnSelect)() : t.closeOnSelect, i.$watch("skipFocusser", (function () { var e = i.$eval(l.skipFocusser); d.skipFocusser = void 0 !== e ? e : t.skipFocusser })), d.onSelectCallback = a(l.onSelect), d.onRemoveCallback = a(l.onRemove), d.ngModel = f, d.selectAllEnabled = t.selectAllEnabled && d.selectAllEnabledAttr && d.multiple, d.selectedType = 0, d.choiceGrouped = function (e) { return d.isGrouped && e && e.name }, l.tabindex && l.$observe("tabindex", (function (e) { d.focusInput.attr("tabindex", e), s.removeAttr("tabindex") })), i.$watch((function () { return i.$eval(l.searchEnabled) }), (function (e) { d.searchEnabled = void 0 !== e ? e : t.searchEnabled })), i.$watch("sortable", (function () { var e = i.$eval(l.sortable); d.sortable = void 0 !== e ? e : t.sortable })), l.$observe("limit", (function () { d.limit = angular.isDefined(l.limit) ? parseInt(l.limit, 10) : void 0 })), i.$watch("removeSelected", (function () { var e = i.$eval(l.removeSelected); d.removeSelected = void 0 !== e ? e : t.removeSelected })), l.$observe("disabled", (function () { d.disabled = void 0 !== l.disabled && l.disabled, d.disabled && (d.selectAllEnabled = !1) })), l.$observe("resetSearchInput", (function () { var e = i.$eval(l.resetSearchInput); d.resetSearchInput = void 0 === e || e })), l.$observe("paste", (function () { d.paste = i.$eval(l.paste) })), l.$observe("tagging", (function () { if (void 0 !== l.tagging) { var e = i.$eval(l.tagging); d.tagging = { isActivated: !0, fct: !0 !== e ? e : void 0 } } else d.tagging = { isActivated: !1, fct: void 0 } })), l.$observe("taggingLabel", (function () { void 0 !== l.tagging && ("false" === l.taggingLabel ? d.taggingLabel = !1 : d.taggingLabel = void 0 !== l.taggingLabel ? l.taggingLabel : "(new)") })), l.$observe("taggingTokens", (function () { if (void 0 !== l.tagging) { var e = void 0 !== l.taggingTokens ? l.taggingTokens.split("|") : [",", "ENTER"]; d.taggingTokens = { isActivated: !0, tokens: e } } })), angular.isDefined(l.autofocus) && o((function () { d.setFocus() })), angular.isDefined(l.focusOn) && i.$on(l.focusOn, (function () { o((function () { d.setFocus() })) })), e.on("click", p), i.$on("$destroy", (function () { e.off("click", p) })), u(i, (function (e) { var t = angular.element("<div>").append(e), r = t.querySelectorAll(".ui-select-match"); if (r.removeAttr("ui-select-match"), r.removeAttr("data-ui-select-match"), 1 !== r.length) throw n("transcluded", "Expected 1 .ui-select-match but got '{0}'.", r.length); s.querySelectorAll(".ui-select-match").replaceWith(r); var i = t.querySelectorAll(".ui-select-choices"); if (i.removeAttr("ui-select-choices"), i.removeAttr("data-ui-select-choices"), 1 !== i.length) throw n("transcluded", "Expected 1 .ui-select-choices but got '{0}'.", i.length); s.querySelectorAll(".ui-select-choices").replaceWith(i); var a = t.querySelectorAll(".ui-select-no-choice"); a.removeAttr("ui-select-no-choice"), a.removeAttr("data-ui-select-no-choice"), 1 == a.length && s.querySelectorAll(".ui-select-no-choice").replaceWith(a) })); var h = i.$eval(l.appendToBody); (void 0 !== h ? h : t.appendToBody) && (i.$watch("$select.open", (function (t) { var n; t ? (n = r(s, l.appendParent), (m = angular.element('<div class="ui-select-placeholder"></div>'))[0].style.width = n.width + "px", m[0].style.height = n.height + "px", s.after(m), g = s[0].style.width, e.find(l.appendParent || "body").append(s), s[0].style.position = "absolute", s[0].style.left = n.left + "px", s[0].style.top = n.top + "px", s[0].style.width = n.width + "px") : v() })), i.$on("$destroy", (function () { v() }))); var m = null, g = ""; function v() { null !== m && (m.replaceWith(s), m = null, s[0].style.position = "", s[0].style.left = "", s[0].style.top = "", s[0].style.width = g, d.setFocus()) } var $ = null, y = "direction-up"; i.$watch("$select.open", (function () { "auto" !== d.dropdownPosition && "up" !== d.dropdownPosition || i.calculateDropdownPos() })); var b = function (e, t) { e = e || r(s), t = t || r($), $[0].style.position = "absolute", $[0].style.top = -1 * t.height + "px", s.addClass(y) }, w = function () { o((function () { if ("up" === d.dropdownPosition) b(); else { s.removeClass(y); var t = r(s), n = r($), i = e[0].documentElement.scrollTop || e[0].body.scrollTop; t.top + t.height + n.height > i + e[0].documentElement.clientHeight ? b(t, n) : function (e, t) { s.removeClass(y), e = e || r(s), t = t || r($), $[0].style.position = "", $[0].style.top = "" }(t, n) } $[0].style.opacity = 1 })) }, S = !1; i.calculateDropdownPos = function () { if (d.open) { if (0 === ($ = angular.element(s).querySelectorAll(".ui-select-dropdown")).length) return; if ("" !== d.search || S || ($[0].style.opacity = 0, S = !0), !r($).height && d.$animate && d.$animate.on && d.$animate.enabled($)) { var e = !0; d.$animate.on("enter", $, (function (t, n) { "close" === n && e && (w(), e = !1) })) } else w() } else { if (null === $ || 0 === $.length) return; $[0].style.opacity = 0, $[0].style.position = "", $[0].style.top = "", s.removeClass(y) } } } } } }]), n.directive("uiSelectMatch", ["uiSelectConfig", function (e) { return { restrict: "EA", require: "^uiSelect", replace: !0, transclude: !0, templateUrl: function (n) { n.addClass("ui-select-match"); var r = n.parent(); return (t(r, "theme") || e.theme) + (angular.isDefined(t(r, "multiple")) ? "/match-multiple.tpl.html" : "/match.tpl.html") }, link: function (t, n, r, i) { function a(e) { i.allowClear = !!angular.isDefined(e) && ("" === e || "true" === e.toLowerCase()) } i.lockChoiceExpression = r.uiLockChoice, r.$observe("placeholder", (function (t) { i.placeholder = void 0 !== t ? t : e.placeholder })), r.$observe("allowClear", a), a(r.allowClear), i.multiple && i.sizeSearchInput() } }; function t(e, t) { return e[0].hasAttribute(t) ? e.attr(t) : e[0].hasAttribute("data-" + t) ? e.attr("data-" + t) : e[0].hasAttribute("x-" + t) ? e.attr("x-" + t) : void 0 } }]), n.directive("uiSelectMultiple", ["uiSelectMinErr", "$timeout", "uiSelectConfig", function (t, n, r) { return { restrict: "EA", require: ["^uiSelect", "^ngModel"], controller: ["$scope", "$timeout", function (e, t) { var n, r = this, i = e.$select; angular.isUndefined(i.selected) && (i.selected = []), e.$evalAsync((function () { n = e.ngModel })), r.activeMatchIndex = -1, r.updateModel = function () { n.$setViewValue(Date.now()), r.refreshComponent(), r.setFormDirty() }, r.refreshComponent = function () { i.refreshItems && i.refreshItems(), i.sizeSearchInput && i.sizeSearchInput() }, r.setFormDirty = function () { t((function () { var t = i.searchInput.parents("form"), n = e.$parent, r = t && t.attr("name"); n && r && n[r] && (n[r].$dirty = !0) })) }, r.removeChoice = function (n) { if (i.isLocked(null, n)) return !1; var a = i.selected[n], o = {}; return o[i.parserResult.itemName] = a, i.selected.splice(n, 1), r.activeMatchIndex = -1, i.sizeSearchInput(), t((function () { i.onRemoveCallback(e, { $item: a, $model: i.parserResult.modelMapper(e, o) }) })), r.updateModel(), i.selected.length > 0 && i.items.length > 0 && (i.selectedType = 1), !0 }, r.getPlaceholder = function () { if (!i.selected || !i.selected.length) return i.placeholder } }], controllerAs: "$selectMultiple", link: function (r, i, a, o) { var s = o[0], l = r.ngModel = o[1], c = r.$selectMultiple; function u(e) { return void 0 !== e && void 0 !== s.search && e.filter((function (e) { return void 0 !== s.search.toUpperCase() && void 0 !== e && e.toUpperCase() === s.search.toUpperCase() })).length > 0 } function d(e, t) { var n = -1; if (angular.isArray(e)) for (var r = angular.copy(e), i = 0; i < r.length; i++)if (void 0 === s.tagging.fct) r[i] + " " + s.taggingLabel === t && (n = i); else { var a = r[i]; angular.isObject(a) && (a.isTag = !0), angular.equals(a, t) && (n = i) } return n } s.multiple = !0, s.focusInput = s.searchInput, l.$isEmpty = function (e) { return !e || 0 === e.length }, l.$parsers.unshift((function () { for (var e, t = {}, n = [], i = s.selected.length - 1; i >= 0; i--)(t = {})[s.parserResult.itemName] = s.selected[i], e = s.parserResult.modelMapper(r, t), n.unshift(e); return n })), l.$formatters.unshift((function (e) { var t, n = s.parserResult && s.parserResult.source(r, { $select: { search: "" } }), i = {}; if (!n) return e; var a = [], o = function (e, n) { if (e && e.length) { for (var o = e.length - 1; o >= 0; o--) { if (i[s.parserResult.itemName] = e[o], t = s.parserResult.modelMapper(r, i), s.parserResult.trackByExp) { var l = /(\w*)\./.exec(s.parserResult.trackByExp), c = /\.([^\s]+)/.exec(s.parserResult.trackByExp); if (l && l.length > 0 && l[1] == s.parserResult.itemName && c && c.length > 0 && t[c[1]] == n[c[1]]) return a.unshift(e[o]), !0 } if (angular.equals(t, n)) return a.unshift(e[o]), !0 } return !1 } }; if (!e) return a; for (var l = e.length - 1; l >= 0; l--)o(s.selected, e[l]) || o(n, e[l]) || a.unshift(e[l]); return a })), r.$watchCollection((function () { return l.$modelValue }), (function (e, t) { t != e && (angular.isDefined(l.$modelValue) && (l.$modelValue = null), c.refreshComponent()) })), l.$render = function () { if (!angular.isArray(l.$viewValue)) { if (!angular.isUndefined(l.$viewValue) && null !== l.$viewValue) throw t("multiarr", "Expected model value to be array but got '{0}'", l.$viewValue); l.$viewValue = [] } s.selected = l.$viewValue, c.refreshComponent(), r.$evalAsync(), s.selectedType = 0 }, r.$on("uis:select", (function (e, t) { s.selected.length >= s.limit || (s.selected.push(t), s.selected.length > 0 && s.items.length > 0 && (s.selectedType = 1), c.updateModel()) })), r.$on("uis:selectall", (function (e, t) { s.selected = [], angular.forEach(t, (function (e) { s.selected.push(e) })), c.updateModel(), s.selectedType = 2 })), r.$on("uis:unselectall", (function (e, t) { s.selected = [], c.updateModel(), s.selectedType = 0 })), r.$on("uis:activate", (function () { c.activeMatchIndex = -1 })), r.$watch("$select.disabled", (function (e, t) { t && !e && s.sizeSearchInput() })), s.searchInput.on("keydown", (function (t) { var n = t.which; r.$apply((function () { var r = !1; e.isHorizontalMovement(n) && (r = function (t) { var n = (f = s.searchInput[0], angular.isNumber(f.selectionStart) ? f.selectionStart : f.value.length), r = s.selected.length, i = 0, a = r - 1, o = c.activeMatchIndex, l = c.activeMatchIndex + 1, u = c.activeMatchIndex - 1, d = o; var f; if (n > 0 || s.search.length && t == e.RIGHT) return !1; function p() { switch (t) { case e.LEFT: return ~c.activeMatchIndex ? u : a; case e.RIGHT: return ~c.activeMatchIndex && o !== a ? l : (s.activate(), !1); case e.BACKSPACE: return ~c.activeMatchIndex ? c.removeChoice(o) ? u : o : a; case e.DELETE: return !!~c.activeMatchIndex && (c.removeChoice(c.activeMatchIndex), o) } } s.close(), d = p(), s.selected.length && !1 !== d ? c.activeMatchIndex = Math.min(a, Math.max(i, d)) : c.activeMatchIndex = -1; return !0 }(n)), r && n != e.TAB && (t.preventDefault(), t.stopPropagation()) })) })), s.searchInput.on("keyup", (function (t) { if (e.isVerticalMovement(t.which) || r.$evalAsync((function () { s.activeIndex = !1 === s.taggingLabel ? -1 : 0 })), s.tagging.isActivated && s.search.length > 0) { if (t.which === e.TAB || e.isControl(t) || e.isFunctionKey(t) || t.which === e.ESC || e.isVerticalMovement(t.which)) return; if (s.activeIndex = !1 === s.taggingLabel ? -1 : 0, !1 === s.taggingLabel) return; var n, i, a, o = angular.copy(s.items), l = angular.copy(s.items), c = !1, f = -1; if (void 0 !== s.tagging.fct) { if ((i = s.$filter("filter")(o, { isTag: !0 })).length > 0 && (a = i[0]), o.length > 0 && a && (c = !0, o = o.slice(1, o.length), l = l.slice(1, l.length)), n = s.tagging.fct(s.search), l.some((function (e) { return angular.equals(e, n) })) || s.selected.some((function (e) { return angular.equals(e, n) }))) return void r.$evalAsync((function () { s.activeIndex = 0, s.items = o })); n && (n.isTag = !0) } else { if (i = s.$filter("filter")(o, (function (e) { return e.match(s.taggingLabel) })), i.length > 0 && (a = i[0]), void 0 !== o[0] && o.length > 0 && a && (c = !0, o = o.slice(1, o.length), l = l.slice(1, l.length)), n = s.search + " " + s.taggingLabel, d(s.selected, s.search) > -1) return; if (u(l.concat(s.selected))) return void (c && (o = l, r.$evalAsync((function () { s.activeIndex = 0, s.items = o })))); if (u(l)) return void (c && (s.items = l.slice(1, l.length))) } c && (f = d(s.selected, n)), f > -1 ? o = o.slice(f + 1, o.length - 1) : (o = [], n && o.push(n), o = o.concat(l)), r.$evalAsync((function () { if (s.activeIndex = 0, s.items = o, s.isGrouped) { var e = n ? o.slice(1) : o; s.setItemsFn(e), n && (s.items.unshift(n), s.groups.unshift({ name: "", items: [n], tagging: !0 })) } })) } })), s.searchInput.on("blur", (function () { n((function () { c.activeMatchIndex = -1 })) })) } } }]), n.directive("uiSelectNoChoice", ["uiSelectConfig", function (e) { return { restrict: "EA", require: "^uiSelect", replace: !0, transclude: !0, templateUrl: function (t) { return t.addClass("ui-select-no-choice"), (t.parent().attr("theme") || e.theme) + "/no-choice.tpl.html" } } }]), n.directive("uiSelectSingle", ["$timeout", "$compile", function (t, n) { return { restrict: "EA", require: ["^uiSelect", "^ngModel"], link: function (r, i, a, o) { var s = o[0], l = o[1]; l.$parsers.unshift((function (e) { var t = {}; return t[s.parserResult.itemName] = e, s.parserResult.modelMapper(r, t) })), l.$formatters.unshift((function (e) { var t = s.parserResult && s.parserResult.source(r, { $select: { search: "" } }), n = {}; if (t) { var i = function (t) { return n[s.parserResult.itemName] = t, s.parserResult.modelMapper(r, n) === e }; if (s.selected && i(s.selected)) return s.selected; for (var a = t.length - 1; a >= 0; a--)if (i(t[a])) return t[a] } return e })), r.$watch("$select.selected", (function (e) { l.$viewValue !== e && l.$setViewValue(e) })), l.$render = function () { s.selected = l.$viewValue }, r.$on("uis:select", (function (e, t) { s.selected = t })), r.$on("uis:close", (function (e, n) { t((function () { s.focusser.prop("disabled", !1), n || s.focusser[0].focus() }), 0, !1) })), r.$on("uis:activate", (function () { c.prop("disabled", !0) })); var c = angular.element("<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' id='{{ $select.focusserId }}' aria-label='{{ $select.focusserTitle }}' aria-haspopup='true' role='button' />"); n(c)(r), s.focusser = c, s.focusInput = c, i.parent().append(c), c.bind("focus", (function () { r.$evalAsync((function () { s.focus = !0 })) })), c.bind("blur", (function () { r.$evalAsync((function () { s.focus = !1 })) })), c.bind("keydown", (function (t) { if (t.which === e.BACKSPACE) return t.preventDefault(), t.stopPropagation(), s.select(void 0), void r.$apply(); t.which === e.TAB || e.isControl(t) || e.isFunctionKey(t) || t.which === e.ESC || (t.which != e.DOWN && t.which != e.UP && t.which != e.ENTER && t.which != e.SPACE || (t.preventDefault(), t.stopPropagation(), s.activate()), r.$digest()) })), c.bind("keyup input", (function (t) { t.which === e.TAB || e.isControl(t) || e.isFunctionKey(t) || t.which === e.ESC || t.which == e.ENTER || t.which === e.BACKSPACE || (s.activate(c.val()), c.val(""), r.$digest()) })) } } }]), n.directive("uiSelectSort", ["$timeout", "uiSelectConfig", "uiSelectMinErr", function (e, t, n) { return { require: ["^^uiSelect", "^ngModel"], link: function (t, r, i, a) { if (null === t[i.uiSelectSort]) throw n("sort", "Expected a list to sort"); var o = a[0], s = a[1], l = angular.extend({ axis: "horizontal" }, t.$eval(i.uiSelectSortOptions)).axis, c = "dragging", u = "dropping", d = "dropping-before", f = "dropping-after"; t.$watch((function () { return o.sortable }), (function (e) { e ? r.attr("draggable", !0) : r.removeAttr("draggable") })), r.on("dragstart", (function (e) { r.addClass(c), (e.dataTransfer || e.originalEvent.dataTransfer).setData("text", t.$index.toString()) })), r.on("dragend", (function () { m(c) })); var p, h = function (e, t) { this.splice(t, 0, this.splice(e, 1)[0]) }, m = function (e) { angular.forEach(o.$element.querySelectorAll("." + e), (function (t) { angular.element(t).removeClass(e) })) }, g = function (e) { e.preventDefault(), ("vertical" === l ? e.offsetY || e.layerY || (e.originalEvent ? e.originalEvent.offsetY : 0) : e.offsetX || e.layerX || (e.originalEvent ? e.originalEvent.offsetX : 0)) < this["vertical" === l ? "offsetHeight" : "offsetWidth"] / 2 ? (m(f), r.addClass(d)) : (m(d), r.addClass(f)) }, v = function (t) { t.preventDefault(); var n = parseInt((t.dataTransfer || t.originalEvent.dataTransfer).getData("text"), 10); e.cancel(p), p = e((function () { $(n) }), 20) }, $ = function (e) { var n = t.$eval(i.uiSelectSort), a = n[e], o = null; o = r.hasClass(d) ? e < t.$index ? t.$index - 1 : t.$index : e < t.$index ? t.$index : t.$index + 1, h.apply(n, [e, o]), s.$setViewValue(Date.now()), t.$apply((function () { t.$emit("uiSelectSort:change", { array: n, item: a, from: e, to: o }) })), m(u), m(d), m(f), r.off("drop", v) }; r.on("dragenter", (function () { r.hasClass(c) || (r.addClass(u), r.on("dragover", g), r.on("drop", v)) })), r.on("dragleave", (function (e) { e.target == r && (m(u), m(d), m(f), r.off("dragover", g), r.off("drop", v)) })) } } }]), n.factory("$$uisDebounce", ["$timeout", function (e) { return function (t, n) { var r; return function () { var i = this, a = Array.prototype.slice.call(arguments); r && e.cancel(r), r = e((function () { t.apply(i, a) }), n) } } }]), n.directive("uisOpenClose", ["$parse", "$timeout", function (e, t) { return { restrict: "A", require: "uiSelect", link: function (n, r, i, a) { a.onOpenCloseCallback = e(i.uisOpenClose), n.$watch("$select.open", (function (e, r) { e !== r && t((function () { a.onOpenCloseCallback(n, { isOpen: e }) })) })) } } }]), n.service("uisRepeatParser", ["uiSelectMinErr", "$parse", function (e, t) { this.parse = function (n) { var r; if (!(r = n.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(\s*[\s\S]+?)?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/))) throw e("iexp", "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.", n); var i = r[5], a = ""; if (r[3]) { i = r[5].replace(/(^\()|(\)$)/g, ""); var o = r[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/); o && o[1].trim() && (a = o[1], i = i.replace(a, "")) } return { itemName: r[4] || r[2], keyName: r[3], source: t(i), filters: a, trackByExp: r[6], modelMapper: t(r[1] || r[4] || r[2]), repeatExpression: function (e) { var t = this.itemName + " in " + (e ? "$group.items" : "$select.items"); return this.trackByExp && (t += " track by " + this.trackByExp), t } } }, this.getGroupNgRepeatExpression = function () { return "$group in $select.groups track by $group.name" } }]) }(), angular.module("ui.select").run(["$templateCache", function (e) { e.put("bootstrap/choices.tpl.html", '<ul class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu" role="listbox" ng-show="$select.open && $select.items.length > 0"><li class="ui-select-choices-group" id="ui-select-choices-{{ $select.generatedId }}"><div class="divider" ng-show="$select.isGrouped && $index > 0"></div><div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind="$group.name"></div><div ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}" role="option"><span class="ui-select-choices-row-inner"></span></div></li></ul>'), e.put("bootstrap/match-multiple.tpl.html", '<span class="ui-select-match"><span ng-repeat="$item in $select.selected track by $index"><span class="ui-select-match-item btn btn-default btn-xs" tabindex="-1" type="button" ng-disabled="$select.disabled" ng-click="$selectMultiple.activeMatchIndex = $index;" ng-class="{\'btn-primary\':$selectMultiple.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)">&nbsp;&times;</span> <span uis-transclude-append=""></span></span></span></span>'), e.put("bootstrap/match.tpl.html", '<div class="ui-select-match" ng-hide="$select.open && $select.searchEnabled" ng-disabled="$select.disabled" ng-class="{\'btn-default-focus\':$select.focus}"><span tabindex="-1" class="btn btn-default form-control ui-select-toggle" aria-label="{{ $select.baseTitle }} activate" ng-disabled="$select.disabled" ng-click="$select.activate()" style="outline: 0;"><span ng-show="$select.isEmpty()" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="ui-select-match-text pull-left" ng-class="{\'ui-select-allow-clear\': $select.allowClear && !$select.isEmpty()}" ng-transclude=""></span> <i class="caret pull-right" ng-click="$select.toggle($event)"></i> <a ng-show="$select.allowClear && !$select.isEmpty() && ($select.disabled !== true)" aria-label="{{ $select.baseTitle }} clear" style="margin-right: 10px" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right"><i class="glyphicon glyphicon-remove" aria-hidden="true"></i></a></span></div>'), e.put("bootstrap/no-choice.tpl.html", '<ul class="ui-select-no-choice dropdown-menu" ng-show="$select.items.length == 0"><li ng-transclude=""></li></ul>'), e.put("bootstrap/select-multiple.tpl.html", '<div class="ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control" ng-class="{open: $select.open}"><div><div class="ui-select-match"></div><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="ui-select-search input-xs" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-click="$select.activate()" ng-model="$select.search" role="combobox" aria-label="{{ $select.baseTitle }}" ondrop="return false;"></div><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>'), e.put("bootstrap/select.tpl.html", '<div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}"><div class="ui-select-match"></div><input type="search" autocomplete="off" tabindex="-1" aria-expanded="true" aria-label="{{ $select.baseTitle }}" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="form-control ui-select-search" ng-class="{ \'ui-select-search-hidden\' : !$select.searchEnabled }" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.open"><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>'), e.put("select2/choices.tpl.html", '<ul tabindex="-1" class="ui-select-choices ui-select-choices-content select2-results"><li class="ui-select-choices-select-all" ng-class="{\'select2-highlighted\': $select.activeIndex==-1,\'select2-disabled\': $select.isDisabled(this)}" ng-if="$select.selectAllEnabled"><div class="select2-select-all" ng-if="$select.selectedType != 2" ng-click="$select.toggleSelectAll(0)">Select All</div></li><li class="ui-select-choices-group" ng-class="{\'select2-result-with-children\': $select.choiceGrouped($group) }"><div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label" ng-bind="$group.name"></div><ul role="listbox" id="ui-select-choices-{{ $select.generatedId }}" ng-class="{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }"><li role="option" ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{\'select2-highlighted\': $select.isActive(this),\'select2-disabled\': $select.isDisabled(this)}"><div class="select2-result-label ui-select-choices-row-inner"></div></li></ul></li></ul>'), e.put("select2/match-multiple.tpl.html", '<span class="ui-select-match"><li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected track by $index" ng-class="{\'select2-search-choice-focus\':$selectMultiple.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span uis-transclude-append=""></span> <a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$selectMultiple.removeChoice($index)" tabindex="-1"></a></li></span>'), e.put("select2/match.tpl.html", '<a class="select2-choice ui-select-match" ng-class="{\'select2-default\': $select.isEmpty()}" ng-click="$select.toggle($event)" aria-label="{{ $select.baseTitle }} select"><span ng-show="$select.isEmpty()" class="select2-chosen">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="select2-chosen" ng-transclude=""></span> <abbr ng-if="$select.allowClear && !$select.isEmpty()" class="select2-search-choice-close" ng-click="$select.clear($event)"></abbr> <span class="select2-arrow ui-select-toggle"><b></b></span></a>'), e.put("select2/no-choice.tpl.html", '<div class="ui-select-no-choice dropdown" ng-show="$select.items.length == 0"><div class="dropdown-content"><div data-selectable="" ng-transclude=""></div></div></div>'), e.put("select2/select-multiple.tpl.html", '<div class="ui-select-container ui-select-multiple select2 select2-container select2-container-multi" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled}"><ul class="select2-choices"><span class="ui-select-match"></span><li class="select2-search-field"><span class="clear-all" ng-if="$select.selectAllEnabled" title="Remove Selected" ng-show="$select.selected.length > 0" ng-click="$select.toggleSelectAll(2)"></span><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="select2-input ui-select-search" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-model="$select.search" ng-click="$select.activate()" style="width: 34px;" ondrop="return false;"></li></ul><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open || $select.items.length === 0}"><div class="ui-select-choices"></div></div></div>'), e.put("select2/select.tpl.html", '<div class="ui-select-container select2 select2-container" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled, \'select2-container-active\': $select.focus, \'select2-allowclear\': $select.allowClear && !$select.isEmpty()}"><div class="ui-select-match"></div><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="search-container" ng-class="{\'ui-select-search-hidden\':!$select.searchEnabled, \'select2-search\':$select.searchEnabled}"><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="ui-select-search select2-input" ng-model="$select.search"></div><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div></div>'), e.put("selectize/choices.tpl.html", '<div ng-show="$select.open" class="ui-select-choices ui-select-dropdown selectize-dropdown single"><div class="ui-select-choices-content selectize-dropdown-content"><div class="ui-select-choices-group optgroup" role="listbox"><div ng-show="$select.isGrouped" class="ui-select-choices-group-label optgroup-header" ng-bind="$group.name"></div><div role="option" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}"><div class="option ui-select-choices-row-inner" data-selectable=""></div></div></div></div></div>'), e.put("selectize/match.tpl.html", '<div ng-hide="$select.searchEnabled && ($select.open || $select.isEmpty())" class="ui-select-match"><span ng-show="!$select.searchEnabled && ($select.isEmpty() || $select.open)" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty() || $select.open" ng-transclude=""></span></div>'), e.put("selectize/no-choice.tpl.html", '<div class="ui-select-no-choice selectize-dropdown" ng-show="$select.items.length == 0"><div class="selectize-dropdown-content"><div data-selectable="" ng-transclude=""></div></div></div>'), e.put("selectize/select.tpl.html", '<div class="ui-select-container selectize-control single" ng-class="{\'open\': $select.open}"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.open && !$select.searchEnabled ? $select.toggle($event) : $select.activate()"><div class="ui-select-match"></div><input type="search" autocomplete="off" tabindex="-1" class="ui-select-search ui-select-toggle" ng-class="{\'ui-select-search-hidden\':!$select.searchEnabled}" ng-click="$select.toggle($event)" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-hide="!$select.isEmpty() && !$select.open" ng-disabled="$select.disabled" aria-label="{{ $select.baseTitle }}"></div><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>') }]), angular.module("infinite-scroll", []).value("THROTTLE_MILLISECONDS", null).directive("infiniteScroll", ["$rootScope", "$window", "$interval", "THROTTLE_MILLISECONDS", function (e, t, n, r) { return { scope: { infiniteScroll: "&", infiniteScrollContainer: "=", infiniteScrollDistance: "=", infiniteScrollDisabled: "=", infiniteScrollUseDocumentBottom: "=", infiniteScrollListenForEvent: "@" }, link: function (i, a, o) { var s, l, c, u, d, f, p, h, m, g, v, $, y, b, w, S, C, x, k; return k = angular.element(t), b = null, w = null, c = null, u = null, v = !0, x = !1, C = null, l = !1, g = function (e) { return e = e[0] || e, isNaN(e.offsetHeight) ? e.document.documentElement.clientHeight : e.offsetHeight }, $ = function (e) { if (e[0].getBoundingClientRect && !e.css("none")) return e[0].getBoundingClientRect().top + y(e) }, y = function (e) { return e = e[0] || e, isNaN(window.pageYOffset) ? e.document.documentElement.scrollTop : e.ownerDocument.defaultView.pageYOffset }, m = function () { var t, r, o; return u === k ? (t = g(u) + y(u[0].document.documentElement), o = $(a) + g(a)) : (t = g(u), r = 0, void 0 !== $(u) && (r = $(u)), o = $(a) - r + g(a)), x && (o = g((a[0].ownerDocument || a[0].document).documentElement)), o - t <= g(u) * b + 1 ? (c = !0, w ? i.$$phase || e.$$phase ? i.infiniteScroll() : i.$apply(i.infiniteScroll) : void 0) : (l && n.cancel(l), c = !1) }, S = function (e, t) { var r, i, a; return a = null, i = 0, r = function () { return i = (new Date).getTime(), n.cancel(a), a = null, e.call() }, function () { var o, s; return o = (new Date).getTime(), (s = t - (o - i)) <= 0 ? (n.cancel(a), a = null, i = o, e.call()) : a ? void 0 : a = n(r, s, 1) } }, null != r && (m = S(m, r)), i.$on("$destroy", (function () { if (u.unbind("scroll", m), null != C && (C(), C = null), l) return n.cancel(l) })), p = function (e) { return b = parseFloat(e) || 0 }, i.$watch("infiniteScrollDistance", p), p(i.infiniteScrollDistance), f = function (e) { if ((w = !e) && c) return c = !1, m() }, i.$watch("infiniteScrollDisabled", f), f(i.infiniteScrollDisabled), h = function (e) { return x = e }, i.$watch("infiniteScrollUseDocumentBottom", h), h(i.infiniteScrollUseDocumentBottom), s = function (e) { if (null != u && u.unbind("scroll", m), u = e, null != e) return u.bind("scroll", m) }, s(k), i.infiniteScrollListenForEvent && (C = e.$on(i.infiniteScrollListenForEvent, m)), d = function (e) { if (null != e && 0 !== e.length) { if (e.nodeType && 1 === e.nodeType ? e = angular.element(e) : "function" == typeof e.append ? e = angular.element(e[e.length - 1]) : "string" == typeof e && (e = angular.element(document.querySelector(e))), null != e) return s(e); throw new Error("invalid infinite-scroll-container attribute.") } }, i.$watch("infiniteScrollContainer", d), d(i.infiniteScrollContainer || []), null != o.infiniteScrollParent && s(angular.element(a.parent())), null != o.infiniteScrollImmediateCheck && (v = i.$eval(o.infiniteScrollImmediateCheck)), l = n((function () { return v && m(), n.cancel(l) })) } } }]), "undefined" != typeof module && "undefined" != typeof exports && module.exports === exports && (module.exports = "infinite-scroll"), "undefined" != typeof module && "undefined" != typeof exports && module.exports === exports && (module.exports = "checklist-model"), angular.module("checklist-model", []).directive("checklistModel", ["$parse", "$compile", function (e, t) { function n(e, t, n) { if (angular.isArray(e)) for (var r = e.length; r--;)if (n(e[r], t)) return !0; return !1 } function r(e, t, r) { return n(e = angular.isArray(e) ? e : [], t, r) || e.push(t), e } function i(e, t, n) { if (angular.isArray(e)) for (var r = e.length; r--;)if (n(e[r], t)) { e.splice(r, 1); break } return e } function a(a, o, s) { var l = s.checklistModel; s.$set("checklistModel", null), t(o)(a), s.$set("checklistModel", l); var c = e(l), u = e(s.checklistChange), d = e(s.checklistBeforeChange), f = e(s.ngModel), p = angular.equals; if (s.hasOwnProperty("checklistComparator")) if ("." == s.checklistComparator[0]) { var h = s.checklistComparator.substring(1); p = function (e, t) { return e[h] === t[h] } } else p = e(s.checklistComparator)(a.$parent); var m = a.$watch(s.ngModel, (function (e, t) { e !== t && (d && !1 === d(a) ? f.assign(a, n(c(a.$parent), $(), p)) : (y($(), e), u && u(a))) })), g = a.$watch($, (function (e, t) { if (e != t && angular.isDefined(t) && !0 === a[s.ngModel]) { var n = c(a.$parent); c.assign(a.$parent, i(n, t, p)), c.assign(a.$parent, r(n, e, p)) } }), !0), v = a.$on("$destroy", (function () { m(), g(), v() })); function $() { return s.checklistValue ? e(s.checklistValue)(a.$parent) : s.value } function y(e, t) { var n = c(a.$parent); angular.isFunction(c.assign) && (!0 === t ? c.assign(a.$parent, r(n, e, p)) : c.assign(a.$parent, i(n, e, p))) } function b(e, t) { d && !1 === d(a) ? y($(), f(a)) : f.assign(a, n(e, $(), p)) } angular.isFunction(a.$parent.$watchCollection) ? a.$parent.$watchCollection(l, b) : a.$parent.$watch(l, b, !0) } return { restrict: "A", priority: 1e3, terminal: !0, scope: !0, compile: function (e, t) { if (!t.checklistValue && !t.value) throw "You should provide `value` or `checklist-value`."; return t.ngModel || t.$set("ngModel", "checked"), a } } }]), function (e, t) { "undefined" != typeof module && module.exports ? (t("undefined" == typeof angular ? require("angular") : angular), module.exports = "ngDialog") : "function" == typeof define && define.amd ? define(["angular"], t) : t(e.angular) }(this, (function (e) { "use strict"; var t = e.module("ngDialog", []), n = e.element, r = e.isDefined, i = (document.body || document.documentElement).style, a = r(i.animation) || r(i.WebkitAnimation) || r(i.MozAnimation) || r(i.MsAnimation) || r(i.OAnimation), o = "animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend", s = { html: !1, body: !1 }, l = {}, c = [], u = [], d = !1, f = !1, p = [], h = "legacy", m = "1.0.0+"; return t.provider("ngDialog", (function () { var t = this.defaults = { className: "ngdialog-theme-default", appendClassName: "", disableAnimation: !1, plain: !1, showClose: !0, closeByDocument: !0, closeByEscape: !0, closeByNavigation: !1, appendTo: !1, preCloseCallback: !1, onOpenCallback: !1, overlay: !0, cache: !0, trapFocus: !0, preserveFocus: !0, ariaAuto: !0, ariaRole: null, ariaLabelledById: null, ariaLabelledBySelector: null, ariaDescribedById: null, ariaDescribedBySelector: null, bodyClassName: "ngdialog-open", width: null, height: null }; this.setForceHtmlReload = function (e) { s.html = e || !1 }, this.setForceBodyReload = function (e) { s.body = e || !1 }, this.setDefaults = function (n) { e.extend(t, n) }, this.setOpenOnePerName = function (e) { f = e || !1 }; var r, i = 0, g = 0, v = {}; this.$get = ["$document", "$templateCache", "$compile", "$q", "$http", "$rootScope", "$timeout", "$window", "$controller", "$injector", function ($, y, b, w, S, C, x, k, D, E) { var T = [], A = { onDocumentKeydown: function (e) { 27 === e.keyCode && I.close("$escape") }, activate: function (e) { e.data("$ngDialogOptions").trapFocus && (e.on("keydown", A.onTrapFocusKeydown), T.body.on("keydown", A.onTrapFocusKeydown)) }, deactivate: function (e) { e.off("keydown", A.onTrapFocusKeydown), T.body.off("keydown", A.onTrapFocusKeydown) }, deactivateAll: function (t) { e.forEach(t, (function (t) { var n = e.element(t); A.deactivate(n) })) }, setBodyPadding: function (e) { var t = parseInt(T.body.css("padding-right") || 0, 10); T.body.css("padding-right", t + e + "px"), T.body.data("ng-dialog-original-padding", t), C.$broadcast("ngDialog.setPadding", e) }, resetBodyPadding: function () { var e = T.body.data("ng-dialog-original-padding"); e ? T.body.css("padding-right", e + "px") : T.body.css("padding-right", ""), C.$broadcast("ngDialog.setPadding", 0) }, performCloseDialog: function (e, t) { var n = e.data("$ngDialogOptions"), i = e.attr("id"), s = l[i]; if (A.deactivate(e), s) { if (void 0 !== k.Hammer) { var u = s.hammerTime; u.off("tap", r), u.destroy && u.destroy(), delete s.hammerTime } else e.unbind("click"); 1 === g && T.body.unbind("keydown", A.onDocumentKeydown), e.hasClass("ngdialog-closing") || (g -= 1); var f = e.data("$ngDialogPreviousFocus"); f && f.focus && f.focus(), C.$broadcast("ngDialog.closing", e, t), g = g < 0 ? 0 : g, a && !n.disableAnimation ? (s.$destroy(), e.unbind(o).bind(o, (function () { A.closeDialogElement(e, t) })).addClass("ngdialog-closing")) : (s.$destroy(), A.closeDialogElement(e, t)), v[i] && (v[i].resolve({ id: i, value: t, $dialog: e, remainingDialogs: g }), delete v[i]), l[i] && delete l[i], c.splice(c.indexOf(i), 1), c.length || (T.body.unbind("keydown", A.onDocumentKeydown), d = !1), 0 == g && (r = void 0) } }, closeDialogElement: function (e, t) { var n = e.data("$ngDialogOptions"); e.remove(), u.splice(u.indexOf(n.bodyClassName), 1), -1 === u.indexOf(n.bodyClassName) && (T.html.removeClass(n.bodyClassName), T.body.removeClass(n.bodyClassName)), 0 === g && A.resetBodyPadding(), C.$broadcast("ngDialog.closed", e, t) }, closeDialog: function (t, n) { var r = t.data("$ngDialogPreCloseCallback"); if (r && e.isFunction(r)) { var i = r.call(t, n); if (e.isObject(i)) i.closePromise ? i.closePromise.then((function () { A.performCloseDialog(t, n) }), (function () { return !1 })) : i.then((function () { A.performCloseDialog(t, n) }), (function () { return !1 })); else { if (!1 === i) return !1; A.performCloseDialog(t, n) } } else A.performCloseDialog(t, n) }, onTrapFocusKeydown: function (t) { var n, r = e.element(t.currentTarget); if (r.hasClass("ngdialog")) n = r; else if (null === (n = A.getActiveDialog())) return; var i = 9 === t.keyCode, a = !0 === t.shiftKey; i && A.handleTab(n, t, a) }, handleTab: function (e, t, n) { var r = A.getFocusableElements(e); if (0 !== r.length) { var i = document.activeElement, a = Array.prototype.indexOf.call(r, i), o = -1 === a, s = 0 === a, l = a === r.length - 1, c = !1; n ? (o || s) && (r[r.length - 1].focus(), c = !0) : (o || l) && (r[0].focus(), c = !0), c && (t.preventDefault(), t.stopPropagation()) } else document.activeElement && document.activeElement.blur && document.activeElement.blur() }, autoFocus: function (e) { var t = e[0], r = t.querySelector("*[autofocus]"); if (null === r || (r.focus(), document.activeElement !== r)) { var i = A.getFocusableElements(e); if (i.length > 0) return void i[0].focus(); var a = A.filterVisibleElements(t.querySelectorAll("h1,h2,h3,h4,h5,h6,p,span")); if (a.length > 0) { var o = a[0]; n(o).attr("tabindex", "-1").css("outline", "0"), o.focus() } } }, getFocusableElements: function (e) { var t = e[0].querySelectorAll("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]"), n = A.filterTabbableElements(t); return A.filterVisibleElements(n) }, filterTabbableElements: function (e) { for (var t = [], r = 0; r < e.length; r++) { var i = e[r]; "-1" !== n(i).attr("tabindex") && t.push(i) } return t }, filterVisibleElements: function (e) { for (var t = [], n = 0; n < e.length; n++) { var r = e[n]; (r.offsetWidth > 0 || r.offsetHeight > 0) && t.push(r) } return t }, getActiveDialog: function () { var e = document.querySelectorAll(".ngdialog"); return 0 === e.length ? null : n(e[e.length - 1]) }, applyAriaAttributes: function (e, t) { if (t.ariaAuto) { if (!t.ariaRole) { var n = A.getFocusableElements(e).length > 0 ? "dialog" : "alertdialog"; t.ariaRole = n } t.ariaLabelledBySelector || (t.ariaLabelledBySelector = "h1,h2,h3,h4,h5,h6"), t.ariaDescribedBySelector || (t.ariaDescribedBySelector = "article,section,p") } t.ariaRole && e.attr("role", t.ariaRole), A.applyAriaAttribute(e, "aria-labelledby", t.ariaLabelledById, t.ariaLabelledBySelector), A.applyAriaAttribute(e, "aria-describedby", t.ariaDescribedById, t.ariaDescribedBySelector) }, applyAriaAttribute: function (e, t, r, i) { if (r) e.attr(t, r); else if (i) { var a = e.attr("id"), o = e[0].querySelector(i); if (!o) return; var s = a + "-" + t; return n(o).attr("id", s), e.attr(t, s), s } }, detectUIRouter: function () { return E.has("$transitions") ? m : !!E.has("$state") && h }, getRouterLocationEventName: function () { return A.detectUIRouter() ? "$stateChangeStart" : "$locationChangeStart" } }, I = { __PRIVATE__: A, open: function (a) { function o(t, n) { return (n = n || {}).headers = n.headers || {}, e.extend(n.headers, { Accept: "text/html" }), C.$broadcast("ngDialog.templateLoading", t), S.get(t, n).then((function (e) { return C.$broadcast("ngDialog.templateLoaded", t), e.data || "" })) } var s = null; if (a = a || {}, !(f && a.name && (s = a.name.toLowerCase().replace(/\s/g, "-") + "-dialog", this.isOpen(s)))) { var h, m, $ = e.copy(t), M = ++i; s = s || "ngdialog" + M, c.push(s), void 0 !== $.data && (void 0 === a.data && (a.data = {}), a.data = e.merge(e.copy($.data), a.data)), e.extend($, a), v[s] = h = w.defer(), l[s] = m = e.isObject($.scope) ? $.scope.$new() : C.$new(); var O, P, F, _ = e.extend({}, $.resolve); return e.forEach(_, (function (t, n) { _[n] = e.isString(t) ? E.get(t) : E.invoke(t, null, null, n) })), w.all({ template: function (t) { return t ? e.isString(t) && $.plain ? t : "boolean" != typeof $.cache || $.cache ? o(t, { cache: y }) : o(t, { cache: !1 }) : "Empty template" }($.template || $.templateUrl), locals: w.all(_) }).then((function (t) { var i = t.template, a = t.locals; $.showClose && (i += '<button aria-label="Dismiss" class="ngdialog-close"></button>'); var o = $.overlay ? "" : " ngdialog-no-overlay"; if ((O = n('<div id="' + s + '" class="ngdialog' + o + '"></div>')).html($.overlay ? '<div class="ngdialog-overlay"></div><div class="ngdialog-content" role="document">' + i + "</div>" : '<div class="ngdialog-content" role="document">' + i + "</div>"), O.data("$ngDialogOptions", $), m.ngDialogId = s, $.data && e.isString($.data)) { var l = $.data.replace(/^\s*/, "")[0]; m.ngDialogData = "{" === l || "[" === l ? e.fromJson($.data) : new String($.data), m.ngDialogData.ngDialogId = s } else $.data && e.isObject($.data) && (m.ngDialogData = $.data, m.ngDialogData.ngDialogId = s); if ($.className && O.addClass($.className), $.appendClassName && O.addClass($.appendClassName), $.width && (F = O[0].querySelector(".ngdialog-content"), e.isString($.width) ? F.style.width = $.width : F.style.width = $.width + "px"), $.height && (F = O[0].querySelector(".ngdialog-content"), e.isString($.height) ? F.style.height = $.height : F.style.height = $.height + "px"), $.disableAnimation && O.addClass("ngdialog-disabled-animation"), P = $.appendTo && e.isString($.appendTo) ? e.element(document.querySelector($.appendTo)) : T.body, A.applyAriaAttributes(O, $), [{ name: "$ngDialogPreCloseCallback", value: $.preCloseCallback }, { name: "$ngDialogOnOpenCallback", value: $.onOpenCallback }].forEach((function (t) { var n; t.value && (e.isFunction(t.value) ? n = t.value : e.isString(t.value) && m && (e.isFunction(m[t.value]) ? n = m[t.value] : m.$parent && e.isFunction(m.$parent[t.value]) ? n = m.$parent[t.value] : C && e.isFunction(C[t.value]) && (n = C[t.value])), n && O.data(t.name, n)) })), m.closeThisDialog = function (e) { A.closeDialog(O, e) }, $.controller && (e.isString($.controller) || e.isArray($.controller) || e.isFunction($.controller))) { var c; $.controllerAs && e.isString($.controllerAs) && (c = $.controllerAs); var f = D($.controller, e.extend(a, { $scope: m, $element: O }), !0, c); $.bindToController && e.extend(f.instance, { ngDialogId: m.ngDialogId, ngDialogData: m.ngDialogData, closeThisDialog: m.closeThisDialog, confirm: m.confirm }), "function" == typeof f ? O.data("$ngDialogControllerController", f()) : O.data("$ngDialogControllerController", f) } (x((function () { var t = document.querySelectorAll(".ngdialog"); A.deactivateAll(t), b(O)(m); var n = k.innerWidth - T.body.prop("clientWidth"); T.html.addClass($.bodyClassName), T.body.addClass($.bodyClassName), u.push($.bodyClassName); var r = n - (k.innerWidth - T.body.prop("clientWidth")); r > 0 && A.setBodyPadding(r), P.append(O), A.activate(O), $.trapFocus && A.autoFocus(O), $.name ? C.$broadcast("ngDialog.opened", { dialog: O, name: $.name }) : C.$broadcast("ngDialog.opened", O); var i = O.data("$ngDialogOnOpenCallback"); i && e.isFunction(i) && i.call(O) })), d || (T.body.bind("keydown", A.onDocumentKeydown), d = !0), $.closeByNavigation && p.push(O), $.preserveFocus && O.data("$ngDialogPreviousFocus", document.activeElement), r = function (e) { var t = !!$.closeByDocument && n(e.target).hasClass("ngdialog-overlay"), r = n(e.target).hasClass("ngdialog-close"); (t || r) && I.close(O.attr("id"), r ? "$closeButton" : "$document") }, void 0 !== k.Hammer) ? (m.hammerTime = k.Hammer(O[0])).on("tap", r) : O.bind("click", r); return g += 1, I })), { id: s, closePromise: h.promise, close: function (e) { A.closeDialog(O, e) } } } }, openConfirm: function (r) { var i = w.defer(), a = e.copy(t); r = r || {}, void 0 !== a.data && (void 0 === r.data && (r.data = {}), r.data = e.merge(e.copy(a.data), r.data)), e.extend(a, r), a.scope = e.isObject(a.scope) ? a.scope.$new() : C.$new(), a.scope.confirm = function (e) { i.resolve(e); var t = n(document.getElementById(o.id)); A.performCloseDialog(t, e) }; var o = I.open(a); if (o) return o.closePromise.then((function (e) { return e ? i.reject(e.value) : i.reject() })), i.promise }, isOpen: function (e) { return n(document.getElementById(e)).length > 0 }, close: function (e, t) { var r = n(document.getElementById(e)); if (r.length) A.closeDialog(r, t); else if ("$escape" === e) { var i = c[c.length - 1]; (r = n(document.getElementById(i))).data("$ngDialogOptions").closeByEscape && A.closeDialog(r, "$escape") } else I.closeAll(t); return I }, closeAll: function (e) { for (var t = document.querySelectorAll(".ngdialog"), r = t.length - 1; r >= 0; r--) { var i = t[r]; A.closeDialog(n(i), e) } }, getOpenDialogs: function () { return c }, getDefaults: function () { return t } }; e.forEach(["html", "body"], (function (e) { if (T[e] = $.find(e), s[e]) { var t = A.getRouterLocationEventName(); C.$on(t, (function () { T[e] = $.find(e) })) } })); var M = A.detectUIRouter(); if (M === m) { E.get("$transitions").onStart({}, (function (e) { for (; p.length > 0;) { var t = p.pop(); if (!1 === A.closeDialog(t)) return !1 } })) } else { var O = M === h ? "$stateChangeStart" : "$locationChangeStart"; C.$on(O, (function (e) { for (; p.length > 0;) { var t = p.pop(); !1 === A.closeDialog(t) && e.preventDefault() } })) } return I }] })), t.directive("ngDialog", ["ngDialog", function (t) { return { restrict: "A", scope: { ngDialogScope: "=" }, link: function (n, r, i) { r.on("click", (function (r) { r.preventDefault(); var a = e.isDefined(n.ngDialogScope) ? n.ngDialogScope : "noScope"; e.isDefined(i.ngDialogClosePrevious) && t.close(i.ngDialogClosePrevious); var o = t.getDefaults(); t.open({ template: i.ngDialog, className: i.ngDialogClass || o.className, appendClassName: i.ngDialogAppendClass, controller: i.ngDialogController, controllerAs: i.ngDialogControllerAs, bindToController: i.ngDialogBindToController, disableAnimation: i.ngDialogDisableAnimation, scope: a, data: i.ngDialogData, showClose: "false" !== i.ngDialogShowClose && ("true" === i.ngDialogShowClose || o.showClose), closeByDocument: "false" !== i.ngDialogCloseByDocument && ("true" === i.ngDialogCloseByDocument || o.closeByDocument), closeByEscape: "false" !== i.ngDialogCloseByEscape && ("true" === i.ngDialogCloseByEscape || o.closeByEscape), overlay: "false" !== i.ngDialogOverlay && ("true" === i.ngDialogOverlay || o.overlay), preCloseCallback: i.ngDialogPreCloseCallback || o.preCloseCallback, onOpenCallback: i.ngDialogOnOpenCallback || o.onOpenCallback, bodyClassName: i.ngDialogBodyClass || o.bodyClassName }) })) } } }]), t })), function () { "use strict"; function e(e, t, n, r, i, a, o) { function s(t, n) { var r = function (e) { for (var t = 0; t < h.length; t++)if (h[t].toastId === e) return h[t] }(t); r && !r.deleting && (r.deleting = !0, r.isOpened = !1, e.leave(r.el).then((function () { r.scope.options.onHidden && r.scope.options.onHidden(!!n, r), r.scope.$destroy(); var e = h.indexOf(r); delete g[r.scope.message], h.splice(e, 1); var t = a.maxOpened; t && h.length >= t && h[t - 1].open.resolve(), !h.length && (f.remove(), f = null, v = o.defer()) }))) } function l(e, t, n, r) { return angular.isObject(n) && (r = n, n = null), d({ iconClass: e, message: t, optionsOverride: r, title: n }) } function c() { return angular.extend({}, a) } function u(t) { if (f) return v.promise; (f = angular.element("<div></div>")).attr("id", t.containerId), f.addClass(t.positionClass), f.css({ "pointer-events": "auto" }); var n = angular.element(document.querySelector(t.target)); if (!n || !n.length) throw "Target for toasts doesn't exist"; return e.enter(f, n).then((function () { v.resolve() })), v.promise } function d(n) { function a(e) { var n = angular.element("<div toast></div>"); return t.get("$compile")(n)(e) } var l = c(); if (!function () { var e = l.preventDuplicates && n.message === m, t = l.preventOpenDuplicates && g[n.message]; return !(!e && !t && (m = n.message, g[n.message] = !0, 1)) }()) { var d = function () { var e = { toastId: p++, isOpened: !1, scope: r.$new(), open: o.defer() }; return e.iconClass = n.iconClass, n.optionsOverride && (angular.extend(l, function (e) { for (var t = ["containerId", "iconClasses", "maxOpened", "newestOnTop", "positionClass", "preventDuplicates", "preventOpenDuplicates", "templates"], n = 0, r = t.length; n < r; n++)delete e[t[n]]; return e }(n.optionsOverride)), e.iconClass = n.optionsOverride.iconClass || e.iconClass), function (e, t, n) { function r(t) { if (n[t]) return function () { n[t](e) } } n.allowHtml ? (e.scope.allowHtml = !0, e.scope.title = i.trustAsHtml(t.title), e.scope.message = i.trustAsHtml(t.message)) : (e.scope.title = t.title, e.scope.message = t.message), e.scope.toastType = e.iconClass, e.scope.toastId = e.toastId, e.scope.extraData = n.extraData, e.scope.options = { extendedTimeOut: n.extendedTimeOut, messageClass: n.messageClass, onHidden: n.onHidden, onShown: r("onShown"), onTap: r("onTap"), progressBar: n.progressBar, tapToDismiss: n.tapToDismiss, timeOut: n.timeOut, titleClass: n.titleClass, toastClass: n.toastClass }, n.closeButton && (e.scope.options.closeHtml = n.closeHtml) }(e, n, l), e.el = a(e.scope), e }(); if (h.push(d), l.autoDismiss && l.maxOpened && h.length > l.maxOpened) for (var v = h.slice(0, h.length - l.maxOpened), $ = 0, y = v.length; $ < y; $++)s(v[$].toastId); return (l.maxOpened && h.length <= l.maxOpened || !l.maxOpened) && d.open.resolve(), d.open.promise.then((function () { u(l).then((function () { if (d.isOpened = !0, l.newestOnTop) e.enter(d.el, f).then((function () { d.scope.init() })); else { var t = f[0].lastChild ? angular.element(f[0].lastChild) : null; e.enter(d.el, f, t).then((function () { d.scope.init() })) } })) })), d } } var f, p = 0, h = [], m = "", g = {}, v = o.defer(), $ = { active: function () { return h.length }, clear: function (e) { if (1 !== arguments.length || e) if (e) s(e.toastId); else for (var t = 0; t < h.length; t++)s(h[t].toastId) }, error: function (e, t, n) { return l(c().iconClasses.error, e, t, n) }, info: function (e, t, n) { return l(c().iconClasses.info, e, t, n) }, remove: s, success: function (e, t, n) { return l(c().iconClasses.success, e, t, n) }, warning: function (e, t, n) { return l(c().iconClasses.warning, e, t, n) }, refreshTimer: function (e, t) { e && e.isOpened && h.indexOf(e) >= 0 && e.scope.refreshTimer(t) } }; return $ } angular.module("toastr", []).factory("toastr", e), e.$inject = ["$animate", "$injector", "$document", "$rootScope", "$sce", "toastrConfig", "$q"] }(), function () { "use strict"; angular.module("toastr").constant("toastrConfig", { allowHtml: !1, autoDismiss: !1, closeButton: !1, closeHtml: "<button>&times;</button>", containerId: "toast-container", extendedTimeOut: 1e3, iconClasses: { error: "toast-error", info: "toast-info", success: "toast-success", warning: "toast-warning" }, maxOpened: 0, messageClass: "toast-message", newestOnTop: !0, onHidden: null, onShown: null, onTap: null, positionClass: "toast-top-right", preventDuplicates: !1, preventOpenDuplicates: !1, progressBar: !1, tapToDismiss: !0, target: "body", templates: { toast: "directives/toast/toast.html", progressbar: "directives/progressbar/progressbar.html" }, timeOut: 5e3, titleClass: "toast-title", toastClass: "toast" }) }(), function () { "use strict"; function e(e) { return { require: "^toast", templateUrl: function () { return e.templates.progressbar }, link: function (e, t, n, r) { function i() { var e = (s - (new Date).getTime()) / o * 100; t.css("width", e + "%") } var a, o, s; r.progressBar = e, e.start = function (e) { a && clearInterval(a), o = parseFloat(e), s = (new Date).getTime() + o, a = setInterval(i, 10) }, e.stop = function () { a && clearInterval(a) }, e.$on("$destroy", (function () { clearInterval(a) })) } } } angular.module("toastr").directive("progressBar", e), e.$inject = ["toastrConfig"] }(), function () { "use strict"; angular.module("toastr").controller("ToastController", (function () { this.progressBar = null, this.startProgressBar = function (e) { this.progressBar && this.progressBar.start(e) }, this.stopProgressBar = function () { this.progressBar && this.progressBar.stop() } })) }(), function () { "use strict"; function e(e, t, n, r) { return { templateUrl: function () { return n.templates.toast }, controller: "ToastController", link: function (n, i, a, o) { function s(e) { return o.startProgressBar(e), t((function () { o.stopProgressBar(), r.remove(n.toastId) }), e, 1) } var l; if (n.toastClass = n.options.toastClass, n.titleClass = n.options.titleClass, n.messageClass = n.options.messageClass, n.progressBar = n.options.progressBar, n.options.closeHtml) { var c = angular.element(n.options.closeHtml), u = e.get("$compile"); c.addClass("toast-close-button"), c.attr("ng-click", "close(true, $event)"), u(c)(n), i.children().prepend(c) } n.init = function () { n.options.timeOut && (l = s(n.options.timeOut)), n.options.onShown && n.options.onShown() }, i.on("mouseenter", (function () { n.progressBar = !1, o.stopProgressBar(), l && t.cancel(l) })), n.tapToast = function () { angular.isFunction(n.options.onTap) && n.options.onTap(), n.options.tapToDismiss && n.close(!0) }, n.close = function (e, t) { t && angular.isFunction(t.stopPropagation) && t.stopPropagation(), r.remove(n.toastId, e) }, n.refreshTimer = function (e) { l && (t.cancel(l), l = s(e || n.options.timeOut)) }, i.on("mouseleave", (function () { 0 === n.options.timeOut && 0 === n.options.extendedTimeOut || (n.$apply((function () { n.progressBar = n.options.progressBar })), l = s(n.options.extendedTimeOut)) })) } } } angular.module("toastr").directive("toast", e), e.$inject = ["$injector", "$interval", "toastrConfig", "toastr"] }(), angular.module("toastr").run(["$templateCache", function (e) { e.put("directives/progressbar/progressbar.html", '<div class="toast-progress"></div>\n'), e.put("directives/toast/toast.html", '<div class="{{toastClass}} {{toastType}}" ng-click="tapToast()">\n  <div ng-switch on="allowHtml">\n    <div ng-switch-default ng-if="title" class="{{titleClass}}" aria-label="{{title}}">{{title}}</div>\n    <div ng-switch-default class="{{messageClass}}" aria-label="{{message}}">{{message}}</div>\n    <div ng-switch-when="true" ng-if="title" class="{{titleClass}}" ng-bind-html="title"></div>\n    <div ng-switch-when="true" class="{{messageClass}}" ng-bind-html="message"></div>\n  </div>\n  <progress-bar ng-if="progressBar"></progress-bar>\n</div>\n') }]), function () { var e = angular.module("toggle-switch", ["ng"]); e.provider("toggleSwitchConfig", [function () { this.onLabel = "On", this.offLabel = "Off", this.knobLabel = " "; var e = this; this.$get = function () { return { onLabel: e.onLabel, offLabel: e.offLabel, knobLabel: e.knobLabel } } }]), e.directive("toggleSwitch", ["toggleSwitchConfig", function (e) { return { restrict: "EA", replace: !0, require: "ngModel", scope: { disabled: "@", onLabel: "@", offLabel: "@", knobLabel: "@" }, template: '<div role="radio" class="toggle-switch" ng-class="{ \'disabled\': disabled }"><div class="toggle-switch-animate" ng-class="{\'switch-off\': !model, \'switch-on\': model}"><span class="switch-left" ng-bind="onLabel"></span><span class="knob" ng-bind="knobLabel"></span><span class="switch-right" ng-bind="offLabel"></span></div></div>', compile: function (t, n) { return n.onLabel || (n.onLabel = e.onLabel), n.offLabel || (n.offLabel = e.offLabel), n.knobLabel || (n.knobLabel = e.knobLabel), this.link }, link: function (e, t, n, r) { t.on("click", (function () { e.$apply(e.toggle) })), t.on("keydown", (function (t) { 32 === (t.which ? t.which : t.keyCode) && e.$apply(e.toggle) })), r.$formatters.push((function (e) { return e })), r.$parsers.push((function (e) { return e })), r.$viewChangeListeners.push((function () { e.$eval(n.ngChange) })), r.$render = function () { e.model = r.$viewValue }, e.toggle = function () { e.disabled || (e.model = !e.model, r.$setViewValue(e.model)) } } } }]) }(), function () { "use strict"; var e = angular.module("vi.avatar", []); e.directive("viAvatar", ["viAvatar", function (e) { return { restrict: "E", replace: !0, scope: { src: "@", name: "@" }, link: function (t, n, r) { var i, a = t.src; a || (a = e.generateAvatar(t.name)), i = '<div class="avatar"><img src="' + a + '" alt="Avatar"></div>', n.append(i) } } }]), e.factory("viAvatar", [function () { return { generateAvatar: function (e) { var t = document.createElement("canvas"); t.width = 64, t.height = 64; var n = function (e) { for (var t = "", n = e.split(" "), r = 2, i = 0; i < n.length; i++)if ("" !== n[i]) { if (0 === r) break; t += n[i][0].toUpperCase(), r-- } return t }(e || ""), r = t.getContext("2d"); return r.fillStyle = "#E2E7EA", r.fillRect(0, 0, 64, 64), r.font = "32px sans-serif", r.textAlign = "center", r.fillStyle = "#939EA7", r.fillText(n, 32, 64 / 1.5), t.toDataURL("image/png") } } }]) }(), angular.module("validation", ["validation.provider", "validation.directive"]), angular.module("validation.provider", []), angular.module("validation.directive", ["validation.provider"]), function () { angular.module("validation.provider").provider("$validation", (function () { var e, t, n, r, i = this, a = function (i) { t = (e = i).get("$rootScope"), e.get("$http"), n = e.get("$q"), r = e.get("$timeout") }, o = {}, s = null, l = {}; this.setExpression = function (e) { return angular.extend(o, e), i }, this.getExpression = function (e) { return o[e] }, this.setDefaultMsg = function (e) { return angular.extend(l, e), i }, this.getDefaultMsg = function (e) { return l[e] }, this.setValidMethod = function (e) { s = e }, this.getValidMethod = function () { return s }, this.setErrorHTML = function (e) { if (e.constructor === Function) return i.getErrorHTML = e, i }, this.getErrorHTML = function (e) { return '<p class="validation-invalid">' + e + "</p>" }, this.setSuccessHTML = function (e) { if (e.constructor === Function) return i.getSuccessHTML = e, i }, this.getSuccessHTML = function (e) { return '<p class="validation-valid">' + e + "</p>" }, this.showSuccessMessage = !0, this.showErrorMessage = !0, this.checkValid = function (e) { return !(!e || !e.$valid) }, this.validate = function (e) { var a = n.defer(), o = 0; if (void 0 === e) return console.error("This is not a regular Form name scope"), a.reject("This is not a regular Form name scope"), a.promise; if (e.validationId) t.$broadcast(e.$name + "submit-" + e.validationId, o++); else if (e.constructor === Array) for (var s in e) t.$broadcast(e[s].$name + "submit-" + e[s].validationId, o++); else for (var l in e) "$" !== l[0] && e[l].hasOwnProperty("$dirty") && t.$broadcast(l + "submit-" + e[l].validationId, o++); return a.promise.success = function (e) { return a.promise.then((function (t) { e(t) })), a.promise }, a.promise.error = function (e) { return a.promise.then(null, (function (t) { e(t) })), a.promise }, r((function () { i.checkValid(e) ? a.resolve("success") : a.reject("error") })), a.promise }, this.validCallback = null, this.invalidCallback = null, this.resetCallback = null, this.reset = function (e) { if (void 0 !== e) if (e.validationId) t.$broadcast(e.$name + "reset-" + e.validationId); else if (e.constructor === Array) for (var n in e) t.$broadcast(e[n].$name + "reset-" + e[n].validationId); else for (var r in e) "$" !== r[0] && e[r].hasOwnProperty("$dirty") && t.$broadcast(r + "reset-" + e[r].validationId); else console.error("This is not a regular Form name scope") }, this.addMsgElement = function (e) { return e.after("<span></span>") }, this.getMsgElement = function (e) { return e.next() }, this.$get = ["$injector", function (e) { return a(e), { setValidMethod: this.setValidMethod, getValidMethod: this.getValidMethod, setErrorHTML: this.setErrorHTML, getErrorHTML: this.getErrorHTML, setSuccessHTML: this.setSuccessHTML, getSuccessHTML: this.getSuccessHTML, setExpression: this.setExpression, getExpression: this.getExpression, setDefaultMsg: this.setDefaultMsg, getDefaultMsg: this.getDefaultMsg, showSuccessMessage: this.showSuccessMessage, showErrorMessage: this.showErrorMessage, checkValid: this.checkValid, validate: this.validate, validCallback: this.validCallback, invalidCallback: this.invalidCallback, resetCallback: this.resetCallback, reset: this.reset, addMsgElement: this.addMsgElement, getMsgElement: this.getMsgElement } }] })) }.call(this), function () { function e(e) { var t = e.get("$validation"), n = e.get("$timeout"), r = e.get("$parse"); return { link: function (e, i, a) { var o = r(a.validationReset)(e); n((function () { i.on("click", (function (e) { e.preventDefault(), t.reset(o) })) })) } } } angular.module("validation.directive").directive("validationReset", e), e.$inject = ["$injector"] }.call(this), function () { function e(e) { var t = e.get("$validation"), n = e.get("$timeout"), r = e.get("$parse"); return { priority: 1, require: "?ngClick", link: function (e, i, a) { var o = r(a.validationSubmit)(e); n((function () { i.off("click"), i.on("click", (function (n) { n.preventDefault(), t.validate(o).success((function () { r(a.ngClick)(e) })) })) })) } } } angular.module("validation.directive").directive("validationSubmit", e), e.$inject = ["$injector"] }.call(this), function () { function e(e) { var t = e.get("$validation"), n = e.get("$q"), r = e.get("$timeout"), i = e.get("$compile"), a = e.get("$parse"), o = {}, s = function (e) { var t = o[e]; return Object.keys(t).some((function (e) { return t[e] })) }; function l(e, t, n) { for (var r = document.querySelectorAll("*[validation-group=" + t + "]"), i = 0, a = r.length; i < a; i++) { var o = r[i], s = o.form.name, l = o.name; e[s][l].$setValidity(l, n) } } var c = {}; var u = function (e, r, c, d, f, p) { if (1 != f.length || 0 != f[0].trim().length) { var h = f.slice(0), m = h[0].trim(), g = m.indexOf("="), v = -1 === g ? m : m.substr(0, g), $ = -1 === g ? null : m.substr(g + 1), y = h.slice(1), b = v + "SuccessMessage", w = v + "ErrorMessage", S = t.getExpression(v), C = c.validationGroup, x = function (n) { return function (e, n, r, o, s, l) { var c, u = n || t.getDefaultMsg(r).success, d = a(l.validCallback), f = l.messageId, p = l.validationGroup; c = f || p ? angular.element(document.querySelector("#" + (f || p))) : t.getMsgElement(e), e.attr("no-validation-message") ? c.css("display", "none") : t.showSuccessMessage && u ? (c.html("").append(i(t.getSuccessHTML(u, e, l))(o)), c.css("display", "")) : c.css("display", "none"), s.$setValidity(s.$name, !0), d(o, { message: u }), t.validCallback && t.validCallback(e) }(r, n || c[b], v, e, d, c), !y.length || u(e, r, c, d, y, p) }, k = function (n) { return function (e, n, r, o, s, l) { var c, u = n || t.getDefaultMsg(r).error, d = a(l.invalidCallback), f = l.messageId, p = l.validationGroup; return c = f || p ? angular.element(document.querySelector("#" + (f || p))) : t.getMsgElement(e), e.attr("no-validation-message") ? c.css("display", "none") : t.showErrorMessage && u ? (c.html("").append(i(t.getErrorHTML(u, e, l))(o)), c.css("display", "")) : c.css("display", "none"), s.$setValidity(s.$name, !1), d(o, { message: u }), t.invalidCallback && t.invalidCallback(e), !1 }(r, n || c[w], v, e, d, c) }; if (void 0 === S) return console.error('You are using undefined validator "%s"', v), y.length ? u(e, r, c, d, y, p) : void 0; if (S.constructor === Function) return n.all([t.getExpression(v)(p, e, r, c, $)]).then((function (t) { var n = function (e) { var t = {}; return e && e.length > 0 ? (t = e[0], angular.isObject(t) || (t = { result: t, message: "" })) : t = { result: !1, message: "" }, t }(t), r = n.message; return n.result ? (C && (o[C][d.$name] = !0, l(e, C, !0)), x(r)) : C ? (o[C][d.$name] = !1, s(C) ? void l(e, C, !0) : (l(e, C, !1), k(r))) : k(r) }), (function () { return k() })); if (S.constructor !== RegExp) return k(); if (null != p) { if (t.getExpression(v).test(p)) return C && (o[C][d.$name] = !0, l(e, C, !0)), x(); if (!C) return k(); if (o[C][d.$name] = !1, !s(C)) return l(e, C, !1), k(); l(e, C, !0) } } }, d = function () { return (65536 * (1 + Math.random()) | 0).toString(16).substring(1) }; return { restrict: "A", require: "ngModel", link: function (e, n, i, a) { var s = i.validator, l = i.messageId, f = i.validationGroup, p = i.validMethod, h = i.ngModel, m = function () { }, g = s.split(","), v = a.validationId = d() + d() + d() + d(), $ = null, y = void 0; "boolean" == typeof i.initialValidity && (y = i.initialValidity), i.$observe("validator", (function (e) { g = e.split(",") })), f && (o[f] || (o[f] = {}), o[f][a.$name] = !1), l || f || t.addMsgElement(n), a.$setValidity(a.$name, y), e.$on(a.$name + "reset-" + v, (function () { m(), r((function () { a.$setViewValue($), a.$setPristine(), a.$setValidity(a.$name, void 0), a.$render(), l || f ? angular.element(document.querySelector("#" + (l || f))).html("") : t.getMsgElement(n).html(""), t.resetCallback && t.resetCallback(n) })) })), p = angular.isUndefined(p) ? t.getValidMethod() : p, e.$on(a.$name + "submit-" + v, (function (t, o) { var s = a.$viewValue, l = !1; l = u(e, n, i, a, g, s), "submit" === p && (m(), m = e.$watch((function () { return e.$eval(h) }), (function (t, r) { t !== r && (null == t && (t = ""), l = u(e, n, i, a, g, t)) }))); var d = function (e) { e ? delete c[o] : (c[o] = n[0], r((function () { c[Math.min.apply(null, Object.keys(c))].focus() }), 0)) }; l.constructor === Object ? l.then(d) : d(l) })), "blur" !== p ? "submit" !== p && "submit-only" !== p && (e.$watch((function () { return e.$eval(h) }), (function (r) { if (a.$pristine && a.$viewValue) $ = a.$viewValue || "", a.$setViewValue(a.$viewValue); else if (a.$pristine) return void (l || f ? angular.element(document.querySelector("#" + (l || f))).html("") : t.getMsgElement(n).html("")); u(e, n, i, a, g, r) })), r((function () { i.$observe("noValidationMessage", (function (e) { var r; r = l || f ? angular.element(document.querySelector("#" + (l || f))) : t.getMsgElement(n), "true" === e || !0 === e ? r.css("display", "none") : "false" !== e && !1 !== e || r.css("display", "block") })) }))) : n.bind("blur", (function () { var t = e.$eval(h); e.$apply((function () { u(e, n, i, a, g, t) })) })) } } } angular.module("validation.directive").directive("validator", e), e.$inject = ["$injector"] }.call(this), function () { angular.module("validation.rule", ["validation"]).config(["$validationProvider", function (e) { e.setExpression({ required: function (e) { return !!e }, url: /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/, email: /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/, number: /^\d+$/, phone: /^\(\d{3}\)\s\d{3}-\d{4}$/, minlength: function (e, t, n, r, i) { return e && e.length >= i }, maxlength: function (e, t, n, r, i) { return !e || e.length <= i } }).setDefaultMsg({ required: { error: "This field is required." }, url: { error: "This field is a URL." }, email: { error: "This field is an Email address." }, number: { error: "This field is a Number." }, phone: { error: "This field is a Phone." }, minlength: { error: "This field length is too short." }, maxlength: { error: "This field length is too long." } }) }]) }.call(this), function () { "use strict"; angular.module("ui.indeterminate", []).directive("uiIndeterminate", [function () { return { compile: function (e, t) { return t.type && "checkbox" === t.type.toLowerCase() ? function (e, t, n) { e.$watch(n.uiIndeterminate, (function (e) { t[0].indeterminate = !!e })) } : angular.noop } } }]) }(), function () { "use strict"; angular.module("ui.mask", []).value("uiMaskConfig", { maskDefinitions: { 9: /\d/, A: /[a-zA-Z]/, "*": /[a-zA-Z0-9]/ }, clearOnBlur: !0, clearOnBlurPlaceholder: !1, escChar: "\\", eventsToHandle: ["input", "keyup", "click", "focus"], addDefaultPlaceholder: !0, allowInvalidValue: !1 }).provider("uiMask.Config", (function () { var e = {}; this.maskDefinitions = function (t) { return e.maskDefinitions = t }, this.clearOnBlur = function (t) { return e.clearOnBlur = t }, this.clearOnBlurPlaceholder = function (t) { return e.clearOnBlurPlaceholder = t }, this.eventsToHandle = function (t) { return e.eventsToHandle = t }, this.addDefaultPlaceholder = function (t) { return e.addDefaultPlaceholder = t }, this.allowInvalidValue = function (t) { return e.allowInvalidValue = t }, this.$get = ["uiMaskConfig", function (t) { var n = t; for (var r in e) angular.isObject(e[r]) && !angular.isArray(e[r]) ? angular.extend(n[r], e[r]) : n[r] = e[r]; return n }] })).directive("uiMask", ["uiMask.Config", function (e) { function t(e) { return e === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) } return { priority: 100, require: "ngModel", restrict: "A", compile: function () { var n = angular.copy(e); return function (e, r, i, a) { function o(e) { return angular.isDefined(e) ? (function (e) { var t = 0; if (C = [], x = [], k = "", angular.isString(e)) { E = 0; var n = !1, r = 0, i = e.split(""), a = !1; angular.forEach(i, (function (e, i) { a ? (a = !1, k += e, t++) : q.escChar === e ? a = !0 : q.maskDefinitions[e] ? (C.push(t), k += p(i - r), x.push(q.maskDefinitions[e]), t++, n || E++, n = !1) : "?" === e ? (n = !0, r++) : (k += e, t++) })) } C.push(C.slice().pop() + 1), D = function () { var e, t, n = k.split(""); C && !isNaN(C[0]) && angular.forEach(C, (function (e) { n[e] = "_" })), e = n.join(""), t = e.replace(/[_]+/g, "_").split("_"), t = t.filter((function (e) { return "" !== e })); var r = 0; return t.map((function (t) { var n = e.indexOf(t, r); return r = n + 1, { value: t, position: n } })) }(), _ = C.length > 1 }(e), _ ? (function () { T = M = d(a.$modelValue || ""), I = f(T), A = u(T), i.maxlength && r.attr("maxlength", 2 * C[C.length - 1]), !L && q.addDefaultPlaceholder && r.attr("placeholder", k); for (var e = a.$modelValue, t = a.$formatters.length; t--;)e = a.$formatters[t](e); a.$viewValue = e || "", a.$render() }(), N || (r.bind("blur", h), r.bind("mousedown mouseup", m), r.bind("keydown", v), r.bind(q.eventsToHandle.join(" "), $), N = !0), !0) : c()) : c() } function s(e) { e && (k = e, !_ || 0 === r.val().length && angular.isDefined(i.placeholder) || r.val(f(d(r.val())))) } function l(e) { return _ ? (T = d(e || ""), A = u(T), a.$setValidity("mask", A), T.length && (A || q.allowInvalidValue) ? f(T) : void 0) : e } function c() { return _ = !1, N && (r.unbind("blur", h), r.unbind("mousedown", m), r.unbind("mouseup", m), r.unbind("keydown", v), r.unbind("input", $), r.unbind("keyup", $), r.unbind("click", $), r.unbind("focus", $), N = !1), angular.isDefined(L) ? r.attr("placeholder", L) : r.removeAttr("placeholder"), angular.isDefined(V) ? r.attr("maxlength", V) : r.removeAttr("maxlength"), r.val(a.$modelValue), a.$viewValue = a.$modelValue, !1 } function u(e) { return !e.length || e.length >= E } function d(e) { var t, n, i = "", a = r[0], o = x.slice(), s = O, l = s + S(a), c = ""; return e = e.toString(), t = 0, n = e.length - k.length, angular.forEach(D, (function (r) { var i = r.position; i >= s && l > i || (i >= s && (i += n), e.substring(i, i + r.value.length) === r.value && (c += e.slice(t, i), t = i + r.value.length)) })), e = c + e.slice(t), angular.forEach(e.split(""), (function (e) { o.length && o[0].test(e) && (i += e, o.shift()) })), i } function f(e) { var t = "", n = C.slice(); return angular.forEach(k.split(""), (function (r, i) { e.length && i === n[0] ? (t += e.charAt(0) || "_", e = e.substr(1), n.shift()) : t += r })), t } function p(e) { var t, n = angular.isDefined(i.uiMaskPlaceholder) ? i.uiMaskPlaceholder : i.placeholder; return angular.isDefined(n) && n[e] ? n[e] : "space" === (t = angular.isDefined(i.uiMaskPlaceholderChar) && i.uiMaskPlaceholderChar ? i.uiMaskPlaceholderChar : "_").toLowerCase() ? " " : t[0] } function h() { if ((q.clearOnBlur || q.clearOnBlurPlaceholder && 0 === T.length && i.placeholder) && (O = 0, P = 0, A && 0 !== T.length || ("", r.val(""), e.$apply((function () { a.$pristine || a.$setViewValue("") })))), T !== U) { var t = r.val(), n = "" === T && t && angular.isDefined(i.uiMaskPlaceholderChar) && "space" === i.uiMaskPlaceholderChar; n && r.val(""), function (e) { var t; if (angular.isFunction(window.Event) && !e.fireEvent) try { t = new Event("change", { view: window, bubbles: !0, cancelable: !1 }) } catch (e) { (t = document.createEvent("HTMLEvents")).initEvent("change", !1, !0) } finally { e.dispatchEvent(t) } else "createEvent" in document ? (t = document.createEvent("HTMLEvents"), t.initEvent("change", !1, !0), e.dispatchEvent(t)) : e.fireEvent && e.fireEvent("onchange") }(r[0]), n && r.val(t) } U = T } function m(e) { "mousedown" === e.type ? r.bind("mouseout", g) : r.unbind("mouseout", g) } function g() { P = S(this), r.unbind("mouseout", g) } function v(e) { var t = 8 === e.which, n = b(this) - 1 || 0, i = 90 === e.which && e.ctrlKey; if (t) { for (; n >= 0;) { if (y(n)) { w(this, n + 1); break } n-- } F = -1 === n } i && (r.val(""), e.preventDefault()) } function $(t) { var n = (t = t || {}).which, i = t.type; if (16 !== n && 91 !== n) { var o, s = r.val(), l = I, c = !1, u = d(s), p = M, h = b(this) || 0, m = O || 0, g = h - m, v = C[0], $ = C[u.length] || C.slice().shift(), x = P || 0, D = S(this) > 0, E = x > 0, T = s.length > l.length || x && s.length > l.length - x, A = s.length < l.length || x && s.length === l.length - x, _ = n >= 37 && 40 >= n && t.shiftKey, N = 8 === n || "keyup" !== i && A && -1 === g, L = 46 === n || "keyup" !== i && A && 0 === g && !E, V = (37 === n || N || "click" === i) && h > v; if (P = S(this), !_ && (!D || "click" !== i && "keyup" !== i && "focus" !== i)) { if (N && F) return r.val(k), e.$apply((function () { a.$setViewValue("") })), void w(this, m); if ("input" === i && A && !E && u === p) { for (; N && h > v && !y(h);)h--; for (; L && $ > h && -1 === C.indexOf(h);)h++; var R = C.indexOf(h); (u = u.substring(0, R) + u.substring(R + 1)) !== p && (c = !0) } for (o = f(u), I = o, M = u, !c && s.length > o.length && (c = !0), r.val(o), c && e.$apply((function () { a.$setViewValue(o) })), T && v >= h && (h = v + 1), V && h--, h = h > $ ? $ : v > h ? v : h; !y(h) && h > v && $ > h;)h += V ? -1 : 1; (V && $ > h || T && !y(m)) && h++, O = h, w(this, h) } } } function y(e) { return C.indexOf(e) > -1 } function b(e) { if (!e) return 0; if (void 0 !== e.selectionStart) return e.selectionStart; if (document.selection && t(r[0])) { e.focus(); var n = document.selection.createRange(); return n.moveStart("character", e.value ? -e.value.length : 0), n.text.length } return 0 } function w(e, n) { if (!e) return 0; if (0 !== e.offsetWidth && 0 !== e.offsetHeight) if (e.setSelectionRange) t(r[0]) && (e.focus(), e.setSelectionRange(n, n)); else if (e.createTextRange) { var i = e.createTextRange(); i.collapse(!0), i.moveEnd("character", n), i.moveStart("character", n), i.select() } } function S(e) { return e ? void 0 !== e.selectionStart ? e.selectionEnd - e.selectionStart : window.getSelection ? window.getSelection().toString().length : document.selection ? document.selection.createRange().text.length : 0 : 0 } var C, x, k, D, E, T, A, I, M, O, P, F, _ = !1, N = !1, L = i.placeholder, V = i.maxlength, R = a.$isEmpty; a.$isEmpty = function (e) { return R(_ ? d(e || "") : e) }; var j = !1; i.$observe("modelViewValue", (function (e) { "true" === e && (j = !0) })), i.$observe("allowInvalidValue", (function (e) { q.allowInvalidValue = "" === e || !!e, l(a.$modelValue) })); var q = {}; i.uiOptions ? (q = e.$eval("[" + i.uiOptions + "]"), q = angular.isObject(q[0]) ? function (e, t) { for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (void 0 === t[n] ? t[n] = angular.copy(e[n]) : angular.isObject(t[n]) && !angular.isArray(t[n]) && (t[n] = angular.extend({}, e[n], t[n]))); return t }(n, q[0]) : n) : q = n, i.$observe("uiMask", o), angular.isDefined(i.uiMaskPlaceholder) ? i.$observe("uiMaskPlaceholder", s) : i.$observe("placeholder", s), angular.isDefined(i.uiMaskPlaceholderChar) && i.$observe("uiMaskPlaceholderChar", (function () { return o(i.uiMask) })), a.$formatters.unshift(l), a.$parsers.unshift((function (e) { return _ ? (T = d(e || ""), A = u(T), a.$viewValue = T.length ? f(T) : "", a.$setValidity("mask", A), A || q.allowInvalidValue ? j ? a.$viewValue : T : void 0) : e })); var U = r.val(); r.bind("mousedown mouseup", m), Array.prototype.indexOf || (Array.prototype.indexOf = function (e) { if (null === this) throw new TypeError; var t = Object(this), n = t.length >>> 0; if (0 === n) return -1; var r = 0; if (arguments.length > 1 && ((r = Number(arguments[1])) != r ? r = 0 : 0 !== r && r !== 1 / 0 && r !== -1 / 0 && (r = (r > 0 || -1) * Math.floor(Math.abs(r)))), r >= n) return -1; for (var i = r >= 0 ? r : Math.max(n - Math.abs(r), 0); n > i; i++)if (i in t && t[i] === e) return i; return -1 }) } } } }]) }(), function () { "use strict"; function e(e, t) { return { link: function (e, n, r, i) { var a = e.$eval(r.niceOption), o = $(n).niceScroll(a), s = $(n).getNiceScroll(); r.niceScrollObject && t(r.niceScrollObject).assign(e, s); o.onscrollend = function (t) { this.newscrolly >= this.page.maxh && r.niceScrollEnd && e.$evalAsync(r.niceScrollEnd), t.end.y <= 0 && r.niceScrollTopEnd && e.$evalAsync(r.niceScrollTopEnd) }, e.$on("$destroy", (function () { angular.isDefined(o.version) && o.remove() })) } } } angular.module("angular-nicescroll", []).directive("ngNicescroll", e), e.$inject = ["$rootScope", "$parse"] }(),
    /*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */
    function (e, t) { "use strict"; "undefined" != typeof module && module.exports ? module.exports = t(require("angular")) : "function" == typeof define && define.amd ? define(["angular"], t) : t(e.angular) }(window, (function (e) { "use strict"; e.module("angucomplete-alt", []).directive("angucompleteAlt", ["$q", "$parse", "$http", "$sce", "$timeout", "$templateCache", "$interpolate", function (e, t, n, r, i, a, o) { var s = "/angucomplete-alt/index.html"; function l(t, a, o, s) { var l, c, u, d, f, p, h = a.find("input"), m = 3, g = null, v = "autocomplete-required", $ = null, y = null, b = !1, w = a[0].querySelector(".angucomplete-dropdown"), S = !1, C = null; function x(e, n) { e && ("object" == typeof e ? (t.searchStr = T(e), E({ originalObject: e })) : "string" == typeof e && e.length > 0 ? t.searchStr = e : console && console.error && console.error("Tried to set " + (n ? "initial" : "") + " value of angucomplete to", e, "which is an invalid value"), M(!0)) } function k(e) { C = null, t.hideResults(e), document.body.removeEventListener("click", k) } function D(e) { return e.which ? e.which : e.keyCode } function E(e) { "function" == typeof t.selectedObject ? t.selectedObject(e, t.selectedObjectData) : t.selectedObject = e, M(!!e) } function T(e) { return t.titleField.split(",").map((function (t) { return A(e, t) })).join(" ") } function A(e, t) { var n, r; if (t) { n = t.split("."), r = e; for (var i = 0; i < n.length; i++)r = r[n[i]] } else r = e; return r } function I(e, n) { var i, a, o; if (o = new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i"), e) return e.match && e.replace || (e = e.toString()), i = (a = e.match(o)) ? e.replace(o, '<span class="' + t.matchClass + '">' + a[0] + "</span>") : e, r.trustAsHtml(i) } function M(e) { t.notEmpty = e, $ = t.searchStr, t.fieldRequired && s && t.inputName && s[t.inputName].$setValidity(v, e) } function O(e) { !t.overrideSuggestions || t.selectedObject && t.selectedObject.originalObject === t.searchStr || (e && e.preventDefault(), i.cancel(g), V(), E({ originalObject: t.searchStr }), t.clearSelected && (t.searchStr = null), q()) } function P() { return a[0].querySelectorAll(".angucomplete-row")[t.currentIndex] } function F(e) { w.scrollTop = w.scrollTop + e } function _() { var e = t.results[t.currentIndex]; t.matchClass ? h.val(T(e.originalObject)) : h.val(e.title) } function N(e) { return function (n, r, i, a) { r || i || a || !n.data || (n = n.data), t.searching = !1, H(A(c(n), t.remoteUrlDataField), e) } } function L(e, n, r, i) { t.searching = b, n || r || i || (n = e.status), 0 !== n && -1 !== n && (t.remoteUrlErrorCallback ? t.remoteUrlErrorCallback(e, n, r, i) : console && console.error && console.error("http error")) } function V() { y && y.resolve() } function R(r) { var i = {}, a = t.remoteUrl + encodeURIComponent(r); t.remoteUrlRequestFormatter && (i = { params: t.remoteUrlRequestFormatter(r) }, a = t.remoteUrl), t.remoteUrlRequestWithCredentials && (i.withCredentials = !0), V(), y = e.defer(), i.timeout = y.promise, b = !0, n.get(a, i).then(N(r)).catch(L).finally((function () { b = !1 })) } function j(n) { V(), y = e.defer(), t.remoteApiHandler(n, y.promise).then(N(n)).catch(L) } function q() { t.showDropdown = !1, t.results = [], w && (w.scrollTop = 0) } function U() { t.showDropdown = d, t.currentIndex = t.focusFirst ? 0 : -1, t.results = [] } function B(e) { !e || e.length < m || (t.localData ? t.$apply((function () { var n; n = void 0 !== t.localSearch() ? t.localSearch()(e, t.localData) : function (e) { var n, r, i, a, o = t.searchFields.split(","), s = []; for (void 0 !== t.parseInput() && (e = t.parseInput()(e)), n = 0; n < t.localData.length; n++) { for (r = !1, i = 0; i < o.length; i++)a = A(t.localData[n], o[i]) || "", r = r || a.toString().toLowerCase().indexOf(e.toString().toLowerCase()) >= 0; r && (s[s.length] = t.localData[n]) } return s }(e), t.searching = !1, H(n, e) })) : t.remoteApiHandler ? j(e) : R(e)) } function H(e, n) { var r, i, a, o, s, l; if (e && e.length > 0) for (t.results = [], r = 0; r < e.length; r++)t.titleField && "" !== t.titleField && (o = s = T(e[r])), i = "", t.descriptionField && (i = l = A(e[r], t.descriptionField)), a = "", t.imageField && (a = A(e[r], t.imageField)), t.matchClass && (s = I(o, n), l = I(i, n)), t.results[t.results.length] = { title: s, description: l, image: a, originalObject: e[r] }; else t.results = []; t.autoMatch && 1 === t.results.length && function (e, n, r) { if (!r) return !1; for (var i in n) if (n[i].toLowerCase() === r.toLowerCase()) return t.selectResult(e), !0; return !1 }(t.results[0], { title: o, desc: i || "" }, t.searchStr) ? t.showDropdown = !1 : 0 !== t.results.length || f ? t.showDropdown = !0 : t.showDropdown = !1 } function z() { t.localData ? (t.searching = !1, H(t.localData, "")) : t.remoteApiHandler ? (t.searching = !0, j("")) : (t.searching = !0, R("")) } a.on("mousedown", (function (e) { e.target.id ? (C = e.target.id) === t.id + "_dropdown" && document.body.addEventListener("click", k) : C = e.target.className })), t.currentIndex = t.focusFirst ? 0 : null, t.searching = !1, u = t.$watch("initialValue", (function (e) { e && (u(), x(e, !0)) })), t.$watch("fieldRequired", (function (e, n) { e !== n && (e ? $ && -1 !== t.currentIndex ? M(!0) : M(!1) : s[t.inputName].$setValidity(v, !0)) })), t.$on("angucomplete-alt:clearInput", (function (e, n) { n && n !== t.id || (t.searchStr = null, E(), M(!1), q()) })), t.$on("angucomplete-alt:changeInput", (function (e, n, r) { n && n === t.id && x(r) })), t.onFocusHandler = function () { t.focusIn && t.focusIn(), 0 !== m || t.searchStr && 0 !== t.searchStr.length || (t.currentIndex = t.focusFirst ? 0 : t.currentIndex, t.showDropdown = !0, z()) }, t.hideResults = function () { C && (C === t.id + "_dropdown" || C.indexOf("angucomplete") >= 0) ? C = null : t.noHideResults || (l = i((function () { q(), t.$apply((function () { t.searchStr && t.searchStr.length > 0 && h.val(t.searchStr) })) }), 200), V(), t.focusOut && t.focusOut(), t.overrideSuggestions && t.searchStr && t.searchStr.length > 0 && -1 === t.currentIndex && O()) }, t.resetHideResults = function () { l && i.cancel(l) }, t.hoverRow = function (e) { t.currentIndex = e }, t.selectResult = function (e) { t.matchClass && (e.title = T(e.originalObject), e.description = A(e.originalObject, t.descriptionField)), t.clearSelected ? t.searchStr = null : t.searchStr = e.title, E(e), q() }, t.inputChangeHandler = function (e) { return e.length < m ? (V(), q()) : 0 === e.length && 0 === m && z(), t.inputChanged && (e = t.inputChanged(e)), e }, t.fieldRequiredClass && "" !== t.fieldRequiredClass && (v = t.fieldRequiredClass), t.minlength && "" !== t.minlength && (m = parseInt(t.minlength, 10)), t.pause || (t.pause = 500), t.clearSelected || (t.clearSelected = !1), t.overrideSuggestions || (t.overrideSuggestions = !1), t.fieldRequired && s && (t.initialValue ? M(!0) : M(!1)), t.inputType = o.type ? o.type : "text", t.textSearching = o.textSearching ? o.textSearching : "Searching...", t.textNoResults = o.textNoResults ? o.textNoResults : "No results found", d = "false" !== t.textSearching, f = "false" !== t.textNoResults, t.maxlength = o.maxlength ? o.maxlength : 524288, h.on("keydown", (function (e) { var n = D(e), r = null, i = null; 13 === n && t.results ? (t.currentIndex >= 0 && t.currentIndex < t.results.length ? (e.preventDefault(), t.selectResult(t.results[t.currentIndex])) : (O(e), q()), t.$apply()) : 40 === n && t.results ? (e.preventDefault(), t.currentIndex + 1 < t.results.length && t.showDropdown && (t.$apply((function () { t.currentIndex++, _() })), S && (r = P(), w.getBoundingClientRect().top + parseInt(getComputedStyle(w).maxHeight, 10) < r.getBoundingClientRect().bottom && F(function (e) { var t = getComputedStyle(e); return e.offsetHeight + parseInt(t.marginTop, 10) + parseInt(t.marginBottom, 10) }(r))))) : 38 === n && t.results ? (e.preventDefault(), t.currentIndex >= 1 ? (t.$apply((function () { t.currentIndex--, _() })), S && (i = P().getBoundingClientRect().top - (w.getBoundingClientRect().top + parseInt(getComputedStyle(w).paddingTop, 10))) < 0 && F(i - 1)) : 0 === t.currentIndex && t.$apply((function () { t.currentIndex = -1, h.val(t.searchStr) }))) : 9 === n ? t.results && t.results.length > 0 && t.showDropdown ? -1 === t.currentIndex && t.overrideSuggestions ? O() : (-1 === t.currentIndex && (t.currentIndex = 0), t.selectResult(t.results[t.currentIndex]), t.$digest()) : t.searchStr && t.searchStr.length > 0 && O() : 27 === n && e.preventDefault() })), h.on("keyup compositionend", (function (e) { var n = D(e); if (37 !== n && 39 !== n) if (38 === n || 13 === n) e.preventDefault(); else if (40 === n) e.preventDefault(), !t.showDropdown && t.searchStr && t.searchStr.length >= m && (U(), t.searching = !0, B(t.searchStr)); else if (27 === n) q(), t.$apply((function () { h.val(t.searchStr) })); else { if (0 === m && !t.searchStr) return; t.searchStr && "" !== t.searchStr ? t.searchStr.length >= m && (U(), g && i.cancel(g), t.searching = !0, g = i((function () { B(t.searchStr) }), t.pause)) : t.showDropdown = !1, $ && $ !== t.searchStr && !t.clearSelected && t.$apply((function () { E() })) } })), p = "remoteUrlResponseFormatter", c = function (e) { return t[p] ? t[p](e) : e }, i((function () { var e = getComputedStyle(w); S = e.maxHeight && "auto" === e.overflowY })) } return a.put(s, '<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}">  <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="searchStr" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(searchStr)"/>  <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="showDropdown">    <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div>    <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div>    <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}">      <div ng-if="imageField" class="angucomplete-image-holder">        <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/>        <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div>      </div>      <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div>      <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div>      <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div>      <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div>    </div>  </div></div>'), { restrict: "EA", require: "^?form", scope: { selectedObject: "=", selectedObjectData: "=", disableInput: "=", initialValue: "=", localData: "=", localSearch: "&", remoteUrlRequestFormatter: "=", remoteUrlRequestWithCredentials: "@", remoteUrlResponseFormatter: "=", remoteUrlErrorCallback: "=", remoteApiHandler: "=", id: "@", type: "@", placeholder: "@", textSearching: "@", textNoResults: "@", remoteUrl: "@", remoteUrlDataField: "@", titleField: "@", descriptionField: "@", imageField: "@", inputClass: "@", pause: "@", searchFields: "@", minlength: "@", matchClass: "@", clearSelected: "@", overrideSuggestions: "@", fieldRequired: "=", fieldRequiredClass: "@", inputChanged: "=", autoMatch: "@", focusOut: "&", focusIn: "&", fieldTabindex: "@", inputName: "@", focusFirst: "@", parseInput: "&", noHideResults: "@" }, templateUrl: function (e, t) { return t.templateUrl || s }, compile: function (e) { var t = o.startSymbol(), n = o.endSymbol(); if ("{{" !== t || "}}" !== n) { var r = e.html().replace(/\{\{/g, t).replace(/\}\}/g, n); e.html(r) } return l } } }]) })), function (e, t) { var n = t.module("viValidation", []); function r(e) { return t.isUndefined(e) || "" === e || null === e || e != e || null == typeof e } MessageUtil = { ERROR_MESSAGES: { required: "This field is required.", min: "This field should not be smaller than min value.", max: "This field should not be larger than max value.", minlength: "This field length should not be smaller than minimum.", maxlength: "This field length should not be larger than maximum.", pattern: "This field doesn't match the format.", email: "This field doesn't match the email format.", mask: "This field doesn't match the format.", datetimerange: "This field should be in the range of minimum and maximum.", datetimeformat: "This field doesn't match the format.", disallowHtml: "You cannot use HTML or ASP.NET code in the field.", multipleEmails: "This field contains invalid email address." }, buildMessagesHTML: function (e) { var n = t.extend({}, this.ERROR_MESSAGES, e || {}), r = ""; return t.forEach(n, (function (e, t) { r += '<div ng-message="' + t + '">' + e + "</div>" })), r }, defaultMessagesHTML: "" }, MessageUtil.defaultMessagesHTML = MessageUtil.buildMessagesHTML(), n.directive("validateinput", ["$compile", "$parse", "$timeout", function (e, n, r) { return { restrict: "A", require: "^form", link: function (n, i, a, o) { var s = a.validateinputErrorMessage || "", l = a.validateinputMessageElement ? t.element(a.validateinputMessageElement) : i; i.find(a.validateinputTarget || "[ng-model]").addClass("error-target").attr("error-target", ""); var c = null, u = null; r((function () { a.validateinputFieldName && (u = n.$eval(a.validateinputFieldName) || a.validateinputFieldName), a.validateinputErrorMessagesExpr && (c = a.validateinputErrorMessagesExpr); var t = i.find("[ng-model][name]"); t.length > 0 && (c || (c = t.attr("error-messages-expr")), u || (u = t.attr("name") + "").length > 2 && "{{" == u.substr(0, 2) && (u = u.substr(2, u.length - 4), u = n.$eval(u))); var r = "", d = i.attr("validate-hide-message"); if (!(void 0 !== d && !1 !== d)) { if (c) { var f = n.$eval(c); r = MessageUtil.buildMessagesHTML(f) } else r = s ? '<div ng-messages-include="' + s + '"></div>' : MessageUtil.defaultMessagesHTML; var p = o.$name + "." + u, h = '<div ng-messages="' + p + '.$error" ng-show="' + p + ".$dirty || " + o.$name + '.$submitted">' + r + "</div>"; l.append(e(h)(n)) } n.$watch((function () { if (u && o[u]) return o[u].$invalid && (o[u].$dirty || o.$submitted) }), (function (e) { e ? i.addClass("has-error") : i.removeClass("has-error") })) })) } } }]), n.directive("ngMin", ["$timeout", function (e) { return { restrict: "A", require: "ngModel", link: function (t, n, i, a) { t.$watch(i.ngMin, (function () { e((function () { a.$validate() })) })), a.$validators.min = function (e, n) { var a = "float" == i.numberType ? parseFloat : parseInt, o = a(i.ngMin) || t.$eval(i.ngMin) || -1 / 0; return !(!r(e) && a(e) < o) } } } }]), n.directive("ngMax", ["$timeout", function (e) { return { restrict: "A", require: "ngModel", link: function (t, n, i, a) { t.$watch(i.ngMax, (function () { e((function () { a.$validate() })) })), a.$validators.max = function (e, n) { var a = "float" == i.numberType ? parseFloat : parseInt, o = a(i.ngMax) || t.$eval(i.ngMax) || 1 / 0; return !(!r(e) && a(e) > o) } } } }]), n.directive("viDatetimerange", ["$timeout", function (e) { return { restrict: "A", require: "ngModel", link: function (t, n, r, i) { i.$validators.datetimerange = function (e, n) { if (i.$isEmpty(e)) return !0; var a = new Date(e), o = !1, s = t.$eval(r.kMax) || new Date(2099, 11, 31); s && a > (s = new Date(s.toString())) && (o = !0); var l = t.$eval(r.kMin) || new Date(1900, 0, 1); return l && a < (l = new Date(l.toString())) && (o = !0), !o }, t.$watch(r.kMax, (function () { e((function () { i.$validate() })) })), t.$watch(r.kMin, (function () { e((function () { i.$validate() })) })), t.$watch(r.viUseDateOnly, (function (e) { var n = t.$parent.$parent.field.meta; n.settingObj && n.settingObj.datetimeRangeMax && n.settingObj.datetimeRangeMax.length < 12 && (n.settingObj.datetimeRangeMax = $.formatDate($.parseDate(n.settingObj.datetimeRangeMax), "MM/dd/yyyy hh:mm tt")), n.settingObj && n.settingObj.datetimeRangeMin && n.settingObj.datetimeRangeMin.length < 12 && (n.settingObj.datetimeRangeMin = $.formatDate($.parseDate(n.settingObj.datetimeRangeMin), "MM/dd/yyyy hh:mm tt")), n.defaultValueDatetime && n.defaultValueDatetime.length < 12 && (n.defaultValueDatetime = $.formatDate($.parseDate(n.defaultValueDatetime), "MM/dd/yyyy hh:mm tt")) })) } } }]), n.directive("viDatetimeformat", ["$timeout", function (e) { return { restrict: "A", require: "ngModel", link: function (e, t, n, r) { var i = function (e) { if (r.$isEmpty(e)) return !0; var t = !1; try { var n = Date.parse(e); isNaN(n) && (t = !0) } catch (e) { t = !0 } return !t }; r.$formatters.push((function (e) { return e })), r.$parsers.push((function (e) { return e })), r.$validators.datetimeformat = function (e, t) { return i(e) }, n.$observe("viDatetimeformat", (function (e) { r.$setValidity("datetimeformat", i(e)) })) } } }]), n.directive("viCompareWithStartDate", ["$timeout", function (e) { return { restrict: "A", require: "?ngModel", link: function (n, r, i, a) { var o = function (e, n) { if (e && 2 == n.length) { var r = n[1].split(":"), i = t.element(r[1]).controller("ngModel").$modelValue, a = i && "startAllDay" == r[0], o = i && "endAllDay" == r[0]; if (a) (e = new Date(e)).setHours(0, 0, 0, 0); if (o) (e = new Date(e)).setHours(23, 59, 0, 0) } return e }; e((function () { for (var e = i.viCompareWithStartDate.split(","), r = 0; r < e.length; r++)!function (r, i) { var s = i.split("|"), l = s[0], c = t.element("[ng-model='" + l + "']"), u = c.controller("ngModel"); n.$watch((function () { return a.$modelValue }), (function () { a.$validate() })), n.$watch((function () { return u.$modelValue }), (function () { a.$validate() })); var d = 1 == e.length ? "checkStartDate" : "checkStartDate_" + r; a.$validators[d] = function (e) { c.controller("ngModel") || (c = t.element("[ng-model='" + l + "']"), u = c.controller("ngModel")); var n, r, i = c.controller("ngModel").$modelValue; return i = o(i, s), r = i, !(n = e) || !r || (r instanceof Date || (r = new Date(r)), n instanceof Date || (n = new Date(n)), n >= r) } }(r, e[r]) }), 100) } } }]), n.directive("viCompareWithEndDate", ["$timeout", function (e) { return { restrict: "A", require: "?ngModel", link: function (n, r, i, a) { var o = function (e, n) { if (e && 2 == n.length) { var r = n[1].split(":"), i = t.element(r[1]).controller("ngModel").$modelValue, a = i && "startAllDay" == r[0], o = i && "endAllDay" == r[0]; if (a) (e = new Date(e)).setHours(0, 0, 0, 0); if (o) (e = new Date(e)).setHours(23, 59, 0, 0) } return e }; e((function () { for (var e = i.viCompareWithEndDate.split(","), r = 0; r < e.length; r++)!function (r, i) { var s = i.split("|"), l = s[0], c = t.element("[ng-model='" + l + "']"), u = c.controller("ngModel"); n.$watch((function () { return a.$modelValue }), (function () { a.$validate() })), n.$watch((function () { return u.$modelValue }), (function () { a.$validate() })); var d = 1 == e.length ? "checkEndDate" : "checkEndDate_" + r; a.$validators[d] = function (e) { c.controller("ngModel") || (c = t.element("[ng-model='" + l + "']"), u = c.controller("ngModel")); var n, r, i = c.controller("ngModel").$modelValue; return i = o(i, s), r = e, !(n = i) || !r || (r instanceof Date || (r = new Date(r)), n instanceof Date || (n = new Date(n)), n >= r) } }(r, e[r]) }), 100) } } }]), n.directive("viAllowHtml", ["$timeout", function (e) { return { restrict: "A", require: "?ngModel", link: function (e, t, n, r) { var i = e.$eval(n.viAllowHtml || "true"); r.$validators.disallowHtml = function (e, t) { return !(!i && e) || !/<(S*?)[^>]*>.*?|<.*?\/>/gi.test(e) } } } }]), n.directive("ngMaxlength", (function () { return { restrict: "A", require: "ngModel", link: function (e, t, n, i) { var a = [8, 9, 13, 16, 17, 18, 19, 20, 27], o = $(t), s = e.$eval(n.viNotAllowInput || "true"); o.on("keyup", (function (t) { if ($.inArray(a, t.keyCode) > -1) return !0; var i = parseInt(n.ngMaxlength) || e.$eval(n.ngMaxlength) || 1 / 0, l = o.val(); return s && !r(l) && l.length > i ? (o.val(l.substr(0, l.length - 1)), !1) : void 0 })) } } })), n.directive("viMultipleEmails", ["$timeout", function (e) { return { restrict: "A", require: "?ngModel", link: function (e, t, n, r) { var i = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i, a = function (e) { if (!e) return !0; var t = []; (e.indexOf(";") > -1 || e.indexOf(",") > -1) && (t = t.concat(e.split(/[;,]/))), 0 == t.length && t.push(e); for (var n = !0, r = 0; r < t.length; r++) { if (t[r] = $.trim(t[r]), "" == t[r]) { n = !1; break } n = i.test(t[r]) } return n }; e.$watch((function () { return r.$viewValue }), (function () { r.$setValidity("multipleEmails", a(r.$viewValue)) })), r.$validators.multipleEmails = function (e) { return a(e) } } } }]) }(window, angular), function (e, t, n) { var r = t.module("vi.common", ["ngSanitize"]); e.visionApps && r.constant("frontendCoreConfig", { cmsEndPoint: e.visionOptions.virtualApplicationPath }).config(["$httpProvider", function (e) { e.interceptors.push("viCommonAPIInterceptor"), delete e.defaults.headers.common["X-Requested-With"] }]).service("viCommonAPIInterceptor", ["$q", "$injector", function (t, n) { this.request = function (r) { if (!r.avoidConfig) { var i = n.get("viTokenService"); if (r.url == i.tokenUrl) return t.when(r); if (0 != r.url.indexOf("http")) return t.when(r); if (!e.visionOptions.loggedIn && !e.visionOptions.memberLoggedIn && !e.visionOptions.websiteUserLoggedIn && (!e.InterceptorNextExtendingMinTime || (new Date).getTime() > e.InterceptorNextExtendingMinTime)) return i.getToken().then((function (t) { return t.data && t.data.Token && (e.visionApps.token = t.data.Token, r.headers.Authorization || (r.headers.Authorization = "Bearer " + e.visionApps.token)), e.InterceptorNextExtendingMinTime = (new Date).getTime() + 6e5, r })); !r.headers.Authorization && e.visionApps.token && (r.headers.Authorization = "Bearer " + e.visionApps.token) } return t.when(r) } }]) }(window, angular, jQuery), function () { "use strict"; var e = angular.module("vi.fe.common", []), t = angular.extend({ loginPage: "", popupLoginPage: "", photoBaseUrl: "", photoBaseUrlForPeople: "", token: "", cmsUserLogged: !1, anonymousAvatar: "", loginUser: { name: "", avatar: "", userID: 0, firstName: "", lastName: "", imageID: null, email: "" } }, window.frontendCommonConfig || {}); e.constant("commonConfig", t) }(), function (e, t, n) { t.module("vi.common").directive("viFePoshytip", ["$timeout", function (e) { return { link: function (t, n, r) { var i = $(n); $((function () { $.fn.poshytip && e((function () { i.poshytip(), i.hasClass("click-show") && i.bind("click", (function () { var e = $(this), t = e.data("poshytip"); t && t.$tip.data("active") ? e.poshytip("hide") : e.poshytip("show") })) }), 0) })) } } }]) }(window, angular, jQuery), function (e, t, n) { t.module("vi.common").directive("viSysFormatDate", ["$compile", "viUIDateTimeFormatConfig", "viUIDateTimeConverter", function (e, n, r) { return { restrict: "EA", template: '<span title="{{formattedValue}}" ng-if="showTitle">{{formattedValue}}</span><span ng-if="!showTitle">{{formattedValue}}</span>', scope: { curVal: "=", settingStr: "=", settingObj: "=", showTitle: "=" }, link: function (e, n, i, a) { var o = e.settingObj || t.fromJson(e.settingStr || '""'); e.formattedValue = e.curVal ? o && o.datetimeUseDateOnly ? r.dateToString(null, r.stringToDate(null, e.curVal, !0)) : r.dateTimeToString(null, r.stringToDateTime(null, e.curVal, " ", !0), null) : "" } } }]) }(window, window.angular, jQuery), function (e, t, n) { t.module("vi.common").directive("viSysFormatPhone", ["$compile", function (t) { return { restrict: "EA", template: '<span ng-if="showTitle" title="{{FormattedValue}}">{{FormattedValue}}</span><span ng-if="!showTitle">{{FormattedValue}}</span>', scope: { curVal: "=", showTitle: "=" }, link: function (t, n, r, i) { var a = e.visionApps.cms_core.PhoneFormat.replace(/9/g, "0"); $.viFormatPhone || $.extend($, { viFormatPhone: function (e, t) { if (e) { var n = ("" + e).replace(/\D/g, "").match(/^(\d{3})(\d{3})(\d{4})$/), r = t.replace("{0:", "").replace("}", "").replace(/\\/g, ""); return n ? r ? r.indexOf("9") >= 0 ? r.replace("999", n[1]).replace("999", n[2]).replace("9999", n[3]) : r.replace("000", n[1]).replace("000", n[2]).replace("0000", n[3]) : "(" + n[1] + ") " + n[2] + "-" + n[3] : "" } return "" } }), t.FormattedValue = t.curVal ? $.viFormatPhone(t.curVal, a) : "" } } }]) }(window, window.angular, jQuery), function (e, t) { t.module("vi.common").directive("viEnter", (function () { return function (e, t, n) { t.bind("keydown keypress", (function (t) { 13 === t.which && (e.$apply((function () { e.$eval(n.viEnter) })), t.preventDefault()) })) } })) }(window, angular), function (e, t) { t.module("vi.common").directive("viPagination", ["$parse", function (e) { return { scope: { totalItems: "=", pageSize: "=", pageNumber: "=", changePage: "&", initApi: "&" }, replace: !0, restrict: "EA", template: '<div class="list-pager" ng-show="totalPages > 1"><a href="javascript:void(0);" ng-click="selectPage(1, $event)" ng-class="noPrevious() ? \'disabled\' : \'pg-normal\'" class="pg-button pg-first-button"> « First </a><a href="javascript:void(0);" ng-click="selectPage(currentPage - 1, $event)" ng-class="noPrevious() ? \'disabled\' : \'pg-normal\'" class="pg-button pg-prev-button"> « Previous </a> | <a ng-repeat="page in pages track by $index" href="javascript:void(0);" ng-click="selectPage(page, $event)" ng-class="page==currentPage ? \'pg-selected\' : \'pg-normal\'">{{page}}</a> | <a href="javascript:void(0);" ng-click="selectPage(currentPage + 1, $event)" ng-class="noNext() ? \'disabled\' : \'pg-normal\'" class="pg-button pg-next-button"> Next » </a><a href="javascript:void(0);" ng-click="selectPage(totalPages, $event)" ng-class="noNext() ? \'disabled\' : \'pg-normal\'" class="pg-button pg-first-button"> Last » </a></div>', link: function (e, n, r, i) { function a() { var n = function (e, t) { var n = [], r = 1, i = t, a = 10, o = !0; a < t && (o ? (i = (r = Math.max(e - Math.floor(a / 2), 1)) + a - 1) > t && (r = (i = t) - a + 1) : (r = (Math.ceil(e / a) - 1) * a + 1, i = Math.min(r + a - 1, t))); for (var s = r; s <= i; s++) { var l = s; n.push(l) } return n }(e.currentPage, e.totalPages); e.pages.splice(0, e.pages.length), t.forEach(n, (function (t, n) { e.pages.push(t) })) } e.initApi({ api: { toFirst: function () { e.selectPage(1, null) } } }), e.currentPage = e.pageNumber || 1, e.totalPages = Math.floor((e.totalItems + e.pageSize - 1) / e.pageSize), e.pages = [], e.selectPage = function (n, r) { if (r) { var i = t.element(r.target); if (i.hasClass("disabled") || i.hasClass("pg-selected")) return } e.currentPage = n, a(), e.changePage({ number: e.currentPage }) }, e.noPrevious = function () { return 1 == e.currentPage }, e.noNext = function () { return e.currentPage == e.totalPages }, e.$watch((function () { return e.currentPage == e.totalPages })), e.$watch((function () { return e.totalItems }), (function (t) { e.totalPages = Math.floor((e.totalItems + e.pageSize - 1) / e.pageSize), a(), e.currentPage > e.totalPages && (e.currentPage = e.totalPages || 1, e.changePage({ number: e.currentPage })) })), e.$watch((function () { return e.pageSize }), (function (t) { e.totalPages = Math.floor((e.totalItems + e.pageSize - 1) / e.pageSize), a(), e.currentPage > e.totalPages && (e.currentPage = e.totalPages || 1, e.changePage({ number: e.currentPage })) })), a() } } }]) }(window, angular), function (e, t) { var n = t.module("vi.common"), r = "?navid=", i = e.visionOptions.loggedIn ? "home/showimage" : "home/showpublishedimage", a = e.visionOptions.loggedIn ? "home/showdocument" : "home/showpublisheddocument", o = /(href\s*=\s*[\"'])(\s*\/?\?\s*navid\s*=)(.*?[\"'])/gi, s = /((?:href|src)\s*=\s*[\"'])(?!(http[s]?:))[^'\"]*?home\/showdocument\s*(\?.*?[\"'])/gi, l = /((?:href|src)\s*=\s*[\"'])(?!(http[s]?:))[^'\"]*?home\/showimage\s*(\?.*?[\"'])/gi, c = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]+\b([-a-zA-Z0-9@:%_\+.~#?&//=/(/)]*)/gi; n.filter("maskTextToStore", [function () { return function (e) { var t = e; return "<br />" != t && "<br/>" != t && "<br>" != t || (t = ""), t = (t = (t = t.replace(l, "$1" + i + "$3")).replace(s, "$1" + a + "$3")).replace(o, "$1" + r + "$3") } }]).filter("maskText", [function () { return function (n, c, u) { if (t.isString(n)) { c = c || !1, u = u || !1; var d = e.visionOptions.virtualApplicationPath; d.endsWith("/") || (d += "/"), c && (d = e.location.origin + d); var f = d + "Home/Components/FormBuilder/FormBuilder/", p = d + "Home/Components/Flex"; (e.location.href.indexOf(f) > -1 || e.location.href.indexOf(p) > -1) && (u = !0); var h = e.visionOptions.enableSplashUrl; if (n = (n = (n = n.replace(l, "$1" + d + i + "$3")).replace(s, "$1" + d + a + "$3")).replace(o, "$1" + d + r + "$3"), u && h) { var m = document.createElement("div"); m.innerHTML = n; var g = m.querySelectorAll("a"); if (0 == g.length) return n; var v, y = []; for (let t = 0; t < m.querySelectorAll("a").length; t++) { var b = g[t].href; b.indexOf(e.location.origin) < 0 && y.indexOf(b) < 0 && y.push(b) } if (y.length > 0) $.ajax({ url: e.location.origin + visionOptions.virtualApplicationPath + "Shared/SplashPageListAll", type: "POST", data: { links: y }, async: !1, success: function (e) { v = e.length > 0 ? e : [] } }), Enumerable.From(v).Where((function (e) { return 0 == e.Allow })).ToArray().forEach((function (t) { var r = t.Link.replace(/&(?!amp;)/g, "&amp;"), i = '<a href="' + (r = r.endsWith("/") ? r.slice(0, -1) : r) + '"', a = '<a href="' + r + '/"', o = '<a href="' + e.visionOptions.virtualApplicationPath + "?splash=" + encodeURIComponent(r) + '&____isexternal=true"'; n.indexOf(a) && (n = n.replaceAll(a, o)), n = n.replaceAll(i, o) })) } return n } return n } }]), n.filter("textToHtml", [function () { return function (e) { return e && t.isString(e) ? e.replace(/\r\n|\r|\n/g, "<br/>") : e } }]), n.filter("distinctLength", ["viUtils", function (e) { return function (e, t) { e = e || []; var n = Enumerable.From(e); return (t ? n.SelectMany("value,index=>value." + t) : n).Distinct().Count() } }]).filter("lengthCountLeft", ["viUtils", function (e) { return function (e, n, r) { if (e = e || "", r = r || !1) { var i = e.match(c), a = e.length; return t.forEach(i, (function (e, t) { a = a - e.length + 23 })), n - a } return n - e.length } }]).filter("hasFlag", (function () { return function (e, t) { return (e & t) > 0 } })).filter("replaceMultiEmptyLine", (function () { return function (e) { return e ? e.replace(/(<br\/>[\n\s]*)+/gi, "<br/>") : e } })).filter("to_trusted", ["$sce", function (e) { return function (t) { return e.trustAsHtml(t) } }]).filter("disableAllLinks", [function () { return function (e) { return e.replace(/href="([^\'\"]+)/gi, "href='javascript: void(0)'") } }]) }(window, window.angular), function (e, t, n) { "use strict"; t.module("vi.fe.common").factory("feUtils", (function () { return { formatHtmlToText: function (e, t, n, r) { var i = e || ""; if (n = n || !0, r = r || !0, i.length > 0) { if (i = $("<div></div>").html(i).text(), r) for (i = i.trim(); i.indexOf("  ") > 0;)i = i.replace(/  /g, " "); t && i.Length > t && t > 3 && (i = i.Substring(0, t - 3) + "...") } return i } } })) }(window, angular, jQuery), function (e, t) { var n = t.module("vi.common"), r = function (e, t) { this._http = e, this._coreConfig = t }; r.prototype = { defaultClasses: [], registerAll: function (e) { var t = this; t.defaultClasses.forEach((function (n, r) { t.registerClassForObject(e, n) })) }, registerClassForObject: function (e, t) { var n = t.split("."); return this.registerObject(e, n, t) }, registerClass: function (e) { return this.IEBrowserService || (this.IEBrowserService = {}), this.registerClassForObject(this.IEBrowserService, e) }, registerObject: function (e, t, n) { var r = this; if (t.length > 0) { var i = t[0]; if (t.splice(0, 1), void 0 === e[i]) if (0 == t.length) { var a = n.replace(/\./g, "/"); e[i] = function (e) { var t = i.startsWith("$") ? "GET" : "POST"; var n = function (e) { var t = "", n = !0; for (var r in e) t += (n ? "" : "&") + r + "=" + e[r], n = !1; return t }(e); return n.length > 0 && (n = "?" + n), a = "POST" === t ? a : a.replace(/\/\$get/gi, "") + n, r.http({ url: a, data: e, method: t }) } } else e[i] = {}; this.registerObject(e[i], t, n) } return this }, isIEBrowser: function (e) { return (e = e || navigator.userAgent).indexOf("MSIE ") > -1 || e.indexOf("Trident/") > -1 }, normalizeCmsURL: function (e) { return e && !1 === /^((http[s]?:\/\/)|(\/))/i.test(e) ? this._coreConfig.cmsEndPoint + e : e }, http: function (e) { var t = e; return t.url = this.normalizeCmsURL(t.url), this._http(t) }, IEBrowserService: null, getService: function () { var e = this; return e.isIEBrowser() ? (e.IEBrowserService || (e.IEBrowserService = {}, e.registerAll(e.IEBrowserService)), e.IEBrowserService) : new Proxy((function () { return { next: function (e) { "$GET" == e.toUpperCase() || "$POST" == e.toUpperCase() ? this.methodType = e.substring(1) : (void 0 === this.methodName && (this.methodName = ""), this.methodName.length > 0 && (this.methodName += "/"), this.methodName += "" + e) }, execute: function (t) { return e.execute(this.methodName, t, this.methodType) } } }), this.recursiveHandler) }, _generateParams: function (e, t, n) { if (params = {}, qsParams = "", t.length > 0 && "object" == typeof t[0]) { var r = t[0], i = !0; for (var a in r) a && void 0 !== r[a] && r[a] && (params[a] = r[a], i || (qsParams += "&"), qsParams += a + "=" + r[a], i = !1) } return "POST" == n ? { url: e, data: params } : { url: e + "?" + qsParams } }, execute: function (e, t, n) { var r = n || "POST", i = this._generateParams(e, t, r); return this.http({ url: i.url, data: i.data, method: r }) }, recursiveHandler: { get: function (e, t) { var n = e(); return n.next(t), new Proxy((function () { return n }), this) }, apply: function (e, t, n) { return e().execute(n) } } }, n.factory("viFrontendCoreService", ["$http", "frontendCoreConfig", function (e, t) { return new r(e, t) }]) }(window, window.angular), function (e, t) { "use strict"; function n(e, t, n) { var r = n.cmsEndPoint + "Home/GetToken"; return { tokenUrl: r, getToken: function () { return e({ method: "POST", url: r }) } } } t.module("vi.common").factory("viTokenService", n), n.$inject = ["$http", "$q", "frontendCoreConfig"] }(window, angular), function (e, t) { "use strict"; function n(e, t) { function n(t) { var n = { enable: !1, key: "", avatar: e.anonymousAvatar || "", name: "(Anonymous)" }; $.extend(n, t), this.enable = n.enable, this.key = n.key, this.avatar = n.avatar, this.name = n.name } n.prototype.getID = function () { if (this.enable && localStorage && this.key) { var e = localStorage.getItem(this.key); if (!e) { var t = Math.floor(1e7 * Math.random() + 1).toString(); localStorage.setItem(this.key, t), e = localStorage.getItem(this.key) } return e } return null }; var r = []; return { anonymous: function (e, t) { this.data(t).enable = e }, data: function (e) { var t = (e || "cms6_anonymous_id").toString(), i = r[t]; return i || (r[t] = new n({ key: t }), r[t]) } } } t.module("vi.fe.common").factory("anonymousUser", n), n.$inject = ["commonConfig", "$window"] }(window, angular), function (e, t) { "use strict"; t.module("vi.fe.common").factory("currentUser", ["commonConfig", "$window", function (n, r) { var i = { profile: function () { var e = { name: "", avatar: "", userID: 0, firstName: "", lastName: "", imageID: null, email: "", loggedIn: function () { return this.userID && this.userID > 0 } }; return t.extend(e, n.loginUser || {}), e }, login: function (t, i) { if (e.visionOptions.loggedIn) alert("Please log out your CMS user account first and try again."); else if (!t || r.confirm(i || "Please login to your account or create a new one to support public comments.")) { var a = n.loginPage + "?returnUrl=" + encodeURIComponent(r.location.href); r.location.href = a } }, popupLogin: function (i, a, o) { if (e.visionOptions.loggedIn) alert("It's not available for CMS User."); else if (!a || r.confirm(o || "Please login to your account or create a new one to support attachment.")) this.profile(), $.viClientDialog({ title: "Login", url: n.popupLoginPage, useFrame: !1, onClosed: function (e) { e && (t.extend(n.loginUser, e || {}), i && i()) } }).open() }, buildUserParams: function () { var e = this.profile(); return { userID: e.userID, email: e.email, imageID: e.imageID, firstName: e.firstName, lastName: e.lastName } } }; return i }]) }(window, angular), function (e, t) { t.module("vi.common").factory("viUtils", ["$http", function (e) { var n = { isEmail: function (e) { return /^.+@.+([\.][a-z]+)+$/i.test(e) }, viInitWatchList: function (e, n, r) { (r = r || "").length > 0 && (r += "."); var i = (n = n || e)._watchList || []; t.forEach(i, (function (t, n) { e.$watch(r + n, t) })) }, cascadeVal: function (e, n, r) { var i = n.split("."); if (!t.isDefined(r)) { var a = e; return t.forEach(i, (function (e, t) { a = a[e] })), a } var o = e; t.forEach(i, (function (e, t) { t < i.length - 1 ? o[e] = o[e] || {} : o[e] = r, o = o[e] })) }, standardizedArray: function (e) { return t.forEach(e, (function (e, t) { e.Value && e.Key && !e.ID && (e.ID = e.Value, e.Name = e.Key) })), e } }; return n }]) }(window, window.angular), function (e, t, n) { t.module("vi.frontend.list.module", ["vi.common"]) }(window, angular, jQuery), function (e, t, n) { t.module("vi.frontend.list.module").directive("viFrontendDetail", ["$templateCache", "$http", "$compile", function (e, t, n) { return { restrict: "EA", replace: !1, scope: { detail: "=", formatter: "=sysConfig" }, templateUrl: function (e, t) { return t.templateurl || visionOptions.virtualApplicationPath + "Scripts/angularjs-plugins/vi.frontend.list/directives/viFrontendDetail.html" }, link: function (e, t, n) { } } }]) }(window, angular, jQuery), function (e, t, n) { var r = t.module("vi.frontend.list.module"); r.directive("viFrontendList", [function () { return { restrict: "EA", replace: !0, scope: { listBuilder: "=builder", formatter: "=" }, templateUrl: function (e, t) { return t.templateurl || visionOptions.virtualApplicationPath + "Scripts/angularjs-plugins/vi.frontend.list/directives/viFrontendList.html" }, link: function (e) { } } }]), r.directive("viFrontendListEmpty", [function () { return { restrict: "EA", replace: !0, scope: { builder: "=" }, template: "<div class='content_area no-padding-left' ng-show='builder.records.length==0 && builder.dataBag.dataLoaded'>No results found.</div>", link: function (e, t) { } } }]) }(window, angular, jQuery), function (e, t, n) { t.module("vi.frontend.list.module").directive("viFrontendListFilters", [function () { return { restrict: "EA", replace: !0, scope: { builder: "=" }, link: function (e, t, n) { } } }]) }(window, angular, jQuery), function (e, t, n) { t.module("vi.frontend.list.module").directive("viFrontendListPagination", [function () { return { restrict: "EA", replace: !1, scope: { pageBuilder: "=" }, template: "<div class='list-pager' ng-if='pageBuilder.matchCount > 0'>   <a class=\"{{ pageBuilder.buildClass(null, 'first') }} pg-button pg-first-button\" ng-href=\"{{ pageBuilder.buildLink(null, 'first') }} \"> « First </a>   <a class=\"{{ pageBuilder.buildClass(null, 'prev') }} pg-button pg-prev-button\" ng-href=\"{{ pageBuilder.buildLink(null, 'prev') }} \" > « Prev </a>   <a ng-if='pageBuilder.hasLeft()' ng-href=\"{{ pageBuilder.buildLink(null, 'left')}}\">...</a> |   <span ng-repeat='index in pageBuilder.pages()'><a class='{{ pageBuilder.buildClass(index) }}' href='{{ pageBuilder.buildLink(index) }}'> {{ index  }} </a> | </span>     <a ng-if='pageBuilder.hasRight()' ng-href=\"{{ pageBuilder.buildLink(null, 'right')}}\">...</a>   <a class=\"{{ pageBuilder.buildClass(null, 'next') }} pg-button pg-next-button\" ng-href=\"{{ pageBuilder.buildLink(null, 'next') }}\"> Next » </a>   <a class=\"{{ pageBuilder.buildClass(null, 'next') }} pg-button pg-next-button\" ng-href=\"{{ pageBuilder.buildLink(null, 'last') }} \" > Last » </a>   <span class='pager-info'>       {{  pageBuilder.getFooterInfo() }}    </span></div>", link: function (e, t, n) { } } }]) }(window, angular, jQuery), function (e, t, n) { t.module("vi.frontend.list.module").directive("viFrontendListSearchBox", [function () { return { restrict: "EA", replace: !0, scope: { builder: "=" }, template: "<div class=\"clearfix common-search-box\" ng-if='builder.searchable() || builder.allSelects.length > 0' ><div class='frontend-search-area' ng-if='builder.searchable()'><input class='search_option searchinput' type='text' title='Search {{ builder.componentInfo.pluralText }}' placeholder='Search {{ builder.componentInfo.pluralText }}' ng-model='builder.gridListInput.searchText' ng-keydown='builder.keyDown($event)'><a class='searchicon' href='{{ builder.buidSearchLink() }}' >search</a><a class='settingicon' href='javascript:void(0);' title='" + Vision.Resources.FrontEnd_ContentFilterWidget_Settingicon_Title + "' >settings</a><div class='common-search-settings-pane' ><ol class='formlist'><li><label for='input-flexible-search-separators'>" + Vision.Resources.FrontEnd_ContentFilterWidget_SearchSeparators_Label + "</label><input id='input-flexible-search-separators' class='wordseperatorinput search_option' type='text' ng-model='builder.gridListInput.searchSeparator' ng-keydown='builder.keyDown($event)' ></li><li><label >" + Vision.Resources.FrontEnd_ContentFilterWidget_SearchFieldName_Label + "</label><select class='searchFieldSelect search_option' ng-options='seachCol as seachCol.title for seachCol in builder.searchableHeaders() track by seachCol.uniqueName' ng-model='builder.bindSearchField'></select></li></ol></div></div><div class='flex-list-filters' ng-class='builder.searchable() ? \"\" : \"no-search-box\"' ng-if='builder.allSelects.length > 0' ><div class='list-filter'><select onchange='return RedirectAfterDropDownListSelectedChanged(this);' ng-repeat='currSelect in builder.allSelects' title='{{currSelect.label}}'><option value='' data-url='{{currSelect.selectAllLink}}'>(All {{currSelect.label}})</option><option ng-if='currSelect.isDropdownList' ng-repeat='currValue in currSelect.source' value='{{currValue.value}}' data-url='{{currValue.url}}' ng-selected='currValue.selected'  >{{currValue.text}}</option><option ng-if='!currSelect.isDropdownList'  ng-repeat='currValue in currSelect.source' value='{{currValue.value}}' data-url='{{currValue.url}}' ng-selected='currValue.selected'  vi-frontend-lookup lookup-format='currSelect.settingObj.displayFormat' lookup-record='currValue'></option></select></div></div></div>", link: function (e, t) { } } }]) }(window, angular, jQuery), function (e, t) { "use strict"; t.module("vi.frontend.list.module").directive("viFrontendLookup", ["$compile", function (e) { return { restrict: "EA", replace: !0, scope: { format: "=lookupFormat", m: "=lookupRecord" }, link: function (t, n, r) { t.$watch((function () { return t.format }), (function () { n.html(t.format), e(n.contents())(t) })) } } }]) }(window, window.angular), function (e, t) { "use strict"; function n(n, r, i, a, o) { return { builder: function (n) { var r = { init: function () { var e = n.listViewInfo, t = this; if (e) { if (e.currentInfo) { if (e.currentInfo.sortName) { var r = e.currentInfo.sortDirection && "asc" === e.currentInfo.sortDirection ? 0 : 1; t.gridListInput.sortOptions = [{ direction: r, field: e.currentInfo.sortName }] } e.currentInfo.searchText && (t.gridListInput.searchText = e.currentInfo.searchText), e.currentInfo.searchSeparator && (t.gridListInput.searchSeparator = e.currentInfo.searchSeparator), e.currentInfo.searchField && (t.bindSearchField = { uniqueName: e.currentInfo.searchField }, t.gridListInput.searchFields = [e.currentInfo.searchField]), t.gridListInput.pageSize = e.currentInfo.pageSize, e.currentInfo.curPageStr && (t.gridListInput.pageNumber = e.currentInfo.curPageStr), t.gridListInput.totalNumberToDisplay = e.currentInfo.totalNumberToDisplay } t.sortInfo = e.sortInfo, t.searchInfo = e.searchInfo, t.pageInfo = e.pageInfo, t.filterInfo = e.filterInfo } !t.fieldTypeManager && (this.fieldTypeManager = n.fieldTypeManager), t._dropdownFiedType = Enumerable.From(this.fieldTypeManager.fieldTypeDataList).Where("$.name=='SingleDropdown'").FirstOrDefault(), t._lookupFiedType = Enumerable.From(this.fieldTypeManager.fieldTypeDataList).Where("$.name=='Lookup'").FirstOrDefault(), n.listUniqueName && n.componentGuid && n.getFilters({ ComponentGuid: n.componentGuid, ListUniqueName: n.listUniqueName, TypeIDs: [t._dropdownFiedType.id, t._lookupFiedType.id], LookupFieldTypeID: t._lookupFiedType.id, SelectedValueProperty: "selectedSourceValue" }).then((function (n) { var r = n.data; t.gridListInput.defaultSortOption.field = r.sortFeField, t.gridListInput.defaultSortOption.direction = r.sortFeBy, !t.allFilters && (t.allFilters = r.filters), !t.allLookupSource && (t.allLookupSource = r.allSouces), r.filters.length > 0 ? t.getAllSelects(e.filterInfo) : t.loadListInfo() })).catch((function (e) { })) }, dataPromise: n.dataPromise, gridListInput: { pageSize: 10, pageNumber: 1, sortOptions: [], searchText: "", searchFields: [], searchOperator: "OR", totalNumberToDisplay: null, searchSeparator: ",", Data: { componentGuid: n.componentGuid, listUniqueName: n.listUniqueName }, filterOptions: [], defaultSortOption: { field: null, direction: "DESC" } }, componentInfo: null, loadListInfo: function () { var e = this; e.gridListInput.Data && "" == e.gridListInput.Data.componentGuid || "" == e.gridListInput.Data.listUniqueName || e.dataPromise(e.gridListInput).then((function (t) { var r = t.data; e.headers = r.headers, e.records = r.records.items, e.componentInfo = r.componentInfo; var i = { matchCount: r.records.matchCount, pageSize: e.gridListInput.pageSize, pageNumber: e.gridListInput.pageNumber, pageLink: e.pageInfo.fullLinkPaging, pageIndex: e.pageInfo.currentPageNeedChanged }; e.buildPagination = s(i), e.gridListInput = r.gridListOutput, e.sortOption = Enumerable.From(e.gridListInput.sortOptions).FirstOrDefault(), n.setupData && n.setupData(r), e.dataBag.dataLoaded = !0 })).then((function () { n.setLookupDataForList(e.records, e.headers, e.allLookupSource) })).catch((function (e) { })) }, dataBag: {}, headers: null, allFilters: null, records: [], sortOption: null, buildHeaderClass: function (e) { var t, n, r = this; return r.sortOption && (t = e, n = r.sortOption.field, t.uniqueName === n) ? 0 === r.sortOption.direction ? "sort_asc" : "sort_desc" : "" }, _cachedSearchable: null, searchable: function () { return !this._cachedSearchable && this.headers && (this._cachedSearchable = Enumerable.From(this.headers).Where("c => c.allowSearch").Any()), this._cachedSearchable }, _cachedSeachableHeaders: null, searchableHeaders: function () { if (!this._cachedSeachableHeaders) { var e = Enumerable.From(this.headers).Where("c => c.allowSearch").Select("c => { title : (c.title == '' ? c.label : c.title), uniqueName : c.uniqueName}").ToArray(); e.splice(0, 0, { title: "(All)", uniqueName: "" }), this._cachedSeachableHeaders = e } return this._cachedSeachableHeaders }, sortInfo: { fullLinkSorting: "", sortNameValueNeedChanged: "", sortDirectionValueNeedChanged: "" }, searchInfo: { fullLinkSearching: "", searchTextNeedChanged: "", searchFieldNeedChanged: "", searchSepeNeedChanged: "" }, pageInfo: { fullLinkPaging: "", currentPageNeedChanged: "" }, buidSearchLink: function () { var e = this, t = encodeURI(e.gridListInput.searchText).replace(/#/g, "%23").replace(/&/g, "%26").replace(/'/g, "%27").replace(/\?/g, "%3F"); return e.searchInfo.fullLinkSearching.replace(e.searchInfo.searchTextNeedChanged, t).replace(e.searchInfo.searchFieldNeedChanged, e.bindSearchField.uniqueName).replace(e.searchInfo.searchSepeNeedChanged, e.gridListInput.searchSeparator) }, bindSearchField: { uniqueName: "" }, keyDown: function (n) { if (13 === (n.which || n.keyCode)) { var r = t.element(n.target).closest(".common-search-box").find(".searchicon")[0].attributes.href.value; e.visionOptions && e.visionOptions.loggedIn ? e.parent.location.href = r : e.location.href = r } }, buildTitleLink: function (e) { var t, n, r = this; if (e.sortable) { var i = ""; 0 == r.gridListInput.sortOptions.length ? i = "asc" : (t = e, n = r.gridListInput.sortOptions[0].field, t.uniqueName === n ? 0 === r.gridListInput.sortOptions[0].direction ? i = "desc" : 1 === r.gridListInput.sortOptions[0].direction && (i = "") : i = "asc"); var a = "" == i ? "" : function (e) { return e.uniqueName }(e); return r.sortInfo.fullLinkSorting.replace(r.sortInfo.sortNameValueNeedChanged, a).replace(r.sortInfo.sortDirectionValueNeedChanged, i) } return "" }, buildPagination: null, fieldTypeManager: null, getTemplateUrl: function (e, t, n) { var r = this.fieldTypeManager.getFieldType(t.fieldTypeID); return r ? r.getFrontendListDisplaySrc() : "" }, getCssClass: function (e) { return Enumerable.From(this.fieldTypeManager.fieldTypeDataList).Where("$.id==" + e.fieldTypeID).FirstOrDefault().css }, setTdsLoaded: function (e) { e && (this.dataBag.tdsLoaded = !0) }, _dropdownFiedType: null, _lookupFiedType: null, allSelects: null, allLookupSource: null, getAllSelects: function (e) { var r = this, i = n.listViewInfo.filterInfo.flexSettingPrefix; r.allSelects || (r.allSelects = Enumerable.From(r.allFilters).Where("$.fieldTypeID==" + r._dropdownFiedType.id + " || $.fieldTypeID==" + r._lookupFiedType.id).Where((function (e) { var t = r.filterInfo[i + e.uniqueName]; return !!t && t.isShowed })).ToArray(), r.allSelects.forEach((function (n, s) { n.settingObj = n.setting && t.fromJson(n.setting); var l = r.filterInfo[i + n.uniqueName], c = e[i + n.uniqueName], u = r._dropdownFiedType.id == n.fieldTypeID; function d(e, t) { return o(e)({ m: t }) } if (n.isDropdownList = u, u) n.source = 0 == n.settingObj.sourceTypeID ? n.settingObj.customSource : 1 == n.settingObj.sourceTypeID ? Enumerable.From(a.states).Where("$.Country=='US'").Select("c => {value : c.Abbreviation, text : c.Name }").ToArray() : Enumerable.From(a.states).Where("$.Country=='CA'").Select("c => {value : c.Abbreviation, text : c.Name}").ToArray(); else { var f = Enumerable.From(r.allLookupSource).Where("$.data==" + n.settingObj.selectedSourceValue).FirstOrDefault(); if (null != f) { var p = f.items, h = n.settingObj.sortBy || "", m = n.settingObj.displayFormat; if ("0" == h) p.sort((function (e, t) { return e.CreatedDate = e.CreatedDate.replace("T", " "), t.CreatedDate = t.CreatedDate.replace("T", " "), new Date(t.CreatedDate).valueOf() - new Date(e.CreatedDate).valueOf() })); else if ("1" == h) p.sort((function (e, t) { return t.CreatedDate = t.CreatedDate.replace("T", " "), e.CreatedDate = e.CreatedDate.replace("T", " "), new Date(e.CreatedDate).valueOf() - new Date(t.CreatedDate).valueOf() })); else { var g = new RegExp("{{([a-zA-Z0-9.]*?)}}", "g"); if (g.test(m)) { for (var v = Enumerable.From(p), y = m.match(g), b = 0; b < y.length; b++) { var w = y[b].replace("{{", "").replace("m.", "").replace("}}", ""); v = 0 == b ? v.OrderBy("$." + w) : v.ThenBy("$." + w) } p = v.ToArray() } } var S = []; if (p) for (b = 0; b < p.length; b++) { var C = p[b]; S.push($.extend(C, { text: d(m, C) })) } f.items = S } n.source = f ? Enumerable.From(f.items).ToArray() : [] } if (n.source.forEach((function (e, t) { var n = u ? t : e.ID; e.url = l.fullLinkFiltering.replace(l.currentFilterNeedChanged, n), e.selected = c && c.currentFilterValue == n, u || (e.value = e.ID) })), n.selectAllLink = l.selectAllLinkFiltering, c && c.currentFilterValue) { var x = parseInt(c.currentFilterValue); r.gridListInput.filterOptions.push({ field: n.uniqueName, value: u ? n.source[x].value : x }) } })), r.loadListInfo()) } }; n.dataPromise && r.init(); return r }, detail: function (e) { var t = { detailInput: { id: e.id, componentGuid: e.componentGuid, listUniqueName: e.listUniqueName }, dataPromise: e.dataPromise, fields: [], record: null, fieldTypeManager: null, loadDetail: function () { var e = this; "" != e.detailInput.componentGuid && "" != e.detailInput.listUniqueName && this.dataPromise(e.detailInput).then((function (t) { var n = t.data, r = Enumerable.From(e.fieldTypeManager.fieldTypeDataList).Where("$.name=='RichHtml'").FirstOrDefault().id, i = Enumerable.From(n.Fields).Select("{meta: $.meta, data: $.data, viOrder: $.meta.fieldTypeID==" + r + "?1:0}").ToArray(); e.fields = Enumerable.From(i).OrderBy("$.viOrder").ThenBy("$.meta.order").ToArray(), e.record = n.Record, e.richtextFormatMaskText() })).catch((function (e) { })) }, richtextFormatMaskText: function () { var e = this; e.fields && e.fields.forEach((function (t) { t.meta && 8 == t.meta.fieldTypeID && (e.record[t.meta.uniqueName] = i("maskText")(e.record[t.meta.uniqueName], !1, !0)) })) }, getCssClass: function (e) { return Enumerable.From(this.fieldTypeManager.fieldTypeDataList).Where("$.id==" + e.meta.fieldTypeID).FirstOrDefault().css }, getTemplateUrl: function (e) { var t = this.fieldTypeManager.getFieldType(e.meta.fieldTypeID); return t ? t.getFrontendDisplaySrc() : "" } }; e && e.dataPromise && t.loadDetail(); return t }, buildPagination: s }; function s(e) { return { matchCount: e.matchCount || 0, pageSize: e.pageSize || 10, pageNumber: e.pageNumber || 1, pageLink: e.pageLink || "", pageIndex: e.pageIndex || 1, displayPageCount: 5, getFooterInfo: function () { if (0 == this.matchCount) return ""; var e = (this.pageNumber - 1) * this.pageSize + 1, t = e + this.pageSize - 1; return t > this.matchCount && (t = this.matchCount), e + " - " + t + " of " + this.matchCount + " items" }, fromPage: null, toPage: null, pageCount: null, allPages: [], pages: function () { if (this.allPages.length > 0) return this.allPages; this.pageCount = Math.ceil(this.matchCount / this.pageSize); var e = this.pageNumber % this.displayPageCount == 0; this.fromPage = e && this.pageNumber > 0 ? (Math.floor(this.pageNumber / this.displayPageCount) - 1) * this.displayPageCount + 1 : Math.floor(this.pageNumber / this.displayPageCount) * this.displayPageCount + 1, this.toPage = e && this.pageNumber > 0 ? Math.floor(this.pageNumber / this.displayPageCount) * this.displayPageCount : Math.floor(this.pageNumber / this.displayPageCount) * this.displayPageCount + this.displayPageCount, this.toPage > this.pageCount && (this.toPage = this.pageCount); for (var t = [], n = this.fromPage; n <= this.toPage; n++)t.push(n); return this.allPages = t, this.allPages }, hasRight: function () { return this.toPage < this.pageCount }, hasLeft: function () { return this.fromPage > 1 }, buildLink: function (e, t) { var n = Math.ceil(this.matchCount / this.pageSize); if (e) { if (e === this.pageNumber) return "" } else if ("prev" == t) { if (1 == this.pageNumber) return ""; e = this.pageNumber - 1 } else if ("next" == t) { if (this.pageNumber == n) return ""; e = this.pageNumber + 1 } else if ("first" == t) { if (1 == this.pageNumber) return ""; e = 1 } else if ("last" == t) { if (this.pageNumber == n) return ""; e = n } else "left" == t ? e = this.fromPage - 1 : "right" == t && (e = this.toPage + 1); return this.pageLink.replace(this.pageIndex, e) }, buildClass: function (e, t) { var n = Math.ceil(this.matchCount / this.pageSize); if (e) { if (e === this.pageNumber) return "pg-selected" } else { if ("prev" == t) return 1 == this.pageNumber ? "disabled" : "pg-normal"; if ("next" == t) return this.pageNumber == n ? "disabled" : "pg-normal"; if ("first" == t) return 1 == this.pageNumber ? "disabled" : "pg-normal"; if ("last" == t) return this.pageNumber == n ? "disabled" : "pg-normal" } return "" } } } } t.module("vi.frontend.list.module").factory("viFrontendListService", n), n.$inject = ["$http", "builderConfig", "$filter", "jsonDataUtil", "$interpolate"] }(window, angular), function (e, t, n) { e.viPredefinedModules && e.viPredefinedModules.push("vi.fe.vision.search2"), t.module("vi.fe.vision.search2", ["vi.fe.common", "ngSanitize", "blockUI", "angucomplete-alt"]).config(["blockUIConfig", function (e) { e.requestFilter = function (e) { return !/^.*?\/_search($|\/)/.test(e.url) } }]) }(window, angular, jQuery), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").controller("visionSearch2Controller", ["$scope", "visionService2Service", "visionService2Model", function (e, n, r) { e.init = function (e) { t.forEach(e.setting.Departments, (function (e) { e.Name = decodeURIComponent(e.Name) })), n.init(e) }, e.model = r, e.service = n, e.handleDepartmentAllSelect = function (n) { var r = $(n.target).prop("checked"); t.forEach(e.model.setting.Departments, (function (e) { e.selected = r })), e.model.advanced.selectedAllDepartments = r }, e.handleDepartmentItemSelect = function (t) { $(t.target); var n = e.model.setting.Departments.length, r = $.grep(e.model.setting.Departments, (function (e) { return e.selected })).length; e.model.advanced.selectedAllDepartments = r > 0 && r == n }, e.handleContentTypeAllSelect = function (n) { var r = $(n.target).prop("checked"); t.forEach(e.model.setting.ContentTypes, (function (e) { e.selected = r })), e.model.advanced.selectedAllContentTypes = r }, e.handleContentTypeItemSelect = function (t) { $(t.target); var n = e.model.setting.ContentTypes.length, r = $.grep(e.model.setting.ContentTypes, (function (e) { return e.selected })).length; e.model.advanced.selectedAllContentTypes = r > 0 && r == n } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").controller("visionSearch2HomeController", ["$scope", "visionService2HomeService", "visionService2HomeModel", function (e, t, n) { e.init = function (e) { t.init(e) }, e.model = n, e.service = t }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2Item", ["$compile", "visionService2Model", "viUIDateTimeConverter", function (e, t, n) { return { restrict: "EA", replace: !0, scope: { item: "=" }, link: function (r, i, a) { r.model = t, r.dateTimeToString = function (e, t) { return n.dateTimeToString(null, n.stringToDateTime(null, e), " ", t) }, i.html("<div vision-search2-item-" + r.item._source.CTNAME.toLowerCase() + ' class="vision-search2-item"></div>'), e(i.contents())(r) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemBlog", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Blog Posts", e.item._source.PostDate && (e.item.preline = "Published " + e.dateTimeToString(e.item._source.PostDate)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemBusinessdirectory", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Businesses", e.item.titleSub = e.item._source.FullAddress } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemDocument", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { if (e.item.contentTypeDisplayName = "Documents", e.item.href && e.item._source.URL_ && e.item.href.split("?")[0] && e.item._source.URL_.split("?")[1]) { var r = e.item.href.split("?")[0], i = e.item._source.URL_.split("?")[1].replace(/(^|&)(id|t)=/gi, "/"); e.item.href = r + i } var a = (e.item._source.Extension || "").replace(".", ""); "txt" != a && "rtf" != a && "doc" != a && "docx" != a && "xls" != a && "xlsx" != a && "pdf" != a && "csv" != a && "zip" != a && "ppt" != a && "pptx" != a && (a = "documents"), e.item.imageSrc = e.model.setting.Cms6RootPath + "/DefaultContent/Default/_gfx/search2/" + a + ".svg" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemEvent", ["$compile", "visionSearch2Templates", "viUIDateTimeConverter", function (e, t, n) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, r) { e.item.contentTypeDisplayName = "Events", e.item.preline = e.item._source.DateText, e.item.imageSrc = ""; var i = n.stringToDate(null, e.item._source.StartDate), a = $.formatDate(i, "MMM"), o = $.formatDate(i, "dd"); e.item.customFrame = '<div class="vision-search2-item-Event-date"><div class="vision-search2-item-Event-month">' + a + '</div><div class="vision-search2-item-Event-day">' + o + "</div></div>" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemFacilitydirectory", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Facilities", e.item.titleSub = e.item._source.FullAddress } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemFaq", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "FAQs" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemForm", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Surveys"; var r = "", i = "", a = ""; e.item._source.OpenDate && (a = r = "Start " + e.dateTimeToString(e.item._source.OpenDate)), e.item._source.CloseDate && (i = "Close " + e.dateTimeToString(e.item._source.CloseDate), a = r ? r + " - " + i : i), e.item.preline = a } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemFormbuilder", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Forms"; var r = "", i = "", a = ""; e.item._source.StartDate && (a = r = "Start " + e.dateTimeToString(e.item._source.StartDate)), e.item._source.CloseDate && (i = "End " + e.dateTimeToString(e.item._source.CloseDate), a = r ? r + " - " + i : i), e.item.preline = a } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemJob", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Job Posts", e.item._source.ExpireDate && (e.item.preline = "Ending " + e.dateTimeToString(e.item._source.ExpireDate)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemMeetingagenda", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Meeting Agendas", e.item._source.MeetingDate && (e.item.preline = e.dateTimeToString(e.item._source.MeetingDate)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemMeetingitem", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Meeting Items" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemMeetingminutes", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Meeting Minutes", e.item._source.MeetingDate && (e.item.preline = e.dateTimeToString(e.item._source.MeetingDate)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemNews", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "News", e.item._source.PublishDate && (e.item.preline = e.dateTimeToString(e.item._source.PublishDate, !0)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemOnlinepolls", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Polls" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemPage", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Pages", e.item.titleSub = e.item.href } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemPhotoalbum", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Albums" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemRfp", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "RFP Posts"; var r = "", i = "", a = "", o = "", s = "RFP No. " + e.item._source.Number; e.item._source.StartDate && (o = r = "Start " + e.dateTimeToString(e.item._source.StartDate)), e.item._source.ClosingDate && (i = "End " + e.dateTimeToString(e.item._source.ClosingDate), o = r ? r + " - " + i : i), a = s, o && (a = s + " | " + o), e.item.preline = a } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemServicedirectory", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Services" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemStaffdirectory", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Staffs", e.item.preline = e.item._source.StaffTitle } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").directive("visionSearch2ItemTopic", ["$compile", "visionSearch2Templates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Topics"; var r = "", i = "", a = ""; e.item._source.OpenDate && (a = r = "Open " + e.dateTimeToString(e.item._source.OpenDate)), e.item._source.CloseDate && (i = "Closed " + e.dateTimeToString(e.item._source.CloseDate), a = r ? r + " - " + i : i), e.item.preline = a } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").service("visionService2HomeModel", [function () { return { text: "", displayImage: !0, page: { size: 10, number: 1, total: 0 }, sort: "", setting: {}, itemsLoaded: !1, items: [], suggestion: {}, advanced: { extractWordOrPhrase: null, withAllOfTheWords: null, withoutTheWords: null } } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").service("visionService2HomeService", ["$http", "$q", "visionService2HomeModel", "visionService2Service", "$timeout", function (n, r, i, a, o) { var s = i; return { init: function (e) { var t = this; t._resolveQuery(e.query); var n = t._decodeStatus(); s.setting = e.setting, s.page.size = s.setting.AutocompleteResultsMaximum, n && t._applySettingStatus(), (n || s.text) && o((function () { t.initSearching = !0, t._searchForHomeWidget() })) }, search: function () { s.text && this._searchForHomeWidget() }, topSearchClick: function (e) { s.text = e, s.text && this._searchForHomeWidget() }, autoCompleteSelected: function (e) { var t = this.$parent.service; void 0 !== e && (s.text = e.title, t.search()) }, changeModelText: function (e) { s.text = e }, keydownsuggest: function (e) { if (13 == e.keyCode && e.target) return s.text = e.target.value, void this.search() }, suggestion: function (e) { if (s.text = e, s.text && s.text.length > 2 && s.setting.DisplayAutocomplete && !s.setting.CMSUserLoginned) { s.page.number = 1; var t = this.$parent.service, r = t._buildSearchUrl(), i = t._buildSearchParams(!0); return n({ url: r, data: i, method: "POST", headers: { Authorization: "Bearer " + s.setting.Token } }) } }, _searchForHomeWidget: function () { s.setting.CMSUserLoginned || (this._encodeStatus(), this.initSearching = !1) }, _encodeStatus: function () { try { if (!this.initSearching) { var n = t.extend({}, s, { setting: {}, items: [] }), r = this._makeStatusKey(), i = { key: r, value: n }, a = encodeURIComponent(JSON.stringify(i)); localStorage.VisionSearch2Status = a, s.setting.SearchResultRedirectPage && "" != s.setting.SearchResultRedirectPage ? e.location = s.setting.SearchResultRedirectPage + "#" + r : (e.location.hash = r, e.location.reload()) } } catch (t) { e.location.hash = "" } }, _decodeStatus: function () { if (e.location.hash) try { var n = e.location.hash.replace(/^#!/, "").replace(/^#/, ""), r = localStorage.VisionSearch2Status, i = decodeURIComponent(r), a = JSON.parse(i); return a.key == n && (s = t.extend(s, a.value), !0) } catch (e) { return !1 } }, _makeStatusKey: function () { return a._makeStatusKey() }, _applySettingStatus: function () { try { t.forEach(s.setting.Departments, (function (e) { e.selected = $.inArray(e.ID, s.advanced.departments) > -1 })), t.forEach(s.setting.ContentTypes, (function (e) { e.selected = $.inArray(e.ID, s.advanced.contentTypes) > -1 })) } catch (e) { } }, _resolveQuery: function (e) { e && (s.text = e.q || "") }, _buildSearchUrl: function () { var e = s.setting.SearchIndices.join(","); return s.setting.SearchServiceUrl + "/api/search/" + e + "/_search" }, _buildSearchParams: function (e) { var n = ["Title^5.0", "Content^1.0", "KeyWords^1.0"]; e && (["Title"], n = ["Title"]); var r = { from: (s.page.number - 1) * s.page.size, size: s.page.size, sort: "MostRecent" == s.sort ? [{ LastModifiedDate: { order: "desc" } }] : ["_score"], _source: { exclude: ["Content"] }, highlight: { fields: { Title: {}, Content: {} }, fragment_size: 300, no_match_size: 300, encoder: "html", pre_tags: "<b>", post_tags: "</b>", number_of_fragments: 1, order: "score" } }, i = { bool: { must: [], must_not: [], filter: { bool: { must: [], must_not: [], should: [] } } } }; s.text && i.bool.must.push({ multi_match: { query: s.text, analyzer: "synonym", fields: n, type: "phrase_prefix" } }), s.setting.Departments.length && s.setting.DepartmentRestricted && i.bool.filter.bool.must.push({ terms: { Departments: $.map(s.setting.Departments, (function (e) { return e.ID })) } }), s.setting.ContentTypes.length && i.bool.filter.bool.must.push({ terms: { CTID: $.map(s.setting.ContentTypes, (function (e) { return e.ID })) } }), s.setting.MemberGroups.length ? (i.bool.filter.bool.should.push({ terms: { MemberGroups: $.map(s.setting.MemberGroups, (function (e) { return e.ID })) } }), i.bool.filter.bool.should.push({ bool: { must_not: [{ exists: { field: "MemberGroups" } }] } })) : i.bool.filter.bool.must_not.push({ exists: { field: "MemberGroups" } }); var a = { bool: { must: [] } }, o = {}; if (s.setting.ShowAdvancedSearchLink && s.setting.DisplayDepartmentFilter) { var l = $.map($.grep(s.setting.Departments, (function (e, t) { return e.selected })), (function (e) { return e.ID })); l.length && a.bool.must.push({ terms: { Departments: l } }), o.dpt_number_of_items = { terms: { field: "Departments", order: { _count: "desc" } } } } if (s.setting.ShowAdvancedSearchLink && s.setting.DisplayContentType2Filter) { var c = $.map($.grep(s.setting.ContentTypes, (function (e, t) { return e.selected })), (function (e) { return e.ID })); c.length && a.bool.must.push({ terms: { CTID: c } }), o.ct_number_of_items = { terms: { field: "CTID", order: { _count: "desc" } } } } return t.extend(r, { query: i, post_filter: a, aggs: o }) } } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").service("visionService2Model", [function () { return { text: "", displayImage: !0, page: { size: 10, number: 1, total: 0 }, sort: "", setting: {}, itemsLoaded: !1, items: [], suggestion: {}, advanced: { extractWordOrPhrase: null, withAllOfTheWords: null, withoutTheWords: null } } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").service("visionService2Service", ["$http", "$q", "visionService2Model", "$timeout", function (n, r, i, a) { var o = i; return { init: function (e) { var t = this; t.pagerAPI = {}, t._resolveQuery(e.query); var n = t._decodeStatus(); o.setting = e.setting, n && t._applySettingStatus(), (n || o.text) && a((function () { t.initSearching = !0, t._search() })), o.setting.DefaultSort && (o.sort = o.setting.DefaultSort) }, initPagerAPI: function (e) { this.pagerAPI = e || {} }, changePage: function (e) { o.page.number = e, this._search() }, changeSort: function () { this.pagerAPI.toFirst && this.pagerAPI.toFirst() }, search: function () { (o.text || o.advanced.exactWordOrPhrase || o.advanced.withAllOfTheWords || o.advanced.withoutTheWords) && (this.pagerAPI.toFirst ? this.pagerAPI.toFirst() : (o.page.number = 1, this._search())) }, autoCompleteSelected: function (e) { var t = this.$parent.service; void 0 !== e && (o.text = e.title, t.search()) }, changeModelText: function (e) { o.text = e }, keydownsuggest: function (e) { if (13 == e.keyCode && e.target) return o.text = e.target.value, void this.search() }, suggestion: function (e) { if (o.text = e, o.text && o.text.length > 2 && o.setting.DisplayAutocomplete && !o.setting.CMSUserLoginned && 0 != o.setting.SearchIndices.length) { var t = this.$parent.service, i = t._buildSearchUrl(), a = t._buildSearchParams(!0); return n({ url: i, data: a, method: "POST", headers: { Authorization: "Bearer " + o.setting.Token } }) } return r.resolve({ data: { hits: { hits: [] } } }) }, clearAllAdvanceFilter: function () { o.advanced.selectedAllContentTypes = !1, o.advanced.selectedAllDepartments = !1, o.advanced.exactWordOrPhrase = null, o.advanced.withAllOfTheWords = null, o.advanced.withoutTheWords = null, t.forEach(o.setting.Departments, (function (e) { e.selected = !1 })), t.forEach(o.setting.ContentTypes, (function (e) { e.selected = !1 })) }, viewMore: function (e) { var t = e.target, n = $(t).closest(".box"), r = n.find(".icon"), i = n.find(".view-more"), a = n.find(".box-items > ul"); a.find("li.hidden").length ? (a.find("li.hidden").removeClass("hidden"), r.removeClass("arrow-down-icon").addClass("arrow-up-icon"), i.html(i.html().replace("more", "less"))) : (a.find("li.more").addClass("hidden"), r.removeClass("arrow-up-icon").addClass("arrow-down-icon"), i.html(i.html().replace("less", "more"))) }, getNumberOfPage: function () { return (o.page.number - 1) * o.page.size + 1 + " - " + ((o.page.number - 1) * o.page.size + o.items.length) }, _search: function () { if (!o.setting.CMSUserLoginned && 0 != o.setting.SearchIndices.length) { var r = this, i = this._buildSearchUrl(), a = this._buildSearchParams(); o.itemsLoaded = !1, n({ url: i, data: a, method: "POST", headers: { Authorization: "Bearer " + o.setting.Token } }).then((function (n) { r._getThumbnailInfos(n).then((function (i) { if (n.data && n.data.hits) { o.page.total = n.data.hits.total, o.items.splice(0, o.items.length); var a = r._toItems(n.data.hits.hits, i); if (t.forEach(a, (function (e, t) { o.items.push(e) })), n.data.aggregations && n.data.aggregations.ct_number_of_items) { var s = n.data.aggregations.ct_number_of_items.buckets || []; t.forEach(o.setting.ContentTypes, (function (e) { e.ctItemsCount = r._getItemsCountByBucket(s, e.ID) })) } if (n.data.aggregations && n.data.aggregations.dpt_number_of_items) { var l = n.data.aggregations.dpt_number_of_items.buckets || []; t.forEach(o.setting.Departments, (function (e) { e.dptItemsCount = r._getItemsCountByBucket(l, e.ID) })) } r._encodeStatus(), r.initSearching = !1 } else o.page.total = 0, o.items.splice(0, o.items.length); o.itemsLoaded = !0, $(e).scrollTop(0) })).catch((function (e) { console.log("search response failed to resolve:", e) })) })).catch((function (e) { })) } }, _getThumbnailInfos: function (e) { if (e.data && e.data.hits && e.data.hits.hits) { var t = $.map($.grep(e.data.hits.hits, (function (e, t) { return e._source.ThumbnailImageID })), (function (e) { return e._source.ThumbnailImageID })); if (t && 0 != t.length) return n({ url: o.setting.ThumbnailInfoUrl, data: { imageIDs: t }, method: "POST" }).then((function (e) { return e && e.data ? e.data : [] })) } return r.resolve([]) }, _getThumbnailAlt: function (e, t) { for (var n = 0; n < t.length; n++)if (t[n].id == e) return t[n].alt; return "" }, _getItemsCountByBucket: function (e, t) { for (var n = 0, r = 0; r < e.length; r++)if (e[r].key == t) { n = e[r].doc_count; break } return n }, _toItems: function (e, n) { var r = this; return e && 0 != e.length && t.forEach(e, (function (e, t) { if (e._source.ThumbnailImageID && (e.imageSrc = $.generateShowImageLink(e._source.ThumbnailImageID), e.imageAlt = r._getThumbnailAlt(e._source.ThumbnailImageID, n)), e.href = r._getContentTypeDetailUrl(e._source.CTNAME, e._source.NavID || e._source.GuidForUrl || e._source.ID), e.contentTypeDisplayName = r._getContentTypeDisplayName(e._source.CTNAME), e.highlight && e.highlight.Title && 0 != e.highlight.Title.length && (e._source.Title = e.highlight.Title[0]), e.highlight && e.highlight.Content && 0 != e.highlight.Content.length) e._source.Content = e.highlight.Content[0], e._source.Content && (e._source.Content = r._htmlDecode(e._source.Content)); else { e._source.Content && (e._source.Content = r._htmlDecode(e._source.Content)); var i = e._source.Content; i && i.length > 300 && (e._source.Content = i.substring(0, 300) + "...") } e.highlight && e.highlight.FullAddress && 0 != e.highlight.FullAddress.length && (e._source.FullAddress = e.highlight.FullAddress[0]), e.highlight && e.highlight.StaffTitle && 0 != e.highlight.StaffTitle.length && (e._source.StaffTitle = e.highlight.StaffTitle[0]), e.highlight && e.highlight.Number && 0 != e.highlight.Number.length && (e._source.Number = e.highlight.Number[0]), e.tid = e._id + Math.floor(1e5 * Math.random() + 1) })), e }, _htmlDecode: function (e) { var t = { lt: "<", gt: ">", nbsp: " ", amp: "&", quot: '"' }; return e.replace(/&(lt|gt|nbsp|amp|quot);/gi, (function (e, n) { return t[n] })) }, _encodeStatus: function () { try { if (!this.initSearching) { var n = t.extend({}, o, { setting: {}, items: [] }), r = this._makeStatusKey(), i = { key: r, value: n }, a = encodeURIComponent(JSON.stringify(i)); localStorage.VisionSearch2Status = a, e.location.hash = r } } catch (t) { e.location.hash = "" } }, _decodeStatus: function () { if (e.location.hash) try { var n = e.location.hash.replace(/^#!/, "").replace(/^#/, ""), r = localStorage.VisionSearch2Status, i = decodeURIComponent(r), a = JSON.parse(i); return a.key == n && (o = t.extend(o, a.value), !0) } catch (e) { return !1 } }, _makeStatusKey: function () { for (var e = "", t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", n = 0; n < 10; n++)e += t.charAt(Math.floor(Math.random() * t.length)); return e }, _applySettingStatus: function () { try { t.forEach(o.setting.Departments, (function (e) { e.selected = $.inArray(e.ID, o.advanced.departments) > -1 })), t.forEach(o.setting.ContentTypes, (function (e) { e.selected = $.inArray(e.ID, o.advanced.contentTypes) > -1 })) } catch (e) { } }, _resolveQuery: function (e) { e && (o.text = e.q || "") }, _buildSearchUrl: function () { var e = o.setting.SearchIndices.join(","); return o.setting.SearchServiceUrl + "/api/search/" + e + "/_search" }, _buildSearchParams: function (e) { var n = this, r = o.page.size, i = (o.page.number - 1) * o.page.size, a = ["Title", "Content", "FullAddress", "KeyWords", "MetaKeywords", "SubTitle", "StaffTitle", "Number", "Details"], s = ["Title^3.0", "Content^1.0", "FullAddress^1.0", "KeyWords^2.0", "MetaKeywords^15.0", "SubTitle^2.0", "StaffTitle^1.0", "Number^1.0", "Details^1.0"]; e && (a = ["Title"], s = ["Title"], r = o.setting.AutocompleteResultsMaximum, i = 0); var l = { from: i, size: r, sort: "MostRecent" == o.sort ? [{ LastModifiedDate: { order: "desc" } }] : ["_score"], _source: { excludes: ["Content"] }, highlight: { fields: { Title: {}, Content: {}, FullAddress: {}, StaffTitle: {}, Number: {} }, fragment_size: 300, no_match_size: 300, encoder: "html", pre_tags: "<b>", post_tags: "</b>", number_of_fragments: 1, order: "score" } }, c = { bool: { must: [], must_not: [], filter: { bool: { must: [], must_not: [], should: [] } } } }; if (e) o.text && c.bool.must.push({ multi_match: { query: o.text, analyzer: "synonym", fields: s, type: "phrase_prefix" } }); else if (o.text) { var u = n._handleSearchStringSpecialChar(o.text); c.bool.must.push({ multi_match: { query: u, analyzer: "synonym", fields: s, type: "cross_fields" } }) } if (o.advanced.withAllOfTheWords) { u = n._handleSearchStringSpecialChar(o.advanced.withAllOfTheWords); c.bool.must.push({ multi_match: { query: u, type: "cross_fields", analyzer: "synonym", fields: s, operator: "and" } }) } if (o.advanced.exactWordOrPhrase) { u = n._handleSearchStringSpecialChar(o.advanced.exactWordOrPhrase); c.bool.must.push({ multi_match: { query: u, fields: s, analyzer: "synonym", type: "phrase" } }) } if (o.advanced.withoutTheWords && c.bool.must_not.push({ multi_match: { query: o.advanced.withoutTheWords, fields: a, analyzer: "synonym" } }), o.setting.Departments.length && o.setting.DepartmentRestricted && c.bool.filter.bool.must.push({ terms: { Departments: $.map(o.setting.Departments, (function (e) { return e.ID })) } }), o.setting.ContentTypes.length && c.bool.filter.bool.must.push({ terms: { CTID: $.map(o.setting.ContentTypes, (function (e) { return e.ID })) } }), o.setting.Websites.length) { var d = $.map(o.setting.Websites, (function (e) { return e.ID })); d.push(-1), c.bool.filter.bool.must.push({ terms: { SID: d } }) } o.setting.MemberGroups.length ? (c.bool.filter.bool.should.push({ terms: { MemberGroups: $.map(o.setting.MemberGroups, (function (e) { return e.ID })) } }), c.bool.filter.bool.should.push({ bool: { must_not: [{ exists: { field: "MemberGroups" } }] } })) : c.bool.filter.bool.must_not.push({ exists: { field: "MemberGroups" } }); var f = { bool: { must: [] } }, p = {}; if (o.setting.ShowAdvancedSearchLink && o.setting.DisplayDepartmentFilter && o.setting.Departments.length > 0) { var h = $.map($.grep(o.setting.Departments, (function (e, t) { return e.selected })), (function (e) { return e.ID })); h.length && f.bool.must.push({ terms: { Departments: h } }), p.dpt_number_of_items = { terms: { field: "Departments", order: { _count: "desc" }, size: o.setting.Departments.length } } } if (o.setting.ShowAdvancedSearchLink && o.setting.DisplayContentType2Filter && o.setting.ContentTypes.length > 0) { var m = $.map($.grep(o.setting.ContentTypes, (function (e, t) { return e.selected })), (function (e) { return e.ID })); m.length && f.bool.must.push({ terms: { CTID: m } }), p.ct_number_of_items = { terms: { field: "CTID", order: { _count: "desc" }, size: o.setting.ContentTypes.length } } } return t.extend(l, { query: c, post_filter: f, aggs: p }) }, _handleSearchStringSpecialChar: function (e) { return e && (e = e.replace(/\+|-|&|\||!|\(|\)|\{|}|\[|]|\^|\*|\?|:|;|\~|\/|\\/gi, " ")), e }, _getContentTypeDisplayName: function (e) { var n = e; return t.forEach(o.setting.ContentTypes, (function (t, r) { e != t.Name || (n = t.DisplayName) })), n }, _getContentTypeDetailUrl: function (e, n) { var r = ""; return t.forEach(o.setting.ContentTypeDetailUrls, (function (t, i) { e != t.Name || (r = t.Url.replace(o.setting.ContentIDPlaceHolder, n)) })), r } } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.fe.vision.search2").service("visionSearch2Templates", [function () { var e = { leftPart: '<div class="vision-search2-item-left" ng-show="model.displayImage && (item.imageSrc || item.customFrame)"><a class="vision-search2-item-frame" href="{{item.href}}" title=""><div class="vision-search2-item-frame-image2" ng-if="item.imageSrc"><img alt="{{item.imageAlt}}" ng-src="{{item.imageSrc}}"/></div><div class="vision-search2-item-frame-image" ng-if="!item.imageSrc" ng-bind-html="item.customFrame"></div></a></div>', rightPart: '<div class="vision-search2-item-right"><div class="vision-search2-item-title"><a class="vision-search2-item-title-link" href="{{item.href}}" title=""><span class="vision-search2-item-title-text" ng-bind-html="item._source.Title"></span><span class="vision-search2-item-title-sub" ng-if="item.titleSub" ng-bind-html="item.titleSub"></span></a></div><div class="vision-search2-item-preline" ng-bind-html="item.preline"></div><div class="vision-search2-item-content" ng-bind-html="item._source.Content"></div><div class="vision-search2-item-postline"><span class="vision-search2-item-typeicon"></span><span class="vision-search2-item-typename">{{item.contentTypeDisplayName}}</span></div></div>' }; return { elements: e, regular: '<div class="vision-search2-item-{{item._source.CTNAME}}">' + e.leftPart + e.rightPart + "</div>", event: "" } }]) }(window, angular), function (e, t, n) { e.viPredefinedModules && e.viPredefinedModules.push("vi.be.vision.search2"), t.module("vi.be.vision.search2", ["vi.fe.common", "ngSanitize", "blockUI", "angucomplete-alt", "vi.ui", "vi.frontend.list.module", "toastr"]).config(["blockUIConfig", function (e) { e.requestFilter = function (e) { return !/^.*?\/_search($|\/)/.test(e.url) } }]) }(window, angular, jQuery), function (e, t) { "use strict"; t.module("vi.be.vision.search2").controller("visionSearch2BackendController", ["$scope", "visionService2BackendService", "visionService2BackendModel", function (e, n, r) { e.init = function (e) { n.init(e) }, e.model = r, e.service = n, e.handleDepartmentAllSelect = function (n) { var r = $(n.target).prop("checked"); t.forEach(e.model.setting.Departments, (function (e) { e.selected = r })), e.model.advanced.selectedAllDepartments = r }, e.handleDepartmentItemSelect = function (t) { $(t.target); var n = e.model.setting.Departments.length, r = $.grep(e.model.setting.Departments, (function (e) { return e.selected })).length; e.model.advanced.selectedAllDepartments = r > 0 && r == n }, e.handleContentTypeAllSelect = function (n) { var r = $(n.target).prop("checked"); t.forEach(e.model.setting.ContentTypes, (function (e) { e.selected = r })), e.model.advanced.selectedAllContentTypes = r }, e.handleContentTypeItemSelect = function (t) { $(t.target); var n = e.model.setting.ContentTypes.length, r = $.grep(e.model.setting.ContentTypes, (function (e) { return e.selected })).length; e.model.advanced.selectedAllContentTypes = r > 0 && r == n } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItem", ["$compile", "visionService2BackendModel", "viUIDateTimeConverter", function (e, t, n) { return { restrict: "EA", replace: !0, scope: { item: "=" }, link: function (r, i, a) { r.model = t, r.dateTimeToString = function (e, t) { return n.dateTimeToString(null, n.stringToDateTime(null, e), " ", t) }, i.html("<div vision-search2-backend-item-" + r.item._source.CTNAME.toLowerCase() + ' class="vision-search2-backend-item"></div>'), e(i.contents())(r) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemBlog", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Blog Posts", e.item._source.PostDate && (e.item.preline = "Published " + e.dateTimeToString(e.item._source.PostDate)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemBusinessdirectory", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Businesses", e.item.titleSub = e.item._source.FullAddress } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemDocument", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Documents"; var r = (e.item._source.Extension || "").replace(".", ""); "txt" != r && "rtf" != r && "doc" != r && "docx" != r && "xls" != r && "xlsx" != r && "pdf" != r && "csv" != r && "zip" != r && "ppt" != r && "pptx" != r && (r = "documents"), e.item.imageSrc = e.model.setting.Cms6RootPath + "/DefaultContent/Default/_gfx/search2/" + r + ".svg" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemEvent", ["$compile", "visionSearch2BackendTemplates", "viUIDateTimeConverter", function (e, t, n) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, r) { e.item.contentTypeDisplayName = "Events", e.item.preline = e.item._source.DateText, e.item.imageSrc = ""; var i = n.stringToDate(null, e.item._source.StartDate), a = $.formatDate(i, "MMM"), o = $.formatDate(i, "dd"); e.item.customFrame = '<div class="vision-search2-item-Event-date"><div class="vision-search2-item-Event-month">' + a + '</div><div class="vision-search2-item-Event-day">' + o + "</div></div>" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemFacilitydirectory", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Facilities", e.item.titleSub = e.item._source.FullAddress } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemFaq", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "FAQs" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemForm", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Surveys"; var r = "", i = "", a = ""; e.item._source.OpenDate && (a = r = "Start " + e.dateTimeToString(e.item._source.OpenDate)), e.item._source.CloseDate && (i = "Close " + e.dateTimeToString(e.item._source.CloseDate), a = r ? r + " - " + i : i), e.item.preline = a } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemFormbuilder", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Forms"; var r = "", i = "", a = ""; e.item._source.StartDate && (a = r = "Start " + e.dateTimeToString(e.item._source.StartDate)), e.item._source.CloseDate && (i = "End " + e.dateTimeToString(e.item._source.CloseDate), a = r ? r + " - " + i : i), e.item.preline = a } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemJob", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Job Posts", e.item._source.ExpireDate && (e.item.preline = "Ending " + e.dateTimeToString(e.item._source.ExpireDate)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemMeetingagenda", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Meeting Agendas", e.item._source.MeetingDate && (e.item.preline = e.dateTimeToString(e.item._source.MeetingDate)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemMeetingitem", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Meeting Items" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemMeetingminutes", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Meeting Minutes", e.item._source.MeetingDate && (e.item.preline = e.dateTimeToString(e.item._source.MeetingDate)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemNews", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "News", e.item._source.PublishDate && (e.item.preline = e.dateTimeToString(e.item._source.PublishDate, !0)) } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemOnlinepolls", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Polls" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemPage", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Pages", e.item.titleSub = e.item.href } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemPhotoalbum", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Albums" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemRfp", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "RFP Posts"; var r = "", i = "", a = "", o = "", s = "RFP No. " + e.item._source.Number; e.item._source.StartDate && (o = r = "Start " + e.dateTimeToString(e.item._source.StartDate)), e.item._source.ClosingDate && (i = "End " + e.dateTimeToString(e.item._source.ClosingDate), o = r ? r + " - " + i : i), a = s, o && (a = s + " | " + o), e.item.preline = a } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemServicedirectory", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Services" } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemStaffdirectory", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Staffs", e.item.preline = e.item._source.StaffTitle } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").directive("visionSearch2BackendItemTopic", ["$compile", "visionSearch2BackendTemplates", function (e, t) { return { restrict: "EA", replace: !0, template: t.regular, link: function (e, t, n) { e.item.contentTypeDisplayName = "Topics"; var r = "", i = "", a = ""; e.item._source.OpenDate && (a = r = "Open " + e.dateTimeToString(e.item._source.OpenDate)), e.item._source.CloseDate && (i = "Closed " + e.dateTimeToString(e.item._source.CloseDate), a = r ? r + " - " + i : i), e.item.preline = a } } }]) }(window, window.angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").service("visionService2BackendModel", [function () { return { text: "", displayImage: !0, page: { size: 10, number: 1, total: 0 }, sort: "", setting: {}, itemsLoaded: !1, items: [], suggestion: {}, advanced: { extractWordOrPhrase: null, withAllOfTheWords: null, withoutTheWords: null } } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").service("visionService2BackendService", ["$http", "$q", "visionService2BackendModel", "$timeout", "toastr", function (n, r, i, a, o) { var s = i; return { init: function (e) { this.pagerAPI = {}, s.setting = e.setting, this._clearPager() }, initPagerAPI: function (e) { this.pagerAPI = e || {} }, changePage: function (e) { s.page.number = e, this._search() }, changeSort: function () { this.pagerAPI.toFirst && this.pagerAPI.toFirst() }, search: function () { (s.text || s.advanced.exactWordOrPhrase || s.advanced.withAllOfTheWords || s.advanced.withoutTheWords) && (this.pagerAPI.toFirst ? this.pagerAPI.toFirst() : (s.page.number = 1, this._search())) }, deleteContent: function (e) { if (e) { if (!confirm(s.setting.DeleteContentConfirmation)) return !1; var t = [e]; this._deleteContents(t) } }, bulkDeleteContents: function () { var e = this._getCheckedDeleteContents(); if (0 != e.length) { if (!confirm(s.setting.BulkDeleteContentConfirmation)) return !1; for (var t = [], n = 0; n < e.length; n++)t.push(e[n].id); t.length > 0 && this._deleteContents(t) } }, checkAll: function () { s.isCheckAll ? t.forEach(s.items, (function (e, t) { e.isChecked = !0 })) : t.forEach(s.items, (function (e, t) { e.isChecked = !1 })) }, autoCompleteSelected: function (e) { var t = this.$parent.service; void 0 !== e && (s.text = e.title, t.search()) }, changeModelText: function (e) { s.text = e }, keydownsuggest: function (e) { if (13 == e.keyCode && e.target) return s.text = e.target.value, void this.search() }, suggestion: function (e) { if (s.text = e, s.text && s.text.length > 2 && s.setting.DisplayAutocomplete && s.setting.CMSUserLoginned && 0 != s.setting.SearchIndices.length) { var t = this.$parent.service, i = t._buildSearchUrl(), a = t._buildSearchParams(!0); return n({ url: i, data: a, method: "POST", headers: { Authorization: "Bearer " + s.setting.Token } }) } return r.resolve({ data: { hits: { hits: [] } } }) }, getNumberOfPage: function () { return (s.page.number - 1) * s.page.size + 1 + " - " + ((s.page.number - 1) * s.page.size + s.items.length) }, _search: function () { if (s.setting.CMSUserLoginned && 0 != s.setting.SearchIndices.length) { var e = this, r = this._buildSearchUrl(), i = this._buildSearchParams(); s.itemsLoaded = !1, n({ url: r, data: i, method: "POST", headers: { Authorization: "Bearer " + s.setting.Token } }).then((function (n) { e._getThumbnailInfos(n).then((function (r) { if (n.data && n.data.hits) { s.page.total = n.data.hits.total, s.items.splice(0, s.items.length); var i = e._toItems(n.data.hits.hits, r); t.forEach(i, (function (e, t) { s.items.push(e) })), s.isCheckAll = !1, e._encodeStatus(), e.initSearching = !1 } else s.page.total = 0, s.items.splice(0, s.items.length); s.itemsLoaded = !0, $(".vi-content").scrollTop(0) })).catch((function (e) { console.log("search response failed to resolve:", e) })) })).catch((function (e) { })) } }, _getThumbnailInfos: function (e) { if (e.data && e.data.hits && e.data.hits.hits) { var t = $.map($.grep(e.data.hits.hits, (function (e, t) { return e._source.ThumbnailImageID })), (function (e) { return e._source.ThumbnailImageID })); if (t && 0 != t.length) return n({ url: s.setting.ThumbnailInfoUrl, data: { imageIDs: t }, method: "POST" }).then((function (e) { return e && e.data ? e.data : [] })) } return r.resolve([]) }, _getThumbnailAlt: function (e, t) { for (var n = 0; n < t.length; n++)if (t[n].id == e) return t[n].alt; return "" }, _getItemsCountByBucket: function (e, t) { for (var n = 0, r = 0; r < e.length; r++)if (e[r].key == t) { n = e[r].doc_count; break } return n }, _toItems: function (e, n) { var r = this; return e && 0 != e.length && t.forEach(e, (function (e, t) { if (e._source.ThumbnailImageID && (e.imageSrc = $.generateShowImageLink(e._source.ThumbnailImageID), e.imageAlt = r._getThumbnailAlt(e._source.ThumbnailImageID, n)), e.href = r._getContentTypeDetailUrl(e._source.CTNAME, e._source.NavID || e._source.GuidForUrl || e._source.ID), e.contentTypeDisplayName = r._getContentTypeDisplayName(e._source.CTNAME), e.highlight && e.highlight.Title && 0 != e.highlight.Title.length && (e._source.Title = e.highlight.Title[0]), e.highlight && e.highlight.Content && 0 != e.highlight.Content.length) e._source.Content = e.highlight.Content[0], e._source.Content && (e._source.Content = r._htmlDecode(e._source.Content)); else { e._source.Content && (e._source.Content = r._htmlDecode(e._source.Content)); var i = e._source.Content; i && i.length > 300 && (e._source.Content = i.substring(0, 300) + "...") } e.highlight && e.highlight.FullAddress && 0 != e.highlight.FullAddress.length && (e._source.FullAddress = e.highlight.FullAddress[0]), e.highlight && e.highlight.StaffTitle && 0 != e.highlight.StaffTitle.length && (e._source.StaffTitle = e.highlight.StaffTitle[0]), e.highlight && e.highlight.Number && 0 != e.highlight.Number.length && (e._source.Number = e.highlight.Number[0]), e.tid = e._id + Math.floor(1e5 * Math.random() + 1), e.id = e._id, e.isChecked = !1, e.deleteContent = function () { r.deleteContent(e.id) } })), e }, _htmlDecode: function (e) { var t = { lt: "<", gt: ">", nbsp: " ", amp: "&", quot: '"' }; return e.replace(/&(lt|gt|nbsp|amp|quot);/gi, (function (e, n) { return t[n] })) }, _encodeStatus: function () { try { if (!this.initSearching) { var n = t.extend({}, s, { setting: {}, items: [] }), r = this._makeStatusKey(), i = { key: r, value: n }, a = encodeURIComponent(JSON.stringify(i)); localStorage.VisionSearch2Status = a, e.location.hash = r } } catch (t) { e.location.hash = "" } }, _decodeStatus: function () { if (e.location.hash) try { var n = e.location.hash.replace(/^#!/, "").replace(/^#/, ""), r = localStorage.VisionSearch2Status, i = decodeURIComponent(r), a = JSON.parse(i); return a.key == n && (s = t.extend(s, a.value), !0) } catch (e) { return !1 } }, _makeStatusKey: function () { for (var e = "", t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", n = 0; n < 10; n++)e += t.charAt(Math.floor(Math.random() * t.length)); return e }, _applySettingStatus: function () { try { t.forEach(s.setting.Departments, (function (e) { e.selected = $.inArray(e.ID, s.advanced.departments) > -1 })), t.forEach(s.setting.ContentTypes, (function (e) { e.selected = $.inArray(e.ID, s.advanced.contentTypes) > -1 })) } catch (e) { } }, _resolveQuery: function (e) { e && (s.text = e.q || "") }, _buildSearchUrl: function () { var e = s.setting.SearchIndices.join(","); return s.setting.SearchServiceUrl + "/api/search/" + e + "/_search" }, _buildSearchParams: function (e) { var n = s.page.size, r = (s.page.number - 1) * s.page.size, i = ["Title^3.0", "Content^1.0", "FullAddress^1.0", "KeyWords^2.0", "MetaKeywords^15.0", "SubTitle^2.0", "StaffTitle^1.0", "Number^1.0", "Details^1.0"]; e && (["Title"], i = ["Title"], n = s.setting.AutocompleteResultsMaximum, r = 0); var a = { from: r, size: n, sort: "MostRecent" == s.sort ? [{ LastModifiedDate: { order: "desc" } }] : ["_score"], _source: { excludes: ["Content"] }, highlight: { fields: { Title: {}, Content: {}, FullAddress: {}, StaffTitle: {}, Number: {} }, fragment_size: 300, no_match_size: 300, encoder: "html", pre_tags: "<b>", post_tags: "</b>", number_of_fragments: 1, order: "score" } }, o = { bool: { must: [], must_not: [], filter: { bool: { must: [], must_not: [], should: [] } } } }; if (e) s.text && o.bool.must.push({ multi_match: { query: s.text, analyzer: "synonym", fields: i, type: "phrase_prefix" } }); else if (s.text) { var l = this._handleSearchStringSpecialChar(s.text); o.bool.must.push({ multi_match: { query: l, analyzer: "synonym", fields: i, type: "cross_fields" } }) } return t.extend(a, { query: o, post_filter: { bool: { must: [] } }, aggs: {} }) }, _handleSearchStringSpecialChar: function (e) { return e && (e = e.replace(/\+|-|&|\||!|\(|\)|\{|}|\[|]|\^|\*|\?|:|;|\~|\/|\\/gi, " ")), e }, _getContentTypeDisplayName: function (e) { var n = e; return t.forEach(s.setting.ContentTypes, (function (t, r) { e != t.Name || (n = t.DisplayName) })), n }, _getContentTypeDetailUrl: function (e, n) { var r = ""; return t.forEach(s.setting.ContentTypeDetailUrls, (function (t, i) { e != t.Name || (r = t.Url.replace(s.setting.ContentIDPlaceHolder, n)) })), r }, _buildDeleteContentUrl: function () { var e = s.setting.SearchIndices.join(","); return s.setting.SearchServiceUrl + "/api/search/" + e + "/_delete_by_query" }, _buildDeleteParams: function (e) { return { query: { bool: { must: [{ ids: { values: e } }] } } } }, _deleteContents: function (e) { if (e && e.length > 0) { var t = this; if (s.setting.CMSUserLoginned && 0 != s.setting.SearchIndices.length) { t = this; var r = this._buildDeleteContentUrl(), i = this._buildDeleteParams(e); n({ url: r, data: i, method: "POST", headers: { Authorization: "Bearer " + s.setting.Token } }).then((function (e) { e.data && ($.refreshTempMessage("Delete content successful!"), a((function () { t.search() }), 1e3)) })).catch((function (e) { })) } } }, _getCheckedDeleteContents: function () { return s.items.filter((function (e) { return 1 == e.isChecked })) }, _clearPager: function () { (e.location.hash || s.text) && (s.itemsLoaded = !1, s.text = "", s.items = []) } } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.be.vision.search2").service("visionSearch2BackendTemplates", [function () { var e = { leftPart: '<div class="vision-search2-item-left" ng-show="model.displayImage && (item.imageSrc || item.customFrame)"><a class="vision-search2-item-frame" href="javascipt:void(0);" onclick="return false;" title=""><div class="vision-search2-item-frame-image2" ng-if="item.imageSrc"><img alt="{{item.imageAlt}}" ng-src="{{item.imageSrc}}"/></div><div class="vision-search2-item-frame-image" ng-if="!item.imageSrc" ng-bind-html="item.customFrame"></div></a></div>', rightPart: '<div class="vision-search2-item-right"><div class="vision-search2-item-title"><a class="vision-search2-item-title-link" href="javascipt:void(0);" onclick="return false;" title=""><span class="vision-search2-item-title-text" ng-bind-html="item._source.Title"></span><span class="vision-search2-item-title-sub" ng-if="item.titleSub" ng-bind-html="item.titleSub"></span></a></div><div class="vision-search2-item-preline" ng-bind-html="item.preline"></div><div class="vision-search2-item-content" ng-bind-html="item._source.Content"></div><div class="vision-search2-item-postline"><span class="vision-search2-item-typeicon"></span><span class="vision-search2-item-typename">{{item.contentTypeDisplayName}}</span></div></div>' }; return { elements: e, regular: '<div class="vision-search2-backend-item-{{item._source.CTNAME}}"><div class="vision-search2-item-checkbox"><input type="checkbox" value="{{item.id}}" ng-model="item.isChecked"/></div>' + e.leftPart + e.rightPart + '<input type="button" class="command vision-search2-item-delete-button" ng-click="item.deleteContent()" value="Delete"/></div>', event: "" } }]) }(window, angular), function (e, t, n) { var r = t.module("vi.ui", []); r.directive("ngDelaySubmit", ["$compile", "$timeout", function (e, t) { return { restrict: "A", require: "^form", link: function (e, n, r, i) { n.on("submit", (function () { t((function () { e.$eval(r.ngDelaySubmit) })) })) } } }]), r.directive("viPriceFormat", ["$timeout", "$filter", function (e, t) { return { restrict: "AE", require: "?ngModel", link: function (e, n, r, i) { var a = $(n), o = e.$eval(r.viPriceFormat || "2"), s = e.$eval(r.viMin), l = function (e) { if (null != e) { "string" == typeof e && (e = parseFloat(e.indexOf(",") > -1 ? e.replace(new RegExp(",", "g"), "") : e)); try { return t("number")(e, o) } catch (e) { } } return null }; i && (i.$parsers.push((function (e) { if (!i.$isEmpty(e)) { var t = l(e); return "string" == typeof t && (t = parseFloat(t.indexOf(",") > -1 ? t.replace(new RegExp(",", "g"), "") : t)), null == t ? i.$setValidity("number", !0) : t < s ? i.$setValidity("min", !1) : i.$setValidity("min", !0), t } return e })), i.$formatters.push((function (e) { if (!i.$isEmpty(e)) { var t = l(e); return t < s ? i.$setValidity("min", !1) : i.$setValidity("min", !0), t } return e })), a.on("blur", (function () { var e = l(a.val()); null != e && (i.$setViewValue(e), i.$render()) }))); var c = [8, 9, 13, 46, 110]; a.bind("keypress", (function (e) { var t = e.keyCode || e.which; if (!(t >= 48 && t <= 57 || $.inArray(t, c) > -1)) return e.preventDefault(), !1 })) } } }]), r.directive("viQuantityFormat", ["$timeout", "$filter", function (e, t) { return { restrict: "AE", require: "?ngModel", link: function (e, n, r, i) { var a = e.$eval(r.viQuantityFormat) || "^[0-9]+([.]{1}[0-9]{2})?$", o = 2; switch (a) { case "^[0-9]+$": o = 0; break; case "^[0-9]+([.]{1}[0-9]{1})?$": o = 1; break; case "^[0-9]+([.]{1}[0-9]{2})?$": o = 2; break; case "^[0-9]+([.]{1}[0-9]{3})?$": o = 3 }var s = function (e) { if (null != e) { "string" == typeof e && (e = parseFloat(e.indexOf(",") > -1 ? e.replace(new RegExp(",", "g"), "") : e)); try { return t("number")(e, o) } catch (e) { } } return null }; i && (i.$parsers.push((function (e) { if (!i.$isEmpty(e)) { var t = s(e); return console.log(t), "string" == typeof t && (t = parseFloat(t.indexOf(",") > -1 ? t.replace(new RegExp(",", "g"), "") : t)), t } return e })), i.$formatters.push((function (e) { return i.$isEmpty(e) ? e : s(e) })), n.on("blur", (function () { var e = s(n.val()); null != e && (i.$setViewValue(e), i.$render()) }))) } } }]), r.directive("viUniqueItem", ["$timeout", function (e) { return { restrict: "A", require: "ngModel", scope: { viSourceItems: "=viSourceItems", viUniqueItem: "=viUniqueItem" }, link: function (e, t, n, r) { var i = e.viSourceItems || [], a = e.viUniqueItem, o = $.map(i, (function (e) { return a ? e ? e[a] : null : e })); r.$validators.uniqueItem = function (e) { return !function (e) { var t = a ? e[a] : e; return !t || $.grep(o, (function (e) { return e == t })).length >= 2 }(e) } } } }]), r.directive("viImageName", ["$timeout", function (e) { return { restrict: "A", link: function (e, t, n, r) { var i = n.viImageName; $(t); $.ajax({ url: i, success: function (e) { t.text(e.Name), t.attr("title", e.Name) } }) } } }]) }(window, angular, jQuery), function (e, t) { t.module("vi.ui").directive("viDatetimeModerator", ["$timeout", function (e) { return { require: "ngModel", link: function (t, n, r, i) { var a = "start" == n.attr("vi-datetime-moderator"), o = "end" == n.attr("vi-datetime-moderator"), s = "M/d/yyyy h:mm tt", l = "M/d/yyyy"; function c(e) { if (i.$modelValue) { var t = new Date(i.$modelValue), n = a && t && 0 == t.getHours() && 0 == t.getMinutes() || o && t && 23 == t.getHours() && 59 == t.getMinutes(); d(t, e = n ? e : s) } } function u(e) { return o && e && 0 == e.getHours() && 0 == e.getMinutes() ? new Date(e.getTime() + 8634e4) : e } var d = function (t, r) { n.getKendoDateTimePicker().setOptions({ format: r }), n.getKendoDateTimePicker().value(t), i.$setViewValue(kendo.toString(t, s)), e((function () { var e = n.getKendoDateTimePicker(), t = e._form, r = t.scope(), i = e.element; r && i && !i.attr("ignore") ? (r[t.attr("name")].$dirty = !1, r[t.attr("name")][i.attr("name")].$dirty = !1, i.attr("ignore", !0)) : (r[t.attr("name")].$dirty = !0, r[t.attr("name")][i.attr("name")].$dirty = !0) })) }; setTimeout((function () { n.getKendoDateTimePicker().setOptions({ open: function (e) { var t = e.sender._value; t = u(t), d(t, s) }, close: function (e) { var t = e.sender._value; "date" === e.view && (t = u(t)), d(t, s) } }), c(l) }), 400), n.on("blur", (function () { c(l) })), n.on("change focus", (function () { c(s) })) } } }]) }(window, angular), function (e, t) { var n = t.module("vi.ui"); n.directive("viRecaptchaSetting", ["$compile", function (t) { return { restrict: "EA", link: function (t, n, r, i) { if (e.visionApps.cms_core.GoogleReCaptchaPublicKey) { if (!document.getElementById("reCaptchaSettingId")) { var a = '<div id="reCaptchaSettingId" style="display:none;">  <script>    var viRecaptchaCallback = function(token){};    var _viRecaptchaCallback = function(token){      if($.isFunction(viRecaptchaCallback)) viRecaptchaCallback(token);    };  <\/script>  <div class="g-recaptcha" data-sitekey="' + e.visionApps.cms_core.GoogleReCaptchaPublicKey + '" data-size="invisible" data-badge="inline" data-callback="_viRecaptchaCallback"></div></div>'; $("body").prepend(a) } if (!document.getElementById("reCaptchaScriptId")) { $("body").append('<script id="reCaptchaScriptId" src="https://www.google.com/recaptcha/api.js" async defer><\/script>') } } } } }]), n.directive("viRecaptchaCallback", ["$compile", "$parse", function (t, n) { return { restrict: "A", link: function (t, r, i, a) { var o = e.visionApps.cms_core.GoogleReCaptchaPublicKey, s = function (e) { t.$apply((function () { n(i.viRecaptchaCallback)(t, {}), viRecaptchaCallback = function () { } })) }; r.click((function () { var e; e = !0, i.viRecaptchaValidate && t.$apply((function () { e = n(i.viRecaptchaValidate)(t, {}) })), e && (o ? (viRecaptchaCallback = s, grecaptcha && (grecaptcha.reset(), grecaptcha.execute())) : s()) })) } } }]) }(window, angular), function (e, t) { var n, r = t.module("vi.ui"); r.constant("viUIDateTimeFormatConfig", { dateFormat: (n = e.visionApps ? e.visionApps.cms_core.DateFormat : "mm/dd/yy", "MM/DD/YYYY" == (n = n.toUpperCase()) ? "mm/dd/yy" : "DD/MM/YYYY" == n ? "dd/mm/yy" : "MMMM DD, YYYY" == n ? "MM dd, yy" : "mm/dd/yy"), timeFormat: e.visionApps ? e.visionApps.cms_core.TimeFormat : "h:mm TT", timeAMFormat: [e.visionApps ? e.visionApps.cms_core.TimeAMFormat : "AM"], timePMFormat: [e.visionApps ? e.visionApps.cms_core.TimePMFormat : "PM"] }).factory("viUIDateTimeConverter", ["viUIDateTimeFormatConfig", function (e) { return { stringToDate: function (n, r, i) { if (n = n || e.dateFormat, t.isDate(r) && !isNaN(r)) return r; if (t.isString(r) && n) try { if (0 !== r.indexOf("/D") && !/\dT\d/.test(r) && !i) return $.datepicker.parseDate(n, r); var a = $.parseDate(r); if (!isNaN(a.getTime())) return a } catch (e) { return null } if (t.isNumber(r)) return new Date(r); return null }, dateToString: function (n, r) { var i = n || e.dateFormat; if (r && i) if (t.isDate(r)) try { return $.datepicker.formatDate(i, r) } catch (e) { return null } else { if ("number" != typeof r) return r; try { return $.datepicker.formatDate(i, new Date(r)) } catch (e) { return null } } return null }, stringToDateTime: function (n, r, i, a) { if (i = i || " ", n = n || e.dateFormat + i + e.timeFormat, t.isDate(r)) return r; if (t.isString(r) && n) if (0 === r.indexOf("/D") || /\dT\d/.test(r) || a) { var o = $.parseDate(r); if (!isNaN(o.getTime())) return o } else try { var s = { separator: i, timeFormat: e.timeFormat, amNames: e.timeAMFormat, pmNames: e.timePMFormat }; return o = $.datepicker.parseDateTime(e.dateFormat, e.timeFormat, r, null, s) } catch (e) { return null } return null }, dateTimeToString: function (t, n, r, i) { r = r || " "; var a = t || e.dateFormat + r + e.timeFormat; if (n && a) try { var o = $.datepicker.formatDate(e.dateFormat, n), s = { hour: n.getHours(), minute: n.getMinutes(), second: n.getSeconds() }, l = { amNames: e.timeAMFormat, pmNames: e.timePMFormat }; return i && 0 == s.hour && 0 == s.minute && 0 == s.second || i && 23 == s.hour && 59 == s.minute && 0 == s.second ? o : o + r + $.datepicker.formatTime(e.timeFormat, s, l) } catch (e) { return null } return null }, toModelDateString: function (e) { if (e && t.isDate(e)) { return $.datepicker.formatDate("mm/dd/yy", e) } return null }, toModelDateTimeString: function (e) { if (e && t.isDate(e)) { var n = $.datepicker.formatDate("mm/dd/yy", e), r = { hour: e.getHours(), minute: e.getMinutes(), second: e.getSeconds() }; return n + " " + $.datepicker.formatTime("HH:mm:ss", r) } return null } } }]), r.directive("viDatepicker", ["$compile", "$timeout", "viUIDateTimeFormatConfig", "viUIDateTimeConverter", function (e, n, r, i) { return { restrict: "EA", require: "?ngModel", priority: 1, link: function (e, a, o, s) { var l, c = $(a), u = ((l = t.extend({ changeMonth: !0, changeYear: !0, showButtonPanel: !0, showNowButton: !0, showOtherMonths: !0, yearRange: "1800:2099", hour: 0, minute: 0 }, r, e.$eval(o.viDatepicker || "{}"))).minDate && !t.isDate(l.minDate) && (l.minDate = new Date(l.minDate)), l.maxDate && !t.isDate(l.maxDate) && (l.maxDate = new Date(l.maxDate)), l); s.$validators.datetimeformat = function (e, n) { if (e) return !0; if (n) { var r = i.stringToDate(o.viDateFormat, n); return t.isDate(r) } return !0 }, s.$parsers.push((function (e) { if (e) { if (t.isDate(e)) return i.toModelDateString(e); var n = i.stringToDate(o.viDateFormat, e); if (n) return i.toModelDateString(n) } return null })), s.$formatters.push((function (e) { if (e) { var t = i.stringToDate(o.viDateFormat, e, !0); t && (t.setHours(u.hour), t.setMinutes(u.minute)), e = i.dateToString(o.viDateFormat, t) } return e })), c.on("focus", (function (e) { o.readonly && e.stopImmediatePropagation() })); var d = c.parent(".date-container"); d.length && d.on("click", ".calendar_icon", (function () { c.trigger("focus") })), n((function () { c.datepicker(u), c.on("$destroy", (function () { c.datepicker("hide"), c.datepicker("destroy") })) })) } } }]), r.directive("viDatetimepicker", ["$compile", "$timeout", "viUIDateTimeFormatConfig", "viUIDateTimeConverter", function (e, n, r, i) { return { restrict: "EA", require: "?ngModel", priority: 1, link: function (e, a, o, s) { var l, c = $(a), u = ((l = t.extend({ hourGrid: 3, minuteGrid: 15, enableInput: !0, showTimepicker: !0, amNames: $.unique($.merge(r.timeAMFormat, ["AM", "A"])), pmNames: $.unique($.merge(r.timePMFormat, ["PM", "P"])), filterTime: null, showNowButton: !0, showOtherMonths: !0, showButtonPanel: !0, separator: " ", hour: 0, minute: 0, yearRange: "1800:2099", updateDateTimeCallback: function (e, t, n) { var r = e._defaults; if (r.filterTime) { var i = r.filterTime, a = { hour: i.Hour, minute: i.Minute }; if ($.datepicker.formatTime(r.timeFormat, a, r).toLowerCase() == e.formattedTime.toLowerCase()) return n } return n + (e.formattedTime ? r.separator + e.formattedTime + r.timeSuffix : "") } }, r, e.$eval(o.viDatetimepicker || "{}"))).minDate && !t.isDate(l.minDate) && (l.minDate = new Date(l.minDate)), l.maxDate && !t.isDate(l.maxDate) && (l.maxDate = new Date(l.maxDate)), l); c.on("focus", (function (e) { o.readonly && e.stopImmediatePropagation() })); var d = c.parent(".date-container"); d.length && d.on("click", ".calendar_icon", (function () { c.trigger("focus") })), s.$validators.datetimeformat = function (e, n) { if (e) return !0; if (n) { var r = i.stringToDateTime(o.viUIDateTimeFormat, n, u.separator); return t.isDate(r) } return !0 }, s.$parsers.push((function (e) { if (e) { if (e = function (e, t, n) { var r = $.datepicker._getInst(t), a = $.datepicker._get(r, "timepicker"), s = i.stringToDateTime(o.viUIDateTimeFormat, e, n.separator); if (s && r.settings.showTime && r.settings.filterTime && a.formattedDate && a.formattedDate == a.formattedDateTime) { var l = r.settings.filterTime; s.setHours(l.Hour), s.setMinutes(l.Minute) } return s }(e, c.get(0), u), t.isDate(e)) return i.toModelDateTimeString(e); var n = i.stringToDateTime(o.viUIDateTimeFormat, e, u.separator); return i.toModelDateTimeString(n) } return null })), s.$formatters.push((function (e) { if (e) { var t = i.stringToDateTime(o.viUIDateTimeFormat, e, u.separator, !0); if (t) return i.dateTimeToString(o.viUIDateTimeFormat, t, u.separator) } return null })), n((function () { c.datetimepicker(u), c.on("$destroy", (function () { c.datetimepicker("hide"), c.datetimepicker("destroy") })) })) } } }]), r.directive("viDatetimeValidation", ["viUIDateTimeConverter", function (e) { return { restrict: "A", require: "ngModel", link: function (t, n, r, i) { i.$validators.viDatetimeValidation = function (t) { if (!t) return !0; var n = null; try { n = $.parseDate(t) } catch (e) { n = null } if (!(n && "[object Date]" === Object.prototype.toString.call(n) && !isNaN(n.getTime()))) try { n = e.stringToDateTime(r.viDatetimeValidation, t) } catch (e) { n = null } return n && "[object Date]" === Object.prototype.toString.call(n) && !isNaN(n.getTime()) } } } }]) }(window, angular), function (e, t, n) { var r = t.module("vi.ui"), i = { editorAjax: e.visionOptions.cmsAdminEndPoint + "Components/Shared/LoadEditor" }; r.filter("convertHtmlToText", (function () { return function (e, t) { e = n.htmlDecode(e); var r = { lt: "<", gt: ">", nbsp: " ", amp: "&", quot: '"' }; return e = e.replace(/&(lt|gt|nbsp|amp|quot);/gi, (function (e, t) { return r[t] })).replace(/\+/g, ""), n.convertHtmlToText(e, t) } })), r.directive("viEditorLoader", ["$compile", "$timeout", "$http", "$filter", function (e, t, r, a) { return { restrict: "AE", require: "^ngModel", scope: { html: "=ngModel", required: "=ngRequired" }, link: function (o, s, l, c) { var u = l.fieldName; u && u.startsWith("{{") && (u = o.$eval(u.substr(2, u.length - 4))), o.html && (o.html = a("maskText")(o.html)), r({ url: i.editorAjax, params: { fieldName: u, ngModelName: "html", required: o.required }, method: "GET", headers: { "Content-Type": "html/text" } }).then((function (r) { s.html(e(r.data)(o)); var i = s.find("[name='" + u + "']"); if (c) { c.$name = u; var a = c; a.$$parentForm.$addControl(a) } t((function () { i.trigger("change"), o.html = i.val() }), 300), n(s).closest("form").submit((function () { i.trigger("change"), o.html = i.val() })) }), (function (e) { })), o.$on("$destroy", (function () { var e = n(s).find("[data-editor-id]").attr("[data-editor-id]"); if ($find && e) { var t = $find(e); null != t && t.dispose() } })) } } }]) }(window, angular, jQuery), function (e, t, n) { var r = t.module("vi.ui"), i = { editorAjax: e.visionOptions.cmsAdminEndPoint + "Components/Shared/LoadEditor" }; r.filter("convertHtmlToText", (function () { return function (e, t) { e = n.htmlDecode(e); var r = { lt: "<", gt: ">", nbsp: " ", amp: "&", quot: '"' }; return e = e.replace(/&(lt|gt|nbsp|amp|quot);/gi, (function (e, t) { return r[t] })).replace(/\+/g, ""), n.convertHtmlToText(e, t) } })), r.directive("viHtmlEditor", ["$compile", "$timeout", "$http", "$filter", function (e, t, r, a) { return { restrict: "AE", require: "^ngModel", scope: { html: "=ngModel", required: "=ngRequired" }, link: function (t, o, s, l) { var c = s.fieldName; c && c.startsWith("{{") && (c = t.$eval(c.substr(2, c.length - 4))), t.html && (t.html = a("maskText")(t.html)), r({ url: i.editorAjax, params: { fieldName: c, ngModelName: "html", required: t.required }, method: "GET", headers: { "Content-Type": "html/text" } }).then((function (n) { o.html(e(n.data)(t)) }), (function (e) { })), t.$on("$destroy", (function () { var e = n(o).find("[data-editor-id]").attr("[data-editor-id]"); if ($find && e) { var t = $find(e); null != t && t.dispose() } })) } } }]) }(window, angular, jQuery), function (e, t, n) { var r = t.module("vi.ui"), i = { showImage: e.visionOptions.imageUrl, imageBrowser: e.visionOptions.cmsAdminEndPoint + "Components/Shared/ImageBrowser" }; r.directive("viImageBrowser", ["$compile", "$timeout", function (e, r) { return { restrict: "A", require: "^ngModel", scope: { imageID: "=ngModel", ngRequired: "=ngRequired" }, link: function (a, o, s, l) { var c = s.name; t.extend(a, { noImagePlaceHolder: s.viNoImagePlaceHolder || "", fieldName: c }), a.mode = s.viMode, a.enableBrowse = s.viEnableBrowse, Object.defineProperty(a, "imageSrc", { get: function () { return this.imageID ? i.showImage + this.imageID : "" } }); var u = o.closest("form"); a.setFormField = function (e) { if (u.length) { var t = u.attr("name"); if (t && c) { var n = u.scope(); n && c && n[t][c] && n[t][c].$setViewValue(e) } } }, a.browseImage = function () { if (a.enableBrowse && "true" == a.enableBrowse.toString().toLocaleLowerCase()) { var e = a, t = { title: "Choose an Image", url: "" == e.imageID ? i.imageBrowser : i.imageBrowser + "?selectedID=" + e.imageID, width: 768, height: 560, skin: "viClientDialog-light", useFrame: !1, onClosed: function (t) { null != t && r((function () { e.imageData = t, e.imageID = t.imageID, a.setFormField(e.imageID), e.$apply() })) } }; n.viClientDialog(t).open() } }, a.removeImage = function () { var e = a; e.imageID = null, r((function () { a.setFormField(e.imageID), e.$apply() })) }, a.imageLoad = function (e) { var t = e.naturalWidth, r = e.naturalHeight; if (t && r) { var i = { width: t, height: r, roundedCorner: !1, defaultColor: "rgb(201, 201, 201)", desireWidth: 150, radios: "1:1" }; n(e).adjustImageDimention(i) } }, o.append(e('<div class="imageChooser_container"><div class="imageDiv"><div class="image-container"><img ng-show="imageID" class="z-selected-image" data-original="{{imageSrc}}" src="{{imageSrc}}" alt="alt" onload="angular.element(this).scope().imageLoad(this)"/><span ng-if="!imageID" ng-class="{\'place-holder-no-image\':noImagePlaceHolder, \'no-image\':true}"></span><input type="hidden" ng-model="imageID" name="{{fieldName}}" ng-required="ngRequired"/></div></div><div class="browse-remove" ng-if="mode==\'edit\'"><a class="imageChooser command chooseImage browse " href="javascript:void(0);" ng-click="browseImage();">Browse</a><a class="imageChooser command  clearImage remove" ng-show="imageID" ng-click="removeImage();" href="javascript:void(0);">Remove</a></div></div>')(a)) } } }]), r.directive("viAdjustImage", ["$compile", "$timeout", function (e, t) { return { restrict: "A", link: function (e, t, r, i) { n.fn.adjustImage && n(t).adjustImage() } } }]) }(window, angular, jQuery), function (e, t, n) { t.module("vi.ui").directive("viPdfPrint", ["$compile", "$http", "blockUI", function (r, i, a) { return { restrict: "EA", template: '<p class="printer_friendly noprint"><a ng-click="exportPDF();" ng-enabled="enabled" href="javascript:void(0)">{{buttonText}}</a></p>', scope: { type: "=viType", data: "=viData", subscribeMessage: "=viSubscribeMessage" }, link: function (r, a, o, s) { r.buttonText = "Print", r.enabled = !0, r.iframe = null, r.openURL = function (t) { e.open(t) }, r.markAsPending = function () { r.enabled = !1, r.buttonText = "Generating PDF ..." }, r.markAsCompleted = function () { r.enabled = !0, r.buttonText = "Print" }, r.sendMessage = function (e) { "function" == typeof r.subscribeMessage && r.subscribeMessage(e) }, r.exportPDF = function () { if (0 != r.enabled) { r.markAsPending(); var o = e.visionOptions.virtualApplicationPath + "Shared/PdfExists", s = { type: r.type }; t.extend(s, r.data), i({ method: "POST", url: o, params: s }).then((function (o) { 0 == o.data.Result ? (r.iframe = n("<iframe/>").attr("src", o.data.URL).hide(), r.iframe.load((function () { var t = r.iframe[0].contentWindow.document.documentElement.outerHTML; i({ method: "POST", url: e.visionOptions.virtualApplicationPath + "Shared/PdfGenerate", params: s, data: { html: t } }).then((function (e) { 1 == e.data.Result ? r.openURL(e.data.URL) : console.error("Sorry, generating PDF something wrong.", e), r.iframe.remove(), r.iframe = null, r.markAsCompleted() }), (function (e) { console.error("Sorry, generating PDF failed.", e), r.iframe.remove(), r.iframe = null, r.markAsCompleted() })) })), t.element(a).append(r.iframe)) : (r.markAsCompleted(), r.openURL(o.data.URL)) }), (function (e) { console.error("Sorry, checking PDF exists failed.", e), r.markAsCompleted() })) } } } } }]) }(window, window.angular, jQuery), function (e, t) { t.module("vi.ui").directive("ngUpdateHidden", (function () { return { restrict: "AE", replace: !0, require: "ngModel", link: function (e, t, n, r) { e.$watch(r, (function (e) { t.val(e) })), t.change((function () { e.$apply((function () { r.$setViewValue(t.val()) })) })) } } })) }(window, window.angular), function (e, t, n) { t.extend(t, { viCompile: function (e) { var n = (e = e || t.element("body")).find("[vi-need-compile]"); t.forEach(n, (function (e, n) { var r = t.element(e), i = r.scope(), a = r.injector(); i && a && a.invoke(["$compile", function (e) { e(r)(i) }]) })) } }), n && (n.extend(n.prototype, { viCompile: function () { t.viCompile(this) } }), Node.prototype.viCompile = function () { n(this).viCompile() }) }(window, angular, jQuery), function (e, t, n) { e.viPredefinedModules && e.viPredefinedModules.push("vi.fe.addresslookup"); t.module("vi.fe.addresslookup", ["vi.fe.common", "angucomplete-alt"]) }(window, angular, jQuery), function (e, t) { "use strict"; t.module("vi.fe.addresslookup").controller("addressLookupController", ["$http", "$scope", "addressLookupService", "$sce", function (n, r, i, a) { r.init = function (e) { r.infos = e, i.onInitialized && i.onInitialized(r.model) }, r.model = { suggestedText: "", features: [], fields: [], mapping: [], buildCondition: function () { return r.infos.searchFieldName + " = '" + r.model.suggestedText.title + "'" } }, r.address = {}, r.esriSuggestionHandler = function (e) { return n({ url: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest?f=json&text=" + encodeURI(e), method: "GET", avoidConfig: !0 }) }, r.csvSuggestionHandler = function (e) { return n({ url: r.infos.addressLookupQuery, method: "POST", data: { f: "json", token: a.valueOf(r.infos.token), url: a.valueOf(r.infos.layerUrl), condition: r.infos.searchFieldName + " LIKE '%" + e + "%'" } }) }, r.definedCategories = [{ name: "Trash", items: ["TrashPickupDay", "RecyclingPickupDay", "TrashLink"], displayText: "Trash" }, { name: "Election", items: ["District", "Ward", "County", "Mayor", "MayorEmail", "MayorPhone", "Councilman", "CouncilmanEmail", "CouncilmanPhone", "Treasurer", "TreasurerEmail", "TreasurerPhone", "Clerk", "ClerkEmail", "ClerkPhone", "PollingLocation"], displayText: "Election" }, { name: "Amenities", items: ["ElementarySchool", "MiddleSchool", "HighSchool", "Park"], displayText: "Amenities" }], r.attrKeys = [], r.categories = []; var o = function (e) { return e.replace(/([A-Z])/g, " $1").replace(/^./, (function (e) { return e.toUpperCase() })) }; r.displayKey = function (e) { var t = void 0; if (r.infos.mapping && r.infos.mapping.length > 0 && (t = Enumerable.From(r.infos.mapping).Where("c => c.Key == '" + e + "'").FirstOrDefault()), t) return null != t.Label && "" != t.Label ? t.Label : o(e); var n = Enumerable.From(r.model.fields).Where("c => c.Name == '" + e + "'").FirstOrDefault().Alias; return o(n) }, r.displayValue = function (e) { return r.address[e] }, r.keydownsuggest = function (e) { 13 == e.keyCode && e.target && (r.model.suggestedText = e.target.value) }, r.autoCompleteSelected = function (e) { e && (r.model.suggestedText = e, r.findAddress()) }, r.filter = function (e) { return i.filter ? i.filter(e) : "ObjectId" != e }, r.findAddress = function () { r.model.suggestedText && r.model.suggestedText.title && n({ url: r.infos.addressLookupQuery, method: "POST", data: { f: "json", token: a.valueOf(r.infos.token), url: a.valueOf(r.infos.layerUrl), condition: r.model.buildCondition() } }).then((function (n) { r.model.features = n.data.Features, r.model.fields = n.data.Fields, Enumerable.From(r.model.fields).Where("c => c.IsTypeTimestamp2").Select("x=>x.Name").ToArray().forEach((function (t) { r.model.features.forEach((function (n) { var r = n.Attributes[t], i = Number(e.visionApps.cms_core.ProjectTimeZoneDiff.BaseUtcOffset.split(":")[0]), a = new Date(r - 60 * i * 60 * 1e3), o = a.toLocaleString("en", { timeZone: e.visionApps.cms_core.ProjectTimeZone }), s = a.toLocaleDateString("en", { timeZone: e.visionApps.cms_core.ProjectTimeZone }); if ("12:00:00 AM" === a.toLocaleTimeString("en", { timeZone: e.visionApps.cms_core.ProjectTimeZone })) { var l = new Date(s); n.Attributes[t] = $.formatDate(l, e.visionApps.cms_core.DateFormat) } else { var c = new Date(o); n.Attributes[t] = $.formatDateTime(new Date(c), e.visionApps.cms_core.dateTimeFormat) } })) })), r.address = n.data.Features.length ? n.data.Features[0].Attributes : {}, r.infos.mapping.length && t.forEach(r.infos.mapping, (function (e) { var t = e.Key, n = e.Value; r.address[t] = r.address[n], delete r.address[n] })), r.attrKeys = Object.keys(r.address), r.categories = [], t.forEach(r.attrKeys, (function (e) { if ("ObjectId" != e) { var t = Enumerable.From(r.definedCategories).Where("c => c.items.indexOf('" + e + "') >= 0").FirstOrDefault() || { name: "Others", item: [e], displayText: "Others" }, n = Enumerable.From(r.categories).Where("c => c.name == '" + t.name + "'").FirstOrDefault(); n ? n.items.push(e) : r.categories.push({ name: t.name, displayText: t.displayText, items: [e] }) } })), i.onFoundAddressSuccess && i.onFoundAddressSuccess(n, r.model, r.address) }), (function (e) { console.error(e), i.onFoundAddressFailed && i.onFoundAddressFailed(e, r.model) })) }, r.changeModelText = function (e) { e && (r.model.suggestedText = e, r.findAddress()) } }]) }(window, angular), function (e, t) { "use strict"; t.module("vi.fe.addresslookup").service("addressLookupService", [function () { return {} }]) }(window, angular);;
