Last active
January 27, 2017 23:36
-
-
Save robwormald/63d09b012ffeb77c226830f7c9e74336 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
AngularJS v1.5.11-local+sha.f73a65146 | |
(c) 2010-2017 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(H) { | |
'use strict'; | |
function N(a) { | |
return function() { | |
var b = arguments[0], | |
c; | |
c = "[" + (a ? a + ":" : "") + b + "] http://errors.angularjs.org/1.5.11-local+sha.f73a65146/" + (a ? a + "/" : "") + b; | |
for (b = 1; b < arguments.length; b++) { | |
c = c + (1 == b ? "?" : "&") + "p" + (b - 1) + "="; | |
var d = encodeURIComponent, | |
e; | |
e = arguments[b]; | |
e = "function" == typeof e ? e.toString().replace(/ \{[\s\S]*$/, "") : "undefined" == typeof e ? "undefined" : "string" != typeof e ? JSON.stringify(e) : e; | |
c += d(e) | |
} | |
return Error(c) | |
} | |
} | |
function ta(a) { | |
if (null == a || ab(a)) return !1; | |
if (L(a) || I(a) || D && a instanceof D) return !0; | |
var b = "length" in Object(a) && a.length; | |
return ca(b) && (0 <= b && (b - 1 in a || a instanceof Array) || "function" === typeof a.item) | |
} | |
function q(a, b, c) { | |
var d, e; | |
if (a) | |
if (A(a)) | |
for (d in a) "prototype" === d || "length" === d || "name" === d || a.hasOwnProperty && !a.hasOwnProperty(d) || b.call(c, a[d], d, a); | |
else if (L(a) || ta(a)) { | |
var f = "object" !== typeof a; | |
d = 0; | |
for (e = a.length; d < e; d++)(f || d in a) && b.call(c, a[d], d, a) | |
} else if (a.forEach && a.forEach !== q) a.forEach(b, c, a); | |
else if (Cc(a)) | |
for (d in a) b.call(c, a[d], d, a); | |
else if ("function" === | |
typeof a.hasOwnProperty) | |
for (d in a) a.hasOwnProperty(d) && b.call(c, a[d], d, a); | |
else | |
for (d in a) wa.call(a, d) && b.call(c, a[d], d, a); | |
return a | |
} | |
function Dc(a, b, c) { | |
for (var d = Object.keys(a).sort(), e = 0; e < d.length; e++) b.call(c, a[d[e]], d[e]); | |
return d | |
} | |
function Ec(a) { | |
return function(b, c) { | |
a(c, b) | |
} | |
} | |
function ne() { | |
return ++ub | |
} | |
function Xb(a, b, c) { | |
for (var d = a.$$hashKey, e = 0, f = b.length; e < f; ++e) { | |
var g = b[e]; | |
if (J(g) || A(g)) | |
for (var h = Object.keys(g), k = 0, l = h.length; k < l; k++) { | |
var m = h[k], | |
p = g[m]; | |
c && J(p) ? la(p) ? a[m] = new Date(p.valueOf()) : | |
vb(p) ? a[m] = new RegExp(p) : p.nodeName ? a[m] = p.cloneNode(!0) : Yb(p) ? a[m] = p.clone() : (J(a[m]) || (a[m] = L(p) ? [] : {}), Xb(a[m], [p], !0)) : a[m] = p | |
} | |
} | |
d ? a.$$hashKey = d : delete a.$$hashKey; | |
return a | |
} | |
function Q(a) { | |
return Xb(a, xa.call(arguments, 1), !1) | |
} | |
function oe(a) { | |
return Xb(a, xa.call(arguments, 1), !0) | |
} | |
function Zb(a, b) { | |
return Q(Object.create(a), b) | |
} | |
function G() {} | |
function wb(a) { | |
return a | |
} | |
function ha(a) { | |
return function() { | |
return a | |
} | |
} | |
function Fc(a) { | |
return A(a.toString) && a.toString !== na | |
} | |
function B(a) { | |
return "undefined" === typeof a | |
} | |
function x(a) { | |
return "undefined" !== typeof a | |
} | |
function J(a) { | |
return null !== a && "object" === typeof a | |
} | |
function Cc(a) { | |
return null !== a && "object" === typeof a && !Gc(a) | |
} | |
function I(a) { | |
return "string" === typeof a | |
} | |
function ca(a) { | |
return "number" === typeof a | |
} | |
function la(a) { | |
return "[object Date]" === na.call(a) | |
} | |
function A(a) { | |
return "function" === typeof a | |
} | |
function vb(a) { | |
return "[object RegExp]" === na.call(a) | |
} | |
function ab(a) { | |
return a && a.window === a | |
} | |
function bb(a) { | |
return a && a.$evalAsync && a.$watch | |
} | |
function Qa(a) { | |
return "boolean" === typeof a | |
} | |
function pe(a) { | |
return a && ca(a.length) && qe.test(na.call(a)) | |
} | |
function Yb(a) { | |
return !(!a || !(a.nodeName || a.prop && a.attr && a.find)) | |
} | |
function re(a) { | |
var b = {}; | |
a = a.split(","); | |
var c; | |
for (c = 0; c < a.length; c++) b[a[c]] = !0; | |
return b | |
} | |
function ya(a) { | |
return S(a.nodeName || a[0] && a[0].nodeName) | |
} | |
function cb(a, b) { | |
var c = a.indexOf(b); | |
0 <= c && a.splice(c, 1); | |
return c | |
} | |
function sa(a, b) { | |
function c(a, b) { | |
var c = b.$$hashKey, | |
e; | |
if (L(a)) { | |
e = 0; | |
for (var f = a.length; e < f; e++) b.push(d(a[e])) | |
} else if (Cc(a)) | |
for (e in a) b[e] = d(a[e]); | |
else if (a && "function" === | |
typeof a.hasOwnProperty) | |
for (e in a) a.hasOwnProperty(e) && (b[e] = d(a[e])); | |
else | |
for (e in a) wa.call(a, e) && (b[e] = d(a[e])); | |
c ? b.$$hashKey = c : delete b.$$hashKey; | |
return b | |
} | |
function d(a) { | |
if (!J(a)) return a; | |
var b = f.indexOf(a); | |
if (-1 !== b) return g[b]; | |
if (ab(a) || bb(a)) throw za("cpws"); | |
var b = !1, | |
d = e(a); | |
void 0 === d && (d = L(a) ? [] : Object.create(Gc(a)), b = !0); | |
f.push(a); | |
g.push(d); | |
return b ? c(a, d) : d | |
} | |
function e(a) { | |
switch (na.call(a)) { | |
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 a.constructor(d(a.buffer), | |
a.byteOffset, a.length); | |
case "[object ArrayBuffer]": | |
if (!a.slice) { | |
var b = new ArrayBuffer(a.byteLength); | |
(new Uint8Array(b)).set(new Uint8Array(a)); | |
return b | |
} | |
return a.slice(0); | |
case "[object Boolean]": | |
case "[object Number]": | |
case "[object String]": | |
case "[object Date]": | |
return new a.constructor(a.valueOf()); | |
case "[object RegExp]": | |
return b = new RegExp(a.source, a.toString().match(/[^/]*$/)[0]), b.lastIndex = a.lastIndex, b; | |
case "[object Blob]": | |
return new a.constructor([a], { | |
type: a.type | |
}) | |
} | |
if (A(a.cloneNode)) return a.cloneNode(!0) | |
} | |
var f = [], | |
g = []; | |
if (b) { | |
if (pe(b) || "[object ArrayBuffer]" === na.call(b)) throw za("cpta"); | |
if (a === b) throw za("cpi"); | |
L(b) ? b.length = 0 : q(b, function(a, c) { | |
"$$hashKey" !== c && delete b[c] | |
}); | |
f.push(a); | |
g.push(b); | |
return c(a, b) | |
} | |
return d(a) | |
} | |
function oa(a, b) { | |
if (a === b) return !0; | |
if (null === a || null === b) return !1; | |
if (a !== a && b !== b) return !0; | |
var c = typeof a, | |
d; | |
if (c === typeof b && "object" === c) | |
if (L(a)) { | |
if (!L(b)) return !1; | |
if ((c = a.length) === b.length) { | |
for (d = 0; d < c; d++) | |
if (!oa(a[d], b[d])) return !1; | |
return !0 | |
} | |
} else { | |
if (la(a)) return la(b) ? oa(a.getTime(), | |
b.getTime()) : !1; | |
if (vb(a)) return vb(b) ? a.toString() === b.toString() : !1; | |
if (bb(a) || bb(b) || ab(a) || ab(b) || L(b) || la(b) || vb(b)) return !1; | |
c = T(); | |
for (d in a) | |
if ("$" !== d.charAt(0) && !A(a[d])) { | |
if (!oa(a[d], b[d])) return !1; | |
c[d] = !0 | |
} | |
for (d in b) | |
if (!(d in c) && "$" !== d.charAt(0) && x(b[d]) && !A(b[d])) return !1; | |
return !0 | |
} | |
return !1 | |
} | |
function db(a, b, c) { | |
return a.concat(xa.call(b, c)) | |
} | |
function eb(a, b) { | |
var c = 2 < arguments.length ? xa.call(arguments, 2) : []; | |
return !A(b) || b instanceof RegExp ? b : c.length ? function() { | |
return arguments.length ? b.apply(a, | |
db(c, arguments, 0)) : b.apply(a, c) | |
} : function() { | |
return arguments.length ? b.apply(a, arguments) : b.call(a) | |
} | |
} | |
function se(a, b) { | |
var c = b; | |
"string" === typeof a && "$" === a.charAt(0) && "$" === a.charAt(1) ? c = void 0 : ab(b) ? c = "$WINDOW" : b && H.document === b ? c = "$DOCUMENT" : bb(b) && (c = "$SCOPE"); | |
return c | |
} | |
function fb(a, b) { | |
if (!B(a)) return ca(b) || (b = b ? 2 : null), JSON.stringify(a, se, b) | |
} | |
function Hc(a) { | |
return I(a) ? JSON.parse(a) : a | |
} | |
function Ic(a, b) { | |
a = a.replace(te, ""); | |
var c = Date.parse("Jan 01, 1970 00:00:00 " + a) / 6E4; | |
return fa(c) ? b : c | |
} | |
function $b(a, | |
b, c) { | |
c = c ? -1 : 1; | |
var d = a.getTimezoneOffset(); | |
b = Ic(b, d); | |
c *= b - d; | |
a = new Date(a.getTime()); | |
a.setMinutes(a.getMinutes() + c); | |
return a | |
} | |
function Aa(a) { | |
a = D(a).clone(); | |
try { | |
a.empty() | |
} catch (c) {} | |
var b = D("<div>").append(a).html(); | |
try { | |
return a[0].nodeType === Ra ? S(b) : b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/, function(a, b) { | |
return "<" + S(b) | |
}) | |
} catch (c) { | |
return S(b) | |
} | |
} | |
function Jc(a) { | |
try { | |
return decodeURIComponent(a) | |
} catch (b) {} | |
} | |
function Kc(a) { | |
var b = {}; | |
q((a || "").split("&"), function(a) { | |
var c, e, f; | |
a && (e = a = a.replace(/\+/g, "%20"), | |
c = a.indexOf("="), -1 !== c && (e = a.substring(0, c), f = a.substring(c + 1)), e = Jc(e), x(e) && (f = x(f) ? Jc(f) : !0, wa.call(b, e) ? L(b[e]) ? b[e].push(f) : b[e] = [b[e], f] : b[e] = f)) | |
}); | |
return b | |
} | |
function ac(a) { | |
var b = []; | |
q(a, function(a, d) { | |
L(a) ? q(a, function(a) { | |
b.push(pa(d, !0) + (!0 === a ? "" : "=" + pa(a, !0))) | |
}) : b.push(pa(d, !0) + (!0 === a ? "" : "=" + pa(a, !0))) | |
}); | |
return b.length ? b.join("&") : "" | |
} | |
function xb(a) { | |
return pa(a, !0).replace(/%26/gi, "&").replace(/%3D/gi, "=").replace(/%2B/gi, "+") | |
} | |
function pa(a, b) { | |
return encodeURIComponent(a).replace(/%40/gi, | |
"@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%3B/gi, ";").replace(/%20/g, b ? "%20" : "+") | |
} | |
function ue(a, b) { | |
var c, d, e = Na.length; | |
for (d = 0; d < e; ++d) | |
if (c = Na[d] + b, I(c = a.getAttribute(c))) return c; | |
return null | |
} | |
function ve(a, b) { | |
var c, d, e = {}; | |
q(Na, function(b) { | |
b += "app"; | |
!c && a.hasAttribute && a.hasAttribute(b) && (c = a, d = a.getAttribute(b)) | |
}); | |
q(Na, function(b) { | |
b += "app"; | |
var e; | |
!c && (e = a.querySelector("[" + b.replace(":", "\\:") + "]")) && (c = e, d = e.getAttribute(b)) | |
}); | |
c && (we ? (e.strictDi = null !== ue(c, "strict-di"), | |
b(c, d ? [d] : [], e)) : H.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.")) | |
} | |
function Lc(a, b, c) { | |
J(c) || (c = {}); | |
c = Q({ | |
strictDi: !1 | |
}, c); | |
var d = function() { | |
a = D(a); | |
if (a.injector()) { | |
var d = a[0] === H.document ? "document" : Aa(a); | |
throw za("btstrpd", d.replace(/</, "<").replace(/>/, ">")); | |
} | |
b = b || []; | |
b.unshift(["$provide", function(b) { | |
b.value("$rootElement", a) | |
}]); | |
c.debugInfoEnabled && b.push(["$compileProvider", function(a) { | |
a.debugInfoEnabled(!0) | |
}]); | |
b.unshift("ng"); | |
d = gb(b, c.strictDi); | |
d.invoke(["$rootScope", "$rootElement", "$compile", "$injector", function(a, b, c, d) { | |
a.$apply(function() { | |
b.data("$injector", d); | |
c(b)(a) | |
}) | |
}]); | |
return d | |
}, | |
e = /^NG_ENABLE_DEBUG_INFO!/, | |
f = /^NG_DEFER_BOOTSTRAP!/; | |
H && e.test(H.name) && (c.debugInfoEnabled = !0, H.name = H.name.replace(e, "")); | |
if (H && !f.test(H.name)) return d(); | |
H.name = H.name.replace(f, ""); | |
aa.resumeBootstrap = function(a) { | |
q(a, function(a) { | |
b.push(a) | |
}); | |
return d() | |
}; | |
A(aa.resumeDeferredBootstrap) && aa.resumeDeferredBootstrap() | |
} | |
function xe() { | |
H.name = | |
"NG_ENABLE_DEBUG_INFO!" + H.name; | |
H.location.reload() | |
} | |
function ye(a) { | |
a = aa.element(a).injector(); | |
if (!a) throw za("test"); | |
return a.get("$$testability") | |
} | |
function Mc(a, b) { | |
b = b || "_"; | |
return a.replace(ze, function(a, d) { | |
return (d ? b : "") + a.toLowerCase() | |
}) | |
} | |
function hb(a, b, c) { | |
if (!a) throw za("areq", b || "?", c || "required"); | |
return a | |
} | |
function Sa(a, b, c) { | |
c && L(a) && (a = a[a.length - 1]); | |
hb(A(a), b, "not a function, got " + (a && "object" === typeof a ? a.constructor.name || "Object" : typeof a)); | |
return a | |
} | |
function Ta(a, b) { | |
if ("hasOwnProperty" === | |
a) throw za("badname", b); | |
} | |
function Nc(a, b, c) { | |
if (!b) return a; | |
b = b.split("."); | |
for (var d, e = a, f = b.length, g = 0; g < f; g++) d = b[g], a && (a = (e = a)[d]); | |
return !c && A(a) ? eb(e, a) : a | |
} | |
function yb(a) { | |
for (var b = a[0], c = a[a.length - 1], d, e = 1; b !== c && (b = b.nextSibling); e++) | |
if (d || a[e] !== b) d || (d = D(xa.call(a, 0, e))), d.push(b); | |
return d || a | |
} | |
function T() { | |
return Object.create(null) | |
} | |
function Ae(a) { | |
function b(a, b, c) { | |
return a[b] || (a[b] = c()) | |
} | |
var c = N("$injector"), | |
d = N("ng"); | |
a = b(a, "angular", Object); | |
a.$$minErr = a.$$minErr || N; | |
return b(a, "module", function() { | |
var a = {}; | |
return function(e, g, h) { | |
if ("hasOwnProperty" === e) throw d("badname", "module"); | |
g && a.hasOwnProperty(e) && (a[e] = null); | |
return b(a, e, function() { | |
function a(a, b, c, e) { | |
e || (e = d); | |
return function() { | |
e[c || "push"]([a, b, arguments]); | |
return E | |
} | |
} | |
function b(a, b) { | |
return function(c, f) { | |
f && A(f) && (f.$$moduleName = e); | |
d.push([a, b, arguments]); | |
return E | |
} | |
} | |
if (!g) throw c("nomod", e); | |
var d = [], | |
f = [], | |
u = [], | |
r = a("$injector", "invoke", "push", f), | |
E = { | |
_invokeQueue: d, | |
_configBlocks: f, | |
_runBlocks: u, | |
requires: g, | |
name: e, | |
provider: b("$provide", "provider"), | |
factory: b("$provide", "factory"), | |
service: b("$provide", "service"), | |
value: a("$provide", "value"), | |
constant: a("$provide", "constant", "unshift"), | |
decorator: b("$provide", "decorator"), | |
animation: b("$animateProvider", "register"), | |
filter: b("$filterProvider", "register"), | |
controller: b("$controllerProvider", "register"), | |
directive: b("$compileProvider", "directive"), | |
component: b("$compileProvider", "component"), | |
config: r, | |
run: function(a) { | |
u.push(a); | |
return this | |
} | |
}; | |
h && r(h); | |
return E | |
}) | |
} | |
}) | |
} | |
function ma(a, b) { | |
if (L(a)) { | |
b = b || []; | |
for (var c = | |
0, d = a.length; c < d; c++) b[c] = a[c] | |
} else if (J(a)) | |
for (c in b = b || {}, a) | |
if ("$" !== c.charAt(0) || "$" !== c.charAt(1)) b[c] = a[c]; | |
return b || a | |
} | |
function ib(a) { | |
return a.replace(Be, function(a, c, d, e) { | |
return e ? d.toUpperCase() : d | |
}).replace(Ce, "Moz$1") | |
} | |
function Oc(a) { | |
a = a.nodeType; | |
return 1 === a || !a || 9 === a | |
} | |
function Pc(a, b) { | |
var c, d, e = b.createDocumentFragment(), | |
f = []; | |
if (bc.test(a)) { | |
c = e.appendChild(b.createElement("div")); | |
d = (De.exec(a) || ["", ""])[1].toLowerCase(); | |
d = qa[d] || qa._default; | |
c.innerHTML = d[1] + a.replace(Ee, "<$1></$2>") + d[2]; | |
for (d = d[0]; d--;) c = c.lastChild; | |
f = db(f, c.childNodes); | |
c = e.firstChild; | |
c.textContent = "" | |
} else f.push(b.createTextNode(a)); | |
e.textContent = ""; | |
e.innerHTML = ""; | |
q(f, function(a) { | |
e.appendChild(a) | |
}); | |
return e | |
} | |
function Qc(a, b) { | |
var c = a.parentNode; | |
c && c.replaceChild(b, a); | |
b.appendChild(a) | |
} | |
function U(a) { | |
if (a instanceof U) return a; | |
var b; | |
I(a) && (a = W(a), b = !0); | |
if (!(this instanceof U)) { | |
if (b && "<" !== a.charAt(0)) throw cc("nosel"); | |
return new U(a) | |
} | |
if (b) { | |
b = H.document; | |
var c; | |
a = (c = Fe.exec(a)) ? [b.createElement(c[1])] : (c = Pc(a, b)) ? c.childNodes : [] | |
} | |
Rc(this, a) | |
} | |
function dc(a) { | |
return a.cloneNode(!0) | |
} | |
function zb(a, b) { | |
b || jb(a); | |
if (a.querySelectorAll) | |
for (var c = a.querySelectorAll("*"), d = 0, e = c.length; d < e; d++) jb(c[d]) | |
} | |
function Sc(a, b, c, d) { | |
if (x(d)) throw cc("offargs"); | |
var e = (d = Ab(a)) && d.events, | |
f = d && d.handle; | |
if (f) | |
if (b) { | |
var g = function(b) { | |
var d = e[b]; | |
x(c) && cb(d || [], c); | |
x(c) && d && 0 < d.length || (a.removeEventListener(b, f, !1), delete e[b]) | |
}; | |
q(b.split(" "), function(a) { | |
g(a); | |
Bb[a] && g(Bb[a]) | |
}) | |
} else | |
for (b in e) "$destroy" !== b && a.removeEventListener(b, f, !1), delete e[b] | |
} | |
function jb(a, b) { | |
var c = a.ng339, | |
d = c && kb[c]; | |
d && (b ? delete d.data[b] : (d.handle && (d.events.$destroy && d.handle({}, "$destroy"), Sc(a)), delete kb[c], a.ng339 = void 0)) | |
} | |
function Ab(a, b) { | |
var c = a.ng339, | |
c = c && kb[c]; | |
b && !c && (a.ng339 = c = ++Ge, c = kb[c] = { | |
events: {}, | |
data: {}, | |
handle: void 0 | |
}); | |
return c | |
} | |
function ec(a, b, c) { | |
if (Oc(a)) { | |
var d = x(c), | |
e = !d && b && !J(b), | |
f = !b; | |
a = (a = Ab(a, !e)) && a.data; | |
if (d) a[b] = c; | |
else { | |
if (f) return a; | |
if (e) return a && a[b]; | |
Q(a, b) | |
} | |
} | |
} | |
function Cb(a, b) { | |
return a.getAttribute ? -1 < (" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, | |
" ").indexOf(" " + b + " ") : !1 | |
} | |
function Db(a, b) { | |
b && a.setAttribute && q(b.split(" "), function(b) { | |
a.setAttribute("class", W((" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " ").replace(" " + W(b) + " ", " "))) | |
}) | |
} | |
function Eb(a, b) { | |
if (b && a.setAttribute) { | |
var c = (" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " "); | |
q(b.split(" "), function(a) { | |
a = W(a); - 1 === c.indexOf(" " + a + " ") && (c += a + " ") | |
}); | |
a.setAttribute("class", W(c)) | |
} | |
} | |
function Rc(a, b) { | |
if (b) | |
if (b.nodeType) a[a.length++] = b; | |
else { | |
var c = b.length; | |
if ("number" === | |
typeof c && b.window !== b) { | |
if (c) | |
for (var d = 0; d < c; d++) a[a.length++] = b[d] | |
} else a[a.length++] = b | |
} | |
} | |
function Tc(a, b) { | |
return Fb(a, "$" + (b || "ngController") + "Controller") | |
} | |
function Fb(a, b, c) { | |
9 === a.nodeType && (a = a.documentElement); | |
for (b = L(b) ? b : [b]; a;) { | |
for (var d = 0, e = b.length; d < e; d++) | |
if (x(c = D.data(a, b[d]))) return c; | |
a = a.parentNode || 11 === a.nodeType && a.host | |
} | |
} | |
function Uc(a) { | |
for (zb(a, !0); a.firstChild;) a.removeChild(a.firstChild) | |
} | |
function Gb(a, b) { | |
b || zb(a); | |
var c = a.parentNode; | |
c && c.removeChild(a) | |
} | |
function He(a, b) { | |
b = b || H; | |
if ("complete" === | |
b.document.readyState) b.setTimeout(a); | |
else D(b).on("load", a) | |
} | |
function Vc(a, b) { | |
var c = Hb[b.toLowerCase()]; | |
return c && Wc[ya(a)] && c | |
} | |
function Ie(a, b) { | |
var c = function(c, e) { | |
c.isDefaultPrevented = function() { | |
return c.defaultPrevented | |
}; | |
var d = b[e || c.type], | |
g = d ? d.length : 0; | |
if (g) { | |
if (B(c.immediatePropagationStopped)) { | |
var h = c.stopImmediatePropagation; | |
c.stopImmediatePropagation = function() { | |
c.immediatePropagationStopped = !0; | |
c.stopPropagation && c.stopPropagation(); | |
h && h.call(c) | |
} | |
} | |
c.isImmediatePropagationStopped = function() { | |
return !0 === | |
c.immediatePropagationStopped | |
}; | |
var k = d.specialHandlerWrapper || Je; | |
1 < g && (d = ma(d)); | |
for (var l = 0; l < g; l++) c.isImmediatePropagationStopped() || k(a, c, d[l]) | |
} | |
}; | |
c.elem = a; | |
return c | |
} | |
function Je(a, b, c) { | |
c.call(a, b) | |
} | |
function Ke(a, b, c) { | |
var d = b.relatedTarget; | |
d && (d === a || Le.call(a, d)) || c.call(a, b) | |
} | |
function Me() { | |
this.$get = function() { | |
return Q(U, { | |
hasClass: function(a, b) { | |
a.attr && (a = a[0]); | |
return Cb(a, b) | |
}, | |
addClass: function(a, b) { | |
a.attr && (a = a[0]); | |
return Eb(a, b) | |
}, | |
removeClass: function(a, b) { | |
a.attr && (a = a[0]); | |
return Db(a, b) | |
} | |
}) | |
} | |
} | |
function Ja(a, | |
b) { | |
var c = a && a.$$hashKey; | |
if (c) return "function" === typeof c && (c = a.$$hashKey()), c; | |
c = typeof a; | |
return c = "function" === c || "object" === c && null !== a ? a.$$hashKey = c + ":" + (b || ne)() : c + ":" + a | |
} | |
function Ua(a, b) { | |
if (b) { | |
var c = 0; | |
this.nextUid = function() { | |
return ++c | |
} | |
} | |
q(a, this.put, this) | |
} | |
function Xc(a) { | |
a = (Function.prototype.toString.call(a) + " ").replace(Ne, ""); | |
return a.match(Oe) || a.match(Pe) | |
} | |
function Qe(a) { | |
return (a = Xc(a)) ? "function(" + (a[1] || "").replace(/[\s\r\n]+/, " ") + ")" : "fn" | |
} | |
function gb(a, b) { | |
function c(a) { | |
return function(b, | |
c) { | |
if (J(b)) q(b, Ec(a)); | |
else return a(b, c) | |
} | |
} | |
function d(a, b) { | |
Ta(a, "service"); | |
if (A(b) || L(b)) b = u.instantiate(b); | |
if (!b.$get) throw Ka("pget", a); | |
return p[a + "Provider"] = b | |
} | |
function e(a, b) { | |
return function() { | |
var c = w.invoke(b, this); | |
if (B(c)) throw Ka("undef", a); | |
return c | |
} | |
} | |
function f(a, b, c) { | |
return d(a, { | |
$get: !1 !== c ? e(a, b) : b | |
}) | |
} | |
function g(a) { | |
hb(B(a) || L(a), "modulesToLoad", "not an array"); | |
var b = [], | |
c; | |
q(a, function(a) { | |
function d(a) { | |
var b, c; | |
b = 0; | |
for (c = a.length; b < c; b++) { | |
var d = a[b], | |
e = u.get(d[0]); | |
e[d[1]].apply(e, d[2]) | |
} | |
} | |
if (!m.get(a)) { | |
m.put(a, !0); | |
try { | |
I(a) ? (c = fc(a), b = b.concat(g(c.requires)).concat(c._runBlocks), d(c._invokeQueue), d(c._configBlocks)) : A(a) ? b.push(u.invoke(a)) : L(a) ? b.push(u.invoke(a)) : Sa(a, "module") | |
} catch (F) { | |
throw L(a) && (a = a[a.length - 1]), F.message && F.stack && -1 === F.stack.indexOf(F.message) && (F = F.message + "\n" + F.stack), Ka("modulerr", a, F.stack || F.message || F); | |
} | |
} | |
}); | |
return b | |
} | |
function h(a, c) { | |
function d(b, d) { | |
if (a.hasOwnProperty(b)) { | |
if (a[b] === k) throw Ka("cdep", b + " <- " + l.join(" <- ")); | |
return a[b] | |
} | |
try { | |
return l.unshift(b), a[b] = k, a[b] = | |
c(b, d), a[b] | |
} catch (X) { | |
throw a[b] === k && delete a[b], X; | |
} finally { | |
l.shift() | |
} | |
} | |
function e(a, c, e) { | |
var f = []; | |
a = gb.$$annotate(a, b, e); | |
for (var g = 0, h = a.length; g < h; g++) { | |
var k = a[g]; | |
if ("string" !== typeof k) throw Ka("itkn", k); | |
f.push(c && c.hasOwnProperty(k) ? c[k] : d(k, e)) | |
} | |
return f | |
} | |
return { | |
invoke: function(a, b, c, d) { | |
"string" === typeof c && (d = c, c = null); | |
c = e(a, c, d); | |
L(a) && (a = a[a.length - 1]); | |
d = 11 >= Oa ? !1 : "function" === typeof a && /^(?:class\b|constructor\()/.test(Function.prototype.toString.call(a) + " "); | |
return d ? (c.unshift(null), new(Function.prototype.bind.apply(a, | |
c))) : a.apply(b, c) | |
}, | |
instantiate: function(a, b, c) { | |
var d = L(a) ? a[a.length - 1] : a; | |
a = e(a, b, c); | |
a.unshift(null); | |
return new(Function.prototype.bind.apply(d, a)) | |
}, | |
get: d, | |
annotate: gb.$$annotate, | |
has: function(b) { | |
return p.hasOwnProperty(b + "Provider") || a.hasOwnProperty(b) | |
} | |
} | |
} | |
b = !0 === b; | |
var k = {}, | |
l = [], | |
m = new Ua([], !0), | |
p = { | |
$provide: { | |
provider: c(d), | |
factory: c(f), | |
service: c(function(a, b) { | |
return f(a, ["$injector", function(a) { | |
return a.instantiate(b) | |
}]) | |
}), | |
value: c(function(a, b) { | |
return f(a, ha(b), !1) | |
}), | |
constant: c(function(a, b) { | |
Ta(a, "constant"); | |
p[a] = b; | |
r[a] = b | |
}), | |
decorator: function(a, b) { | |
var c = u.get(a + "Provider"), | |
d = c.$get; | |
c.$get = function() { | |
var a = w.invoke(d, c); | |
return w.invoke(b, null, { | |
$delegate: a | |
}) | |
} | |
} | |
} | |
}, | |
u = p.$injector = h(p, function(a, b) { | |
aa.isString(b) && l.push(b); | |
throw Ka("unpr", l.join(" <- ")); | |
}), | |
r = {}, | |
E = h(r, function(a, b) { | |
var c = u.get(a + "Provider", b); | |
return w.invoke(c.$get, c, void 0, a) | |
}), | |
w = E; | |
p.$injectorProvider = { | |
$get: ha(E) | |
}; | |
var n = g(a), | |
w = E.get("$injector"); | |
w.strictDi = b; | |
q(n, function(a) { | |
a && w.invoke(a) | |
}); | |
return w | |
} | |
function Re() { | |
var a = !0; | |
this.disableAutoScrolling = | |
function() { | |
a = !1 | |
}; | |
this.$get = ["$window", "$location", "$rootScope", function(b, c, d) { | |
function e(a) { | |
var b = null; | |
Array.prototype.some.call(a, function(a) { | |
if ("a" === ya(a)) return b = a, !0 | |
}); | |
return b | |
} | |
function f(a) { | |
if (a) { | |
a.scrollIntoView(); | |
var c; | |
c = g.yOffset; | |
A(c) ? c = c() : Yb(c) ? (c = c[0], c = "fixed" !== b.getComputedStyle(c).position ? 0 : c.getBoundingClientRect().bottom) : ca(c) || (c = 0); | |
c && (a = a.getBoundingClientRect().top, b.scrollBy(0, a - c)) | |
} else b.scrollTo(0, 0) | |
} | |
function g(a) { | |
a = I(a) ? a : ca(a) ? a.toString() : c.hash(); | |
var b; | |
a ? (b = h.getElementById(a)) ? | |
f(b) : (b = e(h.getElementsByName(a))) ? f(b) : "top" === a && f(null) : f(null) | |
} | |
var h = b.document; | |
a && d.$watch(function() { | |
return c.hash() | |
}, function(a, b) { | |
a === b && "" === a || He(function() { | |
d.$evalAsync(g) | |
}) | |
}); | |
return g | |
}] | |
} | |
function lb(a, b) { | |
if (!a && !b) return ""; | |
if (!a) return b; | |
if (!b) return a; | |
L(a) && (a = a.join(" ")); | |
L(b) && (b = b.join(" ")); | |
return a + " " + b | |
} | |
function Se(a) { | |
I(a) && (a = a.split(" ")); | |
var b = T(); | |
q(a, function(a) { | |
a.length && (b[a] = !0) | |
}); | |
return b | |
} | |
function Ba(a) { | |
return J(a) ? a : {} | |
} | |
function Te(a, b, c, d) { | |
function e(a) { | |
try { | |
a.apply(null, | |
xa.call(arguments, 1)) | |
} finally { | |
if (E--, 0 === E) | |
for (; w.length;) try { | |
w.pop()() | |
} catch (R) { | |
c.error(R) | |
} | |
} | |
} | |
function f() { | |
z = null; | |
g(); | |
h() | |
} | |
function g() { | |
n = P(); | |
n = B(n) ? null : n; | |
oa(n, M) && (n = M); | |
M = n | |
} | |
function h() { | |
if (y !== k.url() || K !== n) y = k.url(), K = n, q(F, function(a) { | |
a(k.url(), n) | |
}) | |
} | |
var k = this, | |
l = a.location, | |
m = a.history, | |
p = a.setTimeout, | |
u = a.clearTimeout, | |
r = {}; | |
k.isMock = !1; | |
var E = 0, | |
w = []; | |
k.$$completeOutstandingRequest = e; | |
k.$$incOutstandingRequestCount = function() { | |
E++ | |
}; | |
k.notifyWhenNoOutstandingRequests = function(a) { | |
0 === E ? a() : w.push(a) | |
}; | |
var n, | |
K, y = l.href, | |
C = b.find("base"), | |
z = null, | |
P = d.history ? function() { | |
try { | |
return m.state | |
} catch (O) {} | |
} : G; | |
g(); | |
K = n; | |
k.url = function(b, c, e) { | |
B(e) && (e = null); | |
l !== a.location && (l = a.location); | |
m !== a.history && (m = a.history); | |
if (b) { | |
var f = K === e; | |
if (y === b && (!d.history || f)) return k; | |
var h = y && ia(y) === ia(b); | |
y = b; | |
K = e; | |
!d.history || h && f ? (h || (z = b), c ? l.replace(b) : h ? (c = l, e = b.indexOf("#"), e = -1 === e ? "" : b.substr(e), c.hash = e) : l.href = b, l.href !== b && (z = b)) : (m[c ? "replaceState" : "pushState"](e, "", b), g(), K = n); | |
z && (z = b); | |
return k | |
} | |
return z || l.href.replace(/%27/g, | |
"'") | |
}; | |
k.state = function() { | |
return n | |
}; | |
var F = [], | |
X = !1, | |
M = null; | |
k.onUrlChange = function(b) { | |
if (!X) { | |
if (d.history) D(a).on("popstate", f); | |
D(a).on("hashchange", f); | |
X = !0 | |
} | |
F.push(b); | |
return b | |
}; | |
k.$$applicationDestroyed = function() { | |
D(a).off("hashchange popstate", f) | |
}; | |
k.$$checkUrlChange = h; | |
k.baseHref = function() { | |
var a = C.attr("href"); | |
return a ? a.replace(/^(https?:)?\/\/[^/]*/, "") : "" | |
}; | |
k.defer = function(a, b) { | |
var c; | |
E++; | |
c = p(function() { | |
delete r[c]; | |
e(a) | |
}, b || 0); | |
r[c] = !0; | |
return c | |
}; | |
k.defer.cancel = function(a) { | |
return r[a] ? (delete r[a], u(a), | |
e(G), !0) : !1 | |
} | |
} | |
function Ue() { | |
this.$get = ["$window", "$log", "$sniffer", "$document", function(a, b, c, d) { | |
return new Te(a, d, b, c) | |
}] | |
} | |
function Ve() { | |
this.$get = function() { | |
function a(a, d) { | |
function c(a) { | |
a !== p && (u ? u === a && (u = a.n) : u = a, f(a.n, a.p), f(a, p), p = a, p.n = null) | |
} | |
function f(a, b) { | |
a !== b && (a && (a.p = b), b && (b.n = a)) | |
} | |
if (a in b) throw N("$cacheFactory")("iid", a); | |
var g = 0, | |
h = Q({}, d, { | |
id: a | |
}), | |
k = T(), | |
l = d && d.capacity || Number.MAX_VALUE, | |
m = T(), | |
p = null, | |
u = null; | |
return b[a] = { | |
put: function(a, b) { | |
if (!B(b)) { | |
if (l < Number.MAX_VALUE) { | |
var d = m[a] || (m[a] = { | |
key: a | |
}); | |
c(d) | |
} | |
a in k || g++; | |
k[a] = b; | |
g > l && this.remove(u.key); | |
return b | |
} | |
}, | |
get: function(a) { | |
if (l < Number.MAX_VALUE) { | |
var b = m[a]; | |
if (!b) return; | |
c(b) | |
} | |
return k[a] | |
}, | |
remove: function(a) { | |
if (l < Number.MAX_VALUE) { | |
var b = m[a]; | |
if (!b) return; | |
b === p && (p = b.p); | |
b === u && (u = b.n); | |
f(b.n, b.p); | |
delete m[a] | |
} | |
a in k && (delete k[a], g--) | |
}, | |
removeAll: function() { | |
k = T(); | |
g = 0; | |
m = T(); | |
p = u = null | |
}, | |
destroy: function() { | |
m = h = k = null; | |
delete b[a] | |
}, | |
info: function() { | |
return Q({}, h, { | |
size: g | |
}) | |
} | |
} | |
} | |
var b = {}; | |
a.info = function() { | |
var a = {}; | |
q(b, function(b, c) { | |
a[c] = b.info() | |
}); | |
return a | |
}; | |
a.get = function(a) { | |
return b[a] | |
}; | |
return a | |
} | |
} | |
function We() { | |
this.$get = ["$cacheFactory", function(a) { | |
return a("templates") | |
}] | |
} | |
function Yc(a, b) { | |
function c(a, b, c) { | |
var d = /^\s*([@&<]|=(\*?))(\??)\s*([\w$]*)\s*$/, | |
e = T(); | |
q(a, function(a, f) { | |
if (a in p) e[f] = p[a]; | |
else { | |
var g = a.match(d); | |
if (!g) throw da("iscp", b, f, a, c ? "controller bindings definition" : "isolate scope definition"); | |
e[f] = { | |
mode: g[1][0], | |
collection: "*" === g[2], | |
optional: "?" === g[3], | |
attrName: g[4] || f | |
}; | |
g[4] && (p[a] = e[f]) | |
} | |
}); | |
return e | |
} | |
function d(a) { | |
var b = a.charAt(0); | |
if (!b || | |
b !== S(b)) throw da("baddir", a); | |
if (a !== a.trim()) throw da("baddir", a); | |
} | |
function e(a) { | |
var b = a.require || a.controller && a.name; | |
!L(b) && J(b) && q(b, function(a, c) { | |
var d = a.match(l); | |
a.substring(d[0].length) || (b[c] = d[0] + c) | |
}); | |
return b | |
} | |
var f = {}, | |
g = /^\s*directive:\s*([\w-]+)\s+(.*)$/, | |
h = /(([\w-]+)(?::([^;]+))?;?)/, | |
k = re("ngSrc,ngSrcset,src,srcset"), | |
l = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/, | |
m = /^(on[a-z]+|formaction)$/, | |
p = T(); | |
this.directive = function y(b, c) { | |
hb(b, "name"); | |
Ta(b, "directive"); | |
I(b) ? (d(b), hb(c, "directiveFactory"), f.hasOwnProperty(b) || | |
(f[b] = [], a.factory(b + "Directive", ["$injector", "$exceptionHandler", function(a, c) { | |
var d = []; | |
q(f[b], function(f, g) { | |
try { | |
var h = a.invoke(f); | |
A(h) ? h = { | |
compile: ha(h) | |
} : !h.compile && h.link && (h.compile = ha(h.link)); | |
h.priority = h.priority || 0; | |
h.index = g; | |
h.name = h.name || b; | |
h.require = e(h); | |
var k = h, | |
l = h.restrict; | |
if (l && (!I(l) || !/[EACM]/.test(l))) throw da("badrestrict", l, b); | |
k.restrict = l || "EA"; | |
h.$$moduleName = f.$$moduleName; | |
d.push(h) | |
} catch (Ca) { | |
c(Ca) | |
} | |
}); | |
return d | |
}])), f[b].push(c)) : q(b, Ec(y)); | |
return this | |
}; | |
this.component = function(a, | |
b) { | |
function c(a) { | |
function c(b) { | |
return A(b) || L(b) ? function(c, d) { | |
return a.invoke(b, this, { | |
$element: c, | |
$attrs: d | |
}) | |
} : b | |
} | |
var e = b.template || b.templateUrl ? b.template : "", | |
f = { | |
controller: d, | |
controllerAs: Xe(b.controller) || b.controllerAs || "$ctrl", | |
template: c(e), | |
templateUrl: c(b.templateUrl), | |
transclude: b.transclude, | |
scope: {}, | |
bindToController: b.bindings || {}, | |
restrict: "E", | |
require: b.require | |
}; | |
q(b, function(a, b) { | |
"$" === b.charAt(0) && (f[b] = a) | |
}); | |
return f | |
} | |
var d = b.controller || function() {}; | |
q(b, function(a, b) { | |
"$" === b.charAt(0) && (c[b] = | |
a, A(d) && (d[b] = a)) | |
}); | |
c.$inject = ["$injector"]; | |
return this.directive(a, c) | |
}; | |
this.aHrefSanitizationWhitelist = function(a) { | |
return x(a) ? (b.aHrefSanitizationWhitelist(a), this) : b.aHrefSanitizationWhitelist() | |
}; | |
this.imgSrcSanitizationWhitelist = function(a) { | |
return x(a) ? (b.imgSrcSanitizationWhitelist(a), this) : b.imgSrcSanitizationWhitelist() | |
}; | |
var u = !0; | |
this.debugInfoEnabled = function(a) { | |
return x(a) ? (u = a, this) : u | |
}; | |
var r = !0; | |
this.preAssignBindingsEnabled = function(a) { | |
return x(a) ? (r = a, this) : r | |
}; | |
var E = 10; | |
this.onChangesTtl = | |
function(a) { | |
return arguments.length ? (E = a, this) : E | |
}; | |
var w = !0; | |
this.commentDirectivesEnabled = function(a) { | |
return arguments.length ? (w = a, this) : w | |
}; | |
var n = !0; | |
this.cssClassDirectivesEnabled = function(a) { | |
return arguments.length ? (n = a, this) : n | |
}; | |
this.$get = ["$injector", "$interpolate", "$exceptionHandler", "$templateRequest", "$parse", "$controller", "$rootScope", "$sce", "$animate", "$$sanitizeUri", function(a, b, d, e, p, X, M, O, R, v) { | |
function y() { | |
try { | |
if (!--Ba) throw ia = void 0, da("infchng", E); | |
M.$apply(function() { | |
for (var a = [], b = 0, | |
c = ia.length; b < c; ++b) try { | |
ia[b]() | |
} catch (Pa) { | |
a.push(Pa) | |
} | |
ia = void 0; | |
if (a.length) throw a; | |
}) | |
} finally { | |
Ba++ | |
} | |
} | |
function F(a, b) { | |
if (b) { | |
var c = Object.keys(b), | |
d, e, f; | |
d = 0; | |
for (e = c.length; d < e; d++) f = c[d], this[f] = b[f] | |
} else this.$attr = {}; | |
this.$$element = a | |
} | |
function C(a, b, c) { | |
za.innerHTML = "<span " + b + ">"; | |
b = za.firstChild.attributes; | |
var d = b[0]; | |
b.removeNamedItem(d.name); | |
d.value = c; | |
a.attributes.setNamedItem(d) | |
} | |
function z(a, b) { | |
try { | |
a.addClass(b) | |
} catch (mb) {} | |
} | |
function P(a, b, c, d, e) { | |
a instanceof D || (a = D(a)); | |
for (var f = /\S+/, g = 0, h = a.length; g < | |
h; g++) { | |
var k = a[g]; | |
k.nodeType === Ra && k.nodeValue.match(f) && Qc(k, a[g] = H.document.createElement("span")) | |
} | |
var l = t(a, b, a, c, d, e); | |
P.$$addScopeClass(a); | |
var m = null; | |
return function(b, c, d) { | |
hb(b, "scope"); | |
e && e.needsNewScope && (b = b.$parent.$new()); | |
d = d || {}; | |
var f = d.parentBoundTranscludeFn, | |
g = d.transcludeControllers; | |
d = d.futureParentElement; | |
f && f.$$boundTransclude && (f = f.$$boundTransclude); | |
m || (m = (d = d && d[0]) ? "foreignobject" !== ya(d) && na.call(d).match(/SVG/) ? "svg" : "html" : "html"); | |
d = "html" !== m ? D(ha(m, D("<div>").append(a).html())) : | |
c ? Va.clone.call(a) : a; | |
if (g) | |
for (var h in g) d.data("$" + h + "Controller", g[h].instance); | |
P.$$addScopeInfo(d, b); | |
c && c(d, b); | |
l && l(b, d, d, f); | |
return d | |
} | |
} | |
function t(a, b, c, d, e, f) { | |
function g(a, c, d, e) { | |
var f, g, k, l, m, p, r; | |
if (n) | |
for (r = Array(c.length), l = 0; l < h.length; l += 3) f = h[l], r[f] = c[f]; | |
else r = c; | |
l = 0; | |
for (m = h.length; l < m;) g = r[h[l++]], c = h[l++], f = h[l++], c ? (c.scope ? (k = a.$new(), P.$$addScopeInfo(D(g), k)) : k = a, p = c.transcludeOnThisElement ? va(a, c.transclude, e) : !c.templateOnThisElement && e ? e : !e && b ? va(a, b) : null, c(f, k, g, d, p)) : f && f(a, g.childNodes, | |
void 0, e) | |
} | |
for (var h = [], k, l, m, p, n, r = 0; r < a.length; r++) { | |
k = new F; | |
l = N(a[r], [], k, 0 === r ? d : void 0, e); | |
(f = l.length ? U(l, a[r], k, b, c, null, [], [], f) : null) && f.scope && P.$$addScopeClass(k.$$element); | |
k = f && f.terminal || !(m = a[r].childNodes) || !m.length ? null : t(m, f ? (f.transcludeOnThisElement || !f.templateOnThisElement) && f.transclude : b); | |
if (f || k) h.push(r, f, k), p = !0, n = n || f; | |
f = null | |
} | |
return p ? g : null | |
} | |
function va(a, b, c) { | |
function d(d, e, f, g, h) { | |
d || (d = a.$new(!1, h), d.$$transcluded = !0); | |
return b(d, e, { | |
parentBoundTranscludeFn: c, | |
transcludeControllers: f, | |
futureParentElement: g | |
}) | |
} | |
var e = d.$$slots = T(), | |
f; | |
for (f in b.$$slots) e[f] = b.$$slots[f] ? va(a, b.$$slots[f], c) : null; | |
return d | |
} | |
function N(a, b, c, d, e) { | |
var f = c.$attr, | |
g; | |
switch (a.nodeType) { | |
case 1: | |
g = ya(a); | |
Z(b, Ea(g), "E", d, e); | |
for (var k, l, m, p, n = a.attributes, r = 0, y = n && n.length; r < y; r++) { | |
var F = !1, | |
u = !1; | |
k = n[r]; | |
l = k.name; | |
m = W(k.value); | |
k = Ea(l); | |
(p = Ma.test(k)) && (l = l.replace(Zc, "").substr(8).replace(/_(.)/g, function(a, b) { | |
return b.toUpperCase() | |
})); | |
(k = k.match(Na)) && ga(k[1]) && (F = l, u = l.substr(0, l.length - 5) + "end", l = l.substr(0, l.length - | |
6)); | |
k = Ea(l.toLowerCase()); | |
f[k] = l; | |
if (p || !c.hasOwnProperty(k)) c[k] = m, Vc(a, k) && (c[k] = !0); | |
qa(a, b, m, k, p); | |
Z(b, k, "A", d, e, F, u) | |
} | |
"input" === g && "hidden" === a.getAttribute("type") && a.setAttribute("autocomplete", "off"); | |
if (!Ka) break; | |
f = a.className; | |
J(f) && (f = f.animVal); | |
if (I(f) && "" !== f) | |
for (; a = h.exec(f);) k = Ea(a[2]), Z(b, k, "C", d, e) && (c[k] = W(a[3])), f = f.substr(a.index + a[0].length); | |
break; | |
case Ra: | |
if (11 === Oa) | |
for (; a.parentNode && a.nextSibling && a.nextSibling.nodeType === Ra;) a.nodeValue += a.nextSibling.nodeValue, a.parentNode.removeChild(a.nextSibling); | |
ma(b, a.nodeValue); | |
break; | |
case 8: | |
Ja && af(a, b, c, d, e) | |
} | |
b.sort(la); | |
return b | |
} | |
function af(a, b, c, d, e) { | |
try { | |
var f = g.exec(a.nodeValue); | |
if (f) { | |
var h = Ea(f[1]); | |
Z(b, h, "M", d, e) && (c[h] = W(f[2])) | |
} | |
} catch (Jb) {} | |
} | |
function $c(a, b, c) { | |
var d = [], | |
e = 0; | |
if (b && a.hasAttribute && a.hasAttribute(b)) { | |
do { | |
if (!a) throw da("uterdir", b, c); | |
1 === a.nodeType && (a.hasAttribute(b) && e++, a.hasAttribute(c) && e--); | |
d.push(a); | |
a = a.nextSibling | |
} while (0 < e) | |
} else d.push(a); | |
return D(d) | |
} | |
function ad(a, b, c) { | |
return function(d, e, f, g, h) { | |
e = $c(e[0], b, c); | |
return a(d, e, f, g, h) | |
} | |
} | |
function hc(a, b, c, d, e, f) { | |
var g; | |
return a ? P(b, c, d, e, f) : function() { | |
g || (g = P(b, c, d, e, f), b = c = f = null); | |
return g.apply(this, arguments) | |
} | |
} | |
function U(a, b, c, e, f, g, h, k, l) { | |
function m(a, b, c, d) { | |
if (a) { | |
c && (a = ad(a, c, d)); | |
a.require = v.require; | |
a.directiveName = z; | |
if (w === v || v.$$isolateScope) a = sa(a, { | |
isolateScope: !0 | |
}); | |
h.push(a) | |
} | |
if (b) { | |
c && (b = ad(b, c, d)); | |
b.require = v.require; | |
b.directiveName = z; | |
if (w === v || v.$$isolateScope) b = sa(b, { | |
isolateScope: !0 | |
}); | |
k.push(b) | |
} | |
} | |
function p(a, e, f, g, l) { | |
function m(a, b, c, d) { | |
var e; | |
bb(a) || (d = c, c = b, b = a, a = void 0); | |
E && (e = M); | |
c || (c = E ? z.parent() : z); | |
if (d) { | |
var f = l.$$slots[d]; | |
if (f) return f(a, b, e, c, ua); | |
if (B(f)) throw da("noslot", d, Aa(z)); | |
} else return l(a, b, e, c, ua) | |
} | |
var p, n, v, C, R, M, O, z; | |
b === f ? (g = c, z = c.$$element) : (z = D(f), g = new F(z, c)); | |
R = e; | |
w ? C = e.$new(!0) : y && (R = e.$parent); | |
l && (O = m, O.$$boundTransclude = l, O.isSlotFilled = function(a) { | |
return !!l.$$slots[a] | |
}); | |
u && (M = ca(z, g, O, u, C, e, w)); | |
w && (P.$$addScopeInfo(z, C, !0, !(X && (X === w || X === w.$$originalDirective))), P.$$addScopeClass(z, !0), C.$$isolateBindings = w.$$isolateBindings, n = ra(e, g, C, C.$$isolateBindings, | |
w), n.removeWatches && C.$on("$destroy", n.removeWatches)); | |
for (p in M) { | |
n = u[p]; | |
v = M[p]; | |
var ea = n.$$bindings.bindToController; | |
if (r) { | |
v.bindingInfo = ea ? ra(R, g, v.instance, ea, n) : {}; | |
var Da = v(); | |
Da !== v.instance && (v.instance = Da, z.data("$" + n.name + "Controller", Da), v.bindingInfo.removeWatches && v.bindingInfo.removeWatches(), v.bindingInfo = ra(R, g, v.instance, ea, n)) | |
} else v.instance = v(), z.data("$" + n.name + "Controller", v.instance), v.bindingInfo = ra(R, g, v.instance, ea, n) | |
} | |
q(u, function(a, b) { | |
var c = a.require; | |
a.bindToController && !L(c) && | |
J(c) && Q(M[b].instance, V(b, c, z, M)) | |
}); | |
q(M, function(a) { | |
var b = a.instance; | |
if (A(b.$onChanges)) try { | |
b.$onChanges(a.bindingInfo.initialChanges) | |
} catch (ic) { | |
d(ic) | |
} | |
if (A(b.$onInit)) try { | |
b.$onInit() | |
} catch (ic) { | |
d(ic) | |
} | |
A(b.$doCheck) && (R.$watch(function() { | |
b.$doCheck() | |
}), b.$doCheck()); | |
A(b.$onDestroy) && R.$on("$destroy", function() { | |
b.$onDestroy() | |
}) | |
}); | |
p = 0; | |
for (n = h.length; p < n; p++) v = h[p], ta(v, v.isolateScope ? C : e, z, g, v.require && V(v.directiveName, v.require, z, M), O); | |
var ua = e; | |
w && (w.template || null === w.templateUrl) && (ua = C); | |
a && a(ua, f.childNodes, | |
void 0, l); | |
for (p = k.length - 1; 0 <= p; p--) v = k[p], ta(v, v.isolateScope ? C : e, z, g, v.require && V(v.directiveName, v.require, z, M), O); | |
q(M, function(a) { | |
a = a.instance; | |
A(a.$postLink) && a.$postLink() | |
}) | |
} | |
l = l || {}; | |
for (var n = -Number.MAX_VALUE, y = l.newScopeDirective, u = l.controllerDirectives, w = l.newIsolateScopeDirective, X = l.templateDirective, R = l.nonTlbTranscludeDirective, M = !1, O = !1, E = l.hasElementTranscludeDirective, C = c.$$element = D(b), v, z, ea, Da = e, ua, t = !1, mb = !1, Y, Ca = 0, Pa = a.length; Ca < Pa; Ca++) { | |
v = a[Ca]; | |
var x = v.$$start, | |
gc = v.$$end; | |
x && | |
(C = $c(b, x, gc)); | |
ea = void 0; | |
if (n > v.priority) break; | |
if (Y = v.scope) v.templateUrl || (J(Y) ? (aa("new/isolated scope", w || y, v, C), w = v) : aa("new/isolated scope", w, v, C)), y = y || v; | |
z = v.name; | |
if (!t && (v.replace && (v.templateUrl || v.template) || v.transclude && !v.$$tlb)) { | |
for (Y = Ca + 1; t = a[Y++];) | |
if (t.transclude && !t.$$tlb || t.replace && (t.templateUrl || t.template)) { | |
mb = !0; | |
break | |
} | |
t = !0 | |
}!v.templateUrl && v.controller && (u = u || T(), aa("'" + z + "' controller", u[z], v, C), u[z] = v); | |
if (Y = v.transclude) | |
if (M = !0, v.$$tlb || (aa("transclusion", R, v, C), R = v), "element" === | |
Y) E = !0, n = v.priority, ea = C, C = c.$$element = D(P.$$createComment(z, c[z])), b = C[0], ja(f, xa.call(ea, 0), b), ea[0].$$parentNode = ea[0].parentNode, Da = hc(mb, ea, e, n, g && g.name, { | |
nonTlbTranscludeDirective: R | |
}); | |
else { | |
var La = T(); | |
ea = D(dc(b)).contents(); | |
if (J(Y)) { | |
ea = []; | |
var Ib = T(), | |
G = T(); | |
q(Y, function(a, b) { | |
var c = "?" === a.charAt(0); | |
a = c ? a.substring(1) : a; | |
Ib[a] = b; | |
La[b] = null; | |
G[b] = c | |
}); | |
q(C.contents(), function(a) { | |
var b = Ib[Ea(ya(a))]; | |
b ? (G[b] = !0, La[b] = La[b] || [], La[b].push(a)) : ea.push(a) | |
}); | |
q(G, function(a, b) { | |
if (!a) throw da("reqslot", b); | |
}); | |
for (var H in La) La[H] && (La[H] = hc(mb, La[H], e)) | |
} | |
C.empty(); | |
Da = hc(mb, ea, e, void 0, void 0, { | |
needsNewScope: v.$$isolateScope || v.$$newScope | |
}); | |
Da.$$slots = La | |
} | |
if (v.template) | |
if (O = !0, aa("template", X, v, C), X = v, Y = A(v.template) ? v.template(C, c) : v.template, Y = Ha(Y), v.replace) { | |
g = v; | |
ea = bc.test(Y) ? bd(ha(v.templateNamespace, W(Y))) : []; | |
b = ea[0]; | |
if (1 !== ea.length || 1 !== b.nodeType) throw da("tplrt", z, ""); | |
ja(f, C, b); | |
Pa = { | |
$attr: {} | |
}; | |
Y = N(b, [], Pa); | |
var I = a.splice(Ca + 1, a.length - (Ca + 1)); | |
(w || y) && ba(Y, w, y); | |
a = a.concat(Y).concat(I); | |
fa(c, Pa); | |
Pa = | |
a.length | |
} else C.html(Y); | |
if (v.templateUrl) O = !0, aa("template", X, v, C), X = v, v.replace && (g = v), p = ka(a.splice(Ca, a.length - Ca), C, c, f, M && Da, h, k, { | |
controllerDirectives: u, | |
newScopeDirective: y !== v && y, | |
newIsolateScopeDirective: w, | |
templateDirective: X, | |
nonTlbTranscludeDirective: R | |
}), Pa = a.length; | |
else if (v.compile) try { | |
ua = v.compile(C, c, Da); | |
var Jb = v.$$originalDirective || v; | |
A(ua) ? m(null, eb(Jb, ua), x, gc) : ua && m(eb(Jb, ua.pre), eb(Jb, ua.post), x, gc) | |
} catch (bf) { | |
d(bf, Aa(C)) | |
} | |
v.terminal && (p.terminal = !0, n = Math.max(n, v.priority)) | |
} | |
p.scope = | |
y && !0 === y.scope; | |
p.transcludeOnThisElement = M; | |
p.templateOnThisElement = O; | |
p.transclude = Da; | |
l.hasElementTranscludeDirective = E; | |
return p | |
} | |
function V(a, b, c, d) { | |
var e; | |
if (I(b)) { | |
var f = b.match(l); | |
b = b.substring(f[0].length); | |
var g = f[1] || f[3], | |
f = "?" === f[2]; | |
"^^" === g ? c = c.parent() : e = (e = d && d[b]) && e.instance; | |
if (!e) { | |
var h = "$" + b + "Controller"; | |
e = g ? c.inheritedData(h) : c.data(h) | |
} | |
if (!e && !f) throw da("ctreq", b, a); | |
} else if (L(b)) | |
for (e = [], g = 0, f = b.length; g < f; g++) e[g] = V(a, b[g], c, d); | |
else J(b) && (e = {}, q(b, function(b, f) { | |
e[f] = V(a, b, c, d) | |
})); | |
return e || null | |
} | |
function ca(a, b, c, d, e, f, g) { | |
var h = T(), | |
k; | |
for (k in d) { | |
var l = d[k], | |
m = { | |
$scope: l === g || l.$$isolateScope ? e : f, | |
$element: a, | |
$attrs: b, | |
$transclude: c | |
}, | |
p = l.controller; | |
"@" === p && (p = b[l.name]); | |
m = X(p, m, !0, l.controllerAs); | |
h[l.name] = m; | |
a.data("$" + l.name + "Controller", m.instance) | |
} | |
return h | |
} | |
function ba(a, b, c) { | |
for (var d = 0, e = a.length; d < e; d++) a[d] = Zb(a[d], { | |
$$isolateScope: b, | |
$$newScope: c | |
}) | |
} | |
function Z(b, d, e, g, h, k, l) { | |
if (d === h) return null; | |
var m = null; | |
if (f.hasOwnProperty(d)) { | |
h = a.get(d + "Directive"); | |
for (var p = 0, n = h.length; p < | |
n; p++) | |
if (d = h[p], (B(g) || g > d.priority) && -1 !== d.restrict.indexOf(e)) { | |
k && (d = Zb(d, { | |
$$start: k, | |
$$end: l | |
})); | |
if (!d.$$bindings) { | |
var r = m = d, | |
y = d.name, | |
v = { | |
isolateScope: null, | |
bindToController: null | |
}; | |
J(r.scope) && (!0 === r.bindToController ? (v.bindToController = c(r.scope, y, !0), v.isolateScope = {}) : v.isolateScope = c(r.scope, y, !1)); | |
J(r.bindToController) && (v.bindToController = c(r.bindToController, y, !0)); | |
if (v.bindToController && !r.controller) throw da("noctrl", y); | |
m = m.$$bindings = v; | |
J(m.isolateScope) && (d.$$isolateBindings = m.isolateScope) | |
} | |
b.push(d); | |
m = d | |
} | |
} | |
return m | |
} | |
function ga(b) { | |
if (f.hasOwnProperty(b)) | |
for (var c = a.get(b + "Directive"), d = 0, e = c.length; d < e; d++) | |
if (b = c[d], b.multiElement) return !0; | |
return !1 | |
} | |
function fa(a, b) { | |
var c = b.$attr, | |
d = a.$attr; | |
q(a, function(d, e) { | |
"$" !== e.charAt(0) && (b[e] && b[e] !== d && (d += ("style" === e ? ";" : " ") + b[e]), a.$set(e, d, !0, c[e])) | |
}); | |
q(b, function(b, e) { | |
a.hasOwnProperty(e) || "$" === e.charAt(0) || (a[e] = b, "class" !== e && "style" !== e && (d[e] = c[e])) | |
}) | |
} | |
function ka(a, b, c, d, f, g, h, k) { | |
var l = [], | |
m, p, n = b[0], | |
r = a.shift(), | |
y = Zb(r, { | |
templateUrl: null, | |
transclude: null, | |
replace: null, | |
$$originalDirective: r | |
}), | |
v = A(r.templateUrl) ? r.templateUrl(b, c) : r.templateUrl, | |
u = r.templateNamespace; | |
b.empty(); | |
e(v).then(function(e) { | |
var F, w; | |
e = Ha(e); | |
if (r.replace) { | |
e = bc.test(e) ? bd(ha(u, W(e))) : []; | |
F = e[0]; | |
if (1 !== e.length || 1 !== F.nodeType) throw da("tplrt", r.name, v); | |
e = { | |
$attr: {} | |
}; | |
ja(d, b, F); | |
var C = N(F, [], e); | |
J(r.scope) && ba(C, !0); | |
a = C.concat(a); | |
fa(c, e) | |
} else F = n, b.html(e); | |
a.unshift(y); | |
m = U(a, F, c, f, b, r, g, h, k); | |
q(d, function(a, c) { | |
a === F && (d[c] = b[0]) | |
}); | |
for (p = t(b[0].childNodes, f); l.length;) { | |
e = l.shift(); | |
w = l.shift(); | |
var R = l.shift(), | |
M = l.shift(), | |
C = b[0]; | |
if (!e.$$destroyed) { | |
if (w !== n) { | |
var X = w.className; | |
k.hasElementTranscludeDirective && r.replace || (C = dc(F)); | |
ja(R, D(w), C); | |
z(D(C), X) | |
} | |
w = m.transcludeOnThisElement ? va(e, m.transclude, M) : M; | |
m(p, e, C, d, w) | |
} | |
} | |
l = null | |
}); | |
return function(a, b, c, d, e) { | |
a = e; | |
b.$$destroyed || (l ? l.push(b, c, d, a) : (m.transcludeOnThisElement && (a = va(b, m.transclude, e)), m(p, b, c, d, a))) | |
} | |
} | |
function la(a, b) { | |
var c = b.priority - a.priority; | |
return 0 !== c ? c : a.name !== b.name ? a.name < b.name ? -1 : 1 : a.index - b.index | |
} | |
function aa(a, b, c, d) { | |
function e(a) { | |
return a ? | |
" (module: " + a + ")" : "" | |
} | |
if (b) throw da("multidir", b.name, e(b.$$moduleName), c.name, e(c.$$moduleName), a, Aa(d)); | |
} | |
function ma(a, c) { | |
var d = b(c, !0); | |
d && a.push({ | |
priority: 0, | |
compile: function(a) { | |
a = a.parent(); | |
var b = !!a.length; | |
b && P.$$addBindingClass(a); | |
return function(a, c) { | |
var e = c.parent(); | |
b || P.$$addBindingClass(e); | |
P.$$addBindingInfo(e, d.expressions); | |
a.$watch(d, function(a) { | |
c[0].nodeValue = a | |
}) | |
} | |
} | |
}) | |
} | |
function ha(a, b) { | |
a = S(a || "html"); | |
switch (a) { | |
case "svg": | |
case "math": | |
var c = H.document.createElement("div"); | |
c.innerHTML = "<" + | |
a + ">" + b + "</" + a + ">"; | |
return c.childNodes[0].childNodes; | |
default: | |
return b | |
} | |
} | |
function pa(a, b) { | |
if ("srcdoc" === b) return O.HTML; | |
var c = ya(a); | |
if ("src" === b || "ngSrc" === b) { | |
if (-1 === ["img", "video", "audio", "source", "track"].indexOf(c)) return O.RESOURCE_URL | |
} else if ("xlinkHref" === b || "form" === c && "action" === b) return O.RESOURCE_URL | |
} | |
function qa(a, c, d, e, f) { | |
var g = pa(a, e), | |
h = k[e] || f, | |
l = b(d, !f, g, h); | |
if (l) { | |
if ("multiple" === e && "select" === ya(a)) throw da("selmulti", Aa(a)); | |
c.push({ | |
priority: 100, | |
compile: function() { | |
return { | |
pre: function(a, | |
c, f) { | |
c = f.$$observers || (f.$$observers = T()); | |
if (m.test(e)) throw da("nodomevents"); | |
var k = f[e]; | |
k !== d && (l = k && b(k, !0, g, h), d = k); | |
l && (f[e] = l(a), (c[e] || (c[e] = [])).$$inter = !0, (f.$$observers && f.$$observers[e].$$scope || a).$watch(l, function(a, b) { | |
"class" === e && a !== b ? f.$updateClass(a, b) : f.$set(e, a) | |
})) | |
} | |
} | |
} | |
}) | |
} | |
} | |
function ja(a, b, c) { | |
var d = b[0], | |
e = b.length, | |
f = d.parentNode, | |
g, h; | |
if (a) | |
for (g = 0, h = a.length; g < h; g++) | |
if (a[g] === d) { | |
a[g++] = c; | |
h = g + e - 1; | |
for (var k = a.length; g < k; g++, h++) h < k ? a[g] = a[h] : delete a[g]; | |
a.length -= e - 1; | |
a.context === d && (a.context = | |
c); | |
break | |
} | |
f && f.replaceChild(c, d); | |
a = H.document.createDocumentFragment(); | |
for (g = 0; g < e; g++) a.appendChild(b[g]); | |
D.hasData(d) && (D.data(c, D.data(d)), D(d).off("$destroy")); | |
D.cleanData(a.querySelectorAll("*")); | |
for (g = 1; g < e; g++) delete b[g]; | |
b[0] = c; | |
b.length = 1 | |
} | |
function sa(a, b) { | |
return Q(function() { | |
return a.apply(null, arguments) | |
}, a, b) | |
} | |
function ta(a, b, c, e, f, g) { | |
try { | |
a(b, c, e, f, g) | |
} catch (Ze) { | |
d(Ze, Aa(c)) | |
} | |
} | |
function ra(a, c, d, e, f) { | |
function g(b, c, e) { | |
!A(d.$onChanges) || c === e || c !== c && e !== e || (ia || (a.$$postDigest(y), ia = []), m || (m = {}, ia.push(h)), m[b] && (e = m[b].previousValue), m[b] = new Kb(e, c)) | |
} | |
function h() { | |
d.$onChanges(m); | |
m = void 0 | |
} | |
var k = [], | |
l = {}, | |
m; | |
q(e, function(e, h) { | |
var m = e.attrName, | |
n = e.optional, | |
r, y, v, F; | |
switch (e.mode) { | |
case "@": | |
n || wa.call(c, m) || (d[h] = c[m] = void 0); | |
n = c.$observe(m, function(a) { | |
if (I(a) || Qa(a)) g(h, a, d[h]), d[h] = a | |
}); | |
c.$$observers[m].$$scope = a; | |
r = c[m]; | |
I(r) ? d[h] = b(r)(a) : Qa(r) && (d[h] = r); | |
l[h] = new Kb(jc, d[h]); | |
k.push(n); | |
break; | |
case "=": | |
if (!wa.call(c, m)) { | |
if (n) break; | |
c[m] = void 0 | |
} | |
if (n && !c[m]) break; | |
y = p(c[m]); | |
F = y.literal ? oa : function(a, | |
b) { | |
return a === b || a !== a && b !== b | |
}; | |
v = y.assign || function() { | |
r = d[h] = y(a); | |
throw da("nonassign", c[m], m, f.name); | |
}; | |
r = d[h] = y(a); | |
n = function(b) { | |
F(b, d[h]) || (F(b, r) ? v(a, b = d[h]) : d[h] = b); | |
return r = b | |
}; | |
n.$stateful = !0; | |
n = e.collection ? a.$watchCollection(c[m], n) : a.$watch(p(c[m], n), null, y.literal); | |
k.push(n); | |
break; | |
case "<": | |
if (!wa.call(c, m)) { | |
if (n) break; | |
c[m] = void 0 | |
} | |
if (n && !c[m]) break; | |
y = p(c[m]); | |
var u = y.literal, | |
w = d[h] = y(a); | |
l[h] = new Kb(jc, d[h]); | |
n = a.$watch(y, function(a, b) { | |
if (b === a) { | |
if (b === w || u && oa(b, w)) return; | |
b = w | |
} | |
g(h, a, b); | |
d[h] = a | |
}, | |
u); | |
k.push(n); | |
break; | |
case "&": | |
y = c.hasOwnProperty(m) ? p(c[m]) : G, y === G && n || (d[h] = function(b) { | |
return y(a, b) | |
}) | |
} | |
}); | |
return { | |
initialChanges: l, | |
removeWatches: k.length && function() { | |
for (var a = 0, b = k.length; a < b; ++a) k[a]() | |
} | |
} | |
} | |
var Ia = /^\w/, | |
za = H.document.createElement("div"), | |
Ja = w, | |
Ka = n, | |
Ba = E, | |
ia; | |
F.prototype = { | |
$normalize: Ea, | |
$addClass: function(a) { | |
a && 0 < a.length && R.addClass(this.$$element, a) | |
}, | |
$removeClass: function(a) { | |
a && 0 < a.length && R.removeClass(this.$$element, a) | |
}, | |
$updateClass: function(a, b) { | |
var c = cd(a, b); | |
c && c.length && R.addClass(this.$$element, | |
c); | |
(c = cd(b, a)) && c.length && R.removeClass(this.$$element, c) | |
}, | |
$set: function(a, b, c, e) { | |
var f = Vc(this.$$element[0], a), | |
g = dd[a], | |
h = a; | |
f ? (this.$$element.prop(a, b), e = f) : g && (this[g] = b, h = g); | |
this[a] = b; | |
e ? this.$attr[a] = e : (e = this.$attr[a]) || (this.$attr[a] = e = Mc(a, "-")); | |
f = ya(this.$$element); | |
if ("a" === f && ("href" === a || "xlinkHref" === a) || "img" === f && "src" === a) this[a] = b = v(b, "src" === a); | |
else if ("img" === f && "srcset" === a && x(b)) { | |
for (var f = "", g = W(b), k = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/, k = /\s/.test(g) ? k : /(,)/, g = g.split(k), k = Math.floor(g.length / | |
2), l = 0; l < k; l++) var m = 2 * l, | |
f = f + v(W(g[m]), !0), | |
f = f + (" " + W(g[m + 1])); | |
g = W(g[2 * l]).split(/\s/); | |
f += v(W(g[0]), !0); | |
2 === g.length && (f += " " + W(g[1])); | |
this[a] = b = f | |
}!1 !== c && (null === b || B(b) ? this.$$element.removeAttr(e) : Ia.test(e) ? this.$$element.attr(e, b) : C(this.$$element[0], e, b)); | |
(a = this.$$observers) && q(a[h], function(a) { | |
try { | |
a(b) | |
} catch ($e) { | |
d($e) | |
} | |
}) | |
}, | |
$observe: function(a, b) { | |
var c = this, | |
d = c.$$observers || (c.$$observers = T()), | |
e = d[a] || (d[a] = []); | |
e.push(b); | |
M.$evalAsync(function() { | |
e.$$inter || !c.hasOwnProperty(a) || B(c[a]) || b(c[a]) | |
}); | |
return function() { | |
cb(e, b) | |
} | |
} | |
}; | |
var Fa = b.startSymbol(), | |
Ga = b.endSymbol(), | |
Ha = "{{" === Fa && "}}" === Ga ? wb : function(a) { | |
return a.replace(/\{\{/g, Fa).replace(/}}/g, Ga) | |
}, | |
Ma = /^ngAttr[A-Z]/, | |
Na = /^(.+)Start$/; | |
P.$$addBindingInfo = u ? function(a, b) { | |
var c = a.data("$binding") || []; | |
L(b) ? c = c.concat(b) : c.push(b); | |
a.data("$binding", c) | |
} : G; | |
P.$$addBindingClass = u ? function(a) { | |
z(a, "ng-binding") | |
} : G; | |
P.$$addScopeInfo = u ? function(a, b, c, d) { | |
a.data(c ? d ? "$isolateScopeNoTemplate" : "$isolateScope" : "$scope", b) | |
} : G; | |
P.$$addScopeClass = u ? function(a, b) { | |
z(a, | |
b ? "ng-isolate-scope" : "ng-scope") | |
} : G; | |
P.$$createComment = function(a, b) { | |
var c = ""; | |
u && (c = " " + (a || "") + ": ", b && (c += b + " ")); | |
return H.document.createComment(c) | |
}; | |
return P | |
}] | |
} | |
function Kb(a, b) { | |
this.previousValue = a; | |
this.currentValue = b | |
} | |
function Ea(a) { | |
return ib(a.replace(Zc, "")) | |
} | |
function cd(a, b) { | |
var c = "", | |
d = a.split(/\s+/), | |
e = b.split(/\s+/), | |
f = 0; | |
a: for (; f < d.length; f++) { | |
for (var g = d[f], h = 0; h < e.length; h++) | |
if (g === e[h]) continue a; | |
c += (0 < c.length ? " " : "") + g | |
} | |
return c | |
} | |
function bd(a) { | |
a = D(a); | |
var b = a.length; | |
if (1 >= b) return a; | |
for (; b--;) { | |
var c = | |
a[b]; | |
(8 === c.nodeType || c.nodeType === Ra && "" === c.nodeValue.trim()) && cf.call(a, b, 1) | |
} | |
return a | |
} | |
function Xe(a, b) { | |
if (b && I(b)) return b; | |
if (I(a)) { | |
var c = ed.exec(a); | |
if (c) return c[3] | |
} | |
} | |
function df() { | |
var a = {}, | |
b = !1; | |
this.has = function(b) { | |
return a.hasOwnProperty(b) | |
}; | |
this.register = function(b, d) { | |
Ta(b, "controller"); | |
J(b) ? Q(a, b) : a[b] = d | |
}; | |
this.allowGlobals = function() { | |
b = !0 | |
}; | |
this.$get = ["$injector", "$window", function(c, d) { | |
function e(a, b, c, d) { | |
if (!a || !J(a.$scope)) throw N("$controller")("noscp", d, b); | |
a.$scope[b] = c | |
} | |
return function(f, | |
g, h, k) { | |
var l, m, p; | |
h = !0 === h; | |
k && I(k) && (p = k); | |
if (I(f)) { | |
k = f.match(ed); | |
if (!k) throw fd("ctrlfmt", f); | |
m = k[1]; | |
p = p || k[3]; | |
f = a.hasOwnProperty(m) ? a[m] : Nc(g.$scope, m, !0) || (b ? Nc(d, m, !0) : void 0); | |
if (!f) throw fd("ctrlreg", m); | |
Sa(f, m, !0) | |
} | |
if (h) return h = (L(f) ? f[f.length - 1] : f).prototype, l = Object.create(h || null), p && e(g, p, l, m || f.name), Q(function() { | |
var a = c.invoke(f, l, g, m); | |
a !== l && (J(a) || A(a)) && (l = a, p && e(g, p, l, m || f.name)); | |
return l | |
}, { | |
instance: l, | |
identifier: p | |
}); | |
l = c.instantiate(f, g, m); | |
p && e(g, p, l, m || f.name); | |
return l | |
} | |
}] | |
} | |
function ef() { | |
this.$get = ["$window", function(a) { | |
return D(a.document) | |
}] | |
} | |
function ff() { | |
this.$get = ["$log", function(a) { | |
return function(b, c) { | |
a.error.apply(a, arguments) | |
} | |
}] | |
} | |
function kc(a) { | |
return J(a) ? la(a) ? a.toISOString() : fb(a) : a | |
} | |
function gf() { | |
this.$get = function() { | |
return function(a) { | |
if (!a) return ""; | |
var b = []; | |
Dc(a, function(a, d) { | |
null === a || B(a) || (L(a) ? q(a, function(a) { | |
b.push(pa(d) + "=" + pa(kc(a))) | |
}) : b.push(pa(d) + "=" + pa(kc(a)))) | |
}); | |
return b.join("&") | |
} | |
} | |
} | |
function hf() { | |
this.$get = function() { | |
return function(a) { | |
function b(a, e, f) { | |
null === a || B(a) || | |
(L(a) ? q(a, function(a, c) { | |
b(a, e + "[" + (J(a) ? c : "") + "]") | |
}) : J(a) && !la(a) ? Dc(a, function(a, c) { | |
b(a, e + (f ? "" : "[") + c + (f ? "" : "]")) | |
}) : c.push(pa(e) + "=" + pa(kc(a)))) | |
} | |
if (!a) return ""; | |
var c = []; | |
b(a, "", !0); | |
return c.join("&") | |
} | |
} | |
} | |
function lc(a, b) { | |
if (I(a)) { | |
var c = a.replace(jf, "").trim(); | |
if (c) { | |
var d = b("Content-Type"); | |
(d = d && 0 === d.indexOf(gd)) || (d = (d = c.match(kf)) && lf[d[0]].test(c)); | |
d && (a = Hc(c)) | |
} | |
} | |
return a | |
} | |
function hd(a) { | |
var b = T(), | |
c; | |
I(a) ? q(a.split("\n"), function(a) { | |
c = a.indexOf(":"); | |
var d = S(W(a.substr(0, c))); | |
a = W(a.substr(c + 1)); | |
d && | |
(b[d] = b[d] ? b[d] + ", " + a : a) | |
}) : J(a) && q(a, function(a, c) { | |
var d = S(c), | |
e = W(a); | |
d && (b[d] = b[d] ? b[d] + ", " + e : e) | |
}); | |
return b | |
} | |
function id(a) { | |
var b; | |
return function(c) { | |
b || (b = hd(a)); | |
return c ? (c = b[S(c)], void 0 === c && (c = null), c) : b | |
} | |
} | |
function jd(a, b, c, d) { | |
if (A(d)) return d(a, b, c); | |
q(d, function(d) { | |
a = d(a, b, c) | |
}); | |
return a | |
} | |
function mf() { | |
var a = this.defaults = { | |
transformResponse: [lc], | |
transformRequest: [function(a) { | |
return J(a) && "[object File]" !== na.call(a) && "[object Blob]" !== na.call(a) && "[object FormData]" !== na.call(a) ? fb(a) : a | |
}], | |
headers: { | |
common: { | |
Accept: "application/json, text/plain, */*" | |
}, | |
post: ma(mc), | |
put: ma(mc), | |
patch: ma(mc) | |
}, | |
xsrfCookieName: "XSRF-TOKEN", | |
xsrfHeaderName: "X-XSRF-TOKEN", | |
paramSerializer: "$httpParamSerializer" | |
}, | |
b = !1; | |
this.useApplyAsync = function(a) { | |
return x(a) ? (b = !!a, this) : b | |
}; | |
var c = !0; | |
this.useLegacyPromiseExtensions = function(a) { | |
return x(a) ? (c = !!a, this) : c | |
}; | |
var d = this.interceptors = []; | |
this.$get = ["$httpBackend", "$$cookieReader", "$cacheFactory", "$rootScope", "$q", "$injector", function(e, f, g, h, k, l) { | |
function m(b) { | |
function d(a, b) { | |
for (var c = 0, d = b.length; c < d;) { | |
var e = b[c++], | |
f = b[c++]; | |
a = | |
a.then(e, f) | |
} | |
b.length = 0; | |
return a | |
} | |
function e(a, b) { | |
var c, d = {}; | |
q(a, function(a, e) { | |
A(a) ? (c = a(b), null != c && (d[e] = c)) : d[e] = a | |
}); | |
return d | |
} | |
function f(a) { | |
var b = Q({}, a); | |
b.data = jd(a.data, a.headers, a.status, g.transformResponse); | |
a = a.status; | |
return 200 <= a && 300 > a ? b : k.reject(b) | |
} | |
if (!J(b)) throw N("$http")("badreq", b); | |
if (!I(b.url)) throw N("$http")("badreq", b.url); | |
var g = Q({ | |
method: "get", | |
transformRequest: a.transformRequest, | |
transformResponse: a.transformResponse, | |
paramSerializer: a.paramSerializer | |
}, b); | |
g.headers = function(b) { | |
var c = | |
a.headers, | |
d = Q({}, b.headers), | |
f, g, h, c = Q({}, c.common, c[S(b.method)]); | |
a: for (f in c) { | |
g = S(f); | |
for (h in d) | |
if (S(h) === g) continue a; | |
d[f] = c[f] | |
} | |
return e(d, ma(b)) | |
}(b); | |
g.method = Lb(g.method); | |
g.paramSerializer = I(g.paramSerializer) ? l.get(g.paramSerializer) : g.paramSerializer; | |
var h = [], | |
m = [], | |
r = k.when(g); | |
q(E, function(a) { | |
(a.request || a.requestError) && h.unshift(a.request, a.requestError); | |
(a.response || a.responseError) && m.push(a.response, a.responseError) | |
}); | |
r = d(r, h); | |
r = r.then(function(b) { | |
var c = b.headers, | |
d = jd(b.data, id(c), void 0, | |
b.transformRequest); | |
B(d) && q(c, function(a, b) { | |
"content-type" === S(b) && delete c[b] | |
}); | |
B(b.withCredentials) && !B(a.withCredentials) && (b.withCredentials = a.withCredentials); | |
return p(b, d).then(f, f) | |
}); | |
r = d(r, m); | |
c ? (r.success = function(a) { | |
Sa(a, "fn"); | |
r.then(function(b) { | |
a(b.data, b.status, b.headers, g) | |
}); | |
return r | |
}, r.error = function(a) { | |
Sa(a, "fn"); | |
r.then(null, function(b) { | |
a(b.data, b.status, b.headers, g) | |
}); | |
return r | |
}) : (r.success = kd("success"), r.error = kd("error")); | |
return r | |
} | |
function p(c, d) { | |
function g(a) { | |
if (a) { | |
var c = {}; | |
q(a, function(a, | |
d) { | |
c[d] = function(c) { | |
function d() { | |
a(c) | |
} | |
b ? h.$applyAsync(d) : h.$$phase ? d() : h.$apply(d) | |
} | |
}); | |
return c | |
} | |
} | |
function l(a, c, d, e) { | |
function f() { | |
p(c, a, d, e) | |
} | |
M && (200 <= a && 300 > a ? M.put(v, [a, c, hd(d), e]) : M.remove(v)); | |
b ? h.$applyAsync(f) : (f(), h.$$phase || h.$apply()) | |
} | |
function p(a, b, d, e) { | |
b = -1 <= b ? b : 0; | |
(200 <= b && 300 > b ? F.resolve : F.reject)({ | |
data: a, | |
status: b, | |
headers: id(d), | |
config: c, | |
statusText: e | |
}) | |
} | |
function n(a) { | |
p(a.data, a.status, ma(a.headers()), a.statusText) | |
} | |
function w() { | |
var a = m.pendingRequests.indexOf(c); - 1 !== a && m.pendingRequests.splice(a, | |
1) | |
} | |
var F = k.defer(), | |
E = F.promise, | |
M, O, R = c.headers, | |
v = u(c.url, c.paramSerializer(c.params)); | |
m.pendingRequests.push(c); | |
E.then(w, w); | |
!c.cache && !a.cache || !1 === c.cache || "GET" !== c.method && "JSONP" !== c.method || (M = J(c.cache) ? c.cache : J(a.cache) ? a.cache : r); | |
M && (O = M.get(v), x(O) ? O && A(O.then) ? O.then(n, n) : L(O) ? p(O[1], O[0], ma(O[2]), O[3]) : p(O, 200, {}, "OK") : M.put(v, E)); | |
B(O) && ((O = ld(c.url) ? f()[c.xsrfCookieName || a.xsrfCookieName] : void 0) && (R[c.xsrfHeaderName || a.xsrfHeaderName] = O), e(c.method, v, d, l, R, c.timeout, c.withCredentials, | |
c.responseType, g(c.eventHandlers), g(c.uploadEventHandlers))); | |
return E | |
} | |
function u(a, b) { | |
0 < b.length && (a += (-1 === a.indexOf("?") ? "?" : "&") + b); | |
return a | |
} | |
var r = g("$http"); | |
a.paramSerializer = I(a.paramSerializer) ? l.get(a.paramSerializer) : a.paramSerializer; | |
var E = []; | |
q(d, function(a) { | |
E.unshift(I(a) ? l.get(a) : l.invoke(a)) | |
}); | |
m.pendingRequests = []; | |
(function(a) { | |
q(arguments, function(a) { | |
m[a] = function(b, c) { | |
return m(Q({}, c || {}, { | |
method: a, | |
url: b | |
})) | |
} | |
}) | |
})("get", "delete", "head", "jsonp"); | |
(function(a) { | |
q(arguments, function(a) { | |
m[a] = | |
function(b, c, d) { | |
return m(Q({}, d || {}, { | |
method: a, | |
url: b, | |
data: c | |
})) | |
} | |
}) | |
})("post", "put", "patch"); | |
m.defaults = a; | |
return m | |
}] | |
} | |
function nf() { | |
this.$get = function() { | |
return function() { | |
return new H.XMLHttpRequest | |
} | |
} | |
} | |
function of () { | |
this.$get = ["$browser", "$jsonpCallbacks", "$document", "$xhrFactory", function(a, b, c, d) { | |
return pf(a, d, a.defer, b, c[0]) | |
}] | |
} | |
function pf(a, b, c, d, e) { | |
function f(a, b, c) { | |
a = a.replace("JSON_CALLBACK", b); | |
var f = e.createElement("script"), | |
g = null; | |
f.type = "text/javascript"; | |
f.src = a; | |
f.async = !0; | |
g = function(a) { | |
f.removeEventListener("load", | |
g, !1); | |
f.removeEventListener("error", g, !1); | |
e.body.removeChild(f); | |
f = null; | |
var h = -1, | |
k = "unknown"; | |
a && ("load" !== a.type || d.wasCalled(b) || (a = { | |
type: "error" | |
}), k = a.type, h = "error" === a.type ? 404 : 200); | |
c && c(h, k) | |
}; | |
f.addEventListener("load", g, !1); | |
f.addEventListener("error", g, !1); | |
e.body.appendChild(f); | |
return g | |
} | |
return function(e, h, k, l, m, p, u, r, E, w) { | |
function g() { | |
C && C(); | |
z && z.abort() | |
} | |
function K(b, d, e, f, g) { | |
x(P) && c.cancel(P); | |
C = z = null; | |
b(d, e, f, g); | |
a.$$completeOutstandingRequest(G) | |
} | |
a.$$incOutstandingRequestCount(); | |
h = h || a.url(); | |
if ("jsonp" === S(e)) var y = d.createCallback(h), | |
C = f(h, y, function(a, b) { | |
var c = 200 === a && d.getResponse(y); | |
K(l, a, c, "", b); | |
d.removeCallback(y) | |
}); | |
else { | |
var z = b(e, h); | |
z.open(e, h, !0); | |
q(m, function(a, b) { | |
x(a) && z.setRequestHeader(b, a) | |
}); | |
z.onload = function() { | |
var a = z.statusText || "", | |
b = "response" in z ? z.response : z.responseText, | |
c = 1223 === z.status ? 204 : z.status; | |
0 === c && (c = b ? 200 : "file" === Fa(h).protocol ? 404 : 0); | |
K(l, c, b, z.getAllResponseHeaders(), a) | |
}; | |
e = function() { | |
K(l, -1, null, null, "") | |
}; | |
z.onerror = e; | |
z.onabort = e; | |
z.ontimeout = e; | |
q(E, function(a, | |
b) { | |
z.addEventListener(b, a) | |
}); | |
q(w, function(a, b) { | |
z.upload.addEventListener(b, a) | |
}); | |
u && (z.withCredentials = !0); | |
if (r) try { | |
z.responseType = r | |
} catch (F) { | |
if ("json" !== r) throw F; | |
} | |
z.send(B(k) ? null : k) | |
} | |
if (0 < p) var P = c(g, p); | |
else p && A(p.then) && p.then(g) | |
} | |
} | |
function qf() { | |
var a = "{{", | |
b = "}}"; | |
this.startSymbol = function(b) { | |
return b ? (a = b, this) : a | |
}; | |
this.endSymbol = function(a) { | |
return a ? (b = a, this) : b | |
}; | |
this.$get = ["$parse", "$exceptionHandler", "$sce", function(c, d, e) { | |
function f(a) { | |
return "\\\\\\" + a | |
} | |
function g(c) { | |
return c.replace(p, a).replace(u, | |
b) | |
} | |
function h(a, b, c, d) { | |
var e = a.$watch(function(a) { | |
e(); | |
return d(a) | |
}, b, c); | |
return e | |
} | |
function k(f, k, p, n) { | |
function r(a) { | |
try { | |
var b = a; | |
a = p ? e.getTrusted(p, b) : e.valueOf(b); | |
var c; | |
if (n && !x(a)) c = a; | |
else if (null == a) c = ""; | |
else { | |
switch (typeof a) { | |
case "string": | |
break; | |
case "number": | |
a = "" + a; | |
break; | |
default: | |
a = fb(a) | |
} | |
c = a | |
} | |
return c | |
} catch (Y) { | |
d(Ga.interr(f, Y)) | |
} | |
} | |
if (!f.length || -1 === f.indexOf(a)) { | |
var y; | |
k || (k = g(f), y = ha(k), y.exp = f, y.expressions = [], y.$$watchDelegate = h); | |
return y | |
} | |
n = !!n; | |
var u, w, E = 0, | |
F = [], | |
q = []; | |
y = f.length; | |
for (var M = [], O = []; E < | |
y;) | |
if (-1 !== (u = f.indexOf(a, E)) && -1 !== (w = f.indexOf(b, u + l))) E !== u && M.push(g(f.substring(E, u))), E = f.substring(u + l, w), F.push(E), q.push(c(E, r)), E = w + m, O.push(M.length), M.push(""); | |
else { | |
E !== y && M.push(g(f.substring(E))); | |
break | |
} | |
p && 1 < M.length && Ga.throwNoconcat(f); | |
if (!k || F.length) { | |
var R = function(a) { | |
for (var b = 0, c = F.length; b < c; b++) { | |
if (n && B(a[b])) return; | |
M[O[b]] = a[b] | |
} | |
return M.join("") | |
}; | |
return Q(function(a) { | |
var b = 0, | |
c = F.length, | |
e = Array(c); | |
try { | |
for (; b < c; b++) e[b] = q[b](a); | |
return R(e) | |
} catch (Ib) { | |
d(Ga.interr(f, Ib)) | |
} | |
}, { | |
exp: f, | |
expressions: F, | |
$$watchDelegate: function(a, b) { | |
var c; | |
return a.$watchGroup(q, function(d, e) { | |
var f = R(d); | |
A(b) && b.call(this, f, d !== e ? c : f, a); | |
c = f | |
}) | |
} | |
}) | |
} | |
} | |
var l = a.length, | |
m = b.length, | |
p = new RegExp(a.replace(/./g, f), "g"), | |
u = new RegExp(b.replace(/./g, f), "g"); | |
k.startSymbol = function() { | |
return a | |
}; | |
k.endSymbol = function() { | |
return b | |
}; | |
return k | |
}] | |
} | |
function rf() { | |
this.$get = ["$rootScope", "$window", "$q", "$$q", "$browser", function(a, b, c, d, e) { | |
function f(f, k, l, m) { | |
function h() { | |
u ? f.apply(null, r) : f(n) | |
} | |
var u = 4 < arguments.length, | |
r = u ? xa.call(arguments, | |
4) : [], | |
E = b.setInterval, | |
w = b.clearInterval, | |
n = 0, | |
K = x(m) && !m, | |
y = (K ? d : c).defer(), | |
C = y.promise; | |
l = x(l) ? l : 0; | |
C.$$intervalId = E(function() { | |
K ? e.defer(h) : a.$evalAsync(h); | |
y.notify(n++); | |
0 < l && n >= l && (y.resolve(n), w(C.$$intervalId), delete g[C.$$intervalId]); | |
K || a.$apply() | |
}, k); | |
g[C.$$intervalId] = y; | |
return C | |
} | |
var g = {}; | |
f.cancel = function(a) { | |
return a && a.$$intervalId in g ? (g[a.$$intervalId].reject("canceled"), b.clearInterval(a.$$intervalId), delete g[a.$$intervalId], !0) : !1 | |
}; | |
return f | |
}] | |
} | |
function nc(a) { | |
a = a.split("/"); | |
for (var b = a.length; b--;) a[b] = | |
xb(a[b]); | |
return a.join("/") | |
} | |
function md(a, b) { | |
var c = Fa(a); | |
b.$$protocol = c.protocol; | |
b.$$host = c.hostname; | |
b.$$port = parseInt(c.port, 10) || sf[c.protocol] || null | |
} | |
function nd(a, b) { | |
if (tf.test(a)) throw nb("badpath", a); | |
var c = "/" !== a.charAt(0); | |
c && (a = "/" + a); | |
var d = Fa(a); | |
b.$$path = decodeURIComponent(c && "/" === d.pathname.charAt(0) ? d.pathname.substring(1) : d.pathname); | |
b.$$search = Kc(d.search); | |
b.$$hash = decodeURIComponent(d.hash); | |
b.$$path && "/" !== b.$$path.charAt(0) && (b.$$path = "/" + b.$$path) | |
} | |
function ja(a, b) { | |
if (b.slice(0, a.length) === | |
a) return b.substr(a.length) | |
} | |
function ia(a) { | |
var b = a.indexOf("#"); | |
return -1 === b ? a : a.substr(0, b) | |
} | |
function ob(a) { | |
return a.replace(/(#.+)|#$/, "$1") | |
} | |
function oc(a, b, c) { | |
this.$$html5 = !0; | |
c = c || ""; | |
md(a, this); | |
this.$$parse = function(a) { | |
var c = ja(b, a); | |
if (!I(c)) throw nb("ipthprfx", a, b); | |
nd(c, this); | |
this.$$path || (this.$$path = "/"); | |
this.$$compose() | |
}; | |
this.$$compose = function() { | |
var a = ac(this.$$search), | |
c = this.$$hash ? "#" + xb(this.$$hash) : ""; | |
this.$$url = nc(this.$$path) + (a ? "?" + a : "") + c; | |
this.$$absUrl = b + this.$$url.substr(1) | |
}; | |
this.$$parseLinkUrl = | |
function(d, e) { | |
if (e && "#" === e[0]) return this.hash(e.slice(1)), !0; | |
var f, g; | |
x(f = ja(a, d)) ? (g = f, g = c && x(f = ja(c, f)) ? b + (ja("/", f) || f) : a + g) : x(f = ja(b, d)) ? g = b + f : b === d + "/" && (g = b); | |
g && this.$$parse(g); | |
return !!g | |
} | |
} | |
function pc(a, b, c) { | |
md(a, this); | |
this.$$parse = function(d) { | |
var e = ja(a, d) || ja(b, d), | |
f; | |
B(e) || "#" !== e.charAt(0) ? this.$$html5 ? f = e : (f = "", B(e) && (a = d, this.replace())) : (f = ja(c, e), B(f) && (f = e)); | |
nd(f, this); | |
d = this.$$path; | |
var e = a, | |
g = /^\/[A-Z]:(\/.*)/; | |
f.slice(0, e.length) === e && (f = f.replace(e, "")); | |
g.exec(f) || (d = (f = g.exec(d)) ? f[1] : | |
d); | |
this.$$path = d; | |
this.$$compose() | |
}; | |
this.$$compose = function() { | |
var b = ac(this.$$search), | |
e = this.$$hash ? "#" + xb(this.$$hash) : ""; | |
this.$$url = nc(this.$$path) + (b ? "?" + b : "") + e; | |
this.$$absUrl = a + (this.$$url ? c + this.$$url : "") | |
}; | |
this.$$parseLinkUrl = function(b, c) { | |
return ia(a) === ia(b) ? (this.$$parse(b), !0) : !1 | |
} | |
} | |
function od(a, b, c) { | |
this.$$html5 = !0; | |
pc.apply(this, arguments); | |
this.$$parseLinkUrl = function(d, e) { | |
if (e && "#" === e[0]) return this.hash(e.slice(1)), !0; | |
var f, g; | |
a === ia(d) ? f = d : (g = ja(b, d)) ? f = a + c + g : b === d + "/" && (f = b); | |
f && this.$$parse(f); | |
return !!f | |
}; | |
this.$$compose = function() { | |
var b = ac(this.$$search), | |
e = this.$$hash ? "#" + xb(this.$$hash) : ""; | |
this.$$url = nc(this.$$path) + (b ? "?" + b : "") + e; | |
this.$$absUrl = a + c + this.$$url | |
} | |
} | |
function Mb(a) { | |
return function() { | |
return this[a] | |
} | |
} | |
function pd(a, b) { | |
return function(c) { | |
if (B(c)) return this[a]; | |
this[a] = b(c); | |
this.$$compose(); | |
return this | |
} | |
} | |
function uf() { | |
var a = "", | |
b = { | |
enabled: !1, | |
requireBase: !0, | |
rewriteLinks: !0 | |
}; | |
this.hashPrefix = function(b) { | |
return x(b) ? (a = b, this) : a | |
}; | |
this.html5Mode = function(a) { | |
if (Qa(a)) return b.enabled = a, this; | |
if (J(a)) { | |
Qa(a.enabled) && (b.enabled = a.enabled); | |
Qa(a.requireBase) && (b.requireBase = a.requireBase); | |
if (Qa(a.rewriteLinks) || I(a.rewriteLinks)) b.rewriteLinks = a.rewriteLinks; | |
return this | |
} | |
return b | |
}; | |
this.$get = ["$rootScope", "$browser", "$sniffer", "$rootElement", "$window", function(c, d, e, f, g) { | |
function h(a, b, c) { | |
var e = l.url(), | |
f = l.$$state; | |
try { | |
d.url(a, b, c), l.$$state = d.state() | |
} catch (P) { | |
throw l.url(e), l.$$state = f, P; | |
} | |
} | |
function k(a, b) { | |
c.$broadcast("$locationChangeSuccess", l.absUrl(), a, l.$$state, b) | |
} | |
var l, m; | |
m = d.baseHref(); | |
var p = d.url(), | |
u; | |
if (b.enabled) { | |
if (!m && b.requireBase) throw nb("nobase"); | |
u = p.substring(0, p.indexOf("/", p.indexOf("//") + 2)) + (m || "/"); | |
m = e.history ? oc : od | |
} else u = ia(p), m = pc; | |
var r = u.substr(0, ia(u).lastIndexOf("/") + 1); | |
l = new m(u, r, "#" + a); | |
l.$$parseLinkUrl(p, p); | |
l.$$state = d.state(); | |
var E = /^\s*(javascript|mailto):/i; | |
f.on("click", function(a) { | |
var e = b.rewriteLinks; | |
if (e && !a.ctrlKey && !a.metaKey && !a.shiftKey && 2 !== a.which && 2 !== a.button) { | |
for (var h = D(a.target); | |
"a" !== ya(h[0]);) | |
if (h[0] === f[0] || !(h = h.parent())[0]) return; | |
if (!I(e) || | |
!B(h.attr(e))) { | |
var e = h.prop("href"), | |
k = h.attr("href") || h.attr("xlink:href"); | |
J(e) && "[object SVGAnimatedString]" === e.toString() && (e = Fa(e.animVal).href); | |
E.test(e) || !e || h.attr("target") || a.isDefaultPrevented() || !l.$$parseLinkUrl(e, k) || (a.preventDefault(), l.absUrl() !== d.url() && (c.$apply(), g.angular["ff-684208-preventDefault"] = !0)) | |
} | |
} | |
}); | |
ob(l.absUrl()) !== ob(p) && d.url(l.absUrl(), !0); | |
var w = !0; | |
d.onUrlChange(function(a, b) { | |
B(ja(r, a)) ? g.location.href = a : (c.$evalAsync(function() { | |
var d = l.absUrl(), | |
e = l.$$state, | |
f; | |
a = ob(a); | |
l.$$parse(a); | |
l.$$state = b; | |
f = c.$broadcast("$locationChangeStart", a, d, b, e).defaultPrevented; | |
l.absUrl() === a && (f ? (l.$$parse(d), l.$$state = e, h(d, !1, e)) : (w = !1, k(d, e))) | |
}), c.$$phase || c.$digest()) | |
}); | |
c.$watch(function() { | |
var a = ob(d.url()), | |
b = ob(l.absUrl()), | |
f = d.state(), | |
g = l.$$replace, | |
m = a !== b || l.$$html5 && e.history && f !== l.$$state; | |
if (w || m) w = !1, c.$evalAsync(function() { | |
var b = l.absUrl(), | |
d = c.$broadcast("$locationChangeStart", b, a, l.$$state, f).defaultPrevented; | |
l.absUrl() === b && (d ? (l.$$parse(a), l.$$state = f) : (m && h(b, g, f === l.$$state ? | |
null : l.$$state), k(a, f))) | |
}); | |
l.$$replace = !1 | |
}); | |
return l | |
}] | |
} | |
function vf() { | |
var a = !0, | |
b = this; | |
this.debugEnabled = function(b) { | |
return x(b) ? (a = b, this) : a | |
}; | |
this.$get = ["$window", function(c) { | |
function d(a) { | |
a instanceof Error && (a.stack ? a = a.message && -1 === a.stack.indexOf(a.message) ? "Error: " + a.message + "\n" + a.stack : a.stack : a.sourceURL && (a = a.message + "\n" + a.sourceURL + ":" + a.line)); | |
return a | |
} | |
function e(a) { | |
var b = c.console || {}, | |
e = b[a] || b.log || G; | |
a = !1; | |
try { | |
a = !!e.apply | |
} catch (k) {} | |
return a ? function() { | |
var a = []; | |
q(arguments, function(b) { | |
a.push(d(b)) | |
}); | |
return e.apply(b, a) | |
} : function(a, b) { | |
e(a, null == b ? "" : b) | |
} | |
} | |
return { | |
log: e("log"), | |
info: e("info"), | |
warn: e("warn"), | |
error: e("error"), | |
debug: function() { | |
var c = e("debug"); | |
return function() { | |
a && c.apply(b, arguments) | |
} | |
}() | |
} | |
}] | |
} | |
function Wa(a, b) { | |
if ("__defineGetter__" === a || "__defineSetter__" === a || "__lookupGetter__" === a || "__lookupSetter__" === a || "__proto__" === a) throw ga("isecfld", b); | |
return a | |
} | |
function wf(a) { | |
return a + "" | |
} | |
function ra(a, b) { | |
if (a) { | |
if (a.constructor === a) throw ga("isecfn", b); | |
if (a.window === a) throw ga("isecwindow", b); | |
if (a.children && | |
(a.nodeName || a.prop && a.attr && a.find)) throw ga("isecdom", b); | |
if (a === Object) throw ga("isecobj", b); | |
} | |
return a | |
} | |
function qd(a, b) { | |
if (a) { | |
if (a.constructor === a) throw ga("isecfn", b); | |
if (a === xf || a === yf || a === zf) throw ga("isecff", b); | |
} | |
} | |
function Nb(a, b) { | |
if (a && (a === rd || a === sd || a === td || a === ud || a === vd || a === wd || a === Af || a === Bf || a === Ob || a === Cf || a === xd || a === Df)) throw ga("isecaf", b); | |
} | |
function Ef(a, b) { | |
return "undefined" !== typeof a ? a : b | |
} | |
function yd(a, b) { | |
return "undefined" === typeof a ? b : "undefined" === typeof b ? a : a + b | |
} | |
function V(a, | |
b) { | |
var c, d, e; | |
switch (a.type) { | |
case t.Program: | |
c = !0; | |
q(a.body, function(a) { | |
V(a.expression, b); | |
c = c && a.expression.constant | |
}); | |
a.constant = c; | |
break; | |
case t.Literal: | |
a.constant = !0; | |
a.toWatch = []; | |
break; | |
case t.UnaryExpression: | |
V(a.argument, b); | |
a.constant = a.argument.constant; | |
a.toWatch = a.argument.toWatch; | |
break; | |
case t.BinaryExpression: | |
V(a.left, b); | |
V(a.right, b); | |
a.constant = a.left.constant && a.right.constant; | |
a.toWatch = a.left.toWatch.concat(a.right.toWatch); | |
break; | |
case t.LogicalExpression: | |
V(a.left, b); | |
V(a.right, b); | |
a.constant = a.left.constant && | |
a.right.constant; | |
a.toWatch = a.constant ? [] : [a]; | |
break; | |
case t.ConditionalExpression: | |
V(a.test, b); | |
V(a.alternate, b); | |
V(a.consequent, b); | |
a.constant = a.test.constant && a.alternate.constant && a.consequent.constant; | |
a.toWatch = a.constant ? [] : [a]; | |
break; | |
case t.Identifier: | |
a.constant = !1; | |
a.toWatch = [a]; | |
break; | |
case t.MemberExpression: | |
V(a.object, b); | |
a.computed && V(a.property, b); | |
a.constant = a.object.constant && (!a.computed || a.property.constant); | |
a.toWatch = [a]; | |
break; | |
case t.CallExpression: | |
c = e = a.filter ? !b(a.callee.name).$stateful : !1; | |
d = []; | |
q(a.arguments, function(a) { | |
V(a, b); | |
c = c && a.constant; | |
a.constant || d.push.apply(d, a.toWatch) | |
}); | |
a.constant = c; | |
a.toWatch = e ? d : [a]; | |
break; | |
case t.AssignmentExpression: | |
V(a.left, b); | |
V(a.right, b); | |
a.constant = a.left.constant && a.right.constant; | |
a.toWatch = [a]; | |
break; | |
case t.ArrayExpression: | |
c = !0; | |
d = []; | |
q(a.elements, function(a) { | |
V(a, b); | |
c = c && a.constant; | |
a.constant || d.push.apply(d, a.toWatch) | |
}); | |
a.constant = c; | |
a.toWatch = d; | |
break; | |
case t.ObjectExpression: | |
c = !0; | |
d = []; | |
q(a.properties, function(a) { | |
V(a.value, b); | |
c = c && a.value.constant && !a.computed; | |
a.value.constant || d.push.apply(d, a.value.toWatch) | |
}); | |
a.constant = c; | |
a.toWatch = d; | |
break; | |
case t.ThisExpression: | |
a.constant = !1; | |
a.toWatch = []; | |
break; | |
case t.LocalsExpression: | |
a.constant = !1, a.toWatch = [] | |
} | |
} | |
function zd(a) { | |
if (1 === a.length) { | |
a = a[0].expression; | |
var b = a.toWatch; | |
return 1 !== b.length ? b : b[0] !== a ? b : void 0 | |
} | |
} | |
function Ad(a) { | |
return a.type === t.Identifier || a.type === t.MemberExpression | |
} | |
function Bd(a) { | |
if (1 === a.body.length && Ad(a.body[0].expression)) return { | |
type: t.AssignmentExpression, | |
left: a.body[0].expression, | |
right: { | |
type: t.NGValueParameter | |
}, | |
operator: "=" | |
} | |
} | |
function Cd(a) { | |
return 0 === a.body.length || 1 === a.body.length && (a.body[0].expression.type === t.Literal || a.body[0].expression.type === t.ArrayExpression || a.body[0].expression.type === t.ObjectExpression) | |
} | |
function Dd(a, b) { | |
this.astBuilder = a; | |
this.$filter = b | |
} | |
function Ed(a, b) { | |
this.astBuilder = a; | |
this.$filter = b | |
} | |
function Pb(a) { | |
return "constructor" === a | |
} | |
function qc(a) { | |
return A(a.valueOf) ? a.valueOf() : Ff.call(a) | |
} | |
function Gf() { | |
var a = T(), | |
b = T(), | |
c = { | |
"true": !0, | |
"false": !1, | |
"null": null, | |
undefined: void 0 | |
}, | |
d, e; | |
this.addLiteral = | |
function(a, b) { | |
c[a] = b | |
}; | |
this.setIdentifierFns = function(a, b) { | |
d = a; | |
e = b; | |
return this | |
}; | |
this.$get = ["$filter", function(f) { | |
function g(c, d, e) { | |
var g, k, y; | |
e = e || K; | |
switch (typeof c) { | |
case "string": | |
y = c = c.trim(); | |
var E = e ? b : a; | |
g = E[y]; | |
if (!g) { | |
":" === c.charAt(0) && ":" === c.charAt(1) && (k = !0, c = c.substring(2)); | |
g = e ? n : w; | |
var C = new rc(g); | |
g = (new sc(C, f, g)).parse(c); | |
g.constant ? g.$$watchDelegate = u : k ? g.$$watchDelegate = g.literal ? p : m : g.inputs && (g.$$watchDelegate = l); | |
e && (g = h(g)); | |
E[y] = g | |
} | |
return r(g, d); | |
case "function": | |
return r(c, d); | |
default: | |
return r(G, | |
d) | |
} | |
} | |
function h(a) { | |
function b(b, c, d, e) { | |
var f = K; | |
K = !0; | |
try { | |
return a(b, c, d, e) | |
} finally { | |
K = f | |
} | |
} | |
if (!a) return a; | |
b.$$watchDelegate = a.$$watchDelegate; | |
b.assign = h(a.assign); | |
b.constant = a.constant; | |
b.literal = a.literal; | |
for (var c = 0; a.inputs && c < a.inputs.length; ++c) a.inputs[c] = h(a.inputs[c]); | |
b.inputs = a.inputs; | |
return b | |
} | |
function k(a, b) { | |
return null == a || null == b ? a === b : "object" === typeof a && (a = qc(a), "object" === typeof a) ? !1 : a === b || a !== a && b !== b | |
} | |
function l(a, b, c, d, e) { | |
var f = d.inputs, | |
g; | |
if (1 === f.length) { | |
var h = k, | |
f = f[0]; | |
return a.$watch(function(a) { | |
var b = | |
f(a); | |
k(b, h) || (g = d(a, void 0, void 0, [b]), h = b && qc(b)); | |
return g | |
}, b, c, e) | |
} | |
for (var l = [], m = [], p = 0, r = f.length; p < r; p++) l[p] = k, m[p] = null; | |
return a.$watch(function(a) { | |
for (var b = !1, c = 0, e = f.length; c < e; c++) { | |
var h = f[c](a); | |
if (b || (b = !k(h, l[c]))) m[c] = h, l[c] = h && qc(h) | |
} | |
b && (g = d(a, void 0, void 0, m)); | |
return g | |
}, b, c, e) | |
} | |
function m(a, b, c, d) { | |
var e, f; | |
return e = a.$watch(function(a) { | |
return d(a) | |
}, function(a, c, d) { | |
f = a; | |
A(b) && b.apply(this, arguments); | |
x(a) && d.$$postDigest(function() { | |
x(f) && e() | |
}) | |
}, c) | |
} | |
function p(a, b, c, d) { | |
function e(a) { | |
var b = !0; | |
q(a, function(a) { | |
x(a) || (b = !1) | |
}); | |
return b | |
} | |
var f, g; | |
return f = a.$watch(function(a) { | |
return d(a) | |
}, function(a, c, d) { | |
g = a; | |
A(b) && b.call(this, a, c, d); | |
e(a) && d.$$postDigest(function() { | |
e(g) && f() | |
}) | |
}, c) | |
} | |
function u(a, b, c, d) { | |
var e = a.$watch(function(a) { | |
e(); | |
return d(a) | |
}, b, c); | |
return e | |
} | |
function r(a, b) { | |
if (!b) return a; | |
var c = a.$$watchDelegate, | |
d = !1, | |
c = c !== p && c !== m ? function(c, e, f, g) { | |
f = d && g ? g[0] : a(c, e, f, g); | |
return b(f, c, e) | |
} : function(c, d, e, f) { | |
e = a(c, d, e, f); | |
c = b(e, c, d); | |
return x(e) ? c : e | |
}; | |
a.$$watchDelegate && a.$$watchDelegate !== l ? c.$$watchDelegate = | |
a.$$watchDelegate : b.$stateful || (c.$$watchDelegate = l, d = !a.inputs, c.inputs = a.inputs ? a.inputs : [a]); | |
return c | |
} | |
var E = Ha().noUnsafeEval, | |
w = { | |
csp: E, | |
expensiveChecks: !1, | |
literals: sa(c), | |
isIdentifierStart: A(d) && d, | |
isIdentifierContinue: A(e) && e | |
}, | |
n = { | |
csp: E, | |
expensiveChecks: !0, | |
literals: sa(c), | |
isIdentifierStart: A(d) && d, | |
isIdentifierContinue: A(e) && e | |
}, | |
K = !1; | |
g.$$runningExpensiveChecks = function() { | |
return K | |
}; | |
return g | |
}] | |
} | |
function Hf() { | |
this.$get = ["$rootScope", "$exceptionHandler", function(a, b) { | |
return Fd(function(b) { | |
a.$evalAsync(b) | |
}, | |
b) | |
}] | |
} | |
function If() { | |
this.$get = ["$browser", "$exceptionHandler", function(a, b) { | |
return Fd(function(b) { | |
a.defer(b) | |
}, b) | |
}] | |
} | |
function Fd(a, b) { | |
function c() { | |
var a = new g; | |
a.resolve = e(a, a.resolve); | |
a.reject = e(a, a.reject); | |
a.notify = e(a, a.notify); | |
return a | |
} | |
function d() { | |
this.$$state = { | |
status: 0 | |
} | |
} | |
function e(a, b) { | |
return function(c) { | |
b.call(a, c) | |
} | |
} | |
function f(c) { | |
!c.processScheduled && c.pending && (c.processScheduled = !0, a(function() { | |
var a, d, e; | |
e = c.pending; | |
c.processScheduled = !1; | |
c.pending = void 0; | |
for (var f = 0, g = e.length; f < g; ++f) { | |
d = e[f][0]; | |
a = e[f][c.status]; | |
try { | |
A(a) ? d.resolve(a(c.value)) : 1 === c.status ? d.resolve(c.value) : d.reject(c.value) | |
} catch (C) { | |
d.reject(C), b(C) | |
} | |
} | |
})) | |
} | |
function g() { | |
this.promise = new d | |
} | |
function h(a) { | |
var b = new g; | |
b.reject(a); | |
return b.promise | |
} | |
function k(a, b, c) { | |
var d = null; | |
try { | |
A(c) && (d = c()) | |
} catch (K) { | |
return h(K) | |
} | |
return d && A(d.then) ? d.then(function() { | |
return b(a) | |
}, h) : b(a) | |
} | |
function l(a, b, c, d) { | |
var e = new g; | |
e.resolve(a); | |
return e.promise.then(b, c, d) | |
} | |
function m(a) { | |
if (!A(a)) throw p("norslvr", a); | |
var b = new g; | |
a(function(a) { | |
b.resolve(a) | |
}, | |
function(a) { | |
b.reject(a) | |
}); | |
return b.promise | |
} | |
var p = N("$q", TypeError); | |
Q(d.prototype, { | |
then: function(a, b, c) { | |
if (B(a) && B(b) && B(c)) return this; | |
var d = new g; | |
this.$$state.pending = this.$$state.pending || []; | |
this.$$state.pending.push([d, a, b, c]); | |
0 < this.$$state.status && f(this.$$state); | |
return d.promise | |
}, | |
"catch": function(a) { | |
return this.then(null, a) | |
}, | |
"finally": function(a, b) { | |
return this.then(function(b) { | |
return k(b, u, a) | |
}, function(b) { | |
return k(b, h, a) | |
}, b) | |
} | |
}); | |
Q(g.prototype, { | |
resolve: function(a) { | |
this.promise.$$state.status || | |
(a === this.promise ? this.$$reject(p("qcycle", a)) : this.$$resolve(a)) | |
}, | |
$$resolve: function(a) { | |
function c(a) { | |
k || (k = !0, h.$$resolve(a)) | |
} | |
function d(a) { | |
k || (k = !0, h.$$reject(a)) | |
} | |
var g, h = this, | |
k = !1; | |
try { | |
if (J(a) || A(a)) g = a && a.then; | |
A(g) ? (this.promise.$$state.status = -1, g.call(a, c, d, e(this, this.notify))) : (this.promise.$$state.value = a, this.promise.$$state.status = 1, f(this.promise.$$state)) | |
} catch (C) { | |
d(C), b(C) | |
} | |
}, | |
reject: function(a) { | |
this.promise.$$state.status || this.$$reject(a) | |
}, | |
$$reject: function(a) { | |
this.promise.$$state.value = | |
a; | |
this.promise.$$state.status = 2; | |
f(this.promise.$$state) | |
}, | |
notify: function(c) { | |
var d = this.promise.$$state.pending; | |
0 >= this.promise.$$state.status && d && d.length && a(function() { | |
for (var a, e, f = 0, g = d.length; f < g; f++) { | |
e = d[f][0]; | |
a = d[f][3]; | |
try { | |
e.notify(A(a) ? a(c) : c) | |
} catch (C) { | |
b(C) | |
} | |
} | |
}) | |
} | |
}); | |
var u = l; | |
m.prototype = d.prototype; | |
m.defer = c; | |
m.reject = h; | |
m.when = l; | |
m.resolve = u; | |
m.all = function(a) { | |
var b = new g, | |
c = 0, | |
d = L(a) ? [] : {}; | |
q(a, function(a, e) { | |
c++; | |
l(a).then(function(a) { | |
d[e] = a; | |
--c || b.resolve(d) | |
}, function(a) { | |
b.reject(a) | |
}) | |
}); | |
0 === c && b.resolve(d); | |
return b.promise | |
}; | |
m.race = function(a) { | |
var b = c(); | |
q(a, function(a) { | |
l(a).then(b.resolve, b.reject) | |
}); | |
return b.promise | |
}; | |
return m | |
} | |
function Jf() { | |
this.$get = ["$window", "$timeout", function(a, b) { | |
var c = a.requestAnimationFrame || a.webkitRequestAnimationFrame, | |
d = a.cancelAnimationFrame || a.webkitCancelAnimationFrame || a.webkitCancelRequestAnimationFrame, | |
e = !!c, | |
f = e ? function(a) { | |
var b = c(a); | |
return function() { | |
d(b) | |
} | |
} : function(a) { | |
var c = b(a, 16.66, !1); | |
return function() { | |
b.cancel(c) | |
} | |
}; | |
f.supported = e; | |
return f | |
}] | |
} | |
function Kf() { | |
function a(a) { | |
function b() { | |
this.$$watchers = | |
this.$$nextSibling = this.$$childHead = this.$$childTail = null; | |
this.$$listeners = {}; | |
this.$$listenerCount = {}; | |
this.$$watchersCount = 0; | |
this.$id = ++ub; | |
this.$$ChildScope = null | |
} | |
b.prototype = a; | |
return b | |
} | |
var b = 10, | |
c = N("$rootScope"), | |
d = null, | |
e = null; | |
this.digestTtl = function(a) { | |
arguments.length && (b = a); | |
return b | |
}; | |
this.$get = ["$exceptionHandler", "$parse", "$browser", function(f, g, h) { | |
function k(a) { | |
a.currentScope.$$destroyed = !0 | |
} | |
function l(a) { | |
9 === Oa && (a.$$childHead && l(a.$$childHead), a.$$nextSibling && l(a.$$nextSibling)); | |
a.$parent = a.$$nextSibling = | |
a.$$prevSibling = a.$$childHead = a.$$childTail = a.$root = a.$$watchers = null | |
} | |
function m() { | |
this.$id = ++ub; | |
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 | |
} | |
function p(a) { | |
if (K.$$phase) throw c("inprog", K.$$phase); | |
K.$$phase = a | |
} | |
function u(a, b) { | |
do a.$$watchersCount += b; while (a = a.$parent) | |
} | |
function r(a, b, c) { | |
do a.$$listenerCount[c] -= | |
b, 0 === a.$$listenerCount[c] && delete a.$$listenerCount[c]; while (a = a.$parent) | |
} | |
function E() {} | |
function w() { | |
for (; z.length;) try { | |
z.shift()() | |
} catch (F) { | |
f(F) | |
} | |
e = null | |
} | |
function n() { | |
null === e && (e = h.defer(function() { | |
K.$apply(w) | |
})) | |
} | |
m.prototype = { | |
constructor: m, | |
$new: function(b, c) { | |
var d; | |
c = c || this; | |
b ? (d = new m, d.$root = this.$root) : (this.$$ChildScope || (this.$$ChildScope = a(this)), d = new this.$$ChildScope); | |
d.$parent = c; | |
d.$$prevSibling = c.$$childTail; | |
c.$$childHead ? (c.$$childTail.$$nextSibling = d, c.$$childTail = d) : c.$$childHead = c.$$childTail = | |
d; | |
(b || c !== this) && d.$on("$destroy", k); | |
return d | |
}, | |
$watch: function(a, b, c, e) { | |
var f = g(a); | |
if (f.$$watchDelegate) return f.$$watchDelegate(this, b, c, f, a); | |
var h = this, | |
k = h.$$watchers, | |
l = { | |
fn: b, | |
last: E, | |
get: f, | |
exp: e || a, | |
eq: !!c | |
}; | |
d = null; | |
A(b) || (l.fn = G); | |
k || (k = h.$$watchers = [], k.$$digestWatchIndex = -1); | |
k.unshift(l); | |
k.$$digestWatchIndex++; | |
u(this, 1); | |
return function() { | |
var a = cb(k, l); | |
0 <= a && (u(h, -1), a < k.$$digestWatchIndex && k.$$digestWatchIndex--); | |
d = null | |
} | |
}, | |
$watchGroup: function(a, b) { | |
function c() { | |
h = !1; | |
k ? (k = !1, b(e, e, g)) : b(e, d, g) | |
} | |
var d = | |
Array(a.length), | |
e = Array(a.length), | |
f = [], | |
g = this, | |
h = !1, | |
k = !0; | |
if (!a.length) { | |
var l = !0; | |
g.$evalAsync(function() { | |
l && b(e, e, g) | |
}); | |
return function() { | |
l = !1 | |
} | |
} | |
if (1 === a.length) return this.$watch(a[0], function(a, c, f) { | |
e[0] = a; | |
d[0] = c; | |
b(e, a === c ? e : d, f) | |
}); | |
q(a, function(a, b) { | |
var k = g.$watch(a, function(a, f) { | |
e[b] = a; | |
d[b] = f; | |
h || (h = !0, g.$evalAsync(c)) | |
}); | |
f.push(k) | |
}); | |
return function() { | |
for (; f.length;) f.shift()() | |
} | |
}, | |
$watchCollection: function(a, b) { | |
function c(a) { | |
e = a; | |
var b, c, d, g; | |
if (!B(e)) { | |
if (J(e)) | |
if (ta(e)) | |
for (f !== p && (f = p, r = f.length = 0, l++), | |
a = e.length, r !== a && (l++, f.length = r = a), b = 0; b < a; b++) g = f[b], d = e[b], c = g !== g && d !== d, c || g === d || (l++, f[b] = d); | |
else { | |
f !== n && (f = n = {}, r = 0, l++); | |
a = 0; | |
for (b in e) wa.call(e, b) && (a++, d = e[b], g = f[b], b in f ? (c = g !== g && d !== d, c || g === d || (l++, f[b] = d)) : (r++, f[b] = d, l++)); | |
if (r > a) | |
for (b in l++, f) wa.call(e, b) || (r--, delete f[b]) | |
} | |
else f !== e && (f = e, l++); | |
return l | |
} | |
} | |
c.$stateful = !0; | |
var d = this, | |
e, f, h, k = 1 < b.length, | |
l = 0, | |
m = g(a, c), | |
p = [], | |
n = {}, | |
u = !0, | |
r = 0; | |
return this.$watch(m, function() { | |
u ? (u = !1, b(e, e, d)) : b(e, h, d); | |
if (k) | |
if (J(e)) | |
if (ta(e)) { | |
h = Array(e.length); | |
for (var a = 0; a < e.length; a++) h[a] = e[a] | |
} else | |
for (a in h = {}, e) wa.call(e, a) && (h[a] = e[a]); | |
else h = e | |
}) | |
}, | |
$digest: function() { | |
var a, g, k, l, m, n, u, r = b, | |
q, z = [], | |
P, x; | |
p("$digest"); | |
h.$$checkUrlChange(); | |
this === K && null !== e && (h.defer.cancel(e), w()); | |
d = null; | |
do { | |
u = !1; | |
q = this; | |
for (n = 0; n < y.length; n++) { | |
try { | |
x = y[n], x.scope.$eval(x.expression, x.locals) | |
} catch (va) { | |
f(va) | |
} | |
d = null | |
} | |
y.length = 0; | |
a: do { | |
if (n = q.$$watchers) | |
for (n.$$digestWatchIndex = n.length; n.$$digestWatchIndex--;) try { | |
if (a = n[n.$$digestWatchIndex]) | |
if (m = a.get, (g = m(q)) !== (k = a.last) && | |
!(a.eq ? oa(g, k) : fa(g) && fa(k))) u = !0, d = a, a.last = a.eq ? sa(g, null) : g, l = a.fn, l(g, k === E ? g : k, q), 5 > r && (P = 4 - r, z[P] || (z[P] = []), z[P].push({ | |
msg: A(a.exp) ? "fn: " + (a.exp.name || a.exp.toString()) : a.exp, | |
newVal: g, | |
oldVal: k | |
})); | |
else if (a === d) { | |
u = !1; | |
break a | |
} | |
} catch (va) { | |
f(va) | |
} | |
if (!(n = q.$$watchersCount && q.$$childHead || q !== this && q.$$nextSibling)) | |
for (; q !== this && !(n = q.$$nextSibling);) q = q.$parent | |
} while (q = n); | |
if ((u || y.length) && !r--) throw K.$$phase = null, c("infdig", b, z); | |
} while (u || y.length); | |
for (K.$$phase = null; t < C.length;) try { | |
C[t++]() | |
} catch (va) { | |
f(va) | |
} | |
C.length = | |
t = 0 | |
}, | |
$destroy: function() { | |
if (!this.$$destroyed) { | |
var a = this.$parent; | |
this.$broadcast("$destroy"); | |
this.$$destroyed = !0; | |
this === K && h.$$applicationDestroyed(); | |
u(this, -this.$$watchersCount); | |
for (var b in this.$$listenerCount) r(this, this.$$listenerCount[b], b); | |
a && a.$$childHead === this && (a.$$childHead = this.$$nextSibling); | |
a && a.$$childTail === this && (a.$$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 = G; | |
this.$on = this.$watch = this.$watchGroup = function() { | |
return G | |
}; | |
this.$$listeners = {}; | |
this.$$nextSibling = null; | |
l(this) | |
} | |
}, | |
$eval: function(a, b) { | |
return g(a)(this, b) | |
}, | |
$evalAsync: function(a, b) { | |
K.$$phase || y.length || h.defer(function() { | |
y.length && K.$digest() | |
}); | |
y.push({ | |
scope: this, | |
expression: g(a), | |
locals: b | |
}) | |
}, | |
$$postDigest: function(a) { | |
C.push(a) | |
}, | |
$apply: function(a) { | |
try { | |
p("$apply"); | |
try { | |
return this.$eval(a) | |
} finally { | |
K.$$phase = null | |
} | |
} catch (X) { | |
f(X) | |
} finally { | |
try { | |
K.$digest() | |
} catch (X) { | |
throw f(X), | |
X; | |
} | |
} | |
}, | |
$applyAsync: function(a) { | |
function b() { | |
c.$eval(a) | |
} | |
var c = this; | |
a && z.push(b); | |
a = g(a); | |
n() | |
}, | |
$on: function(a, b) { | |
var c = this.$$listeners[a]; | |
c || (this.$$listeners[a] = c = []); | |
c.push(b); | |
var d = this; | |
do d.$$listenerCount[a] || (d.$$listenerCount[a] = 0), d.$$listenerCount[a]++; while (d = d.$parent); | |
var e = this; | |
return function() { | |
var d = c.indexOf(b); - 1 !== d && (c[d] = null, r(e, 1, a)) | |
} | |
}, | |
$emit: function(a, b) { | |
var c = [], | |
d, e = this, | |
g = !1, | |
h = { | |
name: a, | |
targetScope: e, | |
stopPropagation: function() { | |
g = !0 | |
}, | |
preventDefault: function() { | |
h.defaultPrevented = !0 | |
}, | |
defaultPrevented: !1 | |
}, | |
k = db([h], arguments, 1), | |
l, m; | |
do { | |
d = e.$$listeners[a] || c; | |
h.currentScope = e; | |
l = 0; | |
for (m = d.length; l < m; l++) | |
if (d[l]) try { | |
d[l].apply(null, k) | |
} catch (Ye) { | |
f(Ye) | |
} else d.splice(l, 1), l--, m--; | |
if (g) return h.currentScope = null, h; | |
e = e.$parent | |
} while (e); | |
h.currentScope = null; | |
return h | |
}, | |
$broadcast: function(a, b) { | |
var c = this, | |
d = this, | |
e = { | |
name: a, | |
targetScope: this, | |
preventDefault: function() { | |
e.defaultPrevented = !0 | |
}, | |
defaultPrevented: !1 | |
}; | |
if (!this.$$listenerCount[a]) return e; | |
for (var g = db([e], arguments, 1), h, k; c = d;) { | |
e.currentScope = | |
c; | |
d = c.$$listeners[a] || []; | |
h = 0; | |
for (k = d.length; h < k; h++) | |
if (d[h]) try { | |
d[h].apply(null, g) | |
} catch (Y) { | |
f(Y) | |
} else d.splice(h, 1), h--, k--; | |
if (!(d = c.$$listenerCount[a] && c.$$childHead || c !== this && c.$$nextSibling)) | |
for (; c !== this && !(d = c.$$nextSibling);) c = c.$parent | |
} | |
e.currentScope = null; | |
return e | |
} | |
}; | |
var K = new m, | |
y = K.$$asyncQueue = [], | |
C = K.$$postDigestQueue = [], | |
z = K.$$applyAsyncQueue = [], | |
t = 0; | |
return K | |
}] | |
} | |
function Lf() { | |
var a = /^\s*(https?|ftp|mailto|tel|file):/, | |
b = /^\s*((https?|ftp|file|blob):|data:image\/)/; | |
this.aHrefSanitizationWhitelist = | |
function(b) { | |
return x(b) ? (a = b, this) : a | |
}; | |
this.imgSrcSanitizationWhitelist = function(a) { | |
return x(a) ? (b = a, this) : b | |
}; | |
this.$get = function() { | |
return function(c, d) { | |
var e = d ? b : a, | |
f; | |
f = Fa(c).href; | |
return "" === f || f.match(e) ? c : "unsafe:" + f | |
} | |
} | |
} | |
function Mf() { | |
this.$get = ["$window", "$document", function(a, b) { | |
var c = {}, | |
d = !(a.chrome && (a.chrome.app && a.chrome.app.runtime || !a.chrome.app && a.chrome.runtime && a.chrome.runtime.id)) && a.history && a.history.pushState, | |
e = parseInt((/android (\d+)/.exec(S((a.navigator || {}).userAgent)) || [])[1], 10), | |
f = /Boxee/i.test((a.navigator || {}).userAgent), | |
g = b[0] || {}, | |
h, k = /^(Moz|webkit|ms)(?=[A-Z])/, | |
l = g.body && g.body.style, | |
m = !1, | |
p = !1; | |
if (l) { | |
for (var u in l) | |
if (m = k.exec(u)) { | |
h = m[0]; | |
h = h[0].toUpperCase() + h.substr(1); | |
break | |
} | |
h || (h = "WebkitOpacity" in l && "webkit"); | |
m = !!("transition" in l || h + "Transition" in l); | |
p = !!("animation" in l || h + "Animation" in l); | |
!e || m && p || (m = I(l.webkitTransition), p = I(l.webkitAnimation)) | |
} | |
return { | |
history: !(!d || 4 > e || f), | |
hasEvent: function(a) { | |
if ("input" === a && 11 >= Oa) return !1; | |
if (B(c[a])) { | |
var b = g.createElement("div"); | |
c[a] = "on" + a in b | |
} | |
return c[a] | |
}, | |
csp: Ha(), | |
vendorPrefix: h, | |
transitions: m, | |
animations: p, | |
android: e | |
} | |
}] | |
} | |
function Nf() { | |
this.$get = ["$rootScope", "$browser", "$location", function(a, b, c) { | |
return { | |
findBindings: function(a, b, c) { | |
a = a.getElementsByClassName("ng-binding"); | |
var d = []; | |
q(a, function(a) { | |
var e = aa.element(a).data("$binding"); | |
e && q(e, function(e) { | |
c ? (new RegExp("(^|\\s)" + b.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08") + "(\\s|\\||$)")).test(e) && d.push(a) : -1 !== e.indexOf(b) && d.push(a) | |
}) | |
}); | |
return d | |
}, | |
findModels: function(a, b, c) { | |
for (var d = ["ng-", "data-ng-", "ng\\:"], e = 0; e < d.length; ++e) { | |
var f = a.querySelectorAll("[" + d[e] + "model" + (c ? "=" : "*=") + '"' + b + '"]'); | |
if (f.length) return f | |
} | |
}, | |
getLocation: function() { | |
return c.url() | |
}, | |
setLocation: function(b) { | |
b !== c.url() && (c.url(b), a.$digest()) | |
}, | |
whenStable: function(a) { | |
b.notifyWhenNoOutstandingRequests(a) | |
} | |
} | |
}] | |
} | |
function Of() { | |
this.$get = ["$rootScope", "$browser", "$q", "$$q", "$exceptionHandler", function(a, b, c, d, e) { | |
function f(f, k, l) { | |
A(f) || (l = k, k = f, f = G); | |
var h = xa.call(arguments, 3), | |
p = x(l) && !l, | |
u = (p ? d : c).defer(), | |
r = u.promise, | |
q; | |
q = b.defer(function() { | |
try { | |
u.resolve(f.apply(null, h)) | |
} catch (w) { | |
u.reject(w), e(w) | |
} finally { | |
delete g[r.$$timeoutId] | |
} | |
p || a.$apply() | |
}, k); | |
r.$$timeoutId = q; | |
g[q] = u; | |
return r | |
} | |
var g = {}; | |
f.cancel = function(a) { | |
return a && a.$$timeoutId in g ? (g[a.$$timeoutId].reject("canceled"), delete g[a.$$timeoutId], b.defer.cancel(a.$$timeoutId)) : !1 | |
}; | |
return f | |
}] | |
} | |
function Fa(a) { | |
Oa && (ba.setAttribute("href", a), a = ba.href); | |
ba.setAttribute("href", a); | |
return { | |
href: ba.href, | |
protocol: ba.protocol ? ba.protocol.replace(/:$/, | |
"") : "", | |
host: ba.host, | |
search: ba.search ? ba.search.replace(/^\?/, "") : "", | |
hash: ba.hash ? ba.hash.replace(/^#/, "") : "", | |
hostname: ba.hostname, | |
port: ba.port, | |
pathname: "/" === ba.pathname.charAt(0) ? ba.pathname : "/" + ba.pathname | |
} | |
} | |
function ld(a) { | |
a = I(a) ? Fa(a) : a; | |
return a.protocol === Gd.protocol && a.host === Gd.host | |
} | |
function Pf() { | |
this.$get = ha(H) | |
} | |
function Hd(a) { | |
function b(a) { | |
try { | |
return decodeURIComponent(a) | |
} catch (g) { | |
return a | |
} | |
} | |
var c = a[0] || {}, | |
d = {}, | |
e = ""; | |
return function() { | |
var a, g, h, k, l; | |
try { | |
a = c.cookie || "" | |
} catch (m) { | |
a = "" | |
} | |
if (a !== e) | |
for (e = | |
a, a = e.split("; "), d = {}, h = 0; h < a.length; h++) g = a[h], k = g.indexOf("="), 0 < k && (l = b(g.substring(0, k)), B(d[l]) && (d[l] = b(g.substring(k + 1)))); | |
return d | |
} | |
} | |
function Qf() { | |
this.$get = Hd | |
} | |
function Id(a) { | |
function b(c, d) { | |
if (J(c)) { | |
var e = {}; | |
q(c, function(a, c) { | |
e[c] = b(c, a) | |
}); | |
return e | |
} | |
return a.factory(c + "Filter", d) | |
} | |
this.register = b; | |
this.$get = ["$injector", function(a) { | |
return function(b) { | |
return a.get(b + "Filter") | |
} | |
}]; | |
b("currency", Jd); | |
b("date", Kd); | |
b("filter", Rf); | |
b("json", Sf); | |
b("limitTo", Tf); | |
b("lowercase", Uf); | |
b("number", Ld); | |
b("orderBy", | |
Md); | |
b("uppercase", Vf) | |
} | |
function Rf() { | |
return function(a, b, c, d) { | |
if (!ta(a)) { | |
if (null == a) return a; | |
throw N("filter")("notarray", a); | |
} | |
d = d || "$"; | |
var e; | |
switch (tc(b)) { | |
case "function": | |
break; | |
case "boolean": | |
case "null": | |
case "number": | |
case "string": | |
e = !0; | |
case "object": | |
b = Wf(b, c, d, e); | |
break; | |
default: | |
return a | |
} | |
return Array.prototype.filter.call(a, b) | |
} | |
} | |
function Wf(a, b, c, d) { | |
var e = J(a) && c in a; | |
!0 === b ? b = oa : A(b) || (b = function(a, b) { | |
if (B(a)) return !1; | |
if (null === a || null === b) return a === b; | |
if (J(b) || J(a) && !Fc(a)) return !1; | |
a = S("" + a); | |
b = S("" + | |
b); | |
return -1 !== a.indexOf(b) | |
}); | |
return function(f) { | |
return e && !J(f) ? Ma(f, a[c], b, c, !1) : Ma(f, a, b, c, d) | |
} | |
} | |
function Ma(a, b, c, d, e, f) { | |
var g = tc(a), | |
h = tc(b); | |
if ("string" === h && "!" === b.charAt(0)) return !Ma(a, b.substring(1), c, d, e); | |
if (L(a)) return a.some(function(a) { | |
return Ma(a, b, c, d, e) | |
}); | |
switch (g) { | |
case "object": | |
var k; | |
if (e) { | |
for (k in a) | |
if ("$" !== k.charAt(0) && Ma(a[k], b, c, d, !0)) return !0; | |
return f ? !1 : Ma(a, b, c, d, !1) | |
} | |
if ("object" === h) { | |
for (k in b) | |
if (f = b[k], !A(f) && !B(f) && (g = k === d, !Ma(g ? a : a[k], f, c, d, g, g))) return !1; | |
return !0 | |
} | |
return c(a, | |
b); | |
case "function": | |
return !1; | |
default: | |
return c(a, b) | |
} | |
} | |
function tc(a) { | |
return null === a ? "null" : typeof a | |
} | |
function Jd(a) { | |
var b = a.NUMBER_FORMATS; | |
return function(a, d, e) { | |
B(d) && (d = b.CURRENCY_SYM); | |
B(e) && (e = b.PATTERNS[1].maxFrac); | |
return null == a ? a : Nd(a, b.PATTERNS[1], b.GROUP_SEP, b.DECIMAL_SEP, e).replace(/\u00A4/g, d) | |
} | |
} | |
function Ld(a) { | |
var b = a.NUMBER_FORMATS; | |
return function(a, d) { | |
return null == a ? a : Nd(a, b.PATTERNS[0], b.GROUP_SEP, b.DECIMAL_SEP, d) | |
} | |
} | |
function Xf(a) { | |
var b = 0, | |
c, d, e, f, g; - 1 < (d = a.indexOf(Od)) && (a = a.replace(Od, "")); | |
0 < (e = a.search(/e/i)) ? (0 > d && (d = e), d += +a.slice(e + 1), a = a.substring(0, e)) : 0 > d && (d = a.length); | |
for (e = 0; a.charAt(e) === uc; e++); | |
if (e === (g = a.length)) c = [0], d = 1; | |
else { | |
for (g--; a.charAt(g) === uc;) g--; | |
d -= e; | |
c = []; | |
for (f = 0; e <= g; e++, f++) c[f] = +a.charAt(e) | |
} | |
d > Pd && (c = c.splice(0, Pd - 1), b = d - 1, d = 1); | |
return { | |
d: c, | |
e: b, | |
i: d | |
} | |
} | |
function Yf(a, b, c, d) { | |
var e = a.d, | |
f = e.length - a.i; | |
b = B(b) ? Math.min(Math.max(c, f), d) : +b; | |
c = b + a.i; | |
d = e[c]; | |
if (0 < c) { | |
e.splice(Math.max(a.i, c)); | |
for (var g = c; g < e.length; g++) e[g] = 0 | |
} else | |
for (f = Math.max(0, f), a.i = 1, e.length = Math.max(1, | |
c = b + 1), e[0] = 0, g = 1; g < c; g++) e[g] = 0; | |
if (5 <= d) | |
if (0 > c - 1) { | |
for (d = 0; d > c; d--) e.unshift(0), a.i++; | |
e.unshift(1); | |
a.i++ | |
} else e[c - 1]++; | |
for (; f < Math.max(0, b); f++) e.push(0); | |
if (b = e.reduceRight(function(a, b, c, d) { | |
b += a; | |
d[c] = b % 10; | |
return Math.floor(b / 10) | |
}, 0)) e.unshift(b), a.i++ | |
} | |
function Nd(a, b, c, d, e) { | |
if (!I(a) && !ca(a) || isNaN(a)) return ""; | |
var f = !isFinite(a), | |
g = !1, | |
h = Math.abs(a) + "", | |
k = ""; | |
if (f) k = "\u221e"; | |
else { | |
g = Xf(h); | |
Yf(g, e, b.minFrac, b.maxFrac); | |
k = g.d; | |
h = g.i; | |
e = g.e; | |
f = []; | |
for (g = k.reduce(function(a, b) { | |
return a && !b | |
}, !0); 0 > h;) k.unshift(0), | |
h++; | |
0 < h ? f = k.splice(h, k.length) : (f = k, k = [0]); | |
h = []; | |
for (k.length >= b.lgSize && h.unshift(k.splice(-b.lgSize, k.length).join("")); k.length > b.gSize;) h.unshift(k.splice(-b.gSize, k.length).join("")); | |
k.length && h.unshift(k.join("")); | |
k = h.join(c); | |
f.length && (k += d + f.join("")); | |
e && (k += "e+" + e) | |
} | |
return 0 > a && !g ? b.negPre + k + b.negSuf : b.posPre + k + b.posSuf | |
} | |
function Qb(a, b, c, d) { | |
var e = ""; | |
if (0 > a || d && 0 >= a) d ? a = -a + 1 : (a = -a, e = "-"); | |
for (a = "" + a; a.length < b;) a = uc + a; | |
c && (a = a.substr(a.length - b)); | |
return e + a | |
} | |
function Z(a, b, c, d, e) { | |
c = c || 0; | |
return function(f) { | |
f = | |
f["get" + a](); | |
if (0 < c || f > -c) f += c; | |
0 === f && -12 === c && (f = 12); | |
return Qb(f, b, d, e) | |
} | |
} | |
function pb(a, b, c) { | |
return function(d, e) { | |
var f = d["get" + a](), | |
g = Lb((c ? "STANDALONE" : "") + (b ? "SHORT" : "") + a); | |
return e[g][f] | |
} | |
} | |
function Qd(a) { | |
var b = (new Date(a, 0, 1)).getDay(); | |
return new Date(a, 0, (4 >= b ? 5 : 12) - b) | |
} | |
function Rd(a) { | |
return function(b) { | |
var c = Qd(b.getFullYear()); | |
b = new Date(b.getFullYear(), b.getMonth(), b.getDate() + (4 - b.getDay())); | |
return Qb(1 + Math.round((+b - +c) / 6048E5), a) | |
} | |
} | |
function vc(a, b) { | |
return 0 >= a.getFullYear() ? b.ERAS[0] : b.ERAS[1] | |
} | |
function Kd(a) { | |
function b(a) { | |
var b; | |
if (b = a.match(c)) { | |
a = new Date(0); | |
var d = 0, | |
g = 0, | |
h = b[8] ? a.setUTCFullYear : a.setFullYear, | |
k = b[8] ? a.setUTCHours : a.setHours; | |
b[9] && (d = parseInt(b[9] + b[10], 10), g = parseInt(b[9] + b[11], 10)); | |
h.call(a, parseInt(b[1], 10), parseInt(b[2], 10) - 1, parseInt(b[3], 10)); | |
d = parseInt(b[4] || 0, 10) - d; | |
g = parseInt(b[5] || 0, 10) - g; | |
h = parseInt(b[6] || 0, 10); | |
b = Math.round(1E3 * parseFloat("0." + (b[7] || 0))); | |
k.call(a, d, g, h, b) | |
} | |
return a | |
} | |
var c = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; | |
return function(c, e, f) { | |
var d = "", | |
h = [], | |
k, l; | |
e = e || "mediumDate"; | |
e = a.DATETIME_FORMATS[e] || e; | |
I(c) && (c = Zf.test(c) ? parseInt(c, 10) : b(c)); | |
ca(c) && (c = new Date(c)); | |
if (!la(c) || !isFinite(c.getTime())) return c; | |
for (; e;)(l = $f.exec(e)) ? (h = db(h, l, 1), e = h.pop()) : (h.push(e), e = null); | |
var m = c.getTimezoneOffset(); | |
f && (m = Ic(f, m), c = $b(c, f, !0)); | |
q(h, function(b) { | |
k = ag[b]; | |
d += k ? k(c, a.DATETIME_FORMATS, m) : "''" === b ? "'" : b.replace(/(^'|'$)/g, "").replace(/''/g, "'") | |
}); | |
return d | |
} | |
} | |
function Sf() { | |
return function(a, b) { | |
B(b) && (b = 2); | |
return fb(a, b) | |
} | |
} | |
function Tf() { | |
return function(a, b, c) { | |
b = Infinity === Math.abs(Number(b)) ? Number(b) : parseInt(b, 10); | |
if (fa(b)) return a; | |
ca(a) && (a = a.toString()); | |
if (!ta(a)) return a; | |
c = !c || isNaN(c) ? 0 : parseInt(c, 10); | |
c = 0 > c ? Math.max(0, a.length + c) : c; | |
return 0 <= b ? wc(a, c, c + b) : 0 === c ? wc(a, b, a.length) : wc(a, Math.max(0, c + b), c) | |
} | |
} | |
function wc(a, b, c) { | |
return I(a) ? a.slice(b, c) : xa.call(a, b, c) | |
} | |
function Md(a) { | |
function b(b) { | |
return b.map(function(b) { | |
var c = 1, | |
d = wb; | |
if (A(b)) d = b; | |
else if (I(b)) { | |
if ("+" === b.charAt(0) || "-" === b.charAt(0)) c = "-" === b.charAt(0) ? | |
-1 : 1, b = b.substring(1); | |
if ("" !== b && (d = a(b), d.constant)) var e = d(), | |
d = function(a) { | |
return a[e] | |
} | |
} | |
return { | |
get: d, | |
descending: c | |
} | |
}) | |
} | |
function c(a) { | |
switch (typeof a) { | |
case "number": | |
case "boolean": | |
case "string": | |
return !0; | |
default: | |
return !1 | |
} | |
} | |
function d(a, b) { | |
var c = 0, | |
d = a.type, | |
e = b.type; | |
if (d === e) { | |
var e = a.value, | |
f = b.value; | |
"string" === d ? (e = e.toLowerCase(), f = f.toLowerCase()) : "object" === d && (J(e) && (e = a.index), J(f) && (f = b.index)); | |
e !== f && (c = e < f ? -1 : 1) | |
} else c = d < e ? -1 : 1; | |
return c | |
} | |
return function(a, f, g, h) { | |
if (null == a) return a; | |
if (!ta(a)) throw N("orderBy")("notarray", | |
a); | |
L(f) || (f = [f]); | |
0 === f.length && (f = ["+"]); | |
var e = b(f), | |
l = g ? -1 : 1, | |
m = A(h) ? h : d; | |
a = Array.prototype.map.call(a, function(a, b) { | |
return { | |
value: a, | |
tieBreaker: { | |
value: b, | |
type: "number", | |
index: b | |
}, | |
predicateValues: e.map(function(d) { | |
var e = d.get(a); | |
d = typeof e; | |
if (null === e) d = "string", e = "null"; | |
else if ("object" === d) a: { | |
if (A(e.valueOf) && (e = e.valueOf(), c(e))) break a;Fc(e) && (e = e.toString(), c(e)) | |
} | |
return { | |
value: e, | |
type: d, | |
index: b | |
} | |
}) | |
} | |
}); | |
a.sort(function(a, b) { | |
for (var c = 0, d = e.length; c < d; c++) { | |
var f = m(a.predicateValues[c], b.predicateValues[c]); | |
if (f) return f * e[c].descending * l | |
} | |
return m(a.tieBreaker, b.tieBreaker) * l | |
}); | |
return a = a.map(function(a) { | |
return a.value | |
}) | |
} | |
} | |
function Xa(a) { | |
A(a) && (a = { | |
link: a | |
}); | |
a.restrict = a.restrict || "AC"; | |
return ha(a) | |
} | |
function Sd(a, b, c, d, e) { | |
var f = this, | |
g = []; | |
f.$error = {}; | |
f.$$success = {}; | |
f.$pending = void 0; | |
f.$name = e(b.name || b.ngForm || "")(c); | |
f.$dirty = !1; | |
f.$pristine = !0; | |
f.$valid = !0; | |
f.$invalid = !1; | |
f.$submitted = !1; | |
f.$$parentForm = Rb; | |
f.$rollbackViewValue = function() { | |
q(g, function(a) { | |
a.$rollbackViewValue() | |
}) | |
}; | |
f.$commitViewValue = function() { | |
q(g, | |
function(a) { | |
a.$commitViewValue() | |
}) | |
}; | |
f.$addControl = function(a) { | |
Ta(a.$name, "input"); | |
g.push(a); | |
a.$name && (f[a.$name] = a); | |
a.$$parentForm = f | |
}; | |
f.$$renameControl = function(a, b) { | |
var c = a.$name; | |
f[c] === a && delete f[c]; | |
f[b] = a; | |
a.$name = b | |
}; | |
f.$removeControl = function(a) { | |
a.$name && f[a.$name] === a && delete f[a.$name]; | |
q(f.$pending, function(b, c) { | |
f.$setValidity(c, null, a) | |
}); | |
q(f.$error, function(b, c) { | |
f.$setValidity(c, null, a) | |
}); | |
q(f.$$success, function(b, c) { | |
f.$setValidity(c, null, a) | |
}); | |
cb(g, a); | |
a.$$parentForm = Rb | |
}; | |
Td({ | |
ctrl: this, | |
$element: a, | |
set: function(a, b, c) { | |
var d = a[b]; | |
d ? -1 === d.indexOf(c) && d.push(c) : a[b] = [c] | |
}, | |
unset: function(a, b, c) { | |
var d = a[b]; | |
d && (cb(d, c), 0 === d.length && delete a[b]) | |
}, | |
$animate: d | |
}); | |
f.$setDirty = function() { | |
d.removeClass(a, Ya); | |
d.addClass(a, Sb); | |
f.$dirty = !0; | |
f.$pristine = !1; | |
f.$$parentForm.$setDirty() | |
}; | |
f.$setPristine = function() { | |
d.setClass(a, Ya, Sb + " ng-submitted"); | |
f.$dirty = !1; | |
f.$pristine = !0; | |
f.$submitted = !1; | |
q(g, function(a) { | |
a.$setPristine() | |
}) | |
}; | |
f.$setUntouched = function() { | |
q(g, function(a) { | |
a.$setUntouched() | |
}) | |
}; | |
f.$setSubmitted = function() { | |
d.addClass(a, | |
"ng-submitted"); | |
f.$submitted = !0; | |
f.$$parentForm.$setSubmitted() | |
} | |
} | |
function xc(a) { | |
a.$formatters.push(function(b) { | |
return a.$isEmpty(b) ? b : b.toString() | |
}) | |
} | |
function Za(a, b, c, d, e, f) { | |
var g = S(b[0].type); | |
if (!e.android) { | |
var h = !1; | |
b.on("compositionstart", function() { | |
h = !0 | |
}); | |
b.on("compositionend", function() { | |
h = !1; | |
l() | |
}) | |
} | |
var k, l = function(a) { | |
k && (f.defer.cancel(k), k = null); | |
if (!h) { | |
var e = b.val(); | |
a = a && a.type; | |
"password" === g || c.ngTrim && "false" === c.ngTrim || (e = W(e)); | |
(d.$viewValue !== e || "" === e && d.$$hasNativeValidators) && d.$setViewValue(e, | |
a) | |
} | |
}; | |
if (e.hasEvent("input")) b.on("input", l); | |
else { | |
var m = function(a, b, c) { | |
k || (k = f.defer(function() { | |
k = null; | |
b && b.value === c || l(a) | |
})) | |
}; | |
b.on("keydown", function(a) { | |
var b = a.keyCode; | |
91 === b || 15 < b && 19 > b || 37 <= b && 40 >= b || m(a, this, this.value) | |
}); | |
if (e.hasEvent("paste")) b.on("paste cut", m) | |
} | |
b.on("change", l); | |
if (Ud[g] && d.$$hasNativeValidators && g === c.type) b.on("keydown wheel mousedown", function(a) { | |
if (!k) { | |
var b = this.validity, | |
c = b.badInput, | |
d = b.typeMismatch; | |
k = f.defer(function() { | |
k = null; | |
b.badInput === c && b.typeMismatch === d || l(a) | |
}) | |
} | |
}); | |
d.$render = function() { | |
var a = d.$isEmpty(d.$viewValue) ? "" : d.$viewValue; | |
b.val() !== a && b.val(a) | |
} | |
} | |
function Tb(a, b) { | |
return function(c, d) { | |
var e, f; | |
if (la(c)) return c; | |
if (I(c)) { | |
'"' === c.charAt(0) && '"' === c.charAt(c.length - 1) && (c = c.substring(1, c.length - 1)); | |
if (bg.test(c)) return new Date(c); | |
a.lastIndex = 0; | |
if (e = a.exec(c)) return e.shift(), f = d ? { | |
yyyy: d.getFullYear(), | |
MM: d.getMonth() + 1, | |
dd: d.getDate(), | |
HH: d.getHours(), | |
mm: d.getMinutes(), | |
ss: d.getSeconds(), | |
sss: d.getMilliseconds() / 1E3 | |
} : { | |
yyyy: 1970, | |
MM: 1, | |
dd: 1, | |
HH: 0, | |
mm: 0, | |
ss: 0, | |
sss: 0 | |
}, | |
q(e, function(a, c) { | |
c < b.length && (f[b[c]] = +a) | |
}), new Date(f.yyyy, f.MM - 1, f.dd, f.HH, f.mm, f.ss || 0, 1E3 * f.sss || 0) | |
} | |
return NaN | |
} | |
} | |
function qb(a, b, c, d) { | |
return function(e, f, g, h, k, l, m) { | |
function p(a) { | |
return a && !(a.getTime && a.getTime() !== a.getTime()) | |
} | |
function u(a) { | |
return x(a) && !la(a) ? c(a) || void 0 : a | |
} | |
yc(e, f, g, h); | |
Za(e, f, g, h, k, l); | |
var r = h && h.$options && h.$options.timezone, | |
q; | |
h.$$parserName = a; | |
h.$parsers.push(function(a) { | |
if (h.$isEmpty(a)) return null; | |
if (b.test(a)) return a = c(a, q), r && (a = $b(a, r)), a | |
}); | |
h.$formatters.push(function(a) { | |
if (a && | |
!la(a)) throw rb("datefmt", a); | |
if (p(a)) return (q = a) && r && (q = $b(q, r, !0)), m("date")(a, d, r); | |
q = null; | |
return "" | |
}); | |
if (x(g.min) || g.ngMin) { | |
var w; | |
h.$validators.min = function(a) { | |
return !p(a) || B(w) || c(a) >= w | |
}; | |
g.$observe("min", function(a) { | |
w = u(a); | |
h.$validate() | |
}) | |
} | |
if (x(g.max) || g.ngMax) { | |
var n; | |
h.$validators.max = function(a) { | |
return !p(a) || B(n) || c(a) <= n | |
}; | |
g.$observe("max", function(a) { | |
n = u(a); | |
h.$validate() | |
}) | |
} | |
} | |
} | |
function yc(a, b, c, d) { | |
(d.$$hasNativeValidators = J(b[0].validity)) && d.$parsers.push(function(a) { | |
var c = b.prop("validity") || {}; | |
return c.badInput || c.typeMismatch ? void 0 : a | |
}) | |
} | |
function Vd(a) { | |
a.$$parserName = "number"; | |
a.$parsers.push(function(b) { | |
if (a.$isEmpty(b)) return null; | |
if (cg.test(b)) return parseFloat(b) | |
}); | |
a.$formatters.push(function(b) { | |
if (!a.$isEmpty(b)) { | |
if (!ca(b)) throw rb("numfmt", b); | |
b = b.toString() | |
} | |
return b | |
}) | |
} | |
function sb(a) { | |
x(a) && !ca(a) && (a = parseFloat(a)); | |
return fa(a) ? void 0 : a | |
} | |
function zc(a) { | |
var b = a.toString(), | |
c = b.indexOf("."); | |
return -1 === c ? -1 < a && 1 > a && (a = /e-(\d+)$/.exec(b)) ? Number(a[1]) : 0 : b.length - c - 1 | |
} | |
function Wd(a, b, c, d, e) { | |
if (x(d)) { | |
a = | |
a(d); | |
if (!a.constant) throw rb("constexpr", c, d); | |
return a(b) | |
} | |
return e | |
} | |
function Ac(a, b) { | |
a = "ngClass" + a; | |
return ["$animate", function(c) { | |
function d(a, b) { | |
var c = [], | |
d = 0; | |
a: for (; d < a.length; d++) { | |
for (var e = a[d], f = 0; f < b.length; f++) | |
if (e === b[f]) continue a; | |
c.push(e) | |
} | |
return c | |
} | |
function e(a) { | |
var b = []; | |
return L(a) ? (q(a, function(a) { | |
b = b.concat(e(a)) | |
}), b) : I(a) ? a.split(" ") : J(a) ? (q(a, function(a, c) { | |
a && (b = b.concat(c.split(" "))) | |
}), b) : a | |
} | |
return { | |
restrict: "AC", | |
link: function(f, g, h) { | |
function k(a) { | |
a = l(a, 1); | |
h.$addClass(a) | |
} | |
function l(a, | |
b) { | |
var c = g.data("$classCounts") || T(), | |
d = []; | |
q(a, function(a) { | |
if (0 < b || c[a]) c[a] = (c[a] || 0) + b, c[a] === +(0 < b) && d.push(a) | |
}); | |
g.data("$classCounts", c); | |
return d.join(" ") | |
} | |
function m(a, b) { | |
var e = d(b, a), | |
f = d(a, b), | |
e = l(e, 1), | |
f = l(f, -1); | |
e && e.length && c.addClass(g, e); | |
f && f.length && c.removeClass(g, f) | |
} | |
function p(a) { | |
if (!0 === b || (f.$index & 1) === b) { | |
var c = e(a || []); | |
if (!u) k(c); | |
else if (!oa(a, u)) { | |
var d = e(u); | |
m(d, c) | |
} | |
} | |
u = L(a) ? a.map(function(a) { | |
return ma(a) | |
}) : ma(a) | |
} | |
var u; | |
h.$observe("class", function(b) { | |
p(f.$eval(h[a])) | |
}); | |
"ngClass" !== a && f.$watch("$index", | |
function(a, c) { | |
var d = a & 1; | |
if (d !== (c & 1)) { | |
var f = e(u); | |
d === b ? k(f) : (d = l(f, -1), h.$removeClass(d)) | |
} | |
}); | |
f.$watch(h[a], p, !0) | |
} | |
} | |
}] | |
} | |
function Td(a) { | |
function b(a, b) { | |
b && !f[a] ? (k.addClass(e, a), f[a] = !0) : !b && f[a] && (k.removeClass(e, a), f[a] = !1) | |
} | |
function c(a, c) { | |
a = a ? "-" + Mc(a, "-") : ""; | |
b(tb + a, !0 === c); | |
b(Xd + a, !1 === c) | |
} | |
var d = a.ctrl, | |
e = a.$element, | |
f = {}, | |
g = a.set, | |
h = a.unset, | |
k = a.$animate; | |
f[Xd] = !(f[tb] = e.hasClass(tb)); | |
d.$setValidity = function(a, e, f) { | |
B(e) ? (d.$pending || (d.$pending = {}), g(d.$pending, a, f)) : (d.$pending && h(d.$pending, a, f), Yd(d.$pending) && | |
(d.$pending = void 0)); | |
Qa(e) ? e ? (h(d.$error, a, f), g(d.$$success, a, f)) : (g(d.$error, a, f), h(d.$$success, a, f)) : (h(d.$error, a, f), h(d.$$success, a, f)); | |
d.$pending ? (b(Zd, !0), d.$valid = d.$invalid = void 0, c("", null)) : (b(Zd, !1), d.$valid = Yd(d.$error), d.$invalid = !d.$valid, c("", d.$valid)); | |
e = d.$pending && d.$pending[a] ? void 0 : d.$error[a] ? !1 : d.$$success[a] ? !0 : null; | |
c(a, e); | |
d.$$parentForm.$setValidity(a, e, d) | |
} | |
} | |
function Yd(a) { | |
if (a) | |
for (var b in a) | |
if (a.hasOwnProperty(b)) return !1; | |
return !0 | |
} | |
function dg() { | |
this.SCE_CONTEXTS = $a; | |
this.resourceUrlWhitelist = | |
function(a) { | |
throw ka("noresourceurlwhitelist"); | |
}; | |
this.resourceUrlBlacklist = function(a) { | |
throw ka("noresourceurlblacklist"); | |
}; | |
this.$get = ["$injector", function(a) { | |
var b = function(a) { | |
throw ka("unsafe"); | |
}; | |
a.has("$sanitize") && (b = a.get("$sanitize")); | |
return { | |
trustAs: function(a, b) { | |
throw ka("notrustas"); | |
}, | |
getTrusted: function(c, d) { | |
if (null === d || B(d) || "" === d) return d; | |
if ("string" == typeof d) { | |
if (c == $a.TEMPLATE_URL) { | |
var e; | |
e = a.has("html2JsTemplatesCached") ? !a.get("html2JsTemplatesCached")() : !ng.safehtml.googSceHelper.isCOMPILED(); | |
if (e && ld(d)) return d; | |
throw ka("insecurl", d); | |
} | |
if (c == $a.RESOURCE_URL) throw ka("insecurl", d); | |
if (c == $a.HTML) return b(d); | |
throw ka("unsafe", c); | |
} | |
if (ng.safehtml.googSceHelper.isGoogHtmlType(d)) try { | |
return ng.safehtml.googSceHelper.unwrapGivenContext(c, d) | |
} catch (f) { | |
throw ka("googhtml", d, c); | |
} else throw ka("unsafe", c); | |
}, | |
valueOf: function(a) { | |
if (ng.safehtml.googSceHelper.isGoogHtmlType(a)) try { | |
return ng.safehtml.googSceHelper.unwrapAny(a) | |
} catch (d) { | |
throw ka("googhtml", a); | |
} else return a | |
} | |
} | |
}] | |
} | |
function eg() { | |
this.enabled = | |
function(a) { | |
if (arguments.length) throw ka("nodisabling"); | |
return !0 | |
}; | |
this.$get = ["$parse", "$sceDelegate", function(a, b) { | |
if (8 > Oa) throw ka("iequirks"); | |
if ("undefined" == typeof ng || !ng.safehtml || !ng.safehtml.googSceHelper) throw ka("nodep"); | |
var c = ma($a); | |
c.isEnabled = function() { | |
return !0 | |
}; | |
c.trustAs = b.trustAs; | |
c.getTrusted = b.getTrusted; | |
c.valueOf = b.valueOf; | |
c.parseAs = function(b, d) { | |
var e = a(d); | |
return e.literal && e.constant ? e : a(d, function(a) { | |
return c.getTrusted(b, a) | |
}) | |
}; | |
var d = c.parseAs, | |
e = c.getTrusted, | |
f = c.trustAs; | |
q($a, function(a, | |
b) { | |
var g = S(b); | |
c[ib("parse_as_" + g)] = function(b) { | |
return d(a, b) | |
}; | |
c[ib("get_trusted_" + g)] = function(b) { | |
return e(a, b) | |
}; | |
c[ib("trust_as_" + g)] = function(b) { | |
return f(a, b) | |
} | |
}); | |
return c | |
}] | |
} | |
function fg() { | |
var a; | |
this.httpOptions = function(b) { | |
return b ? (a = b, this) : a | |
}; | |
this.$get = ["$templateCache", "$http", "$q", "$sce", function(b, c, d, e) { | |
function f(g, h) { | |
f.totalPendingRequests++; | |
if (!I(g) || B(b.get(g))) g = e.getTrustedTemplateUrl(g); | |
var k = c.defaults && c.defaults.transformResponse; | |
L(k) ? k = k.filter(function(a) { | |
return a !== lc | |
}) : k === lc && | |
(k = null); | |
return c.get(g, Q({ | |
cache: b, | |
transformResponse: k | |
}, a))["finally"](function() { | |
f.totalPendingRequests-- | |
}).then(function(a) { | |
b.put(g, a.data); | |
return a.data | |
}, function(a) { | |
if (!h) throw da("tpload", g, a.status, a.statusText); | |
return d.reject(a) | |
}) | |
} | |
f.totalPendingRequests = 0; | |
return f | |
}] | |
} | |
var gg = /^\/(.+)\/([a-z]*)$/, | |
wa = Object.prototype.hasOwnProperty, | |
S = function(a) { | |
return I(a) ? a.toLowerCase() : a | |
}, | |
Lb = function(a) { | |
return I(a) ? a.toUpperCase() : a | |
}, | |
Oa, D, Ia, xa = [].slice, | |
cf = [].splice, | |
hg = [].push, | |
na = Object.prototype.toString, | |
Gc = Object.getPrototypeOf, | |
za = N("ng"), | |
aa = H.angular || (H.angular = {}), | |
fc, ub = 0; | |
Oa = H.document.documentMode; | |
var fa = Number.isNaN || function(a) { | |
return a !== a | |
}; | |
G.$inject = []; | |
wb.$inject = []; | |
var L = Array.isArray, | |
qe = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/, | |
W = function(a) { | |
return I(a) ? a.trim() : a | |
}, | |
Ha = function() { | |
if (!x(Ha.rules)) { | |
var a = H.document.querySelector("[ng-csp]") || H.document.querySelector("[data-ng-csp]"); | |
if (a) { | |
var b = a.getAttribute("ng-csp") || a.getAttribute("data-ng-csp"); | |
Ha.rules = { | |
noUnsafeEval: !b || -1 !== b.indexOf("no-unsafe-eval"), | |
noInlineStyle: !b || -1 !== b.indexOf("no-inline-style") | |
} | |
} else { | |
a = Ha; | |
try { | |
new Function(""), b = !1 | |
} catch (c) { | |
b = !0 | |
} | |
a.rules = { | |
noUnsafeEval: b, | |
noInlineStyle: !1 | |
} | |
} | |
} | |
return Ha.rules | |
}, | |
Ub = function() { | |
if (x(Ub.name_)) return Ub.name_; | |
var a, b, c = Na.length, | |
d, e; | |
for (b = 0; b < c; ++b) | |
if (d = Na[b], a = H.document.querySelector("[" + d.replace(":", "\\:") + "jq]")) { | |
e = a.getAttribute(d + "jq"); | |
break | |
} | |
return Ub.name_ = e | |
}, | |
te = /:/g, | |
Na = ["ng-", "data-ng-", "ng:", "x-ng-"], | |
we = function(a) { | |
var b = a.currentScript, | |
b = b && b.getAttribute("src"); | |
if (!b) return !0; | |
var c = a.createElement("a"); | |
c.href = b; | |
if (a.location.origin === c.origin) return !0; | |
switch (c.protocol) { | |
case "http:": | |
case "https:": | |
case "ftp:": | |
case "blob:": | |
case "file:": | |
case "data:": | |
return !0; | |
default: | |
return !1 | |
} | |
}(H.document), | |
ze = /[A-Z]/g, | |
$d = !1, | |
Ra = 3, | |
ig = { | |
full: "1.5.11-local+sha.f73a65146", | |
major: 1, | |
minor: 5, | |
dot: void 0, | |
codeName: "undefined" | |
}; | |
U.expando = "ng339"; | |
var kb = U.cache = {}, | |
Ge = 1; | |
U._data = function(a) { | |
return this.cache[a[this.expando]] || {} | |
}; | |
var Be = /([:\-_]+(.))/g, | |
Ce = /^moz([A-Z])/, | |
Bb = { | |
mouseleave: "mouseout", | |
mouseenter: "mouseover" | |
}, | |
cc = N("jqLite"), | |
Fe = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, | |
bc = /<|&#?\w+;/, | |
De = /<([\w:-]+)/, | |
Ee = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, | |
qa = { | |
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, "", ""] | |
}; | |
qa.optgroup = qa.option; | |
qa.tbody = qa.tfoot = | |
qa.colgroup = qa.caption = qa.thead; | |
qa.th = qa.td; | |
var Le = H.Node.prototype.contains || function(a) { | |
return !!(this.compareDocumentPosition(a) & 16) | |
}, | |
Va = U.prototype = { | |
ready: function(a) { | |
function b() { | |
c || (c = !0, a()) | |
} | |
var c = !1; | |
"complete" === H.document.readyState ? H.setTimeout(b) : (this.on("DOMContentLoaded", b), U(H).on("load", b)) | |
}, | |
toString: function() { | |
var a = []; | |
q(this, function(b) { | |
a.push("" + b) | |
}); | |
return "[" + a.join(", ") + "]" | |
}, | |
eq: function(a) { | |
return 0 <= a ? D(this[a]) : D(this[this.length + a]) | |
}, | |
length: 0, | |
push: hg, | |
sort: [].sort, | |
splice: [].splice | |
}, | |
Hb = {}; | |
q("multiple selected checked disabled readOnly required open".split(" "), function(a) { | |
Hb[S(a)] = a | |
}); | |
var Wc = {}; | |
q("input select option textarea button form details".split(" "), function(a) { | |
Wc[a] = !0 | |
}); | |
var dd = { | |
ngMinlength: "minlength", | |
ngMaxlength: "maxlength", | |
ngMin: "min", | |
ngMax: "max", | |
ngPattern: "pattern" | |
}; | |
q({ | |
data: ec, | |
removeData: jb, | |
hasData: function(a) { | |
for (var b in kb[a.ng339]) return !0; | |
return !1 | |
}, | |
cleanData: function(a) { | |
for (var b = 0, c = a.length; b < c; b++) jb(a[b]) | |
} | |
}, function(a, b) { | |
U[b] = a | |
}); | |
q({ | |
data: ec, | |
inheritedData: Fb, | |
scope: function(a) { | |
return D.data(a, "$scope") || Fb(a.parentNode || a, ["$isolateScope", "$scope"]) | |
}, | |
isolateScope: function(a) { | |
return D.data(a, "$isolateScope") || D.data(a, "$isolateScopeNoTemplate") | |
}, | |
controller: Tc, | |
injector: function(a) { | |
return Fb(a, "$injector") | |
}, | |
removeAttr: function(a, b) { | |
a.removeAttribute(b) | |
}, | |
hasClass: Cb, | |
css: function(a, b, c) { | |
b = ib(b); | |
if (x(c)) a.style[b] = c; | |
else return a.style[b] | |
}, | |
attr: function(a, b, c) { | |
var d = a.nodeType; | |
if (d !== Ra && 2 !== d && 8 !== d) | |
if (d = S(b), Hb[d]) | |
if (x(c)) c ? (a[b] = !0, a.setAttribute(b, d)) : (a[b] = !1, a.removeAttribute(d)); | |
else return a[b] || (a.attributes.getNamedItem(b) || G).specified ? d : void 0; | |
else if (x(c)) a.setAttribute(b, c); | |
else if (a.getAttribute) return a = a.getAttribute(b, 2), null === a ? void 0 : a | |
}, | |
prop: function(a, b, c) { | |
if (x(c)) a[b] = c; | |
else return a[b] | |
}, | |
text: function() { | |
function a(a, c) { | |
if (B(c)) { | |
var b = a.nodeType; | |
return 1 === b || b === Ra ? a.textContent : "" | |
} | |
a.textContent = c | |
} | |
a.$dv = ""; | |
return a | |
}(), | |
val: function(a, b) { | |
if (B(b)) { | |
if (a.multiple && "select" === ya(a)) { | |
var c = []; | |
q(a.options, function(a) { | |
a.selected && c.push(a.value || | |
a.text) | |
}); | |
return 0 === c.length ? null : c | |
} | |
return a.value | |
} | |
a.value = b | |
}, | |
html: function(a, b) { | |
if (B(b)) return a.innerHTML; | |
zb(a, !0); | |
a.innerHTML = b | |
}, | |
empty: Uc | |
}, function(a, b) { | |
U.prototype[b] = function(b, d) { | |
var c, f, g = this.length; | |
if (a !== Uc && B(2 === a.length && a !== Cb && a !== Tc ? b : d)) { | |
if (J(b)) { | |
for (c = 0; c < g; c++) | |
if (a === ec) a(this[c], b); | |
else | |
for (f in b) a(this[c], f, b[f]); | |
return this | |
} | |
c = a.$dv; | |
g = B(c) ? Math.min(g, 1) : g; | |
for (f = 0; f < g; f++) { | |
var h = a(this[f], b, d); | |
c = c ? c + h : h | |
} | |
return c | |
} | |
for (c = 0; c < g; c++) a(this[c], b, d); | |
return this | |
} | |
}); | |
q({ | |
removeData: jb, | |
on: function(a, b, c, d) { | |
if (x(d)) throw cc("onargs"); | |
if (Oc(a)) { | |
d = Ab(a, !0); | |
var e = d.events, | |
f = d.handle; | |
f || (f = d.handle = Ie(a, e)); | |
d = 0 <= b.indexOf(" ") ? b.split(" ") : [b]; | |
for (var g = d.length, h = function(b, d, g) { | |
var h = e[b]; | |
h || (h = e[b] = [], h.specialHandlerWrapper = d, "$destroy" === b || g || a.addEventListener(b, f, !1)); | |
h.push(c) | |
}; g--;) b = d[g], Bb[b] ? (h(Bb[b], Ke), h(b, void 0, !0)) : h(b) | |
} | |
}, | |
off: Sc, | |
one: function(a, b, c) { | |
a = D(a); | |
a.on(b, function e() { | |
a.off(b, c); | |
a.off(b, e) | |
}); | |
a.on(b, c) | |
}, | |
replaceWith: function(a, b) { | |
var c, d = a.parentNode; | |
zb(a); | |
q(new U(b), | |
function(b) { | |
c ? d.insertBefore(b, c.nextSibling) : d.replaceChild(b, a); | |
c = b | |
}) | |
}, | |
children: function(a) { | |
var b = []; | |
q(a.childNodes, function(a) { | |
1 === a.nodeType && b.push(a) | |
}); | |
return b | |
}, | |
contents: function(a) { | |
return a.contentDocument || a.childNodes || [] | |
}, | |
append: function(a, b) { | |
var c = a.nodeType; | |
if (1 === c || 11 === c) { | |
b = new U(b); | |
for (var c = 0, d = b.length; c < d; c++) a.appendChild(b[c]) | |
} | |
}, | |
prepend: function(a, b) { | |
if (1 === a.nodeType) { | |
var c = a.firstChild; | |
q(new U(b), function(b) { | |
a.insertBefore(b, c) | |
}) | |
} | |
}, | |
wrap: function(a, b) { | |
Qc(a, D(b).eq(0).clone()[0]) | |
}, | |
remove: Gb, | |
detach: function(a) { | |
Gb(a, !0) | |
}, | |
after: function(a, b) { | |
var c = a, | |
d = a.parentNode; | |
if (d) { | |
b = new U(b); | |
for (var e = 0, f = b.length; e < f; e++) { | |
var g = b[e]; | |
d.insertBefore(g, c.nextSibling); | |
c = g | |
} | |
} | |
}, | |
addClass: Eb, | |
removeClass: Db, | |
toggleClass: function(a, b, c) { | |
b && q(b.split(" "), function(b) { | |
var d = c; | |
B(d) && (d = !Cb(a, b)); | |
(d ? Eb : Db)(a, b) | |
}) | |
}, | |
parent: function(a) { | |
return (a = a.parentNode) && 11 !== a.nodeType ? a : null | |
}, | |
next: function(a) { | |
return a.nextElementSibling | |
}, | |
find: function(a, b) { | |
return a.getElementsByTagName ? a.getElementsByTagName(b) : [] | |
}, | |
clone: dc, | |
triggerHandler: function(a, b, c) { | |
var d, e, f = b.type || b, | |
g = Ab(a); | |
if (g = (g = g && g.events) && g[f]) d = { | |
preventDefault: function() { | |
this.defaultPrevented = !0 | |
}, | |
isDefaultPrevented: function() { | |
return !0 === this.defaultPrevented | |
}, | |
stopImmediatePropagation: function() { | |
this.immediatePropagationStopped = !0 | |
}, | |
isImmediatePropagationStopped: function() { | |
return !0 === this.immediatePropagationStopped | |
}, | |
stopPropagation: G, | |
type: f, | |
target: a | |
}, b.type && (d = Q(d, b)), b = ma(g), e = c ? [d].concat(c) : [d], q(b, function(b) { | |
d.isImmediatePropagationStopped() || | |
b.apply(a, e) | |
}) | |
} | |
}, function(a, b) { | |
U.prototype[b] = function(b, d, e) { | |
for (var c, g = 0, h = this.length; g < h; g++) B(c) ? (c = a(this[g], b, d, e), x(c) && (c = D(c))) : Rc(c, a(this[g], b, d, e)); | |
return x(c) ? c : this | |
} | |
}); | |
U.prototype.bind = U.prototype.on; | |
U.prototype.unbind = U.prototype.off; | |
Ua.prototype = { | |
put: function(a, b) { | |
this[Ja(a, this.nextUid)] = b | |
}, | |
get: function(a) { | |
return this[Ja(a, this.nextUid)] | |
}, | |
remove: function(a) { | |
var b = this[a = Ja(a, this.nextUid)]; | |
delete this[a]; | |
return b | |
} | |
}; | |
var jg = [function() { | |
this.$get = [function() { | |
return Ua | |
}] | |
}], | |
Oe = /^([^(]+?)=>/, | |
Pe = /^[^(]*\(\s*([^)]*)\)/m, | |
kg = /,/, | |
lg = /^\s*(_?)(\S+?)\1\s*$/, | |
Ne = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg, | |
Ka = N("$injector"); | |
gb.$$annotate = function(a, b, c) { | |
var d; | |
if ("function" === typeof a) { | |
if (!(d = a.$inject)) { | |
d = []; | |
if (a.length) { | |
if (b) throw I(c) && c || (c = a.name || Qe(a)), Ka("strictdi", c); | |
b = Xc(a); | |
q(b[1].split(kg), function(a) { | |
a.replace(lg, function(a, b, c) { | |
d.push(c) | |
}) | |
}) | |
} | |
a.$inject = d | |
} | |
} else L(a) ? (b = a.length - 1, Sa(a[b], "fn"), d = a.slice(0, b)) : Sa(a, "fn", !0); | |
return d | |
}; | |
var ae = N("$animate"), | |
mg = function() { | |
this.$get = G | |
}, | |
og = function() { | |
var a = | |
new Ua, | |
b = []; | |
this.$get = ["$$AnimateRunner", "$rootScope", function(c, d) { | |
function e(a, b, c) { | |
var d = !1; | |
b && (b = I(b) ? b.split(" ") : L(b) ? b : [], q(b, function(b) { | |
b && (d = !0, a[b] = c) | |
})); | |
return d | |
} | |
function f() { | |
q(b, function(b) { | |
var c = a.get(b); | |
if (c) { | |
var d = Se(b.attr("class")), | |
e = "", | |
f = ""; | |
q(c, function(a, b) { | |
a !== !!d[b] && (a ? e += (e.length ? " " : "") + b : f += (f.length ? " " : "") + b) | |
}); | |
q(b, function(a) { | |
e && Eb(a, e); | |
f && Db(a, f) | |
}); | |
a.remove(b) | |
} | |
}); | |
b.length = 0 | |
} | |
return { | |
enabled: G, | |
on: G, | |
off: G, | |
pin: G, | |
push: function(g, h, k, l) { | |
l && l(); | |
k = k || {}; | |
k.from && g.css(k.from); | |
k.to && g.css(k.to); | |
if (k.addClass || k.removeClass) | |
if (h = k.addClass, l = k.removeClass, k = a.get(g) || {}, h = e(k, h, !0), l = e(k, l, !1), h || l) a.put(g, k), b.push(g), 1 === b.length && d.$$postDigest(f); | |
g = new c; | |
g.complete(); | |
return g | |
} | |
} | |
}] | |
}, | |
pg = ["$provide", function(a) { | |
var b = this; | |
this.$$registeredAnimations = Object.create(null); | |
this.register = function(c, d) { | |
if (c && "." !== c.charAt(0)) throw ae("notcsel", c); | |
var e = c + "-animation"; | |
b.$$registeredAnimations[c.substr(1)] = e; | |
a.factory(e, d) | |
}; | |
this.classNameFilter = function(a) { | |
if (1 === arguments.length && | |
(this.$$classNameFilter = a instanceof RegExp ? a : null) && /(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString())) throw ae("nongcls", "ng-animate"); | |
return this.$$classNameFilter | |
}; | |
this.$get = ["$$animateQueue", function(a) { | |
function b(a, b, c) { | |
if (c) { | |
var d; | |
a: { | |
for (d = 0; d < c.length; d++) { | |
var e = c[d]; | |
if (1 === e.nodeType) { | |
d = e; | |
break a | |
} | |
} | |
d = void 0 | |
}!d || d.parentNode || d.previousElementSibling || (c = null) | |
} | |
c ? c.after(a) : b.prepend(a) | |
} | |
return { | |
on: a.on, | |
off: a.off, | |
pin: a.pin, | |
enabled: a.enabled, | |
cancel: function(a) { | |
a.end && a.end() | |
}, | |
enter: function(c, d, g, h) { | |
d = d && D(d); | |
g = g && D(g); | |
d = d || g.parent(); | |
b(c, d, g); | |
return a.push(c, "enter", Ba(h)) | |
}, | |
move: function(c, d, g, h) { | |
d = d && D(d); | |
g = g && D(g); | |
d = d || g.parent(); | |
b(c, d, g); | |
return a.push(c, "move", Ba(h)) | |
}, | |
leave: function(b, c) { | |
return a.push(b, "leave", Ba(c), function() { | |
b.remove() | |
}) | |
}, | |
addClass: function(b, c, d) { | |
d = Ba(d); | |
d.addClass = lb(d.addclass, c); | |
return a.push(b, "addClass", d) | |
}, | |
removeClass: function(b, c, d) { | |
d = Ba(d); | |
d.removeClass = lb(d.removeClass, c); | |
return a.push(b, "removeClass", d) | |
}, | |
setClass: function(b, c, d, h) { | |
h = Ba(h); | |
h.addClass = lb(h.addClass, c); | |
h.removeClass = lb(h.removeClass, d); | |
return a.push(b, "setClass", h) | |
}, | |
animate: function(b, c, d, h, k) { | |
k = Ba(k); | |
k.from = k.from ? Q(k.from, c) : c; | |
k.to = k.to ? Q(k.to, d) : d; | |
k.tempClasses = lb(k.tempClasses, h || "ng-inline-animate"); | |
return a.push(b, "animate", k) | |
} | |
} | |
}] | |
}], | |
qg = function() { | |
this.$get = ["$$rAF", function(a) { | |
function b(b) { | |
c.push(b); | |
1 < c.length || a(function() { | |
for (var a = 0; a < c.length; a++) c[a](); | |
c = [] | |
}) | |
} | |
var c = []; | |
return function() { | |
var a = !1; | |
b(function() { | |
a = !0 | |
}); | |
return function(c) { | |
a ? c() : b(c) | |
} | |
} | |
}] | |
}, | |
rg = function() { | |
this.$get = ["$q", "$sniffer", "$$animateAsyncRun", "$document", "$timeout", function(a, b, c, d, e) { | |
function f(a) { | |
this.setHost(a); | |
var b = c(); | |
this._doneCallbacks = []; | |
this._tick = function(a) { | |
var c = d[0]; | |
c && c.hidden ? e(a, 0, !1) : b(a) | |
}; | |
this._state = 0 | |
} | |
f.chain = function(a, b) { | |
function c() { | |
if (d === a.length) b(!0); | |
else a[d](function(a) { | |
!1 === a ? b(!1) : (d++, c()) | |
}) | |
} | |
var d = 0; | |
c() | |
}; | |
f.all = function(a, b) { | |
function c(c) { | |
e = e && c; | |
++d === a.length && b(e) | |
} | |
var d = 0, | |
e = !0; | |
q(a, function(a) { | |
a.done(c) | |
}) | |
}; | |
f.prototype = { | |
setHost: function(a) { | |
this.host = a || {} | |
}, | |
done: function(a) { | |
2 === | |
this._state ? a() : this._doneCallbacks.push(a) | |
}, | |
progress: G, | |
getPromise: function() { | |
if (!this.promise) { | |
var b = this; | |
this.promise = a(function(a, c) { | |
b.done(function(b) { | |
!1 === b ? c() : a() | |
}) | |
}) | |
} | |
return this.promise | |
}, | |
then: function(a, b) { | |
return this.getPromise().then(a, b) | |
}, | |
"catch": function(a) { | |
return this.getPromise()["catch"](a) | |
}, | |
"finally": function(a) { | |
return this.getPromise()["finally"](a) | |
}, | |
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(a) { | |
var b = this; | |
0 === b._state && (b._state = 1, b._tick(function() { | |
b._resolve(a) | |
})) | |
}, | |
_resolve: function(a) { | |
2 !== this._state && (q(this._doneCallbacks, function(b) { | |
b(a) | |
}), this._doneCallbacks.length = 0, this._state = 2) | |
} | |
}; | |
return f | |
}] | |
}, | |
sg = function() { | |
this.$get = ["$$rAF", "$q", "$$AnimateRunner", function(a, b, c) { | |
return function(b, e) { | |
function d() { | |
a(function() { | |
g.addClass && (b.addClass(g.addClass), g.addClass = | |
null); | |
g.removeClass && (b.removeClass(g.removeClass), g.removeClass = null); | |
g.to && (b.css(g.to), g.to = null); | |
h || k.complete(); | |
h = !0 | |
}); | |
return k | |
} | |
var g = e || {}; | |
g.$$prepared || (g = sa(g)); | |
g.cleanupStyles && (g.from = g.to = null); | |
g.from && (b.css(g.from), g.from = null); | |
var h, k = new c; | |
return { | |
start: d, | |
end: d | |
} | |
} | |
}] | |
}, | |
da = N("$compile"), | |
jc = new function() {}; | |
Yc.$inject = ["$provide", "$$sanitizeUriProvider"]; | |
Kb.prototype.isFirstChange = function() { | |
return this.previousValue === jc | |
}; | |
var Zc = /^((?:x|data)[:\-_])/i, | |
fd = N("$controller"), | |
ed = /^(\S+)(\s+as\s+([\w$]+))?$/, | |
tg = function() { | |
this.$get = ["$document", function(a) { | |
return function(b) { | |
b ? !b.nodeType && b instanceof D && (b = b[0]) : b = a[0].body; | |
return b.offsetWidth + 1 | |
} | |
}] | |
}, | |
gd = "application/json", | |
mc = { | |
"Content-Type": gd + ";charset=utf-8" | |
}, | |
kf = /^\[|^\{(?!\{)/, | |
lf = { | |
"[": /]$/, | |
"{": /}$/ | |
}, | |
jf = /^\)]\}',?\n/, | |
ug = N("$http"), | |
kd = function(a) { | |
return function() { | |
throw ug("legacy", a); | |
} | |
}, | |
Ga = aa.$interpolateMinErr = N("$interpolate"); | |
Ga.throwNoconcat = function(a) { | |
throw Ga("noconcat", a); | |
}; | |
Ga.interr = function(a, b) { | |
return Ga("interr", a, b.toString()) | |
}; | |
var vg = | |
function() { | |
this.$get = ["$window", function(a) { | |
function b(a) { | |
var b = function(a) { | |
b.data = a; | |
b.called = !0 | |
}; | |
b.id = a; | |
return b | |
} | |
var c = a.angular.callbacks, | |
d = {}; | |
return { | |
createCallback: function(a) { | |
a = "_" + (c.$$counter++).toString(36); | |
var e = "angular.callbacks." + a, | |
g = b(a); | |
d[e] = c[a] = g; | |
return e | |
}, | |
wasCalled: function(a) { | |
return d[a].called | |
}, | |
getResponse: function(a) { | |
return d[a].data | |
}, | |
removeCallback: function(a) { | |
delete c[d[a].id]; | |
delete d[a] | |
} | |
} | |
}] | |
}, | |
wg = /^([^?#]*)(\?([^#]*))?(#(.*))?$/, | |
sf = { | |
http: 80, | |
https: 443, | |
ftp: 21 | |
}, | |
nb = N("$location"), | |
tf = /^\s*[\\/]{2,}/, | |
xg = { | |
$$absUrl: "", | |
$$html5: !1, | |
$$replace: !1, | |
absUrl: Mb("$$absUrl"), | |
url: function(a) { | |
if (B(a)) return this.$$url; | |
var b = wg.exec(a); | |
(b[1] || "" === a) && this.path(decodeURIComponent(b[1])); | |
(b[2] || b[1] || "" === a) && this.search(b[3] || ""); | |
this.hash(b[5] || ""); | |
return this | |
}, | |
protocol: Mb("$$protocol"), | |
host: Mb("$$host"), | |
port: Mb("$$port"), | |
path: pd("$$path", function(a) { | |
a = null !== a ? a.toString() : ""; | |
return "/" === a.charAt(0) ? a : "/" + a | |
}), | |
search: function(a, b) { | |
switch (arguments.length) { | |
case 0: | |
return this.$$search; | |
case 1: | |
if (I(a) || | |
ca(a)) a = a.toString(), this.$$search = Kc(a); | |
else if (J(a)) a = sa(a, {}), q(a, function(b, d) { | |
null == b && delete a[d] | |
}), this.$$search = a; | |
else throw nb("isrcharg"); | |
break; | |
default: | |
B(b) || null === b ? delete this.$$search[a] : this.$$search[a] = b | |
} | |
this.$$compose(); | |
return this | |
}, | |
hash: pd("$$hash", function(a) { | |
return null !== a ? a.toString() : "" | |
}), | |
replace: function() { | |
this.$$replace = !0; | |
return this | |
} | |
}; | |
q([od, pc, oc], function(a) { | |
a.prototype = Object.create(xg); | |
a.prototype.state = function(b) { | |
if (!arguments.length) return this.$$state; | |
if (a !== oc || | |
!this.$$html5) throw nb("nostate"); | |
this.$$state = B(b) ? null : b; | |
return this | |
} | |
}); | |
var ga = N("$parse"), | |
rd = [].constructor, | |
sd = (!1).constructor, | |
td = Function.constructor, | |
ud = (0).constructor, | |
vd = {}.constructor, | |
wd = "".constructor, | |
Af = rd.prototype, | |
Bf = sd.prototype, | |
Ob = td.prototype, | |
Cf = ud.prototype, | |
xd = vd.prototype, | |
Df = wd.prototype, | |
xf = Ob.call, | |
yf = Ob.apply, | |
zf = Ob.bind, | |
Ff = xd.valueOf, | |
Vb = T(); | |
q("+ - * / % === !== == != < > <= >= && || ! = |".split(" "), function(a) { | |
Vb[a] = !0 | |
}); | |
var yg = { | |
n: "\n", | |
f: "\f", | |
r: "\r", | |
t: "\t", | |
v: "\v", | |
"'": "'", | |
'"': '"' | |
}, | |
rc = function(a) { | |
this.options = a | |
}; | |
rc.prototype = { | |
constructor: rc, | |
lex: function(a) { | |
this.text = a; | |
this.index = 0; | |
for (this.tokens = []; this.index < this.text.length;) | |
if (a = this.text.charAt(this.index), '"' === a || "'" === a) this.readString(a); | |
else if (this.isNumber(a) || "." === a && this.isNumber(this.peek())) this.readNumber(); | |
else if (this.isIdentifierStart(this.peekMultichar())) this.readIdent(); | |
else if (this.is(a, "(){}[].,;:?")) this.tokens.push({ | |
index: this.index, | |
text: a | |
}), this.index++; | |
else if (this.isWhitespace(a)) this.index++; | |
else { | |
var b = a + this.peek(), | |
c = b + this.peek(2), | |
d = Vb[b], | |
e = Vb[c]; | |
Vb[a] || d || e ? (a = e ? c : d ? b : a, this.tokens.push({ | |
index: this.index, | |
text: a, | |
operator: !0 | |
}), this.index += a.length) : this.throwError("Unexpected next character ", this.index, this.index + 1) | |
} | |
return this.tokens | |
}, | |
is: function(a, b) { | |
return -1 !== b.indexOf(a) | |
}, | |
peek: function(a) { | |
a = a || 1; | |
return this.index + a < this.text.length ? this.text.charAt(this.index + a) : !1 | |
}, | |
isNumber: function(a) { | |
return "0" <= a && "9" >= a && "string" === typeof a | |
}, | |
isWhitespace: function(a) { | |
return " " === a || "\r" === a || | |
"\t" === a || "\n" === a || "\v" === a || "\u00a0" === a | |
}, | |
isIdentifierStart: function(a) { | |
return this.options.isIdentifierStart ? this.options.isIdentifierStart(a, this.codePointAt(a)) : this.isValidIdentifierStart(a) | |
}, | |
isValidIdentifierStart: function(a) { | |
return "a" <= a && "z" >= a || "A" <= a && "Z" >= a || "_" === a || "$" === a | |
}, | |
isIdentifierContinue: function(a) { | |
return this.options.isIdentifierContinue ? this.options.isIdentifierContinue(a, this.codePointAt(a)) : this.isValidIdentifierContinue(a) | |
}, | |
isValidIdentifierContinue: function(a, b) { | |
return this.isValidIdentifierStart(a, | |
b) || this.isNumber(a) | |
}, | |
codePointAt: function(a) { | |
return 1 === a.length ? a.charCodeAt(0) : (a.charCodeAt(0) << 10) + a.charCodeAt(1) - 56613888 | |
}, | |
peekMultichar: function() { | |
var a = this.text.charAt(this.index), | |
b = this.peek(); | |
if (!b) return a; | |
var c = a.charCodeAt(0), | |
d = b.charCodeAt(0); | |
return 55296 <= c && 56319 >= c && 56320 <= d && 57343 >= d ? a + b : a | |
}, | |
isExpOperator: function(a) { | |
return "-" === a || "+" === a || this.isNumber(a) | |
}, | |
throwError: function(a, b, c) { | |
c = c || this.index; | |
b = x(b) ? "s " + b + "-" + this.index + " [" + this.text.substring(b, c) + "]" : " " + c; | |
throw ga("lexerr", | |
a, b, this.text); | |
}, | |
readNumber: function() { | |
for (var a = "", b = this.index; this.index < this.text.length;) { | |
var c = S(this.text.charAt(this.index)); | |
if ("." === c || this.isNumber(c)) a += c; | |
else { | |
var d = this.peek(); | |
if ("e" === c && this.isExpOperator(d)) a += c; | |
else if (this.isExpOperator(c) && d && this.isNumber(d) && "e" === a.charAt(a.length - 1)) a += c; | |
else if (!this.isExpOperator(c) || d && this.isNumber(d) || "e" !== a.charAt(a.length - 1)) break; | |
else this.throwError("Invalid exponent") | |
} | |
this.index++ | |
} | |
this.tokens.push({ | |
index: b, | |
text: a, | |
constant: !0, | |
value: Number(a) | |
}) | |
}, | |
readIdent: function() { | |
var a = this.index; | |
for (this.index += this.peekMultichar().length; this.index < this.text.length;) { | |
var b = this.peekMultichar(); | |
if (!this.isIdentifierContinue(b)) break; | |
this.index += b.length | |
} | |
this.tokens.push({ | |
index: a, | |
text: this.text.slice(a, this.index), | |
identifier: !0 | |
}) | |
}, | |
readString: function(a) { | |
var b = this.index; | |
this.index++; | |
for (var c = "", d = a, e = !1; this.index < this.text.length;) { | |
var f = this.text.charAt(this.index), | |
d = d + f; | |
if (e) "u" === f ? (e = this.text.substring(this.index + 1, this.index + 5), e.match(/[\da-f]{4}/i) || | |
this.throwError("Invalid unicode escape [\\u" + e + "]"), this.index += 4, c += String.fromCharCode(parseInt(e, 16))) : c += yg[f] || f, e = !1; | |
else if ("\\" === f) e = !0; | |
else { | |
if (f === a) { | |
this.index++; | |
this.tokens.push({ | |
index: b, | |
text: d, | |
constant: !0, | |
value: c | |
}); | |
return | |
} | |
c += f | |
} | |
this.index++ | |
} | |
this.throwError("Unterminated quote", b) | |
} | |
}; | |
var t = function(a, b) { | |
this.lexer = a; | |
this.options = b | |
}; | |
t.Program = "Program"; | |
t.ExpressionStatement = "ExpressionStatement"; | |
t.AssignmentExpression = "AssignmentExpression"; | |
t.ConditionalExpression = "ConditionalExpression"; | |
t.LogicalExpression = "LogicalExpression"; | |
t.BinaryExpression = "BinaryExpression"; | |
t.UnaryExpression = "UnaryExpression"; | |
t.CallExpression = "CallExpression"; | |
t.MemberExpression = "MemberExpression"; | |
t.Identifier = "Identifier"; | |
t.Literal = "Literal"; | |
t.ArrayExpression = "ArrayExpression"; | |
t.Property = "Property"; | |
t.ObjectExpression = "ObjectExpression"; | |
t.ThisExpression = "ThisExpression"; | |
t.LocalsExpression = "LocalsExpression"; | |
t.NGValueParameter = "NGValueParameter"; | |
t.prototype = { | |
ast: function(a) { | |
this.text = a; | |
this.tokens = this.lexer.lex(a); | |
a = this.program(); | |
0 !== this.tokens.length && this.throwError("is an unexpected token", this.tokens[0]); | |
return a | |
}, | |
program: function() { | |
for (var a = [];;) | |
if (0 < this.tokens.length && !this.peek("}", ")", ";", "]") && a.push(this.expressionStatement()), !this.expect(";")) return { | |
type: t.Program, | |
body: a | |
} | |
}, | |
expressionStatement: function() { | |
return { | |
type: t.ExpressionStatement, | |
expression: this.filterChain() | |
} | |
}, | |
filterChain: function() { | |
for (var a = this.expression(); this.expect("|");) a = this.filter(a); | |
return a | |
}, | |
expression: function() { | |
return this.assignment() | |
}, | |
assignment: function() { | |
var a = this.ternary(); | |
if (this.expect("=")) { | |
if (!Ad(a)) throw ga("lval"); | |
a = { | |
type: t.AssignmentExpression, | |
left: a, | |
right: this.assignment(), | |
operator: "=" | |
} | |
} | |
return a | |
}, | |
ternary: function() { | |
var a = this.logicalOR(), | |
b, c; | |
return this.expect("?") && (b = this.expression(), this.consume(":")) ? (c = this.expression(), { | |
type: t.ConditionalExpression, | |
test: a, | |
alternate: b, | |
consequent: c | |
}) : a | |
}, | |
logicalOR: function() { | |
for (var a = this.logicalAND(); this.expect("||");) a = { | |
type: t.LogicalExpression, | |
operator: "||", | |
left: a, | |
right: this.logicalAND() | |
}; | |
return a | |
}, | |
logicalAND: function() { | |
for (var a = this.equality(); this.expect("&&");) a = { | |
type: t.LogicalExpression, | |
operator: "&&", | |
left: a, | |
right: this.equality() | |
}; | |
return a | |
}, | |
equality: function() { | |
for (var a = this.relational(), b; b = this.expect("==", "!=", "===", "!==");) a = { | |
type: t.BinaryExpression, | |
operator: b.text, | |
left: a, | |
right: this.relational() | |
}; | |
return a | |
}, | |
relational: function() { | |
for (var a = this.additive(), b; b = this.expect("<", ">", "<=", ">=");) a = { | |
type: t.BinaryExpression, | |
operator: b.text, | |
left: a, | |
right: this.additive() | |
}; | |
return a | |
}, | |
additive: function() { | |
for (var a = | |
this.multiplicative(), b; b = this.expect("+", "-");) a = { | |
type: t.BinaryExpression, | |
operator: b.text, | |
left: a, | |
right: this.multiplicative() | |
}; | |
return a | |
}, | |
multiplicative: function() { | |
for (var a = this.unary(), b; b = this.expect("*", "/", "%");) a = { | |
type: t.BinaryExpression, | |
operator: b.text, | |
left: a, | |
right: this.unary() | |
}; | |
return a | |
}, | |
unary: function() { | |
var a; | |
return (a = this.expect("+", "-", "!")) ? { | |
type: t.UnaryExpression, | |
operator: a.text, | |
prefix: !0, | |
argument: this.unary() | |
} : this.primary() | |
}, | |
primary: function() { | |
var a; | |
this.expect("(") ? (a = this.filterChain(), | |
this.consume(")")) : this.expect("[") ? a = this.arrayDeclaration() : this.expect("{") ? a = this.object() : this.selfReferential.hasOwnProperty(this.peek().text) ? a = sa(this.selfReferential[this.consume().text]) : this.options.literals.hasOwnProperty(this.peek().text) ? a = { | |
type: t.Literal, | |
value: this.options.literals[this.consume().text] | |
} : this.peek().identifier ? a = this.identifier() : this.peek().constant ? a = this.constant() : this.throwError("not a primary expression", this.peek()); | |
for (var b; b = this.expect("(", "[", ".");) "(" === | |
b.text ? (a = { | |
type: t.CallExpression, | |
callee: a, | |
arguments: this.parseArguments() | |
}, this.consume(")")) : "[" === b.text ? (a = { | |
type: t.MemberExpression, | |
object: a, | |
property: this.expression(), | |
computed: !0 | |
}, this.consume("]")) : "." === b.text ? a = { | |
type: t.MemberExpression, | |
object: a, | |
property: this.identifier(), | |
computed: !1 | |
} : this.throwError("IMPOSSIBLE"); | |
return a | |
}, | |
filter: function(a) { | |
a = [a]; | |
for (var b = { | |
type: t.CallExpression, | |
callee: this.identifier(), | |
arguments: a, | |
filter: !0 | |
}; this.expect(":");) a.push(this.expression()); | |
return b | |
}, | |
parseArguments: function() { | |
var a = []; | |
if (")" !== this.peekToken().text) { | |
do a.push(this.filterChain()); while (this.expect(",")) | |
} | |
return a | |
}, | |
identifier: function() { | |
var a = this.consume(); | |
a.identifier || this.throwError("is not a valid identifier", a); | |
return { | |
type: t.Identifier, | |
name: a.text | |
} | |
}, | |
constant: function() { | |
return { | |
type: t.Literal, | |
value: this.consume().value | |
} | |
}, | |
arrayDeclaration: function() { | |
var a = []; | |
if ("]" !== this.peekToken().text) { | |
do { | |
if (this.peek("]")) break; | |
a.push(this.expression()) | |
} while (this.expect(",")) | |
} | |
this.consume("]"); | |
return { | |
type: t.ArrayExpression, | |
elements: a | |
} | |
}, | |
object: function() { | |
var a = [], | |
b; | |
if ("}" !== this.peekToken().text) { | |
do { | |
if (this.peek("}")) break; | |
b = { | |
type: t.Property, | |
kind: "init" | |
}; | |
this.peek().constant ? (b.key = this.constant(), b.computed = !1, this.consume(":"), b.value = this.expression()) : this.peek().identifier ? (b.key = this.identifier(), b.computed = !1, this.peek(":") ? (this.consume(":"), b.value = this.expression()) : b.value = b.key) : this.peek("[") ? (this.consume("["), b.key = this.expression(), this.consume("]"), b.computed = !0, this.consume(":"), b.value = this.expression()) : | |
this.throwError("invalid key", this.peek()); | |
a.push(b) | |
} while (this.expect(",")) | |
} | |
this.consume("}"); | |
return { | |
type: t.ObjectExpression, | |
properties: a | |
} | |
}, | |
throwError: function(a, b) { | |
throw ga("syntax", b.text, a, b.index + 1, this.text, this.text.substring(b.index)); | |
}, | |
consume: function(a) { | |
if (0 === this.tokens.length) throw ga("ueoe", this.text); | |
var b = this.expect(a); | |
b || this.throwError("is unexpected, expecting [" + a + "]", this.peek()); | |
return b | |
}, | |
peekToken: function() { | |
if (0 === this.tokens.length) throw ga("ueoe", this.text); | |
return this.tokens[0] | |
}, | |
peek: function(a, b, c, d) { | |
return this.peekAhead(0, a, b, c, d) | |
}, | |
peekAhead: function(a, b, c, d, e) { | |
if (this.tokens.length > a) { | |
a = this.tokens[a]; | |
var f = a.text; | |
if (f === b || f === c || f === d || f === e || !(b || c || d || e)) return a | |
} | |
return !1 | |
}, | |
expect: function(a, b, c, d) { | |
return (a = this.peek(a, b, c, d)) ? (this.tokens.shift(), a) : !1 | |
}, | |
selfReferential: { | |
"this": { | |
type: t.ThisExpression | |
}, | |
$locals: { | |
type: t.LocalsExpression | |
} | |
} | |
}; | |
Dd.prototype = { | |
compile: function(a, b) { | |
var c = this, | |
d = this.astBuilder.ast(a); | |
this.state = { | |
nextId: 0, | |
filters: {}, | |
expensiveChecks: b, | |
fn: { | |
vars: [], | |
body: [], | |
own: {} | |
}, | |
assign: { | |
vars: [], | |
body: [], | |
own: {} | |
}, | |
inputs: [] | |
}; | |
V(d, c.$filter); | |
var e = "", | |
f; | |
this.stage = "assign"; | |
if (f = Bd(d)) this.state.computing = "assign", e = this.nextId(), this.recurse(f, e), this.return_(e), e = "fn.assign=" + this.generateFunction("assign", "s,v,l"); | |
f = zd(d.body); | |
c.stage = "inputs"; | |
q(f, function(a, b) { | |
var d = "fn" + b; | |
c.state[d] = { | |
vars: [], | |
body: [], | |
own: {} | |
}; | |
c.state.computing = d; | |
var e = c.nextId(); | |
c.recurse(a, e); | |
c.return_(e); | |
c.state.inputs.push(d); | |
a.watchId = b | |
}); | |
this.state.computing = "fn"; | |
this.stage = "main"; | |
this.recurse(d); | |
e = '"' + this.USE + " " + this.STRICT + '";\n' + this.filterPrefix() + "var fn=" + this.generateFunction("fn", "s,l,a,i") + e + this.watchFns() + "return fn;"; | |
e = (new Function("$filter", "ensureSafeMemberName", "ensureSafeObject", "ensureSafeFunction", "getStringValue", "ensureSafeAssignContext", "ifDefined", "plus", "text", e))(this.$filter, Wa, ra, qd, wf, Nb, Ef, yd, a); | |
this.state = this.stage = void 0; | |
e.literal = Cd(d); | |
e.constant = d.constant; | |
return e | |
}, | |
USE: "use", | |
STRICT: "strict", | |
watchFns: function() { | |
var a = [], | |
b = this.state.inputs, | |
c = this; | |
q(b, function(b) { | |
a.push("var " + | |
b + "=" + c.generateFunction(b, "s")) | |
}); | |
b.length && a.push("fn.inputs=[" + b.join(",") + "];"); | |
return a.join("") | |
}, | |
generateFunction: function(a, b) { | |
return "function(" + b + "){" + this.varsPrefix(a) + this.body(a) + "};" | |
}, | |
filterPrefix: function() { | |
var a = [], | |
b = this; | |
q(this.state.filters, function(c, d) { | |
a.push(c + "=$filter(" + b.escape(d) + ")") | |
}); | |
return a.length ? "var " + a.join(",") + ";" : "" | |
}, | |
varsPrefix: function(a) { | |
return this.state[a].vars.length ? "var " + this.state[a].vars.join(",") + ";" : "" | |
}, | |
body: function(a) { | |
return this.state[a].body.join("") | |
}, | |
recurse: function(a, b, c, d, e, f) { | |
var g, h, k = this, | |
l, m, p; | |
d = d || G; | |
if (!f && x(a.watchId)) b = b || this.nextId(), this.if_("i", this.lazyAssign(b, this.computedMember("i", a.watchId)), this.lazyRecurse(a, b, c, d, e, !0)); | |
else switch (a.type) { | |
case t.Program: | |
q(a.body, function(b, c) { | |
k.recurse(b.expression, void 0, void 0, function(a) { | |
h = a | |
}); | |
c !== a.body.length - 1 ? k.current().body.push(h, ";") : k.return_(h) | |
}); | |
break; | |
case t.Literal: | |
m = this.escape(a.value); | |
this.assign(b, m); | |
d(m); | |
break; | |
case t.UnaryExpression: | |
this.recurse(a.argument, void 0, void 0, | |
function(a) { | |
h = a | |
}); | |
m = a.operator + "(" + this.ifDefined(h, 0) + ")"; | |
this.assign(b, m); | |
d(m); | |
break; | |
case t.BinaryExpression: | |
this.recurse(a.left, void 0, void 0, function(a) { | |
g = a | |
}); | |
this.recurse(a.right, void 0, void 0, function(a) { | |
h = a | |
}); | |
m = "+" === a.operator ? this.plus(g, h) : "-" === a.operator ? this.ifDefined(g, 0) + a.operator + this.ifDefined(h, 0) : "(" + g + ")" + a.operator + "(" + h + ")"; | |
this.assign(b, m); | |
d(m); | |
break; | |
case t.LogicalExpression: | |
b = b || this.nextId(); | |
k.recurse(a.left, b); | |
k.if_("&&" === a.operator ? b : k.not(b), k.lazyRecurse(a.right, b)); | |
d(b); | |
break; | |
case t.ConditionalExpression: | |
b = b || this.nextId(); | |
k.recurse(a.test, b); | |
k.if_(b, k.lazyRecurse(a.alternate, b), k.lazyRecurse(a.consequent, b)); | |
d(b); | |
break; | |
case t.Identifier: | |
b = b || this.nextId(); | |
c && (c.context = "inputs" === k.stage ? "s" : this.assign(this.nextId(), this.getHasOwnProperty("l", a.name) + "?l:s"), c.computed = !1, c.name = a.name); | |
Wa(a.name); | |
k.if_("inputs" === k.stage || k.not(k.getHasOwnProperty("l", a.name)), function() { | |
k.if_("inputs" === k.stage || "s", function() { | |
e && 1 !== e && k.if_(k.not(k.nonComputedMember("s", | |
a.name)), k.lazyAssign(k.nonComputedMember("s", a.name), "{}")); | |
k.assign(b, k.nonComputedMember("s", a.name)) | |
}) | |
}, b && k.lazyAssign(b, k.nonComputedMember("l", a.name))); | |
(k.state.expensiveChecks || Pb(a.name)) && k.addEnsureSafeObject(b); | |
d(b); | |
break; | |
case t.MemberExpression: | |
g = c && (c.context = this.nextId()) || this.nextId(); | |
b = b || this.nextId(); | |
k.recurse(a.object, g, void 0, function() { | |
k.if_(k.notNull(g), function() { | |
e && 1 !== e && k.addEnsureSafeAssignContext(g); | |
if (a.computed) h = k.nextId(), k.recurse(a.property, h), k.getStringValue(h), | |
k.addEnsureSafeMemberName(h), e && 1 !== e && k.if_(k.not(k.computedMember(g, h)), k.lazyAssign(k.computedMember(g, h), "{}")), m = k.ensureSafeObject(k.computedMember(g, h)), k.assign(b, m), c && (c.computed = !0, c.name = h); | |
else { | |
Wa(a.property.name); | |
e && 1 !== e && k.if_(k.not(k.nonComputedMember(g, a.property.name)), k.lazyAssign(k.nonComputedMember(g, a.property.name), "{}")); | |
m = k.nonComputedMember(g, a.property.name); | |
if (k.state.expensiveChecks || Pb(a.property.name)) m = k.ensureSafeObject(m); | |
k.assign(b, m); | |
c && (c.computed = !1, c.name = a.property.name) | |
} | |
}, | |
function() { | |
k.assign(b, "undefined") | |
}); | |
d(b) | |
}, !!e); | |
break; | |
case t.CallExpression: | |
b = b || this.nextId(); | |
a.filter ? (h = k.filter(a.callee.name), l = [], q(a.arguments, function(a) { | |
var b = k.nextId(); | |
k.recurse(a, b); | |
l.push(b) | |
}), m = h + "(" + l.join(",") + ")", k.assign(b, m), d(b)) : (h = k.nextId(), g = {}, l = [], k.recurse(a.callee, h, g, function() { | |
k.if_(k.notNull(h), function() { | |
k.addEnsureSafeFunction(h); | |
q(a.arguments, function(a) { | |
k.recurse(a, k.nextId(), void 0, function(a) { | |
l.push(k.ensureSafeObject(a)) | |
}) | |
}); | |
g.name ? (k.state.expensiveChecks || k.addEnsureSafeObject(g.context), | |
m = k.member(g.context, g.name, g.computed) + "(" + l.join(",") + ")") : m = h + "(" + l.join(",") + ")"; | |
m = k.ensureSafeObject(m); | |
k.assign(b, m) | |
}, function() { | |
k.assign(b, "undefined") | |
}); | |
d(b) | |
})); | |
break; | |
case t.AssignmentExpression: | |
h = this.nextId(); | |
g = {}; | |
this.recurse(a.left, void 0, g, function() { | |
k.if_(k.notNull(g.context), function() { | |
k.recurse(a.right, h); | |
k.addEnsureSafeObject(k.member(g.context, g.name, g.computed)); | |
k.addEnsureSafeAssignContext(g.context); | |
m = k.member(g.context, g.name, g.computed) + a.operator + h; | |
k.assign(b, m); | |
d(b || m) | |
}) | |
}, | |
1); | |
break; | |
case t.ArrayExpression: | |
l = []; | |
q(a.elements, function(a) { | |
k.recurse(a, k.nextId(), void 0, function(a) { | |
l.push(a) | |
}) | |
}); | |
m = "[" + l.join(",") + "]"; | |
this.assign(b, m); | |
d(m); | |
break; | |
case t.ObjectExpression: | |
l = []; | |
p = !1; | |
q(a.properties, function(a) { | |
a.computed && (p = !0) | |
}); | |
p ? (b = b || this.nextId(), this.assign(b, "{}"), q(a.properties, function(a) { | |
a.computed ? (g = k.nextId(), k.recurse(a.key, g)) : g = a.key.type === t.Identifier ? a.key.name : "" + a.key.value; | |
h = k.nextId(); | |
k.recurse(a.value, h); | |
k.assign(k.member(b, g, a.computed), h) | |
})) : (q(a.properties, | |
function(b) { | |
k.recurse(b.value, a.constant ? void 0 : k.nextId(), void 0, function(a) { | |
l.push(k.escape(b.key.type === t.Identifier ? b.key.name : "" + b.key.value) + ":" + a) | |
}) | |
}), m = "{" + l.join(",") + "}", this.assign(b, m)); | |
d(b || m); | |
break; | |
case t.ThisExpression: | |
this.assign(b, "s"); | |
d("s"); | |
break; | |
case t.LocalsExpression: | |
this.assign(b, "l"); | |
d("l"); | |
break; | |
case t.NGValueParameter: | |
this.assign(b, "v"), d("v") | |
} | |
}, | |
getHasOwnProperty: function(a, b) { | |
var c = a + "." + b, | |
d = this.current().own; | |
d.hasOwnProperty(c) || (d[c] = this.nextId(!1, a + "&&(" + this.escape(b) + | |
" in " + a + ")")); | |
return d[c] | |
}, | |
assign: function(a, b) { | |
if (a) return this.current().body.push(a, "=", b, ";"), a | |
}, | |
filter: function(a) { | |
this.state.filters.hasOwnProperty(a) || (this.state.filters[a] = this.nextId(!0)); | |
return this.state.filters[a] | |
}, | |
ifDefined: function(a, b) { | |
return "ifDefined(" + a + "," + this.escape(b) + ")" | |
}, | |
plus: function(a, b) { | |
return "plus(" + a + "," + b + ")" | |
}, | |
return_: function(a) { | |
this.current().body.push("return ", a, ";") | |
}, | |
if_: function(a, b, c) { | |
if (!0 === a) b(); | |
else { | |
var d = this.current().body; | |
d.push("if(", a, "){"); | |
b(); | |
d.push("}"); | |
c && (d.push("else{"), c(), d.push("}")) | |
} | |
}, | |
not: function(a) { | |
return "!(" + a + ")" | |
}, | |
notNull: function(a) { | |
return a + "!=null" | |
}, | |
nonComputedMember: function(a, b) { | |
var c = /[^$_a-zA-Z0-9]/g; | |
return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b) ? a + "." + b : a + '["' + b.replace(c, this.stringEscapeFn) + '"]' | |
}, | |
computedMember: function(a, b) { | |
return a + "[" + b + "]" | |
}, | |
member: function(a, b, c) { | |
return c ? this.computedMember(a, b) : this.nonComputedMember(a, b) | |
}, | |
addEnsureSafeObject: function(a) { | |
this.current().body.push(this.ensureSafeObject(a), ";") | |
}, | |
addEnsureSafeMemberName: function(a) { | |
this.current().body.push(this.ensureSafeMemberName(a), | |
";") | |
}, | |
addEnsureSafeFunction: function(a) { | |
this.current().body.push(this.ensureSafeFunction(a), ";") | |
}, | |
addEnsureSafeAssignContext: function(a) { | |
this.current().body.push(this.ensureSafeAssignContext(a), ";") | |
}, | |
ensureSafeObject: function(a) { | |
return "ensureSafeObject(" + a + ",text)" | |
}, | |
ensureSafeMemberName: function(a) { | |
return "ensureSafeMemberName(" + a + ",text)" | |
}, | |
ensureSafeFunction: function(a) { | |
return "ensureSafeFunction(" + a + ",text)" | |
}, | |
getStringValue: function(a) { | |
this.assign(a, "getStringValue(" + a + ")") | |
}, | |
ensureSafeAssignContext: function(a) { | |
return "ensureSafeAssignContext(" + | |
a + ",text)" | |
}, | |
lazyRecurse: function(a, b, c, d, e, f) { | |
var g = this; | |
return function() { | |
g.recurse(a, b, c, d, e, f) | |
} | |
}, | |
lazyAssign: function(a, b) { | |
var c = this; | |
return function() { | |
c.assign(a, b) | |
} | |
}, | |
stringEscapeRegex: /[^ a-zA-Z0-9]/g, | |
stringEscapeFn: function(a) { | |
return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) | |
}, | |
escape: function(a) { | |
if (I(a)) return "'" + a.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'"; | |
if (ca(a)) return a.toString(); | |
if (!0 === a) return "true"; | |
if (!1 === a) return "false"; | |
if (null === a) return "null"; | |
if ("undefined" === | |
typeof a) return "undefined"; | |
throw ga("esc"); | |
}, | |
nextId: function(a, b) { | |
var c = "v" + this.state.nextId++; | |
a || this.current().vars.push(c + (b ? "=" + b : "")); | |
return c | |
}, | |
current: function() { | |
return this.state[this.state.computing] | |
} | |
}; | |
Ed.prototype = { | |
compile: function(a, b) { | |
var c = this, | |
d = this.astBuilder.ast(a); | |
this.expression = a; | |
this.expensiveChecks = b; | |
V(d, c.$filter); | |
var e, f; | |
if (e = Bd(d)) f = this.recurse(e); | |
e = zd(d.body); | |
var g; | |
e && (g = [], q(e, function(a, b) { | |
var d = c.recurse(a); | |
a.input = d; | |
g.push(d); | |
a.watchId = b | |
})); | |
var h = []; | |
q(d.body, function(a) { | |
h.push(c.recurse(a.expression)) | |
}); | |
e = 0 === d.body.length ? G : 1 === d.body.length ? h[0] : function(a, b) { | |
var c; | |
q(h, function(d) { | |
c = d(a, b) | |
}); | |
return c | |
}; | |
f && (e.assign = function(a, b, c) { | |
return f(a, c, b) | |
}); | |
g && (e.inputs = g); | |
e.literal = Cd(d); | |
e.constant = d.constant; | |
return e | |
}, | |
recurse: function(a, b, c) { | |
var d, e, f = this, | |
g; | |
if (a.input) return this.inputs(a.input, a.watchId); | |
switch (a.type) { | |
case t.Literal: | |
return this.value(a.value, b); | |
case t.UnaryExpression: | |
return e = this.recurse(a.argument), this["unary" + a.operator](e, b); | |
case t.BinaryExpression: | |
return d = this.recurse(a.left), | |
e = this.recurse(a.right), this["binary" + a.operator](d, e, b); | |
case t.LogicalExpression: | |
return d = this.recurse(a.left), e = this.recurse(a.right), this["binary" + a.operator](d, e, b); | |
case t.ConditionalExpression: | |
return this["ternary?:"](this.recurse(a.test), this.recurse(a.alternate), this.recurse(a.consequent), b); | |
case t.Identifier: | |
return Wa(a.name, f.expression), f.identifier(a.name, f.expensiveChecks || Pb(a.name), b, c, f.expression); | |
case t.MemberExpression: | |
return d = this.recurse(a.object, !1, !!c), a.computed || (Wa(a.property.name, | |
f.expression), e = a.property.name), a.computed && (e = this.recurse(a.property)), a.computed ? this.computedMember(d, e, b, c, f.expression) : this.nonComputedMember(d, e, f.expensiveChecks, b, c, f.expression); | |
case t.CallExpression: | |
return g = [], q(a.arguments, function(a) { | |
g.push(f.recurse(a)) | |
}), a.filter && (e = this.$filter(a.callee.name)), a.filter || (e = this.recurse(a.callee, !0)), a.filter ? function(a, c, d, f) { | |
for (var h = [], k = 0; k < g.length; ++k) h.push(g[k](a, c, d, f)); | |
a = e.apply(void 0, h, f); | |
return b ? { | |
context: void 0, | |
name: void 0, | |
value: a | |
} : | |
a | |
} : function(a, c, d, m) { | |
var h = e(a, c, d, m), | |
k; | |
if (null != h.value) { | |
ra(h.context, f.expression); | |
qd(h.value, f.expression); | |
k = []; | |
for (var l = 0; l < g.length; ++l) k.push(ra(g[l](a, c, d, m), f.expression)); | |
k = ra(h.value.apply(h.context, k), f.expression) | |
} | |
return b ? { | |
value: k | |
} : k | |
}; | |
case t.AssignmentExpression: | |
return d = this.recurse(a.left, !0, 1), e = this.recurse(a.right), | |
function(a, c, g, m) { | |
var h = d(a, c, g, m); | |
a = e(a, c, g, m); | |
ra(h.value, f.expression); | |
Nb(h.context); | |
h.context[h.name] = a; | |
return b ? { | |
value: a | |
} : a | |
}; | |
case t.ArrayExpression: | |
return g = [], q(a.elements, | |
function(a) { | |
g.push(f.recurse(a)) | |
}), | |
function(a, c, d, e) { | |
for (var f = [], h = 0; h < g.length; ++h) f.push(g[h](a, c, d, e)); | |
return b ? { | |
value: f | |
} : f | |
}; | |
case t.ObjectExpression: | |
return g = [], q(a.properties, function(a) { | |
a.computed ? g.push({ | |
key: f.recurse(a.key), | |
computed: !0, | |
value: f.recurse(a.value) | |
}) : g.push({ | |
key: a.key.type === t.Identifier ? a.key.name : "" + a.key.value, | |
computed: !1, | |
value: f.recurse(a.value) | |
}) | |
}), | |
function(a, c, d, e) { | |
for (var f = {}, h = 0; h < g.length; ++h) g[h].computed ? f[g[h].key(a, c, d, e)] = g[h].value(a, c, d, e) : f[g[h].key] = g[h].value(a, | |
c, d, e); | |
return b ? { | |
value: f | |
} : f | |
}; | |
case t.ThisExpression: | |
return function(a) { | |
return b ? { | |
value: a | |
} : a | |
}; | |
case t.LocalsExpression: | |
return function(a, c) { | |
return b ? { | |
value: c | |
} : c | |
}; | |
case t.NGValueParameter: | |
return function(a, c, d) { | |
return b ? { | |
value: d | |
} : d | |
} | |
} | |
}, | |
"unary+": function(a, b) { | |
return function(c, d, e, f) { | |
c = a(c, d, e, f); | |
c = x(c) ? +c : 0; | |
return b ? { | |
value: c | |
} : c | |
} | |
}, | |
"unary-": function(a, b) { | |
return function(c, d, e, f) { | |
c = a(c, d, e, f); | |
c = x(c) ? -c : 0; | |
return b ? { | |
value: c | |
} : c | |
} | |
}, | |
"unary!": function(a, b) { | |
return function(c, d, e, f) { | |
c = !a(c, d, e, f); | |
return b ? { | |
value: c | |
} : | |
c | |
} | |
}, | |
"binary+": function(a, b, c) { | |
return function(d, e, f, g) { | |
var h = a(d, e, f, g); | |
d = b(d, e, f, g); | |
h = yd(h, d); | |
return c ? { | |
value: h | |
} : h | |
} | |
}, | |
"binary-": function(a, b, c) { | |
return function(d, e, f, g) { | |
var h = a(d, e, f, g); | |
d = b(d, e, f, g); | |
h = (x(h) ? h : 0) - (x(d) ? d : 0); | |
return c ? { | |
value: h | |
} : h | |
} | |
}, | |
"binary*": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) * b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary/": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) / b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary%": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, | |
f, g) % b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary===": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) === b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary!==": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) !== b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary==": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) == b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary!=": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) != b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary<": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, | |
f, g) < b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary>": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) > b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary<=": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) <= b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary>=": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) >= b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary&&": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) && b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"binary||": function(a, b, c) { | |
return function(d, e, f, g) { | |
d = a(d, e, f, g) || | |
b(d, e, f, g); | |
return c ? { | |
value: d | |
} : d | |
} | |
}, | |
"ternary?:": function(a, b, c, d) { | |
return function(e, f, g, h) { | |
e = a(e, f, g, h) ? b(e, f, g, h) : c(e, f, g, h); | |
return d ? { | |
value: e | |
} : e | |
} | |
}, | |
value: function(a, b) { | |
return function() { | |
return b ? { | |
context: void 0, | |
name: void 0, | |
value: a | |
} : a | |
} | |
}, | |
identifier: function(a, b, c, d, e) { | |
return function(f, g, h, k) { | |
f = g && a in g ? g : f; | |
d && 1 !== d && f && !f[a] && (f[a] = {}); | |
g = f ? f[a] : void 0; | |
b && ra(g, e); | |
return c ? { | |
context: f, | |
name: a, | |
value: g | |
} : g | |
} | |
}, | |
computedMember: function(a, b, c, d, e) { | |
return function(f, g, h, k) { | |
var l = a(f, g, h, k), | |
m, p; | |
null != l && (m = b(f, | |
g, h, k), m += "", Wa(m, e), d && 1 !== d && (Nb(l), l && !l[m] && (l[m] = {})), p = l[m], ra(p, e)); | |
return c ? { | |
context: l, | |
name: m, | |
value: p | |
} : p | |
} | |
}, | |
nonComputedMember: function(a, b, c, d, e, f) { | |
return function(g, h, k, l) { | |
g = a(g, h, k, l); | |
e && 1 !== e && (Nb(g), g && !g[b] && (g[b] = {})); | |
h = null != g ? g[b] : void 0; | |
(c || Pb(b)) && ra(h, f); | |
return d ? { | |
context: g, | |
name: b, | |
value: h | |
} : h | |
} | |
}, | |
inputs: function(a, b) { | |
return function(c, d, e, f) { | |
return f ? f[b] : a(c, d, e) | |
} | |
} | |
}; | |
var sc = function(a, b, c) { | |
this.lexer = a; | |
this.$filter = b; | |
this.options = c; | |
this.ast = new t(a, c); | |
this.astCompiler = c.csp ? new Ed(this.ast, | |
b) : new Dd(this.ast, b) | |
}; | |
sc.prototype = { | |
constructor: sc, | |
parse: function(a) { | |
return this.astCompiler.compile(a, this.options.expensiveChecks) | |
} | |
}; | |
var ba = H.document.createElement("a"), | |
Gd = Fa(H.location.href); | |
Hd.$inject = ["$document"]; | |
Id.$inject = ["$provide"]; | |
var Pd = 22, | |
Od = ".", | |
uc = "0"; | |
Jd.$inject = ["$locale"]; | |
Ld.$inject = ["$locale"]; | |
var ag = { | |
yyyy: Z("FullYear", 4, 0, !1, !0), | |
yy: Z("FullYear", 2, 0, !0, !0), | |
y: Z("FullYear", 1, 0, !1, !0), | |
MMMM: pb("Month"), | |
MMM: pb("Month", !0), | |
MM: Z("Month", 2, 1), | |
M: Z("Month", 1, 1), | |
LLLL: pb("Month", !1, !0), | |
dd: Z("Date", | |
2), | |
d: Z("Date", 1), | |
HH: Z("Hours", 2), | |
H: Z("Hours", 1), | |
hh: Z("Hours", 2, -12), | |
h: Z("Hours", 1, -12), | |
mm: Z("Minutes", 2), | |
m: Z("Minutes", 1), | |
ss: Z("Seconds", 2), | |
s: Z("Seconds", 1), | |
sss: Z("Milliseconds", 3), | |
EEEE: pb("Day"), | |
EEE: pb("Day", !0), | |
a: function(a, b) { | |
return 12 > a.getHours() ? b.AMPMS[0] : b.AMPMS[1] | |
}, | |
Z: function(a, b, c) { | |
a = -1 * c; | |
return (0 <= a ? "+" : "") + (Qb(Math[0 < a ? "floor" : "ceil"](a / 60), 2) + Qb(Math.abs(a % 60), 2)) | |
}, | |
ww: Rd(2), | |
w: Rd(1), | |
G: vc, | |
GG: vc, | |
GGG: vc, | |
GGGG: function(a, b) { | |
return 0 >= a.getFullYear() ? b.ERANAMES[0] : b.ERANAMES[1] | |
} | |
}, | |
$f = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/, | |
Zf = /^-?\d+$/; | |
Kd.$inject = ["$locale"]; | |
var Uf = ha(S), | |
Vf = ha(Lb); | |
Md.$inject = ["$parse"]; | |
var zg = ha({ | |
restrict: "E", | |
compile: function(a, b) { | |
if (!b.href && !b.xlinkHref) return function(a, b) { | |
if ("a" === b[0].nodeName.toLowerCase()) { | |
var c = "[object SVGAnimatedString]" === na.call(b.prop("href")) ? "xlink:href" : "href"; | |
b.on("click", function(a) { | |
b.attr(c) || a.preventDefault() | |
}) | |
} | |
} | |
} | |
}), | |
Wb = {}; | |
q(Hb, function(a, b) { | |
function c(a, c, e) { | |
a.$watch(e[d], function(a) { | |
e.$set(b, !!a) | |
}) | |
} | |
if ("multiple" !== a) { | |
var d = Ea("ng-" + b), | |
e = c; | |
"checked" === a && (e = function(a, | |
b, e) { | |
e.ngModel !== e[d] && c(a, b, e) | |
}); | |
Wb[d] = function() { | |
return { | |
restrict: "A", | |
priority: 100, | |
link: e | |
} | |
} | |
} | |
}); | |
q(dd, function(a, b) { | |
Wb[b] = function() { | |
return { | |
priority: 100, | |
link: function(a, d, e) { | |
if ("ngPattern" === b && "/" === e.ngPattern.charAt(0) && (d = e.ngPattern.match(gg))) { | |
e.$set("ngPattern", new RegExp(d[1], d[2])); | |
return | |
} | |
a.$watch(e[b], function(a) { | |
e.$set(b, a) | |
}) | |
} | |
} | |
} | |
}); | |
q(["src", "srcset", "href"], function(a) { | |
var b = Ea("ng-" + a); | |
Wb[b] = function() { | |
return { | |
priority: 99, | |
link: function(c, d, e) { | |
var f = a, | |
g = a; | |
"href" === a && "[object SVGAnimatedString]" === | |
na.call(d.prop("href")) && (g = "xlinkHref", e.$attr[g] = "xlink:href", f = null); | |
e.$observe(b, function(b) { | |
b ? (e.$set(g, b), Oa && f && d.prop(f, e[g])) : "href" === a && e.$set(g, null) | |
}) | |
} | |
} | |
} | |
}); | |
var Rb = { | |
$addControl: G, | |
$$renameControl: function(a, b) { | |
a.$name = b | |
}, | |
$removeControl: G, | |
$setValidity: G, | |
$setDirty: G, | |
$setPristine: G, | |
$setSubmitted: G | |
}; | |
Sd.$inject = ["$element", "$attrs", "$scope", "$animate", "$interpolate"]; | |
var be = function(a) { | |
return ["$timeout", "$parse", function(b, c) { | |
function d(a) { | |
return "" === a ? c('this[""]').assign : c(a).assign || G | |
} | |
return { | |
name: "form", | |
restrict: a ? "EAC" : "E", | |
require: ["form", "^^?form"], | |
controller: Sd, | |
compile: function(c, f) { | |
c.addClass(Ya).addClass(tb); | |
var e = f.name ? "name" : a && f.ngForm ? "ngForm" : !1; | |
return { | |
pre: function(a, c, f, g) { | |
var h = g[0]; | |
if (!("action" in f)) { | |
var k = function(b) { | |
a.$apply(function() { | |
h.$commitViewValue(); | |
h.$setSubmitted() | |
}); | |
b.preventDefault() | |
}; | |
c[0].addEventListener("submit", k, !1); | |
c.on("$destroy", function() { | |
b(function() { | |
c[0].removeEventListener("submit", k, !1) | |
}, 0, !1) | |
}) | |
}(g[1] || h.$$parentForm).$addControl(h); | |
var l = e ? d(h.$name) : G; | |
e && | |
(l(a, h), f.$observe(e, function(b) { | |
h.$name !== b && (l(a, void 0), h.$$parentForm.$$renameControl(h, b), l = d(h.$name), l(a, h)) | |
})); | |
c.on("$destroy", function() { | |
h.$$parentForm.$removeControl(h); | |
l(a, void 0); | |
Q(h, Rb) | |
}) | |
} | |
} | |
} | |
} | |
}] | |
}, | |
Ag = be(), | |
Bg = be(!0), | |
bg = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/, | |
Cg = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i, | |
Dg = /^(?=.{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])?)*$/, | |
cg = /^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/, | |
ce = /^(\d{4,})-(\d{2})-(\d{2})$/, | |
de = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, | |
Bc = /^(\d{4,})-W(\d\d)$/, | |
ee = /^(\d{4,})-(\d\d)$/, | |
fe = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, | |
Ud = T(); | |
q(["date", "datetime-local", "month", "time", "week"], function(a) { | |
Ud[a] = !0 | |
}); | |
var ge = { | |
text: function(a, b, c, d, e, f) { | |
Za(a, b, c, d, e, f); | |
xc(d) | |
}, | |
date: qb("date", ce, Tb(ce, ["yyyy", "MM", "dd"]), "yyyy-MM-dd"), | |
"datetime-local": qb("datetimelocal", de, Tb(de, "yyyy MM dd HH mm ss sss".split(" ")), | |
"yyyy-MM-ddTHH:mm:ss.sss"), | |
time: qb("time", fe, Tb(fe, ["HH", "mm", "ss", "sss"]), "HH:mm:ss.sss"), | |
week: qb("week", Bc, function(a, b) { | |
if (la(a)) return a; | |
if (I(a)) { | |
Bc.lastIndex = 0; | |
var c = Bc.exec(a); | |
if (c) { | |
var d = +c[1], | |
e = +c[2], | |
f = c = 0, | |
g = 0, | |
h = 0, | |
k = Qd(d), | |
e = 7 * (e - 1); | |
b && (c = b.getHours(), f = b.getMinutes(), g = b.getSeconds(), h = b.getMilliseconds()); | |
return new Date(d, 0, k.getDate() + e, c, f, g, h) | |
} | |
} | |
return NaN | |
}, "yyyy-Www"), | |
month: qb("month", ee, Tb(ee, ["yyyy", "MM"]), "yyyy-MM"), | |
number: function(a, b, c, d, e, f) { | |
yc(a, b, c, d); | |
Za(a, b, c, d, e, f); | |
Vd(d); | |
var g, | |
h; | |
if (x(c.min) || c.ngMin) d.$validators.min = function(a) { | |
return d.$isEmpty(a) || B(g) || a >= g | |
}, c.$observe("min", function(a) { | |
g = sb(a); | |
d.$validate() | |
}); | |
if (x(c.max) || c.ngMax) d.$validators.max = function(a) { | |
return d.$isEmpty(a) || B(h) || a <= h | |
}, c.$observe("max", function(a) { | |
h = sb(a); | |
d.$validate() | |
}) | |
}, | |
url: function(a, b, c, d, e, f) { | |
Za(a, b, c, d, e, f); | |
xc(d); | |
d.$$parserName = "url"; | |
d.$validators.url = function(a, b) { | |
var c = a || b; | |
return d.$isEmpty(c) || Cg.test(c) | |
} | |
}, | |
email: function(a, b, c, d, e, f) { | |
Za(a, b, c, d, e, f); | |
xc(d); | |
d.$$parserName = "email"; | |
d.$validators.email = | |
function(a, b) { | |
var c = a || b; | |
return d.$isEmpty(c) || Dg.test(c) | |
} | |
}, | |
radio: function(a, b, c, d) { | |
B(c.name) && b.attr("name", ++ub); | |
b.on("click", function(a) { | |
b[0].checked && d.$setViewValue(c.value, a && a.type) | |
}); | |
d.$render = function() { | |
b[0].checked = c.value == d.$viewValue | |
}; | |
c.$observe("value", d.$render) | |
}, | |
range: function(a, b, c, d, e, f) { | |
function g(a, d) { | |
b.attr(a, c[a]); | |
c.$observe(a, d) | |
} | |
function h(a) { | |
p = sb(a); | |
fa(d.$modelValue) || (m ? (a = b.val(), p > a && (a = p, b.val(a)), d.$setViewValue(a)) : d.$validate()) | |
} | |
function k(a) { | |
q = sb(a); | |
fa(d.$modelValue) || | |
(m ? (a = b.val(), q < a && (b.val(q), a = q < p ? p : q), d.$setViewValue(a)) : d.$validate()) | |
} | |
function l(a) { | |
r = sb(a); | |
fa(d.$modelValue) || (m && d.$viewValue !== b.val() ? d.$setViewValue(b.val()) : d.$validate()) | |
} | |
yc(a, b, c, d); | |
Vd(d); | |
Za(a, b, c, d, e, f); | |
var m = d.$$hasNativeValidators && "range" === b[0].type, | |
p = m ? 0 : void 0, | |
q = m ? 100 : void 0, | |
r = m ? 1 : void 0, | |
t = b[0].validity; | |
a = x(c.min); | |
e = x(c.max); | |
f = x(c.step); | |
var w = d.$render; | |
d.$render = m && x(t.rangeUnderflow) && x(t.rangeOverflow) ? function() { | |
w(); | |
d.$setViewValue(b.val()) | |
} : w; | |
a && (d.$validators.min = m ? function() { | |
return !0 | |
} : | |
function(a, b) { | |
return d.$isEmpty(b) || B(p) || b >= p | |
}, g("min", h)); | |
e && (d.$validators.max = m ? function() { | |
return !0 | |
} : function(a, b) { | |
return d.$isEmpty(b) || B(q) || b <= q | |
}, g("max", k)); | |
f && (d.$validators.step = m ? function() { | |
return !t.stepMismatch | |
} : function(a, b) { | |
var c; | |
if (!(c = d.$isEmpty(b) || B(r))) { | |
c = p || 0; | |
var e = r, | |
f = Number(b); | |
if ((f | 0) !== f || (c | 0) !== c || (e | 0) !== e) { | |
var g = Math.max(zc(f), zc(c), zc(e)), | |
g = Math.pow(10, g), | |
f = f * g; | |
c *= g; | |
e *= g | |
} | |
c = 0 === (f - c) % e | |
} | |
return c | |
}, g("step", l)) | |
}, | |
checkbox: function(a, b, c, d, e, f, g, h) { | |
var k = Wd(h, a, "ngTrueValue", | |
c.ngTrueValue, !0), | |
l = Wd(h, a, "ngFalseValue", c.ngFalseValue, !1); | |
b.on("click", function(a) { | |
d.$setViewValue(b[0].checked, a && a.type) | |
}); | |
d.$render = function() { | |
b[0].checked = d.$viewValue | |
}; | |
d.$isEmpty = function(a) { | |
return !1 === a | |
}; | |
d.$formatters.push(function(a) { | |
return oa(a, k) | |
}); | |
d.$parsers.push(function(a) { | |
return a ? k : l | |
}) | |
}, | |
hidden: G, | |
button: G, | |
submit: G, | |
reset: G, | |
file: G | |
}, | |
he = ["$browser", "$sniffer", "$filter", "$parse", function(a, b, c, d) { | |
return { | |
restrict: "E", | |
require: ["?ngModel"], | |
link: { | |
pre: function(e, f, g, h) { | |
if (h[0]) { | |
var k = S(g.type); | |
"range" !== k || g.hasOwnProperty("ngInputRange") || (k = "text"); | |
(ge[k] || ge.text)(e, f, g, h[0], b, a, c, d) | |
} | |
} | |
} | |
} | |
}], | |
Eg = /^(true|false|\d+)$/, | |
Fg = function() { | |
return { | |
restrict: "A", | |
priority: 100, | |
compile: function(a, b) { | |
return Eg.test(b.ngValue) ? function(a, b, e) { | |
e.$set("value", a.$eval(e.ngValue)) | |
} : function(a, b, e) { | |
a.$watch(e.ngValue, function(a) { | |
e.$set("value", a) | |
}) | |
} | |
} | |
} | |
}, | |
Gg = ["$compile", function(a) { | |
return { | |
restrict: "AC", | |
compile: function(b) { | |
a.$$addBindingClass(b); | |
return function(b, d, e) { | |
a.$$addBindingInfo(d, e.ngBind); | |
d = d[0]; | |
b.$watch(e.ngBind, | |
function(a) { | |
d.textContent = B(a) ? "" : a | |
}) | |
} | |
} | |
} | |
}], | |
Hg = ["$interpolate", "$compile", function(a, b) { | |
return { | |
compile: function(c) { | |
b.$$addBindingClass(c); | |
return function(c, e, f) { | |
c = a(e.attr(f.$attr.ngBindTemplate)); | |
b.$$addBindingInfo(e, c.expressions); | |
e = e[0]; | |
f.$observe("ngBindTemplate", function(a) { | |
e.textContent = B(a) ? "" : a | |
}) | |
} | |
} | |
} | |
}], | |
Ig = ["$sce", "$parse", "$compile", function(a, b, c) { | |
return { | |
restrict: "A", | |
compile: function(d, e) { | |
var f = b(e.ngBindHtml), | |
g = b(e.ngBindHtml, function(b) { | |
return a.valueOf(b) | |
}); | |
c.$$addBindingClass(d); | |
return function(b, | |
d, e) { | |
c.$$addBindingInfo(d, e.ngBindHtml); | |
b.$watch(g, function() { | |
var c = f(b); | |
d.html(a.getTrustedHtml(c) || "") | |
}) | |
} | |
} | |
} | |
}], | |
Jg = ha({ | |
restrict: "A", | |
require: "ngModel", | |
link: function(a, b, c, d) { | |
d.$viewChangeListeners.push(function() { | |
a.$eval(c.ngChange) | |
}) | |
} | |
}), | |
Kg = Ac("", !0), | |
Lg = Ac("Odd", 0), | |
Mg = Ac("Even", 1), | |
Ng = Xa({ | |
compile: function(a, b) { | |
b.$set("ngCloak", void 0); | |
a.removeClass("ng-cloak") | |
} | |
}), | |
Og = [function() { | |
return { | |
restrict: "A", | |
scope: !0, | |
controller: "@", | |
priority: 500 | |
} | |
}], | |
ie = {}, | |
Pg = { | |
blur: !0, | |
focus: !0 | |
}; | |
q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "), | |
function(a) { | |
var b = Ea("ng-" + a); | |
ie[b] = ["$parse", "$rootScope", function(c, d) { | |
return { | |
restrict: "A", | |
compile: function(e, f) { | |
var g = c(f[b], null, !0); | |
return function(b, c) { | |
c.on(a, function(c) { | |
var e = function() { | |
g(b, { | |
$event: c | |
}) | |
}; | |
Pg[a] && d.$$phase ? b.$evalAsync(e) : b.$apply(e) | |
}) | |
} | |
} | |
} | |
}] | |
}); | |
var Qg = ["$animate", "$compile", function(a, b) { | |
return { | |
multiElement: !0, | |
transclude: "element", | |
priority: 600, | |
terminal: !0, | |
restrict: "A", | |
$$tlb: !0, | |
link: function(c, d, e, f, g) { | |
var h, k, l; | |
c.$watch(e.ngIf, function(c) { | |
c ? k || g(function(c, f) { | |
k = f; | |
c[c.length++] = | |
b.$$createComment("end ngIf", e.ngIf); | |
h = { | |
clone: c | |
}; | |
a.enter(c, d.parent(), d) | |
}) : (l && (l.remove(), l = null), k && (k.$destroy(), k = null), h && (l = yb(h.clone), a.leave(l).done(function(a) { | |
!1 !== a && (l = null) | |
}), h = null)) | |
}) | |
} | |
} | |
}], | |
Rg = ["$templateRequest", "$anchorScroll", "$animate", function(a, b, c) { | |
return { | |
restrict: "ECA", | |
priority: 400, | |
terminal: !0, | |
transclude: "element", | |
controller: aa.noop, | |
compile: function(d, e) { | |
var f = e.ngInclude || e.src, | |
g = e.onload || "", | |
h = e.autoscroll; | |
return function(d, e, m, p, q) { | |
var k = 0, | |
l, u, n, t = function() { | |
u && (u.remove(), | |
u = null); | |
l && (l.$destroy(), l = null); | |
n && (c.leave(n).done(function(a) { | |
!1 !== a && (u = null) | |
}), u = n, n = null) | |
}; | |
d.$watch(f, function(f) { | |
var m = function(a) { | |
!1 === a || !x(h) || h && !d.$eval(h) || b() | |
}, | |
r = ++k; | |
f ? (a(f, !0).then(function(a) { | |
if (!d.$$destroyed && r === k) { | |
var b = d.$new(); | |
p.template = a; | |
a = q(b, function(a) { | |
t(); | |
c.enter(a, null, e).done(m) | |
}); | |
l = b; | |
n = a; | |
l.$emit("$includeContentLoaded", f); | |
d.$eval(g) | |
} | |
}, function() { | |
d.$$destroyed || r !== k || (t(), d.$emit("$includeContentError", f)) | |
}), d.$emit("$includeContentRequested", f)) : (t(), p.template = null) | |
}) | |
} | |
} | |
} | |
}], | |
Sg = ["$compile", function(a) { | |
return { | |
restrict: "ECA", | |
priority: -400, | |
require: "ngInclude", | |
link: function(b, c, d, e) { | |
na.call(c[0]).match(/SVG/) ? (c.empty(), a(Pc(e.template, H.document).childNodes)(b, function(a) { | |
c.append(a) | |
}, { | |
futureParentElement: c | |
})) : (c.html(e.template), a(c.contents())(b)) | |
} | |
} | |
}], | |
Tg = Xa({ | |
priority: 450, | |
compile: function() { | |
return { | |
pre: function(a, b, c) { | |
a.$eval(c.ngInit) | |
} | |
} | |
} | |
}), | |
Ug = function() { | |
return { | |
restrict: "A", | |
priority: 100, | |
require: "ngModel", | |
link: function(a, b, c, d) { | |
var e = b.attr(c.$attr.ngList) || ", ", | |
f = "false" !== | |
c.ngTrim, | |
g = f ? W(e) : e; | |
d.$parsers.push(function(a) { | |
if (!B(a)) { | |
var b = []; | |
a && q(a.split(g), function(a) { | |
a && b.push(f ? W(a) : a) | |
}); | |
return b | |
} | |
}); | |
d.$formatters.push(function(a) { | |
if (L(a)) return a.join(e) | |
}); | |
d.$isEmpty = function(a) { | |
return !a || !a.length | |
} | |
} | |
} | |
}, | |
tb = "ng-valid", | |
Xd = "ng-invalid", | |
Ya = "ng-pristine", | |
Sb = "ng-dirty", | |
Zd = "ng-pending", | |
rb = N("ngModel"), | |
Vg = ["$scope", "$exceptionHandler", "$attrs", "$element", "$parse", "$animate", "$timeout", "$rootScope", "$q", "$interpolate", function(a, b, c, d, e, f, g, h, k, l) { | |
this.$modelValue = this.$viewValue = | |
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(c.name || "", !1)(a); | |
this.$$parentForm = Rb; | |
var m = e(c.ngModel), | |
p = m.assign, | |
u = m, | |
r = p, | |
t = null, | |
w, n = this; | |
this.$$setOptions = function(a) { | |
if ((n.$options = a) && a.getterSetter) { | |
var b = e(c.ngModel + "()"), | |
f = | |
e(c.ngModel + "($$$p)"); | |
u = function(a) { | |
var c = m(a); | |
A(c) && (c = b(a)); | |
return c | |
}; | |
r = function(a, b) { | |
A(m(a)) ? f(a, { | |
$$$p: b | |
}) : p(a, b) | |
} | |
} else if (!m.assign) throw rb("nonassign", c.ngModel, Aa(d)); | |
}; | |
this.$render = G; | |
this.$isEmpty = function(a) { | |
return B(a) || "" === a || null === a || a !== a | |
}; | |
this.$$updateEmptyClasses = function(a) { | |
n.$isEmpty(a) ? (f.removeClass(d, "ng-not-empty"), f.addClass(d, "ng-empty")) : (f.removeClass(d, "ng-empty"), f.addClass(d, "ng-not-empty")) | |
}; | |
var K = 0; | |
Td({ | |
ctrl: this, | |
$element: d, | |
set: function(a, b) { | |
a[b] = !0 | |
}, | |
unset: function(a, | |
b) { | |
delete a[b] | |
}, | |
$animate: f | |
}); | |
this.$setPristine = function() { | |
n.$dirty = !1; | |
n.$pristine = !0; | |
f.removeClass(d, Sb); | |
f.addClass(d, Ya) | |
}; | |
this.$setDirty = function() { | |
n.$dirty = !0; | |
n.$pristine = !1; | |
f.removeClass(d, Ya); | |
f.addClass(d, Sb); | |
n.$$parentForm.$setDirty() | |
}; | |
this.$setUntouched = function() { | |
n.$touched = !1; | |
n.$untouched = !0; | |
f.setClass(d, "ng-untouched", "ng-touched") | |
}; | |
this.$setTouched = function() { | |
n.$touched = !0; | |
n.$untouched = !1; | |
f.setClass(d, "ng-touched", "ng-untouched") | |
}; | |
this.$rollbackViewValue = function() { | |
g.cancel(t); | |
n.$viewValue = | |
n.$$lastCommittedViewValue; | |
n.$render() | |
}; | |
this.$validate = function() { | |
if (!fa(n.$modelValue)) { | |
var a = n.$$rawModelValue, | |
b = n.$valid, | |
c = n.$modelValue, | |
d = n.$options && n.$options.allowInvalid; | |
n.$$runValidators(a, n.$$lastCommittedViewValue, function(e) { | |
d || b === e || (n.$modelValue = e ? a : void 0, n.$modelValue !== c && n.$$writeModelToScope()) | |
}) | |
} | |
}; | |
this.$$runValidators = function(a, b, c) { | |
function d(a, b) { | |
f === K && n.$setValidity(a, b) | |
} | |
function e(a) { | |
f === K && c(a) | |
} | |
K++; | |
var f = K; | |
(function() { | |
var a = n.$$parserName || "parse"; | |
if (B(w)) d(a, null); | |
else return w || | |
(q(n.$validators, function(a, b) { | |
d(b, null) | |
}), q(n.$asyncValidators, function(a, b) { | |
d(b, null) | |
})), d(a, w), w; | |
return !0 | |
})() ? function() { | |
var c = !0; | |
q(n.$validators, function(e, f) { | |
var g = e(a, b); | |
c = c && g; | |
d(f, g) | |
}); | |
return c ? !0 : (q(n.$asyncValidators, function(a, b) { | |
d(b, null) | |
}), !1) | |
}() ? function() { | |
var c = [], | |
f = !0; | |
q(n.$asyncValidators, function(e, g) { | |
var h = e(a, b); | |
if (!h || !A(h.then)) throw rb("nopromise", h); | |
d(g, void 0); | |
c.push(h.then(function() { | |
d(g, !0) | |
}, function() { | |
f = !1; | |
d(g, !1) | |
})) | |
}); | |
c.length ? k.all(c).then(function() { | |
e(f) | |
}, G) : e(!0) | |
}() : | |
e(!1): e(!1) | |
}; | |
this.$commitViewValue = function() { | |
var a = n.$viewValue; | |
g.cancel(t); | |
if (n.$$lastCommittedViewValue !== a || "" === a && n.$$hasNativeValidators) n.$$updateEmptyClasses(a), n.$$lastCommittedViewValue = a, n.$pristine && this.$setDirty(), this.$$parseAndValidate() | |
}; | |
this.$$parseAndValidate = function() { | |
var b = n.$$lastCommittedViewValue; | |
if (w = B(b) ? void 0 : !0) | |
for (var c = 0; c < n.$parsers.length; c++) | |
if (b = n.$parsers[c](b), B(b)) { | |
w = !1; | |
break | |
} | |
fa(n.$modelValue) && (n.$modelValue = u(a)); | |
var d = n.$modelValue, | |
e = n.$options && n.$options.allowInvalid; | |
n.$$rawModelValue = b; | |
e && (n.$modelValue = b, n.$modelValue !== d && n.$$writeModelToScope()); | |
n.$$runValidators(b, n.$$lastCommittedViewValue, function(a) { | |
e || (n.$modelValue = a ? b : void 0, n.$modelValue !== d && n.$$writeModelToScope()) | |
}) | |
}; | |
this.$$writeModelToScope = function() { | |
r(a, n.$modelValue); | |
q(n.$viewChangeListeners, function(a) { | |
try { | |
a() | |
} catch (C) { | |
b(C) | |
} | |
}) | |
}; | |
this.$setViewValue = function(a, b) { | |
n.$viewValue = a; | |
n.$options && !n.$options.updateOnDefault || n.$$debounceViewValueCommit(b) | |
}; | |
this.$$debounceViewValueCommit = function(b) { | |
var c = | |
0, | |
d = n.$options; | |
d && x(d.debounce) && (d = d.debounce, ca(d) ? c = d : ca(d[b]) ? c = d[b] : ca(d["default"]) && (c = d["default"])); | |
g.cancel(t); | |
c ? t = g(function() { | |
n.$commitViewValue() | |
}, c) : h.$$phase ? n.$commitViewValue() : a.$apply(function() { | |
n.$commitViewValue() | |
}) | |
}; | |
a.$watch(function() { | |
var b = u(a); | |
if (b !== n.$modelValue && (n.$modelValue === n.$modelValue || b === b)) { | |
n.$modelValue = n.$$rawModelValue = b; | |
w = void 0; | |
for (var c = n.$formatters, d = c.length, e = b; d--;) e = c[d](e); | |
n.$viewValue !== e && (n.$$updateEmptyClasses(e), n.$viewValue = n.$$lastCommittedViewValue = | |
e, n.$render(), n.$$runValidators(n.$modelValue, n.$viewValue, G)) | |
} | |
return b | |
}) | |
}], | |
Wg = ["$rootScope", function(a) { | |
return { | |
restrict: "A", | |
require: ["ngModel", "^?form", "^?ngModelOptions"], | |
controller: Vg, | |
priority: 1, | |
compile: function(b) { | |
b.addClass(Ya).addClass("ng-untouched").addClass(tb); | |
return { | |
pre: function(a, b, e, f) { | |
var c = f[0]; | |
b = f[1] || c.$$parentForm; | |
c.$$setOptions(f[2] && f[2].$options); | |
b.$addControl(c); | |
e.$observe("name", function(a) { | |
c.$name !== a && c.$$parentForm.$$renameControl(c, a) | |
}); | |
a.$on("$destroy", function() { | |
c.$$parentForm.$removeControl(c) | |
}) | |
}, | |
post: function(b, d, e, f) { | |
var c = f[0]; | |
if (c.$options && c.$options.updateOn) d.on(c.$options.updateOn, function(a) { | |
c.$$debounceViewValueCommit(a && a.type) | |
}); | |
d.on("blur", function() { | |
c.$touched || (a.$$phase ? b.$evalAsync(c.$setTouched) : b.$apply(c.$setTouched)) | |
}) | |
} | |
} | |
} | |
} | |
}], | |
Xg = /(\s+|^)default(\s+|$)/, | |
Yg = function() { | |
return { | |
restrict: "A", | |
controller: ["$scope", "$attrs", function(a, b) { | |
var c = this; | |
this.$options = sa(a.$eval(b.ngModelOptions)); | |
x(this.$options.updateOn) ? (this.$options.updateOnDefault = !1, this.$options.updateOn = W(this.$options.updateOn.replace(Xg, | |
function() { | |
c.$options.updateOnDefault = !0; | |
return " " | |
}))) : this.$options.updateOnDefault = !0 | |
}] | |
} | |
}, | |
Zg = Xa({ | |
terminal: !0, | |
priority: 1E3 | |
}), | |
$g = N("ngOptions"), | |
ah = /^\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]+?))?$/, | |
bh = ["$compile", "$document", "$parse", function(a, b, c) { | |
function d(a, b, d) { | |
function e(a, b, c, d, e) { | |
this.selectValue = a; | |
this.viewValue = | |
b; | |
this.label = c; | |
this.group = d; | |
this.disabled = e | |
} | |
function f(a) { | |
var b; | |
if (!k && ta(a)) b = a; | |
else { | |
b = []; | |
for (var c in a) a.hasOwnProperty(c) && "$" !== c.charAt(0) && b.push(c) | |
} | |
return b | |
} | |
var g = a.match(ah); | |
if (!g) throw $g("iexp", a, Aa(b)); | |
var h = g[5] || g[7], | |
k = g[6]; | |
a = / as /.test(g[0]) && g[1]; | |
var q = g[9]; | |
b = c(g[2] ? g[1] : h); | |
var t = a && c(a) || b, | |
n = q && c(q), | |
x = q ? function(a, b) { | |
return n(d, b) | |
} : function(a) { | |
return Ja(a) | |
}, | |
y = function(a, b) { | |
return x(a, D(a, b)) | |
}, | |
C = c(g[2] || g[1]), | |
z = c(g[3] || ""), | |
B = c(g[4] || ""), | |
F = c(g[8]), | |
A = {}, | |
D = k ? function(a, b) { | |
A[k] = b; | |
A[h] = | |
a; | |
return A | |
} : function(a) { | |
A[h] = a; | |
return A | |
}; | |
return { | |
trackBy: q, | |
getTrackByValue: y, | |
getWatchables: c(F, function(a) { | |
var b = []; | |
a = a || []; | |
for (var c = f(a), e = c.length, h = 0; h < e; h++) { | |
var k = a === c ? h : c[h], | |
l = a[k], | |
k = D(l, k), | |
l = x(l, k); | |
b.push(l); | |
if (g[2] || g[1]) l = C(d, k), b.push(l); | |
g[4] && (k = B(d, k), b.push(k)) | |
} | |
return b | |
}), | |
getOptions: function() { | |
for (var a = [], b = {}, c = F(d) || [], g = f(c), h = g.length, k = 0; k < h; k++) { | |
var l = c === g ? k : g[k], | |
m = D(c[l], l), | |
n = t(d, m), | |
l = x(n, m), | |
p = C(d, m), | |
r = z(d, m), | |
m = B(d, m), | |
n = new e(l, n, p, r, m); | |
a.push(n); | |
b[l] = n | |
} | |
return { | |
items: a, | |
selectValueMap: b, | |
getOptionFromViewValue: function(a) { | |
return b[y(a)] | |
}, | |
getViewValueFromOption: function(a) { | |
return q ? sa(a.viewValue) : a.viewValue | |
} | |
} | |
} | |
} | |
} | |
var e = H.document.createElement("option"), | |
f = H.document.createElement("optgroup"); | |
return { | |
restrict: "A", | |
terminal: !0, | |
require: ["select", "ngModel"], | |
link: { | |
pre: function(a, b, c, d) { | |
d[0].registerOption = G | |
}, | |
post: function(c, h, k, l) { | |
function g(a, b) { | |
a.element = b; | |
b.disabled = a.disabled; | |
a.label !== b.label && (b.label = a.label, b.textContent = a.label); | |
b.value = a.selectValue | |
} | |
function p() { | |
var a = A && u.readValue(); | |
if (A) | |
for (var b = A.items.length - 1; 0 <= b; b--) { | |
var c = A.items[b]; | |
x(c.group) ? Gb(c.element.parentNode) : Gb(c.element) | |
} | |
A = F.getOptions(); | |
var d = {}; | |
y && h.prepend(w); | |
A.items.forEach(function(a) { | |
var b; | |
if (x(a.group)) { | |
b = d[a.group]; | |
b || (b = f.cloneNode(!1), G.appendChild(b), b.label = null === a.group ? "null" : a.group, d[a.group] = b); | |
var c = e.cloneNode(!1) | |
} else b = G, c = e.cloneNode(!1); | |
b.appendChild(c); | |
g(a, c) | |
}); | |
h[0].appendChild(G); | |
r.$render(); | |
r.$isEmpty(a) || (b = u.readValue(), (F.trackBy || t ? oa(a, b) : a === b) || (r.$setViewValue(b), r.$render())) | |
} | |
var u = l[0], | |
r = l[1], | |
t = k.multiple, | |
w; | |
l = 0; | |
for (var n = h.children(), B = n.length; l < B; l++) | |
if ("" === n[l].value) { | |
w = n.eq(l); | |
break | |
} | |
var y = !!w, | |
C = !1, | |
z = D(e.cloneNode(!1)); | |
z.val("?"); | |
var A, F = d(k.ngOptions, h, c), | |
G = b[0].createDocumentFragment(), | |
H = function() { | |
y ? C && w.removeAttr("selected") : w.remove() | |
}; | |
t ? (r.$isEmpty = function(a) { | |
return !a || 0 === a.length | |
}, u.writeValue = function(a) { | |
A.items.forEach(function(a) { | |
a.element.selected = !1 | |
}); | |
a && a.forEach(function(a) { | |
if (a = A.getOptionFromViewValue(a)) a.element.selected = !0 | |
}) | |
}, u.readValue = function() { | |
var a = | |
h.val() || [], | |
b = []; | |
q(a, function(a) { | |
(a = A.selectValueMap[a]) && !a.disabled && b.push(A.getViewValueFromOption(a)) | |
}); | |
return b | |
}, F.trackBy && c.$watchCollection(function() { | |
if (L(r.$viewValue)) return r.$viewValue.map(function(a) { | |
return F.getTrackByValue(a) | |
}) | |
}, function() { | |
r.$render() | |
})) : (u.writeValue = function(a) { | |
var b = A.selectValueMap[h.val()], | |
c = A.getOptionFromViewValue(a); | |
b && b.element.removeAttribute("selected"); | |
c ? (h[0].value !== c.selectValue && (z.remove(), H(), h[0].value = c.selectValue, c.element.selected = !0), c.element.setAttribute("selected", | |
"selected")) : null === a || y ? (z.remove(), y || h.prepend(w), h.val(""), C && (w.prop("selected", !0), w.attr("selected", !0))) : (H(), h.prepend(z), h.val("?"), z.prop("selected", !0), z.attr("selected", !0)) | |
}, u.readValue = function() { | |
var a = A.selectValueMap[h.val()]; | |
return a && !a.disabled ? (H(), z.remove(), A.getViewValueFromOption(a)) : null | |
}, F.trackBy && c.$watch(function() { | |
return F.getTrackByValue(r.$viewValue) | |
}, function() { | |
r.$render() | |
})); | |
y ? (w.remove(), a(w)(c), 8 === w[0].nodeType ? (C = !1, u.registerOption = function(a, b) { | |
"" === b.val() && | |
(C = !0, w = b, w.removeClass("ng-scope"), r.$render(), b.on("$destroy", function() { | |
w = void 0; | |
C = !1 | |
})) | |
}) : (w.removeClass("ng-scope"), C = !0)) : w = D(e.cloneNode(!1)); | |
h.empty(); | |
p(); | |
c.$watchCollection(F.getWatchables, p) | |
} | |
} | |
} | |
}], | |
ch = ["$locale", "$interpolate", "$log", function(a, b, c) { | |
var d = /{}/g, | |
e = /^when(Minus)?(.+)$/; | |
return { | |
link: function(f, g, h) { | |
function k(a) { | |
g.text(a || "") | |
} | |
var l = h.count, | |
m = h.$attr.when && g.attr(h.$attr.when), | |
p = h.offset || 0, | |
u = f.$eval(m) || {}, | |
r = {}, | |
t = b.startSymbol(), | |
w = b.endSymbol(), | |
n = t + l + "-" + p + w, | |
x = aa.noop, | |
y; | |
q(h, function(a, | |
b) { | |
var c = e.exec(b); | |
c && (c = (c[1] ? "-" : "") + S(c[2]), u[c] = g.attr(h.$attr[b])) | |
}); | |
q(u, function(a, c) { | |
r[c] = b(a.replace(d, n)) | |
}); | |
f.$watch(l, function(b) { | |
var d = parseFloat(b), | |
e = fa(d); | |
e || d in u || (d = a.pluralCat(d - p)); | |
d === y || e && fa(y) || (x(), e = r[d], B(e) ? (null != b && c.debug("ngPluralize: no rule defined for '" + d + "' in " + m), x = G, k()) : x = f.$watch(e, k), y = d) | |
}) | |
} | |
} | |
}], | |
dh = ["$parse", "$animate", "$compile", function(a, b, c) { | |
var d = N("ngRepeat"), | |
e = function(a, b, c, d, e, m, p) { | |
a[c] = d; | |
e && (a[e] = m); | |
a.$index = b; | |
a.$first = 0 === b; | |
a.$last = b === p - 1; | |
a.$middle = !(a.$first || a.$last); | |
a.$odd = !(a.$even = 0 === (b & 1)) | |
}; | |
return { | |
restrict: "A", | |
multiElement: !0, | |
transclude: "element", | |
priority: 1E3, | |
terminal: !0, | |
$$tlb: !0, | |
compile: function(f, g) { | |
var h = g.ngRepeat, | |
k = c.$$createComment("end ngRepeat", h), | |
l = h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); | |
if (!l) throw d("iexp", h); | |
var m = l[1], | |
p = l[2], | |
u = l[3], | |
r = l[4], | |
l = m.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/); | |
if (!l) throw d("iidexp", m); | |
var t = l[3] || l[1], | |
w = l[2]; | |
if (u && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(u) || | |
/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(u))) throw d("badident", u); | |
var n, x, y, C, z = { | |
$id: Ja | |
}; | |
r ? n = a(r) : (y = function(a, b) { | |
return Ja(b) | |
}, C = function(a) { | |
return a | |
}); | |
return function(a, c, f, g, l) { | |
n && (x = function(b, c, d) { | |
w && (z[w] = b); | |
z[t] = c; | |
z.$index = d; | |
return n(a, z) | |
}); | |
var m = T(); | |
a.$watchCollection(p, function(f) { | |
var g, n, p = c[0], | |
r, v = T(), | |
z, A, B, E, F, D, G; | |
u && (a[u] = f); | |
if (ta(f)) F = f, n = x || y; | |
else | |
for (G in n = x || C, F = [], f) wa.call(f, G) && "$" !== G.charAt(0) && F.push(G); | |
z = F.length; | |
G = | |
Array(z); | |
for (g = 0; g < z; g++) | |
if (A = f === F ? g : F[g], B = f[A], E = n(A, B, g), m[E]) D = m[E], delete m[E], v[E] = D, G[g] = D; | |
else { | |
if (v[E]) throw q(G, function(a) { | |
a && a.scope && (m[a.id] = a) | |
}), d("dupes", h, E, B); | |
G[g] = { | |
id: E, | |
scope: void 0, | |
clone: void 0 | |
}; | |
v[E] = !0 | |
} | |
for (r in m) { | |
D = m[r]; | |
E = yb(D.clone); | |
b.leave(E); | |
if (E[0].parentNode) | |
for (g = 0, n = E.length; g < n; g++) E[g].$$NG_REMOVED = !0; | |
D.scope.$destroy() | |
} | |
for (g = 0; g < z; g++) | |
if (A = f === F ? g : F[g], B = f[A], D = G[g], D.scope) { | |
r = p; | |
do r = r.nextSibling; while (r && r.$$NG_REMOVED); | |
D.clone[0] !== r && b.move(yb(D.clone), null, p); | |
p = D.clone[D.clone.length - 1]; | |
e(D.scope, g, t, B, w, A, z) | |
} else l(function(a, c) { | |
D.scope = c; | |
var d = k.cloneNode(!1); | |
a[a.length++] = d; | |
b.enter(a, null, p); | |
p = d; | |
D.clone = a; | |
v[D.id] = D; | |
e(D.scope, g, t, B, w, A, z) | |
}); | |
m = v | |
}) | |
} | |
} | |
} | |
}], | |
eh = ["$animate", function(a) { | |
return { | |
restrict: "A", | |
multiElement: !0, | |
link: function(b, c, d) { | |
b.$watch(d.ngShow, function(b) { | |
a[b ? "removeClass" : "addClass"](c, "ng-hide", { | |
tempClasses: "ng-hide-animate" | |
}) | |
}) | |
} | |
} | |
}], | |
fh = ["$animate", function(a) { | |
return { | |
restrict: "A", | |
multiElement: !0, | |
link: function(b, c, d) { | |
b.$watch(d.ngHide, function(b) { | |
a[b ? | |
"addClass" : "removeClass"](c, "ng-hide", { | |
tempClasses: "ng-hide-animate" | |
}) | |
}) | |
} | |
} | |
}], | |
gh = Xa(function(a, b, c) { | |
a.$watch(c.ngStyle, function(a, c) { | |
c && a !== c && q(c, function(a, c) { | |
b.css(c, "") | |
}); | |
a && b.css(a) | |
}, !0) | |
}), | |
hh = ["$animate", "$compile", function(a, b) { | |
return { | |
require: "ngSwitch", | |
controller: ["$scope", function() { | |
this.cases = {} | |
}], | |
link: function(c, d, e, f) { | |
var g = [], | |
h = [], | |
k = [], | |
l = [], | |
m = function(a, b) { | |
return function(c) { | |
!1 !== c && a.splice(b, 1) | |
} | |
}; | |
c.$watch(e.ngSwitch || e.on, function(c) { | |
for (var d, e; k.length;) a.cancel(k.pop()); | |
d = 0; | |
for (e = | |
l.length; d < e; ++d) { | |
var p = yb(h[d].clone); | |
l[d].$destroy(); | |
(k[d] = a.leave(p)).done(m(k, d)) | |
} | |
h.length = 0; | |
l.length = 0; | |
(g = f.cases["!" + c] || f.cases["?"]) && q(g, function(c) { | |
c.transclude(function(d, e) { | |
l.push(e); | |
var f = c.element; | |
d[d.length++] = b.$$createComment("end ngSwitchWhen"); | |
h.push({ | |
clone: d | |
}); | |
a.enter(d, f.parent(), f) | |
}) | |
}) | |
}) | |
} | |
} | |
}], | |
ih = Xa({ | |
transclude: "element", | |
priority: 1200, | |
require: "^ngSwitch", | |
multiElement: !0, | |
link: function(a, b, c, d, e) { | |
a = c.ngSwitchWhen.split(c.ngSwitchWhenSeparator).sort().filter(function(a, b, c) { | |
return c[b - | |
1] !== a | |
}); | |
q(a, function(a) { | |
d.cases["!" + a] = d.cases["!" + a] || []; | |
d.cases["!" + a].push({ | |
transclude: e, | |
element: b | |
}) | |
}) | |
} | |
}), | |
jh = Xa({ | |
transclude: "element", | |
priority: 1200, | |
require: "^ngSwitch", | |
multiElement: !0, | |
link: function(a, b, c, d, e) { | |
d.cases["?"] = d.cases["?"] || []; | |
d.cases["?"].push({ | |
transclude: e, | |
element: b | |
}) | |
} | |
}), | |
kh = N("ngTransclude"), | |
lh = ["$compile", function(a) { | |
return { | |
restrict: "EAC", | |
terminal: !0, | |
compile: function(b) { | |
var c = a(b.contents()); | |
b.empty(); | |
return function(a, b, f, g, h) { | |
function d() { | |
c(a, function(a) { | |
b.append(a) | |
}) | |
} | |
if (!h) throw kh("orphan", | |
Aa(b)); | |
f.ngTransclude === f.$attr.ngTransclude && (f.ngTransclude = ""); | |
f = f.ngTransclude || f.ngTranscludeSlot; | |
h(function(a, c) { | |
a.length ? b.append(a) : (d(), c.$destroy()) | |
}, null, f); | |
f && !h.isSlotFilled(f) && d() | |
} | |
} | |
} | |
}], | |
mh = ["$templateCache", function(a) { | |
return { | |
restrict: "E", | |
terminal: !0, | |
compile: function(b, c) { | |
"text/ng-template" === c.type && a.put(c.id, b[0].text) | |
} | |
} | |
}], | |
nh = { | |
$setViewValue: G, | |
$render: G | |
}, | |
oh = ["$element", "$scope", function(a, b) { | |
var c = this, | |
d = new Ua; | |
c.ngModelCtrl = nh; | |
c.unknownOption = D(H.document.createElement("option")); | |
c.renderUnknownOption = function(b) { | |
b = "? " + Ja(b) + " ?"; | |
c.unknownOption.val(b); | |
a.prepend(c.unknownOption); | |
a.val(b) | |
}; | |
b.$on("$destroy", function() { | |
c.renderUnknownOption = G | |
}); | |
c.removeUnknownOption = function() { | |
c.unknownOption.parent() && c.unknownOption.remove() | |
}; | |
c.readValue = function() { | |
c.removeUnknownOption(); | |
return a.val() | |
}; | |
c.writeValue = function(b) { | |
c.hasOption(b) ? (c.removeUnknownOption(), a.val(b), "" === b && c.emptyOption.prop("selected", !0)) : null == b && c.emptyOption ? (c.removeUnknownOption(), a.val("")) : c.renderUnknownOption(b) | |
}; | |
c.addOption = function(a, b) { | |
if (8 !== b[0].nodeType) { | |
Ta(a, '"option value"'); | |
"" === a && (c.emptyOption = b); | |
var e = d.get(a) || 0; | |
d.put(a, e + 1); | |
c.ngModelCtrl.$render(); | |
b[0].hasAttribute("selected") && (b[0].selected = !0) | |
} | |
}; | |
c.removeOption = function(a) { | |
var b = d.get(a); | |
b && (1 === b ? (d.remove(a), "" === a && (c.emptyOption = void 0)) : d.put(a, b - 1)) | |
}; | |
c.hasOption = function(a) { | |
return !!d.get(a) | |
}; | |
c.registerOption = function(a, b, d, h, k) { | |
if (h) { | |
var e; | |
d.$observe("value", function(a) { | |
x(e) && c.removeOption(e); | |
e = a; | |
c.addOption(a, b) | |
}) | |
} else k ? a.$watch(k, | |
function(a, e) { | |
d.$set("value", a); | |
e !== a && c.removeOption(e); | |
c.addOption(a, b) | |
}) : c.addOption(d.value, b); | |
b.on("$destroy", function() { | |
c.removeOption(d.value); | |
c.ngModelCtrl.$render() | |
}) | |
} | |
}], | |
ph = function() { | |
return { | |
restrict: "E", | |
require: ["select", "?ngModel"], | |
controller: oh, | |
priority: 1, | |
link: { | |
pre: function(a, b, c, d) { | |
var e = d[1]; | |
if (e) { | |
var f = d[0]; | |
f.ngModelCtrl = e; | |
b.on("change", function() { | |
a.$apply(function() { | |
e.$setViewValue(f.readValue()) | |
}) | |
}); | |
if (c.multiple) { | |
f.readValue = function() { | |
var a = []; | |
q(b.find("option"), function(b) { | |
b.selected && | |
a.push(b.value) | |
}); | |
return a | |
}; | |
f.writeValue = function(a) { | |
var c = new Ua(a); | |
q(b.find("option"), function(a) { | |
a.selected = x(c.get(a.value)) | |
}) | |
}; | |
var g, h = NaN; | |
a.$watch(function() { | |
h !== e.$viewValue || oa(g, e.$viewValue) || (g = ma(e.$viewValue), e.$render()); | |
h = e.$viewValue | |
}); | |
e.$isEmpty = function(a) { | |
return !a || 0 === a.length | |
} | |
} | |
} | |
}, | |
post: function(a, b, c, d) { | |
var e = d[1]; | |
if (e) { | |
var f = d[0]; | |
e.$render = function() { | |
f.writeValue(e.$viewValue) | |
} | |
} | |
} | |
} | |
} | |
}, | |
qh = ["$interpolate", function(a) { | |
return { | |
restrict: "E", | |
priority: 100, | |
compile: function(b, c) { | |
var d, e; | |
x(c.ngValue) ? d = !0 : x(c.value) ? d = a(c.value, !0) : (e = a(b.text(), !0)) || c.$set("value", b.text()); | |
return function(a, b, c) { | |
var f = b.parent(); | |
(f = f.data("$selectController") || f.parent().data("$selectController")) && f.registerOption(a, b, c, d, e) | |
} | |
} | |
} | |
}], | |
je = function() { | |
return { | |
restrict: "A", | |
require: "?ngModel", | |
link: function(a, b, c, d) { | |
d && (c.required = !0, d.$validators.required = function(a, b) { | |
return !c.required || !d.$isEmpty(b) | |
}, c.$observe("required", function() { | |
d.$validate() | |
})) | |
} | |
} | |
}, | |
ke = function() { | |
return { | |
restrict: "A", | |
require: "?ngModel", | |
link: function(a, b, c, d) { | |
if (d) { | |
var e, f = c.ngPattern || c.pattern; | |
c.$observe("pattern", function(a) { | |
I(a) && 0 < a.length && (a = new RegExp("^" + a + "$")); | |
if (a && !a.test) throw N("ngPattern")("noregexp", f, a, Aa(b)); | |
e = a || void 0; | |
d.$validate() | |
}); | |
d.$validators.pattern = function(a, b) { | |
return d.$isEmpty(b) || B(e) || e.test(b) | |
} | |
} | |
} | |
} | |
}, | |
le = function() { | |
return { | |
restrict: "A", | |
require: "?ngModel", | |
link: function(a, b, c, d) { | |
if (d) { | |
var e = -1; | |
c.$observe("maxlength", function(a) { | |
a = parseInt(a, 10); | |
e = fa(a) ? -1 : a; | |
d.$validate() | |
}); | |
d.$validators.maxlength = function(a, | |
b) { | |
return 0 > e || d.$isEmpty(b) || b.length <= e | |
} | |
} | |
} | |
} | |
}, | |
me = function() { | |
return { | |
restrict: "A", | |
require: "?ngModel", | |
link: function(a, b, c, d) { | |
if (d) { | |
var e = 0; | |
c.$observe("minlength", function(a) { | |
e = parseInt(a, 10) || 0; | |
d.$validate() | |
}); | |
d.$validators.minlength = function(a, b) { | |
return d.$isEmpty(b) || b.length >= e | |
} | |
} | |
} | |
} | |
}; | |
if (H.angular.bootstrap) H.console && console.log("WARNING: Tried to load angular more than once."); | |
else { | |
(function() { | |
var a; | |
if (!$d) { | |
var b = Ub(); | |
(Ia = B(b) ? H.jQuery : b ? H[b] : void 0) && Ia.fn.on ? (D = Ia, Q(Ia.fn, { | |
scope: Va.scope, | |
isolateScope: Va.isolateScope, | |
controller: Va.controller, | |
injector: Va.injector, | |
inheritedData: Va.inheritedData | |
}), a = Ia.cleanData, Ia.cleanData = function(b) { | |
for (var c, e = 0, f; null != (f = b[e]); e++)(c = Ia._data(f, "events")) && c.$destroy && Ia(f).triggerHandler("$destroy"); | |
a(b) | |
}) : D = U; | |
aa.element = D; | |
$d = !0 | |
} | |
})(); | |
(function(a) { | |
Q(a, { | |
bootstrap: Lc, | |
copy: sa, | |
extend: Q, | |
merge: oe, | |
equals: oa, | |
element: D, | |
forEach: q, | |
injector: gb, | |
noop: G, | |
bind: eb, | |
toJson: fb, | |
fromJson: Hc, | |
identity: wb, | |
isUndefined: B, | |
isDefined: x, | |
isString: I, | |
isFunction: A, | |
isObject: J, | |
isNumber: ca, | |
isElement: Yb, | |
isArray: L, | |
version: ig, | |
isDate: la, | |
lowercase: S, | |
uppercase: Lb, | |
callbacks: { | |
$$counter: 0 | |
}, | |
getTestability: ye, | |
$$minErr: N, | |
$$csp: Ha, | |
reloadWithDebugInfo: xe | |
}); | |
fc = Ae(H); | |
fc("ng", ["ngLocale"], ["$provide", function(a) { | |
a.provider({ | |
$$sanitizeUri: Lf | |
}); | |
a.provider("$compile", Yc).directive({ | |
a: zg, | |
input: he, | |
textarea: he, | |
form: Ag, | |
script: mh, | |
select: ph, | |
option: qh, | |
ngBind: Gg, | |
ngBindHtml: Ig, | |
ngBindTemplate: Hg, | |
ngClass: Kg, | |
ngClassEven: Mg, | |
ngClassOdd: Lg, | |
ngCloak: Ng, | |
ngController: Og, | |
ngForm: Bg, | |
ngHide: fh, | |
ngIf: Qg, | |
ngInclude: Rg, | |
ngInit: Tg, | |
ngNonBindable: Zg, | |
ngPluralize: ch, | |
ngRepeat: dh, | |
ngShow: eh, | |
ngStyle: gh, | |
ngSwitch: hh, | |
ngSwitchWhen: ih, | |
ngSwitchDefault: jh, | |
ngOptions: bh, | |
ngTransclude: lh, | |
ngModel: Wg, | |
ngList: Ug, | |
ngChange: Jg, | |
pattern: ke, | |
ngPattern: ke, | |
required: je, | |
ngRequired: je, | |
minlength: me, | |
ngMinlength: me, | |
maxlength: le, | |
ngMaxlength: le, | |
ngValue: Fg, | |
ngModelOptions: Yg | |
}).directive({ | |
ngInclude: Sg | |
}).directive(Wb).directive(ie); | |
a.provider({ | |
$anchorScroll: Re, | |
$animate: pg, | |
$animateCss: sg, | |
$$animateJs: mg, | |
$$animateQueue: og, | |
$$AnimateRunner: rg, | |
$$animateAsyncRun: qg, | |
$browser: Ue, | |
$cacheFactory: Ve, | |
$controller: df, | |
$document: ef, | |
$exceptionHandler: ff, | |
$filter: Id, | |
$$forceReflow: tg, | |
$interpolate: qf, | |
$interval: rf, | |
$http: mf, | |
$httpParamSerializer: gf, | |
$httpParamSerializerJQLike: hf, | |
$httpBackend: of , | |
$xhrFactory: nf, | |
$jsonpCallbacks: vg, | |
$location: uf, | |
$log: vf, | |
$parse: Gf, | |
$rootScope: Kf, | |
$q: Hf, | |
$$q: If, | |
$sce: eg, | |
$sceDelegate: dg, | |
$sniffer: Mf, | |
$templateCache: We, | |
$templateRequest: fg, | |
$$testability: Nf, | |
$timeout: Of, | |
$window: Pf, | |
$$rAF: Jf, | |
$$jqLite: Me, | |
$$HashMap: jg, | |
$$cookieReader: Qf | |
}) | |
}]) | |
})(aa); | |
aa.module("ngLocale", [], ["$provide", function(a) { | |
function b(a) { | |
a += | |
""; | |
var b = a.indexOf("."); | |
return -1 == b ? 0 : a.length - b - 1 | |
} | |
a.value("$locale", { | |
DATETIME_FORMATS: { | |
AMPMS: ["AM", "PM"], | |
DAY: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), | |
ERANAMES: ["Before Christ", "Anno Domini"], | |
ERAS: ["BC", "AD"], | |
FIRSTDAYOFWEEK: 6, | |
MONTH: "January February March April May June July August September October November December".split(" "), | |
SHORTDAY: "Sun Mon Tue Wed Thu Fri Sat".split(" "), | |
SHORTMONTH: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), | |
STANDALONEMONTH: "January February March April May June July August September October November December".split(" "), | |
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: "-\u00a4", | |
negSuf: "", | |
posPre: "\u00a4", | |
posSuf: "" | |
}] | |
}, | |
id: "en-us", | |
localeID: "en_US", | |
pluralCat: function(a, | |
d) { | |
var c = a | 0, | |
f = d; | |
void 0 === f && (f = Math.min(b(a), 3)); | |
return 1 == c && 0 == f ? "one" : "other" | |
} | |
}) | |
}]); | |
var ka = N("$sce"), | |
$a = { | |
HTML: "html", | |
CSS: "css", | |
URL: "url", | |
RESOURCE_URL: "resourceUrl", | |
TEMPLATE_URL: "templateUrl", | |
JS: "js" | |
}, | |
da = N("$compile"); | |
D(H.document).ready(function() { | |
ve(H.document, Lc) | |
}) | |
} | |
})(window); | |
angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";\n\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],\n.ng-cloak, .x-ng-cloak,\n.ng-hide:not(.ng-hide-animate) {\n display: none !important;\n}\n\nng\\:form {\n display: block;\n}\n\n.ng-animate-shim {\n visibility:hidden;\n}\n\n.ng-anchor {\n position:absolute;\n}\n</style>'); | |
/* | |
AngularJS v1.5.11-local+sha.f73a65146 | |
(c) 2010-2017 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(T, w) { | |
'use strict'; | |
function Ea(a, b, c) { | |
if (!a) throw Pa("areq", b || "?", c || "required"); | |
return a | |
} | |
function Fa(a, b) { | |
if (!a && !b) return ""; | |
if (!a) return b; | |
if (!b) return a; | |
W(a) && (a = a.join(" ")); | |
W(b) && (b = b.join(" ")); | |
return a + " " + b | |
} | |
function Qa(a) { | |
var b = {}; | |
a && (a.to || a.from) && (b.to = a.to, b.from = a.from); | |
return b | |
} | |
function X(a, b, c) { | |
var d = ""; | |
a = W(a) ? a : a && F(a) && a.length ? a.split(/\s+/) : []; | |
u(a, function(a, k) { | |
a && 0 < a.length && (d += 0 < k ? " " : "", d += c ? b + a : a + b) | |
}); | |
return d | |
} | |
function Ra(a) { | |
if (a instanceof z) switch (a.length) { | |
case 0: | |
return a; | |
case 1: | |
if (1 === a[0].nodeType) return a; | |
break; | |
default: | |
return z(ua(a)) | |
} | |
if (1 === a.nodeType) return z(a) | |
} | |
function ua(a) { | |
if (!a[0]) return a; | |
for (var b = 0; b < a.length; b++) { | |
var c = a[b]; | |
if (1 === c.nodeType) return c | |
} | |
} | |
function Sa(a, b, c) { | |
u(b, function(b) { | |
a.addClass(b, c) | |
}) | |
} | |
function Ta(a, b, c) { | |
u(b, function(b) { | |
a.removeClass(b, c) | |
}) | |
} | |
function ea(a) { | |
return function(b, c) { | |
c.addClass && (Sa(a, b, c.addClass), c.addClass = null); | |
c.removeClass && (Ta(a, b, c.removeClass), c.removeClass = null) | |
} | |
} | |
function pa(a) { | |
a = a || {}; | |
if (!a.$$prepared) { | |
var b = a.domOperation || | |
N; | |
a.domOperation = function() { | |
a.$$domOperationFired = !0; | |
b(); | |
b = N | |
}; | |
a.$$prepared = !0 | |
} | |
return a | |
} | |
function ja(a, b) { | |
Ga(a, b); | |
Ha(a, b) | |
} | |
function Ga(a, b) { | |
b.from && (a.css(b.from), b.from = null) | |
} | |
function Ha(a, b) { | |
b.to && (a.css(b.to), b.to = null) | |
} | |
function P(a, b, c) { | |
var d = b.options || {}; | |
c = c.options || {}; | |
var f = (d.addClass || "") + " " + (c.addClass || ""), | |
k = (d.removeClass || "") + " " + (c.removeClass || ""); | |
a = Ua(a.attr("class"), f, k); | |
c.preparationClasses && (d.preparationClasses = Y(c.preparationClasses, d.preparationClasses), delete c.preparationClasses); | |
f = d.domOperation !== N ? d.domOperation : null; | |
va(d, c); | |
f && (d.domOperation = f); | |
d.addClass = a.addClass ? a.addClass : null; | |
d.removeClass = a.removeClass ? a.removeClass : null; | |
b.addClass = d.addClass; | |
b.removeClass = d.removeClass; | |
return d | |
} | |
function Ua(a, b, c) { | |
function d(a) { | |
F(a) && (a = a.split(" ")); | |
var b = {}; | |
u(a, function(a) { | |
a.length && (b[a] = !0) | |
}); | |
return b | |
} | |
var f = {}; | |
a = d(a); | |
b = d(b); | |
u(b, function(a, b) { | |
f[b] = 1 | |
}); | |
c = d(c); | |
u(c, function(a, b) { | |
f[b] = 1 === f[b] ? null : -1 | |
}); | |
var k = { | |
addClass: "", | |
removeClass: "" | |
}; | |
u(f, function(b, c) { | |
var d, q; | |
1 === b ? (d = "addClass", | |
q = !a[c] || a[c + "-remove"]) : -1 === b && (d = "removeClass", q = a[c] || a[c + "-add"]); | |
q && (k[d].length && (k[d] += " "), k[d] += c) | |
}); | |
return k | |
} | |
function A(a) { | |
return a instanceof z ? a[0] : a | |
} | |
function Va(a, b, c) { | |
var d = ""; | |
b && (d = X(b, "ng-", !0)); | |
c.addClass && (d = Y(d, X(c.addClass, "-add"))); | |
c.removeClass && (d = Y(d, X(c.removeClass, "-remove"))); | |
d.length && (c.preparationClasses = d, a.addClass(d)) | |
} | |
function qa(a, b) { | |
var c = b ? "-" + b + "s" : ""; | |
ma(a, [na, c]); | |
return [na, c] | |
} | |
function wa(a, b) { | |
var c = b ? "paused" : "", | |
d = Z + "PlayState"; | |
ma(a, [d, c]); | |
return [d, c] | |
} | |
function ma(a, | |
b) { | |
a.style[b[0]] = b[1] | |
} | |
function Y(a, b) { | |
return a ? b ? a + " " + b : a : b | |
} | |
function Ia(a, b, c) { | |
var d = Object.create(null), | |
f = a.getComputedStyle(b) || {}; | |
u(c, function(a, b) { | |
var c = f[a]; | |
if (c) { | |
var v = c.charAt(0); | |
if ("-" === v || "+" === v || 0 <= v) c = Wa(c); | |
0 === c && (c = null); | |
d[b] = c | |
} | |
}); | |
return d | |
} | |
function Wa(a) { | |
var b = 0; | |
a = a.split(/\s*,\s*/); | |
u(a, function(a) { | |
"s" === a.charAt(a.length - 1) && (a = a.substring(0, a.length - 1)); | |
a = parseFloat(a) || 0; | |
b = b ? Math.max(a, b) : a | |
}); | |
return b | |
} | |
function xa(a) { | |
return 0 === a || null != a | |
} | |
function Ja(a, b) { | |
var c = R, | |
d = a + "s"; | |
b ? c += "Duration" : | |
d += " linear all"; | |
return [c, d] | |
} | |
function Ka() { | |
var a = Object.create(null); | |
return { | |
flush: function() { | |
a = Object.create(null) | |
}, | |
count: function(b) { | |
return (b = a[b]) ? b.total : 0 | |
}, | |
get: function(b) { | |
return (b = a[b]) && b.value | |
}, | |
put: function(b, c) { | |
a[b] ? a[b].total++ : a[b] = { | |
total: 1, | |
value: c | |
} | |
} | |
} | |
} | |
function La(a, b, c) { | |
u(c, function(c) { | |
a[c] = ya(a[c]) ? a[c] : b.style.getPropertyValue(c) | |
}) | |
} | |
var R, za, Z, Aa; | |
void 0 === T.ontransitionend && void 0 !== T.onwebkittransitionend ? (R = "WebkitTransition", za = "webkitTransitionEnd transitionend") : (R = "transition", za = | |
"transitionend"); | |
void 0 === T.onanimationend && void 0 !== T.onwebkitanimationend ? (Z = "WebkitAnimation", Aa = "webkitAnimationEnd animationend") : (Z = "animation", Aa = "animationend"); | |
var ra = Z + "Delay", | |
Ba = Z + "Duration", | |
na = R + "Delay", | |
Ma = R + "Duration", | |
Pa = w.$$minErr("ng"); | |
"use strict"; | |
"use strict"; | |
"use strict"; | |
var Xa = { | |
transitionDuration: Ma, | |
transitionDelay: na, | |
transitionProperty: R + "Property", | |
animationDuration: Ba, | |
animationDelay: ra, | |
animationIterationCount: Z + "IterationCount" | |
}, | |
Ya = { | |
transitionDuration: Ma, | |
transitionDelay: na, | |
animationDuration: Ba, | |
animationDelay: ra | |
}; | |
"use strict"; | |
"use strict"; | |
"use strict"; | |
"use strict"; | |
"use strict"; | |
"use strict"; | |
"use strict"; | |
var Ca, va, u, W, ya, sa, Da, ta, F, K, z, N; | |
w.module("ngAnimate", [], function() { | |
N = w.noop; | |
Ca = w.copy; | |
va = w.extend; | |
z = w.element; | |
u = w.forEach; | |
W = w.isArray; | |
F = w.isString; | |
ta = w.isObject; | |
K = w.isUndefined; | |
ya = w.isDefined; | |
Da = w.isFunction; | |
sa = w.isElement | |
}).directive("ngAnimateSwap", ["$animate", "$rootScope", function(a, b) { | |
return { | |
restrict: "A", | |
transclude: "element", | |
terminal: !0, | |
priority: 600, | |
link: function(b, d, f, k, m) { | |
var c, v; | |
b.$watchCollection(f.ngAnimateSwap || f["for"], function(q) { | |
c && a.leave(c); | |
v && (v.$destroy(), v = null); | |
if (q || 0 === q) v = b.$new(), m(v, function(b) { | |
c = b; | |
a.enter(b, null, d) | |
}) | |
}) | |
} | |
} | |
}]).directive("ngAnimateChildren", ["$interpolate", function(a) { | |
return { | |
link: function(b, c, d) { | |
function f(a) { | |
c.data("$$ngAnimateChildren", "on" === a || "true" === a) | |
} | |
var k = d.ngAnimateChildren; | |
F(k) && 0 === k.length ? c.data("$$ngAnimateChildren", !0) : (f(a(k)(b)), d.$observe("ngAnimateChildren", f)) | |
} | |
} | |
}]).factory("$$rAFScheduler", ["$$rAF", function(a) { | |
function b(a) { | |
d = | |
d.concat(a); | |
c() | |
} | |
function c() { | |
if (d.length) { | |
for (var b = d.shift(), m = 0; m < b.length; m++) b[m](); | |
f || a(function() { | |
f || c() | |
}) | |
} | |
} | |
var d, f; | |
d = b.queue = []; | |
b.waitUntilQuiet = function(b) { | |
f && f(); | |
f = a(function() { | |
f = null; | |
b(); | |
c() | |
}) | |
}; | |
return b | |
}]).provider("$$animateQueue", ["$animateProvider", function(a) { | |
function b(a) { | |
if (!a) return null; | |
a = a.split(" "); | |
var b = Object.create(null); | |
u(a, function(a) { | |
b[a] = !0 | |
}); | |
return b | |
} | |
function c(a, c) { | |
if (a && c) { | |
var d = b(c); | |
return a.split(" ").some(function(a) { | |
return d[a] | |
}) | |
} | |
} | |
function d(a, b, c, d) { | |
return k[a].some(function(a) { | |
return a(b, | |
c, d) | |
}) | |
} | |
function f(a, b) { | |
var c = 0 < (a.addClass || "").length, | |
d = 0 < (a.removeClass || "").length; | |
return b ? c && d : c || d | |
} | |
var k = this.rules = { | |
skip: [], | |
cancel: [], | |
join: [] | |
}; | |
k.join.push(function(a, b, c) { | |
return !b.structural && f(b) | |
}); | |
k.skip.push(function(a, b, c) { | |
return !b.structural && !f(b) | |
}); | |
k.skip.push(function(a, b, c) { | |
return "leave" === c.event && b.structural | |
}); | |
k.skip.push(function(a, b, c) { | |
return c.structural && 2 === c.state && !b.structural | |
}); | |
k.cancel.push(function(a, b, c) { | |
return c.structural && b.structural | |
}); | |
k.cancel.push(function(a, b, | |
c) { | |
return 2 === c.state && b.structural | |
}); | |
k.cancel.push(function(a, b, d) { | |
if (d.structural) return !1; | |
a = b.addClass; | |
b = b.removeClass; | |
var f = d.addClass; | |
d = d.removeClass; | |
return K(a) && K(b) || K(f) && K(d) ? !1 : c(a, d) || c(b, f) | |
}); | |
this.$get = ["$$rAF", "$rootScope", "$rootElement", "$document", "$$HashMap", "$$animation", "$$AnimateRunner", "$templateRequest", "$$jqLite", "$$forceReflow", function(b, c, k, n, aa, oa, Q, B, S, ka) { | |
function v() { | |
var a = !1; | |
return function(b) { | |
a ? b() : c.$$postDigest(function() { | |
a = !0; | |
b() | |
}) | |
} | |
} | |
function G(a, b, c) { | |
var ba = A(b), | |
e = A(a), | |
d = []; | |
(a = h[c]) && u(a, function(a) { | |
L.call(a.node, ba) ? d.push(a.callback) : "leave" === c && L.call(a.node, e) && d.push(a.callback) | |
}); | |
return d | |
} | |
function g(a, b, c) { | |
var ba = ua(b); | |
return a.filter(function(a) { | |
return !(a.node === ba && (!c || a.callback === c)) | |
}) | |
} | |
function t(a, h, g) { | |
function ba(c, e, d, p) { | |
k(function() { | |
var c = G(S, a, e); | |
c.length ? b(function() { | |
u(c, function(b) { | |
b(a, d, p) | |
}); | |
"close" !== d || a[0].parentNode || O.off(a) | |
}) : "close" !== d || a[0].parentNode || O.off(a) | |
}); | |
c.progress(e, d, p) | |
} | |
function l(b) { | |
var c = a, | |
e = p; | |
e.preparationClasses && | |
(c.removeClass(e.preparationClasses), e.preparationClasses = null); | |
e.activeClasses && (c.removeClass(e.activeClasses), e.activeClasses = null); | |
Na(a, p); | |
ja(a, p); | |
p.domOperation(); | |
D.complete(!b) | |
} | |
var p = Ca(g), | |
t, S; | |
if (a = Ra(a)) t = A(a), S = a.parent(); | |
var p = pa(p), | |
D = new Q, | |
k = v(); | |
W(p.addClass) && (p.addClass = p.addClass.join(" ")); | |
p.addClass && !F(p.addClass) && (p.addClass = null); | |
W(p.removeClass) && (p.removeClass = p.removeClass.join(" ")); | |
p.removeClass && !F(p.removeClass) && (p.removeClass = null); | |
p.from && !ta(p.from) && (p.from = null); | |
p.to && | |
!ta(p.to) && (p.to = null); | |
if (!t) return l(), D; | |
g = [t.className, p.addClass, p.removeClass].join(" "); | |
if (!Za(g)) return l(), D; | |
var ia = 0 <= ["enter", "move", "leave"].indexOf(h), | |
y = n[0].hidden, | |
L = !e || y || M.get(t); | |
g = !L && E.get(t) || {}; | |
var I = !!g.state; | |
L || I && 1 === g.state || (L = !V(a, S, h)); | |
if (L) return y && ba(D, h, "start"), l(), y && ba(D, h, "close"), D; | |
ia && H(a); | |
y = { | |
structural: ia, | |
element: a, | |
event: h, | |
addClass: p.addClass, | |
removeClass: p.removeClass, | |
close: l, | |
options: p, | |
runner: D | |
}; | |
if (I) { | |
if (d("skip", a, y, g)) { | |
if (2 === g.state) return l(), D; | |
P(a, g, y); | |
return g.runner | |
} | |
if (d("cancel", | |
a, y, g)) | |
if (2 === g.state) g.runner.end(); | |
else if (g.structural) g.close(); | |
else return P(a, g, y), g.runner; | |
else if (d("join", a, y, g)) | |
if (2 === g.state) P(a, y, {}); | |
else return Va(a, ia ? h : null, p), h = y.event = g.event, p = P(a, g, y), g.runner | |
} else P(a, y, {}); | |
(I = y.structural) || (I = "animate" === y.event && 0 < Object.keys(y.options.to || {}).length || f(y)); | |
if (!I) return l(), m(a), D; | |
var q = (g.counter || 0) + 1; | |
y.counter = q; | |
x(a, 1, y); | |
c.$$postDigest(function() { | |
var b = E.get(t), | |
c = !b, | |
b = b || {}, | |
e = 0 < (a.parent() || []).length && ("animate" === b.event || b.structural || | |
f(b)); | |
if (c || b.counter !== q || !e) { | |
c && (Na(a, p), ja(a, p)); | |
if (c || ia && b.event !== h) p.domOperation(), D.end(); | |
e || m(a) | |
} else h = !b.structural && f(b, !0) ? "setClass" : b.event, x(a, 2), b = oa(a, h, b.options), D.setHost(b), ba(D, h, "start", {}), b.done(function(b) { | |
l(!b); | |
(b = E.get(t)) && b.counter === q && m(A(a)); | |
ba(D, h, "close", {}) | |
}) | |
}); | |
return D | |
} | |
function H(a) { | |
a = A(a).querySelectorAll("[data-ng-animate]"); | |
u(a, function(a) { | |
var b = parseInt(a.getAttribute("data-ng-animate"), 10), | |
c = E.get(a); | |
if (c) switch (b) { | |
case 2: | |
c.runner.end(); | |
case 1: | |
E.remove(a) | |
} | |
}) | |
} | |
function m(a) { | |
a = A(a); | |
a.removeAttribute("data-ng-animate"); | |
E.remove(a) | |
} | |
function l(a, b) { | |
return A(a) === A(b) | |
} | |
function V(a, b, c) { | |
c = z(n[0].body); | |
var e = l(a, c) || "HTML" === a[0].nodeName, | |
d = l(a, k), | |
h = !1, | |
g, p = M.get(A(a)); | |
(a = z.data(a[0], "$ngAnimatePin")) && (b = a); | |
for (b = A(b); b;) { | |
d || (d = l(b, k)); | |
if (1 !== b.nodeType) break; | |
a = E.get(b) || {}; | |
if (!h) { | |
var t = M.get(b); | |
if (!0 === t && !1 !== p) { | |
p = !0; | |
break | |
} else !1 === t && (p = !1); | |
h = a.structural | |
} | |
if (K(g) || !0 === g) a = z.data(b, "$$ngAnimateChildren"), ya(a) && (g = a); | |
if (h && !1 === g) break; | |
e || (e = l(b, c)); | |
if (e && | |
d) break; | |
if (!d && (a = z.data(b, "$ngAnimatePin"))) { | |
b = A(a); | |
continue | |
} | |
b = b.parentNode | |
} | |
return (!h || g) && !0 !== p && d && e | |
} | |
function x(a, b, c) { | |
c = c || {}; | |
c.state = b; | |
a = A(a); | |
a.setAttribute("data-ng-animate", b); | |
c = (b = E.get(a)) ? va(b, c) : c; | |
E.put(a, c) | |
} | |
var E = new aa, | |
M = new aa, | |
e = null, | |
D = c.$watch(function() { | |
return 0 === B.totalPendingRequests | |
}, function(a) { | |
a && (D(), c.$$postDigest(function() { | |
c.$$postDigest(function() { | |
null === e && (e = !0) | |
}) | |
})) | |
}), | |
h = Object.create(null), | |
ia = a.classNameFilter(), | |
Za = ia ? function(a) { | |
return ia.test(a) | |
} : function() { | |
return !0 | |
}, | |
Na = ea(S), | |
L = T.Node.prototype.contains || function(a) { | |
return this === a || !!(this.compareDocumentPosition(a) & 16) | |
}, | |
O = { | |
on: function(a, b, c) { | |
var e = ua(b); | |
h[a] = h[a] || []; | |
h[a].push({ | |
node: e, | |
callback: c | |
}); | |
z(b).on("$destroy", function() { | |
E.get(e) || O.off(a, b, c) | |
}) | |
}, | |
off: function(a, b, c) { | |
if (1 !== arguments.length || F(arguments[0])) { | |
var e = h[a]; | |
e && (h[a] = 1 === arguments.length ? null : g(e, b, c)) | |
} else | |
for (e in b = arguments[0], h) h[e] = g(h[e], b) | |
}, | |
pin: function(a, b) { | |
Ea(sa(a), "element", "not an element"); | |
Ea(sa(b), "parentElement", "not an element"); | |
a.data("$ngAnimatePin", b) | |
}, | |
push: function(a, b, c, e) { | |
c = c || {}; | |
c.domOperation = e; | |
return t(a, b, c) | |
}, | |
enabled: function(a, b) { | |
var c = arguments.length; | |
if (0 === c) b = !!e; | |
else if (sa(a)) { | |
var d = A(a); | |
1 === c ? b = !M.get(d) : M.put(d, !b) | |
} else b = e = !!a; | |
return b | |
} | |
}; | |
return O | |
}] | |
}]).provider("$$animation", ["$animateProvider", function(a) { | |
var b = this.drivers = []; | |
this.$get = ["$$jqLite", "$rootScope", "$injector", "$$AnimateRunner", "$$HashMap", "$$rAFScheduler", function(a, d, f, k, m, q) { | |
function c(a) { | |
function b(a) { | |
if (a.processed) return a; | |
a.processed = !0; | |
var d = a.domNode, | |
t = d.parentNode; | |
f.put(d, a); | |
for (var H; t;) { | |
if (H = f.get(t)) { | |
H.processed || (H = b(H)); | |
break | |
} | |
t = t.parentNode | |
}(H || c).children.push(a); | |
return a | |
} | |
var c = { | |
children: [] | |
}, | |
d, f = new m; | |
for (d = 0; d < a.length; d++) { | |
var k = a[d]; | |
f.put(k.domNode, a[d] = { | |
domNode: k.domNode, | |
fn: k.fn, | |
children: [] | |
}) | |
} | |
for (d = 0; d < a.length; d++) b(a[d]); | |
return function(a) { | |
var b = [], | |
c = [], | |
d; | |
for (d = 0; d < a.children.length; d++) c.push(a.children[d]); | |
a = c.length; | |
var f = 0, | |
l = []; | |
for (d = 0; d < c.length; d++) { | |
var k = c[d]; | |
0 >= a && (a = f, f = 0, b.push(l), l = []); | |
l.push(k.fn); | |
k.children.forEach(function(a) { | |
f++; | |
c.push(a) | |
}); | |
a-- | |
} | |
l.length && b.push(l); | |
return b | |
}(c) | |
} | |
var n = [], | |
aa = ea(a); | |
return function(m, v, B) { | |
function S(a) { | |
a = a.hasAttribute("ng-animate-ref") ? [a] : a.querySelectorAll("[ng-animate-ref]"); | |
var b = []; | |
u(a, function(a) { | |
var c = a.getAttribute("ng-animate-ref"); | |
c && c.length && b.push(a) | |
}); | |
return b | |
} | |
function ka(a) { | |
var b = [], | |
c = {}; | |
u(a, function(a, d) { | |
var e = A(a.element), | |
g = 0 <= ["enter", "move"].indexOf(a.event), | |
e = a.structural ? S(e) : []; | |
if (e.length) { | |
var h = g ? "to" : "from"; | |
u(e, function(a) { | |
var b = a.getAttribute("ng-animate-ref"); | |
c[b] = | |
c[b] || {}; | |
c[b][h] = { | |
animationID: d, | |
element: z(a) | |
} | |
}) | |
} else b.push(a) | |
}); | |
var d = {}, | |
g = {}; | |
u(c, function(c, e) { | |
var h = c.from, | |
l = c.to; | |
if (h && l) { | |
var f = a[h.animationID], | |
M = a[l.animationID], | |
t = h.animationID.toString(); | |
if (!g[t]) { | |
var x = g[t] = { | |
structural: !0, | |
beforeStart: function() { | |
f.beforeStart(); | |
M.beforeStart() | |
}, | |
close: function() { | |
f.close(); | |
M.close() | |
}, | |
classes: I(f.classes, M.classes), | |
from: f, | |
to: M, | |
anchors: [] | |
}; | |
x.classes.length ? b.push(x) : (b.push(f), b.push(M)) | |
} | |
g[t].anchors.push({ | |
out: h.element, | |
"in": l.element | |
}) | |
} else h = h ? h.animationID : | |
l.animationID, l = h.toString(), d[l] || (d[l] = !0, b.push(a[h])) | |
}); | |
return b | |
} | |
function I(a, b) { | |
a = a.split(" "); | |
b = b.split(" "); | |
for (var c = [], d = 0; d < a.length; d++) { | |
var e = a[d]; | |
if ("ng-" !== e.substring(0, 3)) | |
for (var g = 0; g < b.length; g++) | |
if (e === b[g]) { | |
c.push(e); | |
break | |
} | |
} | |
return c.join(" ") | |
} | |
function G(a) { | |
for (var c = b.length - 1; 0 <= c; c--) { | |
var d = f.get(b[c])(a); | |
if (d) return d | |
} | |
} | |
function g(a, b) { | |
function c(a) { | |
(a = a.data("$$animationRunner")) && a.setHost(b) | |
} | |
a.from && a.to ? (c(a.from.element), c(a.to.element)) : c(a.element) | |
} | |
function t() { | |
var a = | |
m.data("$$animationRunner"); | |
!a || "leave" === v && B.$$domOperationFired || a.end() | |
} | |
function H(b) { | |
m.off("$destroy", t); | |
m.removeData("$$animationRunner"); | |
aa(m, B); | |
ja(m, B); | |
B.domOperation(); | |
x && a.removeClass(m, x); | |
m.removeClass("ng-animate"); | |
l.complete(!b) | |
} | |
B = pa(B); | |
var Oa = 0 <= ["enter", "move", "leave"].indexOf(v), | |
l = new k({ | |
end: function() { | |
H() | |
}, | |
cancel: function() { | |
H(!0) | |
} | |
}); | |
if (!b.length) return H(), l; | |
m.data("$$animationRunner", l); | |
var V = Fa(m.attr("class"), Fa(B.addClass, B.removeClass)), | |
x = B.tempClasses; | |
x && (V += " " + x, B.tempClasses = | |
null); | |
var E; | |
Oa && (E = "ng-" + v + "-prepare", a.addClass(m, E)); | |
n.push({ | |
element: m, | |
classes: V, | |
event: v, | |
structural: Oa, | |
options: B, | |
beforeStart: function() { | |
m.addClass("ng-animate"); | |
x && a.addClass(m, x); | |
E && (a.removeClass(m, E), E = null) | |
}, | |
close: H | |
}); | |
m.on("$destroy", t); | |
if (1 < n.length) return l; | |
d.$$postDigest(function() { | |
var a = []; | |
u(n, function(b) { | |
b.element.data("$$animationRunner") ? a.push(b) : b.close() | |
}); | |
n.length = 0; | |
var b = ka(a), | |
d = []; | |
u(b, function(a) { | |
d.push({ | |
domNode: A(a.from ? a.from.element : a.element), | |
fn: function() { | |
a.beforeStart(); | |
var b, | |
c = a.close; | |
if ((a.anchors ? a.from.element || a.to.element : a.element).data("$$animationRunner")) { | |
var d = G(a); | |
d && (b = d.start) | |
} | |
b ? (b = b(), b.done(function(a) { | |
c(!a) | |
}), g(a, b)) : c() | |
} | |
}) | |
}); | |
q(c(d)) | |
}); | |
return l | |
} | |
}] | |
}]).provider("$animateCss", ["$animateProvider", function(a) { | |
var b = Ka(), | |
c = Ka(); | |
this.$get = ["$window", "$$jqLite", "$$AnimateRunner", "$timeout", "$$forceReflow", "$sniffer", "$$rAFScheduler", "$$animateQueue", function(a, f, k, m, q, v, n, aa) { | |
function d(a, b) { | |
var c = a.parentNode; | |
return (c.$$ngAnimateParentKey || (c.$$ngAnimateParentKey = | |
++I)) + "-" + a.getAttribute("class") + "-" + b | |
} | |
function w(d, t, m, k) { | |
var g; | |
0 < b.count(m) && (g = c.get(m), g || (t = X(t, "-stagger"), f.addClass(d, t), g = Ia(a, d, k), g.animationDuration = Math.max(g.animationDuration, 0), g.transitionDuration = Math.max(g.transitionDuration, 0), f.removeClass(d, t), c.put(m, g))); | |
return g || {} | |
} | |
function B(a) { | |
G.push(a); | |
n.waitUntilQuiet(function() { | |
b.flush(); | |
c.flush(); | |
for (var a = q(), d = 0; d < G.length; d++) G[d](a); | |
G.length = 0 | |
}) | |
} | |
function S(c, d, f) { | |
d = b.get(f); | |
d || (d = Ia(a, c, Xa), "infinite" === d.animationIterationCount && | |
(d.animationIterationCount = 1)); | |
b.put(f, d); | |
c = d; | |
f = c.animationDelay; | |
d = c.transitionDelay; | |
c.maxDelay = f && d ? Math.max(f, d) : f || d; | |
c.maxDuration = Math.max(c.animationDuration * c.animationIterationCount, c.transitionDuration); | |
return c | |
} | |
var ka = ea(f), | |
I = 0, | |
G = []; | |
return function(a, c) { | |
function g() { | |
l() | |
} | |
function t() { | |
l(!0) | |
} | |
function l(b) { | |
if (!(L || G && O)) { | |
L = !0; | |
O = !1; | |
e.$$skipPreparationClasses || f.removeClass(a, ha); | |
f.removeClass(a, ea); | |
wa(h, !1); | |
qa(h, !1); | |
u(n, function(a) { | |
h.style[a[0]] = "" | |
}); | |
ka(a, e); | |
ja(a, e); | |
Object.keys(D).length && u(D, | |
function(a, b) { | |
a ? h.style.setProperty(b, a) : h.style.removeProperty(b) | |
}); | |
if (e.onDone) e.onDone(); | |
fa && fa.length && a.off(fa.join(" "), E); | |
var c = a.data("$$animateCss"); | |
c && (m.cancel(c[0].timer), a.removeData("$$animateCss")); | |
p && p.complete(!b) | |
} | |
} | |
function V(a) { | |
r.blockTransition && qa(h, a); | |
r.blockKeyframeAnimation && wa(h, !!a) | |
} | |
function x() { | |
p = new k({ | |
end: g, | |
cancel: t | |
}); | |
B(N); | |
l(); | |
return { | |
$$willAnimate: !1, | |
start: function() { | |
return p | |
}, | |
end: g | |
} | |
} | |
function E(a) { | |
a.stopPropagation(); | |
var b = a.originalEvent || a; | |
a = b.$manualTimeStamp || Date.now(); | |
b = parseFloat(b.elapsedTime.toFixed(3)); | |
Math.max(a - F, 0) >= Q && b >= J && (G = !0, l()) | |
} | |
function M() { | |
function b() { | |
if (!L) { | |
V(!1); | |
u(n, function(a) { | |
h.style[a[0]] = a[1] | |
}); | |
ka(a, e); | |
f.addClass(a, ea); | |
if (r.recalculateTimingStyles) { | |
P = h.className + " " + ha; | |
la = d(h, P); | |
C = S(h, P, la); | |
ca = C.maxDelay; | |
z = Math.max(ca, 0); | |
J = C.maxDuration; | |
if (0 === J) { | |
l(); | |
return | |
} | |
r.hasTransitions = 0 < C.transitionDuration; | |
r.hasAnimations = 0 < C.animationDuration | |
} | |
r.applyAnimationDelay && (ca = "boolean" !== typeof e.delay && xa(e.delay) ? parseFloat(e.delay) : ca, z = Math.max(ca, 0), | |
C.animationDelay = ca, da = [ra, ca + "s"], n.push(da), h.style[da[0]] = da[1]); | |
Q = 1E3 * z; | |
oa = 1E3 * J; | |
if (e.easing) { | |
var b, g = e.easing; | |
r.hasTransitions && (b = R + "TimingFunction", n.push([b, g]), h.style[b] = g); | |
r.hasAnimations && (b = Z + "TimingFunction", n.push([b, g]), h.style[b] = g) | |
} | |
C.transitionDuration && fa.push(za); | |
C.animationDuration && fa.push(Aa); | |
F = Date.now(); | |
var x = Q + 1.5 * oa; | |
b = F + x; | |
var g = a.data("$$animateCss") || [], | |
k = !0; | |
if (g.length) { | |
var q = g[0]; | |
(k = b > q.expectedEndTime) ? m.cancel(q.timer): g.push(l) | |
} | |
k && (x = m(c, x, !1), g[0] = { | |
timer: x, | |
expectedEndTime: b | |
}, | |
g.push(l), a.data("$$animateCss", g)); | |
if (fa.length) a.on(fa.join(" "), E); | |
e.to && (e.cleanupStyles && La(D, h, Object.keys(e.to)), Ha(a, e)) | |
} | |
} | |
function c() { | |
var b = a.data("$$animateCss"); | |
if (b) { | |
for (var c = 1; c < b.length; c++) b[c](); | |
a.removeData("$$animateCss") | |
} | |
} | |
if (!L) | |
if (h.parentNode) { | |
var g = function(a) { | |
if (G) O && a && (O = !1, l()); | |
else if (O = !a, C.animationDuration) | |
if (a = wa(h, O), O) n.push(a); | |
else { | |
var b = n, | |
c = b.indexOf(a); | |
0 <= a && b.splice(c, 1) | |
} | |
}, | |
x = 0 < Y && (C.transitionDuration && 0 === U.transitionDuration || C.animationDuration && 0 === U.animationDuration) && | |
Math.max(U.animationDelay, U.transitionDelay); | |
x ? m(b, Math.floor(x * Y * 1E3), !1) : b(); | |
y.resume = function() { | |
g(!0) | |
}; | |
y.pause = function() { | |
g(!1) | |
} | |
} else l() | |
} | |
var e = c || {}; | |
e.$$prepared || (e = pa(Ca(e))); | |
var D = {}, | |
h = A(a); | |
if (!h || !h.parentNode || !aa.enabled()) return x(); | |
var n = [], | |
I = a.attr("class"), | |
q = Qa(e), | |
L, O, G, p, y, z, Q, J, oa, F, fa = []; | |
if (0 === e.duration || !v.animations && !v.transitions) return x(); | |
var K = e.event && W(e.event) ? e.event.join(" ") : e.event, | |
T = "", | |
ga = ""; | |
K && e.structural ? T = X(K, "ng-", !0) : K && (T = K); | |
e.addClass && (ga += X(e.addClass, "-add")); | |
e.removeClass && (ga.length && (ga += " "), ga += X(e.removeClass, "-remove")); | |
e.applyClassesEarly && ga.length && ka(a, e); | |
var ha = [T, ga].join(" ").trim(), | |
P = I + " " + ha, | |
ea = X(ha, "-active"), | |
I = q.to && 0 < Object.keys(q.to).length; | |
if (!(0 < (e.keyframeStyle || "").length || I || ha)) return x(); | |
var la, U; | |
0 < e.stagger ? (q = parseFloat(e.stagger), U = { | |
transitionDelay: q, | |
animationDelay: q, | |
transitionDuration: 0, | |
animationDuration: 0 | |
}) : (la = d(h, P), U = w(h, ha, la, Ya)); | |
e.$$skipPreparationClasses || f.addClass(a, ha); | |
e.transitionStyle && (q = [R, e.transitionStyle], | |
ma(h, q), n.push(q)); | |
0 <= e.duration && (q = 0 < h.style[R].length, q = Ja(e.duration, q), ma(h, q), n.push(q)); | |
e.keyframeStyle && (q = [Z, e.keyframeStyle], ma(h, q), n.push(q)); | |
var Y = U ? 0 <= e.staggerIndex ? e.staggerIndex : b.count(la) : 0; | |
(K = 0 === Y) && !e.skipBlocking && qa(h, 9999); | |
var C = S(h, P, la), | |
ca = C.maxDelay; | |
z = Math.max(ca, 0); | |
J = C.maxDuration; | |
var r = {}; | |
r.hasTransitions = 0 < C.transitionDuration; | |
r.hasAnimations = 0 < C.animationDuration; | |
r.hasTransitionAll = r.hasTransitions && "all" === C.transitionProperty; | |
r.applyTransitionDuration = I && (r.hasTransitions && | |
!r.hasTransitionAll || r.hasAnimations && !r.hasTransitions); | |
r.applyAnimationDuration = e.duration && r.hasAnimations; | |
r.applyTransitionDelay = xa(e.delay) && (r.applyTransitionDuration || r.hasTransitions); | |
r.applyAnimationDelay = xa(e.delay) && r.hasAnimations; | |
r.recalculateTimingStyles = 0 < ga.length; | |
if (r.applyTransitionDuration || r.applyAnimationDuration) J = e.duration ? parseFloat(e.duration) : J, r.applyTransitionDuration && (r.hasTransitions = !0, C.transitionDuration = J, q = 0 < h.style[R + "Property"].length, n.push(Ja(J, q))), r.applyAnimationDuration && | |
(r.hasAnimations = !0, C.animationDuration = J, n.push([Ba, J + "s"])); | |
if (0 === J && !r.recalculateTimingStyles) return x(); | |
if (null != e.delay) { | |
var da; | |
"boolean" !== typeof e.delay && (da = parseFloat(e.delay), z = Math.max(da, 0)); | |
r.applyTransitionDelay && n.push([na, da + "s"]); | |
r.applyAnimationDelay && n.push([ra, da + "s"]) | |
} | |
null == e.duration && 0 < C.transitionDuration && (r.recalculateTimingStyles = r.recalculateTimingStyles || K); | |
Q = 1E3 * z; | |
oa = 1E3 * J; | |
e.skipBlocking || (r.blockTransition = 0 < C.transitionDuration, r.blockKeyframeAnimation = 0 < C.animationDuration && | |
0 < U.animationDelay && 0 === U.animationDuration); | |
e.from && (e.cleanupStyles && La(D, h, Object.keys(e.from)), Ga(a, e)); | |
r.blockTransition || r.blockKeyframeAnimation ? V(J) : e.skipBlocking || qa(h, !1); | |
return { | |
$$willAnimate: !0, | |
end: g, | |
start: function() { | |
if (!L) return y = { | |
end: g, | |
cancel: t, | |
resume: null, | |
pause: null | |
}, p = new k(y), B(M), p | |
} | |
} | |
} | |
}] | |
}]).provider("$$animateCssDriver", ["$$animationProvider", function(a) { | |
a.drivers.push("$$animateCssDriver"); | |
this.$get = ["$animateCss", "$rootScope", "$$AnimateRunner", "$rootElement", "$sniffer", "$$jqLite", | |
"$document", | |
function(a, c, d, f, k, m, q) { | |
function b(a, b) { | |
F(a) && (a = a.split(" ")); | |
F(b) && (b = b.split(" ")); | |
return a.filter(function(a) { | |
return -1 === b.indexOf(a) | |
}).join(" ") | |
} | |
function n(c, f, k) { | |
function m(a) { | |
var b = {}, | |
c = A(a).getBoundingClientRect(); | |
u(["width", "height", "top", "left"], function(a) { | |
var d = c[a]; | |
switch (a) { | |
case "top": | |
d += Q.scrollTop; | |
break; | |
case "left": | |
d += Q.scrollLeft | |
} | |
b[a] = Math.floor(d) + "px" | |
}); | |
return b | |
} | |
function g() { | |
var c = (k.attr("class") || "").replace(/\bng-\S+\b/g, ""), | |
d = b(c, v), | |
c = b(v, c), | |
d = a(n, { | |
to: m(k), | |
addClass: "ng-anchor-in " + | |
d, | |
removeClass: "ng-anchor-out " + c, | |
delay: !0 | |
}); | |
return d.$$willAnimate ? d : null | |
} | |
function q() { | |
n.remove(); | |
f.removeClass("ng-animate-shim"); | |
k.removeClass("ng-animate-shim") | |
} | |
var n = z(A(f).cloneNode(!0)), | |
v = (n.attr("class") || "").replace(/\bng-\S+\b/g, ""); | |
f.addClass("ng-animate-shim"); | |
k.addClass("ng-animate-shim"); | |
n.addClass("ng-anchor"); | |
B.append(n); | |
var l; | |
c = function() { | |
var b = a(n, { | |
addClass: "ng-anchor-out", | |
delay: !0, | |
from: m(f) | |
}); | |
return b.$$willAnimate ? b : null | |
}(); | |
if (!c && (l = g(), !l)) return q(); | |
var V = c || l; | |
return { | |
start: function() { | |
function a() { | |
c && | |
c.end() | |
} | |
var b, c = V.start(); | |
c.done(function() { | |
c = null; | |
if (!l && (l = g())) return c = l.start(), c.done(function() { | |
c = null; | |
q(); | |
b.complete() | |
}), c; | |
q(); | |
b.complete() | |
}); | |
return b = new d({ | |
end: a, | |
cancel: a | |
}) | |
} | |
} | |
} | |
function aa(a, b, c, f) { | |
var g = w(a, N), | |
k = w(b, N), | |
m = []; | |
u(f, function(a) { | |
(a = n(c, a.out, a["in"])) && m.push(a) | |
}); | |
if (g || k || 0 !== m.length) return { | |
start: function() { | |
function a() { | |
u(b, function(a) { | |
a.end() | |
}) | |
} | |
var b = []; | |
g && b.push(g.start()); | |
k && b.push(k.start()); | |
u(m, function(a) { | |
b.push(a.start()) | |
}); | |
var c = new d({ | |
end: a, | |
cancel: a | |
}); | |
d.all(b, function(a) { | |
c.complete(a) | |
}); | |
return c | |
} | |
} | |
} | |
function w(b) { | |
var c = b.element, | |
d = b.options || {}; | |
b.structural && (d.event = b.event, d.structural = !0, d.applyClassesEarly = !0, "leave" === b.event && (d.onDone = d.domOperation)); | |
d.preparationClasses && (d.event = Y(d.event, d.preparationClasses)); | |
b = a(c, d); | |
return b.$$willAnimate ? b : null | |
} | |
if (!k.animations && !k.transitions) return N; | |
var Q = q[0].body; | |
c = A(f); | |
var B = z(c.parentNode && 11 === c.parentNode.nodeType || Q.contains(c) ? c : Q); | |
return function(a) { | |
return a.from && a.to ? aa(a.from, a.to, a.classes, a.anchors) : w(a) | |
} | |
} | |
] | |
}]).provider("$$animateJs", ["$animateProvider", function(a) { | |
this.$get = ["$injector", "$$AnimateRunner", "$$jqLite", function(b, c, d) { | |
function f(c) { | |
c = W(c) ? c : c.split(" "); | |
for (var d = [], f = {}, k = 0; k < c.length; k++) { | |
var m = c[k], | |
u = a.$$registeredAnimations[m]; | |
u && !f[m] && (d.push(b.get(u)), f[m] = !0) | |
} | |
return d | |
} | |
var k = ea(d); | |
return function(a, b, d, n) { | |
function m() { | |
n.domOperation(); | |
k(a, n) | |
} | |
function q(a, b, d, f, e) { | |
switch (d) { | |
case "animate": | |
b = [b, f.from, f.to, e]; | |
break; | |
case "setClass": | |
b = [b, z, A, e]; | |
break; | |
case "addClass": | |
b = [b, z, e]; | |
break; | |
case "removeClass": | |
b = [b, A, e]; | |
break; | |
default: | |
b = [b, e] | |
} | |
b.push(f); | |
if (a = a.apply(a, b)) | |
if (Da(a.start) && (a = a.start()), a instanceof c) a.done(e); | |
else if (Da(a)) return a; | |
return N | |
} | |
function v(a, b, d, f, e) { | |
var g = []; | |
u(f, function(f) { | |
var h = f[e]; | |
h && g.push(function() { | |
var e, f, g = !1, | |
k = function(a) { | |
g || (g = !0, (f || N)(a), e.complete(!a)) | |
}; | |
e = new c({ | |
end: function() { | |
k() | |
}, | |
cancel: function() { | |
k(!0) | |
} | |
}); | |
f = q(h, a, b, d, function(a) { | |
k(!1 === a) | |
}); | |
return e | |
}) | |
}); | |
return g | |
} | |
function B(a, b, d, f, e) { | |
var g = v(a, b, d, f, e); | |
if (0 === g.length) { | |
var h, k; | |
"beforeSetClass" === e ? (h = v(a, "removeClass", | |
d, f, "beforeRemoveClass"), k = v(a, "addClass", d, f, "beforeAddClass")) : "setClass" === e && (h = v(a, "removeClass", d, f, "removeClass"), k = v(a, "addClass", d, f, "addClass")); | |
h && (g = g.concat(h)); | |
k && (g = g.concat(k)) | |
} | |
if (0 !== g.length) return function(a) { | |
var b = []; | |
g.length && u(g, function(a) { | |
b.push(a()) | |
}); | |
b.length ? c.all(b, a) : a(); | |
return function(a) { | |
u(b, function(b) { | |
a ? b.cancel() : b.end() | |
}) | |
} | |
} | |
} | |
var w = !1; | |
3 === arguments.length && ta(d) && (n = d, d = null); | |
n = pa(n); | |
d || (d = a.attr("class") || "", n.addClass && (d += " " + n.addClass), n.removeClass && (d += " " + | |
n.removeClass)); | |
var z = n.addClass, | |
A = n.removeClass, | |
G = f(d), | |
g, t; | |
if (G.length) { | |
var H, F; | |
"leave" === b ? (F = "leave", H = "afterLeave") : (F = "before" + b.charAt(0).toUpperCase() + b.substr(1), H = b); | |
"enter" !== b && "move" !== b && (g = B(a, b, n, G, F)); | |
t = B(a, b, n, G, H) | |
} | |
if (g || t) { | |
var l; | |
return { | |
$$willAnimate: !0, | |
end: function() { | |
l ? l.end() : (w = !0, m(), ja(a, n), l = new c, l.complete(!0)); | |
return l | |
}, | |
start: function() { | |
function b(b) { | |
w = !0; | |
m(); | |
ja(a, n); | |
l.complete(b) | |
} | |
if (l) return l; | |
l = new c; | |
var d, f = []; | |
g && f.push(function(a) { | |
d = g(a) | |
}); | |
f.length ? f.push(function(a) { | |
m(); | |
a(!0) | |
}) : m(); | |
t && f.push(function(a) { | |
d = t(a) | |
}); | |
l.setHost({ | |
end: function() { | |
w || ((d || N)(void 0), b(void 0)) | |
}, | |
cancel: function() { | |
w || ((d || N)(!0), b(!0)) | |
} | |
}); | |
c.chain(f, b); | |
return l | |
} | |
} | |
} | |
} | |
}] | |
}]).provider("$$animateJsDriver", ["$$animationProvider", function(a) { | |
a.drivers.push("$$animateJsDriver"); | |
this.$get = ["$$animateJs", "$$AnimateRunner", function(a, c) { | |
function b(b) { | |
return a(b.element, b.event, b.classes, b.options) | |
} | |
return function(a) { | |
if (a.from && a.to) { | |
var d = b(a.from), | |
f = b(a.to); | |
return d || f ? { | |
start: function() { | |
function a() { | |
return function() { | |
u(b, | |
function(a) { | |
a.end() | |
}) | |
} | |
} | |
var b = []; | |
d && b.push(d.start()); | |
f && b.push(f.start()); | |
c.all(b, function(a) { | |
k.complete(a) | |
}); | |
var k = new c({ | |
end: a(), | |
cancel: a() | |
}); | |
return k | |
} | |
} : void 0 | |
} | |
return b(a) | |
} | |
}] | |
}]) | |
})(window, window.angular); | |
/* | |
AngularJS v1.5.11-local+sha.f73a65146 | |
(c) 2010-2017 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(t, q) { | |
'use strict'; | |
var b = "BUTTON A INPUT TEXTAREA SELECT DETAILS SUMMARY".split(" "), | |
l = function(a, d) { | |
if (-1 !== d.indexOf(a[0].nodeName)) return !0 | |
}; | |
q.module("ngAria", ["ng"]).provider("$aria", function() { | |
function a(a, b, n, h) { | |
return function(e, f, c) { | |
var p = c.$normalize(b); | |
!d[p] || l(f, n) || c[p] || e.$watch(c[a], function(a) { | |
a = h ? !a : !!a; | |
f.attr(b, a) | |
}) | |
} | |
} | |
var d = { | |
ariaHidden: !0, | |
ariaChecked: !0, | |
ariaReadonly: !0, | |
ariaDisabled: !0, | |
ariaRequired: !0, | |
ariaInvalid: !0, | |
ariaValue: !0, | |
tabindex: !0, | |
bindKeypress: !0, | |
bindRoleForClick: !0 | |
}; | |
this.config = | |
function(a) { | |
d = q.extend(d, a) | |
}; | |
this.$get = function() { | |
return { | |
config: function(a) { | |
return d[a] | |
}, | |
$$watchExpr: a | |
} | |
} | |
}).directive("ngShow", ["$aria", function(a) { | |
return a.$$watchExpr("ngShow", "aria-hidden", [], !0) | |
}]).directive("ngHide", ["$aria", function(a) { | |
return a.$$watchExpr("ngHide", "aria-hidden", [], !1) | |
}]).directive("ngValue", ["$aria", function(a) { | |
return a.$$watchExpr("ngValue", "aria-checked", b, !1) | |
}]).directive("ngChecked", ["$aria", function(a) { | |
return a.$$watchExpr("ngChecked", "aria-checked", b, !1) | |
}]).directive("ngReadonly", ["$aria", function(a) { | |
return a.$$watchExpr("ngReadonly", "aria-readonly", b, !1) | |
}]).directive("ngRequired", ["$aria", function(a) { | |
return a.$$watchExpr("ngRequired", "aria-required", b, !1) | |
}]).directive("ngModel", ["$aria", function(a) { | |
function d(d, h, e, f) { | |
return a.config(h) && !e.attr(d) && (f || !l(e, b)) | |
} | |
function g(a, d) { | |
return !d.attr("role") && d.attr("type") === a && "INPUT" !== d[0].nodeName | |
} | |
function k(a, d) { | |
var e = a.type, | |
f = a.role; | |
return "checkbox" === (e || f) || "menuitemcheckbox" === f ? "checkbox" : "radio" === (e || f) || "menuitemradio" === | |
f ? "radio" : "range" === e || "progressbar" === f || "slider" === f ? "range" : "" | |
} | |
return { | |
restrict: "A", | |
require: "ngModel", | |
priority: 200, | |
compile: function(b, h) { | |
var e = k(h, b); | |
return { | |
pre: function(a, c, d, b) { | |
"checkbox" === e && (b.$isEmpty = function(a) { | |
return !1 === a | |
}) | |
}, | |
post: function(f, c, b, m) { | |
function h() { | |
return m.$modelValue | |
} | |
function k(a) { | |
c.attr("aria-checked", b.value == m.$viewValue) | |
} | |
function l() { | |
c.attr("aria-checked", !m.$isEmpty(m.$viewValue)) | |
} | |
var p = d("tabindex", "tabindex", c, !1); | |
switch (e) { | |
case "radio": | |
case "checkbox": | |
g(e, c) && c.attr("role", | |
e); | |
d("aria-checked", "ariaChecked", c, !1) && f.$watch(h, "radio" === e ? k : l); | |
p && c.attr("tabindex", 0); | |
break; | |
case "range": | |
g(e, c) && c.attr("role", "slider"); | |
if (a.config("ariaValue")) { | |
var n = !c.attr("aria-valuemin") && (b.hasOwnProperty("min") || b.hasOwnProperty("ngMin")), | |
q = !c.attr("aria-valuemax") && (b.hasOwnProperty("max") || b.hasOwnProperty("ngMax")), | |
r = !c.attr("aria-valuenow"); | |
n && b.$observe("min", function(a) { | |
c.attr("aria-valuemin", a) | |
}); | |
q && b.$observe("max", function(a) { | |
c.attr("aria-valuemax", a) | |
}); | |
r && f.$watch(h, function(a) { | |
c.attr("aria-valuenow", | |
a) | |
}) | |
} | |
p && c.attr("tabindex", 0) | |
}!b.hasOwnProperty("ngRequired") && m.$validators.required && d("aria-required", "ariaRequired", c, !1) && b.$observe("required", function() { | |
c.attr("aria-required", !!b.required) | |
}); | |
d("aria-invalid", "ariaInvalid", c, !0) && f.$watch(function() { | |
return m.$invalid | |
}, function(a) { | |
c.attr("aria-invalid", !!a) | |
}) | |
} | |
} | |
} | |
} | |
}]).directive("ngDisabled", ["$aria", function(a) { | |
return a.$$watchExpr("ngDisabled", "aria-disabled", b, !1) | |
}]).directive("ngMessages", function() { | |
return { | |
restrict: "A", | |
require: "?ngMessages", | |
link: function(a, b, g, k) { | |
b.attr("aria-live") || b.attr("aria-live", "assertive") | |
} | |
} | |
}).directive("ngClick", ["$aria", "$parse", function(a, d) { | |
return { | |
restrict: "A", | |
compile: function(g, k) { | |
var n = d(k.ngClick, null, !0); | |
return function(d, e, f) { | |
if (!l(e, b) && (a.config("bindRoleForClick") && !e.attr("role") && e.attr("role", "button"), a.config("tabindex") && !e.attr("tabindex") && e.attr("tabindex", 0), a.config("bindKeypress") && !f.ngKeypress)) e.on("keypress", function(a) { | |
function b() { | |
n(d, { | |
$event: a | |
}) | |
} | |
var c = a.which || a.keyCode; | |
32 !== c && | |
13 !== c || d.$apply(b) | |
}) | |
} | |
} | |
} | |
}]).directive("ngDblclick", ["$aria", function(a) { | |
return function(d, g, k) { | |
!a.config("tabindex") || g.attr("tabindex") || l(g, b) || g.attr("tabindex", 0) | |
} | |
}]) | |
})(window, window.angular); | |
/* | |
AngularJS v1.5.11-local+sha.f73a65146 | |
(c) 2010-2017 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(E, d) { | |
'use strict'; | |
function y(u, k, g) { | |
return { | |
restrict: "ECA", | |
terminal: !0, | |
priority: 400, | |
transclude: "element", | |
link: function(b, f, a, c, p) { | |
function m() { | |
n && (g.cancel(n), n = null); | |
l && (l.$destroy(), l = null); | |
q && (n = g.leave(q), n.done(function(b) { | |
!1 !== b && (n = null) | |
}), q = null) | |
} | |
function w() { | |
var a = u.current && u.current.locals; | |
if (d.isDefined(a && a.$template)) { | |
var a = b.$new(), | |
c = u.current; | |
q = p(a, function(a) { | |
g.enter(a, null, q || f).done(function(a) { | |
!1 === a || !d.isDefined(A) || A && !b.$eval(A) || k() | |
}); | |
m() | |
}); | |
l = c.scope = a; | |
l.$emit("$viewContentLoaded"); | |
l.$eval(t) | |
} else m() | |
} | |
var l, q, n, A = a.autoscroll, | |
t = a.onload || ""; | |
b.$on("$routeChangeSuccess", w); | |
w() | |
} | |
} | |
} | |
function x(d, k, g) { | |
return { | |
restrict: "ECA", | |
priority: -400, | |
link: function(b, f) { | |
var a = g.current, | |
c = a.locals; | |
f.html(c.$template); | |
var p = d(f.contents()); | |
if (a.controller) { | |
c.$scope = b; | |
var m = k(a.controller, c); | |
a.controllerAs && (b[a.controllerAs] = m); | |
f.data("$ngControllerController", m); | |
f.children().data("$ngControllerController", m) | |
} | |
b[a.resolveAs || "$resolve"] = c; | |
p(b) | |
} | |
} | |
} | |
"use strict"; | |
var B, C, t = d.module("ngRoute", ["ng"]).provider("$route", | |
function() { | |
function u(b, f) { | |
return d.extend(Object.create(b), f) | |
} | |
function k(b, d) { | |
var a = d.caseInsensitiveMatch, | |
c = { | |
originalPath: b, | |
regexp: b | |
}, | |
f = c.keys = []; | |
b = b.replace(/([().])/g, "\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(b, a, d, c) { | |
b = "?" === c || "*?" === c ? "?" : null; | |
c = "*" === c || "*?" === c ? "*" : null; | |
f.push({ | |
name: d, | |
optional: !!b | |
}); | |
a = a || ""; | |
return "" + (b ? "" : a) + "(?:" + (b ? a : "") + (c && "(.+?)" || "([^/]+)") + (b || "") + ")" + (b || "") | |
}).replace(/([/$*])/g, "\\$1"); | |
c.regexp = new RegExp("^" + b + "$", a ? "i" : ""); | |
return c | |
} | |
B = d.isArray; | |
C = d.isObject; | |
var g = {}; | |
this.when = function(b, f) { | |
var a; | |
a = void 0; | |
if (B(f)) { | |
a = a || []; | |
for (var c = 0, p = f.length; c < p; c++) a[c] = f[c] | |
} else if (C(f)) | |
for (c in a = a || {}, f) | |
if ("$" !== c.charAt(0) || "$" !== c.charAt(1)) a[c] = f[c]; | |
a = a || f; | |
d.isUndefined(a.reloadOnSearch) && (a.reloadOnSearch = !0); | |
d.isUndefined(a.caseInsensitiveMatch) && (a.caseInsensitiveMatch = this.caseInsensitiveMatch); | |
g[b] = d.extend(a, b && k(b, a)); | |
b && (c = "/" === b[b.length - 1] ? b.substr(0, b.length - 1) : b + "/", g[c] = d.extend({ | |
redirectTo: b | |
}, k(c, a))); | |
return this | |
}; | |
this.caseInsensitiveMatch = !1; | |
this.otherwise = function(b) { | |
"string" === typeof b && (b = { | |
redirectTo: b | |
}); | |
this.when(null, b); | |
return this | |
}; | |
this.$get = ["$rootScope", "$location", "$routeParams", "$q", "$injector", "$templateRequest", "$sce", function(b, f, a, c, p, m, k) { | |
function l(a) { | |
var e = v.current; | |
(x = (r = y()) && e && r.$$route === e.$$route && d.equals(r.pathParams, e.pathParams) && !r.reloadOnSearch && !z) || !e && !r || b.$broadcast("$routeChangeStart", r, e).defaultPrevented && a && a.preventDefault() | |
} | |
function q() { | |
var h = v.current, | |
e = r; | |
if (x) h.params = e.params, d.copy(h.params, | |
a), b.$broadcast("$routeUpdate", h); | |
else if (e || h) z = !1, (v.current = e) && e.redirectTo && (d.isString(e.redirectTo) ? f.path(w(e.redirectTo, e.params)).search(e.params).replace() : f.url(e.redirectTo(e.pathParams, f.path(), f.search())).replace()), c.when(e).then(n).then(function(c) { | |
e === v.current && (e && (e.locals = c, d.copy(e.params, a)), b.$broadcast("$routeChangeSuccess", e, h)) | |
}, function(a) { | |
e === v.current && b.$broadcast("$routeChangeError", e, h, a) | |
}) | |
} | |
function n(a) { | |
if (a) { | |
var b = d.extend({}, a.resolve); | |
d.forEach(b, function(a, | |
e) { | |
b[e] = d.isString(a) ? p.get(a) : p.invoke(a, null, null, e) | |
}); | |
a = t(a); | |
d.isDefined(a) && (b.$template = a); | |
return c.all(b) | |
} | |
} | |
function t(a) { | |
var b, c; | |
d.isDefined(b = a.template) ? d.isFunction(b) && (b = b(a.params)) : d.isDefined(c = a.templateUrl) && (d.isFunction(c) && (c = c(a.params)), d.isDefined(c) && (a.loadedTemplateUrl = k.valueOf(c), b = m(c))); | |
return b | |
} | |
function y() { | |
var a, b; | |
d.forEach(g, function(c, e) { | |
var h; | |
if (h = !b) { | |
var g = f.path(); | |
h = c.keys; | |
var l = {}; | |
if (c.regexp) | |
if (g = c.regexp.exec(g)) { | |
for (var k = 1, p = g.length; k < p; ++k) { | |
var m = h[k - 1], | |
n = g[k]; | |
m && n && (l[m.name] = n) | |
} | |
h = l | |
} else h = null; | |
else h = null; | |
h = a = h | |
} | |
h && (b = u(c, { | |
params: d.extend({}, f.search(), a), | |
pathParams: a | |
}), b.$$route = c) | |
}); | |
return b || g[null] && u(g[null], { | |
params: {}, | |
pathParams: {} | |
}) | |
} | |
function w(a, b) { | |
var c = []; | |
d.forEach((a || "").split(":"), function(a, d) { | |
if (0 === d) c.push(a); | |
else { | |
var e = a.match(/(\w+)(?:[?*])?(.*)/), | |
f = e[1]; | |
c.push(b[f]); | |
c.push(e[2] || ""); | |
delete b[f] | |
} | |
}); | |
return c.join("") | |
} | |
var z = !1, | |
r, x, v = { | |
routes: g, | |
reload: function() { | |
z = !0; | |
var a = { | |
defaultPrevented: !1, | |
preventDefault: function() { | |
this.defaultPrevented = !0; | |
z = !1 | |
} | |
}; | |
b.$evalAsync(function() { | |
l(a); | |
a.defaultPrevented || q() | |
}) | |
}, | |
updateParams: function(a) { | |
if (this.current && this.current.$$route) a = d.extend({}, this.current.params, a), f.path(w(this.current.$$route.originalPath, a)), f.search(a); | |
else throw D("norout"); | |
} | |
}; | |
b.$on("$locationChangeStart", l); | |
b.$on("$locationChangeSuccess", q); | |
return v | |
}] | |
}), | |
D = d.$$minErr("ngRoute"); | |
"use strict"; | |
t.provider("$routeParams", function() { | |
this.$get = function() { | |
return {} | |
} | |
}); | |
"use strict"; | |
t.directive("ngView", y); | |
t.directive("ngView", x); | |
y.$inject = ["$route", "$anchorScroll", "$animate"]; | |
x.$inject = ["$compile", "$controller", "$route"] | |
})(window, window.angular); | |
/* | |
AngularJS v1.5.11-local+sha.f73a65146 | |
(c) 2010-2017 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(t, f) { | |
'use strict'; | |
function H(f) { | |
var k = []; | |
u(k, A).chars(f); | |
return k.join("") | |
} | |
var B = f.$$minErr("$sanitize"), | |
C, m, D, E, r, A, F, u; | |
f.module("ngSanitize", []).provider("$sanitize", function() { | |
function k(a, e) { | |
var b = {}, | |
d = a.split(","), | |
h; | |
for (h = 0; h < d.length; h++) b[e ? r(d[h]) : d[h]] = !0; | |
return b | |
} | |
function I(a) { | |
for (var e = {}, b = 0, d = a.length; b < d; b++) { | |
var h = a[b]; | |
e[h.name] = h.value | |
} | |
return e | |
} | |
function G(a) { | |
return a.replace(/&/g, "&").replace(J, function(a) { | |
var b = a.charCodeAt(0); | |
a = a.charCodeAt(1); | |
return "&#" + (1024 * (b - 55296) + (a - 56320) + | |
65536) + ";" | |
}).replace(K, function(a) { | |
return "&#" + a.charCodeAt(0) + ";" | |
}).replace(/</g, "<").replace(/>/g, ">") | |
} | |
function x(a) { | |
for (; a;) { | |
if (a.nodeType === t.Node.ELEMENT_NODE) | |
for (var e = a.attributes, b = 0, d = e.length; b < d; b++) { | |
var h = e[b], | |
c = h.name.toLowerCase(); | |
if ("xmlns:ns1" === c || 0 === c.lastIndexOf("ns1:", 0)) a.removeAttributeNode(h), b--, d-- | |
}(e = a.firstChild) && x(e); | |
a = a.nextSibling | |
} | |
} | |
var v = !1; | |
this.$get = ["$$sanitizeUri", function(a) { | |
v && m(w, L); | |
return function(e) { | |
var b = []; | |
F(e, u(b, function(b, h) { | |
return !/^unsafe:/.test(a(b, | |
h)) | |
})); | |
return b.join("") | |
} | |
}]; | |
this.enableSvg = function(a) { | |
return E(a) ? (v = a, this) : v | |
}; | |
C = f.bind; | |
m = f.extend; | |
D = f.forEach; | |
E = f.isDefined; | |
r = f.lowercase; | |
A = f.noop; | |
F = function(a, e) { | |
null === a || void 0 === a ? a = "" : "string" !== typeof a && (a = "" + a); | |
g.innerHTML = a; | |
var b = 5; | |
do { | |
if (0 === b) throw B("uinput"); | |
b--; | |
t.document.documentMode && x(g); | |
a = g.innerHTML; | |
g.innerHTML = a | |
} while (a !== g.innerHTML); | |
for (b = g.firstChild; b;) { | |
switch (b.nodeType) { | |
case 1: | |
e.start(b.nodeName.toLowerCase(), I(b.attributes)); | |
break; | |
case 3: | |
e.chars(b.textContent) | |
} | |
var d; | |
if (!(d = | |
b.firstChild) && (1 === b.nodeType && e.end(b.nodeName.toLowerCase()), d = b.nextSibling, !d)) | |
for (; null == d;) { | |
b = b.parentNode; | |
if (b === g) break; | |
d = b.nextSibling; | |
1 === b.nodeType && e.end(b.nodeName.toLowerCase()) | |
} | |
b = d | |
} | |
for (; b = g.firstChild;) g.removeChild(b) | |
}; | |
u = function(a, e) { | |
var b = !1, | |
d = C(a, a.push); | |
return { | |
start: function(a, c) { | |
a = r(a); | |
!b && z[a] && (b = a); | |
b || !0 !== w[a] || (d("<"), d(a), D(c, function(b, h) { | |
var c = r(h), | |
g = "img" === a && "src" === c || "background" === c; | |
!0 !== n[c] || !0 === p[c] && !e(b, g) || (d(" "), d(h), d('="'), d(G(b)), d('"')) | |
}), d(">")) | |
}, | |
end: function(a) { | |
a = r(a); | |
b || !0 !== w[a] || !0 === y[a] || (d("</"), d(a), d(">")); | |
a == b && (b = !1) | |
}, | |
chars: function(a) { | |
b || d(G(a)) | |
} | |
} | |
}; | |
var J = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, | |
K = /([^#-~ |!])/g, | |
y = k("area,br,col,hr,img,wbr"), | |
c = k("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), | |
l = k("rp,rt"), | |
q = m({}, l, c), | |
c = m({}, c, k("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")), | |
l = m({}, l, k("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")), | |
L = k("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"), | |
z = k("script,style"), | |
w = m({}, y, c, l, q), | |
p = k("background,cite,href,longdesc,src,xlink:href"), | |
q = k("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"), | |
l = k("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), | |
n = m({}, p, l, q), | |
g; | |
(function(a) { | |
if (a.document && a.document.implementation) a = a.document.implementation.createHTMLDocument("inert"); | |
else throw B("noinert"); | |
var e = (a.documentElement || a.getDocumentElement()).getElementsByTagName("body"); | |
1 === e.length ? g = e[0] : (e = a.createElement("html"), g = a.createElement("body"), e.appendChild(g), a.appendChild(e)) | |
})(t) | |
}); | |
f.module("ngSanitize").filter("linky", ["$sanitize", function(k) { | |
var m = /((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i, | |
r = /^mailto:/i, | |
x = f.$$minErr("linky"), | |
v = f.isDefined, | |
t = f.isFunction, | |
u = f.isObject, | |
y = f.isString; | |
return function(c, f, q) { | |
function l(a) { | |
a && n.push(H(a)) | |
} | |
function z(a, b) { | |
var d, c = w(a); | |
n.push("<a "); | |
for (d in c) n.push(d + '="' + c[d] + '" '); | |
!v(f) || "target" in c || n.push('target="', f, '" '); | |
n.push('href="', a.replace(/"/g, """), '">'); | |
l(b); | |
n.push("</a>") | |
} | |
if (null == c || "" === c) return c; | |
if (!y(c)) throw x("notstring", c); | |
for (var w = t(q) ? q : u(q) ? function() { | |
return q | |
} : function() { | |
return {} | |
}, p = c, n = [], g, a; c = p.match(m);) g = c[0], c[2] || | |
c[4] || (g = (c[3] ? "http://" : "mailto:") + g), a = c.index, l(p.substr(0, a)), z(g, c[0].replace(r, "")), p = p.substring(a + c[0].length); | |
l(p); | |
return k(n.join("")) | |
} | |
}]) | |
})(window, window.angular); | |
/* | |
AngularJS v1.5.11-local+sha.f73a65146 | |
(c) 2010-2017 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(n, c) { | |
'use strict'; | |
function l(b, a, g) { | |
var d = g.baseHref(), | |
k = b[0]; | |
return function(b, f, e) { | |
var g, h; | |
e = e || {}; | |
h = e.expires; | |
g = c.isDefined(e.path) ? e.path : d; | |
c.isUndefined(f) && (h = "Thu, 01 Jan 1970 00:00:00 GMT", f = ""); | |
c.isString(h) && (h = new Date(h)); | |
f = encodeURIComponent(b) + "=" + encodeURIComponent(f); | |
f = f + (g ? ";path=" + g : "") + (e.domain ? ";domain=" + e.domain : ""); | |
f += h ? ";expires=" + h.toUTCString() : ""; | |
f += e.secure ? ";secure" : ""; | |
e = f.length + 1; | |
4096 < e && a.warn("Cookie '" + b + "' possibly not set or overflowed because it was too large (" + | |
e + " > 4096 bytes)!"); | |
k.cookie = f | |
} | |
} | |
c.module("ngCookies", ["ng"]).provider("$cookies", [function() { | |
var b = this.defaults = {}; | |
this.$get = ["$$cookieReader", "$$cookieWriter", function(a, g) { | |
return { | |
get: function(d) { | |
return a()[d] | |
}, | |
getObject: function(d) { | |
return (d = this.get(d)) ? c.fromJson(d) : d | |
}, | |
getAll: function() { | |
return a() | |
}, | |
put: function(d, a, m) { | |
g(d, a, m ? c.extend({}, b, m) : b) | |
}, | |
putObject: function(d, b, a) { | |
this.put(d, c.toJson(b), a) | |
}, | |
remove: function(a, k) { | |
g(a, void 0, k ? c.extend({}, b, k) : b) | |
} | |
} | |
}] | |
}]); | |
"use strict"; | |
c.module("ngCookies").factory("$cookieStore", ["$cookies", function(b) { | |
return { | |
get: function(a) { | |
return b.getObject(a) | |
}, | |
put: function(a, c) { | |
b.putObject(a, c) | |
}, | |
remove: function(a) { | |
b.remove(a) | |
} | |
} | |
}]); | |
"use strict"; | |
l.$inject = ["$document", "$log", "$browser"]; | |
c.module("ngCookies").provider("$$cookieWriter", function() { | |
this.$get = l | |
}) | |
})(window, window.angular); | |
/* | |
Angular Material Design | |
(c) 2016 Google, Inc. | |
License: MIT | |
*/ | |
var goog = goog || {}; | |
goog.global = this; | |
goog.isDef = function(a) { | |
return void 0 !== a | |
}; | |
goog.exportPath_ = function(a, b, c) { | |
a = a.split("."); | |
c = c || goog.global; | |
a[0] in c || !c.execScript || c.execScript("var " + a[0]); | |
for (var d; a.length && (d = a.shift());) !a.length && goog.isDef(b) ? c[d] = b : c = c[d] ? c[d] : c[d] = {} | |
}; | |
goog.define = function(a, b) { | |
goog.exportPath_(a, b) | |
}; | |
goog.DEBUG = !0; | |
goog.LOCALE = "en"; | |
goog.TRUSTED_SITE = !0; | |
goog.STRICT_MODE_COMPATIBLE = !1; | |
goog.DISALLOW_TEST_ONLY_CODE = !goog.DEBUG; | |
goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1; | |
goog.provide = function(a) { | |
if (goog.isInModuleLoader_()) throw Error("goog.provide can not be used within a goog.module."); | |
goog.constructNamespace_(a) | |
}; | |
goog.constructNamespace_ = function(a, b) { | |
goog.exportPath_(a, b) | |
}; | |
goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/; | |
goog.module = function(a) { | |
if (!goog.isString(a) || !a || -1 == a.search(goog.VALID_MODULE_RE_)) throw Error("Invalid module identifier"); | |
if (!goog.isInModuleLoader_()) throw Error("Module " + a + " has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide."); | |
if (goog.moduleLoaderState_.moduleName) throw Error("goog.module may only be called once per module."); | |
goog.moduleLoaderState_.moduleName = a | |
}; | |
goog.module.get = function(a) { | |
return goog.module.getInternal_(a) | |
}; | |
goog.module.getInternal_ = function() { | |
return null | |
}; | |
goog.moduleLoaderState_ = null; | |
goog.isInModuleLoader_ = function() { | |
return null != goog.moduleLoaderState_ | |
}; | |
goog.module.declareLegacyNamespace = function() { | |
goog.moduleLoaderState_.declareLegacyNamespace = !0 | |
}; | |
goog.setTestOnly = function(a) { | |
if (goog.DISALLOW_TEST_ONLY_CODE) throw a = a || "", Error("Importing test-only code into non-debug environment" + (a ? ": " + a : ".")); | |
}; | |
goog.forwardDeclare = function() {}; | |
goog.getObjectByName = function(a, b) { | |
a = a.split("."); | |
b = b || goog.global; | |
for (var c; c = a.shift();) | |
if (goog.isDefAndNotNull(b[c])) b = b[c]; | |
else return null; | |
return b | |
}; | |
goog.globalize = function(a, b) { | |
b = b || goog.global; | |
for (var c in a) b[c] = a[c] | |
}; | |
goog.addDependency = function(a, b, c, d) { | |
if (goog.DEPENDENCIES_ENABLED) { | |
var f; | |
a = a.replace(/\\/g, "/"); | |
var e = goog.dependencies_; | |
d && "boolean" !== typeof d || (d = d ? { | |
module: "goog" | |
} : {}); | |
for (var g = 0; f = b[g]; g++) e.nameToPath[f] = a, e.loadFlags[a] = d; | |
for (d = 0; b = c[d]; d++) a in e.requires || (e.requires[a] = {}), e.requires[a][b] = !0 | |
} | |
}; | |
goog.useStrictRequires = !1; | |
goog.ENABLE_DEBUG_LOADER = !0; | |
goog.logToConsole_ = function(a) { | |
goog.global.console && goog.global.console.error(a) | |
}; | |
goog.require = function() {}; | |
goog.basePath = ""; | |
goog.nullFunction = function() {}; | |
goog.abstractMethod = function() { | |
throw Error("unimplemented abstract method"); | |
}; | |
goog.addSingletonGetter = function(a) { | |
a.instance_ = void 0; | |
a.getInstance = function() { | |
if (a.instance_) return a.instance_; | |
goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = a); | |
return a.instance_ = new a | |
} | |
}; | |
goog.instantiatedSingletons_ = []; | |
goog.LOAD_MODULE_USING_EVAL = !0; | |
goog.SEAL_MODULE_EXPORTS = goog.DEBUG; | |
goog.loadedModules_ = {}; | |
goog.DEPENDENCIES_ENABLED = !1; | |
goog.TRANSPILE = "detect"; | |
goog.TRANSPILER = "transpile.js"; | |
goog.DEPENDENCIES_ENABLED && (goog.dependencies_ = { | |
loadFlags: {}, | |
nameToPath: {}, | |
requires: {}, | |
visited: {}, | |
written: {}, | |
deferred: {} | |
}, goog.inHtmlDocument_ = function() { | |
var a = goog.global.document; | |
return null != a && "write" in a | |
}, goog.findBasePath_ = function() { | |
if (goog.isDef(goog.global.CLOSURE_BASE_PATH)) goog.basePath = goog.global.CLOSURE_BASE_PATH; | |
else if (goog.inHtmlDocument_()) | |
for (var a = goog.global.document, a = a.getElementsByTagName("SCRIPT"), b = a.length - 1; 0 <= b; --b) { | |
var c = a[b], | |
c = c.src, | |
d = c.lastIndexOf("?"), | |
d = -1 == d ? c.length : | |
d; | |
if ("base.js" == c.substr(d - 7, 7)) { | |
goog.basePath = c.substr(0, d - 7); | |
break | |
} | |
} | |
}, goog.importScript_ = function(a, b) { | |
var c = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_; | |
c(a, b) && (goog.dependencies_.written[a] = !0) | |
}, goog.IS_OLD_IE_ = !(goog.global.atob || !goog.global.document || !goog.global.document.all), goog.importProcessedScript_ = function(a, b, c) { | |
a = 'goog.retrieveAndExec_("' + a + '", ' + b + ", " + c + ");"; | |
goog.importScript_("", a) | |
}, goog.queuedModules_ = [], goog.wrapModule_ = function(a, b) { | |
return goog.LOAD_MODULE_USING_EVAL && | |
goog.isDef(goog.global.JSON) ? "goog.loadModule(" + goog.global.JSON.stringify(b + "\n//# sourceURL=" + a + "\n") + ");" : 'goog.loadModule(function(exports) {"use strict";' + b + "\n;return exports});\n//# sourceURL=" + a + "\n" | |
}, goog.loadQueuedModules_ = function() { | |
var a = goog.queuedModules_.length; | |
if (0 < a) { | |
var b = goog.queuedModules_; | |
goog.queuedModules_ = []; | |
for (var c = 0; c < a; c++) { | |
var d = b[c]; | |
goog.maybeProcessDeferredPath_(d) | |
} | |
} | |
}, goog.maybeProcessDeferredDep_ = function(a) { | |
goog.isDeferredModule_(a) && goog.allDepsAreAvailable_(a) && | |
(a = goog.getPathFromDeps_(a), goog.maybeProcessDeferredPath_(goog.basePath + a)) | |
}, goog.isDeferredModule_ = function(a) { | |
var b = (a = goog.getPathFromDeps_(a)) && goog.dependencies_.loadFlags[a] || {}, | |
c = b.lang || "es3"; | |
return a && ("goog" == b.module || goog.needsTranspile_(c)) ? (a = goog.basePath + a, a in goog.dependencies_.deferred) : !1 | |
}, goog.allDepsAreAvailable_ = function(a) { | |
if ((a = goog.getPathFromDeps_(a)) && a in goog.dependencies_.requires) | |
for (var b in goog.dependencies_.requires[a]) | |
if (!goog.isProvided_(b) && !goog.isDeferredModule_(b)) return !1; | |
return !0 | |
}, goog.maybeProcessDeferredPath_ = function(a) { | |
if (a in goog.dependencies_.deferred) { | |
var b = goog.dependencies_.deferred[a]; | |
delete goog.dependencies_.deferred[a]; | |
goog.globalEval(b) | |
} | |
}, goog.loadModuleFromUrl = function(a) { | |
goog.retrieveAndExec_(a, !0, !1) | |
}, goog.writeScriptSrcNode_ = function(a) { | |
goog.global.document.write('<script type="text/javascript" src="' + a + '">\x3c/script>') | |
}, goog.appendScriptSrcNode_ = function(a) { | |
var b = goog.global.document, | |
c = b.createElement("script"); | |
c.type = "text/javascript"; | |
c.src = | |
a; | |
c.defer = !1; | |
c.async = !1; | |
b.head.appendChild(c) | |
}, goog.writeScriptTag_ = function(a, b) { | |
if (goog.inHtmlDocument_()) { | |
var c = goog.global.document; | |
if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING && "complete" == c.readyState) { | |
if (c = /\bdeps.js$/.test(a)) return !1; | |
throw Error('Cannot write "' + a + '" after document load'); | |
} | |
void 0 === b ? goog.IS_OLD_IE_ ? (b = " onreadystatechange='goog.onScriptLoad_(this, " + ++goog.lastNonModuleScriptIndex_ + ")' ", c.write('<script type="text/javascript" src="' + a + '"' + b + ">\x3c/script>")) : goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING ? | |
goog.appendScriptSrcNode_(a) : goog.writeScriptSrcNode_(a) : c.write('<script type="text/javascript">' + goog.protectScriptTag_(b) + "\x3c/script>"); | |
return !0 | |
} | |
return !1 | |
}, goog.protectScriptTag_ = function(a) { | |
return a.replace(/<\/(SCRIPT)/ig, "\\x3c\\$1") | |
}, goog.needsTranspile_ = function(a) { | |
if ("always" == goog.TRANSPILE) return !0; | |
if ("never" == goog.TRANSPILE) return !1; | |
goog.requiresTranspilation_ || (goog.requiresTranspilation_ = goog.createRequiresTranspilation_()); | |
if (a in goog.requiresTranspilation_) return goog.requiresTranspilation_[a]; | |
throw Error("Unknown language mode: " + a); | |
}, goog.requiresTranspilation_ = null, goog.lastNonModuleScriptIndex_ = 0, goog.onScriptLoad_ = function(a, b) { | |
"complete" == a.readyState && goog.lastNonModuleScriptIndex_ == b && goog.loadQueuedModules_(); | |
return !0 | |
}, goog.writeScripts_ = function(a) { | |
function b(a) { | |
if (!(a in f.written || a in f.visited)) { | |
f.visited[a] = !0; | |
if (a in f.requires) | |
for (var e in f.requires[a]) | |
if (!goog.isProvided_(e)) | |
if (e in f.nameToPath) b(f.nameToPath[e]); | |
else throw Error("Undefined nameToPath for " + e); | |
a in d || | |
(d[a] = !0, c.push(a)) | |
} | |
} | |
var c = [], | |
d = {}, | |
f = goog.dependencies_; | |
b(a); | |
for (a = 0; a < c.length; a++) { | |
var e = c[a]; | |
goog.dependencies_.written[e] = !0 | |
} | |
var g = goog.moduleLoaderState_; | |
goog.moduleLoaderState_ = null; | |
for (a = 0; a < c.length; a++) | |
if (e = c[a]) { | |
var h = f.loadFlags[e] || {}, | |
l = h.lang || "es3", | |
l = goog.needsTranspile_(l); | |
"goog" == h.module || l ? goog.importProcessedScript_(goog.basePath + e, "goog" == h.module, l) : goog.importScript_(goog.basePath + e) | |
} else throw goog.moduleLoaderState_ = g, Error("Undefined script input"); | |
goog.moduleLoaderState_ = | |
g | |
}, goog.getPathFromDeps_ = function(a) { | |
return a in goog.dependencies_.nameToPath ? goog.dependencies_.nameToPath[a] : null | |
}, goog.findBasePath_(), goog.global.CLOSURE_NO_DEPS || goog.importScript_(goog.basePath + "deps.js")); | |
goog.loadModule = function(a) { | |
var b = goog.moduleLoaderState_; | |
try { | |
goog.moduleLoaderState_ = { | |
moduleName: void 0, | |
declareLegacyNamespace: !1 | |
}; | |
var c; | |
if (goog.isFunction(a)) c = a.call(void 0, {}); | |
else if (goog.isString(a)) c = goog.loadModuleFromSource_.call(void 0, a); | |
else throw Error("Invalid module definition"); | |
var d = goog.moduleLoaderState_.moduleName; | |
if (!goog.isString(d) || !d) throw Error('Invalid module name "' + d + '"'); | |
goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(d, c) : goog.SEAL_MODULE_EXPORTS && | |
Object.seal && goog.isObject(c) && Object.seal(c); | |
goog.loadedModules_[d] = c | |
} finally { | |
goog.moduleLoaderState_ = b | |
} | |
}; | |
goog.loadModuleFromSource_ = function(a) { | |
var b = {}; | |
eval(a); | |
return b | |
}; | |
goog.normalizePath_ = function(a) { | |
a = a.split("/"); | |
for (var b = 0; b < a.length;) "." == a[b] ? a.splice(b, 1) : b && ".." == a[b] && a[b - 1] && ".." != a[b - 1] ? a.splice(--b, 2) : b++; | |
return a.join("/") | |
}; | |
goog.loadFileSync_ = function(a) { | |
if (goog.global.CLOSURE_LOAD_FILE_SYNC) return goog.global.CLOSURE_LOAD_FILE_SYNC(a); | |
try { | |
var b = new goog.global.XMLHttpRequest; | |
b.open("get", a, !1); | |
b.send(); | |
return 0 == b.status || 200 == b.status ? b.responseText : null | |
} catch (c) { | |
return null | |
} | |
}; | |
goog.retrieveAndExec_ = function() {}; | |
goog.transpile_ = function(a, b) { | |
var c = goog.global.$jscomp; | |
c || (goog.global.$jscomp = c = {}); | |
var d = c.transpile; | |
if (!d) { | |
var f = goog.basePath + goog.TRANSPILER, | |
e = goog.loadFileSync_(f); | |
if (e) { | |
eval(e + "\n//# sourceURL=" + f); | |
if (goog.global.$gwtExport && goog.global.$gwtExport.$jscomp && !goog.global.$gwtExport.$jscomp.transpile) throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: ' + JSON.stringify(goog.global.$gwtExport)); | |
goog.global.$jscomp.transpile = goog.global.$gwtExport.$jscomp.transpile; | |
c = goog.global.$jscomp; | |
d = c.transpile | |
} | |
} | |
if (!d) var g = " requires transpilation but no transpiler was found.", | |
g = g + ' Please add "//javascript/closure:transpiler" as a data dependency to ensure it is included.', | |
d = c.transpile = function(a, c) { | |
goog.logToConsole_(c + g); | |
return a | |
}; | |
return d(a, b) | |
}; | |
goog.typeOf = function(a) { | |
var b = typeof a; | |
if ("object" == b) | |
if (a) { | |
if (a instanceof Array) return "array"; | |
if (a instanceof Object) return b; | |
var c = Object.prototype.toString.call(a); | |
if ("[object Window]" == c) return "object"; | |
if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) return "array"; | |
if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) return "function" | |
} else return "null"; | |
else if ("function" == b && "undefined" == typeof a.call) return "object"; | |
return b | |
}; | |
goog.isNull = function(a) { | |
return null === a | |
}; | |
goog.isDefAndNotNull = function(a) { | |
return null != a | |
}; | |
goog.isArray = function(a) { | |
return "array" == goog.typeOf(a) | |
}; | |
goog.isArrayLike = function(a) { | |
var b = goog.typeOf(a); | |
return "array" == b || "object" == b && "number" == typeof a.length | |
}; | |
goog.isDateLike = function(a) { | |
return goog.isObject(a) && "function" == typeof a.getFullYear | |
}; | |
goog.isString = function(a) { | |
return "string" == typeof a | |
}; | |
goog.isBoolean = function(a) { | |
return "boolean" == typeof a | |
}; | |
goog.isNumber = function(a) { | |
return "number" == typeof a | |
}; | |
goog.isFunction = function(a) { | |
return "function" == goog.typeOf(a) | |
}; | |
goog.isObject = function(a) { | |
var b = typeof a; | |
return "object" == b && null != a || "function" == b | |
}; | |
goog.getUid = function(a) { | |
return a[goog.UID_PROPERTY_] || (a[goog.UID_PROPERTY_] = ++goog.uidCounter_) | |
}; | |
goog.hasUid = function(a) { | |
return !!a[goog.UID_PROPERTY_] | |
}; | |
goog.removeUid = function(a) { | |
null !== a && "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_); | |
try { | |
delete a[goog.UID_PROPERTY_] | |
} catch (b) {} | |
}; | |
goog.UID_PROPERTY_ = "closure_uid_" + (1E9 * Math.random() >>> 0); | |
goog.uidCounter_ = 0; | |
goog.getHashCode = goog.getUid; | |
goog.removeHashCode = goog.removeUid; | |
goog.cloneObject = function(a) { | |
var b = goog.typeOf(a); | |
if ("object" == b || "array" == b) { | |
if (a.clone) return a.clone(); | |
var b = "array" == b ? [] : {}, | |
c; | |
for (c in a) b[c] = goog.cloneObject(a[c]); | |
return b | |
} | |
return a | |
}; | |
goog.bindNative_ = function(a, b, c) { | |
return a.call.apply(a.bind, arguments) | |
}; | |
goog.bindJs_ = function(a, b, c) { | |
if (!a) throw Error(); | |
if (2 < arguments.length) { | |
var d = Array.prototype.slice.call(arguments, 2); | |
return function() { | |
var c = Array.prototype.slice.call(arguments); | |
Array.prototype.unshift.apply(c, d); | |
return a.apply(b, c) | |
} | |
} | |
return function() { | |
return a.apply(b, arguments) | |
} | |
}; | |
goog.bind = function(a, b, c) { | |
Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? goog.bind = goog.bindNative_ : goog.bind = goog.bindJs_; | |
return goog.bind.apply(null, arguments) | |
}; | |
goog.partial = function(a, b) { | |
var c = Array.prototype.slice.call(arguments, 1); | |
return function() { | |
var b = c.slice(); | |
b.push.apply(b, arguments); | |
return a.apply(this, b) | |
} | |
}; | |
goog.mixin = function(a, b) { | |
for (var c in b) a[c] = b[c] | |
}; | |
goog.now = goog.TRUSTED_SITE && Date.now || function() { | |
return +new Date | |
}; | |
goog.globalEval = function(a) { | |
if (goog.global.execScript) goog.global.execScript(a, "JavaScript"); | |
else if (goog.global.eval) { | |
if (null == goog.evalWorksForGlobals_) | |
if (goog.global.eval("var _evalTest_ = 1;"), "undefined" != typeof goog.global._evalTest_) { | |
try { | |
delete goog.global._evalTest_ | |
} catch (d) {} | |
goog.evalWorksForGlobals_ = !0 | |
} else goog.evalWorksForGlobals_ = !1; | |
if (goog.evalWorksForGlobals_) goog.global.eval(a); | |
else { | |
var b = goog.global.document, | |
c = b.createElement("SCRIPT"); | |
c.type = "text/javascript"; | |
c.defer = !1; | |
c.appendChild(b.createTextNode(a)); | |
b.body.appendChild(c); | |
b.body.removeChild(c) | |
} | |
} else throw Error("goog.globalEval not available"); | |
}; | |
goog.evalWorksForGlobals_ = null; | |
goog.getCssName = function(a, b) { | |
if ("." == String(a).charAt(0)) throw Error('className passed in goog.getCssName must not start with ".". You passed: ' + a); | |
var c = function(a) { | |
return goog.cssNameMapping_[a] || a | |
}, | |
d = function(a) { | |
a = a.split("-"); | |
for (var b = [], d = 0; d < a.length; d++) b.push(c(a[d])); | |
return b.join("-") | |
}, | |
d = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? c : d : function(a) { | |
return a | |
}; | |
a = b ? a + "-" + d(b) : d(a); | |
return goog.global.CLOSURE_CSS_NAME_MAP_FN ? goog.global.CLOSURE_CSS_NAME_MAP_FN(a) : a | |
}; | |
goog.setCssNameMapping = function(a, b) { | |
goog.cssNameMapping_ = a; | |
goog.cssNameMappingStyle_ = b | |
}; | |
goog.getMsg = function(a, b) { | |
b && (a = a.replace(/\{\$([^}]+)}/g, function(a, d) { | |
return null != b && d in b ? b[d] : a | |
})); | |
return a | |
}; | |
goog.getMsgWithFallback = function(a) { | |
return a | |
}; | |
goog.exportSymbol = function(a, b, c) { | |
goog.exportPath_(a, b, c) | |
}; | |
goog.exportProperty = function(a, b, c) { | |
a[b] = c | |
}; | |
goog.inherits = function(a, b) { | |
function c() {} | |
c.prototype = b.prototype; | |
a.superClass_ = b.prototype; | |
a.prototype = new c; | |
a.prototype.constructor = a; | |
a.base = function(a, c, e) { | |
for (var d = Array(arguments.length - 2), f = 2; f < arguments.length; f++) d[f - 2] = arguments[f]; | |
return b.prototype[c].apply(a, d) | |
} | |
}; | |
goog.base = function(a, b, c) { | |
var d = arguments.callee.caller; | |
if (goog.STRICT_MODE_COMPATIBLE || goog.DEBUG && !d) throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C"); | |
if (d.superClass_) { | |
for (var f = Array(arguments.length - 1), e = 1; e < arguments.length; e++) f[e - 1] = arguments[e]; | |
return d.superClass_.constructor.apply(a, f) | |
} | |
f = Array(arguments.length - 2); | |
for (e = 2; e < arguments.length; e++) f[e - 2] = arguments[e]; | |
for (var e = !1, g = a.constructor; g; g = | |
g.superClass_ && g.superClass_.constructor) | |
if (g.prototype[b] === d) e = !0; | |
else if (e) return g.prototype[b].apply(a, f); | |
if (a[b] === d) return a.constructor.prototype[b].apply(a, f); | |
throw Error("goog.base called from a method of one name to a method of a different name"); | |
}; | |
goog.scope = function(a) { | |
if (goog.isInModuleLoader_()) throw Error("goog.scope is not supported within a goog.module."); | |
a.call(goog.global) | |
}; | |
goog.defineClass = function(a, b) { | |
var c = b.constructor, | |
d = b.statics; | |
c && c != Object.prototype.constructor || (c = function() { | |
throw Error("cannot instantiate an interface (no constructor defined)."); | |
}); | |
c = goog.defineClass.createSealingConstructor_(c, a); | |
a && goog.inherits(c, a); | |
delete b.constructor; | |
delete b.statics; | |
goog.defineClass.applyProperties_(c.prototype, b); | |
null != d && (d instanceof Function ? d(c) : goog.defineClass.applyProperties_(c, d)); | |
return c | |
}; | |
goog.defineClass.SEAL_CLASS_INSTANCES = goog.DEBUG; | |
goog.defineClass.createSealingConstructor_ = function(a, b) { | |
if (!goog.defineClass.SEAL_CLASS_INSTANCES) return a; | |
var c = !goog.defineClass.isUnsealable_(b), | |
d = function() { | |
var b = a.apply(this, arguments) || this; | |
b[goog.UID_PROPERTY_] = b[goog.UID_PROPERTY_]; | |
this.constructor === d && c && Object.seal instanceof Function && Object.seal(b); | |
return b | |
}; | |
return d | |
}; | |
goog.defineClass.isUnsealable_ = function(a) { | |
return a && a.prototype && a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] | |
}; | |
goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); | |
goog.defineClass.applyProperties_ = function(a, b) { | |
for (var c in b) Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]); | |
for (var d = 0; d < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; d++) c = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[d], Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]) | |
}; | |
goog.tagUnsealableClass = function() {}; | |
goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = "goog_defineClass_legacy_unsealable"; | |
goog.createRequiresTranspilation_ = function() { | |
function a(a, b) { | |
d ? c[a] = !0 : b() ? c[a] = !1 : d = c[a] = !0 | |
} | |
function b(a) { | |
try { | |
return !!eval(a) | |
} catch (e) { | |
return !1 | |
} | |
} | |
var c = { | |
es3: !1 | |
}, | |
d = !1; | |
a("es5", function() { | |
return b("[1,].length==1") | |
}); | |
a("es6", function() { | |
return b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()') | |
}); | |
a("es6-impl", function() { | |
return !0 | |
}); | |
a("es7", function() { | |
return b("2 ** 2 == 4") | |
}); | |
a("es8", function() { | |
return b("async () => 1, true") | |
}); | |
return c | |
}; | |
/* | |
Angular Material Design | |
https://github.com/angular/material | |
@license MIT | |
v1.1.0 | |
*/ | |
var ngmaterial = {}; | |
DetectNgTouch.$inject = ["$log", "$injector"]; | |
MdCoreConfigure.$inject = ["$provide", "$mdThemingProvider"]; | |
rAFDecorator.$inject = ["$delegate"]; | |
angular.module("material.core", ["ngAnimate", "material.core.animate", "material.core.layout", "material.core.gestures", "material.core.theming"]).config(MdCoreConfigure).run(DetectNgTouch); | |
function DetectNgTouch(a, b) { | |
b.has("$swipe") && (b = "You are using the ngTouch module. \nAngular Material already has mobile click, tap, and swipe support... \nngTouch is not supported with Angular Material!", a.warn(b)) | |
} | |
function MdCoreConfigure(a, b) { | |
a.decorator("$$rAF", ["$delegate", rAFDecorator]); | |
b.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey") | |
} | |
function rAFDecorator(a) { | |
a.throttle = function(b) { | |
var c, d, f, e; | |
return function() { | |
c = arguments; | |
e = this; | |
f = b; | |
d || (d = !0, a(function() { | |
f.apply(e, Array.prototype.slice.call(c)); | |
d = !1 | |
})) | |
} | |
}; | |
return a | |
} | |
angular.module("material.core").directive("mdAutofocus", MdAutofocusDirective).directive("mdAutoFocus", MdAutofocusDirective).directive("mdSidenavFocus", MdAutofocusDirective); | |
function MdAutofocusDirective() { | |
return { | |
restrict: "A", | |
link: postLink | |
} | |
} | |
function postLink(a, b, c) { | |
c = c.mdAutoFocus || c.mdAutofocus || c.mdSidenavFocus; | |
a.$watch(c, function(a) { | |
b.toggleClass("md-autofocus", a) | |
}) | |
} | |
angular.module("material.core").factory("$mdColorUtil", ColorUtilFactory); | |
function ColorUtilFactory() { | |
function a(a) { | |
var c = "#" === a[0] ? a.substr(1) : a; | |
a = c.length / 3; | |
var b = c.substr(0, a), | |
d = c.substr(a, a), | |
c = c.substr(2 * a); | |
1 === a && (b += b, d += d, c += c); | |
return "rgba(" + parseInt(b, 16) + "," + parseInt(d, 16) + "," + parseInt(c, 16) + ",0.1)" | |
} | |
function b(a) { | |
a = (a = a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i)) && 4 === a.length ? "#" + ("0" + parseInt(a[1], 10).toString(16)).slice(-2) + ("0" + parseInt(a[2], 10).toString(16)).slice(-2) + ("0" + parseInt(a[3], 10).toString(16)).slice(-2) : ""; | |
return a.toUpperCase() | |
} | |
function c(a) { | |
return a.replace(")", ", 0.1)").replace("(", "a(") | |
} | |
function d(a) { | |
return a ? a.replace("rgba", "rgb").replace(/,[^\),]+\)/, ")") : "rgb(0,0,0)" | |
} | |
return { | |
rgbaToHex: b, | |
hexToRgba: a, | |
rgbToRgba: c, | |
rgbaToRgb: d | |
} | |
} | |
MdConstantFactory.$inject = ["$sniffer", "$window", "$document"]; | |
angular.module("material.core").factory("$mdConstant", MdConstantFactory); | |
function MdConstantFactory(a) { | |
function b(a) { | |
var b = d + "-" + a, | |
b = c(b), | |
f = b.charAt(0).toLowerCase() + b.substring(1); | |
return angular.isDefined(e.style[a]) ? a : angular.isDefined(e.style[b]) ? b : angular.isDefined(e.style[f]) ? f : a | |
} | |
function c(a) { | |
return a.replace(f, function(a, c, b, d) { | |
return d ? b.toUpperCase() : b | |
}) | |
} | |
var d = a.vendorPrefix; | |
a = /webkit/i.test(d); | |
var f = /([:\-_]+(.))/g, | |
e = document.createElement("div"), | |
g = { | |
isInputKey: function(a) { | |
return 31 <= a.keyCode && 90 >= a.keyCode | |
}, | |
isNumPadKey: function(a) { | |
return 3 === a.location && 97 <= | |
a.keyCode && 105 >= a.keyCode | |
}, | |
isNavigationKey: function(a) { | |
var b = g.KEY_CODE, | |
b = [b.SPACE, b.ENTER, b.UP_ARROW, b.DOWN_ARROW]; | |
return -1 != b.indexOf(a.keyCode) | |
}, | |
KEY_CODE: { | |
COMMA: 188, | |
SEMICOLON: 186, | |
ENTER: 13, | |
ESCAPE: 27, | |
SPACE: 32, | |
PAGE_UP: 33, | |
PAGE_DOWN: 34, | |
END: 35, | |
HOME: 36, | |
LEFT_ARROW: 37, | |
UP_ARROW: 38, | |
RIGHT_ARROW: 39, | |
DOWN_ARROW: 40, | |
TAB: 9, | |
BACKSPACE: 8, | |
DELETE: 46 | |
}, | |
CSS: { | |
TRANSITIONEND: "transitionend" + (a ? " webkitTransitionEnd" : ""), | |
ANIMATIONEND: "animationend" + (a ? " webkitAnimationEnd" : ""), | |
TRANSFORM: b("transform"), | |
TRANSFORM_ORIGIN: b("transformOrigin"), | |
TRANSITION: b("transition"), | |
TRANSITION_DURATION: b("transitionDuration"), | |
ANIMATION_PLAY_STATE: b("animationPlayState"), | |
ANIMATION_DURATION: b("animationDuration"), | |
ANIMATION_NAME: b("animationName"), | |
ANIMATION_TIMING: b("animationTimingFunction"), | |
ANIMATION_DIRECTION: b("animationDirection") | |
}, | |
MEDIA: { | |
xs: "(max-width: 599px)", | |
"gt-xs": "(min-width: 600px)", | |
sm: "(min-width: 600px) and (max-width: 959px)", | |
"gt-sm": "(min-width: 960px)", | |
md: "(min-width: 960px) and (max-width: 1279px)", | |
"gt-md": "(min-width: 1280px)", | |
lg: "(min-width: 1280px) and (max-width: 1919px)", | |
"gt-lg": "(min-width: 1920px)", | |
xl: "(min-width: 1920px)", | |
landscape: "(orientation: landscape)", | |
portrait: "(orientation: portrait)", | |
print: "print" | |
}, | |
MEDIA_PRIORITY: "xl gt-lg lg gt-md md gt-sm sm gt-xs xs landscape portrait print".split(" ") | |
}; | |
return g | |
} | |
angular.module("material.core").config(["$provide", function(a) { | |
a.decorator("$mdUtil", ["$delegate", function(a) { | |
a.iterator = MdIterator; | |
return a | |
}]) | |
}]); | |
function MdIterator(a, b) { | |
function c() { | |
return [].concat(r) | |
} | |
function d() { | |
return r.length | |
} | |
function f(a) { | |
return r.length && -1 < a && a < r.length | |
} | |
function e(a) { | |
return a ? f(k(a) + 1) : !1 | |
} | |
function g(a) { | |
return a ? f(k(a) - 1) : !1 | |
} | |
function h(a) { | |
return f(a) ? r[a] : null | |
} | |
function l(a, b) { | |
return r.filter(function(c) { | |
return c[a] === b | |
}) | |
} | |
function n(a, b) { | |
if (!a) return -1; | |
angular.isNumber(b) || (b = r.length); | |
r.splice(b, 0, a); | |
return k(a) | |
} | |
function p(a) { | |
m(a) && r.splice(k(a), 1) | |
} | |
function k(a) { | |
return r.indexOf(a) | |
} | |
function m(a) { | |
return a && -1 < k(a) | |
} | |
function q() { | |
return r.length ? | |
r[0] : null | |
} | |
function w() { | |
return r.length ? r[r.length - 1] : null | |
} | |
function t(a, c, d, e) { | |
d = d || x; | |
for (c = k(c);;) { | |
if (!f(c)) return null; | |
c += a ? -1 : 1; | |
var g = null; | |
f(c) ? g = r[c] : b && (g = a ? w() : q(), c = k(g)); | |
if (null === g || c === e) return null; | |
if (d(g)) return g; | |
angular.isUndefined(e) && (e = c) | |
} | |
} | |
var x = function() { | |
return !0 | |
}; | |
a && !angular.isArray(a) && (a = Array.prototype.slice.call(a)); | |
b = !!b; | |
var r = a || []; | |
return { | |
items: c, | |
count: d, | |
inRange: f, | |
contains: m, | |
indexOf: k, | |
itemAt: h, | |
findBy: l, | |
add: n, | |
remove: p, | |
first: q, | |
last: w, | |
next: angular.bind(null, t, !1), | |
previous: angular.bind(null, | |
t, !0), | |
hasPrevious: g, | |
hasNext: e | |
} | |
} | |
mdMediaFactory.$inject = ["$mdConstant", "$rootScope", "$window"]; | |
angular.module("material.core").factory("$mdMedia", mdMediaFactory); | |
function mdMediaFactory(a, b, c) { | |
function d(b) { | |
var d = n[b]; | |
angular.isUndefined(d) && (d = b, d = a.MEDIA[d] || ("(" !== d.charAt(0) ? "(" + d + ")" : d), d = n[b] = d); | |
b = k[d]; | |
angular.isUndefined(b) && ((b = p[d]) || (b = p[d] = c.matchMedia(d)), b.addListener(f), b = k[b.media] = !!b.matches); | |
return b | |
} | |
function f(a) { | |
b.$evalAsync(function() { | |
k[a.media] = !!a.matches | |
}) | |
} | |
function e(a) { | |
return p[a] | |
} | |
function g(b, c) { | |
for (var d = 0; d < a.MEDIA_PRIORITY.length; d++) { | |
var f = a.MEDIA_PRIORITY[d]; | |
if (p[n[f]].matches && (f = l(b, c + "-" + f), b[f])) return b[f] | |
} | |
return b[l(b, | |
c)] | |
} | |
function h(b, c, d) { | |
var f = []; | |
b.forEach(function(b) { | |
var e = l(c, b); | |
angular.isDefined(c[e]) && f.push(c.$observe(e, angular.bind(void 0, d, null))); | |
for (var g in a.MEDIA) e = l(c, b + "-" + g), angular.isDefined(c[e]) && f.push(c.$observe(e, angular.bind(void 0, d, g))) | |
}); | |
return function() { | |
f.forEach(function(a) { | |
a() | |
}) | |
} | |
} | |
function l(a, b) { | |
return m[b] || (m[b] = a.$normalize(b)) | |
} | |
var n = {}, | |
p = {}, | |
k = {}, | |
m = {}; | |
d.getResponsiveAttribute = g; | |
d.getQuery = e; | |
d.watchResponsiveAttributes = h; | |
return d | |
} | |
angular.module("material.core").config(["$provide", function(a) { | |
a.decorator("$mdUtil", ["$delegate", function(a) { | |
a.prefixer = MdPrefixer; | |
return a | |
}]) | |
}]); | |
function MdPrefixer(a, b) { | |
function c(a) { | |
a = angular.isArray(a) ? a : [a]; | |
a.forEach(function(b) { | |
h.forEach(function(c) { | |
a.push(c + "-" + b) | |
}) | |
}); | |
return a | |
} | |
function d(a) { | |
a = angular.isArray(a) ? a : [a]; | |
return c(a).map(function(a) { | |
return "[" + a + "]" | |
}).join(",") | |
} | |
function f(a, b) { | |
a = g(a); | |
if (!a) return !1; | |
b = c(b); | |
for (var d = 0; d < b.length; d++) | |
if (a.hasAttribute(b[d])) return !0; | |
return !1 | |
} | |
function e(a, b) { | |
(a = g(a)) && c(b).forEach(function(b) { | |
a.removeAttribute(b) | |
}) | |
} | |
function g(a) { | |
a = a[0] || a; | |
if (a.nodeType) return a | |
} | |
var h = ["data", "x"]; | |
return a ? b ? | |
d(a) : c(a) : { | |
buildList: c, | |
buildSelector: d, | |
hasAttribute: f, | |
removeAttribute: e | |
} | |
} | |
UtilFactory.$inject = "$document $timeout $compile $rootScope $$mdAnimate $interpolate $log $rootElement $window $$rAF".split(" "); | |
var nextUniqueId = 0; | |
angular.module("material.core").factory("$mdUtil", UtilFactory); | |
function UtilFactory(a, b, c, d, f, e, g, h, l, n) { | |
function p(a) { | |
return a ? -1 < String(a).indexOf("px") || -1 < String(a).indexOf("%") ? a : a + "px" : "0" | |
} | |
var k = e.startSymbol(), | |
m = e.endSymbol(), | |
q = "{{" === k && "}}" === m, | |
w = function(a, b, c) { | |
var d = !1; | |
a && a.length && (a = l.getComputedStyle(a[0]), d = angular.isDefined(a[b]) && (c ? a[b] == c : !0)); | |
return d | |
}, | |
t = { | |
dom: {}, | |
now: window.performance ? angular.bind(window.performance, window.performance.now) : Date.now || function() { | |
return (new Date).getTime() | |
}, | |
bidi: function(b, c, d, f) { | |
var e = !("rtl" == a[0].dir || "rtl" == | |
a[0].body.dir); | |
if (0 == arguments.length) return e ? "ltr" : "rtl"; | |
var g = angular.element(b); | |
e && angular.isDefined(d) ? g.css(c, p(d)) : !e && angular.isDefined(f) && g.css(c, p(f)) | |
}, | |
bidiProperty: function(b, c, d, f) { | |
var e = !("rtl" == a[0].dir || "rtl" == a[0].body.dir); | |
b = angular.element(b); | |
e && angular.isDefined(c) ? (b.css(c, p(f)), b.css(d, "")) : !e && angular.isDefined(d) && (b.css(d, p(f)), b.css(c, "")) | |
}, | |
clientRect: function(a, b, c) { | |
a = a[0] || a; | |
b = b || a.offsetParent || document.body; | |
b = b[0] || b; | |
a = a.getBoundingClientRect(); | |
c = c ? b.getBoundingClientRect() : { | |
left: 0, | |
top: 0, | |
width: 0, | |
height: 0 | |
}; | |
return { | |
left: a.left - c.left, | |
top: a.top - c.top, | |
width: a.width, | |
height: a.height | |
} | |
}, | |
offsetRect: function(a, b) { | |
return t.clientRect(a, b, !0) | |
}, | |
nodesToArray: function(a) { | |
a = a || []; | |
for (var b = [], c = 0; c < a.length; ++c) b.push(a.item(c)); | |
return b | |
}, | |
scrollTop: function(b) { | |
b = angular.element(b || a[0].body); | |
var c = b[0] == a[0].body ? a[0].body : void 0; | |
return (c = c ? c.scrollTop + c.parentElement.scrollTop : 0) || Math.abs(b[0].getBoundingClientRect().top) | |
}, | |
findFocusTarget: function(a, b) { | |
function c(a, b) { | |
var c; | |
(a = a[0].querySelectorAll(b)) && | |
a.length && a.length && angular.forEach(a, function(a) { | |
a = angular.element(a); | |
var b = a.hasClass("md-autofocus"); | |
b && (c = a) | |
}); | |
return c | |
} | |
var d = this.prefixer("md-autofocus", !0), | |
f; | |
f = c(a, b || d); | |
f || b == d || (f = c(a, this.prefixer("md-auto-focus", !0))) || (f = c(a, d)); | |
return f | |
}, | |
disableScrollAround: function(b, c, d) { | |
function f(a) { | |
function b(a) { | |
a.preventDefault() | |
} | |
a = angular.element(a || h); | |
var c; | |
d && d.disableScrollMask ? c = a : (a = a[0], c = angular.element('<div class="md-scroll-mask"> <div class="md-scroll-mask-bar"></div></div>'), a.appendChild(c[0])); | |
c.on("wheel", b); | |
c.on("touchmove", b); | |
return function() { | |
c.off("wheel"); | |
c.off("touchmove"); | |
c[0].parentNode.removeChild(c[0]); | |
delete t.disableScrollAround._enableScrolling | |
} | |
} | |
function e() { | |
var a = h.parentNode, | |
b = a.style.cssText || "", | |
c = h.style.cssText || "", | |
d = t.scrollTop(h), | |
f = h.clientWidth; | |
h.scrollHeight > h.clientHeight + 1 && (g(h, { | |
position: "fixed", | |
width: "100%", | |
top: -d + "px" | |
}), a.style.overflowY = "scroll"); | |
h.clientWidth < f && g(h, { | |
overflow: "hidden" | |
}); | |
return function() { | |
h.style.cssText = c; | |
a.style.cssText = b; | |
h.scrollTop = d; | |
a.scrollTop = | |
d | |
} | |
} | |
function g(a, b) { | |
for (var c in b) a.style[c] = b[c] | |
} | |
t.disableScrollAround._count = t.disableScrollAround._count || 0; | |
++t.disableScrollAround._count; | |
if (t.disableScrollAround._enableScrolling) return t.disableScrollAround._enableScrolling; | |
var h = a[0].body, | |
m = e(), | |
l = f(c); | |
return t.disableScrollAround._enableScrolling = function() { | |
--t.disableScrollAround._count || (m(), l(), delete t.disableScrollAround._enableScrolling) | |
} | |
}, | |
enableScrolling: function() { | |
var a = this.disableScrollAround._enableScrolling; | |
a && a() | |
}, | |
floatingScrollbars: function() { | |
if (void 0 === | |
this.floatingScrollbars.cached) { | |
var b = angular.element("<div><div></div></div>").css({ | |
width: "100%", | |
"z-index": -1, | |
position: "absolute", | |
height: "35px", | |
"overflow-y": "scroll" | |
}); | |
b.children().css("height", "60px"); | |
a[0].body.appendChild(b[0]); | |
this.floatingScrollbars.cached = b[0].offsetWidth == b[0].childNodes[0].offsetWidth; | |
b.remove() | |
} | |
return this.floatingScrollbars.cached | |
}, | |
forceFocus: function(a) { | |
var b = a[0] || a; | |
document.addEventListener("click", function z(a) { | |
a.target === b && a.$focus && (b.focus(), a.stopImmediatePropagation(), | |
a.preventDefault(), b.removeEventListener("click", z)) | |
}, !0); | |
a = document.createEvent("MouseEvents"); | |
a.initMouseEvent("click", !1, !0, window, {}, 0, 0, 0, 0, !1, !1, !1, !1, 0, null); | |
a.$material = !0; | |
a.$focus = !0; | |
b.dispatchEvent(a) | |
}, | |
createBackdrop: function(a, b) { | |
return c(t.supplant('<md-backdrop class="{0}">', [b]))(a) | |
}, | |
supplant: function(a, b, c) { | |
c = c || /\{([^\{\}]*)\}/g; | |
return a.replace(c, function(a, c) { | |
c = c.split("."); | |
var d = b; | |
try { | |
for (var f in c) c.hasOwnProperty(f) && (d = d[c[f]]) | |
} catch (A) { | |
d = a | |
} | |
return "string" === typeof d || "number" === | |
typeof d ? d : a | |
}) | |
}, | |
fakeNgModel: function() { | |
return { | |
$fake: !0, | |
$setTouched: angular.noop, | |
$setViewValue: function(a) { | |
this.$viewValue = a; | |
this.$render(a); | |
this.$viewChangeListeners.forEach(function(a) { | |
a() | |
}) | |
}, | |
$isEmpty: function(a) { | |
return 0 === ("" + a).length | |
}, | |
$parsers: [], | |
$formatters: [], | |
$viewChangeListeners: [], | |
$render: angular.noop | |
} | |
}, | |
debounce: function(a, c, d, f) { | |
var e; | |
return function() { | |
var g = d, | |
h = Array.prototype.slice.call(arguments); | |
b.cancel(e); | |
e = b(function() { | |
e = void 0; | |
a.apply(g, h) | |
}, c || 10, f) | |
} | |
}, | |
throttle: function(a, b) { | |
var c; | |
return function() { | |
var d = this, | |
f = arguments, | |
e = t.now(); | |
if (!c || e - c > b) a.apply(d, f), c = e | |
} | |
}, | |
time: function(a) { | |
var b = t.now(); | |
a(); | |
return t.now() - b | |
}, | |
valueOnUse: function(a, b, c) { | |
var d = null, | |
f = Array.prototype.slice.call(arguments), | |
e = 3 < f.length ? f.slice(3) : []; | |
Object.defineProperty(a, b, { | |
get: function() { | |
null === d && (d = c.apply(a, e)); | |
return d | |
} | |
}) | |
}, | |
nextUid: function() { | |
return "" + nextUniqueId++ | |
}, | |
disconnectScope: function(a) { | |
if (a && a.$root !== a && !a.$$destroyed) { | |
var b = a.$parent; | |
a.$$disconnected = !0; | |
b.$$childHead === a && (b.$$childHead = a.$$nextSibling); | |
b.$$childTail === a && (b.$$childTail = a.$$prevSibling); | |
a.$$prevSibling && (a.$$prevSibling.$$nextSibling = a.$$nextSibling); | |
a.$$nextSibling && (a.$$nextSibling.$$prevSibling = a.$$prevSibling); | |
a.$$nextSibling = a.$$prevSibling = null | |
} | |
}, | |
reconnectScope: function(a) { | |
if (a && a.$root !== a && a.$$disconnected) { | |
var b = a.$parent; | |
a.$$disconnected = !1; | |
a.$$prevSibling = b.$$childTail; | |
b.$$childHead ? (b.$$childTail.$$nextSibling = a, b.$$childTail = a) : b.$$childHead = b.$$childTail = a | |
} | |
}, | |
getClosest: function(a, b, c) { | |
if (angular.isString(b)) { | |
var d = | |
b.toUpperCase(); | |
b = function(a) { | |
return a.nodeName === d | |
} | |
} | |
a instanceof angular.element && (a = a[0]); | |
c && (a = a.parentNode); | |
if (!a) return null; | |
do | |
if (b(a)) return a; while (a = a.parentNode); | |
return null | |
}, | |
elementContains: function(a, b) { | |
var c = window.Node && window.Node.prototype && Node.prototype.contains, | |
c = c ? angular.bind(a, a.contains) : angular.bind(a, function(c) { | |
return a === b || !!(this.compareDocumentPosition(c) & 16) | |
}); | |
return c(b) | |
}, | |
extractElementByName: function(a, b, c, d) { | |
function f(a) { | |
var d; | |
a: { | |
if (d = a) | |
for (var e = 0, g = d.length; e < | |
g; e++) | |
if (d[e].nodeName.toLowerCase() === b) { | |
d = d[e]; | |
break a | |
} | |
d = null | |
} | |
if (!d) { | |
var h; | |
if (c) { | |
if (a) | |
for (d = 0, e = a.length; d < e; d++) | |
if (g = a[d], !h) | |
for (var m = 0, l = g.childNodes.length; m < l; m++) h = h || f([g.childNodes[m]]) | |
} else h = null; | |
d = h | |
} | |
return d | |
} | |
var e = f(a); | |
!e && d && g.warn(t.supplant("Unable to find node '{0}' in element '{1}'.", [b, a[0].outerHTML])); | |
return angular.element(e || a) | |
}, | |
initOptionalProperties: function(a, b, c) { | |
c = c || {}; | |
angular.forEach(a.$$isolateBindings, function(d, f) { | |
d.optional && angular.isUndefined(a[f]) && (d = angular.isDefined(b[d.attrName]), | |
a[f] = angular.isDefined(c[f]) ? c[f] : d) | |
}) | |
}, | |
nextTick: function(a, c, f) { | |
function e() { | |
var a = g.queue, | |
b = g.digest; | |
g.queue = []; | |
g.timeout = null; | |
g.digest = !1; | |
a.forEach(function(a) { | |
var b = a.scope && a.scope.$$destroyed; | |
b || a.callback() | |
}); | |
b && d.$digest() | |
} | |
var g = t.nextTick, | |
h = g.timeout, | |
m = g.queue || []; | |
m.push({ | |
scope: f, | |
callback: a | |
}); | |
null == c && (c = !0); | |
g.digest = g.digest || c; | |
g.queue = m; | |
return h || (g.timeout = b(e, 0, !1)) | |
}, | |
processTemplate: function(a) { | |
return q ? a : a && angular.isString(a) ? a.replace(/\{\{/g, k).replace(/}}/g, m) : a | |
}, | |
getParentWithPointerEvents: function(a) { | |
for (a = | |
a.parent(); w(a, "pointer-events", "none");) a = a.parent(); | |
return a | |
}, | |
getNearestContentElement: function(a) { | |
for (a = a.parent()[0]; a && a !== h[0] && a !== document.body && "MD-CONTENT" !== a.nodeName.toUpperCase();) a = a.parentNode; | |
return a | |
}, | |
checkStickySupport: function() { | |
var b, c = angular.element("<div>"); | |
a[0].body.appendChild(c[0]); | |
for (var d = ["sticky", "-webkit-sticky"], f = 0; f < d.length; ++f) | |
if (c.css({ | |
position: d[f], | |
top: 0, | |
"z-index": 2 | |
}), c.css("position") == d[f]) { | |
b = d[f]; | |
break | |
} | |
c.remove(); | |
return b | |
}, | |
parseAttributeBoolean: function(a, | |
b) { | |
return "" === a || !!a && (!1 === b || "false" !== a && "0" !== a) | |
}, | |
hasComputedStyle: w, | |
isParentFormSubmitted: function(a) { | |
return (a = (a = t.getClosest(a, "form")) ? angular.element(a).controller("form") : null) ? a.$submitted : !1 | |
}, | |
animateScrollTo: function(a, b) { | |
function c() { | |
var h; | |
h = t.now() - g; | |
var m = h; | |
1E3 < m ? h = d + f : (h = (m /= 1E3) * m, m *= h, h = d + f * (-2 * m + 3 * h)); | |
a.scrollTop = h; | |
(e ? h < b : h > b) && n(c) | |
} | |
var d = a.scrollTop, | |
f = b - d, | |
e = d < b, | |
g = t.now(); | |
n(c) | |
} | |
}; | |
t.dom.animator = f(t); | |
return t | |
} | |
angular.element.prototype.focus = angular.element.prototype.focus || function() { | |
this.length && this[0].focus(); | |
return this | |
}; | |
angular.element.prototype.blur = angular.element.prototype.blur || function() { | |
this.length && this[0].blur(); | |
return this | |
}; | |
MdAriaService.$inject = ["$$rAF", "$log", "$window", "$interpolate"]; | |
angular.module("material.core").provider("$mdAria", MdAriaProvider); | |
function MdAriaProvider() { | |
function a() { | |
b.showWarnings = !1 | |
} | |
var b = this; | |
b.showWarnings = !0; | |
return { | |
disableWarnings: a, | |
$get: ["$$rAF", "$log", "$window", "$interpolate", function(a, d, f, e) { | |
return MdAriaService.apply(b, arguments) | |
}] | |
} | |
} | |
function MdAriaService(a, b, c, d) { | |
function f(a, d, f) { | |
var e = angular.element(a)[0] || a, | |
g; | |
if (g = e) { | |
if (!(g = e.hasAttribute(d) && 0 !== e.getAttribute(d).length)) { | |
var h = e; | |
g = d; | |
var m = h.hasChildNodes(), | |
l = !1; | |
if (m) | |
for (h = h.childNodes, m = 0; m < h.length; m++) { | |
var k = h[m]; | |
1 === k.nodeType && k.hasAttribute(g) && (k = k.currentStyle ? k.currentStyle : c.getComputedStyle(k), (k = "none" === k.display) || (l = !0)) | |
} | |
g = l | |
} | |
g = !g | |
} | |
g && (f = angular.isString(f) ? f.trim() : "", f.length ? a.attr(d, f) : n && b.warn('ARIA: Attribute "', d, '", required for accessibility, is missing on node:', | |
e)) | |
} | |
function e(b, c, d) { | |
a(function() { | |
f(b, c, d()) | |
}) | |
} | |
function g(a, b) { | |
var c = l(a) || "", | |
g = -1 < c.indexOf(d.startSymbol()); | |
g ? e(a, b, function() { | |
return l(a) | |
}) : f(a, b, c) | |
} | |
function h(a, b) { | |
var c = l(a), | |
e = -1 < c.indexOf(d.startSymbol()); | |
e || c || f(a, b, c) | |
} | |
function l(a) { | |
a = a[0] || a; | |
for (var b = document.createTreeWalker(a, NodeFilter.SHOW_TEXT, null, !1), c = "", d; d = b.nextNode();) { | |
var f; | |
a: { | |
for (f = d; f.parentNode && (f = f.parentNode) !== a;) | |
if (f.getAttribute && "true" === f.getAttribute("aria-hidden")) { | |
f = !0; | |
break a | |
} | |
f = void 0 | |
} | |
f || (c += d.textContent) | |
} | |
return c.trim() || | |
"" | |
} | |
var n = this.showWarnings; | |
return { | |
expect: f, | |
expectAsync: e, | |
expectWithText: g, | |
expectWithoutText: h | |
} | |
} | |
mdCompilerService.$inject = ["$q", "$templateRequest", "$injector", "$compile", "$controller"]; | |
angular.module("material.core").service("$mdCompiler", mdCompilerService); | |
function mdCompilerService(a, b, c, d, f) { | |
this.compile = function(e) { | |
var g = e.templateUrl, | |
h = e.template || "", | |
l = e.controller, | |
n = e.controllerAs, | |
p = angular.extend({}, e.resolve || {}), | |
k = angular.extend({}, e.locals || {}), | |
m = e.transformTemplate || angular.identity, | |
q = e.bindToController; | |
angular.forEach(p, function(a, b) { | |
angular.isString(a) ? p[b] = c.get(a) : p[b] = c.invoke(a) | |
}); | |
angular.extend(p, k); | |
p.$template = g ? b(g).then(function(a) { | |
return a | |
}) : a.when(h); | |
return a.all(p).then(function(a) { | |
var b, c = m(a.$template, e), | |
g = e.element || angular.element("<div>").html(c.trim()).contents(), | |
h = d(g); | |
return b = { | |
locals: a, | |
element: g, | |
link: function(c) { | |
a.$scope = c; | |
if (l) { | |
var d = f(l, a, !0, n); | |
q && angular.extend(d.instance, a); | |
d = d(); | |
g.data("$ngControllerController", d); | |
g.children().data("$ngControllerController", d); | |
b.controller = d | |
} | |
return h(c) | |
} | |
} | |
}) | |
} | |
} | |
MdGesture.$inject = ["$$MdGestureHandler", "$$rAF", "$timeout"]; | |
attachToDocument.$inject = ["$mdGesture", "$$MdGestureHandler"]; | |
var HANDLERS = {}, | |
pointer, lastPointer, forceSkipClickHijack = !1, | |
lastLabelClickPos = null, | |
isInitialized = !1; | |
angular.module("material.core.gestures", []).provider("$mdGesture", MdGestureProvider).factory("$$MdGestureHandler", MdGestureHandler).run(attachToDocument); | |
function MdGestureProvider() {} | |
MdGestureProvider.prototype = { | |
skipClickHijack: function() { | |
return forceSkipClickHijack = !0 | |
}, | |
$get: ["$$MdGestureHandler", "$$rAF", "$timeout", function(a, b, c) { | |
return new MdGesture(a, b, c) | |
}] | |
}; | |
function MdGesture(a, b, c) { | |
function d(a) { | |
return function(b, c) { | |
c.distance < this.state.options.maxDistance && this.dispatchEvent(b, a, c) | |
} | |
} | |
function f(a, b, c) { | |
var d = HANDLERS[b.replace(/^\$md./, "")]; | |
if (!d) throw Error("Failed to register element with handler " + b + ". Available handlers: " + Object.keys(HANDLERS).join(", ")); | |
return d.registerElement(a, c) | |
} | |
function e(b, c) { | |
var d = new a(b); | |
angular.extend(d, c); | |
HANDLERS[b] = d; | |
return k | |
} | |
function g() { | |
for (var a = document.createElement("div"), b = " webkit Moz MS ms o".split(" "), | |
c = 0; c < b.length; c++) { | |
var d = b[c], | |
d = d ? d + "TouchAction" : "touchAction"; | |
if (angular.isDefined(a.style[d])) return d | |
} | |
} | |
var h = navigator.userAgent || navigator.vendor || window.opera, | |
l = h.match(/ipad|iphone|ipod/i), | |
h = h.match(/android/i), | |
n = g(), | |
p = "undefined" !== typeof window.jQuery && angular.element === window.jQuery, | |
k = { | |
handler: e, | |
register: f, | |
isIos: l, | |
isAndroid: h, | |
isHijackingClicks: (l || h) && !p && !forceSkipClickHijack | |
}; | |
k.isHijackingClicks && (l = 6, k.handler("click", { | |
options: { | |
maxDistance: l | |
}, | |
onEnd: d("click") | |
}), k.handler("focus", { | |
options: { | |
maxDistance: l | |
}, | |
onEnd: function(a, b) { | |
if (b.distance < this.state.options.maxDistance) { | |
var c; | |
c = a.target; | |
var d = "INPUT SELECT BUTTON TEXTAREA VIDEO AUDIO".split(" "); | |
if (c = "-1" != c.getAttribute("tabindex") && !c.hasAttribute("DISABLED") && (c.hasAttribute("tabindex") || c.hasAttribute("href") || c.isContentEditable || -1 != d.indexOf(c.nodeName))) this.dispatchEvent(a, "focus", b), a.target.focus() | |
} | |
} | |
}), k.handler("mouseup", { | |
options: { | |
maxDistance: l | |
}, | |
onEnd: d("mouseup") | |
}), k.handler("mousedown", { | |
onStart: function(a) { | |
this.dispatchEvent(a, "mousedown") | |
} | |
})); | |
return k.handler("press", { | |
onStart: function(a) { | |
this.dispatchEvent(a, "$md.pressdown") | |
}, | |
onEnd: function(a) { | |
this.dispatchEvent(a, "$md.pressup") | |
} | |
}).handler("hold", { | |
options: { | |
maxDistance: 6, | |
delay: 500 | |
}, | |
onCancel: function() { | |
c.cancel(this.state.timeout) | |
}, | |
onStart: function(a, b) { | |
if (!this.state.registeredParent) return this.cancel(); | |
this.state.pos = { | |
x: b.x, | |
y: b.y | |
}; | |
this.state.timeout = c(angular.bind(this, function() { | |
this.dispatchEvent(a, "$md.hold"); | |
this.cancel() | |
}), this.state.options.delay, !1) | |
}, | |
onMove: function(a, b) { | |
n || "touchmove" !== | |
a.type || a.preventDefault(); | |
a = this.state.pos.x - b.x; | |
b = this.state.pos.y - b.y; | |
Math.sqrt(a * a + b * b) > this.options.maxDistance && this.cancel() | |
}, | |
onEnd: function() { | |
this.onCancel() | |
} | |
}).handler("drag", { | |
options: { | |
minDistance: 6, | |
horizontal: !0, | |
cancelMultiplier: 1.5 | |
}, | |
onSetup: function(a, b) { | |
n && (this.oldTouchAction = a[0].style[n], a[0].style[n] = !1 === b.horizontal ? "pan-y" : "pan-x") | |
}, | |
onCleanup: function(a) { | |
this.oldTouchAction && (a[0].style[n] = this.oldTouchAction) | |
}, | |
onStart: function() { | |
this.state.registeredParent || this.cancel() | |
}, | |
onMove: function(a, | |
b) { | |
var c; | |
n || "touchmove" !== a.type || a.preventDefault(); | |
this.state.dragPointer ? this.dispatchDragMove(a) : (this.state.options.horizontal ? (c = Math.abs(b.distanceX) > this.state.options.minDistance, b = Math.abs(b.distanceY) > this.state.options.minDistance * this.state.options.cancelMultiplier) : (c = Math.abs(b.distanceY) > this.state.options.minDistance, b = Math.abs(b.distanceX) > this.state.options.minDistance * this.state.options.cancelMultiplier), c ? (this.state.dragPointer = makeStartPointer(a), updatePointerState(a, this.state.dragPointer), | |
this.dispatchEvent(a, "$md.dragstart", this.state.dragPointer)) : b && this.cancel()) | |
}, | |
dispatchDragMove: b.throttle(function(a) { | |
this.state.isRunning && (updatePointerState(a, this.state.dragPointer), this.dispatchEvent(a, "$md.drag", this.state.dragPointer)) | |
}), | |
onEnd: function(a) { | |
this.state.dragPointer && (updatePointerState(a, this.state.dragPointer), this.dispatchEvent(a, "$md.dragend", this.state.dragPointer)) | |
} | |
}).handler("swipe", { | |
options: { | |
minVelocity: .65, | |
minDistance: 10 | |
}, | |
onEnd: function(a, b) { | |
Math.abs(b.velocityX) > this.state.options.minVelocity && | |
Math.abs(b.distanceX) > this.state.options.minDistance ? (b = "left" == b.directionX ? "$md.swipeleft" : "$md.swiperight", this.dispatchEvent(a, b)) : Math.abs(b.velocityY) > this.state.options.minVelocity && Math.abs(b.distanceY) > this.state.options.minDistance && (b = "up" == b.directionY ? "$md.swipeup" : "$md.swipedown", this.dispatchEvent(a, b)) | |
} | |
}) | |
} | |
function GestureHandler(a) { | |
this.name = a; | |
this.state = {} | |
} | |
function MdGestureHandler() { | |
function a(a, b, c) { | |
c = c || pointer; | |
b = new angular.element.Event(b); | |
b.$material = !0; | |
b.pointer = c; | |
b.srcEvent = a; | |
angular.extend(b, { | |
clientX: c.x, | |
clientY: c.y, | |
screenX: c.x, | |
screenY: c.y, | |
pageX: c.x, | |
pageY: c.y, | |
ctrlKey: a.ctrlKey, | |
altKey: a.altKey, | |
shiftKey: a.shiftKey, | |
metaKey: a.metaKey | |
}); | |
angular.element(c.target).trigger(b) | |
} | |
function b(a, b, c) { | |
c = c || pointer; | |
var d; | |
"click" === b || "mouseup" == b || "mousedown" == b ? (d = document.createEvent("MouseEvents"), d.initMouseEvent(b, !0, !0, window, a.detail, c.x, c.y, c.x, c.y, | |
a.ctrlKey, a.altKey, a.shiftKey, a.metaKey, a.button, a.relatedTarget || null)) : (d = document.createEvent("CustomEvent"), d.initCustomEvent(b, !0, !0, {})); | |
d.$material = !0; | |
d.pointer = c; | |
d.srcEvent = a; | |
c.target.dispatchEvent(d) | |
} | |
var c = "undefined" !== typeof window.jQuery && angular.element === window.jQuery; | |
GestureHandler.prototype = { | |
options: {}, | |
dispatchEvent: c ? a : b, | |
onSetup: angular.noop, | |
onCleanup: angular.noop, | |
onStart: angular.noop, | |
onMove: angular.noop, | |
onEnd: angular.noop, | |
onCancel: angular.noop, | |
start: function(a, b) { | |
if (!this.state.isRunning) { | |
var c = | |
this.getNearestParent(a.target), | |
d = c && c.$mdGesture[this.name] || {}; | |
this.state = { | |
isRunning: !0, | |
options: angular.extend({}, this.options, d), | |
registeredParent: c | |
}; | |
this.onStart(a, b) | |
} | |
}, | |
move: function(a, b) { | |
if (this.state.isRunning) this.onMove(a, b) | |
}, | |
end: function(a, b) { | |
this.state.isRunning && (this.onEnd(a, b), this.state.isRunning = !1) | |
}, | |
cancel: function(a, b) { | |
this.onCancel(a, b); | |
this.state = {} | |
}, | |
getNearestParent: function(a) { | |
for (; a;) { | |
if ((a.$mdGesture || {})[this.name]) return a; | |
a = a.parentNode | |
} | |
return null | |
}, | |
registerElement: function(a, | |
b) { | |
function c() { | |
delete a[0].$mdGesture[d.name]; | |
a.off("$destroy", c); | |
d.onCleanup(a, b || {}) | |
} | |
var d = this; | |
a[0].$mdGesture = a[0].$mdGesture || {}; | |
a[0].$mdGesture[this.name] = b || {}; | |
a.on("$destroy", c); | |
d.onSetup(a, b || {}); | |
return c | |
} | |
}; | |
return GestureHandler | |
} | |
function attachToDocument(a, b) { | |
function c(a) { | |
var b = !a.clientX && !a.clientY; | |
b || a.$material || a.isIonicTap || lastLabelClickPos && lastLabelClickPos.x == a.x && lastLabelClickPos.y == a.y || (a.preventDefault(), a.stopPropagation()) | |
} | |
function d(a) { | |
var b = 0 === a.clientX && 0 === a.clientY; | |
b || a.$material || a.isIonicTap || lastLabelClickPos && lastLabelClickPos.x == a.x && lastLabelClickPos.y == a.y ? (lastLabelClickPos = null, "label" == a.target.tagName.toLowerCase() && (lastLabelClickPos = { | |
x: a.x, | |
y: a.y | |
})) : (a.preventDefault(), a.stopPropagation(), | |
lastLabelClickPos = null) | |
} | |
function f(a, c) { | |
var d, f; | |
for (f in HANDLERS) d = HANDLERS[f], d instanceof b && ("start" === a && d.cancel(), d[a](c, pointer)) | |
} | |
function e(a) { | |
if (!pointer) { | |
var b = +Date.now(); | |
lastPointer && !typesMatch(a, lastPointer) && 1500 > b - lastPointer.endTime || (pointer = makeStartPointer(a), f("start", a)) | |
} | |
} | |
function g(a) { | |
pointer && typesMatch(a, pointer) && (updatePointerState(a, pointer), f("move", a)) | |
} | |
function h(a) { | |
pointer && typesMatch(a, pointer) && (updatePointerState(a, pointer), pointer.endTime = +Date.now(), f("end", a), | |
lastPointer = pointer, pointer = null) | |
} | |
document.contains || (document.contains = function(a) { | |
return document.body.contains(a) | |
}); | |
!isInitialized && a.isHijackingClicks && (document.addEventListener("click", d, !0), document.addEventListener("mouseup", c, !0), document.addEventListener("mousedown", c, !0), document.addEventListener("focus", c, !0), isInitialized = !0); | |
angular.element(document).on("mousedown touchstart pointerdown", e).on("mousemove touchmove pointermove", g).on("mouseup mouseleave touchend touchcancel pointerup pointercancel", | |
h).on("$$mdGestureReset", function() { | |
lastPointer = pointer = null | |
}) | |
} | |
function makeStartPointer(a) { | |
var b = getEventPoint(a); | |
a = { | |
startTime: +Date.now(), | |
target: a.target, | |
type: a.type.charAt(0) | |
}; | |
a.startX = a.x = b.pageX; | |
a.startY = a.y = b.pageY; | |
return a | |
} | |
function typesMatch(a, b) { | |
return a && b && a.type.charAt(0) === b.type | |
} | |
function updatePointerState(a, b) { | |
var c = getEventPoint(a); | |
a = b.x = c.pageX; | |
c = b.y = c.pageY; | |
b.distanceX = a - b.startX; | |
b.distanceY = c - b.startY; | |
b.distance = Math.sqrt(b.distanceX * b.distanceX + b.distanceY * b.distanceY); | |
b.directionX = 0 < b.distanceX ? "right" : 0 > b.distanceX ? "left" : ""; | |
b.directionY = 0 < b.distanceY ? "down" : 0 > b.distanceY ? "up" : ""; | |
b.duration = +Date.now() - b.startTime; | |
b.velocityX = b.distanceX / b.duration; | |
b.velocityY = b.distanceY / b.duration | |
} | |
function getEventPoint(a) { | |
a = a.originalEvent || a; | |
return a.touches && a.touches[0] || a.changedTouches && a.changedTouches[0] || a | |
} | |
angular.module("material.core").provider("$$interimElement", InterimElementProvider); | |
function InterimElementProvider() { | |
function a(a) { | |
function b(a) { | |
n.optionsFactory = a.options; | |
n.methods = (a.methods || []).concat(h); | |
return p | |
} | |
function c(a, b) { | |
l[a] = b; | |
return p | |
} | |
function e(b, c) { | |
c = c || {}; | |
c.methods = c.methods || []; | |
c.options = c.options || function() { | |
return {} | |
}; | |
if (/^cancel|hide|show$/.test(b)) throw Error("Preset '" + b + "' in " + a + " is reserved!"); | |
if (-1 < c.methods.indexOf("_options")) throw Error("Method '_options' in " + a + " is reserved!"); | |
n.presets[b] = { | |
methods: c.methods.concat(h), | |
optionsFactory: c.options, | |
argOption: c.argOption | |
}; | |
return p | |
} | |
function g(b, c) { | |
function d(a) { | |
a = a || {}; | |
a._options && (a = a._options); | |
return k.show(angular.extend({}, h, a)) | |
} | |
function f(a) { | |
return k.destroy(a) | |
} | |
function e(b, d) { | |
var f = {}; | |
f[a] = m; | |
return c.invoke(b || function() { | |
return d | |
}, {}, f) | |
} | |
var g, h, k = b(), | |
m = { | |
hide: k.hide, | |
cancel: k.cancel, | |
show: d, | |
destroy: f | |
}; | |
g = n.methods || []; | |
h = e(n.optionsFactory, {}); | |
angular.forEach(l, function(a, b) { | |
m[b] = a | |
}); | |
angular.forEach(n.presets, function(a, b) { | |
function c(a) { | |
this._options = angular.extend({}, d, a) | |
} | |
var d = e(a.optionsFactory, {}), | |
f = (a.methods || []).concat(g); | |
angular.extend(d, { | |
$type: b | |
}); | |
angular.forEach(f, function(a) { | |
c.prototype[a] = function(b) { | |
this._options[a] = b; | |
return this | |
} | |
}); | |
a.argOption && (f = "show" + b.charAt(0).toUpperCase() + b.slice(1), m[f] = function(a) { | |
a = m[b](a); | |
return m.show(a) | |
}); | |
m[b] = function(b) { | |
return arguments.length && a.argOption && !angular.isObject(b) && !angular.isArray(b) ? (new c)[a.argOption](b) : new c(b) | |
} | |
}); | |
return m | |
} | |
g.$inject = ["$$interimElement", "$injector"]; | |
var h = ["onHide", "onShow", "onRemove"], | |
l = {}, | |
n = { | |
presets: {} | |
}, | |
p = { | |
setDefaults: b, | |
addPreset: e, | |
addMethod: c, | |
$get: g | |
}; | |
p.addPreset("build", { | |
methods: "controller controllerAs resolve template templateUrl themable transformTemplate parent".split(" ") | |
}); | |
return p | |
} | |
function b(a, b, f, e, g, h, l, n, p, k, m) { | |
return function() { | |
function c(a) { | |
a = a || {}; | |
var c = new r(a || {}); | |
a = !a.skipHide && z.length ? v.cancel() : b.when(!0); | |
a["finally"](function() { | |
z.push(c); | |
c.show()["catch"](function(a) { | |
return a | |
}) | |
}); | |
return c.deferred.promise | |
} | |
function d(a, c) { | |
function d(b) { | |
b.remove(a, !1, c || {})["catch"](function(a) { | |
return a | |
}); | |
return b.deferred.promise | |
} | |
if (!z.length) return b.when(a); | |
c = c || {}; | |
if (c.closeAll) { | |
var f = b.all(z.reverse().map(d)); | |
z = []; | |
return f | |
} | |
if (void 0 !== c.closeTo) return b.all(z.splice(c.closeTo).map(d)); | |
f = z.pop(); | |
return d(f) | |
} | |
function t(a, c) { | |
var d = z.pop(); | |
if (!d) return b.when(a); | |
d.remove(a, !0, c || {})["catch"](function(a) { | |
return a | |
}); | |
return d.deferred.promise["catch"](angular.noop) | |
} | |
function x(a) { | |
var c = a ? null : z.shift(), | |
d = angular.element(a).length ? angular.element(a)[0].parentNode : null; | |
d && (a = z.filter(function(a) { | |
a = a.options.element[0]; | |
return a === | |
d | |
}), 0 < a.length && (c = a[0], z.splice(z.indexOf(c), 1))); | |
return c ? c.remove(!1, !1, { | |
$destroy: !0 | |
}) : b.when(!1) | |
} | |
function r(c) { | |
function d() { | |
return b(function(b, d) { | |
function f(a) { | |
C.deferred.reject(a); | |
d(a) | |
} | |
c.onCompiling && c.onCompiling(c); | |
t(c).then(function(d) { | |
var e = d, | |
g = c; | |
angular.extend(e.locals, g); | |
e = e.link(g.scope); | |
g.element = e; | |
var m = g, | |
l; | |
var q = e, | |
n = g, | |
A = n.parent, | |
A = angular.isFunction(A) ? A(n.scope, q, n) : angular.isString(A) ? angular.element(a[0].querySelector(A)) : angular.element(A); | |
(A || {}).length ? l = A : (h[0] && h[0].querySelector && | |
(l = h[0].querySelector(":not(svg) > body")), l || (l = h[0]), "#comment" == l.nodeName && (l = a[0].body), l = angular.element(l)); | |
m.parent = l; | |
g.themable && k(e); | |
P = e; | |
K = x(P, c, d.controller).then(b, f) | |
}, f) | |
}) | |
} | |
function m(a, d, f) { | |
function e(a) { | |
C.deferred.reject(a) | |
} | |
if (!P) return b.when(!1); | |
c = angular.extend(c || {}, f || {}); | |
c.cancelAutoHide && c.cancelAutoHide(); | |
c.element.triggerHandler("$mdInterimElementRemove"); | |
if (!0 === c.$destroy) return E(c.element, c).then(function() { | |
d && e(a) || C.deferred.resolve(a) | |
}); | |
b.when(K)["finally"](function() { | |
E(c.element, | |
c).then(function() { | |
d && e(a) || C.deferred.resolve(a) | |
}, e) | |
}); | |
return C.deferred.promise | |
} | |
function q(a) { | |
a = a || {}; | |
a.template && (a.template = n.processTemplate(a.template)); | |
return angular.extend({ | |
preserveScope: !1, | |
cancelAutoHide: angular.noop, | |
scope: a.scope || e.$new(a.isolateScope), | |
onShow: function(a, b, c) { | |
return l.enter(b, c.parent) | |
}, | |
onRemove: function(a, c) { | |
return c && l.leave(c) || b.when() | |
} | |
}, a) | |
} | |
function t(a) { | |
var c = a.skipCompile ? null : p.compile(a); | |
return c || b(function(b) { | |
b({ | |
locals: {}, | |
link: function() { | |
return a.element | |
} | |
}) | |
}) | |
} | |
function r() { | |
var a, b = angular.noop; | |
c.hideDelay && (a = g(v.hide, c.hideDelay), b = function() { | |
g.cancel(a) | |
}); | |
c.cancelAutoHide = function() { | |
b(); | |
c.cancelAutoHide = void 0 | |
} | |
} | |
function x(a, c, d) { | |
var f = c.onShowing || angular.noop, | |
e = c.onComplete || angular.noop; | |
f(c.scope, a, c, d); | |
return b(function(f, g) { | |
try { | |
b.when(c.onShow(c.scope, a, c, d)).then(function() { | |
e(c.scope, a, c); | |
r(); | |
f(a) | |
}, g) | |
} catch (X) { | |
g(X.message) | |
} | |
}) | |
} | |
function E(a, b) { | |
var c = b.onRemoving || angular.noop; | |
return f(function(d, e) { | |
try { | |
var g = f.when(b.onRemove(b.scope, a, b) || !0); | |
c(a, | |
g); | |
1 == b.$destroy ? d(a) : g.then(function() { | |
!b.preserveScope && b.scope && b.scope.$destroy(); | |
d(a) | |
}, e) | |
} catch (O) { | |
e(O) | |
} | |
}) | |
} | |
var C, P, K = b.when(!0); | |
c = q(c); | |
return C = { | |
options: c, | |
deferred: b.defer(), | |
show: d, | |
remove: m | |
} | |
} | |
var v, z = []; | |
return v = { | |
show: c, | |
hide: d, | |
cancel: t, | |
destroy: x, | |
$injector_: m | |
} | |
} | |
} | |
b.$inject = "$document $q $$q $rootScope $timeout $rootElement $animate $mdUtil $mdCompiler $mdTheming $injector".split(" "); | |
a.$get = b; | |
return a | |
} | |
(function() { | |
function a(a) { | |
function g(a) { | |
return a.replace(m, "").replace(k, function(a, b, c, d) { | |
return d ? c.toUpperCase() : c | |
}) | |
} | |
var m = /^((?:x|data)[\:\-_])/i, | |
k = /([\:\-\_]+(.))/g, | |
q = " xs gt-xs sm gt-sm md gt-md lg gt-lg xl print".split(" "), | |
A = ["layout", "flex", "flex-order", "flex-offset", "layout-align"], | |
t = ["show", "hide", "layout-padding", "layout-margin"]; | |
angular.forEach(q, function(b) { | |
angular.forEach(A, function(c) { | |
c = b ? c + "-" + b : c; | |
a.directive(g(c), f(c)) | |
}); | |
angular.forEach(t, function(c) { | |
c = b ? c + "-" + b : c; | |
a.directive(g(c), | |
e(c)) | |
}) | |
}); | |
a.provider("$$mdLayout", function() { | |
return { | |
$get: angular.noop, | |
validateAttributeValue: n, | |
validateAttributeUsage: l, | |
disableLayouts: function(a) { | |
D.enabled = !0 !== a | |
} | |
} | |
}).directive("mdLayoutCss", c).directive("ngCloak", d("ng-cloak")).directive("layoutWrap", e("layout-wrap")).directive("layoutNowrap", e("layout-nowrap")).directive("layoutNoWrap", e("layout-no-wrap")).directive("layoutFill", e("layout-fill")).directive("layoutLtMd", h("layout-lt-md", !0)).directive("layoutLtLg", h("layout-lt-lg", !0)).directive("flexLtMd", | |
h("flex-lt-md", !0)).directive("flexLtLg", h("flex-lt-lg", !0)).directive("layoutAlignLtMd", h("layout-align-lt-md")).directive("layoutAlignLtLg", h("layout-align-lt-lg")).directive("flexOrderLtMd", h("flex-order-lt-md")).directive("flexOrderLtLg", h("flex-order-lt-lg")).directive("offsetLtMd", h("flex-offset-lt-md")).directive("offsetLtLg", h("flex-offset-lt-lg")).directive("hideLtMd", h("hide-lt-md")).directive("hideLtLg", h("hide-lt-lg")).directive("showLtMd", h("show-lt-md")).directive("showLtLg", h("show-lt-lg")).config(b) | |
} | |
function b() { | |
var a = !!document.querySelector("[md-layouts-disabled]"); | |
D.enabled = !a | |
} | |
function c() { | |
D.enabled = !1; | |
return { | |
restrict: "A", | |
priority: "900" | |
} | |
} | |
function d(a) { | |
return ["$timeout", function(b) { | |
return { | |
restrict: "A", | |
priority: -10, | |
compile: function(c) { | |
if (!D.enabled) return angular.noop; | |
c.addClass(a); | |
return function(c, d) { | |
b(function() { | |
d.removeClass(a) | |
}, 10, !1) | |
} | |
} | |
} | |
}] | |
} | |
function f(a) { | |
function b(b, c, d) { | |
c = g(c, a, d); | |
var f = d.$observe(d.$normalize(a), c); | |
c(k(a, d, "")); | |
b.$on("$destroy", function() { | |
f() | |
}) | |
} | |
return ["$mdUtil", "$interpolate", | |
"$log", | |
function(c, d, f) { | |
q = c; | |
w = d; | |
t = f; | |
return { | |
restrict: "A", | |
compile: function(c, d) { | |
var f; | |
D.enabled && (l(a, d, c, t), n(a, k(a, d, ""), p(c, a, d)), f = b); | |
return f || angular.noop | |
} | |
} | |
} | |
] | |
} | |
function e(a) { | |
function b(b, c) { | |
c.addClass(a) | |
} | |
return ["$mdUtil", "$interpolate", "$log", function(c, d, f) { | |
q = c; | |
w = d; | |
t = f; | |
return { | |
restrict: "A", | |
compile: function(c, d) { | |
var f; | |
D.enabled && (n(a, k(a, d, ""), p(c, a, d)), c.addClass(a), f = b); | |
return f || angular.noop | |
} | |
} | |
}] | |
} | |
function g(a, b) { | |
var c; | |
return function(d) { | |
d = n(b, d || ""); | |
angular.isDefined(d) && (c && a.removeClass(c), c = | |
d ? b + "-" + d.replace(r, "-") : b, a.addClass(c)) | |
} | |
} | |
function h(a) { | |
var b = a.split("-"); | |
return ["$log", function(c) { | |
c.warn(a + "has been deprecated. Please use a `" + b[0] + "-gt-<xxx>` variant."); | |
return angular.noop | |
}] | |
} | |
function l(a, b, c, d) { | |
b = c[0].nodeName.toLowerCase(); | |
switch (a.replace(x, "")) { | |
case "flex": | |
if ("md-button" == b || "fieldset" == b) b = "<" + b + " " + a + "></" + b + ">", c = "https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers", a = "Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.", | |
d.warn(q.supplant(a, [b, c])) | |
} | |
} | |
function n(a, b, c) { | |
var d = b; | |
if (!(-1 < (b || "").indexOf(w.startSymbol()))) { | |
switch (a.replace(x, "")) { | |
case "layout": | |
m(b, z) || (b = z[0]); | |
break; | |
case "flex": | |
m(b, v) || isNaN(b) && (b = ""); | |
break; | |
case "flex-offset": | |
case "flex-order": | |
if (!b || isNaN(+b)) b = "0"; | |
break; | |
case "layout-align": | |
a = { | |
main: "start", | |
cross: "stretch" | |
}; | |
b = b || ""; | |
if (0 === b.indexOf("-") || 0 === b.indexOf(" ")) b = "none" + b; | |
b = b.toLowerCase().trim().replace(r, "-").split("-"); | |
b.length && "space" === b[0] && (b = [b[0] + "-" + b[1], b[2]]); | |
0 < b.length && (a.main = | |
b[0] || a.main); | |
1 < b.length && (a.cross = b[1] || a.cross); | |
0 > E.indexOf(a.main) && (a.main = "start"); | |
0 > F.indexOf(a.cross) && (a.cross = "stretch"); | |
b = q.supplant("{main}-{cross}", a); | |
break; | |
case "layout-padding": | |
case "layout-margin": | |
case "layout-fill": | |
case "layout-wrap": | |
case "layout-nowrap": | |
case "layout-nowrap": | |
b = "" | |
} | |
b != d && (c || angular.noop)(b) | |
} | |
return b | |
} | |
function p(a, b, c) { | |
return function(a) { | |
-1 < (a || "").indexOf(w.startSymbol()) || (c[c.$normalize(b)] = a) | |
} | |
} | |
function k(a, b, c) { | |
a = b.$normalize(a); | |
return b[a] ? b[a].replace(r, "-") : c || | |
null | |
} | |
function m(a, b, c) { | |
a = c && a ? a.replace(r, c) : a; | |
var d = !1; | |
a && b.forEach(function(b) { | |
b = c ? b.replace(r, c) : b; | |
d = d || b === a | |
}); | |
return d | |
} | |
var q, w, t, x = /(-gt)?-(sm|md|lg|print)/g, | |
r = /\s+/g, | |
v = "grow initial auto none noshrink nogrow".split(" "), | |
z = ["row", "column"], | |
E = " start center end stretch space-around space-between".split(" "), | |
F = ["", "start", "center", "end", "stretch"], | |
D = { | |
enabled: !0, | |
breakpoints: [] | |
}; | |
a(angular.module("material.core.layout", ["ng"])) | |
})(); | |
angular.module("material.core.meta", []).provider("$$mdMeta", function() { | |
function a(a) { | |
if (f[a]) return !0; | |
var b = document.getElementsByName(a)[0]; | |
if (!b) return !1; | |
f[a] = angular.element(b); | |
return !0 | |
} | |
function b(b, c) { | |
a(b); | |
f[b] ? f[b].attr("content", c) : (c = angular.element('<meta name="' + b + '" content="' + c + '"/>'), d.append(c), f[b] = c); | |
return function() { | |
f[b].attr("content", ""); | |
f[b].remove(); | |
delete f[b] | |
} | |
} | |
function c(b) { | |
if (!a(b)) throw Error("$$mdMeta: could not find a meta tag with the name '" + b + "'"); | |
return f[b].attr("content") | |
} | |
var d = angular.element(document.head), | |
f = {}, | |
e = { | |
setMeta: b, | |
getMeta: c | |
}; | |
return angular.extend({}, e, { | |
$get: function() { | |
return e | |
} | |
}) | |
}); | |
ComponentRegistry.$inject = ["$log", "$q"]; | |
angular.module("material.core").factory("$mdComponentRegistry", ComponentRegistry); | |
function ComponentRegistry(a, b) { | |
var c, d = [], | |
f = {}; | |
return c = { | |
notFoundError: function(b, c) { | |
a.error((c || "") + "No instance found for handle", b) | |
}, | |
getInstances: function() { | |
return d | |
}, | |
get: function(a) { | |
if (!a || "" === a) return null; | |
var b, c, f; | |
b = 0; | |
for (c = d.length; b < c; b++) | |
if (f = d[b], f.$$mdHandle === a) return f; | |
return null | |
}, | |
register: function(a, b) { | |
function c() { | |
var b = d.indexOf(a); - 1 !== b && d.splice(b, 1) | |
} | |
function e() { | |
var c = f[b]; | |
c && (c.forEach(function(b) { | |
b.resolve(a) | |
}), delete f[b]) | |
} | |
if (!b) return angular.noop; | |
a.$$mdHandle = b; | |
d.push(a); | |
e(); | |
return c | |
}, | |
when: function(a) { | |
if (a && "" !== a) { | |
var d = b.defer(), | |
e = c.get(a); | |
e ? d.resolve(e) : (void 0 === f[a] && (f[a] = []), f[a].push(d)); | |
return d.promise | |
} | |
return b.reject("Invalid `md-component-id` value.") | |
} | |
} | |
} | |
(function() { | |
function a(a) { | |
function b(a) { | |
return a.hasClass("md-icon-button") ? { | |
isMenuItem: a.hasClass("md-menu-item"), | |
fitRipple: !0, | |
center: !0 | |
} : { | |
isMenuItem: a.hasClass("md-menu-item"), | |
dimBackground: !0 | |
} | |
} | |
return { | |
attach: function(c, f, e) { | |
e = angular.extend(b(f), e); | |
return a.attach(c, f, e) | |
} | |
} | |
} | |
a.$inject = ["$mdInkRipple"]; | |
angular.module("material.core").factory("$mdButtonInkRipple", a) | |
})(); | |
(function() { | |
function a(a) { | |
function b(b, c, e) { | |
return a.attach(b, c, angular.extend({ | |
center: !0, | |
dimBackground: !1, | |
fitRipple: !0 | |
}, e)) | |
} | |
return { | |
attach: b | |
} | |
} | |
a.$inject = ["$mdInkRipple"]; | |
angular.module("material.core").factory("$mdCheckboxInkRipple", a) | |
})(); | |
(function() { | |
function a(a) { | |
function b(b, c, e) { | |
return a.attach(b, c, angular.extend({ | |
center: !1, | |
dimBackground: !0, | |
outline: !1, | |
rippleSize: "full" | |
}, e)) | |
} | |
return { | |
attach: b | |
} | |
} | |
a.$inject = ["$mdInkRipple"]; | |
angular.module("material.core").factory("$mdListInkRipple", a) | |
})(); | |
InkRippleCtrl.$inject = "$scope $element rippleOptions $window $timeout $mdUtil $mdColorUtil".split(" "); | |
InkRippleDirective.$inject = ["$mdButtonInkRipple", "$mdCheckboxInkRipple"]; | |
angular.module("material.core").provider("$mdInkRipple", InkRippleProvider).directive("mdInkRipple", InkRippleDirective).directive("mdNoInk", attrNoDirective).directive("mdNoBar", attrNoDirective).directive("mdNoStretch", attrNoDirective); | |
function InkRippleDirective(a, b) { | |
return { | |
controller: angular.noop, | |
link: function(c, d, f) { | |
f.hasOwnProperty("mdInkRippleCheckbox") ? b.attach(c, d) : a.attach(c, d) | |
} | |
} | |
} | |
function InkRippleProvider() { | |
function a() { | |
b = !0 | |
} | |
var b = !1; | |
return { | |
disableInkRipple: a, | |
$get: ["$injector", function(a) { | |
function c(c, d, g) { | |
return b || d.controller("mdNoInk") ? angular.noop : a.instantiate(InkRippleCtrl, { | |
$scope: c, | |
$element: d, | |
rippleOptions: g | |
}) | |
} | |
return { | |
attach: c | |
} | |
}] | |
} | |
} | |
function InkRippleCtrl(a, b, c, d, f, e, g) { | |
this.$window = d; | |
this.$timeout = f; | |
this.$mdUtil = e; | |
this.$mdColorUtil = g; | |
this.$scope = a; | |
this.$element = b; | |
this.options = c; | |
this.mousedown = !1; | |
this.ripples = []; | |
this.lastRipple = this.timeout = null; | |
e.valueOnUse(this, "container", this.createContainer); | |
this.$element.addClass("md-ink-ripple"); | |
(b.controller("mdInkRipple") || {}).createRipple = angular.bind(this, this.createRipple); | |
(b.controller("mdInkRipple") || {}).setColor = angular.bind(this, this.color); | |
this.bindEvents() | |
} | |
function autoCleanup(a, b) { | |
if (a.mousedown || a.lastRipple) a.mousedown = !1, a.$mdUtil.nextTick(angular.bind(a, b), !1) | |
} | |
InkRippleCtrl.prototype.color = function(a) { | |
function b() { | |
var a = c.options && c.options.colorElement ? c.options.colorElement : []; | |
return (a = a.length ? a[0] : c.$element[0]) ? c.$window.getComputedStyle(a).color : "rgb(0,0,0)" | |
} | |
var c = this; | |
angular.isDefined(a) && (c._color = c._parseColor(a)); | |
return c._color || c._parseColor(c.inkRipple()) || c._parseColor(b()) | |
}; | |
InkRippleCtrl.prototype.calculateColor = function() { | |
return this.color() | |
}; | |
InkRippleCtrl.prototype._parseColor = function(a, b) { | |
b = b || 1; | |
var c = this.$mdColorUtil; | |
if (a) { | |
if (0 === a.indexOf("rgba")) return a.replace(/\d?\.?\d*\s*\)\s*$/, (.1 * b).toString() + ")"); | |
if (0 === a.indexOf("rgb")) return c.rgbToRgba(a); | |
if (0 === a.indexOf("#")) return c.hexToRgba(a) | |
} | |
}; | |
InkRippleCtrl.prototype.bindEvents = function() { | |
this.$element.on("mousedown", angular.bind(this, this.handleMousedown)); | |
this.$element.on("mouseup touchend", angular.bind(this, this.handleMouseup)); | |
this.$element.on("mouseleave", angular.bind(this, this.handleMouseup)); | |
this.$element.on("touchmove", angular.bind(this, this.handleTouchmove)) | |
}; | |
InkRippleCtrl.prototype.handleMousedown = function(a) { | |
if (!this.mousedown) | |
if (a.hasOwnProperty("originalEvent") && (a = a.originalEvent), this.mousedown = !0, this.options.center) this.createRipple(this.container.prop("clientWidth") / 2, this.container.prop("clientWidth") / 2); | |
else if (a.srcElement !== this.$element[0]) { | |
var b = this.$element[0].getBoundingClientRect(), | |
c = a.clientX - b.left; | |
a = a.clientY - b.top; | |
this.createRipple(c, a) | |
} else this.createRipple(a.offsetX, a.offsetY) | |
}; | |
InkRippleCtrl.prototype.handleMouseup = function() { | |
autoCleanup(this, this.clearRipples) | |
}; | |
InkRippleCtrl.prototype.handleTouchmove = function() { | |
autoCleanup(this, this.deleteRipples) | |
}; | |
InkRippleCtrl.prototype.deleteRipples = function() { | |
for (var a = 0; a < this.ripples.length; a++) this.ripples[a].remove() | |
}; | |
InkRippleCtrl.prototype.clearRipples = function() { | |
for (var a = 0; a < this.ripples.length; a++) this.fadeInComplete(this.ripples[a]) | |
}; | |
InkRippleCtrl.prototype.createContainer = function() { | |
var a = angular.element('<div class="md-ripple-container"></div>'); | |
this.$element.append(a); | |
return a | |
}; | |
InkRippleCtrl.prototype.clearTimeout = function() { | |
this.timeout && (this.$timeout.cancel(this.timeout), this.timeout = null) | |
}; | |
InkRippleCtrl.prototype.isRippleAllowed = function() { | |
var a = this.$element[0]; | |
do { | |
if (!a.tagName || "BODY" === a.tagName) break; | |
if (a && angular.isFunction(a.hasAttribute) && (a.hasAttribute("disabled") || "false" === this.inkRipple() || "0" === this.inkRipple())) return !1 | |
} while (a = a.parentNode); | |
return !0 | |
}; | |
InkRippleCtrl.prototype.inkRipple = function() { | |
return this.$element.attr("md-ink-ripple") | |
}; | |
InkRippleCtrl.prototype.createRipple = function(a, b) { | |
if (this.isRippleAllowed()) { | |
var c = this, | |
d = c.$mdColorUtil, | |
f = angular.element('<div class="md-ripple"></div>'), | |
e = this.$element.prop("clientWidth"), | |
g = this.$element.prop("clientHeight"), | |
e = 2 * Math.max(Math.abs(e - a), a), | |
g = 2 * Math.max(Math.abs(g - b), b), | |
g = this.options.fitRipple ? Math.max(e, g) : Math.sqrt(Math.pow(e, 2) + Math.pow(g, 2)), | |
e = this.calculateColor(); | |
f.css({ | |
left: a + "px", | |
top: b + "px", | |
background: "black", | |
width: g + "px", | |
height: g + "px", | |
backgroundColor: d.rgbaToRgb(e), | |
borderColor: d.rgbaToRgb(e) | |
}); | |
this.lastRipple = f; | |
this.clearTimeout(); | |
this.timeout = this.$timeout(function() { | |
c.clearTimeout(); | |
c.mousedown || c.fadeInComplete(f) | |
}, 157.5, !1); | |
this.options.dimBackground && this.container.css({ | |
backgroundColor: e | |
}); | |
this.container.append(f); | |
this.ripples.push(f); | |
f.addClass("md-ripple-placed"); | |
this.$mdUtil.nextTick(function() { | |
f.addClass("md-ripple-scaled md-ripple-active"); | |
c.$timeout(function() { | |
c.clearRipples() | |
}, 450, !1) | |
}, !1) | |
} | |
}; | |
InkRippleCtrl.prototype.fadeInComplete = function(a) { | |
this.lastRipple === a ? this.timeout || this.mousedown || this.removeRipple(a) : this.removeRipple(a) | |
}; | |
InkRippleCtrl.prototype.removeRipple = function(a) { | |
var b = this, | |
c = this.ripples.indexOf(a); | |
0 > c || (this.ripples.splice(this.ripples.indexOf(a), 1), a.removeClass("md-ripple-active"), a.addClass("md-ripple-remove"), 0 === this.ripples.length && this.container.css({ | |
backgroundColor: "" | |
}), this.$timeout(function() { | |
b.fadeOutComplete(a) | |
}, 450, !1)) | |
}; | |
InkRippleCtrl.prototype.fadeOutComplete = function(a) { | |
a.remove(); | |
this.lastRipple = null | |
}; | |
function attrNoDirective() { | |
return { | |
controller: angular.noop | |
} | |
}(function() { | |
function a(a) { | |
function b(b, c, e) { | |
return a.attach(b, c, angular.extend({ | |
center: !1, | |
dimBackground: !0, | |
outline: !1, | |
rippleSize: "full" | |
}, e)) | |
} | |
return { | |
attach: b | |
} | |
} | |
a.$inject = ["$mdInkRipple"]; | |
angular.module("material.core").factory("$mdTabInkRipple", a) | |
})(); | |
angular.module("material.core.theming.palette", []).constant("$mdColorPalette", { | |
red: { | |
50: "#ffebee", | |
100: "#ffcdd2", | |
200: "#ef9a9a", | |
300: "#e57373", | |
400: "#ef5350", | |
500: "#f44336", | |
600: "#e53935", | |
700: "#d32f2f", | |
800: "#c62828", | |
900: "#b71c1c", | |
A100: "#ff8a80", | |
A200: "#ff5252", | |
A400: "#ff1744", | |
A700: "#d50000", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 300 A100", | |
contrastStrongLightColors: "400 500 600 700 A200 A400 A700" | |
}, | |
pink: { | |
50: "#fce4ec", | |
100: "#f8bbd0", | |
200: "#f48fb1", | |
300: "#f06292", | |
400: "#ec407a", | |
500: "#e91e63", | |
600: "#d81b60", | |
700: "#c2185b", | |
800: "#ad1457", | |
900: "#880e4f", | |
A100: "#ff80ab", | |
A200: "#ff4081", | |
A400: "#f50057", | |
A700: "#c51162", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 A100", | |
contrastStrongLightColors: "500 600 A200 A400 A700" | |
}, | |
purple: { | |
50: "#f3e5f5", | |
100: "#e1bee7", | |
200: "#ce93d8", | |
300: "#ba68c8", | |
400: "#ab47bc", | |
500: "#9c27b0", | |
600: "#8e24aa", | |
700: "#7b1fa2", | |
800: "#6a1b9a", | |
900: "#4a148c", | |
A100: "#ea80fc", | |
A200: "#e040fb", | |
A400: "#d500f9", | |
A700: "#aa00ff", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 A100", | |
contrastStrongLightColors: "300 400 A200 A400 A700" | |
}, | |
"deep-purple": { | |
50: "#ede7f6", | |
100: "#d1c4e9", | |
200: "#b39ddb", | |
300: "#9575cd", | |
400: "#7e57c2", | |
500: "#673ab7", | |
600: "#5e35b1", | |
700: "#512da8", | |
800: "#4527a0", | |
900: "#311b92", | |
A100: "#b388ff", | |
A200: "#7c4dff", | |
A400: "#651fff", | |
A700: "#6200ea", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 A100", | |
contrastStrongLightColors: "300 400 A200" | |
}, | |
indigo: { | |
50: "#e8eaf6", | |
100: "#c5cae9", | |
200: "#9fa8da", | |
300: "#7986cb", | |
400: "#5c6bc0", | |
500: "#3f51b5", | |
600: "#3949ab", | |
700: "#303f9f", | |
800: "#283593", | |
900: "#1a237e", | |
A100: "#8c9eff", | |
A200: "#536dfe", | |
A400: "#3d5afe", | |
A700: "#304ffe", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 A100", | |
contrastStrongLightColors: "300 400 A200 A400" | |
}, | |
blue: { | |
50: "#e3f2fd", | |
100: "#bbdefb", | |
200: "#90caf9", | |
300: "#64b5f6", | |
400: "#42a5f5", | |
500: "#2196f3", | |
600: "#1e88e5", | |
700: "#1976d2", | |
800: "#1565c0", | |
900: "#0d47a1", | |
A100: "#82b1ff", | |
A200: "#448aff", | |
A400: "#2979ff", | |
A700: "#2962ff", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 300 400 A100", | |
contrastStrongLightColors: "500 600 700 A200 A400 A700" | |
}, | |
"light-blue": { | |
50: "#e1f5fe", | |
100: "#b3e5fc", | |
200: "#81d4fa", | |
300: "#4fc3f7", | |
400: "#29b6f6", | |
500: "#03a9f4", | |
600: "#039be5", | |
700: "#0288d1", | |
800: "#0277bd", | |
900: "#01579b", | |
A100: "#80d8ff", | |
A200: "#40c4ff", | |
A400: "#00b0ff", | |
A700: "#0091ea", | |
contrastDefaultColor: "dark", | |
contrastLightColors: "600 700 800 900 A700", | |
contrastStrongLightColors: "600 700 800 A700" | |
}, | |
cyan: { | |
50: "#e0f7fa", | |
100: "#b2ebf2", | |
200: "#80deea", | |
300: "#4dd0e1", | |
400: "#26c6da", | |
500: "#00bcd4", | |
600: "#00acc1", | |
700: "#0097a7", | |
800: "#00838f", | |
900: "#006064", | |
A100: "#84ffff", | |
A200: "#18ffff", | |
A400: "#00e5ff", | |
A700: "#00b8d4", | |
contrastDefaultColor: "dark", | |
contrastLightColors: "700 800 900", | |
contrastStrongLightColors: "700 800 900" | |
}, | |
teal: { | |
50: "#e0f2f1", | |
100: "#b2dfdb", | |
200: "#80cbc4", | |
300: "#4db6ac", | |
400: "#26a69a", | |
500: "#009688", | |
600: "#00897b", | |
700: "#00796b", | |
800: "#00695c", | |
900: "#004d40", | |
A100: "#a7ffeb", | |
A200: "#64ffda", | |
A400: "#1de9b6", | |
A700: "#00bfa5", | |
contrastDefaultColor: "dark", | |
contrastLightColors: "500 600 700 800 900", | |
contrastStrongLightColors: "500 600 700" | |
}, | |
green: { | |
50: "#e8f5e9", | |
100: "#c8e6c9", | |
200: "#a5d6a7", | |
300: "#81c784", | |
400: "#66bb6a", | |
500: "#4caf50", | |
600: "#43a047", | |
700: "#388e3c", | |
800: "#2e7d32", | |
900: "#1b5e20", | |
A100: "#b9f6ca", | |
A200: "#69f0ae", | |
A400: "#00e676", | |
A700: "#00c853", | |
contrastDefaultColor: "dark", | |
contrastLightColors: "500 600 700 800 900", | |
contrastStrongLightColors: "500 600 700" | |
}, | |
"light-green": { | |
50: "#f1f8e9", | |
100: "#dcedc8", | |
200: "#c5e1a5", | |
300: "#aed581", | |
400: "#9ccc65", | |
500: "#8bc34a", | |
600: "#7cb342", | |
700: "#689f38", | |
800: "#558b2f", | |
900: "#33691e", | |
A100: "#ccff90", | |
A200: "#b2ff59", | |
A400: "#76ff03", | |
A700: "#64dd17", | |
contrastDefaultColor: "dark", | |
contrastLightColors: "700 800 900", | |
contrastStrongLightColors: "700 800 900" | |
}, | |
lime: { | |
50: "#f9fbe7", | |
100: "#f0f4c3", | |
200: "#e6ee9c", | |
300: "#dce775", | |
400: "#d4e157", | |
500: "#cddc39", | |
600: "#c0ca33", | |
700: "#afb42b", | |
800: "#9e9d24", | |
900: "#827717", | |
A100: "#f4ff81", | |
A200: "#eeff41", | |
A400: "#c6ff00", | |
A700: "#aeea00", | |
contrastDefaultColor: "dark", | |
contrastLightColors: "900", | |
contrastStrongLightColors: "900" | |
}, | |
yellow: { | |
50: "#fffde7", | |
100: "#fff9c4", | |
200: "#fff59d", | |
300: "#fff176", | |
400: "#ffee58", | |
500: "#ffeb3b", | |
600: "#fdd835", | |
700: "#fbc02d", | |
800: "#f9a825", | |
900: "#f57f17", | |
A100: "#ffff8d", | |
A200: "#ffff00", | |
A400: "#ffea00", | |
A700: "#ffd600", | |
contrastDefaultColor: "dark" | |
}, | |
amber: { | |
50: "#fff8e1", | |
100: "#ffecb3", | |
200: "#ffe082", | |
300: "#ffd54f", | |
400: "#ffca28", | |
500: "#ffc107", | |
600: "#ffb300", | |
700: "#ffa000", | |
800: "#ff8f00", | |
900: "#ff6f00", | |
A100: "#ffe57f", | |
A200: "#ffd740", | |
A400: "#ffc400", | |
A700: "#ffab00", | |
contrastDefaultColor: "dark" | |
}, | |
orange: { | |
50: "#fff3e0", | |
100: "#ffe0b2", | |
200: "#ffcc80", | |
300: "#ffb74d", | |
400: "#ffa726", | |
500: "#ff9800", | |
600: "#fb8c00", | |
700: "#f57c00", | |
800: "#ef6c00", | |
900: "#e65100", | |
A100: "#ffd180", | |
A200: "#ffab40", | |
A400: "#ff9100", | |
A700: "#ff6d00", | |
contrastDefaultColor: "dark", | |
contrastLightColors: "800 900", | |
contrastStrongLightColors: "800 900" | |
}, | |
"deep-orange": { | |
50: "#fbe9e7", | |
100: "#ffccbc", | |
200: "#ffab91", | |
300: "#ff8a65", | |
400: "#ff7043", | |
500: "#ff5722", | |
600: "#f4511e", | |
700: "#e64a19", | |
800: "#d84315", | |
900: "#bf360c", | |
A100: "#ff9e80", | |
A200: "#ff6e40", | |
A400: "#ff3d00", | |
A700: "#dd2c00", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 300 400 A100 A200", | |
contrastStrongLightColors: "500 600 700 800 900 A400 A700" | |
}, | |
brown: { | |
50: "#efebe9", | |
100: "#d7ccc8", | |
200: "#bcaaa4", | |
300: "#a1887f", | |
400: "#8d6e63", | |
500: "#795548", | |
600: "#6d4c41", | |
700: "#5d4037", | |
800: "#4e342e", | |
900: "#3e2723", | |
A100: "#d7ccc8", | |
A200: "#bcaaa4", | |
A400: "#8d6e63", | |
A700: "#5d4037", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 A100 A200", | |
contrastStrongLightColors: "300 400" | |
}, | |
grey: { | |
50: "#fafafa", | |
100: "#f5f5f5", | |
200: "#eeeeee", | |
300: "#e0e0e0", | |
400: "#bdbdbd", | |
500: "#9e9e9e", | |
600: "#757575", | |
700: "#616161", | |
800: "#424242", | |
900: "#212121", | |
A100: "#ffffff", | |
A200: "#000000", | |
A400: "#303030", | |
A700: "#616161", | |
contrastDefaultColor: "dark", | |
contrastLightColors: "600 700 800 900 A200 A400 A700" | |
}, | |
"blue-grey": { | |
50: "#eceff1", | |
100: "#cfd8dc", | |
200: "#b0bec5", | |
300: "#90a4ae", | |
400: "#78909c", | |
500: "#607d8b", | |
600: "#546e7a", | |
700: "#455a64", | |
800: "#37474f", | |
900: "#263238", | |
A100: "#cfd8dc", | |
A200: "#b0bec5", | |
A400: "#78909c", | |
A700: "#455a64", | |
contrastDefaultColor: "light", | |
contrastDarkColors: "50 100 200 300 A100 A200", | |
contrastStrongLightColors: "400 500 700" | |
} | |
}); | |
(function(a) { | |
function b(a) { | |
var b = !!document.querySelector("[md-themes-disabled]"); | |
a.disableTheming(b) | |
} | |
function c(b, c) { | |
function d(a, b) { | |
b = b || {}; | |
q[a] = e(a, b); | |
return r | |
} | |
function f(b, c) { | |
return e(b, a.extend({}, q[b] || {}, c)) | |
} | |
function e(a, b) { | |
var c = D.filter(function(a) { | |
return !b[a] | |
}); | |
if (c.length) throw Error("Missing colors %1 in palette %2!".replace("%1", c.join(", ")).replace("%2", a)); | |
return b | |
} | |
function h(b, c) { | |
if (p[b]) return p[b]; | |
c = c || "default"; | |
c = "string" === typeof c ? p[c] : c; | |
var d = new m(b); | |
c && a.forEach(c.colors, | |
function(b, c) { | |
d.colors[c] = { | |
name: b.name, | |
hues: a.extend({}, b.hues) | |
} | |
}); | |
return p[b] = d | |
} | |
function m(b) { | |
function c(b) { | |
b = 0 === arguments.length ? !0 : !!b; | |
if (b !== d.isDark) { | |
d.isDark = b; | |
d.foregroundPalette = d.isDark ? t : w; | |
d.foregroundShadow = d.isDark ? "1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)" : ""; | |
var c = d.isDark ? F : E, | |
f = d.isDark ? E : F; | |
a.forEach(c, function(a, b) { | |
var c = d.colors[b]; | |
b = f[b]; | |
if (c) | |
for (var e in c.hues) c.hues[e] === b[e] && (c.hues[e] = a[e]) | |
}); | |
return d | |
} | |
} | |
var d = this; | |
d.name = b; | |
d.colors = {}; | |
d.dark = c; | |
c(!1); | |
z.forEach(function(b) { | |
var c = | |
(d.isDark ? F : E)[b]; | |
d[b + "Palette"] = function(f, e) { | |
var g = d.colors[b] = { | |
name: f, | |
hues: a.extend({}, c, e) | |
}; | |
Object.keys(g.hues).forEach(function(a) { | |
if (!c[a]) throw Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1", a).replace("%2", d.name).replace("%3", f).replace("%4", Object.keys(c).join(", "))); | |
}); | |
Object.keys(g.hues).map(function(a) { | |
return g.hues[a] | |
}).forEach(function(a) { | |
if (-1 == D.indexOf(a)) throw Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1", | |
a).replace("%2", d.name).replace("%3", b).replace("%4", f).replace("%5", D.join(", "))); | |
}); | |
return d | |
}; | |
d[b + "Color"] = function() { | |
var a = Array.prototype.slice.call(arguments); | |
console.warn("$mdThemingProviderTheme." + b + "Color() has been deprecated. Use $mdThemingProviderTheme." + b + "Palette() instead."); | |
return d[b + "Palette"].apply(d, a) | |
} | |
}) | |
} | |
function n(b, c) { | |
function d(a) { | |
return void 0 === a || "" === a ? !0 : void 0 !== e.THEMES[a] | |
} | |
function f(f, e) { | |
function g() { | |
return (l = e.controller("mdTheme") || f.data("$mdThemeController")) && | |
l.$mdTheme || ("default" == v ? "" : v) | |
} | |
function h(a) { | |
if (a) { | |
d(a) || c.warn("Attempted to use unregistered theme '" + a + "'. Register it with $mdThemingProvider.theme()."); | |
var b = f.data("$mdThemeName"); | |
b && f.removeClass("md-" + b + "-theme"); | |
f.addClass("md-" + a + "-theme"); | |
f.data("$mdThemeName", a); | |
l && f.data("$mdThemeController", l) | |
} | |
} | |
function m() { | |
var a = e.controller("mdTheme"); | |
if (!a) return !1; | |
f.on("$destroy", a.registerChanges(function() { | |
h(g()) | |
})); | |
return !0 | |
} | |
var l = e.controller("mdTheme"), | |
k = f.attr("md-theme-watch"), | |
k = (x || a.isDefined(k)) && | |
"false" != k; | |
h(g()); | |
if (x && !m() || !x && k) f.on("$destroy", b.$watch(g, h)) | |
} | |
var e = function(a, b) { | |
void 0 === b && (b = a); | |
e.inherit(b, b) | |
}; | |
e.THEMES = a.extend({}, p); | |
e.PALETTES = a.extend({}, q); | |
e.inherit = f; | |
e.registered = d; | |
e.defaultTheme = function() { | |
return v | |
}; | |
e.generateTheme = function(a) { | |
l(p[a], a, A.nonce) | |
}; | |
e.setBrowserColor = H; | |
return e | |
} | |
n.$inject = ["$rootScope", "$log"]; | |
q = {}; | |
var p = {}, | |
r, x = !1, | |
v = "default"; | |
a.extend(q, b); | |
var B = function(a) { | |
var b = c.setMeta("theme-color", a), | |
d = c.setMeta("msapplication-navbutton-color", a); | |
return function() { | |
b(); | |
d() | |
} | |
}, | |
H = function(b) { | |
b = a.isObject(b) ? b : {}; | |
var c = b.theme || "default", | |
d = b.hue || "800"; | |
b = q[b.palette] || q[p[c].colors[b.palette || "primary"].name]; | |
d = a.isObject(b[d]) ? b[d].hex : b[d]; | |
return B(d) | |
}; | |
return r = { | |
definePalette: d, | |
extendPalette: f, | |
theme: h, | |
configuration: function() { | |
return a.extend({}, A, { | |
defaultTheme: v, | |
alwaysWatchTheme: x, | |
registeredStyles: [].concat(A.registeredStyles) | |
}) | |
}, | |
disableTheming: function(b) { | |
A.disableTheming = a.isUndefined(b) || !!b | |
}, | |
registerStyles: function(a) { | |
A.registeredStyles.push(a) | |
}, | |
setNonce: function(a) { | |
A.nonce = | |
a | |
}, | |
generateThemesOnDemand: function(a) { | |
A.generateOnDemand = a | |
}, | |
setDefaultTheme: function(a) { | |
v = a | |
}, | |
alwaysWatchTheme: function(a) { | |
x = a | |
}, | |
enableBrowserColor: H, | |
$get: n, | |
_LIGHT_DEFAULT_HUES: E, | |
_DARK_DEFAULT_HUES: F, | |
_PALETTES: q, | |
_THEMES: p, | |
_parseRules: g, | |
_rgba: k | |
} | |
} | |
function d(b, c, d) { | |
return { | |
priority: 100, | |
link: { | |
pre: function(f, e, g) { | |
var h = [], | |
m = { | |
registerChanges: function(b, c) { | |
c && (b = a.bind(c, b)); | |
h.push(b); | |
return function() { | |
var a = h.indexOf(b); - 1 < a && h.splice(a, 1) | |
} | |
}, | |
$setTheme: function(a) { | |
b.registered(a) || d.warn("attempted to use unregistered theme '" + | |
a + "'"); | |
m.$mdTheme = a; | |
h.forEach(function(a) { | |
a() | |
}) | |
} | |
}; | |
e.data("$mdThemeController", m); | |
m.$setTheme(c(g.mdTheme)(f)); | |
g.$observe("mdTheme", m.$setTheme) | |
} | |
} | |
} | |
} | |
function f() { | |
A.disableTheming = !0; | |
return { | |
restrict: "A", | |
priority: "900" | |
} | |
} | |
function e(a) { | |
return a | |
} | |
function g(b, c, d) { | |
n(b, c); | |
d = d.replace(/THEME_NAME/g, b.name); | |
var f = [], | |
e = b.colors[c], | |
g = new RegExp("\\.md-" + b.name + "-theme", "g"), | |
h = new RegExp("('|\")?{{\\s*(" + c + ")-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?", "g"); | |
c = /'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue\-[0-3]|shadow|default)-?(\d\.?\d*)?(contrast)?\s*\}\}'?"?/g; | |
var m = q[e.name]; | |
d = d.replace(c, function(a, c, d, f, e) { | |
if ("foreground" === c) return "shadow" == d ? b.foregroundShadow : b.foregroundPalette[d] || b.foregroundPalette["1"]; | |
if (0 === d.indexOf("hue") || "default" === d) d = b.colors[c].hues[d]; | |
return k((q[b.colors[c].name][d] || "")[e ? "contrast" : "value"], f) | |
}); | |
a.forEach(e.hues, function(a, c) { | |
var e = d.replace(h, function(b, c, d, f, e) { | |
return k(m[a]["color" === f ? "value" : "contrast"], e) | |
}); | |
"default" !== c && (e = e.replace(g, ".md-" + b.name + "-theme.md-" + c)); | |
"default" == b.name && (c = /((?:(?:(?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)+) )?)((?:(?:\w|\.|-)+)?)\.md-default-theme((?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g, | |
e = e.replace(c, function(a, b, c, d) { | |
return a + ", " + b + c + d | |
})); | |
f.push(e) | |
}); | |
return f | |
} | |
function h(b, c) { | |
function d(b) { | |
var c = b.contrastDefaultColor, | |
d = b.contrastLightColors || [], | |
f = b.contrastStrongLightColors || [], | |
e = b.contrastDarkColors || []; | |
"string" === typeof d && (d = d.split(" ")); | |
"string" === typeof f && (f = f.split(" ")); | |
"string" === typeof e && (e = e.split(" ")); | |
delete b.contrastDefaultColor; | |
delete b.contrastLightColors; | |
delete b.contrastStrongLightColors; | |
delete b.contrastDarkColors; | |
a.forEach(b, function(g, h) { | |
if (!a.isObject(g)) { | |
var m = | |
p(g); | |
if (!m) throw Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1", g).replace("%2", b.name).replace("%3", h)); | |
b[h] = { | |
hex: b[h], | |
value: m, | |
contrast: "light" === c ? -1 < e.indexOf(h) ? x : -1 < f.indexOf(h) ? v : r : -1 < d.indexOf(h) ? -1 < f.indexOf(h) ? v : r : x | |
} | |
} | |
}) | |
} | |
var f = document.head, | |
f = f ? f.firstElementChild : null; | |
b = !A.disableTheming && b.has("$MD_THEME_CSS") ? b.get("$MD_THEME_CSS") : ""; | |
b += A.registeredStyles.join(""); | |
if (f && 0 !== b.length) { | |
a.forEach(q, d); | |
b = b.split(/\}(?!(\}|'|"|;))/).filter(function(a) { | |
return a && | |
a.trim().length | |
}).map(function(a) { | |
return a.trim() + "}" | |
}); | |
var e = new RegExp("md-(" + z.join("|") + ")", "g"); | |
z.forEach(function(a) { | |
B[a] = "" | |
}); | |
b.forEach(function(a) { | |
a.match(e); | |
for (var b = 0, c; c = z[b]; b++) | |
if (-1 < a.indexOf(".md-" + c)) return B[c] += a; | |
for (b = 0; c = z[b]; b++) | |
if (-1 < a.indexOf(c)) return B[c] += a; | |
return B.primary += a | |
}); | |
A.generateOnDemand || a.forEach(c.THEMES, function(a) { | |
m[a.name] || "default" !== c.defaultTheme() && "default" === a.name || l(a, a.name, A.nonce) | |
}) | |
} | |
} | |
function l(a, b, c) { | |
var d = document.head, | |
f = d ? d.firstElementChild : | |
null; | |
m[b] || (z.forEach(function(b) { | |
for (b = g(a, b, B[b]); b.length;) { | |
var e = b.shift(); | |
if (e) { | |
var h = document.createElement("style"); | |
h.setAttribute("md-theme-style", ""); | |
c && h.setAttribute("nonce", c); | |
h.appendChild(document.createTextNode(e)); | |
d.insertBefore(h, f) | |
} | |
} | |
}), m[a.name] = !0) | |
} | |
function n(a, b) { | |
if (!q[(a.colors[b] || {}).name]) throw Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1", a.name).replace("%2", b).replace("%3", Object.keys(q).join(", "))); | |
} | |
function p(b) { | |
if (a.isArray(b) && | |
3 == b.length) return b; | |
if (/^rgb/.test(b)) return b.replace(/(^\s*rgba?\(|\)\s*$)/g, "").split(",").map(function(a, b) { | |
return 3 == b ? parseFloat(a, 10) : parseInt(a, 10) | |
}); | |
"#" == b.charAt(0) && (b = b.substring(1)); | |
if (/^([a-fA-F0-9]{3}){1,2}$/g.test(b)) { | |
var c = b.length / 3, | |
d = b.substr(0, c), | |
f = b.substr(c, c); | |
b = b.substr(2 * c); | |
1 === c && (d += d, f += f, b += b); | |
return [parseInt(d, 16), parseInt(f, 16), parseInt(b, 16)] | |
} | |
} | |
function k(b, c) { | |
if (!b) return "rgb('0,0,0')"; | |
4 == b.length && (b = a.copy(b), c ? b.pop() : c = b.pop()); | |
return c && ("number" == typeof c || "string" == | |
typeof c && c.length) ? "rgba(" + b.join(",") + "," + c + ")" : "rgb(" + b.join(",") + ")" | |
} | |
b.$inject = ["$mdThemingProvider"]; | |
d.$inject = ["$mdTheming", "$interpolate", "$log"]; | |
e.$inject = ["$mdTheming"]; | |
c.$inject = ["$mdColorPalette", "$$mdMetaProvider"]; | |
h.$inject = ["$injector", "$mdTheming"]; | |
a.module("material.core.theming", ["material.core.theming.palette", "material.core.meta"]).directive("mdTheme", d).directive("mdThemable", e).directive("mdThemesDisabled", f).provider("$mdTheming", c).config(b).run(h); | |
var m = {}, | |
q, w = { | |
name: "dark", | |
1: "rgba(0,0,0,0.87)", | |
2: "rgba(0,0,0,0.54)", | |
3: "rgba(0,0,0,0.38)", | |
4: "rgba(0,0,0,0.12)" | |
}, | |
t = { | |
name: "light", | |
1: "rgba(255,255,255,1.0)", | |
2: "rgba(255,255,255,0.7)", | |
3: "rgba(255,255,255,0.5)", | |
4: "rgba(255,255,255,0.12)" | |
}, | |
x = p("rgba(0,0,0,0.87)"), | |
r = p("rgba(255,255,255,0.87)"), | |
v = p("rgb(255,255,255)"), | |
z = ["primary", "accent", "warn", "background"], | |
E = { | |
accent: { | |
"default": "A200", | |
"hue-1": "A100", | |
"hue-2": "A400", | |
"hue-3": "A700" | |
}, | |
background: { | |
"default": "50", | |
"hue-1": "A100", | |
"hue-2": "100", | |
"hue-3": "300" | |
} | |
}, | |
F = { | |
background: { | |
"default": "A400", | |
"hue-1": "800", | |
"hue-2": "900", | |
"hue-3": "A200" | |
} | |
}; | |
z.forEach(function(a) { | |
var b = { | |
"default": "500", | |
"hue-1": "300", | |
"hue-2": "800", | |
"hue-3": "A100" | |
}; | |
E[a] || (E[a] = b); | |
F[a] || (F[a] = b) | |
}); | |
var D = "50 100 200 300 400 500 600 700 800 900 A100 A200 A400 A700".split(" "), | |
A = { | |
disableTheming: !1, | |
generateOnDemand: !1, | |
registeredStyles: [], | |
nonce: null | |
}, | |
B = {} | |
})(window.angular); | |
angular.module("material.core").factory("$$mdAnimate", ["$q", "$timeout", "$mdConstant", "$animateCss", function(a, b, c, d) { | |
return function(f) { | |
return AnimateDomUtils(f, a, b, c, d) | |
} | |
}]); | |
function AnimateDomUtils(a, b, c, d, f) { | |
var e; | |
return e = { | |
translate3d: function(a, b, c, d) { | |
function e(c) { | |
return f(a, { | |
to: c || b, | |
addClass: d.transitionOutClass, | |
removeClass: d.transitionInClass | |
}).start() | |
} | |
return f(a, { | |
from: b, | |
to: c, | |
addClass: d.transitionInClass, | |
removeClass: d.transitionOutClass | |
}).start().then(function() { | |
return e | |
}) | |
}, | |
waitTransitionEnd: function(a, f) { | |
var e = 3E3; | |
return b(function(b) { | |
function g(f) { | |
f && f.target !== a[0] || (f && c.cancel(m), a.off(d.CSS.TRANSITIONEND, g), b()) | |
} | |
function h(b) { | |
b = b || window.getComputedStyle(a[0]); | |
return "0s" == b.transitionDuration || !b.transition && !b.transitionProperty | |
} | |
f = f || {}; | |
h(f.cachedTransitionStyles) && (e = 0); | |
var m = c(g, f.timeout || e); | |
a.on(d.CSS.TRANSITIONEND, g) | |
}) | |
}, | |
calculateTransformValues: function(a, b) { | |
var c = b.element; | |
b = b.bounds; | |
if (c || b) { | |
c ? (c = e.clientRect(c)) || (c = (c = (c = a ? a.parent() : null) ? c.parent() : null) ? e.clientRect(c) : null) : c = e.copyRect(b); | |
a = e.copyRect(a[0].getBoundingClientRect()); | |
b = e.centerPointFor(a); | |
var d = e.centerPointFor(c); | |
return { | |
centerX: d.x - b.x, | |
centerY: d.y - b.y, | |
scaleX: Math.round(100 * | |
Math.min(.5, c.width / a.width)) / 100, | |
scaleY: Math.round(100 * Math.min(.5, c.height / a.height)) / 100 | |
} | |
} | |
return { | |
centerX: 0, | |
centerY: 0, | |
scaleX: .5, | |
scaleY: .5 | |
} | |
}, | |
calculateZoomToOrigin: function(b, c) { | |
var d = angular.bind(null, a.supplant, "translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )"); | |
return d(e.calculateTransformValues(b, c)) | |
}, | |
calculateSlideToOrigin: function(b, c) { | |
var d = angular.bind(null, a.supplant, "translate3d( {centerX}px, {centerY}px, 0 )"); | |
return d(e.calculateTransformValues(b, c)) | |
}, | |
toCss: function(a) { | |
function b(a, | |
b, d) { | |
angular.forEach(b.split(" "), function(a) { | |
c[a] = d | |
}) | |
} | |
var c = {}; | |
angular.forEach(a, function(a, f) { | |
if (!angular.isUndefined(a)) | |
if (0 <= "left top right bottom width height x y min-width min-height max-width max-height".indexOf(f)) c[f] = a + "px"; | |
else switch (f) { | |
case "transition": | |
b(f, d.CSS.TRANSITION, a); | |
break; | |
case "transform": | |
b(f, d.CSS.TRANSFORM, a); | |
break; | |
case "transformOrigin": | |
b(f, d.CSS.TRANSFORM_ORIGIN, a); | |
break; | |
case "font-size": | |
c["font-size"] = a | |
} | |
}); | |
return c | |
}, | |
toTransformCss: function(a, b, c) { | |
var f = {}; | |
angular.forEach(d.CSS.TRANSFORM.split(" "), | |
function(b) { | |
f[b] = a | |
}); | |
b && (c = c || "all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important", f.transition = c); | |
return f | |
}, | |
copyRect: function(a, b) { | |
if (!a) return null; | |
b = b || {}; | |
angular.forEach("left top right bottom width height".split(" "), function(c) { | |
b[c] = Math.round(a[c]) | |
}); | |
b.width = b.width || b.right - b.left; | |
b.height = b.height || b.bottom - b.top; | |
return b | |
}, | |
clientRect: function(a) { | |
return (a = angular.element(a)[0].getBoundingClientRect()) && 0 < a.width && 0 < a.height ? e.copyRect(a) : null | |
}, | |
centerPointFor: function(a) { | |
return a ? { | |
x: Math.round(a.left + | |
a.width / 2), | |
y: Math.round(a.top + a.height / 2) | |
} : { | |
x: 0, | |
y: 0 | |
} | |
} | |
} | |
} | |
"use strict"; | |
4 <= angular.version.minor ? angular.module("material.core.animate", []) : function() { | |
function a(a) { | |
return a.replace(/-[a-z]/g, function(a) { | |
return a.charAt(1).toUpperCase() | |
}) | |
} | |
var b = angular.forEach, | |
c = angular.isDefined(document.documentElement.style.WebkitAppearance), | |
d = c ? "-webkit-" : "", | |
f = (c ? "webkitTransitionEnd " : "") + "transitionend", | |
e = (c ? "webkitAnimationEnd " : "") + "animationend", | |
g = ["$document", function(a) { | |
return function() { | |
return a[0].body.clientWidth + 1 | |
} | |
}], | |
h = ["$$rAF", function(a) { | |
return function() { | |
var b = !1; | |
a(function() { | |
b = !0 | |
}); | |
return function(c) { | |
b ? c() : a(c) | |
} | |
} | |
}], | |
l = ["$q", "$$rAFMutex", function(a, c) { | |
function d(a) { | |
this.setHost(a); | |
this._doneCallbacks = []; | |
this._runInAnimationFrame = c(); | |
this._state = 0 | |
} | |
d.prototype = { | |
setHost: function(a) { | |
this.host = a || {} | |
}, | |
done: function(a) { | |
2 === this._state ? a() : this._doneCallbacks.push(a) | |
}, | |
progress: angular.noop, | |
getPromise: function() { | |
if (!this.promise) { | |
var b = this; | |
this.promise = a(function(a, c) { | |
b.done(function(b) { | |
!1 === b ? c() : a() | |
}) | |
}) | |
} | |
return this.promise | |
}, | |
then: function(a, b) { | |
return this.getPromise().then(a, b) | |
}, | |
"catch": function(a) { | |
return this.getPromise()["catch"](a) | |
}, | |
"finally": function(a) { | |
return this.getPromise()["finally"](a) | |
}, | |
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(a) { | |
var b = this; | |
0 === b._state && (b._state = 1, b._runInAnimationFrame(function() { | |
b._resolve(a) | |
})) | |
}, | |
_resolve: function(a) { | |
2 !== | |
this._state && (b(this._doneCallbacks, function(b) { | |
b(a) | |
}), this._doneCallbacks.length = 0, this._state = 2) | |
} | |
}; | |
d.all = function(a, c) { | |
function d(b) { | |
e = e && b; | |
++f === a.length && c(e) | |
} | |
var f = 0, | |
e = !0; | |
b(a, function(a) { | |
a.done(d) | |
}) | |
}; | |
return d | |
}]; | |
angular.module("material.core.animate", []).factory("$$forceReflow", g).factory("$$AnimateRunner", l).factory("$$rAFMutex", h).factory("$animateCss", ["$window", "$$rAF", "$$AnimateRunner", "$$forceReflow", "$$jqLite", "$timeout", "$animate", function(g, h, k, m, l, w, t) { | |
function q(c, h) { | |
var m = [], | |
l = B(c), | |
q = l && t.enabled(), | |
r = !1, | |
x = !1; | |
q && (h.transitionStyle && m.push([d + "transition", h.transitionStyle]), h.keyframeStyle && m.push([d + "animation", h.keyframeStyle]), h.delay && m.push([d + "transition-delay", h.delay + "s"]), h.duration && m.push([d + "transition-duration", h.duration + "s"]), r = h.keyframeStyle || h.to && (0 < h.duration || h.transitionStyle), x = !!h.addClass || !!h.removeClass, L(c, !0)); | |
var v = q && (r || x); | |
D(c, h); | |
var P = !1, | |
C, z; | |
return { | |
close: g.close, | |
start: function() { | |
function g() { | |
if (!P) return P = !0, C && z && c.off(C, z), n(c, h), F(c, h), b(m, | |
function(b) { | |
l.style[a(b[0])] = "" | |
}), q.complete(!0), q | |
} | |
var q = new k; | |
E(function() { | |
L(c, !1); | |
if (!v) return g(); | |
b(m, function(b) { | |
var c = b[0]; | |
b = b[1]; | |
l.style[a(c)] = b | |
}); | |
n(c, h); | |
var k = p(c); | |
if (0 === k.duration) return g(); | |
var q = []; | |
h.easing && (k.transitionDuration && q.push([d + "transition-timing-function", h.easing]), k.animationDuration && q.push([d + "animation-timing-function", h.easing])); | |
h.delay && k.animationDelay && q.push([d + "animation-delay", h.delay + "s"]); | |
h.duration && k.animationDuration && q.push([d + "animation-duration", h.duration + | |
"s" | |
]); | |
b(q, function(b) { | |
var c = b[0], | |
d = b[1]; | |
l.style[a(c)] = d; | |
m.push(b) | |
}); | |
var q = k.delay, | |
t = 1E3 * q, | |
r = k.duration, | |
q = 1E3 * r, | |
x = Date.now(); | |
C = []; | |
k.transitionDuration && C.push(f); | |
k.animationDuration && C.push(e); | |
C = C.join(" "); | |
z = function(a) { | |
a.stopPropagation(); | |
var b = a.originalEvent || a; | |
a = b.timeStamp || Date.now(); | |
b = parseFloat(b.elapsedTime.toFixed(3)); | |
Math.max(a - x, 0) >= t && b >= r && g() | |
}; | |
c.on(C, z); | |
A(c, h); | |
w(g, t + 1.5 * q, !1) | |
}); | |
return q | |
} | |
} | |
} | |
function n(a, b) { | |
b.addClass && (l.addClass(a, b.addClass), b.addClass = null); | |
b.removeClass && (l.removeClass(a, | |
b.removeClass), b.removeClass = null) | |
} | |
function p(a) { | |
function b(a) { | |
return c ? "Webkit" + a.charAt(0).toUpperCase() + a.substr(1) : a | |
} | |
a = B(a); | |
var d = g.getComputedStyle(a); | |
a = z(d[b("transitionDuration")]); | |
var f = z(d[b("animationDuration")]), | |
e = z(d[b("transitionDelay")]), | |
h = z(d[b("animationDelay")]), | |
f = f * (parseInt(d[b("animationIterationCount")], 10) || 1), | |
d = Math.max(f, a), | |
m = Math.max(h, e); | |
return { | |
duration: d, | |
delay: m, | |
animationDuration: f, | |
transitionDuration: a, | |
animationDelay: h, | |
transitionDelay: e | |
} | |
} | |
function z(a) { | |
var c = 0; | |
a = (a || "").split(/\s*,\s*/); | |
b(a, function(a) { | |
"s" == a.charAt(a.length - 1) && (a = a.substring(0, a.length - 1)); | |
a = parseFloat(a) || 0; | |
c = c ? Math.max(a, c) : a | |
}); | |
return c | |
} | |
function E(a) { | |
H && H(); | |
I.push(a); | |
H = h(function() { | |
H = null; | |
for (var a = m(), b = 0; b < I.length; b++) I[b](a); | |
I.length = 0 | |
}) | |
} | |
function F(a, b) { | |
D(a, b); | |
A(a, b) | |
} | |
function D(a, b) { | |
b.from && (a.css(b.from), b.from = null) | |
} | |
function A(a, b) { | |
b.to && (a.css(b.to), b.to = null) | |
} | |
function B(a) { | |
for (var b = 0; b < a.length; b++) | |
if (1 === a[b].nodeType) return a[b] | |
} | |
function L(b, c) { | |
b = B(b); | |
var f = a(d + "transition-delay"); | |
b.style[f] = c ? "-9999s" : | |
"" | |
} | |
var H, I = []; | |
return q | |
}]) | |
}(); | |
angular.module("material.core").constant("$MD_THEME_CSS", "/* Only used with Theme processes */html.md-THEME_NAME-theme, body.md-THEME_NAME-theme { color: '{{foreground-1}}'; background-color: '{{background-color}}'; }md-autocomplete.md-THEME_NAME-theme { background: '{{background-A100}}'; } md-autocomplete.md-THEME_NAME-theme[disabled]:not([md-floating-label]) { background: '{{background-100}}'; } md-autocomplete.md-THEME_NAME-theme button md-icon path { fill: '{{background-600}}'; } md-autocomplete.md-THEME_NAME-theme button:after { background: '{{background-600-0.3}}'; }.md-autocomplete-suggestions-container.md-THEME_NAME-theme { background: '{{background-A100}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li { color: '{{background-900}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li .highlight { color: '{{background-600}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li:hover, .md-autocomplete-suggestions-container.md-THEME_NAME-theme li.selected { background: '{{background-200}}'; }md-backdrop { background-color: '{{background-900-0.0}}'; } md-backdrop.md-opaque.md-THEME_NAME-theme { background-color: '{{background-900-1.0}}'; }.md-button.md-THEME_NAME-theme:not([disabled]):hover { background-color: '{{background-500-0.2}}'; }.md-button.md-THEME_NAME-theme:not([disabled]).md-focused { background-color: '{{background-500-0.2}}'; }.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover { background-color: transparent; }.md-button.md-THEME_NAME-theme.md-fab { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } .md-button.md-THEME_NAME-theme.md-fab md-icon { color: '{{accent-contrast}}'; } .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover { background-color: '{{accent-A700}}'; } .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; }.md-button.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } .md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab { color: '{{primary-contrast}}'; background-color: '{{primary-color}}'; } .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon { color: '{{primary-contrast}}'; } .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover { background-color: '{{primary-600}}'; } .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused { background-color: '{{primary-600}}'; } .md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon { color: '{{primary-color}}'; }.md-button.md-THEME_NAME-theme.md-fab { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } .md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon { color: '{{accent-contrast}}'; } .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover { background-color: '{{accent-A700}}'; } .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; }.md-button.md-THEME_NAME-theme.md-raised { color: '{{background-900}}'; background-color: '{{background-50}}'; } .md-button.md-THEME_NAME-theme.md-raised:not([disabled]) md-icon { color: '{{background-900}}'; } .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover { background-color: '{{background-50}}'; } .md-button.md-THEME_NAME-theme.md-raised:not([disabled]).md-focused { background-color: '{{background-200}}'; }.md-button.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; } .md-button.md-THEME_NAME-theme.md-warn.md-raised, .md-button.md-THEME_NAME-theme.md-warn.md-fab { color: '{{warn-contrast}}'; background-color: '{{warn-color}}'; } .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]) md-icon { color: '{{warn-contrast}}'; } .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover { background-color: '{{warn-600}}'; } .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]).md-focused { background-color: '{{warn-600}}'; } .md-button.md-THEME_NAME-theme.md-warn:not([disabled]) md-icon { color: '{{warn-color}}'; }.md-button.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } .md-button.md-THEME_NAME-theme.md-accent.md-raised, .md-button.md-THEME_NAME-theme.md-accent.md-fab { color: '{{accent-contrast}}'; background-color: '{{accent-color}}'; } .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]) md-icon { color: '{{accent-contrast}}'; } .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover { background-color: '{{accent-A700}}'; } .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; } .md-button.md-THEME_NAME-theme.md-accent:not([disabled]) md-icon { color: '{{accent-color}}'; }.md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled], .md-button.md-THEME_NAME-theme.md-accent[disabled], .md-button.md-THEME_NAME-theme.md-warn[disabled] { color: '{{foreground-3}}'; cursor: default; } .md-button.md-THEME_NAME-theme[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-raised[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-fab[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-accent[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-warn[disabled] md-icon { color: '{{foreground-3}}'; }.md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled] { background-color: '{{foreground-4}}'; }.md-button.md-THEME_NAME-theme[disabled] { background-color: transparent; }._md a.md-THEME_NAME-theme:not(.md-button).md-primary { color: '{{primary-color}}'; } ._md a.md-THEME_NAME-theme:not(.md-button).md-primary:hover { color: '{{primary-700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-accent { color: '{{accent-color}}'; } ._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover { color: '{{accent-700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-accent { color: '{{accent-color}}'; } ._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover { color: '{{accent-A700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-warn { color: '{{warn-color}}'; } ._md a.md-THEME_NAME-theme:not(.md-button).md-warn:hover { color: '{{warn-700}}'; }md-card.md-THEME_NAME-theme { color: '{{foreground-1}}'; background-color: '{{background-hue-1}}'; border-radius: 2px; } md-card.md-THEME_NAME-theme .md-card-image { border-radius: 2px 2px 0 0; } md-card.md-THEME_NAME-theme md-card-header md-card-avatar md-icon { color: '{{background-color}}'; background-color: '{{foreground-3}}'; } md-card.md-THEME_NAME-theme md-card-header md-card-header-text .md-subhead { color: '{{foreground-2}}'; } md-card.md-THEME_NAME-theme md-card-title md-card-title-text:not(:only-child) .md-subhead { color: '{{foreground-2}}'; }md-bottom-sheet.md-THEME_NAME-theme { background-color: '{{background-50}}'; border-top-color: '{{background-300}}'; } md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item { color: '{{foreground-1}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { background-color: '{{background-50}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { color: '{{foreground-1}}'; }md-checkbox.md-THEME_NAME-theme .md-ripple { color: '{{accent-A700}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple { color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme.md-checked.md-focused .md-container:before { background-color: '{{accent-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme .md-ink-ripple { color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ink-ripple { color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not(.md-checked) .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon { background-color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after { border-color: '{{accent-contrast-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple { color: '{{primary-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple { color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ink-ripple { color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple { color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary:not(.md-checked) .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon { background-color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked.md-focused .md-container:before { background-color: '{{primary-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after { border-color: '{{primary-contrast-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-indeterminate[disabled] .md-container { color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple { color: '{{warn-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ink-ripple { color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple { color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn:not(.md-checked) .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon { background-color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked.md-focused:not([disabled]) .md-container:before { background-color: '{{warn-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled]:not(.md-checked) .md-icon { border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon { background-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-icon:after { border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-label { color: '{{foreground-3}}'; }md-chips.md-THEME_NAME-theme .md-chips { box-shadow: 0 1px '{{foreground-4}}'; } md-chips.md-THEME_NAME-theme .md-chips.md-focused { box-shadow: 0 2px '{{primary-color}}'; } md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input { color: '{{foreground-1}}'; } md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder { color: '{{foreground-3}}'; } md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-moz-placeholder { color: '{{foreground-3}}'; } md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-moz-placeholder { color: '{{foreground-3}}'; } md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-ms-input-placeholder { color: '{{foreground-3}}'; } md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder { color: '{{foreground-3}}'; }md-chips.md-THEME_NAME-theme md-chip { background: '{{background-300}}'; color: '{{background-800}}'; } md-chips.md-THEME_NAME-theme md-chip md-icon { color: '{{background-700}}'; } md-chips.md-THEME_NAME-theme md-chip.md-focused { background: '{{primary-color}}'; color: '{{primary-contrast}}'; } md-chips.md-THEME_NAME-theme md-chip.md-focused md-icon { color: '{{primary-contrast}}'; } md-chips.md-THEME_NAME-theme md-chip._md-chip-editing { background: transparent; color: '{{background-800}}'; }md-chips.md-THEME_NAME-theme md-chip-remove .md-button md-icon path { fill: '{{background-500}}'; }.md-contact-suggestion span.md-contact-email { color: '{{background-400}}'; }md-content.md-THEME_NAME-theme { color: '{{foreground-1}}'; background-color: '{{background-default}}'; }/** Theme styles for mdCalendar. */.md-calendar.md-THEME_NAME-theme { background: '{{background-A100}}'; color: '{{background-A200-0.87}}'; } .md-calendar.md-THEME_NAME-theme tr:last-child td { border-bottom-color: '{{background-200}}'; }.md-THEME_NAME-theme .md-calendar-day-header { background: '{{background-300}}'; color: '{{background-A200-0.87}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today .md-calendar-date-selection-indicator { border: 1px solid '{{primary-500}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today.md-calendar-date-disabled { color: '{{primary-500-0.6}}'; }.md-calendar-date.md-focus .md-THEME_NAME-theme .md-calendar-date-selection-indicator, .md-THEME_NAME-theme .md-calendar-date-selection-indicator:hover { background: '{{background-300}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-selected-date .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date.md-focus.md-calendar-selected-date .md-calendar-date-selection-indicator { background: '{{primary-500}}'; color: '{{primary-500-contrast}}'; border-color: transparent; }.md-THEME_NAME-theme .md-calendar-date-disabled,.md-THEME_NAME-theme .md-calendar-month-label-disabled { color: '{{background-A200-0.435}}'; }/** Theme styles for mdDatepicker. */.md-THEME_NAME-theme .md-datepicker-input { color: '{{foreground-1}}'; } .md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder { color: '{{foreground-3}}'; } .md-THEME_NAME-theme .md-datepicker-input:-moz-placeholder { color: '{{foreground-3}}'; } .md-THEME_NAME-theme .md-datepicker-input::-moz-placeholder { color: '{{foreground-3}}'; } .md-THEME_NAME-theme .md-datepicker-input:-ms-input-placeholder { color: '{{foreground-3}}'; } .md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder { color: '{{foreground-3}}'; }.md-THEME_NAME-theme .md-datepicker-input-container { border-bottom-color: '{{foreground-4}}'; } .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused { border-bottom-color: '{{primary-color}}'; } .md-accent .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused { border-bottom-color: '{{accent-color}}'; } .md-warn .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused { border-bottom-color: '{{warn-A700}}'; } .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-invalid { border-bottom-color: '{{warn-A700}}'; }.md-THEME_NAME-theme .md-datepicker-calendar-pane { border-color: '{{background-hue-1}}'; }.md-THEME_NAME-theme .md-datepicker-triangle-button .md-datepicker-expand-triangle { border-top-color: '{{foreground-3}}'; }.md-THEME_NAME-theme .md-datepicker-triangle-button:hover .md-datepicker-expand-triangle { border-top-color: '{{foreground-2}}'; }.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon { color: '{{primary-color}}'; }.md-THEME_NAME-theme .md-datepicker-open.md-accent .md-datepicker-calendar-icon, .md-accent .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon { color: '{{accent-color}}'; }.md-THEME_NAME-theme .md-datepicker-open.md-warn .md-datepicker-calendar-icon, .md-warn .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon { color: '{{warn-A700}}'; }.md-THEME_NAME-theme .md-datepicker-calendar { background: '{{background-A100}}'; }.md-THEME_NAME-theme .md-datepicker-input-mask-opaque { box-shadow: 0 0 0 9999px \"{{background-hue-1}}\"; }.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-input-container { background: \"{{background-hue-1}}\"; }md-dialog.md-THEME_NAME-theme { border-radius: 4px; background-color: '{{background-hue-1}}'; color: '{{foreground-1}}'; } md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions, md-dialog.md-THEME_NAME-theme.md-content-overflow md-dialog-actions { border-top-color: '{{foreground-4}}'; }md-divider.md-THEME_NAME-theme { border-top-color: '{{foreground-4}}'; }.layout-row > md-divider.md-THEME_NAME-theme,.layout-xs-row > md-divider.md-THEME_NAME-theme, .layout-gt-xs-row > md-divider.md-THEME_NAME-theme,.layout-sm-row > md-divider.md-THEME_NAME-theme, .layout-gt-sm-row > md-divider.md-THEME_NAME-theme,.layout-md-row > md-divider.md-THEME_NAME-theme, .layout-gt-md-row > md-divider.md-THEME_NAME-theme,.layout-lg-row > md-divider.md-THEME_NAME-theme, .layout-gt-lg-row > md-divider.md-THEME_NAME-theme,.layout-xl-row > md-divider.md-THEME_NAME-theme { border-right-color: '{{foreground-4}}'; }md-icon.md-THEME_NAME-theme { color: '{{foreground-2}}'; } md-icon.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } md-icon.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } md-icon.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; }md-input-container.md-THEME_NAME-theme .md-input { color: '{{foreground-1}}'; border-color: '{{foreground-4}}'; } md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder { color: '{{foreground-3}}'; } md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder { color: '{{foreground-3}}'; } md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder { color: '{{foreground-3}}'; } md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder { color: '{{foreground-3}}'; } md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder { color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme > md-icon { color: '{{foreground-1}}'; }md-input-container.md-THEME_NAME-theme label,md-input-container.md-THEME_NAME-theme .md-placeholder { color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme label.md-required:after { color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-focused):not(.md-input-invalid) label.md-required:after { color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme .md-input-messages-animation, md-input-container.md-THEME_NAME-theme .md-input-message-animation { color: '{{warn-A700}}'; } md-input-container.md-THEME_NAME-theme .md-input-messages-animation .md-char-counter, md-input-container.md-THEME_NAME-theme .md-input-message-animation .md-char-counter { color: '{{foreground-1}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label { color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input, md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-resized .md-input { border-color: '{{primary-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused md-icon { color: '{{primary-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input { border-color: '{{accent-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent md-icon { color: '{{accent-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input { border-color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn md-icon { color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input { border-color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid label,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input-message-animation,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter { color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme .md-input[disabled],[disabled] md-input-container.md-THEME_NAME-theme .md-input { border-bottom-color: transparent; color: '{{foreground-3}}'; background-image: linear-gradient(to right, \"{{foreground-3}}\" 0%, \"{{foreground-3}}\" 33%, transparent 0%); background-image: -ms-linear-gradient(left, transparent 0%, \"{{foreground-3}}\" 100%); }md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h3, md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h4,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h4 { color: '{{foreground-1}}'; }md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text p,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text p { color: '{{foreground-2}}'; }md-list.md-THEME_NAME-theme .md-proxy-focus.md-focused div.md-no-style { background-color: '{{background-100}}'; }md-list.md-THEME_NAME-theme md-list-item .md-avatar-icon { background-color: '{{foreground-3}}'; color: '{{background-color}}'; }md-list.md-THEME_NAME-theme md-list-item > md-icon { color: '{{foreground-2}}'; } md-list.md-THEME_NAME-theme md-list-item > md-icon.md-highlight { color: '{{primary-color}}'; } md-list.md-THEME_NAME-theme md-list-item > md-icon.md-highlight.md-accent { color: '{{accent-color}}'; }md-menu-content.md-THEME_NAME-theme { background-color: '{{background-A100}}'; } md-menu-content.md-THEME_NAME-theme md-menu-item { color: '{{background-A200-0.87}}'; } md-menu-content.md-THEME_NAME-theme md-menu-item md-icon { color: '{{background-A200-0.54}}'; } md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] { color: '{{background-A200-0.25}}'; } md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] md-icon { color: '{{background-A200-0.25}}'; } md-menu-content.md-THEME_NAME-theme md-menu-divider { background-color: '{{background-A200-0.11}}'; }md-menu-bar.md-THEME_NAME-theme > button.md-button { color: '{{foreground-2}}'; border-radius: 2px; }md-menu-bar.md-THEME_NAME-theme md-menu.md-open > button, md-menu-bar.md-THEME_NAME-theme md-menu > button:focus { outline: none; background: '{{background-200}}'; }md-menu-bar.md-THEME_NAME-theme.md-open:not(.md-keyboard-mode) md-menu:hover > button { background-color: '{{ background-500-0.2}}'; }md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:hover,md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:focus { background: transparent; }md-menu-content.md-THEME_NAME-theme .md-menu > .md-button:after { color: '{{background-A200-0.54}}'; }md-menu-content.md-THEME_NAME-theme .md-menu.md-open > .md-button { background-color: '{{ background-500-0.2}}'; }md-toolbar.md-THEME_NAME-theme.md-menu-toolbar { background-color: '{{background-A100}}'; color: '{{background-A200}}'; } md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler { background-color: '{{primary-color}}'; color: '{{background-A100-0.87}}'; } md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler md-icon { color: '{{background-A100-0.87}}'; }md-nav-bar.md-THEME_NAME-theme .md-nav-bar { background-color: transparent; border-color: '{{foreground-4}}'; }md-nav-bar.md-THEME_NAME-theme .md-button._md-nav-button.md-unselected { color: '{{foreground-2}}'; }md-nav-bar.md-THEME_NAME-theme md-nav-ink-bar { color: '{{accent-color}}'; background: '{{accent-color}}'; }.md-panel { background-color: '{{background-900-0.0}}'; } .md-panel._md-panel-backdrop.md-THEME_NAME-theme { background-color: '{{background-900-1.0}}'; }md-progress-circular.md-THEME_NAME-theme path { stroke: '{{primary-color}}'; }md-progress-circular.md-THEME_NAME-theme.md-warn path { stroke: '{{warn-color}}'; }md-progress-circular.md-THEME_NAME-theme.md-accent path { stroke: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme .md-container { background-color: '{{primary-100}}'; }md-progress-linear.md-THEME_NAME-theme .md-bar { background-color: '{{primary-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-container { background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar { background-color: '{{warn-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-container { background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar { background-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1 { background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before { background: radial-gradient(\"{{warn-100}}\" 0%, \"{{warn-100}}\" 16%, transparent 42%); }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1 { background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before { background: radial-gradient(\"{{accent-100}}\" 0%, \"{{accent-100}}\" 16%, transparent 42%); }md-radio-button.md-THEME_NAME-theme .md-off { border-color: '{{foreground-2}}'; }md-radio-button.md-THEME_NAME-theme .md-on { background-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-off { border-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple { color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme .md-container .md-ripple { color: '{{accent-A700}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on { background-color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off { border-color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple { color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple { color: '{{primary-600}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on { background-color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off { border-color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple { color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple { color: '{{warn-600}}'; }md-radio-group.md-THEME_NAME-theme[disabled],md-radio-button.md-THEME_NAME-theme[disabled] { color: '{{foreground-3}}'; } md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-off, md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off { border-color: '{{foreground-3}}'; } md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-on, md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on { border-color: '{{foreground-3}}'; }md-radio-group.md-THEME_NAME-theme .md-checked .md-ink-ripple { color: '{{accent-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-primary .md-checked:not([disabled]) .md-ink-ripple, md-radio-group.md-THEME_NAME-theme .md-checked:not([disabled]).md-primary .md-ink-ripple { color: '{{primary-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme .md-checked.md-primary .md-ink-ripple { color: '{{warn-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked .md-container:before { background-color: '{{accent-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-primary .md-checked .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-primary .md-container:before { background-color: '{{primary-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-warn .md-checked .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-warn .md-container:before { background-color: '{{warn-color-0.26}}'; }md-input-container md-select.md-THEME_NAME-theme .md-select-value span:first-child:after { color: '{{warn-A700}}'; }md-input-container:not(.md-input-focused):not(.md-input-invalid) md-select.md-THEME_NAME-theme .md-select-value span:first-child:after { color: '{{foreground-3}}'; }md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value { color: '{{primary-color}}'; } md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder { color: '{{primary-color}}'; }md-input-container.md-input-invalid md-select.md-THEME_NAME-theme .md-select-value { color: '{{warn-A700}}' !important; border-bottom-color: '{{warn-A700}}' !important; }md-input-container.md-input-invalid md-select.md-THEME_NAME-theme.md-no-underline .md-select-value { border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme[disabled] .md-select-value { border-bottom-color: transparent; background-image: linear-gradient(to right, \"{{foreground-3}}\" 0%, \"{{foreground-3}}\" 33%, transparent 0%); background-image: -ms-linear-gradient(left, transparent 0%, \"{{foreground-3}}\" 100%); }md-select.md-THEME_NAME-theme .md-select-value { border-bottom-color: '{{foreground-4}}'; } md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder { color: '{{foreground-3}}'; } md-select.md-THEME_NAME-theme .md-select-value span:first-child:after { color: '{{warn-A700}}'; }md-select.md-THEME_NAME-theme.md-no-underline .md-select-value { border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme.ng-invalid.ng-touched .md-select-value { color: '{{warn-A700}}' !important; border-bottom-color: '{{warn-A700}}' !important; }md-select.md-THEME_NAME-theme.ng-invalid.ng-touched.md-no-underline .md-select-value { border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value { border-bottom-color: '{{primary-color}}'; color: '{{ foreground-1 }}'; } md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value.md-select-placeholder { color: '{{ foreground-1 }}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-no-underline .md-select-value { border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-value { border-bottom-color: '{{accent-color}}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-value { border-bottom-color: '{{warn-color}}'; }md-select.md-THEME_NAME-theme[disabled] .md-select-value { color: '{{foreground-3}}'; } md-select.md-THEME_NAME-theme[disabled] .md-select-value.md-select-placeholder { color: '{{foreground-3}}'; }md-select-menu.md-THEME_NAME-theme md-content { background: '{{background-A100}}'; } md-select-menu.md-THEME_NAME-theme md-content md-optgroup { color: '{{background-600-0.87}}'; } md-select-menu.md-THEME_NAME-theme md-content md-option { color: '{{background-900-0.87}}'; } md-select-menu.md-THEME_NAME-theme md-content md-option[disabled] .md-text { color: '{{background-400-0.87}}'; } md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):focus, md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):hover { background: '{{background-200}}'; } md-select-menu.md-THEME_NAME-theme md-content md-option[selected] { color: '{{primary-500}}'; } md-select-menu.md-THEME_NAME-theme md-content md-option[selected]:focus { color: '{{primary-600}}'; } md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent { color: '{{accent-color}}'; } md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent:focus { color: '{{accent-A700}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-ripple { color: '{{primary-600}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ripple { color: '{{background-600}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-ink-ripple { color: '{{foreground-2}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ink-ripple { color: '{{primary-color-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme:not(.md-checked) .md-icon { border-color: '{{foreground-2}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon { background-color: '{{primary-color-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected].md-focused .md-container:before { background-color: '{{primary-color-0.26}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon:after { border-color: '{{primary-contrast-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-indeterminate[disabled] .md-container { color: '{{foreground-3}}'; }.md-checkbox-enabled.md-THEME_NAME-theme md-option .md-text { color: '{{background-900-0.87}}'; }md-sidenav.md-THEME_NAME-theme, md-sidenav.md-THEME_NAME-theme md-content { background-color: '{{background-hue-1}}'; }md-slider.md-THEME_NAME-theme .md-track { background-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme .md-track-ticks { color: '{{background-contrast}}'; }md-slider.md-THEME_NAME-theme .md-focus-ring { background-color: '{{accent-A200-0.2}}'; }md-slider.md-THEME_NAME-theme .md-disabled-thumb { border-color: '{{background-color}}'; background-color: '{{background-color}}'; }md-slider.md-THEME_NAME-theme.md-min .md-thumb:after { background-color: '{{background-color}}'; border-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme.md-min .md-focus-ring { background-color: '{{foreground-3-0.38}}'; }md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-thumb:after { background-color: '{{background-contrast}}'; border-color: transparent; }md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign { background-color: '{{background-400}}'; } md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign:after { border-top-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme.md-min[md-discrete][md-vertical] .md-sign:after { border-top-color: transparent; border-left-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme .md-track.md-track-fill { background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb:after { border-color: '{{accent-color}}'; background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-sign { background-color: '{{accent-color}}'; } md-slider.md-THEME_NAME-theme .md-sign:after { border-top-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme[md-vertical] .md-sign:after { border-top-color: transparent; border-left-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb-text { color: '{{accent-contrast}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-focus-ring { background-color: '{{warn-200-0.38}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill { background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after { border-color: '{{warn-color}}'; background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-sign { background-color: '{{warn-color}}'; } md-slider.md-THEME_NAME-theme.md-warn .md-sign:after { border-top-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn[md-vertical] .md-sign:after { border-top-color: transparent; border-left-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text { color: '{{warn-contrast}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-focus-ring { background-color: '{{primary-200-0.38}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill { background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after { border-color: '{{primary-color}}'; background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-sign { background-color: '{{primary-color}}'; } md-slider.md-THEME_NAME-theme.md-primary .md-sign:after { border-top-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary[md-vertical] .md-sign:after { border-top-color: transparent; border-left-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text { color: '{{primary-contrast}}'; }md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after { border-color: transparent; }md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after, md-slider.md-THEME_NAME-theme[disabled][md-discrete] .md-thumb:after { background-color: '{{foreground-3}}'; border-color: transparent; }md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign { background-color: '{{background-400}}'; } md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign:after { border-top-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme[disabled][readonly][md-vertical] .md-sign:after { border-top-color: transparent; border-left-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme[disabled][readonly] .md-disabled-thumb { border-color: transparent; background-color: transparent; }md-slider-container[disabled] > *:first-child:not(md-slider),md-slider-container[disabled] > *:last-child:not(md-slider) { color: '{{foreground-3}}'; }.md-subheader.md-THEME_NAME-theme { color: '{{ foreground-2-0.23 }}'; background-color: '{{background-default}}'; } .md-subheader.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } .md-subheader.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } .md-subheader.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme .md-ink-ripple { color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme .md-thumb { background-color: '{{background-50}}'; }md-switch.md-THEME_NAME-theme .md-bar { background-color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-ink-ripple { color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-thumb { background-color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-bar { background-color: '{{accent-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-focused .md-thumb:before { background-color: '{{accent-color-0.26}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-ink-ripple { color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-thumb { background-color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-bar { background-color: '{{primary-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary.md-focused .md-thumb:before { background-color: '{{primary-color-0.26}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-ink-ripple { color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb { background-color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar { background-color: '{{warn-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn.md-focused .md-thumb:before { background-color: '{{warn-color-0.26}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-thumb { background-color: '{{background-400}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-bar { background-color: '{{foreground-4}}'; }md-tabs.md-THEME_NAME-theme md-tabs-wrapper { background-color: transparent; border-color: '{{foreground-4}}'; }md-tabs.md-THEME_NAME-theme .md-paginator md-icon { color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme md-ink-bar { color: '{{accent-color}}'; background: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme .md-tab { color: '{{foreground-2}}'; } md-tabs.md-THEME_NAME-theme .md-tab[disabled], md-tabs.md-THEME_NAME-theme .md-tab[disabled] md-icon { color: '{{foreground-3}}'; } md-tabs.md-THEME_NAME-theme .md-tab.md-active, md-tabs.md-THEME_NAME-theme .md-tab.md-active md-icon, md-tabs.md-THEME_NAME-theme .md-tab.md-focused, md-tabs.md-THEME_NAME-theme .md-tab.md-focused md-icon { color: '{{primary-color}}'; } md-tabs.md-THEME_NAME-theme .md-tab.md-focused { background: '{{primary-color-0.1}}'; } md-tabs.md-THEME_NAME-theme .md-tab .md-ripple-container { color: '{{accent-A100}}'; }md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper { background-color: '{{accent-color}}'; } md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) { color: '{{accent-A100}}'; } md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon { color: '{{accent-contrast}}'; } md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused { background: '{{accent-contrast-0.1}}'; } md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-ink-bar { color: '{{primary-600-1}}'; background: '{{primary-600-1}}'; }md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper { background-color: '{{primary-color}}'; } md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) { color: '{{primary-100}}'; } md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon { color: '{{primary-contrast}}'; } md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused { background: '{{primary-contrast-0.1}}'; }md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper { background-color: '{{warn-color}}'; } md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) { color: '{{warn-100}}'; } md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon { color: '{{warn-contrast}}'; } md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused { background: '{{warn-contrast-0.1}}'; }md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper { background-color: '{{primary-color}}'; } md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) { color: '{{primary-100}}'; } md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon { color: '{{primary-contrast}}'; } md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused { background: '{{primary-contrast-0.1}}'; }md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper { background-color: '{{accent-color}}'; } md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) { color: '{{accent-A100}}'; } md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon { color: '{{accent-contrast}}'; } md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused { background: '{{accent-contrast-0.1}}'; } md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-ink-bar { color: '{{primary-600-1}}'; background: '{{primary-600-1}}'; }md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper { background-color: '{{warn-color}}'; } md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) { color: '{{warn-100}}'; } md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon { color: '{{warn-contrast}}'; } md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused { background: '{{warn-contrast-0.1}}'; }md-toast.md-THEME_NAME-theme .md-toast-content { background-color: #323232; color: '{{background-50}}'; } md-toast.md-THEME_NAME-theme .md-toast-content .md-button { color: '{{background-50}}'; } md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight { color: '{{accent-color}}'; } md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-primary { color: '{{primary-color}}'; } md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-warn { color: '{{warn-color}}'; }md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) { background-color: '{{primary-color}}'; color: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-icon { color: '{{primary-contrast}}'; fill: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) .md-button[disabled] md-icon { color: '{{primary-contrast-0.26}}'; fill: '{{primary-contrast-0.26}}'; } md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-ink-ripple { color: '{{accent-contrast}}'; } md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-icon { color: '{{accent-contrast}}'; fill: '{{accent-contrast}}'; } md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-button[disabled] md-icon { color: '{{accent-contrast-0.26}}'; fill: '{{accent-contrast-0.26}}'; } md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn { background-color: '{{warn-color}}'; color: '{{warn-contrast}}'; }md-tooltip.md-THEME_NAME-theme { color: '{{background-700-contrast}}'; } md-tooltip.md-THEME_NAME-theme .md-content { background-color: '{{background-700}}'; }"); | |
ngmaterial.core = angular.module("material.core"); | |
ngmaterial.components = {}; | |
angular.module("material.components.icon", ["material.core"]); | |
angular.module("material.components.icon").directive("mdIcon", ["$mdIcon", "$mdTheming", "$mdAria", "$sce", mdIconDirective]); | |
function mdIconDirective(a, b, c) { | |
function d(d, e, g) { | |
function f() { | |
var a = e.parent(); | |
return a.attr("aria-label") || a.text() || a.parent().attr("aria-label") || a.parent().text() ? !0 : !1 | |
} | |
function l() { | |
if (!g.mdSvgIcon && !g.mdSvgSrc) { | |
g.mdFontIcon && (e.removeClass(n), e.addClass(g.mdFontIcon), n = g.mdFontIcon); | |
var b = a.fontSet(g.mdFontSet); | |
p !== b && (e.removeClass(p), e.addClass(b), p = b) | |
} | |
} | |
b(e); | |
var n = g.mdFontIcon, | |
p = a.fontSet(g.mdFontSet); | |
g.mdSvgIcon || g.mdSvgSrc || (g.mdFontIcon && e.addClass("md-font " + g.mdFontIcon), e.addClass(p)); | |
g.$observe("mdFontIcon", l); | |
g.$observe("mdFontSet", l); | |
e[0].getAttribute(g.$attr.mdSvgSrc); | |
d = g.alt || g.mdFontIcon || g.mdSvgIcon || e.text(); | |
var k = g.$normalize(g.$attr.mdSvgIcon || g.$attr.mdSvgSrc || ""); | |
g["aria-label"] || ("" === d || f() ? e.text() || c.expect(e, "aria-hidden", "true") : (c.expect(e, "aria-label", d), c.expect(e, "role", "img"))); | |
k && g.$observe(k, function(b) { | |
e.empty(); | |
b && a(b).then(function(a) { | |
e.empty(); | |
e.append(a) | |
}) | |
}) | |
} | |
return { | |
restrict: "E", | |
link: d | |
} | |
} | |
MdIconService.$inject = "config $templateRequest $q $log $mdUtil $sce".split(" "); | |
angular.module("material.components.icon").constant("$$mdSvgRegistry", { | |
mdTabsArrow: "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=", | |
mdClose: "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=", | |
mdCancel: "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==", | |
mdMenu: "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+", | |
mdToggleArrow: "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==", | |
mdCalendar: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg==", | |
mdChecked: "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik05IDE2LjE3TDQuODMgMTJsLTEuNDIgMS40MUw5IDE5IDIxIDdsLTEuNDEtMS40MXoiLz48L2c+PC9zdmc+" | |
}).provider("$mdIcon", MdIconProvider); | |
var config = { | |
defaultViewBoxSize: 24, | |
defaultFontSet: "material-icons", | |
fontSets: [] | |
}; | |
function MdIconProvider() {} | |
MdIconProvider.prototype = { | |
icon: function(a, b, c) { | |
-1 == a.indexOf(":") && (a = "$default:" + a); | |
config[a] = new ConfigurationItem(b, c); | |
return this | |
}, | |
iconSet: function(a, b, c) { | |
config[a] = new ConfigurationItem(b, c); | |
return this | |
}, | |
defaultIconSet: function(a, b) { | |
config.$default || (config.$default = new ConfigurationItem(a, b)); | |
config.$default.viewBoxSize = b || config.defaultViewBoxSize; | |
return this | |
}, | |
defaultViewBoxSize: function(a) { | |
config.defaultViewBoxSize = a; | |
return this | |
}, | |
fontSet: function(a, b) { | |
config.fontSets.push({ | |
alias: a, | |
fontSet: b || | |
a | |
}); | |
return this | |
}, | |
defaultFontSet: function(a) { | |
config.defaultFontSet = a ? a : ""; | |
return this | |
}, | |
defaultIconSize: function(a) { | |
config.defaultIconSize = a; | |
return this | |
}, | |
$get: ["$templateRequest", "$q", "$log", "$mdUtil", "$sce", function(a, b, c, d, f) { | |
return MdIconService(config, a, b, c, d, f) | |
}] | |
}; | |
function ConfigurationItem(a, b) { | |
this.url = a; | |
this.viewBoxSize = b || config.defaultViewBoxSize | |
} | |
function MdIconService(a, b, c, d, f, e) { | |
function g(b) { | |
b = b || ""; | |
angular.isString(b) || (b = e.getTrustedUrl(b)); | |
if (x[b]) return c.when(l(x[b])); | |
if (v.test(b) || z.test(b)) return m(b).then(n(b)); - 1 == b.indexOf(":") && (b = "$default:" + b); | |
var d = a[b] ? p : k; | |
return d(b).then(n(b)) | |
} | |
function h(b) { | |
var c = angular.isUndefined(b) || !(b && b.length); | |
if (c) return a.defaultFontSet; | |
var d = b; | |
angular.forEach(a.fontSets, function(a) { | |
a.alias == b && (d = a.fontSet || d) | |
}); | |
return d | |
} | |
function l(a) { | |
a = a.clone(); | |
var b = "_cache" + f.nextUid(); | |
a.id && (a.id += b); | |
angular.forEach(a.querySelectorAll("[id]"), | |
function(a) { | |
a.id += b | |
}); | |
return a | |
} | |
function n(b) { | |
return function(c) { | |
var d; | |
d = c; | |
d = angular.isDefined(d.element) && angular.isDefined(d.config); | |
x[b] = d ? c : new q(c, a[b]); | |
return x[b].clone() | |
} | |
} | |
function p(b) { | |
var c = a[b]; | |
return m(c.url).then(function(a) { | |
return new q(a, c) | |
}) | |
} | |
function k(b) { | |
function f(a) { | |
var c = b.slice(b.lastIndexOf(":") + 1); | |
return (a = a.querySelector("#" + c)) ? new q(a, h) : e(b) | |
} | |
function e(a) { | |
var b = "icon " + a + " not found"; | |
d.warn(b); | |
return c.reject(b || a) | |
} | |
var g = b.substring(0, b.lastIndexOf(":")) || "$default", | |
h = a[g]; | |
return h ? m(h.url).then(f) : e(b) | |
} | |
function m(a) { | |
function f(a) { | |
var b = z.exec(a), | |
b = (a = /base64/i.test(a)) ? window.atob(b[2]) : b[2]; | |
return c.when(angular.element(b)[0]) | |
} | |
function e(a) { | |
return c(function(c, f) { | |
var e = function(a) { | |
var b = angular.isString(a) ? a : a.message || a.data || a.statusText; | |
d.warn(b); | |
f(a) | |
}, | |
g = function(b) { | |
r[a] || (r[a] = angular.element("<div>").append(b)[0].querySelector("svg")); | |
c(r[a]) | |
}; | |
b(a, !0).then(g, e) | |
}) | |
} | |
return z.test(a) ? f(a) : e(a) | |
} | |
function q(a, b) { | |
a && "svg" != a.tagName && (a = angular.element('<svg xmlns="http://www.w3.org/2000/svg">').append(a.cloneNode(!0))[0]); | |
a.getAttribute("xmlns") || a.setAttribute("xmlns", "http://www.w3.org/2000/svg"); | |
this.element = a; | |
this.config = b; | |
this.prepare() | |
} | |
function w() { | |
var b = this.config ? this.config.viewBoxSize : a.defaultViewBoxSize; | |
angular.forEach({ | |
fit: "", | |
height: "100%", | |
width: "100%", | |
preserveAspectRatio: "xMidYMid meet", | |
viewBox: this.element.getAttribute("viewBox") || "0 0 " + b + " " + b, | |
focusable: !1 | |
}, function(a, b) { | |
this.element.setAttribute(b, a) | |
}, this) | |
} | |
function t() { | |
return this.element.cloneNode(!0) | |
} | |
var x = {}, | |
r = {}, | |
v = /[-\w@:%\+.~#?&//=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&//=]*)?/i, | |
z = /^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i; | |
q.prototype = { | |
clone: t, | |
prepare: w | |
}; | |
g.fontSet = h; | |
return g | |
} | |
ngmaterial.components.icon = angular.module("material.components.icon"); | |
angular.module("material.components.showHide", ["material.core"]).directive("ngShow", createDirective("ngShow", !0)).directive("ngHide", createDirective("ngHide", !1)); | |
function createDirective(a, b) { | |
return ["$mdUtil", "$window", function(c, d) { | |
return { | |
restrict: "A", | |
multiElement: !0, | |
link: function(f, e, g) { | |
var h = f.$on("$md-resize-enable", function() { | |
h(); | |
var l = e[0], | |
n = l.nodeType === d.Node.ELEMENT_NODE ? d.getComputedStyle(l) : {}; | |
f.$watch(g[a], function(a) { | |
!!a === b && (c.nextTick(function() { | |
f.$broadcast("$md-resize") | |
}), a = { | |
cachedTransitionStyles: n | |
}, c.dom.animator.waitTransitionEnd(e, a).then(function() { | |
f.$broadcast("$md-resize") | |
})) | |
}) | |
}) | |
} | |
} | |
}] | |
} | |
ngmaterial.components.showHide = angular.module("material.components.showHide"); | |
VirtualRepeatContainerController.$inject = "$$rAF $mdUtil $parse $rootScope $window $scope $element $attrs".split(" "); | |
VirtualRepeatController.$inject = "$scope $element $attrs $browser $document $rootScope $$rAF $mdUtil".split(" "); | |
VirtualRepeatDirective.$inject = ["$parse"]; | |
angular.module("material.components.virtualRepeat", ["material.core", "material.components.showHide"]).directive("mdVirtualRepeatContainer", VirtualRepeatContainerDirective).directive("mdVirtualRepeat", VirtualRepeatDirective); | |
function VirtualRepeatContainerDirective() { | |
return { | |
controller: VirtualRepeatContainerController, | |
template: virtualRepeatContainerTemplate, | |
compile: function(a, b) { | |
a.addClass("md-virtual-repeat-container").addClass(b.hasOwnProperty("mdOrientHorizontal") ? "md-orient-horizontal" : "md-orient-vertical") | |
} | |
} | |
} | |
function virtualRepeatContainerTemplate(a) { | |
return '<div class="md-virtual-repeat-scroller"><div class="md-virtual-repeat-sizer"></div><div class="md-virtual-repeat-offsetter">' + a[0].innerHTML + "</div></div>" | |
} | |
function VirtualRepeatContainerController(a, b, c, d, f, e, g, h) { | |
this.$rootScope = d; | |
this.$scope = e; | |
this.$element = g; | |
this.$attrs = h; | |
this.scrollOffset = this.scrollSize = this.size = 0; | |
this.horizontal = this.$attrs.hasOwnProperty("mdOrientHorizontal"); | |
this.repeater = null; | |
this.autoShrink = this.$attrs.hasOwnProperty("mdAutoShrink"); | |
this.autoShrinkMin = parseInt(this.$attrs.mdAutoShrinkMin, 10) || 0; | |
this.originalSize = null; | |
this.offsetSize = parseInt(this.$attrs.mdOffsetSize, 10) || 0; | |
this.oldElementSize = null; | |
this.$attrs.mdTopIndex ? | |
(this.bindTopIndex = c(this.$attrs.mdTopIndex), this.topIndex = this.bindTopIndex(this.$scope), angular.isDefined(this.topIndex) || (this.topIndex = 0, this.bindTopIndex.assign(this.$scope, 0)), this.$scope.$watch(this.bindTopIndex, angular.bind(this, function(a) { | |
a !== this.topIndex && this.scrollToIndex(a) | |
}))) : this.topIndex = 0; | |
this.scroller = g[0].querySelector(".md-virtual-repeat-scroller"); | |
this.sizer = this.scroller.querySelector(".md-virtual-repeat-sizer"); | |
this.offsetter = this.scroller.querySelector(".md-virtual-repeat-offsetter"); | |
var l = angular.bind(this, this.updateSize); | |
a(angular.bind(this, function() { | |
l(); | |
var a = b.debounce(l, 10, null, !1), | |
c = angular.element(f); | |
this.size || a(); | |
c.on("resize", a); | |
e.$on("$destroy", function() { | |
c.off("resize", a) | |
}); | |
e.$emit("$md-resize-enable"); | |
e.$on("$md-resize", l) | |
})) | |
} | |
VirtualRepeatContainerController.prototype.register = function(a) { | |
this.repeater = a; | |
angular.element(this.scroller).on("scroll wheel touchmove touchend", angular.bind(this, this.handleScroll_)) | |
}; | |
VirtualRepeatContainerController.prototype.isHorizontal = function() { | |
return this.horizontal | |
}; | |
VirtualRepeatContainerController.prototype.getSize = function() { | |
return this.size | |
}; | |
VirtualRepeatContainerController.prototype.setSize_ = function(a) { | |
var b = this.getDimensionName_(); | |
this.size = a; | |
this.$element[0].style[b] = a + "px" | |
}; | |
VirtualRepeatContainerController.prototype.unsetSize_ = function() { | |
this.$element[0].style[this.getDimensionName_()] = this.oldElementSize; | |
this.oldElementSize = null | |
}; | |
VirtualRepeatContainerController.prototype.updateSize = function() { | |
this.originalSize || (this.size = this.isHorizontal() ? this.$element[0].clientWidth : this.$element[0].clientHeight, this.handleScroll_(), this.repeater && this.repeater.containerUpdated()) | |
}; | |
VirtualRepeatContainerController.prototype.getScrollSize = function() { | |
return this.scrollSize | |
}; | |
VirtualRepeatContainerController.prototype.getDimensionName_ = function() { | |
return this.isHorizontal() ? "width" : "height" | |
}; | |
VirtualRepeatContainerController.prototype.sizeScroller_ = function(a) { | |
var b = this.getDimensionName_(), | |
c = this.isHorizontal() ? "height" : "width"; | |
this.sizer.innerHTML = ""; | |
if (1533917 > a) this.sizer.style[b] = a + "px"; | |
else { | |
this.sizer.style[b] = "auto"; | |
this.sizer.style[c] = "auto"; | |
var d = Math.floor(a / 1533917), | |
f = document.createElement("div"); | |
f.style[b] = "1533917px"; | |
f.style[c] = "1px"; | |
for (c = 0; c < d; c++) this.sizer.appendChild(f.cloneNode(!1)); | |
f.style[b] = a - 1533917 * d + "px"; | |
this.sizer.appendChild(f) | |
} | |
}; | |
VirtualRepeatContainerController.prototype.autoShrink_ = function(a) { | |
a = Math.max(a, this.autoShrinkMin * this.repeater.getItemSize()); | |
if (this.autoShrink && a !== this.size) { | |
null === this.oldElementSize && (this.oldElementSize = this.$element[0].style[this.getDimensionName_()]); | |
var b = this.originalSize || this.size; | |
if (!b || a < b) this.originalSize || (this.originalSize = this.size), this.setSize_(a); | |
else if (null !== this.originalSize) { | |
this.unsetSize_(); | |
var c = this.originalSize; | |
this.originalSize = null; | |
c || this.updateSize(); | |
this.setSize_(c || | |
this.size) | |
} | |
this.repeater.containerUpdated() | |
} | |
}; | |
VirtualRepeatContainerController.prototype.setScrollSize = function(a) { | |
a += this.offsetSize; | |
this.scrollSize !== a && (this.sizeScroller_(a), this.autoShrink_(a), this.scrollSize = a) | |
}; | |
VirtualRepeatContainerController.prototype.getScrollOffset = function() { | |
return this.scrollOffset | |
}; | |
VirtualRepeatContainerController.prototype.scrollTo = function(a) { | |
this.scroller[this.isHorizontal() ? "scrollLeft" : "scrollTop"] = a; | |
this.handleScroll_() | |
}; | |
VirtualRepeatContainerController.prototype.scrollToIndex = function(a) { | |
var b = this.repeater.getItemSize(), | |
c = this.repeater.itemsLength; | |
a > c && (a = c - 1); | |
this.scrollTo(b * a) | |
}; | |
VirtualRepeatContainerController.prototype.resetScroll = function() { | |
this.scrollTo(0) | |
}; | |
VirtualRepeatContainerController.prototype.handleScroll_ = function() { | |
var a = angular.element(document)[0], | |
b = "rtl" != a.dir && "rtl" != a.body.dir; | |
b || this.maxSize || (this.scroller.scrollLeft = this.scrollSize, this.maxSize = this.scroller.scrollLeft); | |
a = this.isHorizontal() ? b ? this.scroller.scrollLeft : this.maxSize - this.scroller.scrollLeft : this.scroller.scrollTop; | |
if (!(a === this.scrollOffset || a > this.scrollSize - this.size)) { | |
var c = this.repeater.getItemSize(); | |
if (c) { | |
var d = Math.max(0, Math.floor(a / c) - 3), | |
b = (this.isHorizontal() ? | |
"translateX(" : "translateY(") + (!this.isHorizontal() || b ? d * c : -(d * c)) + "px)"; | |
this.scrollOffset = a; | |
this.offsetter.style.webkitTransform = b; | |
this.offsetter.style.transform = b; | |
this.bindTopIndex && (a = Math.floor(a / c), a !== this.topIndex && a < this.repeater.getItemCount() && (this.topIndex = a, this.bindTopIndex.assign(this.$scope, a), this.$rootScope.$$phase || this.$scope.$digest())); | |
this.repeater.containerUpdated() | |
} | |
} | |
}; | |
function VirtualRepeatDirective(a) { | |
return { | |
controller: VirtualRepeatController, | |
priority: 1E3, | |
require: ["mdVirtualRepeat", "^^mdVirtualRepeatContainer"], | |
restrict: "A", | |
terminal: !0, | |
transclude: "element", | |
compile: function(b, c) { | |
b = c.mdVirtualRepeat; | |
b = b.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/); | |
var d = b[1], | |
f = a(b[2]), | |
e = c.mdExtraName && a(c.mdExtraName); | |
return function(a, b, c, n, p) { | |
n[0].link_(n[1], p, d, f, e) | |
} | |
} | |
} | |
} | |
function VirtualRepeatController(a, b, c, d, f, e, g, h) { | |
this.$scope = a; | |
this.$element = b; | |
this.$attrs = c; | |
this.$browser = d; | |
this.$document = f; | |
this.$rootScope = e; | |
this.$$rAF = g; | |
this.onDemand = h.parseAttributeBoolean(c.mdOnDemand); | |
this.browserCheckUrlChange = d.$$checkUrlChange; | |
this.endIndex = this.startIndex = this.newVisibleEnd = this.newEndIndex = this.newStartIndex = 0; | |
this.itemSize = a.$eval(c.mdItemSize) || null; | |
this.isFirstRender = !0; | |
this.isVirtualRepeatUpdating_ = !1; | |
this.itemsLength = 0; | |
this.unwatchItemSize_ = angular.noop; | |
this.blocks = {}; | |
this.pooledBlocks = []; | |
a.$on("$destroy", angular.bind(this, this.cleanupBlocks_)) | |
} | |
VirtualRepeatController.prototype.link_ = function(a, b, c, d, f) { | |
this.container = a; | |
this.transclude = b; | |
this.repeatName = c; | |
this.rawRepeatListExpression = d; | |
this.extraName = f; | |
this.sized = !1; | |
this.repeatListExpression = angular.bind(this, this.repeatListExpression_); | |
this.container.register(this) | |
}; | |
VirtualRepeatController.prototype.cleanupBlocks_ = function() { | |
angular.forEach(this.pooledBlocks, function(a) { | |
a.element.remove() | |
}) | |
}; | |
VirtualRepeatController.prototype.readItemSize_ = function() { | |
if (!this.itemSize) { | |
this.items = this.repeatListExpression(this.$scope); | |
this.parentNode = this.$element[0].parentNode; | |
var a = this.getBlock_(0); | |
a.element[0].parentNode || this.parentNode.appendChild(a.element[0]); | |
this.itemSize = a.element[0][this.container.isHorizontal() ? "offsetWidth" : "offsetHeight"] || null; | |
this.blocks[0] = a; | |
this.poolBlock_(0); | |
this.itemSize && this.containerUpdated() | |
} | |
}; | |
VirtualRepeatController.prototype.repeatListExpression_ = function(a) { | |
a = this.rawRepeatListExpression(a); | |
this.onDemand && a && (a = new VirtualRepeatModelArrayLike(a), a.$$includeIndexes(this.newStartIndex, this.newVisibleEnd)); | |
return a | |
}; | |
VirtualRepeatController.prototype.containerUpdated = function() { | |
if (this.itemSize) { | |
if (this.sized || (this.items = this.repeatListExpression(this.$scope)), this.sized || (this.unwatchItemSize_(), this.sized = !0, this.$scope.$watchCollection(this.repeatListExpression, angular.bind(this, function(a, b) { | |
this.isVirtualRepeatUpdating_ || this.virtualRepeatUpdate_(a, b) | |
}))), this.updateIndexes_(), this.newStartIndex !== this.startIndex || this.newEndIndex !== this.endIndex || this.container.getScrollOffset() > this.container.getScrollSize()) this.items instanceof | |
VirtualRepeatModelArrayLike && this.items.$$includeIndexes(this.newStartIndex, this.newEndIndex), this.virtualRepeatUpdate_(this.items, this.items) | |
} else this.unwatchItemSize_ && this.unwatchItemSize_ !== angular.noop && this.unwatchItemSize_(), this.unwatchItemSize_ = this.$scope.$watchCollection(this.repeatListExpression, angular.bind(this, function(a) { | |
a && a.length && this.readItemSize_() | |
})), this.$rootScope.$$phase || this.$scope.$digest() | |
}; | |
VirtualRepeatController.prototype.getItemSize = function() { | |
return this.itemSize | |
}; | |
VirtualRepeatController.prototype.getItemCount = function() { | |
return this.itemsLength | |
}; | |
VirtualRepeatController.prototype.virtualRepeatUpdate_ = function(a, b) { | |
this.isVirtualRepeatUpdating_ = !0; | |
var c = a && a.length || 0, | |
d = !1; | |
if (this.items && c < this.items.length && 0 !== this.container.getScrollOffset()) { | |
this.items = a; | |
var f = this.container.getScrollOffset(); | |
this.container.resetScroll(); | |
this.container.scrollTo(f) | |
} | |
c !== this.itemsLength && (d = !0, this.itemsLength = c); | |
this.items = a; | |
(a !== b || d) && this.updateIndexes_(); | |
this.parentNode = this.$element[0].parentNode; | |
d && this.container.setScrollSize(c * this.itemSize); | |
this.isFirstRender && | |
(this.isFirstRender = !1, a = this.$attrs.mdStartIndex ? this.$scope.$eval(this.$attrs.mdStartIndex) : this.container.topIndex, this.container.scrollToIndex(a)); | |
Object.keys(this.blocks).forEach(function(a) { | |
a = parseInt(a, 10); | |
(a < this.newStartIndex || a >= this.newEndIndex) && this.poolBlock_(a) | |
}, this); | |
this.$browser.$$checkUrlChange = angular.noop; | |
c = []; | |
d = []; | |
for (a = this.newStartIndex; a < this.newEndIndex && null == this.blocks[a]; a++) b = this.getBlock_(a), this.updateBlock_(b, a), c.push(b); | |
for (; null != this.blocks[a]; a++) this.updateBlock_(this.blocks[a], | |
a); | |
for (f = a - 1; a < this.newEndIndex; a++) b = this.getBlock_(a), this.updateBlock_(b, a), d.push(b); | |
c.length && this.parentNode.insertBefore(this.domFragmentFromBlocks_(c), this.$element[0].nextSibling); | |
d.length && this.parentNode.insertBefore(this.domFragmentFromBlocks_(d), this.blocks[f] && this.blocks[f].element[0].nextSibling); | |
this.$browser.$$checkUrlChange = this.browserCheckUrlChange; | |
this.startIndex = this.newStartIndex; | |
this.endIndex = this.newEndIndex; | |
this.isVirtualRepeatUpdating_ = !1 | |
}; | |
VirtualRepeatController.prototype.getBlock_ = function(a) { | |
if (this.pooledBlocks.length) return this.pooledBlocks.pop(); | |
var b; | |
this.transclude(angular.bind(this, function(c, d) { | |
b = { | |
element: c, | |
"new": !0, | |
scope: d | |
}; | |
this.updateScope_(d, a); | |
this.parentNode.appendChild(c[0]) | |
})); | |
return b | |
}; | |
VirtualRepeatController.prototype.updateBlock_ = function(a, b) { | |
this.blocks[b] = a; | |
if (a["new"] || a.scope.$index !== b || a.scope[this.repeatName] !== this.items[b]) a["new"] = !1, this.updateScope_(a.scope, b), this.$rootScope.$$phase || a.scope.$digest() | |
}; | |
VirtualRepeatController.prototype.updateScope_ = function(a, b) { | |
a.$index = b; | |
a[this.repeatName] = this.items && this.items[b]; | |
this.extraName && (a[this.extraName(this.$scope)] = this.items[b]) | |
}; | |
VirtualRepeatController.prototype.poolBlock_ = function(a) { | |
this.pooledBlocks.push(this.blocks[a]); | |
this.parentNode.removeChild(this.blocks[a].element[0]); | |
delete this.blocks[a] | |
}; | |
VirtualRepeatController.prototype.domFragmentFromBlocks_ = function(a) { | |
var b = this.$document[0].createDocumentFragment(); | |
a.forEach(function(a) { | |
b.appendChild(a.element[0]) | |
}); | |
return b | |
}; | |
VirtualRepeatController.prototype.updateIndexes_ = function() { | |
var a = this.items ? this.items.length : 0, | |
b = Math.ceil(this.container.getSize() / this.itemSize); | |
this.newStartIndex = Math.max(0, Math.min(a - b, Math.floor(this.container.getScrollOffset() / this.itemSize))); | |
this.newVisibleEnd = this.newStartIndex + b + 3; | |
this.newEndIndex = Math.min(a, this.newVisibleEnd); | |
this.newStartIndex = Math.max(0, this.newStartIndex - 3) | |
}; | |
function VirtualRepeatModelArrayLike(a) { | |
if (!angular.isFunction(a.getItemAtIndex) || !angular.isFunction(a.getLength)) throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() "); | |
this.model = a | |
} | |
VirtualRepeatModelArrayLike.prototype.$$includeIndexes = function(a, b) { | |
for (; a < b; a++) this.hasOwnProperty(a) || (this[a] = this.model.getItemAtIndex(a)); | |
this.length = this.model.getLength() | |
}; | |
ngmaterial.components.virtualRepeat = angular.module("material.components.virtualRepeat"); | |
angular.module("material.components.autocomplete", ["material.core", "material.components.icon", "material.components.virtualRepeat"]); | |
MdAutocompleteCtrl.$inject = "$scope $element $mdUtil $mdConstant $mdTheming $window $animate $rootElement $attrs $q $log".split(" "); | |
angular.module("material.components.autocomplete").controller("MdAutocompleteCtrl", MdAutocompleteCtrl); | |
function MdAutocompleteCtrl(a, b, c, d, f, e, g, h, l, n, p) { | |
function k() { | |
c.initOptionalProperties(a, l, { | |
searchText: "", | |
selectedItem: null | |
}); | |
f(b); | |
t(); | |
c.nextTick(function() { | |
G = { | |
main: b[0], | |
scrollContainer: b[0].querySelector(".md-virtual-repeat-container"), | |
scroller: b[0].querySelector(".md-virtual-repeat-scroller"), | |
ul: b.find("ul")[0], | |
input: b.find("input")[0], | |
wrap: b.find("md-autocomplete-wrap")[0], | |
root: document.body | |
}; | |
G.li = G.ul.getElementsByTagName("li"); | |
var c = G, | |
d; | |
a: { | |
for (d = b; d.length; d = d.parent()) | |
if (angular.isDefined(d.attr("md-autocomplete-snap"))) { | |
d = | |
d[0]; | |
break a | |
} | |
d = G.wrap | |
} | |
c.snap = d; | |
var c = G, | |
e; | |
d = G; | |
var k = {}; | |
for (e in d) d.hasOwnProperty(e) && (k[e] = angular.element(d[e])); | |
e = k; | |
c.$ = e; | |
ha = G.$.input.controller("ngModel"); | |
G.$.root.length && (f(G.$.scrollContainer), G.$.scrollContainer.detach(), G.$.root.append(G.$.scrollContainer), g.pin && g.pin(G.$.scrollContainer, h)); | |
if (a.autofocus) b.on("focus", w) | |
}) | |
} | |
function m() { | |
a.requireMatch && ha && ha.$setValidity("md-require-match", !!a.selectedItem) | |
} | |
function q() { | |
function d() { | |
var a = 0, | |
c = b.find("md-input-container"); | |
if (c.length) var d = | |
c.find("input"), | |
a = c.prop("offsetHeight"), | |
a = a - d.prop("offsetTop"), | |
a = a - d.prop("offsetHeight"), | |
a = a + c.prop("offsetTop"); | |
return a | |
} | |
function f() { | |
var a = G.scrollContainer.getBoundingClientRect(), | |
b = {}; | |
a.right > h.right - 8 && (b.left = e.right - a.width + "px"); | |
G.$.scrollContainer.css(b) | |
} | |
if (!G) return c.nextTick(q, !1, a); | |
var e = G.wrap.getBoundingClientRect(), | |
g = G.snap.getBoundingClientRect(), | |
h = G.root.getBoundingClientRect(), | |
k = g.bottom - h.top, | |
g = h.bottom - g.top, | |
m = e.left - h.left, | |
n = e.width, | |
t = d(); | |
l.mdFloatingLabel && (m += 2, n -= 4); | |
m = { | |
left: m + "px", | |
minWidth: n + "px", | |
maxWidth: Math.max(e.right - h.left, h.right - e.left) - 8 + "px" | |
}; | |
k > g && 225.5 > h.height - e.bottom - 8 ? (m.top = "auto", m.bottom = g + "px", m.maxHeight = Math.min(225.5, e.top - h.top - 8) + "px") : (m.top = k - t + "px", m.bottom = "auto", m.maxHeight = Math.min(225.5, h.bottom + c.scrollTop() - e.bottom - 8) + "px"); | |
G.$.scrollContainer.css(m); | |
c.nextTick(f, !1) | |
} | |
function w() { | |
G.input.focus() | |
} | |
function t() { | |
var b = parseInt(a.delay, 10) || 0; | |
l.$observe("disabled", function(a) { | |
y.isDisabled = c.parseAttributeBoolean(a, !1) | |
}); | |
l.$observe("required", | |
function(a) { | |
y.isRequired = c.parseAttributeBoolean(a, !1) | |
}); | |
l.$observe("readonly", function(a) { | |
y.isReadonly = c.parseAttributeBoolean(a, !1) | |
}); | |
a.$watch("searchText", b ? c.debounce(H, b) : H); | |
a.$watch("selectedItem", D); | |
angular.element(e).on("resize", q); | |
a.$on("$destroy", x) | |
} | |
function x() { | |
y.hidden || c.enableScrolling(); | |
angular.element(e).off("resize", q); | |
if (G) { | |
var a = ["ul", "scroller", "scrollContainer", "input"]; | |
angular.forEach(a, function(a) { | |
G.$[a].remove() | |
}) | |
} | |
} | |
function r(a, b) { | |
!a && b ? (q(), G && (c.disableScrollAround(G.ul), | |
ca = v(angular.element(G.wrap)))) : a && !b && (c.enableScrolling(), ca && (ca(), ca = null)) | |
} | |
function v(a) { | |
function b(a) { | |
a.preventDefault() | |
} | |
a.on("wheel", b); | |
a.on("touchmove", b); | |
return function() { | |
a.off("wheel", b); | |
a.off("touchmove", b) | |
} | |
} | |
function z() { | |
aa = !0 | |
} | |
function E() { | |
V || y.hidden || G.input.focus(); | |
aa = !1; | |
y.hidden = T() | |
} | |
function F() { | |
G.input.focus() | |
} | |
function D(b, c) { | |
m(); | |
b ? K(b).then(function(d) { | |
a.searchText = d; | |
A(b, c) | |
}) : c && a.searchText && K(c).then(function(b) { | |
b.toString().toLowerCase() === a.searchText.toLowerCase() && (a.searchText = | |
"") | |
}); | |
b !== c && angular.isFunction(a.itemChange) && a.itemChange(R(a.selectedItem)) | |
} | |
function A(a, b) { | |
Q.forEach(function(c) { | |
c(a, b) | |
}) | |
} | |
function B(a) { | |
-1 == Q.indexOf(a) && Q.push(a) | |
} | |
function L(a) { | |
a = Q.indexOf(a); - 1 != a && Q.splice(a, 1) | |
} | |
function H(b, c) { | |
y.index = a.autoselect ? 0 : -1; | |
b !== c && (m(), K(a.selectedItem).then(function(d) { | |
b !== d && (a.selectedItem = null, b !== c && angular.isFunction(a.textChange) && a.textChange(), X() ? pa() : (y.matches = [], S(!1), N())) | |
})) | |
} | |
function I(b) { | |
V = !1; | |
if (!aa) { | |
y.hidden = T(); | |
var c = "ngBlur"; | |
b = { | |
$event: b | |
}; | |
l[c] && | |
a.$parent.$eval(l[c], b || {}) | |
} | |
} | |
function C(b) { | |
V = !0; | |
da() && X() && pa(); | |
y.hidden = T(); | |
var c = "ngFocus"; | |
b = { | |
$event: b | |
}; | |
l[c] && a.$parent.$eval(l[c], b || {}) | |
} | |
function P(b) { | |
switch (b.keyCode) { | |
case d.KEY_CODE.DOWN_ARROW: | |
if (y.loading) break; | |
b.stopPropagation(); | |
b.preventDefault(); | |
y.index = Math.min(y.index + 1, y.matches.length - 1); | |
Z(); | |
N(); | |
break; | |
case d.KEY_CODE.UP_ARROW: | |
if (y.loading) break; | |
b.stopPropagation(); | |
b.preventDefault(); | |
y.index = 0 > y.index ? y.matches.length - 1 : Math.max(0, y.index - 1); | |
Z(); | |
N(); | |
break; | |
case d.KEY_CODE.TAB: | |
E(); | |
if (y.hidden || | |
y.loading || 0 > y.index || 1 > y.matches.length) break; | |
fa(y.index); | |
break; | |
case d.KEY_CODE.ENTER: | |
if (y.hidden || y.loading || 0 > y.index || 1 > y.matches.length) break; | |
if (y.scope.selectedItem) break; | |
b.stopPropagation(); | |
b.preventDefault(); | |
fa(y.index); | |
break; | |
case d.KEY_CODE.ESCAPE: | |
if (b.preventDefault(), J("blur") || !y.hidden || y.loading || J("clear") && a.searchText) b.stopPropagation(), y.index = 0, y.matches = [], a.searchText && J("clear") && Y(), y.hidden = !0, J("blur") && (V = aa = !1, G.input.blur()) | |
} | |
} | |
function K(b) { | |
return n.when((b && a.itemText ? | |
a.itemText(R(b)) : null) || b).then(function(a) { | |
a && !angular.isString(a) && p.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."); | |
return a | |
}) | |
} | |
function R(a) { | |
if (a) { | |
var b = {}; | |
y.itemName && (b[y.itemName] = a); | |
return b | |
} | |
} | |
function S(a) { | |
y.loading != a && (y.loading = a); | |
y.hidden = T() | |
} | |
function T() { | |
return da() ? !(X() && y.matches.length || ga()) : !0 | |
} | |
function da() { | |
return y.loading && !y.matches.length || y.scope.selectedItem || !V ? !1 : !0 | |
} | |
function J(b) { | |
return !a.escapeOptions || -1 !== | |
a.escapeOptions.toLowerCase().indexOf(b) | |
} | |
function ba() { | |
return y.loading && !y.scope.selectedItem | |
} | |
function O() { | |
return K(y.matches[y.index]) | |
} | |
function X() { | |
return (a.searchText || "").length >= (angular.isNumber(a.minLength) ? a.minLength : 1) | |
} | |
function ea(a, b, c) { | |
Object.defineProperty(y, a, { | |
get: function() { | |
return c | |
}, | |
set: function(a) { | |
var d = c; | |
c = a; | |
b(a, d) | |
} | |
}) | |
} | |
function fa(b) { | |
c.nextTick(function() { | |
K(y.matches[b]).then(function(a) { | |
var b = G.$.input.controller("ngModel"); | |
b.$setViewValue(a); | |
b.$render() | |
})["finally"](function() { | |
a.selectedItem = | |
y.matches[b]; | |
S(!1) | |
}) | |
}, !1) | |
} | |
function U() { | |
y.index = 0; | |
y.matches = []; | |
Y() | |
} | |
function Y() { | |
S(!0); | |
a.searchText = ""; | |
var b = document.createEvent("CustomEvent"); | |
b.initCustomEvent("change", !0, !0, { | |
value: "" | |
}); | |
G.input.dispatchEvent(b); | |
G.input.blur(); | |
a.searchText = ""; | |
G.input.focus() | |
} | |
function ka(b) { | |
function d(b) { | |
b && (b = n.when(b), oa++, S(!0), c.nextTick(function() { | |
b.then(f)["finally"](function() { | |
0 === --oa && S(!1) | |
}) | |
}, !0, a)) | |
} | |
function f(c) { | |
u[g] = c; | |
(b || "") === (a.searchText || "") && qa(c) | |
} | |
var e = a.$parent.$eval(M), | |
g = b.toLowerCase(), | |
h = angular.isArray(e), | |
k = !!e.then; | |
h ? f(e) : k && d(e) | |
} | |
function N() { | |
O().then(function(a) { | |
y.messages = [la(), a] | |
}) | |
} | |
function la() { | |
if (W === y.matches.length) return ""; | |
W = y.matches.length; | |
switch (y.matches.length) { | |
case 0: | |
return "There are no matches available."; | |
case 1: | |
return "There is 1 match available."; | |
default: | |
return "There are " + y.matches.length + " matches available." | |
} | |
} | |
function Z() { | |
if (G.li[0]) { | |
var a = G.li[0].offsetHeight, | |
b = a * y.index, | |
a = b + a, | |
c = G.scroller.clientHeight, | |
d = G.scroller.scrollTop; | |
b < d ? ja(b) : a > d + c && ja(a - c) | |
} | |
} | |
function ja(a) { | |
G.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(a) | |
} | |
function ga() { | |
var b = (y.scope.searchText || "").length; | |
return y.hasNotFound && !y.matches.length && (!y.loading || 0 !== oa) && b >= (angular.isNumber(a.minLength) ? a.minLength : 1) && (V || aa) && !y.scope.selectedItem | |
} | |
function pa() { | |
var b = a.searchText || "", | |
c = b.toLowerCase(); | |
!a.noCache && u[c] ? qa(u[c]) : ka(b); | |
y.hidden = T() | |
} | |
function qa(b) { | |
y.matches = b; | |
y.hidden = T(); | |
y.loading && S(!1); | |
a.selectOnMatch && ma(); | |
N(); | |
q() | |
} | |
function ma() { | |
var b = a.searchText, | |
c = y.matches, | |
d = c[0]; | |
1 === c.length && K(d).then(function(c) { | |
var d = b == c; | |
a.matchInsensitive && | |
!d && (d = b.toLowerCase() == c.toLowerCase()); | |
d && fa(0) | |
}) | |
} | |
var y = this, | |
ia = a.itemsExpr.split(/ in /i), | |
M = ia[1], | |
G = null, | |
u = {}, | |
aa = !1, | |
Q = [], | |
V = !1, | |
W = 0, | |
oa = 0, | |
ca = null, | |
ha = null; | |
ea("hidden", r, !0); | |
y.scope = a; | |
y.parent = a.$parent; | |
y.itemName = ia[0]; | |
y.matches = []; | |
y.loading = !1; | |
y.hidden = !0; | |
y.index = null; | |
y.messages = []; | |
y.id = c.nextUid(); | |
y.isDisabled = null; | |
y.isRequired = null; | |
y.isReadonly = null; | |
y.hasNotFound = !1; | |
y.keydown = P; | |
y.blur = I; | |
y.focus = C; | |
y.clear = U; | |
y.select = fa; | |
y.listEnter = z; | |
y.listLeave = E; | |
y.mouseUp = F; | |
y.getCurrentDisplayValue = O; | |
y.registerSelectedItemWatcher = | |
B; | |
y.unregisterSelectedItemWatcher = L; | |
y.notFoundVisible = ga; | |
y.loadingIsVisible = ba; | |
y.positionDropdown = q; | |
return k() | |
} | |
MdAutocomplete.$inject = ["$$mdSvgRegistry"]; | |
angular.module("material.components.autocomplete").directive("mdAutocomplete", MdAutocomplete); | |
function MdAutocomplete(a) { | |
return { | |
controller: "MdAutocompleteCtrl", | |
controllerAs: "$mdAutocompleteCtrl", | |
scope: { | |
inputName: "@mdInputName", | |
inputMinlength: "@mdInputMinlength", | |
inputMaxlength: "@mdInputMaxlength", | |
searchText: "=?mdSearchText", | |
selectedItem: "=?mdSelectedItem", | |
itemsExpr: "@mdItems", | |
itemText: "&mdItemText", | |
placeholder: "@placeholder", | |
noCache: "=?mdNoCache", | |
requireMatch: "=?mdRequireMatch", | |
selectOnMatch: "=?mdSelectOnMatch", | |
matchInsensitive: "=?mdMatchCaseInsensitive", | |
itemChange: "&?mdSelectedItemChange", | |
textChange: "&?mdSearchTextChange", | |
minLength: "=?mdMinLength", | |
delay: "=?mdDelay", | |
autofocus: "=?mdAutofocus", | |
floatingLabel: "@?mdFloatingLabel", | |
autoselect: "=?mdAutoselect", | |
menuClass: "@?mdMenuClass", | |
inputId: "@?mdInputId", | |
escapeOptions: "@?mdEscapeOptions" | |
}, | |
link: function(a, c, d, f) { | |
f.hasNotFound = !!c.attr("md-has-not-found") | |
}, | |
template: function(b, c) { | |
function d() { | |
var a = b.find("md-item-template").detach(), | |
c = a.length ? a.html() : b.html(); | |
a.length || b.empty(); | |
return "<md-autocomplete-parent-scope md-autocomplete-replace>" + | |
c + "</md-autocomplete-parent-scope>" | |
} | |
function f() { | |
var a = b.find("md-not-found").detach(); | |
return (a = a.length ? a.html() : "") ? '<li ng-if="$mdAutocompleteCtrl.notFoundVisible()" md-autocomplete-parent-scope>' + a + "</li>" : "" | |
} | |
var e = f(), | |
g = d(), | |
h = b.html(), | |
l = c.tabindex; | |
e && b.attr("md-has-not-found", !0); | |
b.attr("tabindex", "-1"); | |
h = c.mdFloatingLabel ? ' <md-input-container ng-if="floatingLabel"> <label>{{floatingLabel}}</label> <input type="search" ' + | |
(null != l ? 'tabindex="' + l + '"' : "") + ' id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-model-options="{ allowInvalid: true }" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur($event)" ng-focus="$mdAutocompleteCtrl.focus($event)" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" ' + | |
(null != c.mdNoAsterisk ? 'md-no-asterisk="' + c.mdNoAsterisk + '"' : "") + " " + (null != c.mdSelectOnFocus ? 'md-select-on-focus=""' : "") + ' aria-label="{{floatingLabel}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <div md-autocomplete-parent-scope md-autocomplete-replace>' + h + "</div> </md-input-container>" : | |
' <input type="search" ' + (null != l ? 'tabindex="' + l + '"' : "") + ' id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" ng-if="!floatingLabel" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur($event)" ng-focus="$mdAutocompleteCtrl.focus($event)" placeholder="{{placeholder}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" ' + | |
(null != c.mdSelectOnFocus ? 'md-select-on-focus=""' : "") + ' aria-label="{{placeholder}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <button type="button" tabindex="-1" ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled" ng-click="$mdAutocompleteCtrl.clear($event)"> <md-icon md-svg-src="' + | |
a.mdClose + '"></md-icon> <span class="md-visually-hidden">Clear</span> </button> '; | |
return " <md-autocomplete-wrap ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden }\"> " + h + ' <md-progress-linear class="' + (c.mdFloatingLabel ? "md-inline" : "") + '" ng-if="$mdAutocompleteCtrl.loadingIsVisible()" md-mode="indeterminate"></md-progress-linear> <md-virtual-repeat-container md-auto-shrink md-auto-shrink-min="1" ng-mouseenter="$mdAutocompleteCtrl.listEnter()" ng-mouseleave="$mdAutocompleteCtrl.listLeave()" ng-mouseup="$mdAutocompleteCtrl.mouseUp()" ng-hide="$mdAutocompleteCtrl.hidden" class="md-autocomplete-suggestions-container md-whiteframe-z1" ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }" role="presentation"> <ul class="md-autocomplete-suggestions" ng-class="::menuClass" id="ul-{{$mdAutocompleteCtrl.id}}"> <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches" ng-class="{ selected: $index === $mdAutocompleteCtrl.index }" ng-click="$mdAutocompleteCtrl.select($index)" md-extra-name="$mdAutocompleteCtrl.itemName"> ' + | |
g + " </li>" + e + ' </ul> </md-virtual-repeat-container> </md-autocomplete-wrap> <aria-status class="md-visually-hidden" role="status" aria-live="assertive"> <p ng-repeat="message in $mdAutocompleteCtrl.messages track by $index" ng-if="message">{{message}}</p> </aria-status>' | |
} | |
} | |
} | |
MdAutocompleteItemScopeDirective.$inject = ["$compile", "$mdUtil"]; | |
angular.module("material.components.autocomplete").directive("mdAutocompleteParentScope", MdAutocompleteItemScopeDirective); | |
function MdAutocompleteItemScopeDirective(a, b) { | |
function c(a, c, e) { | |
return function(a, c) { | |
function d(c, d) { | |
h[d] = a[c]; | |
a.$watch(c, function(a) { | |
b.nextTick(function() { | |
h[d] = a | |
}) | |
}) | |
} | |
function f() { | |
var b = !1, | |
c = !1; | |
a.$watch(function() { | |
c || b || (b = !0, a.$$postDigest(function() { | |
c || h.$digest(); | |
b = c = !1 | |
})) | |
}); | |
h.$watch(function() { | |
c = !0 | |
}) | |
} | |
var g = a.$mdAutocompleteCtrl, | |
h = g.parent.$new(), | |
g = g.itemName; | |
d("$index", "$index"); | |
d("item", g); | |
f(); | |
e(h, function(a) { | |
c.after(a) | |
}) | |
} | |
} | |
return { | |
restrict: "AE", | |
compile: c, | |
terminal: !0, | |
transclude: "element" | |
} | |
} | |
MdHighlightCtrl.$inject = ["$scope", "$element", "$attrs"]; | |
angular.module("material.components.autocomplete").controller("MdHighlightCtrl", MdHighlightCtrl); | |
function MdHighlightCtrl(a, b, c) { | |
this.$scope = a; | |
this.$element = b; | |
this.$attrs = c; | |
this.regex = null | |
} | |
MdHighlightCtrl.prototype.init = function(a, b) { | |
this.flags = this.$attrs.mdHighlightFlags || ""; | |
this.unregisterFn = this.$scope.$watch(function(c) { | |
return { | |
term: a(c), | |
contentText: b(c) | |
} | |
}.bind(this), this.onRender.bind(this), !0); | |
this.$element.on("$destroy", this.unregisterFn) | |
}; | |
MdHighlightCtrl.prototype.onRender = function(a, b) { | |
var c = a.contentText; | |
if (null === this.regex || a.term !== b.term) this.regex = this.createRegex(a.term, this.flags); | |
a.term ? this.applyRegex(c) : this.$element.text(c) | |
}; | |
MdHighlightCtrl.prototype.applyRegex = function(a) { | |
a = this.resolveTokens(a); | |
this.$element.empty(); | |
a.forEach(function(a) { | |
a.isMatch ? (a = angular.element('<span class="highlight">').text(a.text), this.$element.append(a)) : this.$element.append(document.createTextNode(a)) | |
}.bind(this)) | |
}; | |
MdHighlightCtrl.prototype.resolveTokens = function(a) { | |
function b(b, d) { | |
(b = a.slice(b, d)) && c.push(b) | |
} | |
var c = [], | |
d = 0; | |
a.replace(this.regex, function(a, e) { | |
b(d, e); | |
c.push({ | |
text: a, | |
isMatch: !0 | |
}); | |
d = e + a.length | |
}); | |
b(d); | |
return c | |
}; | |
MdHighlightCtrl.prototype.createRegex = function(a, b) { | |
var c = "", | |
d = ""; | |
a = this.sanitizeRegex(a); | |
0 <= b.indexOf("^") && (c = "^"); | |
0 <= b.indexOf("$") && (d = "$"); | |
return new RegExp(c + a + d, b.replace(/[$\^]/g, "")) | |
}; | |
MdHighlightCtrl.prototype.sanitizeRegex = function(a) { | |
return a && a.toString().replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g, "\\$&") | |
}; | |
MdHighlight.$inject = ["$interpolate", "$parse"]; | |
angular.module("material.components.autocomplete").directive("mdHighlightText", MdHighlight); | |
function MdHighlight(a, b) { | |
return { | |
terminal: !0, | |
controller: "MdHighlightCtrl", | |
compile: function(c, d) { | |
var f = b(d.mdHighlightText), | |
e = a(c.html()); | |
return function(a, b, c, d) { | |
d.init(f, e) | |
} | |
} | |
} | |
} | |
ngmaterial.components.autocomplete = angular.module("material.components.autocomplete"); | |
angular.module("material.components.backdrop", ["material.core"]).directive("mdBackdrop", ["$mdTheming", "$mdUtil", "$animate", "$rootElement", "$window", "$log", "$$rAF", "$document", function(a, b, c, d, f, e, g, h) { | |
function l(l, p) { | |
function k() { | |
var a = parseInt(m.height, 10) + Math.abs(parseInt(m.top, 10)); | |
p.css("height", a + "px") | |
} | |
c.pin && c.pin(p, d); | |
var m; | |
g(function() { | |
m = f.getComputedStyle(h[0].body); | |
if ("fixed" === m.position) { | |
var c = b.debounce(function() { | |
m = f.getComputedStyle(h[0].body); | |
k() | |
}, 60, null, !1); | |
k(); | |
angular.element(f).on("resize", | |
c); | |
l.$on("$destroy", function() { | |
angular.element(f).off("resize", c) | |
}) | |
} | |
var d = p.parent(); | |
if (d.length) { | |
"BODY" === d[0].nodeName && p.css("position", "fixed"); | |
var g = f.getComputedStyle(d[0]); | |
"static" === g.position && e.warn("<md-backdrop> may not work properly in a scrolled, static-positioned parent container."); | |
a.inherit(p, d) | |
} | |
}) | |
} | |
return { | |
restrict: "E", | |
link: l | |
} | |
}]); | |
ngmaterial.components.backdrop = angular.module("material.components.backdrop"); | |
MdBottomSheetDirective.$inject = ["$mdBottomSheet"]; | |
MdBottomSheetProvider.$inject = ["$$interimElementProvider"]; | |
angular.module("material.components.bottomSheet", ["material.core", "material.components.backdrop"]).directive("mdBottomSheet", MdBottomSheetDirective).provider("$mdBottomSheet", MdBottomSheetProvider); | |
function MdBottomSheetDirective(a) { | |
return { | |
restrict: "E", | |
link: function(b, c) { | |
c.addClass("_md"); | |
b.$on("$destroy", function() { | |
a.destroy() | |
}) | |
} | |
} | |
} | |
function MdBottomSheetProvider(a) { | |
function b(a, b, f, e, g, h, l, n) { | |
function c(c, d, k) { | |
d = f.extractElementByName(d, "md-bottom-sheet"); | |
d.attr("tabindex", "-1"); | |
if (d.hasClass("ng-cloak")) { | |
var l = "$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations."; | |
n.warn(l, d[0]) | |
} | |
if (!k.disableBackdrop) { | |
q = f.createBackdrop(c, "md-bottom-sheet-backdrop md-opaque"); | |
q[0].tabIndex = -1; | |
if (k.clickOutsideToClose) q.on("click", function() { | |
f.nextTick(g.cancel, !0) | |
}); | |
e.inherit(q, k.parent); | |
a.enter(q, | |
k.parent, null) | |
} | |
c = new m(d, k.parent); | |
k.bottomSheet = c; | |
e.inherit(c.element, k.parent); | |
k.disableParentScroll && (k.restoreScroll = f.disableScrollAround(c.element, k.parent)); | |
return a.enter(c.element, k.parent, q).then(function() { | |
var a = f.findFocusTarget(d) || angular.element(d[0].querySelector("button") || d[0].querySelector("a") || d[0].querySelector(f.prefixer("ng-click", !0))) || q; | |
k.escapeToClose && (k.rootElementKeyupCallback = function(a) { | |
a.keyCode === b.KEY_CODE.ESCAPE && f.nextTick(g.cancel, !0) | |
}, h.on("keyup", k.rootElementKeyupCallback), | |
a && a.focus()) | |
}) | |
} | |
function d(b, c, d) { | |
var f = d.bottomSheet; | |
d.disableBackdrop || a.leave(q); | |
return a.leave(f.element).then(function() { | |
d.disableParentScroll && (d.restoreScroll(), delete d.restoreScroll); | |
f.cleanup() | |
}) | |
} | |
function m(a, c) { | |
function d() { | |
a.css(b.CSS.TRANSITION_DURATION, "0ms") | |
} | |
function e(c) { | |
c = c.pointer.distanceY; | |
5 > c && (c = Math.max(-80, c / 2)); | |
a.css(b.CSS.TRANSFORM, "translate3d(0," + (80 + c) + "px,0)") | |
} | |
function h(c) { | |
if (0 < c.pointer.distanceY && (20 < c.pointer.distanceY || .5 < Math.abs(c.pointer.velocityY))) { | |
var d = a.prop("offsetHeight") - | |
c.pointer.distanceY; | |
c = Math.min(d / c.pointer.velocityY * .75, 500); | |
a.css(b.CSS.TRANSITION_DURATION, c + "ms"); | |
f.nextTick(g.cancel, !0) | |
} else a.css(b.CSS.TRANSITION_DURATION, ""), a.css(b.CSS.TRANSFORM, "") | |
} | |
var k = l.register(c, "drag", { | |
horizontal: !1 | |
}); | |
c.on("$md.dragstart", d).on("$md.drag", e).on("$md.dragend", h); | |
return { | |
element: a, | |
cleanup: function() { | |
k(); | |
c.off("$md.dragstart", d); | |
c.off("$md.drag", e); | |
c.off("$md.dragend", h) | |
} | |
} | |
} | |
var q; | |
return { | |
themable: !0, | |
onShow: c, | |
onRemove: d, | |
disableBackdrop: !1, | |
escapeToClose: !0, | |
clickOutsideToClose: !0, | |
disableParentScroll: !0 | |
} | |
} | |
b.$inject = "$animate $mdConstant $mdUtil $mdTheming $mdBottomSheet $rootElement $mdGesture $log".split(" "); | |
return a("$mdBottomSheet").setDefaults({ | |
methods: ["disableParentScroll", "escapeToClose", "clickOutsideToClose"], | |
options: b | |
}) | |
} | |
ngmaterial.components.bottomSheet = angular.module("material.components.bottomSheet"); | |
MdButtonDirective.$inject = ["$mdButtonInkRipple", "$mdTheming", "$mdAria", "$timeout"]; | |
MdAnchorDirective.$inject = ["$mdTheming"]; | |
angular.module("material.components.button", ["material.core"]).directive("mdButton", MdButtonDirective).directive("a", MdAnchorDirective); | |
function MdAnchorDirective(a) { | |
return { | |
restrict: "E", | |
link: function(b, c) { | |
a(c) | |
} | |
} | |
} | |
function MdButtonDirective(a, b, c, d) { | |
function f(a) { | |
return angular.isDefined(a.href) || angular.isDefined(a.ngHref) || angular.isDefined(a.ngLink) || angular.isDefined(a.uiSref) | |
} | |
function e(a, b) { | |
if (f(b)) return '<a class="md-button" ng-transclude></a>'; | |
a = "undefined" === typeof b.type ? "button" : b.type; | |
return '<button class="md-button" type="' + a + '" ng-transclude></button>' | |
} | |
function g(e, g, n) { | |
b(g); | |
a.attach(e, g); | |
c.expectWithoutText(g, "aria-label"); | |
f(n) && angular.isDefined(n.ngDisabled) && e.$watch(n.ngDisabled, function(a) { | |
g.attr("tabindex", | |
a ? -1 : 0) | |
}); | |
g.on("click", function(a) { | |
!0 === n.disabled && (a.preventDefault(), a.stopImmediatePropagation()) | |
}); | |
g.hasClass("md-no-focus") || (e.mouseActive = !1, g.on("mousedown", function() { | |
e.mouseActive = !0; | |
d(function() { | |
e.mouseActive = !1 | |
}, 100) | |
}).on("focus", function() { | |
!1 === e.mouseActive && g.addClass("md-focused") | |
}).on("blur", function() { | |
g.removeClass("md-focused") | |
})) | |
} | |
return { | |
restrict: "EA", | |
replace: !0, | |
transclude: !0, | |
template: e, | |
link: g | |
} | |
} | |
ngmaterial.components.button = angular.module("material.components.button"); | |
mdCardDirective.$inject = ["$mdTheming"]; | |
angular.module("material.components.card", ["material.core"]).directive("mdCard", mdCardDirective); | |
function mdCardDirective(a) { | |
return { | |
restrict: "E", | |
link: function(b, c) { | |
c.addClass("_md"); | |
a(c) | |
} | |
} | |
} | |
ngmaterial.components.card = angular.module("material.components.card"); | |
MdCheckboxDirective.$inject = "inputDirective $mdAria $mdConstant $mdTheming $mdUtil $timeout".split(" "); | |
angular.module("material.components.checkbox", ["material.core"]).directive("mdCheckbox", MdCheckboxDirective); | |
function MdCheckboxDirective(a, b, c, d, f, e) { | |
function g(g, l) { | |
function h(g, h, m, l) { | |
function k(a, b, c) { | |
m[a] && g.$watch(m[a], function(a) { | |
c[a] && h.attr(b, c[a]) | |
}) | |
} | |
function q(a) { | |
var b = a.which || a.keyCode; | |
if (b === c.KEY_CODE.SPACE || b === c.KEY_CODE.ENTER) a.preventDefault(), h.addClass("md-focused"), n(a) | |
} | |
function n(a) { | |
h[0].hasAttribute("disabled") || g.skipToggle || g.$apply(function() { | |
var b = m.ngChecked ? m.checked : !l.$viewValue; | |
l.$setViewValue(b, a && a.type); | |
l.$render() | |
}) | |
} | |
function r() { | |
h.toggleClass("md-checked", !!l.$viewValue && | |
!p) | |
} | |
function v(a) { | |
(p = !1 !== a) && h.attr("aria-checked", "mixed"); | |
h.toggleClass("md-indeterminate", p) | |
} | |
var p; | |
l = l || f.fakeNgModel(); | |
d(h); | |
h.children().on("focus", function() { | |
h.focus() | |
}); | |
f.parseAttributeBoolean(m.mdIndeterminate) && (v(), g.$watch(m.mdIndeterminate, v)); | |
m.ngChecked && g.$watch(g.$eval.bind(g, m.ngChecked), function(a) { | |
l.$setViewValue(a); | |
l.$render() | |
}); | |
k("ngDisabled", "tabindex", { | |
"true": "-1", | |
"false": m.tabindex | |
}); | |
b.expectWithText(h, "aria-label"); | |
a.link.pre(g, { | |
on: angular.noop, | |
0: {} | |
}, m, [l]); | |
g.mouseActive = !1; | |
h.on("click", n).on("keypress", q).on("mousedown", function() { | |
g.mouseActive = !0; | |
e(function() { | |
g.mouseActive = !1 | |
}, 100) | |
}).on("focus", function() { | |
!1 === g.mouseActive && h.addClass("md-focused") | |
}).on("blur", function() { | |
h.removeClass("md-focused") | |
}); | |
l.$render = r | |
} | |
l.$set("tabindex", l.tabindex || "0"); | |
l.$set("type", "checkbox"); | |
l.$set("role", l.type); | |
return { | |
pre: function(a, b) { | |
b.on("click", function(a) { | |
this.hasAttribute("disabled") && a.stopImmediatePropagation() | |
}) | |
}, | |
post: h | |
} | |
} | |
a = a[0]; | |
return { | |
restrict: "E", | |
transclude: !0, | |
require: "?ngModel", | |
priority: 210, | |
template: '<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>', | |
compile: g | |
} | |
} | |
ngmaterial.components.checkbox = angular.module("material.components.checkbox"); | |
angular.module("material.components.chips", ["material.core", "material.components.autocomplete"]); | |
MdChipCtrl.$inject = ["$scope", "$element", "$mdConstant", "$timeout", "$mdUtil"]; | |
angular.module("material.components.chips").controller("MdChipCtrl", MdChipCtrl); | |
function MdChipCtrl(a, b, c, d, f) { | |
this.$scope = a; | |
this.$element = b; | |
this.$mdConstant = c; | |
this.$timeout = d; | |
this.$mdUtil = f; | |
this.isEditting = !1; | |
this.parentController = void 0; | |
this.enableChipEdit = !1 | |
} | |
MdChipCtrl.prototype.init = function(a) { | |
this.parentController = a; | |
if (this.enableChipEdit = this.parentController.enableChipEdit) this.$element.on("keydown", this.chipKeyDown.bind(this)), this.$element.on("mousedown", this.chipMouseDown.bind(this)), this.getChipContent().addClass("_md-chip-content-edit-is-enabled") | |
}; | |
MdChipCtrl.prototype.getChipContent = function() { | |
var a = this.$element[0].getElementsByClassName("md-chip-content"); | |
return angular.element(a[0]) | |
}; | |
MdChipCtrl.prototype.getContentElement = function() { | |
return angular.element(this.getChipContent().children()[0]) | |
}; | |
MdChipCtrl.prototype.getChipIndex = function() { | |
return parseInt(this.$element.attr("index")) | |
}; | |
MdChipCtrl.prototype.goOutOfEditMode = function() { | |
if (this.isEditting) { | |
this.isEditting = !1; | |
this.$element.removeClass("_md-chip-editing"); | |
this.getChipContent()[0].contentEditable = "false"; | |
var a = this.getChipIndex(), | |
b = this.getContentElement().text(); | |
b ? (this.parentController.updateChipContents(a, this.getContentElement().text()), this.$mdUtil.nextTick(function() { | |
this.parentController.selectedChip === a && this.parentController.focusChip(a) | |
}.bind(this))) : this.parentController.removeChipAndFocusInput(a) | |
} | |
}; | |
MdChipCtrl.prototype.selectNodeContents = function(a) { | |
var b, c; | |
document.body.createTextRange ? (b = document.body.createTextRange(), b.moveToElementText(a), b.select()) : window.getSelection && (c = window.getSelection(), b = document.createRange(), b.selectNodeContents(a), c.removeAllRanges(), c.addRange(b)) | |
}; | |
MdChipCtrl.prototype.goInEditMode = function() { | |
this.isEditting = !0; | |
this.$element.addClass("_md-chip-editing"); | |
this.getChipContent()[0].contentEditable = "true"; | |
this.getChipContent().on("blur", function() { | |
this.goOutOfEditMode() | |
}.bind(this)); | |
this.selectNodeContents(this.getChipContent()[0]) | |
}; | |
MdChipCtrl.prototype.chipKeyDown = function(a) { | |
this.isEditting || a.keyCode !== this.$mdConstant.KEY_CODE.ENTER && a.keyCode !== this.$mdConstant.KEY_CODE.SPACE ? this.isEditting && a.keyCode === this.$mdConstant.KEY_CODE.ENTER && (a.preventDefault(), this.goOutOfEditMode()) : (a.preventDefault(), this.goInEditMode()) | |
}; | |
MdChipCtrl.prototype.chipMouseDown = function() { | |
this.getChipIndex() == this.parentController.selectedChip && this.enableChipEdit && !this.isEditting && this.goInEditMode() | |
}; | |
MdChip.$inject = ["$mdTheming", "$mdUtil"]; | |
angular.module("material.components.chips").directive("mdChip", MdChip); | |
function MdChip(a, b) { | |
function c(c) { | |
c.append(b.processTemplate(d)); | |
return function(b, c, d, f) { | |
var e = f.shift(); | |
b = f.shift(); | |
a(c); | |
e && (b.init(e), angular.element(c[0].querySelector(".md-chip-content")).on("blur", function() { | |
e.resetSelectedChip(); | |
e.$scope.$applyAsync() | |
})) | |
} | |
} | |
var d = b.processTemplate(' <span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden"> {{$mdChipsCtrl.deleteHint}} </span>'); | |
return { | |
restrict: "E", | |
require: ["^?mdChips", "mdChip"], | |
compile: c, | |
controller: "MdChipCtrl" | |
} | |
} | |
MdChipRemove.$inject = ["$timeout"]; | |
angular.module("material.components.chips").directive("mdChipRemove", MdChipRemove); | |
function MdChipRemove(a) { | |
function b(b, d, f, e) { | |
d.on("click", function() { | |
b.$apply(function() { | |
e.removeChip(b.$$replacedScope.$index) | |
}) | |
}); | |
a(function() { | |
d.attr({ | |
tabindex: -1, | |
"aria-hidden": !0 | |
}); | |
d.find("button").attr("tabindex", "-1") | |
}) | |
} | |
return { | |
restrict: "A", | |
require: "^mdChips", | |
scope: !1, | |
link: b | |
} | |
} | |
MdChipTransclude.$inject = ["$compile"]; | |
angular.module("material.components.chips").directive("mdChipTransclude", MdChipTransclude); | |
function MdChipTransclude(a) { | |
function b(b, d, f) { | |
var c = b.$parent.$mdChipsCtrl, | |
g = c.parent.$new(!1, c.parent); | |
g.$$replacedScope = b; | |
g.$chip = b.$chip; | |
g.$index = b.$index; | |
g.$mdChipsCtrl = c; | |
b = c.$scope.$eval(f.mdChipTransclude); | |
d.html(b); | |
a(d.contents())(g) | |
} | |
return { | |
restrict: "EA", | |
terminal: !0, | |
link: b, | |
scope: !1 | |
} | |
} | |
MdChipsCtrl.$inject = "$scope $attrs $mdConstant $log $element $timeout $mdUtil".split(" "); | |
angular.module("material.components.chips").controller("MdChipsCtrl", MdChipsCtrl); | |
function MdChipsCtrl(a, b, c, d, f, e, g) { | |
this.$timeout = e; | |
this.$mdConstant = c; | |
this.$scope = a; | |
this.parent = a.$parent; | |
this.$log = d; | |
this.$element = f; | |
this.userInputElement = this.autocompleteCtrl = this.userInputNgModelCtrl = this.ngModelCtrl = null; | |
this.items = []; | |
this.selectedChip = -1; | |
this.enableChipEdit = g.parseAttributeBoolean(b.mdEnableChipEdit); | |
this.addOnBlur = g.parseAttributeBoolean(b.mdAddOnBlur); | |
this.deleteHint = "Press delete to remove this chip."; | |
this.deleteButtonLabel = "Remove"; | |
this.chipBuffer = ""; | |
this.useOnRemove = this.useOnAdd = | |
this.useTransformChip = !1 | |
} | |
MdChipsCtrl.prototype.inputKeydown = function(a) { | |
var b = this.getChipBuffer(); | |
if (!(this.autocompleteCtrl && a.isDefaultPrevented && a.isDefaultPrevented())) | |
if (a.keyCode === this.$mdConstant.KEY_CODE.BACKSPACE) 0 === this.getCursorPosition(a.target) && (a.preventDefault(), a.stopPropagation(), this.items.length && this.selectAndFocusChipSafe(this.items.length - 1)); | |
else { | |
if (!this.separatorKeys || 1 > this.separatorKeys.length) this.separatorKeys = [this.$mdConstant.KEY_CODE.ENTER]; - 1 === this.separatorKeys.indexOf(a.keyCode) || this.autocompleteCtrl && | |
this.requireMatch || !b || (a.preventDefault(), this.hasMaxChipsReached() || (this.appendChip(b.trim()), this.resetChipBuffer())) | |
} | |
}; | |
MdChipsCtrl.prototype.getCursorPosition = function(a) { | |
try { | |
if (a.selectionStart === a.selectionEnd) return a.selectionStart | |
} catch (b) { | |
if (!a.value) return 0 | |
} | |
}; | |
MdChipsCtrl.prototype.updateChipContents = function(a, b) { | |
0 <= a && a < this.items.length && (this.items[a] = b, this.ngModelCtrl.$setDirty()) | |
}; | |
MdChipsCtrl.prototype.isEditingChip = function() { | |
return !!this.$element[0].getElementsByClassName("_md-chip-editing").length | |
}; | |
MdChipsCtrl.prototype.isRemovable = function() { | |
return this.ngModelCtrl ? this.readonly ? this.removable : angular.isDefined(this.removable) ? this.removable : !0 : !1 | |
}; | |
MdChipsCtrl.prototype.chipKeydown = function(a) { | |
if (!this.getChipBuffer() && !this.isEditingChip()) switch (a.keyCode) { | |
case this.$mdConstant.KEY_CODE.BACKSPACE: | |
case this.$mdConstant.KEY_CODE.DELETE: | |
if (0 > this.selectedChip) break; | |
a.preventDefault(); | |
if (!this.isRemovable()) break; | |
this.removeAndSelectAdjacentChip(this.selectedChip); | |
break; | |
case this.$mdConstant.KEY_CODE.LEFT_ARROW: | |
a.preventDefault(); | |
0 > this.selectedChip && (this.selectedChip = this.items.length); | |
this.items.length && this.selectAndFocusChipSafe(this.selectedChip - | |
1); | |
break; | |
case this.$mdConstant.KEY_CODE.RIGHT_ARROW: | |
a.preventDefault(); | |
this.selectAndFocusChipSafe(this.selectedChip + 1); | |
break; | |
case this.$mdConstant.KEY_CODE.ESCAPE: | |
case this.$mdConstant.KEY_CODE.TAB: | |
0 > this.selectedChip || (a.preventDefault(), this.onFocus()) | |
} | |
}; | |
MdChipsCtrl.prototype.getPlaceholder = function() { | |
var a = this.items && this.items.length && ("" == this.secondaryPlaceholder || this.secondaryPlaceholder); | |
return a ? this.secondaryPlaceholder : this.placeholder | |
}; | |
MdChipsCtrl.prototype.removeAndSelectAdjacentChip = function(a) { | |
var b = this.getAdjacentChipIndex(a); | |
this.removeChip(a); | |
this.$timeout(angular.bind(this, function() { | |
this.selectAndFocusChipSafe(b) | |
})) | |
}; | |
MdChipsCtrl.prototype.resetSelectedChip = function() { | |
this.selectedChip = -1 | |
}; | |
MdChipsCtrl.prototype.getAdjacentChipIndex = function(a) { | |
var b = this.items.length - 1; | |
return 0 == b ? -1 : a == b ? a - 1 : a | |
}; | |
MdChipsCtrl.prototype.appendChip = function(a) { | |
if (this.useTransformChip && this.transformChip) { | |
var b = this.transformChip({ | |
$chip: a | |
}); | |
angular.isDefined(b) && (a = b) | |
} | |
if (angular.isObject(a) && (b = this.items.some(function(b) { | |
return angular.equals(a, b) | |
}))) return; | |
if (!(null == a || this.items.indexOf(a) + 1) && (b = this.items.push(a), this.ngModelCtrl.$setDirty(), this.validateModel(), this.useOnAdd && this.onAdd)) this.onAdd({ | |
$chip: a, | |
$index: b | |
}) | |
}; | |
MdChipsCtrl.prototype.useTransformChipExpression = function() { | |
this.useTransformChip = !0 | |
}; | |
MdChipsCtrl.prototype.useOnAddExpression = function() { | |
this.useOnAdd = !0 | |
}; | |
MdChipsCtrl.prototype.useOnRemoveExpression = function() { | |
this.useOnRemove = !0 | |
}; | |
MdChipsCtrl.prototype.useOnSelectExpression = function() { | |
this.useOnSelect = !0 | |
}; | |
MdChipsCtrl.prototype.getChipBuffer = function() { | |
return this.userInputElement ? this.userInputNgModelCtrl ? this.userInputNgModelCtrl.$viewValue : this.userInputElement[0].value : this.chipBuffer | |
}; | |
MdChipsCtrl.prototype.resetChipBuffer = function() { | |
this.userInputElement ? this.userInputNgModelCtrl ? (this.userInputNgModelCtrl.$setViewValue(""), this.userInputNgModelCtrl.$render()) : this.userInputElement[0].value = "" : this.chipBuffer = "" | |
}; | |
MdChipsCtrl.prototype.hasMaxChipsReached = function() { | |
angular.isString(this.maxChips) && (this.maxChips = parseInt(this.maxChips, 10) || 0); | |
return 0 < this.maxChips && this.items.length >= this.maxChips | |
}; | |
MdChipsCtrl.prototype.validateModel = function() { | |
this.ngModelCtrl.$setValidity("md-max-chips", !this.hasMaxChipsReached()) | |
}; | |
MdChipsCtrl.prototype.removeChip = function(a) { | |
var b = this.items.splice(a, 1); | |
this.ngModelCtrl.$setDirty(); | |
this.validateModel(); | |
if (b && b.length && this.useOnRemove && this.onRemove) this.onRemove({ | |
$chip: b[0], | |
$index: a | |
}) | |
}; | |
MdChipsCtrl.prototype.removeChipAndFocusInput = function(a) { | |
this.removeChip(a); | |
if (this.autocompleteCtrl) this.autocompleteCtrl.hidden = !0, this.$mdUtil.nextTick(this.onFocus.bind(this)); | |
else this.onFocus() | |
}; | |
MdChipsCtrl.prototype.selectAndFocusChipSafe = function(a) { | |
if (this.items.length) { | |
if (a === this.items.length) return this.onFocus(); | |
a = Math.max(a, 0); | |
a = Math.min(a, this.items.length - 1); | |
this.selectChip(a); | |
this.focusChip(a) | |
} else this.selectChip(-1), this.onFocus() | |
}; | |
MdChipsCtrl.prototype.selectChip = function(a) { | |
if (-1 <= a && a <= this.items.length) { | |
if (this.selectedChip = a, this.useOnSelect && this.onSelect) this.onSelect({ | |
$chip: this.items[this.selectedChip] | |
}) | |
} else this.$log.warn("Selected Chip index out of bounds; ignoring.") | |
}; | |
MdChipsCtrl.prototype.selectAndFocusChip = function(a) { | |
this.selectChip(a); - 1 != a && this.focusChip(a) | |
}; | |
MdChipsCtrl.prototype.focusChip = function(a) { | |
this.$element[0].querySelector('md-chip[index="' + a + '"] .md-chip-content').focus() | |
}; | |
MdChipsCtrl.prototype.configureNgModel = function(a) { | |
this.ngModelCtrl = a; | |
var b = this; | |
a.$render = function() { | |
b.items = b.ngModelCtrl.$viewValue | |
} | |
}; | |
MdChipsCtrl.prototype.onFocus = function() { | |
var a = this.$element[0].querySelector("input"); | |
a && a.focus(); | |
this.resetSelectedChip() | |
}; | |
MdChipsCtrl.prototype.onInputFocus = function() { | |
this.inputHasFocus = !0; | |
this.resetSelectedChip() | |
}; | |
MdChipsCtrl.prototype.onInputBlur = function() { | |
this.inputHasFocus = !1; | |
var a = this.getChipBuffer().trim(); | |
this.validateModel(); | |
var b = this.ngModelCtrl.$valid; | |
this.userInputNgModelCtrl && (b &= this.userInputNgModelCtrl.$valid); | |
this.addOnBlur && a && b && (this.appendChip(a), this.resetChipBuffer()) | |
}; | |
MdChipsCtrl.prototype.configureUserInput = function(a) { | |
this.userInputElement = a; | |
var b = a.controller("ngModel"); | |
b != this.ngModelCtrl && (this.userInputNgModelCtrl = b); | |
var c = this.$scope, | |
d = this; | |
a.attr({ | |
tabindex: 0 | |
}).on("keydown", function(a) { | |
c.$evalAsync(angular.bind(d, d.inputKeydown, a)) | |
}).on("focus", function(a) { | |
c.$evalAsync(angular.bind(d, d.onInputFocus, a)) | |
}).on("blur", function(a) { | |
c.$evalAsync(angular.bind(d, d.onInputBlur, a)) | |
}) | |
}; | |
MdChipsCtrl.prototype.configureAutocomplete = function(a) { | |
a && (this.autocompleteCtrl = a, a.registerSelectedItemWatcher(angular.bind(this, function(a) { | |
a && !this.hasMaxChipsReached() && (this.appendChip(a), this.resetChipBuffer()) | |
})), this.$element.find("input").on("focus", angular.bind(this, this.onInputFocus)).on("blur", angular.bind(this, this.onInputBlur))) | |
}; | |
MdChipsCtrl.prototype.hasFocus = function() { | |
return this.inputHasFocus || 0 <= this.selectedChip | |
}; | |
MdChips.$inject = "$mdTheming $mdUtil $compile $log $timeout $$mdSvgRegistry".split(" "); | |
angular.module("material.components.chips").directive("mdChips", MdChips); | |
function MdChips(a, b, c, d, f, e) { | |
function g(g, n) { | |
function l(a) { | |
if (n.ngModel) return (a = k[0].querySelector(a)) && a.outerHTML | |
} | |
var k = n.$mdUserTemplate; | |
n.$mdUserTemplate = null; | |
var m = l("md-chips>md-chip-template"); | |
g = b.prefixer().buildList("md-chip-remove").map(function(a) { | |
return "md-chips>*[" + a + "]" | |
}).join(","); | |
var q = l(g) || h.remove, | |
w = m || h["default"], | |
t = l("md-chips>md-autocomplete") || l("md-chips>input") || h.input, | |
x = k.find("md-chip"); | |
k[0].querySelector("md-chip-template>*[md-chip-remove]") && d.warn("invalid placement of md-chip-remove within md-chip-template."); | |
return function(d, g, k, l) { | |
b.initOptionalProperties(d, n); | |
a(g); | |
var r = l[0]; | |
m && (r.enableChipEdit = !1); | |
r.chipContentsTemplate = w; | |
r.chipRemoveTemplate = q; | |
r.chipInputTemplate = t; | |
r.mdCloseIcon = e.mdClose; | |
g.attr({ | |
"aria-hidden": !0, | |
tabindex: -1 | |
}).on("focus", function() { | |
r.onFocus() | |
}); | |
n.ngModel && (r.configureNgModel(g.controller("ngModel")), k.mdTransformChip && r.useTransformChipExpression(), k.mdOnAppend && r.useOnAppendExpression(), k.mdOnAdd && r.useOnAddExpression(), k.mdOnRemove && r.useOnRemoveExpression(), k.mdOnSelect && r.useOnSelectExpression(), | |
t != h.input && d.$watch("$mdChipsCtrl.readonly", function(a) { | |
a || b.nextTick(function() { | |
if (0 === t.indexOf("<md-autocomplete")) { | |
var a = g.find("md-autocomplete"); | |
r.configureAutocomplete(a.controller("mdAutocomplete")) | |
} | |
r.configureUserInput(g.find("input")) | |
}) | |
}), b.nextTick(function() { | |
var a = g.find("input"); | |
a && a.toggleClass("md-input", !0) | |
})); | |
if (0 < x.length) { | |
var v = c(x.clone())(d.$parent); | |
f(function() { | |
g.find("md-chips-wrap").prepend(v) | |
}) | |
} | |
} | |
} | |
var h = { | |
chips: b.processTemplate(' <md-chips-wrap ng-keydown="$mdChipsCtrl.chipKeydown($event)" ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly, \'md-removable\': $mdChipsCtrl.isRemovable() }" class="md-chips"> <md-chip ng-repeat="$chip in $mdChipsCtrl.items" index="{{$index}}" ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"> <div class="md-chip-content" tabindex="-1" aria-hidden="true" ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)" ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)" md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div> <div ng-if="$mdChipsCtrl.isRemovable()" class="md-chip-remove-container" md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div> </md-chip> <div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl"> <div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div> </div> </md-chips-wrap>'), | |
input: b.processTemplate(' <input class="md-input" tabindex="0" placeholder="{{$mdChipsCtrl.getPlaceholder()}}" aria-label="{{$mdChipsCtrl.getPlaceholder()}}" ng-model="$mdChipsCtrl.chipBuffer" ng-focus="$mdChipsCtrl.onInputFocus()" ng-blur="$mdChipsCtrl.onInputBlur()" ng-keydown="$mdChipsCtrl.inputKeydown($event)">'), | |
"default": b.processTemplate(" <span>{{$chip}}</span>"), | |
remove: b.processTemplate(' <button class="md-chip-remove" ng-if="$mdChipsCtrl.isRemovable()" ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)" type="button" aria-hidden="true" tabindex="-1"> <md-icon md-svg-src="{{ $mdChipsCtrl.mdCloseIcon }}"></md-icon> <span class="md-visually-hidden"> {{$mdChipsCtrl.deleteButtonLabel}} </span> </button>') | |
}; | |
return { | |
template: function(a, b) { | |
b.$mdUserTemplate = a.clone(); | |
return h.chips | |
}, | |
require: ["mdChips"], | |
restrict: "E", | |
controller: "MdChipsCtrl", | |
controllerAs: "$mdChipsCtrl", | |
bindToController: !0, | |
compile: g, | |
scope: { | |
readonly: "=readonly", | |
removable: "=mdRemovable", | |
placeholder: "@", | |
secondaryPlaceholder: "@", | |
maxChips: "@mdMaxChips", | |
transformChip: "&mdTransformChip", | |
onAppend: "&mdOnAppend", | |
onAdd: "&mdOnAdd", | |
onRemove: "&mdOnRemove", | |
onSelect: "&mdOnSelect", | |
deleteHint: "@", | |
deleteButtonLabel: "@", | |
separatorKeys: "=?mdSeparatorKeys", | |
requireMatch: "=?mdRequireMatch" | |
} | |
} | |
} | |
angular.module("material.components.chips").controller("MdContactChipsCtrl", MdContactChipsCtrl); | |
function MdContactChipsCtrl() { | |
this.selectedItem = null; | |
this.searchText = "" | |
} | |
MdContactChipsCtrl.prototype.queryContact = function(a) { | |
a = this.contactQuery({ | |
$query: a | |
}); | |
return this.filterSelected ? a.filter(angular.bind(this, this.filterSelectedContacts)) : a | |
}; | |
MdContactChipsCtrl.prototype.itemName = function(a) { | |
return a[this.contactName] | |
}; | |
MdContactChipsCtrl.prototype.filterSelectedContacts = function(a) { | |
return -1 == this.contacts.indexOf(a) | |
}; | |
MdContactChips.$inject = ["$mdTheming", "$mdUtil"]; | |
angular.module("material.components.chips").directive("mdContactChips", MdContactChips); | |
function MdContactChips(a, b) { | |
function c(c, f) { | |
return function(c, d) { | |
b.initOptionalProperties(c, f); | |
a(d); | |
d.attr("tabindex", "-1") | |
} | |
} | |
return { | |
template: function() { | |
return ' <md-chips class="md-contact-chips" ng-model="$mdContactChipsCtrl.contacts" md-require-match="$mdContactChipsCtrl.requireMatch" md-autocomplete-snap> <md-autocomplete md-menu-class="md-contact-chips-suggestions" md-selected-item="$mdContactChipsCtrl.selectedItem" md-search-text="$mdContactChipsCtrl.searchText" md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)" md-item-text="$mdContactChipsCtrl.itemName(item)" md-no-cache="true" md-autoselect placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ? $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}"> <div class="md-contact-suggestion"> <img ng-src="{{item[$mdContactChipsCtrl.contactImage]}}" alt="{{item[$mdContactChipsCtrl.contactName]}}" ng-if="item[$mdContactChipsCtrl.contactImage]" /> <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText" md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}"> {{item[$mdContactChipsCtrl.contactName]}} </span> <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span> </div> </md-autocomplete> <md-chip-template> <div class="md-contact-avatar"> <img ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}" alt="{{$chip[$mdContactChipsCtrl.contactName]}}" ng-if="$chip[$mdContactChipsCtrl.contactImage]" /> </div> <div class="md-contact-name"> {{$chip[$mdContactChipsCtrl.contactName]}} </div> </md-chip-template> </md-chips>' | |
}, | |
restrict: "E", | |
controller: "MdContactChipsCtrl", | |
controllerAs: "$mdContactChipsCtrl", | |
bindToController: !0, | |
compile: c, | |
scope: { | |
contactQuery: "&mdContacts", | |
placeholder: "@", | |
secondaryPlaceholder: "@", | |
contactName: "@mdContactName", | |
contactImage: "@mdContactImage", | |
contactEmail: "@mdContactEmail", | |
contacts: "=ngModel", | |
requireMatch: "=?mdRequireMatch", | |
highlightFlags: "@?mdHighlightFlags" | |
} | |
} | |
} | |
ngmaterial.components.chips = angular.module("material.components.chips"); | |
(function() { | |
function a(a, b, c) { | |
function f(a, b) { | |
try { | |
b && a.css(p(b)) | |
} catch (t) { | |
c.error(t.message) | |
} | |
} | |
function e(a) { | |
a = m(a); | |
return g(a) | |
} | |
function g(c, d) { | |
d = d || !1; | |
var f = a.PALETTES[c.palette][c.hue], | |
f = d ? f.contrast : f.value; | |
return b.supplant("rgba({0}, {1}, {2}, {3})", [f[0], f[1], f[2], f[3] || c.opacity]) | |
} | |
function p(a) { | |
var b = {}, | |
c = a.hasOwnProperty("color"); | |
angular.forEach(a, function(a, d) { | |
a = m(a); | |
var f = -1 < d.indexOf("background"); | |
b[d] = g(a); | |
f && !c && (b.color = g(a, !0)) | |
}); | |
return b | |
} | |
function k(b) { | |
return angular.isDefined(a.THEMES[b.split("-")[0]]) | |
} | |
function m(c) { | |
c = c.split("-"); | |
var f = angular.isDefined(a.THEMES[c[0]]), | |
f = f ? c.splice(0, 1)[0] : a.defaultTheme(), | |
e, g = c, | |
h = f, | |
k = 1 < g.length && -1 !== d.indexOf(g[1]); | |
e = g[0].replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); | |
k && (e = g[0] + "-" + g.splice(1, 1)); | |
if (-1 === d.indexOf(e)) { | |
g = a.THEMES[h].colors[e]; | |
if (!g) throw Error(b.supplant("mdColors: couldn't find '{palette}' in the palettes.", { | |
palette: e | |
})); | |
e = g.name | |
} | |
g = c; | |
h = a.THEMES[f].colors; | |
if ("hue" === g[1]) { | |
k = parseInt(g.splice(2, 1)[0], 10); | |
if (1 > k || 3 < k) throw Error(b.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'", { | |
hueNumber: k | |
})); | |
g[1] = "hue-" + k; | |
if (!(g[0] in h)) throw Error(b.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'", { | |
availableThemes: Object.keys(h).join(", "), | |
usedTheme: g[0] | |
})); | |
g = h[g[0]].hues[g[1]] | |
} else g = g[1] || h[g[0] in h ? g[0] : "primary"].hues["default"]; | |
return { | |
theme: f, | |
palette: e, | |
hue: g, | |
opacity: c[2] || 1 | |
} | |
} | |
d = d || Object.keys(a.PALETTES); | |
return { | |
applyThemeColors: f, | |
getThemeColor: e, | |
hasTheme: k | |
} | |
} | |
function b(a, b, d, h) { | |
return { | |
restrict: "A", | |
require: ["^?mdTheme"], | |
compile: function(f, | |
e) { | |
function g() { | |
var a = e.mdColors, | |
d = -1 < a.indexOf("::"), | |
f = d ? !0 : c.test(e.mdColors); | |
e.mdColors = a.replace("::", ""); | |
a = angular.isDefined(e.mdColorsWatch); | |
return d || f ? !1 : a ? b.parseAttributeBoolean(e.mdColorsWatch) : !0 | |
} | |
var k = g(); | |
return function(b, c, f, e) { | |
var g = e[0], | |
m = {}, | |
l = function(c) { | |
"string" !== typeof c && (c = ""); | |
f.mdColors || (f.mdColors = "{}"); | |
var d = h(f.mdColors)(b); | |
g && Object.keys(d).forEach(function(b) { | |
var f = d[b]; | |
a.hasTheme(f) || (d[b] = (c || g.$mdTheme) + "-" + f) | |
}); | |
q(d); | |
return d | |
}, | |
q = function(a) { | |
if (!angular.equals(a, m)) { | |
var b = | |
Object.keys(m); | |
m.background && !b.color && b.push("color"); | |
b.forEach(function(a) { | |
c.css(a, "") | |
}) | |
} | |
m = a | |
}, | |
n = angular.noop; | |
g && (n = g.registerChanges(function(b) { | |
a.applyThemeColors(c, l(b)) | |
})); | |
b.$on("$destroy", function() { | |
n() | |
}); | |
try { | |
k ? b.$watch(l, angular.bind(this, a.applyThemeColors, c), !0) : a.applyThemeColors(c, l()) | |
} catch (F) { | |
d.error(F.message) | |
} | |
} | |
} | |
} | |
} | |
b.$inject = ["$mdColors", "$mdUtil", "$log", "$parse"]; | |
a.$inject = ["$mdTheming", "$mdUtil", "$log"]; | |
var c = /^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/, | |
d = null; | |
angular.module("material.components.colors", ["material.core"]).directive("mdColors", b).service("$mdColors", a) | |
})(); | |
ngmaterial.components.colors = angular.module("material.components.colors"); | |
mdContentDirective.$inject = ["$mdTheming"]; | |
angular.module("material.components.content", ["material.core"]).directive("mdContent", mdContentDirective); | |
function mdContentDirective(a) { | |
function b(a, b) { | |
this.$scope = a; | |
this.$element = b | |
} | |
return { | |
restrict: "E", | |
controller: ["$scope", "$element", b], | |
link: function(b, d) { | |
d.addClass("_md"); | |
a(d); | |
b.$broadcast("$mdContentLoaded", d); | |
iosScrollFix(d[0]) | |
} | |
} | |
} | |
function iosScrollFix(a) { | |
angular.element(a).on("$md.pressdown", function(b) { | |
"t" !== b.pointer.type || b.$materialScrollFixed || (b.$materialScrollFixed = !0, 0 === a.scrollTop ? a.scrollTop = 1 : a.scrollHeight === a.scrollTop + a.offsetHeight && --a.scrollTop) | |
}) | |
} | |
ngmaterial.components.content = angular.module("material.components.content"); | |
angular.module("material.components.datepicker", ["material.core", "material.components.icon", "material.components.virtualRepeat"]); | |
(function() { | |
function a() { | |
return { | |
template: function(a, b) { | |
a = b.hasOwnProperty("ngIf") ? "" : 'ng-if="calendarCtrl.isInitialized"'; | |
return a = '<div ng-switch="calendarCtrl.currentView" ' + a + '><md-calendar-year ng-switch-when="year"></md-calendar-year><md-calendar-month ng-switch-default></md-calendar-month></div>' | |
}, | |
scope: { | |
minDate: "=mdMinDate", | |
maxDate: "=mdMaxDate", | |
dateFilter: "=mdDateFilter", | |
_currentView: "@mdCurrentView" | |
}, | |
require: ["ngModel", "mdCalendar"], | |
controller: b, | |
controllerAs: "calendarCtrl", | |
bindToController: !0, | |
link: function(a, b, c, g) { | |
a = g[0]; | |
g = g[1]; | |
g.configureNgModel(a) | |
} | |
} | |
} | |
function b(a, b, e, g, h, l, n, p, k) { | |
l(a); | |
this.$element = a; | |
this.$scope = b; | |
this.dateUtil = e; | |
this.$mdUtil = g; | |
this.keyCode = h.KEY_CODE; | |
this.$$rAF = n; | |
this.today = this.dateUtil.createDateAtMidnight(); | |
this.ngModelCtrl = null; | |
this.currentView = this._currentView || "month"; | |
this.SELECTED_DATE_CLASS = "md-calendar-selected-date"; | |
this.TODAY_CLASS = "md-calendar-date-today"; | |
this.FOCUSED_DATE_CLASS = "md-focus"; | |
this.id = c++; | |
this.lastRenderableDate = this.firstRenderableDate = this.selectedDate = | |
this.displayDate = null; | |
this.isInitialized = !1; | |
this.scrollbarWidth = this.width = 0; | |
p.tabindex || a.attr("tabindex", "-1"); | |
var d = angular.bind(this, this.handleKeyEvent); | |
angular.element(document.body).on("keydown", d); | |
b.$on("$destroy", function() { | |
angular.element(document.body).off("keydown", d) | |
}); | |
this.firstRenderableDate = this.minDate && this.minDate > k.firstRenderableDate ? this.minDate : k.firstRenderableDate; | |
this.lastRenderableDate = this.maxDate && this.maxDate < k.lastRenderableDate ? this.maxDate : k.lastRenderableDate | |
} | |
b.$inject = | |
"$element $scope $$mdDateUtil $mdUtil $mdConstant $mdTheming $$rAF $attrs $mdDateLocale".split(" "); | |
angular.module("material.components.datepicker").directive("mdCalendar", a); | |
var c = 0; | |
b.prototype.configureNgModel = function(a) { | |
var b = this; | |
b.ngModelCtrl = a; | |
b.$mdUtil.nextTick(function() { | |
b.isInitialized = !0 | |
}); | |
a.$render = function() { | |
var a = this.$viewValue; | |
b.$scope.$broadcast("md-calendar-parent-changed", a); | |
b.selectedDate || (b.selectedDate = a); | |
b.displayDate || (b.displayDate = b.selectedDate || b.today) | |
} | |
}; | |
b.prototype.setNgModelValue = | |
function(a) { | |
a = this.dateUtil.createDateAtMidnight(a); | |
this.focus(a); | |
this.$scope.$emit("md-calendar-change", a); | |
this.ngModelCtrl.$setViewValue(a); | |
this.ngModelCtrl.$render(); | |
return a | |
}; | |
b.prototype.setCurrentView = function(a, b) { | |
var c = this; | |
c.$mdUtil.nextTick(function() { | |
c.currentView = a; | |
b && (c.displayDate = angular.isDate(b) ? b : new Date(b)) | |
}) | |
}; | |
b.prototype.focus = function(a) { | |
if (this.dateUtil.isValidDate(a)) { | |
var b = this.$element[0].querySelector(".md-focus"); | |
b && b.classList.remove(this.FOCUSED_DATE_CLASS); | |
b = this.getDateId(a, | |
this.currentView); | |
if (b = document.getElementById(b)) b.classList.add(this.FOCUSED_DATE_CLASS), b.focus(), this.displayDate = a | |
} else(a = this.$element[0].querySelector("[ng-switch]")) && a.focus() | |
}; | |
b.prototype.getActionFromKeyEvent = function(a) { | |
var b = this.keyCode; | |
switch (a.which) { | |
case b.ENTER: | |
return "select"; | |
case b.RIGHT_ARROW: | |
return "move-right"; | |
case b.LEFT_ARROW: | |
return "move-left"; | |
case b.DOWN_ARROW: | |
return a.metaKey ? "move-page-down" : "move-row-down"; | |
case b.UP_ARROW: | |
return a.metaKey ? "move-page-up" : "move-row-up"; | |
case b.PAGE_DOWN: | |
return "move-page-down"; | |
case b.PAGE_UP: | |
return "move-page-up"; | |
case b.HOME: | |
return "start"; | |
case b.END: | |
return "end"; | |
default: | |
return null | |
} | |
}; | |
b.prototype.handleKeyEvent = function(a) { | |
var b = this; | |
this.$scope.$apply(function() { | |
if (a.which == b.keyCode.ESCAPE || a.which == b.keyCode.TAB) b.$scope.$emit("md-calendar-close"), a.which == b.keyCode.TAB && a.preventDefault(); | |
else { | |
var c = b.getActionFromKeyEvent(a); | |
c && (a.preventDefault(), a.stopPropagation(), b.$scope.$broadcast("md-calendar-parent-action", c)) | |
} | |
}) | |
}; | |
b.prototype.hideVerticalScrollbar = function(a) { | |
function b() { | |
var b = | |
c.width || 340, | |
d = c.scrollbarWidth, | |
f = a.calendarScroller; | |
h.style.width = b + "px"; | |
f.style.width = b + d + "px"; | |
f.style.paddingRight = d + "px" | |
} | |
var c = this, | |
d = a.$element[0], | |
h = d.querySelector(".md-calendar-scroll-mask"); | |
0 < c.width ? b() : c.$$rAF(function() { | |
var f = a.calendarScroller; | |
c.scrollbarWidth = f.offsetWidth - f.clientWidth; | |
c.width = d.querySelector("table").offsetWidth; | |
b() | |
}) | |
}; | |
b.prototype.getDateId = function(a, b) { | |
if (!b) throw Error("A namespace for the date id has to be specified."); | |
return ["md", this.id, b, a.getFullYear(), a.getMonth(), | |
a.getDate() | |
].join("-") | |
}; | |
b.prototype.updateVirtualRepeat = function() { | |
var a = this.$scope, | |
b = a.$on("$md-resize-enable", function() { | |
a.$$phase || a.$apply(); | |
b() | |
}) | |
} | |
})(); | |
(function() { | |
function a() { | |
return { | |
template: '<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="-220"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-month-body role="rowgroup" md-virtual-repeat="i in monthCtrl.items" md-month-offset="$index" class="md-calendar-month" md-start-index="monthCtrl.getSelectedMonthIndex()" md-item-size="265"></tbody></table></md-virtual-repeat-container></div>', | |
require: ["^^mdCalendar", | |
"mdCalendarMonth" | |
], | |
controller: b, | |
controllerAs: "monthCtrl", | |
bindToController: !0, | |
link: function(a, b, f, e) { | |
a = e[0]; | |
e = e[1]; | |
e.initialize(a) | |
} | |
} | |
} | |
function b(a, b, f, e, g, h) { | |
this.$element = a; | |
this.$scope = b; | |
this.$animate = f; | |
this.$q = e; | |
this.dateUtil = g; | |
this.dateLocale = h; | |
this.calendarScroller = a[0].querySelector(".md-virtual-repeat-scroller"); | |
this.isMonthTransitionInProgress = this.isInitialized = !1; | |
var c = this; | |
this.cellClickHandler = function() { | |
var a = g.getTimestampFromNode(this); | |
c.$scope.$apply(function() { | |
c.calendarCtrl.setNgModelValue(a) | |
}) | |
}; | |
this.headerClickHandler = function() { | |
c.calendarCtrl.setCurrentView("year", g.getTimestampFromNode(this)) | |
} | |
} | |
b.$inject = "$element $scope $animate $q $$mdDateUtil $mdDateLocale".split(" "); | |
angular.module("material.components.datepicker").directive("mdCalendarMonth", a); | |
b.prototype.initialize = function(a) { | |
this.items = { | |
length: this.dateUtil.getMonthDistance(a.firstRenderableDate, a.lastRenderableDate) + 2 | |
}; | |
this.calendarCtrl = a; | |
this.attachScopeListeners(); | |
a.updateVirtualRepeat(); | |
a.ngModelCtrl && a.ngModelCtrl.$render() | |
}; | |
b.prototype.getSelectedMonthIndex = function() { | |
var a = this.calendarCtrl; | |
return this.dateUtil.getMonthDistance(a.firstRenderableDate, a.displayDate || a.selectedDate || a.today) | |
}; | |
b.prototype.changeSelectedDate = function(a) { | |
var b = this, | |
c = b.calendarCtrl, | |
e = c.selectedDate; | |
c.selectedDate = a; | |
this.changeDisplayDate(a).then(function() { | |
var b = c.SELECTED_DATE_CLASS; | |
if (e) { | |
var d = document.getElementById(c.getDateId(e, "month")); | |
d && (d.classList.remove(b), d.setAttribute("aria-selected", "false")) | |
} | |
a && (d = document.getElementById(c.getDateId(a, | |
"month"))) && (d.classList.add(b), d.setAttribute("aria-selected", "true")) | |
}) | |
}; | |
b.prototype.changeDisplayDate = function(a) { | |
if (!this.isInitialized) return this.buildWeekHeader(), this.calendarCtrl.hideVerticalScrollbar(this), this.isInitialized = !0, this.$q.when(); | |
if (!this.dateUtil.isValidDate(a) || this.isMonthTransitionInProgress) return this.$q.when(); | |
this.isMonthTransitionInProgress = !0; | |
var b = this.animateDateChange(a); | |
this.calendarCtrl.displayDate = a; | |
var c = this; | |
b.then(function() { | |
c.isMonthTransitionInProgress = !1 | |
}); | |
return b | |
}; | |
b.prototype.animateDateChange = function(a) { | |
this.dateUtil.isValidDate(a) && (a = this.dateUtil.getMonthDistance(this.calendarCtrl.firstRenderableDate, a), this.calendarScroller.scrollTop = 265 * a); | |
return this.$q.when() | |
}; | |
b.prototype.buildWeekHeader = function() { | |
for (var a = this.dateLocale.firstDayOfWeek, b = this.dateLocale.shortDays, f = document.createElement("tr"), e = 0; 7 > e; e++) { | |
var g = document.createElement("th"); | |
g.textContent = b[(e + a) % 7]; | |
f.appendChild(g) | |
} | |
this.$element.find("thead").append(f) | |
}; | |
b.prototype.attachScopeListeners = | |
function() { | |
var a = this; | |
a.$scope.$on("md-calendar-parent-changed", function(b, c) { | |
a.changeSelectedDate(c) | |
}); | |
a.$scope.$on("md-calendar-parent-action", angular.bind(this, this.handleKeyEvent)) | |
}; | |
b.prototype.handleKeyEvent = function(a, b) { | |
var c = this.calendarCtrl; | |
a = c.displayDate; | |
if ("select" === b) c.setNgModelValue(a); | |
else { | |
var d = null, | |
g = this.dateUtil; | |
switch (b) { | |
case "move-right": | |
d = g.incrementDays(a, 1); | |
break; | |
case "move-left": | |
d = g.incrementDays(a, -1); | |
break; | |
case "move-page-down": | |
d = g.incrementMonths(a, 1); | |
break; | |
case "move-page-up": | |
d = | |
g.incrementMonths(a, -1); | |
break; | |
case "move-row-down": | |
d = g.incrementDays(a, 7); | |
break; | |
case "move-row-up": | |
d = g.incrementDays(a, -7); | |
break; | |
case "start": | |
d = g.getFirstDateOfMonth(a); | |
break; | |
case "end": | |
d = g.getLastDateOfMonth(a) | |
} | |
d && (d = this.dateUtil.clampDate(d, c.minDate, c.maxDate), this.changeDisplayDate(d).then(function() { | |
c.focus(d) | |
})) | |
} | |
} | |
})(); | |
(function() { | |
function a(a, d) { | |
var c = a('<md-icon md-svg-src="' + d.mdTabsArrow + '"></md-icon>')({})[0]; | |
return { | |
require: ["^^mdCalendar", "^^mdCalendarMonth", "mdCalendarMonthBody"], | |
scope: { | |
offset: "=mdMonthOffset" | |
}, | |
controller: b, | |
controllerAs: "mdMonthBodyCtrl", | |
bindToController: !0, | |
link: function(a, b, d, f) { | |
b = f[0]; | |
d = f[1]; | |
var e = f[2]; | |
e.calendarCtrl = b; | |
e.monthCtrl = d; | |
e.arrowIcon = c.cloneNode(!0); | |
a.$watch(function() { | |
return e.offset | |
}, function(a, b) { | |
a !== b && e.generateContent() | |
}) | |
} | |
} | |
} | |
function b(a, b, f) { | |
this.$element = a; | |
this.dateUtil = | |
b; | |
this.dateLocale = f; | |
this.focusAfterAppend = this.offset = this.calendarCtrl = this.monthCtrl = null | |
} | |
a.$inject = ["$compile", "$$mdSvgRegistry"]; | |
b.$inject = ["$element", "$$mdDateUtil", "$mdDateLocale"]; | |
angular.module("material.components.datepicker").directive("mdCalendarMonthBody", a); | |
b.prototype.generateContent = function() { | |
var a = this.dateUtil.incrementMonths(this.calendarCtrl.firstRenderableDate, this.offset); | |
this.$element.empty().append(this.buildCalendarForMonth(a)); | |
this.focusAfterAppend && (this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS), | |
this.focusAfterAppend.focus(), this.focusAfterAppend = null) | |
}; | |
b.prototype.buildDateCell = function(a) { | |
var b = this.monthCtrl, | |
c = this.calendarCtrl, | |
e = document.createElement("td"); | |
e.tabIndex = -1; | |
e.classList.add("md-calendar-date"); | |
e.setAttribute("role", "gridcell"); | |
if (a) { | |
e.setAttribute("tabindex", "-1"); | |
e.setAttribute("aria-label", this.dateLocale.longDateFormatter(a)); | |
e.id = c.getDateId(a, "month"); | |
e.setAttribute("data-timestamp", a.getTime()); | |
this.dateUtil.isSameDay(a, c.today) && e.classList.add(c.TODAY_CLASS); | |
this.dateUtil.isValidDate(c.selectedDate) && | |
this.dateUtil.isSameDay(a, c.selectedDate) && (e.classList.add(c.SELECTED_DATE_CLASS), e.setAttribute("aria-selected", "true")); | |
var g = this.dateLocale.dates[a.getDate()]; | |
if (this.isDateEnabled(a)) { | |
var h = document.createElement("span"); | |
h.classList.add("md-calendar-date-selection-indicator"); | |
h.textContent = g; | |
e.appendChild(h); | |
e.addEventListener("click", b.cellClickHandler); | |
c.displayDate && this.dateUtil.isSameDay(a, c.displayDate) && (this.focusAfterAppend = e) | |
} else e.classList.add("md-calendar-date-disabled"), e.textContent = | |
g | |
} | |
return e | |
}; | |
b.prototype.isDateEnabled = function(a) { | |
return this.dateUtil.isDateWithinRange(a, this.calendarCtrl.minDate, this.calendarCtrl.maxDate) && (!angular.isFunction(this.calendarCtrl.dateFilter) || this.calendarCtrl.dateFilter(a)) | |
}; | |
b.prototype.buildDateRow = function(a) { | |
var b = document.createElement("tr"); | |
b.setAttribute("role", "row"); | |
b.setAttribute("aria-label", this.dateLocale.weekNumberFormatter(a)); | |
return b | |
}; | |
b.prototype.buildCalendarForMonth = function(a) { | |
var b = this.dateUtil.isValidDate(a) ? a : new Date, | |
c = this.dateUtil.getFirstDateOfMonth(b), | |
e = this.getLocaleDay_(c), | |
g = this.dateUtil.getNumberOfDaysInMonth(b); | |
a = document.createDocumentFragment(); | |
var h = 1, | |
l = this.buildDateRow(h); | |
a.appendChild(l); | |
var n = this.offset === this.monthCtrl.items.length - 1, | |
p = 0, | |
k = document.createElement("td"), | |
m = document.createElement("span"); | |
m.textContent = this.dateLocale.monthHeaderFormatter(b); | |
k.appendChild(m); | |
k.classList.add("md-calendar-month-label"); | |
this.calendarCtrl.maxDate && c > this.calendarCtrl.maxDate ? k.classList.add("md-calendar-month-label-disabled") : | |
(k.addEventListener("click", this.monthCtrl.headerClickHandler), k.setAttribute("data-timestamp", c.getTime()), k.setAttribute("aria-label", this.dateLocale.monthFormatter(b)), k.appendChild(this.arrowIcon.cloneNode(!0))); | |
if (2 >= e) { | |
if (k.setAttribute("colspan", "7"), b = this.buildDateRow(), b.appendChild(k), a.insertBefore(b, l), n) return a | |
} else p = 3, k.setAttribute("colspan", "3"), l.appendChild(k); | |
for (; p < e; p++) l.appendChild(this.buildDateCell()); | |
for (p = 1; p <= g; p++) { | |
if (7 === e) { | |
if (n) return a; | |
e = 0; | |
h++; | |
l = this.buildDateRow(h); | |
a.appendChild(l) | |
} | |
c.setDate(p); | |
k = this.buildDateCell(c); | |
l.appendChild(k); | |
e++ | |
} | |
for (; 7 > l.childNodes.length;) l.appendChild(this.buildDateCell()); | |
for (; 6 > a.childNodes.length;) { | |
g = this.buildDateRow(); | |
for (h = 0; 7 > h; h++) g.appendChild(this.buildDateCell()); | |
a.appendChild(g) | |
} | |
return a | |
}; | |
b.prototype.getLocaleDay_ = function(a) { | |
return (a.getDay() + (7 - this.dateLocale.firstDayOfWeek)) % 7 | |
} | |
})(); | |
(function() { | |
function a() { | |
return { | |
template: '<div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-year-body role="rowgroup" md-virtual-repeat="i in yearCtrl.items" md-year-offset="$index" class="md-calendar-year" md-start-index="yearCtrl.getFocusedYearIndex()" md-item-size="88"></tbody></table></md-virtual-repeat-container></div>', | |
require: ["^^mdCalendar", "mdCalendarYear"], | |
controller: b, | |
controllerAs: "yearCtrl", | |
bindToController: !0, | |
link: function(a, b, f, e) { | |
a = e[0]; | |
e = e[1]; | |
e.initialize(a) | |
} | |
} | |
} | |
function b(a, b, f, e, g) { | |
this.$element = a; | |
this.$scope = b; | |
this.$animate = f; | |
this.$q = e; | |
this.dateUtil = g; | |
this.calendarScroller = a[0].querySelector(".md-virtual-repeat-scroller"); | |
this.isMonthTransitionInProgress = this.isInitialized = !1; | |
var c = this; | |
this.cellClickHandler = function() { | |
c.calendarCtrl.setCurrentView("month", g.getTimestampFromNode(this)) | |
} | |
} | |
b.$inject = ["$element", "$scope", "$animate", "$q", "$$mdDateUtil"]; | |
angular.module("material.components.datepicker").directive("mdCalendarYear", a); | |
b.prototype.initialize = function(a) { | |
this.items = { | |
length: this.dateUtil.getYearDistance(a.firstRenderableDate, a.lastRenderableDate) + 1 | |
}; | |
this.calendarCtrl = a; | |
this.attachScopeListeners(); | |
a.updateVirtualRepeat(); | |
a.ngModelCtrl && a.ngModelCtrl.$render() | |
}; | |
b.prototype.getFocusedYearIndex = function() { | |
var a = this.calendarCtrl; | |
return this.dateUtil.getYearDistance(a.firstRenderableDate, a.displayDate || a.selectedDate || a.today) | |
}; | |
b.prototype.changeDate = | |
function(a) { | |
if (!this.isInitialized) return this.calendarCtrl.hideVerticalScrollbar(this), this.isInitialized = !0, this.$q.when(); | |
if (this.dateUtil.isValidDate(a) && !this.isMonthTransitionInProgress) { | |
var b = this, | |
c = this.animateDateChange(a); | |
b.isMonthTransitionInProgress = !0; | |
b.calendarCtrl.displayDate = a; | |
return c.then(function() { | |
b.isMonthTransitionInProgress = !1 | |
}) | |
} | |
}; | |
b.prototype.animateDateChange = function(a) { | |
this.dateUtil.isValidDate(a) && (a = this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate, a), | |
this.calendarScroller.scrollTop = 88 * a); | |
return this.$q.when() | |
}; | |
b.prototype.handleKeyEvent = function(a, b) { | |
var c = this.calendarCtrl, | |
d = c.displayDate; | |
if ("select" === b) this.changeDate(d).then(function() { | |
c.setCurrentView("month", d); | |
c.focus(d) | |
}); | |
else { | |
var g = null; | |
a = this.dateUtil; | |
switch (b) { | |
case "move-right": | |
g = a.incrementMonths(d, 1); | |
break; | |
case "move-left": | |
g = a.incrementMonths(d, -1); | |
break; | |
case "move-row-down": | |
g = a.incrementMonths(d, 6); | |
break; | |
case "move-row-up": | |
g = a.incrementMonths(d, -6) | |
} | |
if (g) { | |
b = c.minDate ? a.getFirstDateOfMonth(c.minDate) : | |
null; | |
var h = c.maxDate ? a.getFirstDateOfMonth(c.maxDate) : null, | |
g = a.getFirstDateOfMonth(this.dateUtil.clampDate(g, b, h)); | |
this.changeDate(g).then(function() { | |
c.focus(g) | |
}) | |
} | |
} | |
}; | |
b.prototype.attachScopeListeners = function() { | |
var a = this; | |
a.$scope.$on("md-calendar-parent-changed", function(b, c) { | |
a.changeDate(c) | |
}); | |
a.$scope.$on("md-calendar-parent-action", angular.bind(a, a.handleKeyEvent)) | |
} | |
})(); | |
(function() { | |
function a() { | |
return { | |
require: ["^^mdCalendar", "^^mdCalendarYear", "mdCalendarYearBody"], | |
scope: { | |
offset: "=mdYearOffset" | |
}, | |
controller: b, | |
controllerAs: "mdYearBodyCtrl", | |
bindToController: !0, | |
link: function(a, b, f, e) { | |
b = e[0]; | |
f = e[1]; | |
var c = e[2]; | |
c.calendarCtrl = b; | |
c.yearCtrl = f; | |
a.$watch(function() { | |
return c.offset | |
}, function(a, b) { | |
a !== b && c.generateContent() | |
}) | |
} | |
} | |
} | |
function b(a, b, f) { | |
this.$element = a; | |
this.dateUtil = b; | |
this.dateLocale = f; | |
this.focusAfterAppend = this.offset = this.yearCtrl = this.calendarCtrl = null | |
} | |
b.$inject = ["$element", | |
"$$mdDateUtil", "$mdDateLocale" | |
]; | |
angular.module("material.components.datepicker").directive("mdCalendarYearBody", a); | |
b.prototype.generateContent = function() { | |
var a = this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate, this.offset); | |
this.$element.empty().append(this.buildCalendarForYear(a)); | |
this.focusAfterAppend && (this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS), this.focusAfterAppend.focus(), this.focusAfterAppend = null) | |
}; | |
b.prototype.buildMonthCell = function(a, b) { | |
var c = | |
this.calendarCtrl, | |
d = this.yearCtrl, | |
g = this.buildBlankCell(); | |
a = new Date(a, b, 1); | |
g.setAttribute("aria-label", this.dateLocale.monthFormatter(a)); | |
g.id = c.getDateId(a, "year"); | |
g.setAttribute("data-timestamp", a.getTime()); | |
this.dateUtil.isSameMonthAndYear(a, c.today) && g.classList.add(c.TODAY_CLASS); | |
this.dateUtil.isValidDate(c.selectedDate) && this.dateUtil.isSameMonthAndYear(a, c.selectedDate) && (g.classList.add(c.SELECTED_DATE_CLASS), g.setAttribute("aria-selected", "true")); | |
b = this.dateLocale.shortMonths[b]; | |
if (this.dateUtil.isMonthWithinRange(a, | |
c.minDate, c.maxDate)) { | |
var h = document.createElement("span"); | |
h.classList.add("md-calendar-date-selection-indicator"); | |
h.textContent = b; | |
g.appendChild(h); | |
g.addEventListener("click", d.cellClickHandler); | |
c.displayDate && this.dateUtil.isSameMonthAndYear(a, c.displayDate) && (this.focusAfterAppend = g) | |
} else g.classList.add("md-calendar-date-disabled"), g.textContent = b; | |
return g | |
}; | |
b.prototype.buildBlankCell = function() { | |
var a = document.createElement("td"); | |
a.tabIndex = -1; | |
a.classList.add("md-calendar-date"); | |
a.setAttribute("role", | |
"gridcell"); | |
a.setAttribute("tabindex", "-1"); | |
return a | |
}; | |
b.prototype.buildCalendarForYear = function(a) { | |
a = a.getFullYear(); | |
var b = document.createDocumentFragment(), | |
c, e = document.createElement("tr"); | |
c = document.createElement("td"); | |
c.className = "md-calendar-month-label"; | |
c.textContent = a; | |
e.appendChild(c); | |
for (c = 0; 6 > c; c++) e.appendChild(this.buildMonthCell(a, c)); | |
b.appendChild(e); | |
e = document.createElement("tr"); | |
e.appendChild(this.buildBlankCell()); | |
for (c = 6; 12 > c; c++) e.appendChild(this.buildMonthCell(a, c)); | |
b.appendChild(e); | |
return b | |
} | |
})(); | |
angular.module("material.components.datepicker").config(["$provide", function(a) { | |
function b() { | |
this.dates = this.shortDays = this.days = this.shortMonths = this.months = null; | |
this.firstDayOfWeek = 0; | |
this.longDateFormatter = this.weekNumberFormatter = this.monthHeaderFormatter = this.parseDate = this.formatDate = null; | |
this.msgOpenCalendar = this.msgCalendar = "" | |
} | |
b.prototype.$get = function(a, b) { | |
function c(a) { | |
if (!a) return ""; | |
var c = a.toLocaleTimeString(), | |
d = a; | |
0 != a.getHours() || -1 === c.indexOf("11:") && -1 === c.indexOf("23:") || (d = new Date(a.getFullYear(), | |
a.getMonth(), a.getDate(), 1, 0, 0)); | |
return b("date")(d, "M/d/yyyy") | |
} | |
function d(a) { | |
return new Date(a) | |
} | |
function g(a) { | |
a = a.trim(); | |
var b = /^(([a-zA-Z]{3,}|[0-9]{1,4})([ \.,]+|[\/\-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/; | |
return b.test(a) | |
} | |
function h(a) { | |
return t.shortMonths[a.getMonth()] + " " + a.getFullYear() | |
} | |
function l(a) { | |
return t.months[a.getMonth()] + " " + a.getFullYear() | |
} | |
function n(a) { | |
return "Week " + a | |
} | |
function p(a) { | |
return [t.days[a.getDay()], t.months[a.getMonth()], t.dates[a.getDate()], a.getFullYear()].join(" ") | |
} | |
for (var k = | |
a.DATETIME_FORMATS.SHORTDAY.map(function(a) { | |
return a.substring(0, 1) | |
}), m = Array(32), q = 1; 31 >= q; q++) m[q] = q; | |
var q = new Date(1880, 0, 1), | |
w = new Date(q.getFullYear() + 250, 0, 1), | |
t = { | |
months: this.months || a.DATETIME_FORMATS.MONTH, | |
shortMonths: this.shortMonths || a.DATETIME_FORMATS.SHORTMONTH, | |
days: this.days || a.DATETIME_FORMATS.DAY, | |
shortDays: this.shortDays || k, | |
dates: this.dates || m, | |
firstDayOfWeek: this.firstDayOfWeek || 0, | |
formatDate: this.formatDate || c, | |
parseDate: this.parseDate || d, | |
isDateComplete: this.isDateComplete || g, | |
monthHeaderFormatter: this.monthHeaderFormatter || | |
h, | |
monthFormatter: this.monthFormatter || l, | |
weekNumberFormatter: this.weekNumberFormatter || n, | |
longDateFormatter: this.longDateFormatter || p, | |
msgCalendar: this.msgCalendar || "Calendar", | |
msgOpenCalendar: this.msgOpenCalendar || "Open calendar", | |
firstRenderableDate: this.firstRenderableDate || q, | |
lastRenderableDate: this.lastRenderableDate || w | |
}; | |
return t | |
}; | |
b.prototype.$get.$inject = ["$locale", "$filter"]; | |
a.provider("$mdDateLocale", new b) | |
}]); | |
angular.module("material.components.datepicker").factory("$$mdDateUtil", function() { | |
function a(a) { | |
return new Date(a.getFullYear(), a.getMonth(), 1) | |
} | |
function b(a) { | |
return (new Date(a.getFullYear(), a.getMonth() + 1, 0)).getDate() | |
} | |
function c(a) { | |
return new Date(a.getFullYear(), a.getMonth() + 1, 1) | |
} | |
function d(a) { | |
return new Date(a.getFullYear(), a.getMonth() - 1, 1) | |
} | |
function f(a, b) { | |
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() | |
} | |
function e(a, b) { | |
return a.getDate() == b.getDate() && f(a, b) | |
} | |
function g(a, | |
b) { | |
a = c(a); | |
return f(a, b) | |
} | |
function h(a, b) { | |
a = d(a); | |
return f(b, a) | |
} | |
function l(a, b) { | |
return x((a.getTime() + b.getTime()) / 2) | |
} | |
function n(b) { | |
var c = a(b); | |
return Math.floor((c.getDay() + b.getDate() - 1) / 7) | |
} | |
function p(a, b) { | |
return new Date(a.getFullYear(), a.getMonth(), a.getDate() + b) | |
} | |
function k(a, c) { | |
c = new Date(a.getFullYear(), a.getMonth() + c, 1); | |
var d = b(c); | |
d < a.getDate() ? c.setDate(d) : c.setDate(a.getDate()); | |
return c | |
} | |
function m(a, b) { | |
return 12 * (b.getFullYear() - a.getFullYear()) + (b.getMonth() - a.getMonth()) | |
} | |
function q(a) { | |
return new Date(a.getFullYear(), | |
a.getMonth(), b(a)) | |
} | |
function w(a) { | |
return null != a && a.getTime && !isNaN(a.getTime()) | |
} | |
function t(a) { | |
w(a) && a.setHours(0, 0, 0, 0) | |
} | |
function x(a) { | |
a = angular.isUndefined(a) ? new Date : new Date(a); | |
t(a); | |
return a | |
} | |
function r(a, b, c) { | |
a = x(a); | |
b = w(b) ? x(b) : null; | |
c = w(c) ? x(c) : null; | |
return (!b || b <= a) && (!c || c >= a) | |
} | |
function v(a, b) { | |
return k(a, 12 * b) | |
} | |
function z(a, b) { | |
return b.getFullYear() - a.getFullYear() | |
} | |
function E(a, b, c) { | |
var d = a; | |
b && a < b && (d = new Date(b.getTime())); | |
c && a > c && (d = new Date(c.getTime())); | |
return d | |
} | |
function F(a) { | |
if (a && a.hasAttribute("data-timestamp")) return Number(a.getAttribute("data-timestamp")) | |
} | |
function D(a, b, c) { | |
var d = a.getMonth(); | |
a = a.getFullYear(); | |
return (!b || b.getFullYear() < a || b.getMonth() <= d) && (!c || c.getFullYear() > a || c.getMonth() >= d) | |
} | |
return { | |
getFirstDateOfMonth: a, | |
getNumberOfDaysInMonth: b, | |
getDateInNextMonth: c, | |
getDateInPreviousMonth: d, | |
isInNextMonth: g, | |
isInPreviousMonth: h, | |
getDateMidpoint: l, | |
isSameMonthAndYear: f, | |
getWeekOfMonth: n, | |
incrementDays: p, | |
incrementMonths: k, | |
getLastDateOfMonth: q, | |
isSameDay: e, | |
getMonthDistance: m, | |
isValidDate: w, | |
setDateTimeToMidnight: t, | |
createDateAtMidnight: x, | |
isDateWithinRange: r, | |
incrementYears: v, | |
getYearDistance: z, | |
clampDate: E, | |
getTimestampFromNode: F, | |
isMonthWithinRange: D | |
} | |
}); | |
(function() { | |
function a(a, d, f, e) { | |
return { | |
template: function(b, c) { | |
b = c.mdHideIcons; | |
c = c.ariaLabel || c.mdPlaceholder; | |
var d = "all" === b || "calendar" === b ? "" : '<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" aria-label="md-calendar" md-svg-src="' + a.mdCalendar + '"></md-icon></md-button>'; | |
b = "all" === b || "triangle" === b ? "" : '<md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.dateLocale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button>'; | |
return d + '<div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input ' + (c ? 'aria-label="' + c + '" ' : "") + 'class="md-datepicker-input" aria-haspopup="true" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)"> ' + b + '</div><div class="md-datepicker-calendar-pane md-whiteframe-z1"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.dateLocale.msgCalendar}}" md-current-view="{{::ctrl.currentView}}"md-min-date="ctrl.minDate"md-max-date="ctrl.maxDate"md-date-filter="ctrl.dateFilter"ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>' | |
}, | |
require: ["ngModel", "mdDatepicker", "?^mdInputContainer", "?^form"], | |
scope: { | |
minDate: "=mdMinDate", | |
maxDate: "=mdMaxDate", | |
placeholder: "@mdPlaceholder", | |
currentView: "@mdCurrentView", | |
dateFilter: "=mdDateFilter", | |
isOpen: "=?mdIsOpen", | |
debounceInterval: "=mdDebounceInterval" | |
}, | |
controller: b, | |
controllerAs: "ctrl", | |
bindToController: !0, | |
link: function(a, b, c, n) { | |
var g = n[0], | |
h = n[1], | |
m = n[2], | |
l = n[3]; | |
n = d.parseAttributeBoolean(c.mdNoAsterisk); | |
h.configureNgModel(g, m, e); | |
if (m) { | |
var w = b[0].querySelector(".md-errors-spacer"); | |
w && b.after(angular.element("<div>").append(w)); | |
m.setHasPlaceholder(c.mdPlaceholder); | |
m.input = b; | |
m.element.addClass("_md-datepicker-floating-label").toggleClass("_md-datepicker-has-calendar-icon", "calendar" !== c.mdHideIcons && "all" !== c.mdHideIcons); | |
m.label ? n || c.$observe("required", function(a) { | |
m.label.toggleClass("md-required", !!a) | |
}) : f.expect(b, "aria-label", c.mdPlaceholder); | |
a.$watch(m.isErrorGetter || function() { | |
return g.$invalid && (g.$touched || l && l.$submitted) | |
}, m.setInvalid) | |
} else if (l) var t = a.$watch(function() { | |
return l.$submitted | |
}, function(a) { | |
a && (h.updateErrorState(), | |
t()) | |
}) | |
} | |
} | |
} | |
function b(a, b, f, e, g, h, l, n, p, k, m, q) { | |
this.$window = e; | |
this.dateLocale = n; | |
this.dateUtil = p; | |
this.$mdConstant = g; | |
this.$mdUtil = l; | |
this.$$rAF = k; | |
this.documentElement = angular.element(document.documentElement); | |
this.ngModelCtrl = null; | |
this.inputElement = b[0].querySelector("input"); | |
this.ngInputElement = angular.element(this.inputElement); | |
this.inputContainer = b[0].querySelector(".md-datepicker-input-container"); | |
this.calendarPane = b[0].querySelector(".md-datepicker-calendar-pane"); | |
this.calendarButton = b[0].querySelector(".md-datepicker-button"); | |
this.inputMask = angular.element(b[0].querySelector(".md-datepicker-input-mask-opaque")); | |
this.$element = b; | |
this.$attrs = f; | |
this.$scope = a; | |
this.date = null; | |
this.isFocused = !1; | |
this.setDisabled(b[0].disabled || angular.isString(f.disabled)); | |
this.isCalendarOpen = !1; | |
this.openOnFocus = f.hasOwnProperty("mdOpenOnFocus"); | |
this.calendarPaneOpenedFrom = this.mdInputContainer = null; | |
this.calendarPane.id = "md-date-pane" + l.nextUid(); | |
this.bodyClickHandler = angular.bind(this, this.handleBodyClick); | |
this.windowEventName = m.isIos || m.isAndroid ? | |
"orientationchange" : "resize"; | |
this.windowEventHandler = l.debounce(angular.bind(this, this.closeCalendarPane), 100); | |
this.windowBlurHandler = angular.bind(this, this.handleWindowBlur); | |
this.ngDateFilter = q("date"); | |
this.leftMargin = 20; | |
this.topMargin = null; | |
f.tabindex ? (this.ngInputElement.attr("tabindex", f.tabindex), f.$set("tabindex", null)) : f.$set("tabindex", "-1"); | |
h(b); | |
h(angular.element(this.calendarPane)); | |
this.installPropertyInterceptors(); | |
this.attachChangeListeners(); | |
this.attachInteractionListeners(); | |
var c = this; | |
a.$on("$destroy", function() { | |
c.detachCalendarPane() | |
}); | |
f.mdIsOpen && a.$watch("ctrl.isOpen", function(a) { | |
a ? c.openCalendarPane({ | |
target: c.inputElement | |
}) : c.closeCalendarPane() | |
}) | |
} | |
b.$inject = "$scope $element $attrs $window $mdConstant $mdTheming $mdUtil $mdDateLocale $$mdDateUtil $$rAF $mdGesture $filter".split(" "); | |
a.$inject = ["$$mdSvgRegistry", "$mdUtil", "$mdAria", "inputDirective"]; | |
angular.module("material.components.datepicker").directive("mdDatepicker", a); | |
b.prototype.configureNgModel = function(a, b, f) { | |
this.ngModelCtrl = | |
a; | |
this.mdInputContainer = b; | |
this.$attrs.$set("type", "date"); | |
f[0].link.pre(this.$scope, { | |
on: angular.noop, | |
val: angular.noop, | |
0: {} | |
}, this.$attrs, [a]); | |
var c = this; | |
c.ngModelCtrl.$formatters.push(function(a) { | |
if (a && !(a instanceof Date)) throw Error("The ng-model for md-datepicker must be a Date instance. Currently the model is a: " + typeof a); | |
c.date = a; | |
c.inputElement.value = c.dateLocale.formatDate(a); | |
c.mdInputContainer && c.mdInputContainer.setHasValue(!!a); | |
c.resizeInputElement(); | |
c.updateErrorState(); | |
return a | |
}); | |
a.$viewChangeListeners.unshift(angular.bind(this, | |
this.updateErrorState)) | |
}; | |
b.prototype.attachChangeListeners = function() { | |
var a = this; | |
a.$scope.$on("md-calendar-change", function(b, c) { | |
a.setModelValue(c); | |
a.date = c; | |
a.inputElement.value = a.dateLocale.formatDate(c); | |
a.mdInputContainer && a.mdInputContainer.setHasValue(!!c); | |
a.closeCalendarPane(); | |
a.resizeInputElement(); | |
a.updateErrorState() | |
}); | |
a.ngInputElement.on("input", angular.bind(a, a.resizeInputElement)); | |
var b = angular.isDefined(this.debounceInterval) ? this.debounceInterval : 500; | |
a.ngInputElement.on("input", a.$mdUtil.debounce(a.handleInputEvent, | |
b, a)) | |
}; | |
b.prototype.attachInteractionListeners = function() { | |
var a = this, | |
b = this.$scope, | |
f = this.$mdConstant.KEY_CODE; | |
a.ngInputElement.on("keydown", function(c) { | |
c.altKey && c.keyCode == f.DOWN_ARROW && (a.openCalendarPane(c), b.$digest()) | |
}); | |
a.openOnFocus && (a.ngInputElement.on("focus", angular.bind(a, a.openCalendarPane)), angular.element(a.$window).on("blur", a.windowBlurHandler), b.$on("$destroy", function() { | |
angular.element(a.$window).off("blur", a.windowBlurHandler) | |
})); | |
b.$on("md-calendar-close", function() { | |
a.closeCalendarPane() | |
}) | |
}; | |
b.prototype.installPropertyInterceptors = function() { | |
var a = this; | |
if (this.$attrs.ngDisabled) { | |
var b = this.$scope.$parent; | |
b && b.$watch(this.$attrs.ngDisabled, function(b) { | |
a.setDisabled(b) | |
}) | |
} | |
Object.defineProperty(this, "placeholder", { | |
get: function() { | |
return a.inputElement.placeholder | |
}, | |
set: function(b) { | |
a.inputElement.placeholder = b || "" | |
} | |
}) | |
}; | |
b.prototype.setDisabled = function(a) { | |
this.isDisabled = a; | |
this.inputElement.disabled = a; | |
this.calendarButton && (this.calendarButton.disabled = a) | |
}; | |
b.prototype.updateErrorState = function(a) { | |
a = | |
a || this.date; | |
this.clearErrorState(); | |
if (this.dateUtil.isValidDate(a)) { | |
a = this.dateUtil.createDateAtMidnight(a); | |
if (this.dateUtil.isValidDate(this.minDate)) { | |
var b = this.dateUtil.createDateAtMidnight(this.minDate); | |
this.ngModelCtrl.$setValidity("mindate", a >= b) | |
} | |
this.dateUtil.isValidDate(this.maxDate) && (b = this.dateUtil.createDateAtMidnight(this.maxDate), this.ngModelCtrl.$setValidity("maxdate", a <= b)); | |
angular.isFunction(this.dateFilter) && this.ngModelCtrl.$setValidity("filtered", this.dateFilter(a)) | |
} else this.ngModelCtrl.$setValidity("valid", | |
null == a); | |
this.ngModelCtrl.$valid || this.inputContainer.classList.add("md-datepicker-invalid") | |
}; | |
b.prototype.clearErrorState = function() { | |
this.inputContainer.classList.remove("md-datepicker-invalid"); | |
["mindate", "maxdate", "filtered", "valid"].forEach(function(a) { | |
this.ngModelCtrl.$setValidity(a, !0) | |
}, this) | |
}; | |
b.prototype.resizeInputElement = function() { | |
this.inputElement.size = this.inputElement.value.length + 3 | |
}; | |
b.prototype.handleInputEvent = function() { | |
var a = this.inputElement.value, | |
b = a ? this.dateLocale.parseDate(a) : | |
null; | |
this.dateUtil.setDateTimeToMidnight(b); | |
if (a = "" == a || this.dateUtil.isValidDate(b) && this.dateLocale.isDateComplete(a) && this.isDateEnabled(b)) this.setModelValue(b), this.date = b; | |
this.updateErrorState(b) | |
}; | |
b.prototype.isDateEnabled = function(a) { | |
return this.dateUtil.isDateWithinRange(a, this.minDate, this.maxDate) && (!angular.isFunction(this.dateFilter) || this.dateFilter(a)) | |
}; | |
b.prototype.attachCalendarPane = function() { | |
var a = this.calendarPane, | |
b = document.body; | |
a.style.transform = ""; | |
this.$element.addClass("md-datepicker-open"); | |
this.mdInputContainer && this.mdInputContainer.element.addClass("md-datepicker-open"); | |
angular.element(b).addClass("md-datepicker-is-showing"); | |
var f = this.inputContainer.getBoundingClientRect(), | |
e = b.getBoundingClientRect(); | |
if (!this.topMargin || 0 > this.topMargin) this.topMargin = (this.inputMask.parent().prop("clientHeight") - this.ngInputElement.prop("clientHeight")) / 2; | |
var b = f.top - e.top - this.topMargin, | |
g = f.left - e.left - this.leftMargin, | |
h = 0 > e.top && 0 == document.body.scrollTop ? -e.top : document.body.scrollTop, | |
l = 0 > e.left && | |
0 == document.body.scrollLeft ? -e.left : document.body.scrollLeft, | |
e = h + this.$window.innerHeight, | |
n = l + this.$window.innerWidth; | |
this.inputMask.css({ | |
position: "absolute", | |
left: this.leftMargin + "px", | |
top: this.topMargin + "px", | |
width: f.width - 1 + "px", | |
height: f.height - 2 + "px" | |
}); | |
g + 360 > n && (0 < n - 360 ? g = n - 360 : (g = l, f = this.$window.innerWidth / 360, a.style.transform = "scale(" + f + ")"), a.classList.add("md-datepicker-pos-adjusted")); | |
b + 368 > e && e - 368 > h && (b = e - 368, a.classList.add("md-datepicker-pos-adjusted")); | |
a.style.left = g + "px"; | |
a.style.top = | |
b + "px"; | |
document.body.appendChild(a); | |
this.$$rAF(function() { | |
a.classList.add("md-pane-open") | |
}) | |
}; | |
b.prototype.detachCalendarPane = function() { | |
this.$element.removeClass("md-datepicker-open"); | |
this.mdInputContainer && this.mdInputContainer.element.removeClass("md-datepicker-open"); | |
angular.element(document.body).removeClass("md-datepicker-is-showing"); | |
this.calendarPane.classList.remove("md-pane-open"); | |
this.calendarPane.classList.remove("md-datepicker-pos-adjusted"); | |
this.isCalendarOpen && this.$mdUtil.enableScrolling(); | |
this.calendarPane.parentNode && this.calendarPane.parentNode.removeChild(this.calendarPane) | |
}; | |
b.prototype.openCalendarPane = function(a) { | |
if (!this.isCalendarOpen && !this.isDisabled && !this.inputFocusedOnWindowBlur) { | |
this.isCalendarOpen = this.isOpen = !0; | |
this.calendarPaneOpenedFrom = a.target; | |
this.$mdUtil.disableScrollAround(this.calendarPane); | |
this.attachCalendarPane(); | |
this.focusCalendar(); | |
this.evalAttr("ngFocus"); | |
var b = this; | |
this.$mdUtil.nextTick(function() { | |
b.documentElement.on("click touchstart", b.bodyClickHandler) | |
}, !1); | |
window.addEventListener(this.windowEventName, this.windowEventHandler) | |
} | |
}; | |
b.prototype.closeCalendarPane = function() { | |
function a() { | |
b.isCalendarOpen = b.isOpen = !1 | |
} | |
if (this.isCalendarOpen) { | |
var b = this; | |
b.detachCalendarPane(); | |
b.ngModelCtrl.$setTouched(); | |
b.evalAttr("ngBlur"); | |
b.documentElement.off("click touchstart", b.bodyClickHandler); | |
window.removeEventListener(b.windowEventName, b.windowEventHandler); | |
b.calendarPaneOpenedFrom.focus(); | |
b.calendarPaneOpenedFrom = null; | |
b.openOnFocus ? b.$mdUtil.nextTick(a) : a() | |
} | |
}; | |
b.prototype.getCalendarCtrl = | |
function() { | |
return angular.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar") | |
}; | |
b.prototype.focusCalendar = function() { | |
var a = this; | |
this.$mdUtil.nextTick(function() { | |
a.getCalendarCtrl().focus() | |
}, !1) | |
}; | |
b.prototype.setFocused = function(a) { | |
a || this.ngModelCtrl.$setTouched(); | |
this.openOnFocus || this.evalAttr(a ? "ngFocus" : "ngBlur"); | |
this.isFocused = a | |
}; | |
b.prototype.handleBodyClick = function(a) { | |
this.isCalendarOpen && ((a = this.$mdUtil.getClosest(a.target, "md-calendar")) || this.closeCalendarPane(), | |
this.$scope.$digest()) | |
}; | |
b.prototype.handleWindowBlur = function() { | |
this.inputFocusedOnWindowBlur = document.activeElement === this.inputElement | |
}; | |
b.prototype.evalAttr = function(a) { | |
this.$attrs[a] && this.$scope.$parent.$eval(this.$attrs[a]) | |
}; | |
b.prototype.setModelValue = function(a) { | |
this.ngModelCtrl.$setViewValue(this.ngDateFilter(a, "yyyy-MM-dd")) | |
} | |
})(); | |
ngmaterial.components.datepicker = angular.module("material.components.datepicker"); | |
MdDialogDirective.$inject = ["$$rAF", "$mdTheming", "$mdDialog"]; | |
MdDialogProvider.$inject = ["$$interimElementProvider"]; | |
angular.module("material.components.dialog", ["material.core", "material.components.backdrop"]).directive("mdDialog", MdDialogDirective).provider("$mdDialog", MdDialogProvider); | |
function MdDialogDirective(a, b, c) { | |
return { | |
restrict: "E", | |
link: function(d, f) { | |
f.addClass("_md"); | |
b(f); | |
a(function() { | |
function a() { | |
f.toggleClass("md-content-overflow", h.scrollHeight > h.clientHeight) | |
} | |
var b, h = f[0].querySelector("md-dialog-content"); | |
h && (b = h.getElementsByTagName("img"), a(), angular.element(b).on("load", a)); | |
d.$on("$destroy", function() { | |
c.destroy(f) | |
}) | |
}) | |
} | |
} | |
} | |
function MdDialogProvider(a) { | |
function b(a, b) { | |
return { | |
template: '<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css"> <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1"> <h2 class="md-title">{{ dialog.title }}</h2> <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ng-bind-html="::dialog.mdHtmlContent"></div> <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body"> <p>{{::dialog.mdTextContent}}</p> </div> <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container"> <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}"> </md-input-container> </md-dialog-content> <md-dialog-actions> <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'" ng-click="dialog.abort()" class="md-primary md-cancel-button"> {{ dialog.cancel }} </md-button> <md-button ng-click="dialog.hide()" class="md-primary md-confirm-button" md-autofocus="dialog.$type===\'alert\'"> {{ dialog.ok }} </md-button> </md-dialog-actions></md-dialog>'.replace(/\s\s+/g, ""), | |
controller: function() { | |
var c = "prompt" == this.$type; | |
c && this.initialValue && (this.result = this.initialValue); | |
this.hide = function() { | |
a.hide(c ? this.result : !0) | |
}; | |
this.abort = function() { | |
a.cancel() | |
}; | |
this.keypress = function(c) { | |
c.keyCode === b.KEY_CODE.ENTER && a.hide(this.result) | |
} | |
}, | |
controllerAs: "dialog", | |
bindToController: !0 | |
} | |
} | |
function c(a, b, c, l, n, p, k, m, q, w, t) { | |
function e(a) { | |
var b = a; | |
if (!b.theme && (b.theme = t.defaultTheme(), b.targetEvent && b.targetEvent.target)) { | |
var c = angular.element(b.targetEvent.target); | |
b.theme = (c.controller("mdTheme") || {}).$mdTheme || b.theme | |
} | |
a.contentElement && (a.restoreContentElement = E(a)) | |
} | |
function g(a, b, c, d) { | |
if (d) { | |
d.mdHtmlContent = d.htmlContent || c.htmlContent || ""; | |
d.mdTextContent = d.textContent || c.textContent || d.content || c.content || ""; | |
if (d.mdHtmlContent && !w.has("$sanitize")) throw Error("The ngSanitize module must be loaded in order to use htmlContent."); | |
if (d.mdHtmlContent && d.mdTextContent) throw Error("md-dialog cannot have both `htmlContent` and `textContent`"); | |
} | |
} | |
function h(a, b, d) { | |
angular.element(p[0].body).addClass("md-dialog-is-showing"); | |
var f = b.find("md-dialog"); | |
if (f.hasClass("ng-cloak")) { | |
var e = "$mdDialog: using `<md-dialog ng-cloak >` will affect the dialog opening animations."; | |
q.warn(e, b[0]) | |
} | |
F(d); | |
B(f, d); | |
A(a, b, d); | |
D(b, d); | |
return I(b, d).then(function() { | |
L(b, d); | |
b[0].querySelector(".md-actions") && q.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>."); | |
if (d.focusOnOpen) { | |
var a; | |
(a = c.findFocusTarget(b)) || (a = b[0].querySelector(".dialog-close"), a || (a = b[0].querySelectorAll(".md-actions button, md-dialog-actions button"), | |
a = a[a.length - 1])); | |
a = a || f; | |
a.focus() | |
} | |
}) | |
} | |
function z(a, b, c) { | |
function e() { | |
angular.element(p[0].body).removeClass("md-dialog-is-showing"); | |
c.contentElement ? (c.reverseContainerStretch(), c.restoreContentElement()) : b.remove(); | |
c.$destroy || c.origin.focus() | |
} | |
c.deactivateListeners(); | |
c.unlockScreenReader(); | |
c.hideBackdrop(c.$destroy); | |
d && d.parentNode && d.parentNode.removeChild(d); | |
f && f.parentNode && f.parentNode.removeChild(f); | |
return c.$destroy ? e() : C(b, c).then(e) | |
} | |
function E(a) { | |
function b(a) { | |
var b = a.parentNode, | |
c = a.nextElementSibling; | |
return function() { | |
c ? b.insertBefore(a, c) : b.appendChild(a) | |
} | |
} | |
var c = a.contentElement, | |
d = null; | |
angular.isString(c) ? (c = document.querySelector(c), d = b(c)) : (c = c[0] || c, d = document.contains(c) ? b(c) : function() { | |
c.parentNode.removeChild(c) | |
}); | |
a.element = angular.element(c); | |
a.skipCompile = !0; | |
return d | |
} | |
function F(a) { | |
function b(a, b) { | |
if ((a = angular.element(a || {})) && a.length) { | |
var c = { | |
top: 0, | |
left: 0, | |
height: 0, | |
width: 0 | |
}, | |
d = angular.isFunction(a[0].getBoundingClientRect); | |
return angular.extend(b || {}, { | |
element: d ? a : void 0, | |
bounds: d ? a[0].getBoundingClientRect() : angular.extend({}, c, a[0]), | |
focus: angular.bind(a, a.focus) | |
}) | |
} | |
} | |
function c(a, b) { | |
angular.isString(a) && (a = p[0].querySelector(a)); | |
return angular.element(a || b) | |
} | |
a.origin = angular.extend({ | |
element: null, | |
bounds: null, | |
focus: angular.noop | |
}, a.origin || {}); | |
a.parent = c(a.parent, m); | |
a.closeTo = b(c(a.closeTo)); | |
a.openFrom = b(c(a.openFrom)); | |
a.targetEvent && (a.origin = b(a.targetEvent.target, a.origin)) | |
} | |
function D(b, d) { | |
var f = angular.element(k), | |
e = c.debounce(function() { | |
H(b, d) | |
}, 60), | |
g = [], | |
h = function() { | |
var b = "alert" == d.$type ? a.hide : a.cancel; | |
c.nextTick(b, !0) | |
}; | |
if (d.escapeToClose) { | |
var m = d.parent, | |
q = function(a) { | |
a.keyCode === l.KEY_CODE.ESCAPE && (a.stopPropagation(), a.preventDefault(), h()) | |
}; | |
b.on("keydown", q); | |
m.on("keydown", q); | |
g.push(function() { | |
b.off("keydown", q); | |
m.off("keydown", q) | |
}) | |
} | |
f.on("resize", e); | |
g.push(function() { | |
f.off("resize", e) | |
}); | |
if (d.clickOutsideToClose) { | |
var n = b, | |
r, t = function(a) { | |
r = a.target | |
}, | |
p = function(a) { | |
r === n[0] && a.target === n[0] && (a.stopPropagation(), a.preventDefault(), h()) | |
}; | |
n.on("mousedown", t); | |
n.on("mouseup", p); | |
g.push(function() { | |
n.off("mousedown", | |
t); | |
n.off("mouseup", p) | |
}) | |
} | |
d.deactivateListeners = function() { | |
g.forEach(function(a) { | |
a() | |
}); | |
d.deactivateListeners = null | |
} | |
} | |
function A(a, b, d) { | |
d.disableParentScroll && (d.restoreScroll = c.disableScrollAround(b, d.parent)); | |
d.hasBackdrop && (d.backdrop = c.createBackdrop(a, "md-dialog-backdrop md-opaque"), n.enter(d.backdrop, d.parent)); | |
d.hideBackdrop = function(a) { | |
d.backdrop && (a ? d.backdrop.remove() : n.leave(d.backdrop)); | |
d.disableParentScroll && (d.restoreScroll(), delete d.restoreScroll); | |
d.hideBackdrop = null | |
} | |
} | |
function B(a, e) { | |
var g = | |
"alert" === e.$type ? "alertdialog" : "dialog", | |
h = a.find("md-dialog-content"), | |
k = a.attr("id"), | |
m = "dialogContent_" + (k || c.nextUid()); | |
a.attr({ | |
role: g, | |
tabIndex: "-1" | |
}); | |
0 === h.length && (h = a, k && (m = k)); | |
h.attr("id", m); | |
a.attr("aria-describedby", m); | |
e.ariaLabel ? b.expect(a, "aria-label", e.ariaLabel) : b.expectAsync(a, "aria-label", function() { | |
var a = h.text().split(/\s+/); | |
3 < a.length && (a = a.slice(0, 3).concat("...")); | |
return a.join(" ") | |
}); | |
d = document.createElement("div"); | |
d.classList.add("md-dialog-focus-trap"); | |
d.tabIndex = 0; | |
f = d.cloneNode(!1); | |
e = function() { | |
a.focus() | |
}; | |
d.addEventListener("focus", e); | |
f.addEventListener("focus", e); | |
a[0].parentNode.insertBefore(d, a[0]); | |
a.after(f) | |
} | |
function L(a, b) { | |
function c(a) { | |
for (; a.parentNode && a !== document.body;) { | |
for (var b = a.parentNode.children, f = 0; f < b.length; f++) { | |
var e; | |
if (e = a !== b[f]) e = ["SCRIPT", "STYLE"], e = -1 !== e.indexOf(b[f].nodeName) ? !0 : void 0, e = !e; | |
e && b[f].setAttribute("aria-hidden", d) | |
} | |
c(a = a.parentNode) | |
} | |
} | |
var d = !0; | |
c(a[0]); | |
b.unlockScreenReader = function() { | |
d = !1; | |
c(a[0]); | |
b.unlockScreenReader = null | |
} | |
} | |
function H(a, b) { | |
var d = | |
"fixed" == k.getComputedStyle(p[0].body).position, | |
e = b.backdrop ? k.getComputedStyle(b.backdrop[0]) : null, | |
e = e ? Math.min(p[0].body.clientHeight, Math.ceil(Math.abs(parseInt(e.height, 10)))) : 0, | |
f = { | |
top: a.css("top"), | |
height: a.css("height") | |
}; | |
a.css({ | |
top: (d ? c.scrollTop(b.parent) : 0) + "px", | |
height: e ? e + "px" : "100%" | |
}); | |
return function() { | |
a.css(f) | |
} | |
} | |
function I(a, b) { | |
b.parent.append(a); | |
b.reverseContainerStretch = H(a, b); | |
var d = a.find("md-dialog"), | |
e = c.dom.animator, | |
f = e.calculateZoomToOrigin, | |
g = { | |
transitionInClass: "md-transition-in", | |
transitionOutClass: "md-transition-out" | |
}, | |
h = e.toTransformCss(f(d, b.openFrom || b.origin)), | |
k = e.toTransformCss(""); | |
d.toggleClass("md-dialog-fullscreen", !!b.fullscreen); | |
return e.translate3d(d, h, k, g).then(function(a) { | |
b.reverseAnimate = function() { | |
delete b.reverseAnimate; | |
return b.closeTo ? (g = { | |
transitionInClass: "md-transition-out", | |
transitionOutClass: "md-transition-in" | |
}, h = k, k = e.toTransformCss(f(d, b.closeTo)), e.translate3d(d, h, k, g)) : a(k = e.toTransformCss(f(d, b.origin))) | |
}; | |
b.clearAnimate = function() { | |
delete b.clearAnimate; | |
d.removeClass([g.transitionOutClass, | |
g.transitionInClass | |
].join(" ")); | |
return e.translate3d(d, k, e.toTransformCss(""), {}) | |
}; | |
return !0 | |
}) | |
} | |
function C(a, b) { | |
return b.reverseAnimate().then(function() { | |
b.contentElement && b.clearAnimate() | |
}) | |
} | |
return { | |
hasBackdrop: !0, | |
isolateScope: !0, | |
onCompiling: e, | |
onShow: h, | |
onShowing: g, | |
onRemove: z, | |
clickOutsideToClose: !1, | |
escapeToClose: !0, | |
targetEvent: null, | |
contentElement: null, | |
closeTo: null, | |
openFrom: null, | |
focusOnOpen: !0, | |
disableParentScroll: !0, | |
autoWrap: !0, | |
fullscreen: !1, | |
transformTemplate: function(a, b) { | |
b = b.autoWrap && !/<\/md-dialog>/g.test(a) ? | |
"<md-dialog>" + (a || "") + "</md-dialog>" : a || ""; | |
return '<div class="md-dialog-container" tabindex="-1">' + b + "</div>" | |
} | |
} | |
} | |
b.$inject = ["$mdDialog", "$mdConstant"]; | |
c.$inject = "$mdDialog $mdAria $mdUtil $mdConstant $animate $document $window $rootElement $log $injector $mdTheming".split(" "); | |
var d, f; | |
return a("$mdDialog").setDefaults({ | |
methods: "disableParentScroll hasBackdrop clickOutsideToClose escapeToClose targetEvent closeTo openFrom parent fullscreen contentElement".split(" "), | |
options: c | |
}).addPreset("alert", { | |
methods: "title htmlContent textContent content ariaLabel ok theme css".split(" "), | |
options: b | |
}).addPreset("confirm", { | |
methods: "title htmlContent textContent content ariaLabel ok cancel theme css".split(" "), | |
options: b | |
}).addPreset("prompt", { | |
methods: "title htmlContent textContent initialValue content placeholder ariaLabel ok cancel theme css".split(" "), | |
options: b | |
}) | |
} | |
ngmaterial.components.dialog = angular.module("material.components.dialog"); | |
MdDividerDirective.$inject = ["$mdTheming"]; | |
angular.module("material.components.divider", ["material.core"]).directive("mdDivider", MdDividerDirective); | |
function MdDividerDirective(a) { | |
return { | |
restrict: "E", | |
link: a | |
} | |
} | |
ngmaterial.components.divider = angular.module("material.components.divider"); | |
(function() { | |
function a(a) { | |
return { | |
restrict: "E", | |
require: ["^?mdFabSpeedDial", "^?mdFabToolbar"], | |
compile: function(b) { | |
b = b.children(); | |
var c = a.prefixer().hasAttribute(b, "ng-repeat"); | |
c ? b.addClass("md-fab-action-item") : b.wrap('<div class="md-fab-action-item">') | |
} | |
} | |
} | |
a.$inject = ["$mdUtil"]; | |
angular.module("material.components.fabActions", ["material.core"]).directive("mdFabActions", a) | |
})(); | |
ngmaterial.components.fabActions = angular.module("material.components.fabActions"); | |
(function() { | |
function a(a, c, d, f, e, g) { | |
function b() { | |
var b = ["click", "focusin", "focusout"]; | |
angular.forEach(b, function(a) { | |
c.on(a, l) | |
}); | |
a.$on("$destroy", function() { | |
angular.forEach(b, function(a) { | |
c.off(a, l) | |
}); | |
m() | |
}) | |
} | |
function l(a) { | |
"click" == a.type && r(a); | |
"focusout" != a.type || E || (E = g(function() { | |
v.close() | |
}, 100, !1)); | |
"focusin" == a.type && E && (g.cancel(E), E = null) | |
} | |
function n() { | |
a.$watch("vm.direction", function(a, b) { | |
d.removeClass(c, "md-" + b); | |
d.addClass(c, "md-" + a); | |
v.currentActionIndex = -1 | |
}); | |
var b, e; | |
a.$watch("vm.isOpen", function(a) { | |
v.currentActionIndex = -1; | |
b && e || (b = c.find("md-fab-trigger"), e = c.find("md-fab-actions")); | |
a ? k() : m(); | |
var f = a ? "md-is-open" : "", | |
g = a ? "" : "md-is-open"; | |
b.attr("aria-haspopup", !0); | |
b.attr("aria-expanded", a); | |
e.attr("aria-hidden", !a); | |
d.setClass(c, f, g) | |
}) | |
} | |
function p() { | |
0 < c[0].scrollHeight ? d.addClass(c, "_md-animations-ready").then(function() { | |
c.removeClass("md-animations-waiting") | |
}) : 10 > z && (g(p, 100), z += 1) | |
} | |
function k() { | |
c.on("keydown", w); | |
f.nextTick(function() { | |
angular.element(document).on("click touchend", q) | |
}) | |
} | |
function m() { | |
c.off("keydown", w); | |
angular.element(document).off("click touchend", q) | |
} | |
function q(a) { | |
if (a.target) { | |
var b = f.getClosest(a.target, "md-fab-trigger"); | |
a = f.getClosest(a.target, "md-fab-actions"); | |
b || a || v.close() | |
} | |
} | |
function w(a) { | |
switch (a.which) { | |
case e.KEY_CODE.ESCAPE: | |
return v.close(), a.preventDefault(), !1; | |
case e.KEY_CODE.LEFT_ARROW: | |
return "left" === v.direction ? t(a, 1) : t(a, -1), !1; | |
case e.KEY_CODE.UP_ARROW: | |
return "down" === v.direction ? t(a, -1) : t(a, 1), !1; | |
case e.KEY_CODE.RIGHT_ARROW: | |
return "left" === v.direction ? t(a, -1) : t(a, 1), !1; | |
case e.KEY_CODE.DOWN_ARROW: | |
return "up" === | |
v.direction ? t(a, -1) : t(a, 1), !1 | |
} | |
} | |
function t(a, b) { | |
var c = x(); | |
v.currentActionIndex += b; | |
v.currentActionIndex = Math.min(c.length - 1, v.currentActionIndex); | |
v.currentActionIndex = Math.max(0, v.currentActionIndex); | |
b = angular.element(c[v.currentActionIndex]).children()[0]; | |
angular.element(b).attr("tabindex", 0); | |
b.focus(); | |
a.preventDefault(); | |
a.stopImmediatePropagation() | |
} | |
function x() { | |
var a = c.find("md-fab-actions")[0].querySelectorAll(".md-fab-action-item"); | |
angular.forEach(a, function(a) { | |
angular.element(angular.element(a).children()[0]).attr("tabindex", -1) | |
}); | |
return a | |
} | |
function r(a) { | |
f.getClosest(a.target, "md-fab-trigger") && v.toggle(); | |
f.getClosest(a.target, "md-fab-actions") && v.close() | |
} | |
var v = this; | |
v.open = function() { | |
a.$evalAsync("vm.isOpen = true") | |
}; | |
v.close = function() { | |
a.$evalAsync("vm.isOpen = false"); | |
c.find("md-fab-trigger")[0].focus() | |
}; | |
v.toggle = function() { | |
a.$evalAsync("vm.isOpen = !vm.isOpen") | |
}; | |
v.direction = v.direction || "down"; | |
v.isOpen = v.isOpen || !1; | |
v.currentActionIndex = -1; | |
c.addClass("md-animations-waiting"); | |
b(); | |
n(); | |
var z = 0; | |
p(); | |
var E | |
} | |
a.$inject = "$scope $element $animate $mdUtil $mdConstant $timeout".split(" "); | |
angular.module("material.components.fabShared", ["material.core"]).controller("MdFabController", a) | |
})(); | |
(function() { | |
function a() { | |
function a(a, b) { | |
b.prepend('<div class="_md-css-variables"></div>') | |
} | |
return { | |
restrict: "E", | |
scope: { | |
direction: "@?mdDirection", | |
isOpen: "=?mdOpen" | |
}, | |
bindToController: !0, | |
controller: "MdFabController", | |
controllerAs: "vm", | |
link: a | |
} | |
} | |
function b(a) { | |
function b(a) { | |
if (!a.hasClass("md-animations-waiting") || a.hasClass("_md-animations-ready")) { | |
var b = a[0], | |
c = a.controller("mdFabSpeedDial"), | |
d = b.querySelectorAll(".md-fab-action-item"), | |
e = b.querySelector("md-fab-trigger"); | |
a = b.querySelector("._md-css-variables"); | |
var f = parseInt(window.getComputedStyle(a).zIndex); | |
angular.forEach(d, function(a, b) { | |
a = a.style; | |
a.transform = a.webkitTransform = ""; | |
a.transitionDelay = ""; | |
a.opacity = 1; | |
a.zIndex = d.length - b + f | |
}); | |
e.style.zIndex = f + d.length + 1; | |
c.isOpen || angular.forEach(d, function(a, b) { | |
var d, f, g = a.style, | |
h = (e.clientHeight - a.clientHeight) / 2, | |
k = (e.clientWidth - a.clientWidth) / 2; | |
switch (c.direction) { | |
case "up": | |
d = a.scrollHeight * (b + 1) + h; | |
f = "Y"; | |
break; | |
case "down": | |
d = -(a.scrollHeight * (b + 1) + h); | |
f = "Y"; | |
break; | |
case "left": | |
d = a.scrollWidth * (b + 1) + k; | |
f = "X"; | |
break; | |
case "right": | |
d = -(a.scrollWidth * (b + 1) + k), f = "X" | |
} | |
a = "translate" + f + "(" + d + "px)"; | |
g.transform = g.webkitTransform = a | |
}) | |
} | |
} | |
return { | |
addClass: function(c, e, f) { | |
c.hasClass("md-fling") ? (b(c), a(f, d, !1)) : f() | |
}, | |
removeClass: function(c, e, f) { | |
b(c); | |
a(f, d, !1) | |
} | |
} | |
} | |
function c(a) { | |
function b(a) { | |
var b = a[0], | |
c = a.controller("mdFabSpeedDial"), | |
d = b.querySelectorAll(".md-fab-action-item"); | |
a = b.querySelector("._md-css-variables"); | |
var e = parseInt(window.getComputedStyle(a).zIndex); | |
angular.forEach(d, function(a, b) { | |
a = a.style; | |
var f = 65 * b; | |
a.opacity = | |
c.isOpen ? 1 : 0; | |
a.transform = a.webkitTransform = c.isOpen ? "scale(1)" : "scale(0)"; | |
a.transitionDelay = (c.isOpen ? f : d.length - f) + "ms"; | |
a.zIndex = d.length - b + e | |
}) | |
} | |
return { | |
addClass: function(c, e, f) { | |
b(c); | |
a(f, d, !1) | |
}, | |
removeClass: function(c, e, f) { | |
b(c); | |
a(f, d, !1) | |
} | |
} | |
} | |
b.$inject = ["$timeout"]; | |
c.$inject = ["$timeout"]; | |
var d = 300; | |
angular.module("material.components.fabSpeedDial", ["material.core", "material.components.fabShared", "material.components.fabActions"]).directive("mdFabSpeedDial", a).animation(".md-fling", b).animation(".md-scale", | |
c).service("mdFabSpeedDialFlingAnimation", b).service("mdFabSpeedDialScaleAnimation", c) | |
})(); | |
ngmaterial.components.fabShared = angular.module("material.components.fabShared"); | |
(function() { | |
function a() { | |
function a(a, b) { | |
b.addClass("md-fab-toolbar"); | |
b.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>') | |
} | |
return { | |
restrict: "E", | |
transclude: !0, | |
template: '<div class="md-fab-toolbar-wrapper"> <div class="md-fab-toolbar-content" ng-transclude></div></div>', | |
scope: { | |
direction: "@?mdDirection", | |
isOpen: "=?mdOpen" | |
}, | |
bindToController: !0, | |
controller: "MdFabController", | |
controllerAs: "vm", | |
link: a | |
} | |
} | |
function b() { | |
function a(a, b) { | |
if (b) { | |
var c = a[0]; | |
b = a.controller("mdFabToolbar"); | |
var d = c.querySelector(".md-fab-toolbar-background"), | |
f = c.querySelector("md-fab-trigger button"), | |
l = c.querySelector("md-toolbar"), | |
n = c.querySelector("md-fab-trigger button md-icon"), | |
p = a.find("md-fab-actions").children(); | |
if (f && d) { | |
var k = window.getComputedStyle(f).getPropertyValue("background-color"), | |
c = c.offsetWidth, | |
m = c / f.offsetWidth * 2; | |
d.style.backgroundColor = k; | |
d.style.borderRadius = c + "px"; | |
b.isOpen ? (l.style.pointerEvents = "inherit", d.style.width = f.offsetWidth + "px", d.style.height = f.offsetHeight + "px", d.style.transform = | |
"scale(" + m + ")", d.style.transitionDelay = "0ms", n && (n.style.transitionDelay = ".3s"), angular.forEach(p, function(a, b) { | |
a.style.transitionDelay = 25 * (p.length - b) + "ms" | |
})) : (l.style.pointerEvents = "none", d.style.transform = "scale(1)", d.style.top = "0", a.hasClass("md-right") && (d.style.left = "0", d.style.right = null), a.hasClass("md-left") && (d.style.right = "0", d.style.left = null), d.style.transitionDelay = "200ms", n && (n.style.transitionDelay = "0ms"), angular.forEach(p, function(a, b) { | |
a.style.transitionDelay = 200 + 25 * b + "ms" | |
})) | |
} | |
} | |
} | |
return { | |
addClass: function(b, | |
c, e) { | |
a(b, c, e); | |
e() | |
}, | |
removeClass: function(b, c, e) { | |
a(b, c, e); | |
e() | |
} | |
} | |
} | |
angular.module("material.components.fabToolbar", ["material.core", "material.components.fabShared", "material.components.fabActions"]).directive("mdFabToolbar", a).animation(".md-fab-toolbar", b).service("mdFabToolbarAnimation", b) | |
})(); | |
ngmaterial.components.fabToolbar = angular.module("material.components.fabToolbar"); | |
GridListController.$inject = ["$mdUtil"]; | |
GridLayoutFactory.$inject = ["$mdUtil"]; | |
GridListDirective.$inject = ["$interpolate", "$mdConstant", "$mdGridLayout", "$mdMedia"]; | |
GridTileDirective.$inject = ["$mdMedia"]; | |
angular.module("material.components.gridList", ["material.core"]).directive("mdGridList", GridListDirective).directive("mdGridTile", GridTileDirective).directive("mdGridTileFooter", GridTileCaptionDirective).directive("mdGridTileHeader", GridTileCaptionDirective).factory("$mdGridLayout", GridLayoutFactory); | |
function GridListDirective(a, b, c, d) { | |
function f(f, g, h, l) { | |
function e() { | |
for (var a in b.MEDIA) d(a), d.getQuery(b.MEDIA[a]).addListener(E); | |
return d.watchResponsiveAttributes(["md-cols", "md-row-height", "md-gutter"], h, k) | |
} | |
function p() { | |
l.layoutDelegate = angular.noop; | |
F(); | |
for (var a in b.MEDIA) d.getQuery(b.MEDIA[a]).removeListener(E) | |
} | |
function k(a) { | |
null == a ? l.invalidateLayout() : d(a) && l.invalidateLayout() | |
} | |
function m(a) { | |
var b = w(), | |
e = { | |
tileSpans: t(b), | |
colCount: x(), | |
rowMode: v(), | |
rowHeight: r(), | |
gutter: z(d.getResponsiveAttribute(h, | |
"md-gutter") || 1) | |
}; | |
if (a || !angular.equals(e, D)) a = c(e.colCount, e.tileSpans, b).map(function(a, c) { | |
return { | |
grid: { | |
element: g, | |
style: q(e.colCount, c, e.gutter, e.rowMode, e.rowHeight) | |
}, | |
tiles: a.map(function(a, d) { | |
d = angular.element(b[d]); | |
var f; | |
f = a.position; | |
a = a.spans; | |
var g = e.colCount, | |
h = c, | |
k = e.gutter, | |
m = e.rowMode, | |
l = e.rowHeight, | |
q = 1 / g * 100, | |
r = (g - 1) / g, | |
g = L({ | |
share: q, | |
gutterShare: r, | |
gutter: k | |
}), | |
g = { | |
left: H({ | |
unit: g, | |
offset: f.col, | |
gutter: k | |
}), | |
width: I({ | |
unit: g, | |
span: a.col, | |
gutter: k | |
}), | |
paddingTop: "", | |
marginTop: "", | |
top: "", | |
height: "" | |
}; | |
switch (m) { | |
case "fixed": | |
g.top = | |
H({ | |
unit: l, | |
offset: f.row, | |
gutter: k | |
}); | |
g.height = I({ | |
unit: l, | |
span: a.row, | |
gutter: k | |
}); | |
break; | |
case "ratio": | |
h = q / l; | |
h = L({ | |
share: h, | |
gutterShare: r, | |
gutter: k | |
}); | |
g.paddingTop = I({ | |
unit: h, | |
span: a.row, | |
gutter: k | |
}); | |
g.marginTop = H({ | |
unit: h, | |
offset: f.row, | |
gutter: k | |
}); | |
break; | |
case "fit": | |
m = (h - 1) / h, h = 1 / h * 100, h = L({ | |
share: h, | |
gutterShare: m, | |
gutter: k | |
}), g.top = H({ | |
unit: h, | |
offset: f.row, | |
gutter: k | |
}), g.height = I({ | |
unit: h, | |
span: a.row, | |
gutter: k | |
}) | |
} | |
f = g; | |
return { | |
element: d, | |
style: f | |
} | |
}) | |
} | |
}).reflow().performance(), f.mdOnLayout({ | |
$event: { | |
performance: a | |
} | |
}), D = e | |
} | |
function q(a, b, | |
c, d, f) { | |
var e = {}; | |
switch (d) { | |
case "fixed": | |
e.height = I({ | |
unit: f, | |
span: b, | |
gutter: c | |
}); | |
e.paddingBottom = ""; | |
break; | |
case "ratio": | |
d = 1 === a ? 0 : (a - 1) / a, a = 1 / a * 100, f = 1 / f * a, f = L({ | |
share: f, | |
gutterShare: d, | |
gutter: c | |
}), e.height = "", e.paddingBottom = I({ | |
unit: f, | |
span: b, | |
gutter: c | |
}) | |
} | |
return e | |
} | |
function w() { | |
return [].filter.call(g.children(), function(a) { | |
return "MD-GRID-TILE" == a.tagName && !a.$$mdDestroyed | |
}) | |
} | |
function t(a) { | |
return [].map.call(a, function(a) { | |
a = angular.element(a).controller("mdGridTile"); | |
return { | |
row: parseInt(d.getResponsiveAttribute(a.$attrs, | |
"md-rowspan"), 10) || 1, | |
col: parseInt(d.getResponsiveAttribute(a.$attrs, "md-colspan"), 10) || 1 | |
} | |
}) | |
} | |
function x() { | |
var a = parseInt(d.getResponsiveAttribute(h, "md-cols"), 10); | |
if (isNaN(a)) throw "md-grid-list: md-cols attribute was not found, or contained a non-numeric value"; | |
return a | |
} | |
function r() { | |
var a = d.getResponsiveAttribute(h, "md-row-height"); | |
if (!a) throw "md-grid-list: md-row-height attribute was not found"; | |
switch (v()) { | |
case "fixed": | |
return z(a); | |
case "ratio": | |
return a = a.split(":"), parseFloat(a[0]) / parseFloat(a[1]); | |
case "fit": | |
return 0 | |
} | |
} | |
function v() { | |
var a = d.getResponsiveAttribute(h, "md-row-height"); | |
if (!a) throw "md-grid-list: md-row-height attribute was not found"; | |
return "fit" == a ? "fit" : -1 !== a.indexOf(":") ? "ratio" : "fixed" | |
} | |
function z(a) { | |
return /\D$/.test(a) ? a : a + "px" | |
} | |
g.addClass("_md"); | |
g.attr("role", "list"); | |
l.layoutDelegate = m; | |
var E = angular.bind(l, l.invalidateLayout), | |
F = e(); | |
f.$on("$destroy", p); | |
var D, A = a.startSymbol(), | |
B = a.endSymbol(), | |
L = a(A + "share" + B + "% - (" + (A + "gutter" + B) + " * " + (A + "gutterShare" + B) + ")"), | |
H = a("calc((" + (A + | |
"unit" + B) + " + " + (A + "gutter" + B) + ") * " + (A + "offset" + B) + ")"), | |
I = a("calc((" + (A + "unit" + B) + ") * " + (A + "span" + B) + " + (" + (A + "span" + B) + " - 1) * " + (A + "gutter" + B) + ")") | |
} | |
return { | |
restrict: "E", | |
controller: GridListController, | |
scope: { | |
mdOnLayout: "&" | |
}, | |
link: f | |
} | |
} | |
function GridListController(a) { | |
this.tilesInvalidated = this.layoutInvalidated = !1; | |
this.$timeout_ = a.nextTick; | |
this.layoutDelegate = angular.noop | |
} | |
GridListController.prototype = { | |
invalidateTiles: function() { | |
this.tilesInvalidated = !0; | |
this.invalidateLayout() | |
}, | |
invalidateLayout: function() { | |
this.layoutInvalidated || (this.layoutInvalidated = !0, this.$timeout_(angular.bind(this, this.layout))) | |
}, | |
layout: function() { | |
try { | |
this.layoutDelegate(this.tilesInvalidated) | |
} finally { | |
this.tilesInvalidated = this.layoutInvalidated = !1 | |
} | |
} | |
}; | |
function GridLayoutFactory(a) { | |
function b(b, c) { | |
var e, g, n, p, k, m; | |
p = a.time(function() { | |
g = d(b, c) | |
}); | |
return e = { | |
layoutInfo: function() { | |
return g | |
}, | |
map: function(b) { | |
k = a.time(function() { | |
var a = e.layoutInfo(); | |
n = b(a.positioning, a.rowCount) | |
}); | |
return e | |
}, | |
reflow: function(b) { | |
m = a.time(function() { | |
var a = b || f; | |
a(n.grid, n.tiles) | |
}); | |
return e | |
}, | |
performance: function() { | |
return { | |
tileCount: c.length, | |
layoutTime: p, | |
mapTime: k, | |
reflowTime: m, | |
totalTime: p + k + m | |
} | |
} | |
} | |
} | |
function c(a, b) { | |
a.element.css(a.style); | |
b.forEach(function(a) { | |
a.element.css(a.style) | |
}) | |
} | |
function d(a, b) { | |
function c(a, b, c) { | |
for (var d = a; d < a + b; d++) g[d] = Math.max(g[d] + c, 0) | |
} | |
function d() { | |
for (var b = [], c = 0; c < a; c++) b.push(0); | |
return b | |
} | |
var f = 0, | |
e = 0, | |
g = d(); | |
return { | |
positioning: b.map(function(b, d) { | |
var h; | |
h = b; | |
if (h.col > a) throw "md-grid-list: Tile at position " + d + " has a colspan (" + h.col + ") that exceeds the column count (" + a + ")"; | |
for (var k = d = 0; k - d < h.col;) | |
if (f >= a) f = 0, e++, c(0, a, -1); | |
else { | |
d = g.indexOf(0, f); | |
var m; | |
if (!(m = -1 === d)) { | |
a: { | |
for (k = d + 1; k < g.length; k++) | |
if (0 !== g[k]) break a;k = k === g.length ? k : void 0 | |
} | |
m = -1 === k | |
} | |
m ? | |
(f = d = k = 0, e++, c(0, a, -1)) : f = k + 1 | |
} | |
c(d, h.col, h.row); | |
f = d + h.col; | |
h = { | |
col: d, | |
row: e | |
}; | |
return { | |
spans: b, | |
position: h | |
} | |
}), | |
rowCount: e + Math.max.apply(Math, g) | |
} | |
} | |
var f = c; | |
b.animateWith = function(a) { | |
f = angular.isFunction(a) ? a : c | |
}; | |
return b | |
} | |
function GridTileDirective(a) { | |
function b(b, d, f, e) { | |
d.attr("role", "listitem"); | |
var c = a.watchResponsiveAttributes(["md-colspan", "md-rowspan"], f, angular.bind(e, e.invalidateLayout)); | |
e.invalidateTiles(); | |
b.$on("$destroy", function() { | |
d[0].$$mdDestroyed = !0; | |
c(); | |
e.invalidateLayout() | |
}); | |
angular.isDefined(b.$parent.$index) && b.$watch(function() { | |
return b.$parent.$index | |
}, function(a, b) { | |
a !== b && e.invalidateTiles() | |
}) | |
} | |
return { | |
restrict: "E", | |
require: "^mdGridList", | |
template: "<figure ng-transclude></figure>", | |
transclude: !0, | |
scope: {}, | |
controller: ["$attrs", function(a) { | |
this.$attrs = a | |
}], | |
link: b | |
} | |
} | |
function GridTileCaptionDirective() { | |
return { | |
template: "<figcaption ng-transclude></figcaption>", | |
transclude: !0 | |
} | |
} | |
ngmaterial.components.gridList = angular.module("material.components.gridList"); | |
mdInputContainerDirective.$inject = ["$mdTheming", "$parse"]; | |
inputTextareaDirective.$inject = ["$mdUtil", "$window", "$mdAria", "$timeout", "$mdGesture"]; | |
mdMaxlengthDirective.$inject = ["$animate", "$mdUtil"]; | |
placeholderDirective.$inject = ["$compile"]; | |
ngMessageDirective.$inject = ["$mdUtil"]; | |
mdSelectOnFocusDirective.$inject = ["$timeout"]; | |
mdInputInvalidMessagesAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"]; | |
ngMessagesAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"]; | |
ngMessageAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"]; | |
angular.module("material.components.input", ["material.core"]).directive("mdInputContainer", mdInputContainerDirective).directive("label", labelDirective).directive("input", inputTextareaDirective).directive("textarea", inputTextareaDirective).directive("mdMaxlength", mdMaxlengthDirective).directive("placeholder", placeholderDirective).directive("ngMessages", ngMessagesDirective).directive("ngMessage", ngMessageDirective).directive("ngMessageExp", ngMessageDirective).directive("mdSelectOnFocus", mdSelectOnFocusDirective).animation(".md-input-invalid", | |
mdInputInvalidMessagesAnimation).animation(".md-input-messages-animation", ngMessagesAnimation).animation(".md-input-message-animation", ngMessageAnimation).service("mdInputInvalidAnimation", mdInputInvalidMessagesAnimation).service("mdInputMessagesAnimation", ngMessagesAnimation).service("mdInputMessageAnimation", ngMessageAnimation); | |
function mdInputContainerDirective(a, b) { | |
function c(b) { | |
var c = b[0].querySelector(e), | |
d = b[0].querySelector(g); | |
c && b.addClass("md-icon-left"); | |
d && b.addClass("md-icon-right"); | |
return function(b, c) { | |
a(c) | |
} | |
} | |
function d(a, c, d, f) { | |
var e = this; | |
e.isErrorGetter = d.mdIsError && b(d.mdIsError); | |
e.delegateClick = function() { | |
e.input.focus() | |
}; | |
e.element = c; | |
e.setFocused = function(a) { | |
c.toggleClass("md-input-focused", !!a) | |
}; | |
e.setHasValue = function(a) { | |
c.toggleClass("md-input-has-value", !!a) | |
}; | |
e.setHasPlaceholder = function(a) { | |
c.toggleClass("md-input-has-placeholder", !!a) | |
}; | |
e.setInvalid = function(a) { | |
a ? f.addClass(c, "md-input-invalid") : f.removeClass(c, "md-input-invalid") | |
}; | |
a.$watch(function() { | |
return e.label && e.input | |
}, function(a) { | |
a && !e.label.attr("for") && e.label.attr("for", e.input.attr("id")) | |
}) | |
} | |
d.$inject = ["$scope", "$element", "$attrs", "$animate"]; | |
var f = ["INPUT", "TEXTAREA", "SELECT", "MD-SELECT"], | |
e = f.reduce(function(a, b) { | |
return a.concat(["md-icon ~ " + b, ".md-icon ~ " + b]) | |
}, []).join(","), | |
g = f.reduce(function(a, b) { | |
return a.concat([b + " ~ md-icon", b + " ~ .md-icon"]) | |
}, []).join(","); | |
return { | |
restrict: "E", | |
compile: c, | |
controller: d | |
} | |
} | |
function labelDirective() { | |
return { | |
restrict: "E", | |
require: "^?mdInputContainer", | |
link: function(a, b, c, d) { | |
!d || c.mdNoFloat || b.hasClass("md-container-ignore") || (d.label = b, a.$on("$destroy", function() { | |
d.label = null | |
})) | |
} | |
} | |
} | |
function inputTextareaDirective(a, b, c, d, f) { | |
function e(e, h, l, n) { | |
function g(a) { | |
w.setHasValue(!x.$isEmpty(a)); | |
return a | |
} | |
function k() { | |
w.label && l.$observe("required", function(a) { | |
w.label.toggleClass("md-required", a && !v) | |
}) | |
} | |
function m() { | |
w.setHasValue(0 < h.val().length || (h[0].validity || {}).badInput) | |
} | |
function q() { | |
function c() { | |
h.attr("rows", 1).css("height", "auto").addClass("md-no-flex"); | |
var a; | |
a = z.offsetHeight; | |
var b = z.scrollHeight - a; | |
a += Math.max(b, 0); | |
p || (b = h[0].style.padding || "", p = h.css("padding", 0).prop("offsetHeight"), | |
h[0].style.padding = b); | |
r && p && (a = Math.max(a, p * r)); | |
n && p && (b = p * n, b < a ? (h.attr("md-no-autogrow", ""), a = b) : h.removeAttr("md-no-autogrow")); | |
p && h.attr("rows", Math.round(a / p)); | |
h.css("height", a + "px").removeClass("md-no-flex") | |
} | |
function g(b) { | |
a.nextTick(c); | |
return b | |
} | |
function k() { | |
if (q && (q = !1, angular.element(b).off("resize", c), v && v(), h.attr("md-no-autogrow", "").off("input", c), t)) { | |
var a = x.$formatters.indexOf(g); - 1 < a && x.$formatters.splice(a, 1) | |
} | |
} | |
function m() { | |
function b(a) { | |
a.preventDefault(); | |
q = !0; | |
r = a.clientY; | |
n = parseFloat(h.css("height")) || | |
h.prop("offsetHeight") | |
} | |
function c(a) { | |
q && (a.preventDefault(), k(), t.addClass("md-input-resized")) | |
} | |
function d(b) { | |
q && h.css("height", n + (b.pointer.y - r) - a.scrollTop() + "px") | |
} | |
function g() { | |
q && (q = !1, t.removeClass("md-input-resized")) | |
} | |
if (!l.hasOwnProperty("mdNoResize")) { | |
var m = angular.element('<div class="md-resize-handle"></div>'), | |
q = !1, | |
r = null, | |
n = 0, | |
t = w.element, | |
v = f.register(m, "drag", { | |
horizontal: !1 | |
}); | |
h.wrap('<div class="md-resize-wrapper">').after(m); | |
m.on("mousedown", b); | |
t.on("$md.dragstart", c).on("$md.drag", d).on("$md.dragend", | |
g); | |
e.$on("$destroy", function() { | |
m.off("mousedown", b).remove(); | |
t.off("$md.dragstart", c).off("$md.drag", d).off("$md.dragend", g); | |
v(); | |
v = t = m = null | |
}) | |
} | |
} | |
var q = !l.hasOwnProperty("mdNoAutogrow"); | |
m(); | |
if (q) { | |
var r = l.hasOwnProperty("rows") ? parseInt(l.rows) : NaN, | |
n = l.hasOwnProperty("maxRows") ? parseInt(l.maxRows) : NaN, | |
v = e.$on("md-resize-textarea", c), | |
p = null, | |
z = h[0]; | |
d(function() { | |
a.nextTick(c) | |
}, 10, !1); | |
h.on("input", c); | |
t && x.$formatters.push(g); | |
r || h.attr("rows", 1); | |
angular.element(b).on("resize", c); | |
e.$on("$destroy", k); | |
if (l.hasOwnProperty("mdDetectHidden")) { | |
var E = | |
function() { | |
var a = !1; | |
return function() { | |
var b = 0 === z.offsetHeight; | |
!1 === b && !0 === a && c(); | |
a = b | |
} | |
}(); | |
e.$watch(function() { | |
a.nextTick(E, !1); | |
return !0 | |
}) | |
} | |
} | |
} | |
var w = n[0], | |
t = !!n[1], | |
x = n[1] || a.fakeNgModel(), | |
r = n[2]; | |
n = angular.isDefined(l.readonly); | |
var v = a.parseAttributeBoolean(l.mdNoAsterisk), | |
z = h[0].tagName.toLowerCase(); | |
if (w) | |
if ("hidden" === l.type) h.attr("aria-hidden", "true"); | |
else { | |
if (w.input) { | |
if (w.input[0].contains(h[0])) return; | |
throw Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!"); | |
} | |
w.input = h; | |
k(); | |
var E = angular.element('<div class="md-errors-spacer">'); | |
h.after(E); | |
w.label || c.expect(h, "aria-label", l.placeholder); | |
h.addClass("md-input"); | |
h.attr("id") || h.attr("id", "input_" + a.nextUid()); | |
"input" === z && "number" === l.type && l.min && l.max && !l.step ? h.attr("step", "any") : "textarea" === z && q(); | |
t || m(); | |
z = w.isErrorGetter || function() { | |
return x.$invalid && (x.$touched || r && r.$submitted) | |
}; | |
e.$watch(z, w.setInvalid); | |
l.ngValue && l.$observe("value", m); | |
x.$parsers.push(g); | |
x.$formatters.push(g); | |
h.on("input", m); | |
if (!n) h.on("focus", | |
function() { | |
a.nextTick(function() { | |
w.setFocused(!0) | |
}) | |
}).on("blur", function() { | |
a.nextTick(function() { | |
w.setFocused(!1); | |
m() | |
}) | |
}); | |
e.$on("$destroy", function() { | |
w.setFocused(!1); | |
w.setHasValue(!1); | |
w.input = null | |
}) | |
} | |
} | |
return { | |
restrict: "E", | |
require: ["^?mdInputContainer", "?ngModel", "?^form"], | |
link: e | |
} | |
} | |
function mdMaxlengthDirective(a, b) { | |
function c(c, f, e, g) { | |
function d(a) { | |
if (!k.parent) return a; | |
k.text(String(f.val() || a || "").length + " / " + l); | |
return a | |
} | |
var l, n = g[0], | |
p = g[1], | |
k, m; | |
b.nextTick(function() { | |
m = angular.element(p.element[0].querySelector(".md-errors-spacer")); | |
k = angular.element('<div class="md-char-counter">'); | |
m.append(k); | |
e.$set("ngTrim", "false"); | |
n.$formatters.push(d); | |
n.$viewChangeListeners.push(d); | |
f.on("input keydown keyup", function() { | |
d() | |
}); | |
c.$watch(e.mdMaxlength, function(b) { | |
l = b; | |
angular.isNumber(b) && | |
0 < b ? (k.parent().length || a.enter(k, m), d()) : a.leave(k) | |
}); | |
n.$validators["md-maxlength"] = function(a, b) { | |
return !angular.isNumber(l) || 0 > l ? !0 : (a || f.val() || b || "").length <= l | |
} | |
}) | |
} | |
return { | |
restrict: "A", | |
require: ["ngModel", "^mdInputContainer"], | |
link: c | |
} | |
} | |
function placeholderDirective(a) { | |
function b(b, d, f, e) { | |
if (e) { | |
var c = e.element.find("label"), | |
h = e.element.attr("md-no-float"); | |
c && c.length || "" === h || b.$eval(h) ? e.setHasPlaceholder(!0) : "MD-SELECT" != d[0].nodeName && (d = angular.element('<label ng-click="delegateClick()" tabindex="-1">' + f.placeholder + "</label>"), f.$set("placeholder", null), e.element.addClass("md-icon-float").prepend(d), a(d)(b)) | |
} | |
} | |
return { | |
restrict: "A", | |
require: "^^?mdInputContainer", | |
priority: 200, | |
link: { | |
pre: b | |
} | |
} | |
} | |
function mdSelectOnFocusDirective(a) { | |
function b(b, d) { | |
function c() { | |
g = !0; | |
a(function() { | |
d[0].select(); | |
g = !1 | |
}, 1, !1) | |
} | |
function e(a) { | |
g && a.preventDefault() | |
} | |
if ("INPUT" === d[0].nodeName || "TEXTAREA" === d[0].nodeName) { | |
var g = !1; | |
d.on("focus", c).on("mouseup", e); | |
b.$on("$destroy", function() { | |
d.off("focus", c).off("mouseup", e) | |
}) | |
} | |
} | |
return { | |
restrict: "A", | |
link: b | |
} | |
} | |
var visibilityDirectives = ["ngIf", "ngShow", "ngHide", "ngSwitchWhen", "ngSwitchDefault"]; | |
function ngMessagesDirective() { | |
function a(a, d, f, e) { | |
e && (d.toggleClass("md-input-messages-animation", !0), d.toggleClass("md-auto-hide", !0), ("false" == f.mdAutoHide || b(f)) && d.toggleClass("md-auto-hide", !1)) | |
} | |
function b(a) { | |
return visibilityDirectives.some(function(b) { | |
return a[b] | |
}) | |
} | |
return { | |
restrict: "EA", | |
link: a, | |
require: "^^?mdInputContainer" | |
} | |
} | |
function ngMessageDirective(a) { | |
function b(b) { | |
function c() { | |
for (var a = b[0]; a = a.parentNode;) | |
if (a.nodeType === Node.DOCUMENT_FRAGMENT_NODE) return !0; | |
return !1 | |
} | |
function f(a) { | |
a.toggleClass("md-input-message-animation", !0) | |
} | |
if (a.getClosest(b, "md-input-container")) f(b); | |
else if (c()) return function(c, d) { | |
a.getClosest(d, "md-input-container") && f(b) | |
} | |
} | |
return { | |
restrict: "EA", | |
compile: b, | |
priority: 100 | |
} | |
} | |
var $$AnimateRunner, $animateCss, $mdUtil; | |
function mdInputInvalidMessagesAnimation(a, b, c) { | |
saveSharedServices(a, b, c); | |
return { | |
addClass: function(a, b, c) { | |
showInputMessages(a, c) | |
} | |
} | |
} | |
function ngMessagesAnimation(a, b, c) { | |
saveSharedServices(a, b, c); | |
return { | |
enter: function(a, b) { | |
showInputMessages(a, b) | |
}, | |
leave: function(a, b) { | |
hideInputMessages(a, b) | |
}, | |
addClass: function(a, b, c) { | |
"ng-hide" == b ? hideInputMessages(a, c) : c() | |
}, | |
removeClass: function(a, b, c) { | |
"ng-hide" == b ? showInputMessages(a, c) : c() | |
} | |
} | |
} | |
function ngMessageAnimation(a, b, c) { | |
saveSharedServices(a, b, c); | |
return { | |
enter: function(a, b) { | |
a = showMessage(a); | |
a.start().done(b) | |
}, | |
leave: function(a, b) { | |
a = hideMessage(a); | |
a.start().done(b) | |
} | |
} | |
} | |
function showInputMessages(a, b) { | |
var c = [], | |
d; | |
a = getMessagesElement(a); | |
angular.forEach(a.children(), function(a) { | |
d = showMessage(angular.element(a)); | |
c.push(d.start()) | |
}); | |
$$AnimateRunner.all(c, b) | |
} | |
function hideInputMessages(a, b) { | |
var c = [], | |
d; | |
a = getMessagesElement(a); | |
angular.forEach(a.children(), function(a) { | |
d = hideMessage(angular.element(a)); | |
c.push(d.start()) | |
}); | |
$$AnimateRunner.all(c, b) | |
} | |
function showMessage(a) { | |
var b = parseInt(window.getComputedStyle(a[0]).height), | |
c = parseInt(window.getComputedStyle(a[0]).marginTop), | |
d = getMessagesElement(a), | |
f; | |
f = a.controller("mdInputContainer"); | |
f = f.element; | |
return (c = c > -b) || d.hasClass("md-auto-hide") && !f.hasClass("md-input-invalid") ? $animateCss(a, {}) : $animateCss(a, { | |
event: "enter", | |
structural: !0, | |
from: { | |
opacity: 0, | |
"margin-top": -b + "px" | |
}, | |
to: { | |
opacity: 1, | |
"margin-top": "0" | |
}, | |
duration: .3 | |
}) | |
} | |
function hideMessage(a) { | |
var b = a[0].offsetHeight, | |
c = window.getComputedStyle(a[0]); | |
return 0 == c.opacity ? $animateCss(a, {}) : $animateCss(a, { | |
event: "leave", | |
structural: !0, | |
from: { | |
opacity: 1, | |
"margin-top": 0 | |
}, | |
to: { | |
opacity: 0, | |
"margin-top": -b + "px" | |
}, | |
duration: .3 | |
}) | |
} | |
function getMessagesElement(a) { | |
return a.hasClass("md-input-message-animation") ? angular.element($mdUtil.getClosest(a, function(a) { | |
return a.classList.contains("md-input-messages-animation") | |
})) : angular.element(a[0].querySelector(".md-input-messages-animation")) | |
} | |
function saveSharedServices(a, b, c) { | |
$$AnimateRunner = a; | |
$animateCss = b; | |
$mdUtil = c | |
} | |
ngmaterial.components.input = angular.module("material.components.input"); | |
MdListController.$inject = ["$scope", "$element", "$mdListInkRipple"]; | |
mdListDirective.$inject = ["$mdTheming"]; | |
mdListItemDirective.$inject = ["$mdAria", "$mdConstant", "$mdUtil", "$timeout"]; | |
angular.module("material.components.list", ["material.core"]).controller("MdListController", MdListController).directive("mdList", mdListDirective).directive("mdListItem", mdListItemDirective); | |
function mdListDirective(a) { | |
return { | |
restrict: "E", | |
compile: function(b) { | |
b[0].setAttribute("role", "list"); | |
return a | |
} | |
} | |
} | |
function mdListItemDirective(a, b, c, d) { | |
var f = ["md-checkbox", "md-switch", "md-menu"]; | |
return { | |
restrict: "E", | |
controller: "MdListController", | |
compile: function(e, g) { | |
function h() { | |
for (var a = ["md-switch", "md-checkbox"], b, c = 0, d; d = a[c]; ++c) | |
if ((b = e.find(d)[0]) && !b.hasAttribute("aria-label")) { | |
d = e.find("p")[0]; | |
if (!d) break; | |
b.setAttribute("aria-label", "Toggle " + d.textContent) | |
} | |
} | |
function l() { | |
var a = angular.element(x), | |
b = a.parent().hasClass("md-secondary-container") || x.parentNode.firstElementChild !== x, | |
c = "left"; | |
b && (c = "right"); | |
a.attr("md-position-mode") || a.attr("md-position-mode", c + " target"); | |
a = a.children().eq(0); | |
m(a[0]) || a.attr("ng-click", "$mdOpenMenu($event)"); | |
a.attr("aria-label") || a.attr("aria-label", "Open List Menu") | |
} | |
function n(a) { | |
"div" == a ? (r = angular.element('<div class="md-no-style md-list-item-inner">'), r.append(e.contents()), e.addClass("md-proxy-focus")) : (r = angular.element('<div class="md-button md-no-style"> <div class="md-list-item-inner"></div></div>'), a = angular.element('<md-button class="md-no-style"></md-button>'), | |
a[0].setAttribute("aria-label", e[0].textContent), k(e[0], a[0]), e.hasClass("md-no-focus") && a.addClass("md-no-focus"), r.prepend(a), r.children().eq(1).append(e.contents()), e.addClass("_md-button-wrap")); | |
e[0].setAttribute("tabindex", "-1"); | |
e.append(r) | |
} | |
function p() { | |
var b = angular.element('<div class="md-secondary-container">'); | |
angular.forEach(w, function(c) { | |
var d = b, | |
h; | |
if (h = c) h = c.nodeName.toUpperCase(), h = "MD-BUTTON" == h || "BUTTON" == h, h = !h; | |
h && c.hasAttribute("ng-click") && (a.expect(c, "aria-label"), h = angular.element('<md-button class="md-secondary md-icon-button">'), | |
k(c, h[0], ["ng-if", "ng-hide", "ng-show"]), c.setAttribute("tabindex", "-1"), h.append(c), c = h[0]); | |
c && (!m(c) || !g.ngClick && -1 != f.indexOf(c.nodeName.toLowerCase())) && angular.element(c).removeClass("md-secondary"); | |
e.addClass("md-with-secondary"); | |
d.append(c) | |
}); | |
r.append(b) | |
} | |
function k(a, b, d) { | |
var e = c.prefixer("ng-if ng-click ng-dblclick aria-label ng-disabled ui-sref href ng-href target ng-attr-ui-sref ui-sref-opts".split(" ")); | |
d && (e = e.concat(c.prefixer(d))); | |
angular.forEach(e, function(c) { | |
a.hasAttribute(c) && (b.setAttribute(c, | |
a.getAttribute(c)), a.removeAttribute(c)) | |
}) | |
} | |
function m(a) { | |
a = a.attributes; | |
for (var b = 0; b < a.length; b++) | |
if ("ngClick" === g.$normalize(a[b].name)) return !0; | |
return !1 | |
} | |
function q(a, e, g, h) { | |
function k() { | |
r && r.children && !t && angular.forEach(f, function(a) { | |
angular.forEach(r.querySelectorAll(a + ":not(.md-secondary)"), function(a) { | |
q.push(a) | |
}) | |
}) | |
} | |
function l(a) { | |
var b = ["md-slider"]; | |
if (!a.path) return -1 !== b.indexOf(a.target.tagName.toLowerCase()); | |
for (var c = a.path.indexOf(e.children()[0]), d = 0; d < c; d++) | |
if (-1 !== b.indexOf(a.path[d].tagName.toLowerCase())) return !0 | |
} | |
e.addClass("_md"); | |
var q = [], | |
r = e[0].firstElementChild, | |
n = (g = e.hasClass("_md-button-wrap")) ? r.firstElementChild : r, | |
t = n && m(n); | |
k(); | |
if (1 == q.length || t) e.addClass("md-clickable"), t || h.attachRipple(a, angular.element(e[0].querySelector(".md-no-style"))); | |
e.hasClass("md-proxy-focus") && q.length && angular.forEach(q, function(b) { | |
b = angular.element(b); | |
a.mouseActive = !1; | |
b.on("mousedown", function() { | |
a.mouseActive = !0; | |
d(function() { | |
a.mouseActive = !1 | |
}, 100) | |
}).on("focus", function() { | |
!1 === a.mouseActive && e.addClass("md-focused"); | |
b.on("blur", | |
function T() { | |
e.removeClass("md-focused"); | |
b.off("blur", T) | |
}) | |
}) | |
}); | |
var v = function(a) { | |
if ("INPUT" != a.target.nodeName && "TEXTAREA" != a.target.nodeName && !a.target.isContentEditable) { | |
var c = a.which || a.keyCode; | |
c == b.KEY_CODE.SPACE && n && (n.click(), a.preventDefault(), a.stopPropagation()) | |
} | |
}; | |
t || q.length || n && n.addEventListener("keypress", v); | |
e.off("click"); | |
e.off("keypress"); | |
if (1 == q.length && n) e.children().eq(0).on("click", function(a) { | |
if (!l(a)) { | |
var b = c.getClosest(a.target, "BUTTON"); | |
!b && n.contains(a.target) && angular.forEach(q, | |
function(b) { | |
a.target === b || b.contains(a.target) || ("MD-MENU" === b.nodeName && (b = b.children[0]), angular.element(b).triggerHandler("click")) | |
}) | |
} | |
}); | |
a.$on("$destroy", function() { | |
n && n.removeEventListener("keypress", v) | |
}) | |
} | |
var w = e[0].querySelectorAll(".md-secondary"), | |
t, x, r = e; | |
e[0].setAttribute("role", "listitem"); | |
if (g.ngClick || g.ngDblclick || g.ngHref || g.href || g.uiSref || g.ngAttrUiSref) n("button"); | |
else { | |
for (var v = 0, z; z = f[v]; ++v) | |
if (x = e[0].querySelector(z)) { | |
t = !0; | |
break | |
} | |
t ? n("div") : e[0].querySelector("md-button:not(.md-secondary):not(.md-exclude)") || | |
e.addClass("md-no-proxy") | |
} | |
p(); | |
h(); | |
t && "MD-MENU" === x.nodeName && l(); | |
return q | |
} | |
} | |
} | |
function MdListController(a, b, c) { | |
function d(a, b) { | |
var d = {}; | |
c.attach(a, b, d) | |
} | |
a = this; | |
a.attachRipple = d | |
} | |
ngmaterial.components.list = angular.module("material.components.list"); | |
angular.module("material.components.menu", ["material.core", "material.components.backdrop"]); | |
MenuController.$inject = "$mdMenu $attrs $element $scope $mdUtil $timeout $rootScope $q".split(" "); | |
angular.module("material.components.menu").controller("mdMenuCtrl", MenuController); | |
function MenuController(a, b, c, d, f, e, g, h) { | |
var l = f.prefixer(), | |
n, p = this, | |
k; | |
this.nestLevel = parseInt(b.mdNestLevel, 10) || 0; | |
this.init = function(b, e) { | |
e = e || {}; | |
n = b; | |
k = c[0].querySelector(l.buildSelector(["ng-click", "ng-mouseenter"])); | |
k.setAttribute("aria-expanded", "false"); | |
this.isInMenuBar = e.isInMenuBar; | |
this.nestedMenus = f.nodesToArray(n[0].querySelectorAll(".md-nested-menu")); | |
n.on("$mdInterimElementRemove", function() { | |
p.isOpen = !1; | |
f.nextTick(function() { | |
p.onIsOpenChanged(p.isOpen) | |
}) | |
}); | |
f.nextTick(function() { | |
p.onIsOpenChanged(p.isOpen) | |
}); | |
b = "menu_container_" + f.nextUid(); | |
n.attr("id", b); | |
angular.element(k).attr({ | |
"aria-owns": b, | |
"aria-haspopup": "true" | |
}); | |
d.$on("$destroy", angular.bind(this, function() { | |
this.disableHoverListener(); | |
a.destroy() | |
})); | |
n.on("$destroy", function() { | |
a.destroy() | |
}) | |
}; | |
var m, q, w = []; | |
this.enableHoverListener = function() { | |
w.push(g.$on("$mdMenuOpen", function(a, b) { | |
n[0].contains(b[0]) && (p.currentlyOpenMenu = b.controller("mdMenu"), p.isAlreadyOpening = !1, p.currentlyOpenMenu.registerContainerProxy(p.triggerContainerProxy.bind(p))) | |
})); | |
w.push(g.$on("$mdMenuClose", | |
function(a, b) { | |
n[0].contains(b[0]) && (p.currentlyOpenMenu = void 0) | |
})); | |
q = angular.element(f.nodesToArray(n[0].children[0].children)); | |
q.on("mouseenter", p.handleMenuItemHover); | |
q.on("mouseleave", p.handleMenuItemMouseLeave) | |
}; | |
this.disableHoverListener = function() { | |
for (; w.length;) w.shift()(); | |
q && q.off("mouseenter", p.handleMenuItemHover); | |
q && q.off("mouseleave", p.handleMenuItemMouseLeave) | |
}; | |
this.handleMenuItemHover = function(a) { | |
if (!p.isAlreadyOpening) { | |
var b = a.target.querySelector("md-menu") || f.getClosest(a.target, "MD-MENU"); | |
m = e(function() { | |
b && (b = angular.element(b).controller("mdMenu")); | |
if (p.currentlyOpenMenu && p.currentlyOpenMenu != b) { | |
var a = p.nestLevel + 1; | |
p.currentlyOpenMenu.close(!0, { | |
closeTo: a | |
}); | |
p.isAlreadyOpening = !!b; | |
b && b.open() | |
} else b && !b.isOpen && b.open && (p.isAlreadyOpening = !!b, b && b.open()) | |
}, b ? 100 : 250); | |
(a = a.currentTarget.querySelector(".md-button:not([disabled])")) && a.focus() | |
} | |
}; | |
this.handleMenuItemMouseLeave = function() { | |
m && (e.cancel(m), m = void 0) | |
}; | |
this.open = function(b) { | |
b && b.stopPropagation(); | |
b && b.preventDefault(); | |
p.isOpen || | |
(p.enableHoverListener(), p.isOpen = !0, f.nextTick(function() { | |
p.onIsOpenChanged(p.isOpen) | |
}), k = k || (b ? b.target : c[0]), k.setAttribute("aria-expanded", "true"), d.$emit("$mdMenuOpen", c), a.show({ | |
scope: d, | |
mdMenuCtrl: p, | |
nestLevel: p.nestLevel, | |
element: n, | |
target: k, | |
preserveElement: !0, | |
parent: "body" | |
})["finally"](function() { | |
k.setAttribute("aria-expanded", "false"); | |
p.disableHoverListener() | |
})) | |
}; | |
d.$mdOpenMenu = this.open; | |
this.onIsOpenChanged = function(a) { | |
a ? (n.attr("aria-hidden", "false"), c[0].classList.add("md-open"), angular.forEach(p.nestedMenus, | |
function(a) { | |
a.classList.remove("md-open") | |
})) : (n.attr("aria-hidden", "true"), c[0].classList.remove("md-open")); | |
d.$mdMenuIsOpen = p.isOpen | |
}; | |
this.focusMenuContainer = function() { | |
var a = n[0].querySelector(l.buildSelector(["md-menu-focus-target", "md-autofocus"])); | |
a || (a = n[0].querySelector(".md-button")); | |
a.focus() | |
}; | |
this.registerContainerProxy = function(a) { | |
this.containerProxy = a | |
}; | |
this.triggerContainerProxy = function(a) { | |
this.containerProxy && this.containerProxy(a) | |
}; | |
this.destroy = function() { | |
return p.isOpen ? a.destroy() : | |
h.when(!1) | |
}; | |
this.close = function(b, e) { | |
if (p.isOpen) { | |
p.isOpen = !1; | |
f.nextTick(function() { | |
p.onIsOpenChanged(p.isOpen) | |
}); | |
var g = angular.extend({}, e, { | |
skipFocus: b | |
}); | |
d.$emit("$mdMenuClose", c, g); | |
a.hide(null, e); | |
b || (b = p.restoreFocusTo || c.find("button")[0], b instanceof angular.element && (b = b[0]), b && b.focus()) | |
} | |
}; | |
this.positionMode = function() { | |
var a = (b.mdPositionMode || "target").split(" "); | |
1 == a.length && a.push(a[0]); | |
return { | |
left: a[0], | |
top: a[1] | |
} | |
}; | |
this.offsets = function() { | |
var a = (b.mdOffset || "0 0").split(" ").map(parseFloat); | |
if (2 == a.length) return { | |
left: a[0], | |
top: a[1] | |
}; | |
if (1 == a.length) return { | |
top: a[0], | |
left: a[0] | |
}; | |
throw Error("Invalid offsets specified. Please follow format <x, y> or <n>"); | |
} | |
} | |
MenuDirective.$inject = ["$mdUtil"]; | |
angular.module("material.components.menu").directive("mdMenu", MenuDirective); | |
function MenuDirective(a) { | |
function b(b) { | |
b.addClass("md-menu"); | |
var d = b.children()[0], | |
e = a.prefixer(); | |
e.hasAttribute(d, "ng-click") || (d = d.querySelector(e.buildSelector(["ng-click", "ng-mouseenter"])) || d); | |
!d || "MD-BUTTON" != d.nodeName && "BUTTON" != d.nodeName || d.hasAttribute("type") || d.setAttribute("type", "button"); | |
if (2 != b.children().length) throw Error("Invalid HTML for md-menu: Expected two children elements."); | |
d && d.setAttribute("aria-haspopup", "true"); | |
var d = b[0].querySelectorAll("md-menu"), | |
g = parseInt(b[0].getAttribute("md-nest-level"), | |
10) || 0; | |
d && angular.forEach(a.nodesToArray(d), function(a) { | |
a.hasAttribute("md-position-mode") || a.setAttribute("md-position-mode", "cascade"); | |
a.classList.add("_md-nested-menu"); | |
a.setAttribute("md-nest-level", g + 1) | |
}); | |
return c | |
} | |
function c(a, b, c, g) { | |
a = g[0]; | |
g = void 0 != g[1]; | |
var d = angular.element('<div class="_md md-open-menu-container md-whiteframe-z2"></div>'); | |
c = b.children()[1]; | |
b.addClass("_md"); | |
c.hasAttribute("role") || c.setAttribute("role", "menu"); | |
d.append(c); | |
b.on("$destroy", function() { | |
d.remove() | |
}); | |
b.append(d); | |
d[0].style.display = "none"; | |
a.init(d, { | |
isInMenuBar: g | |
}) | |
} | |
return { | |
restrict: "E", | |
require: ["mdMenu", "?^mdMenuBar"], | |
controller: "mdMenuCtrl", | |
scope: !0, | |
compile: b | |
} | |
} | |
MenuProvider.$inject = ["$$interimElementProvider"]; | |
angular.module("material.components.menu").provider("$mdMenu", MenuProvider); | |
function MenuProvider(a) { | |
function b(a, b, e, g, h, l, n, p, k) { | |
function d(b, c, d) { | |
if (d.nestLevel) return angular.noop; | |
d.disableParentScroll && !a.getClosest(d.target, "MD-DIALOG") ? d.restoreScroll = a.disableScrollAround(d.element, d.parent) : d.disableParentScroll = !1; | |
d.hasBackdrop && (d.backdrop = a.createBackdrop(b, "md-menu-backdrop md-click-catcher"), k.enter(d.backdrop, g[0].body)); | |
return function() { | |
d.backdrop && d.backdrop.remove(); | |
d.disableParentScroll && d.restoreScroll() | |
} | |
} | |
function f(a, b, d) { | |
function e() { | |
b.removeClass("md-active"); | |
var a = b, | |
e = d; | |
e.preserveElement ? c(a).style.display = "none" : c(a).parentNode === c(e.parent) && c(e.parent).removeChild(c(a)); | |
d.alreadyOpen = !1 | |
} | |
d.cleanupInteraction && d.cleanupInteraction(); | |
d.cleanupResizing(); | |
d.hideBackdrop(); | |
return !0 === d.$destroy ? e() : p(b, { | |
addClass: "md-leave" | |
}).start().then(e) | |
} | |
function w(c, f, g) { | |
function k() { | |
g.parent.append(f); | |
f[0].style.display = ""; | |
return l(function(a) { | |
var b = x(f, g); | |
f.removeClass("md-leave"); | |
p(f, { | |
addClass: "md-active", | |
from: v.toCss(b), | |
to: v.toCss({ | |
transform: "" | |
}) | |
}).start().then(a) | |
}) | |
} | |
function m() { | |
var a = function(a, b) { | |
return n.throttle(function() { | |
if (!g.isRemoved) { | |
var c = x(a, b); | |
a.css(v.toCss(c)) | |
} | |
}) | |
}(f, g); | |
h.addEventListener("resize", a); | |
h.addEventListener("orientationchange", a); | |
return function() { | |
h.removeEventListener("resize", a); | |
h.removeEventListener("orientationchange", a) | |
} | |
} | |
function q() { | |
function b(b) { | |
var c; | |
switch (b.keyCode) { | |
case e.KEY_CODE.ESCAPE: | |
g.mdMenuCtrl.close(!1, { | |
closeAll: !0 | |
}); | |
c = !0; | |
break; | |
case e.KEY_CODE.UP_ARROW: | |
t(b, g.menuContentEl, g, -1) || g.nestLevel || g.mdMenuCtrl.triggerContainerProxy(b); | |
c = !0; | |
break; | |
case e.KEY_CODE.DOWN_ARROW: | |
t(b, g.menuContentEl, g, 1) || g.nestLevel || g.mdMenuCtrl.triggerContainerProxy(b); | |
c = !0; | |
break; | |
case e.KEY_CODE.LEFT_ARROW: | |
g.nestLevel ? g.mdMenuCtrl.close() : g.mdMenuCtrl.triggerContainerProxy(b); | |
c = !0; | |
break; | |
case e.KEY_CODE.RIGHT_ARROW: | |
(c = a.getClosest(b.target, "MD-MENU")) && c != g.parent[0] ? b.target.click() : g.mdMenuCtrl.triggerContainerProxy(b), c = !0 | |
} | |
c && (b.preventDefault(), b.stopImmediatePropagation()) | |
} | |
function d(a) { | |
a.preventDefault(); | |
a.stopPropagation(); | |
c.$apply(function() { | |
g.mdMenuCtrl.close(!0, { | |
closeAll: !0 | |
}) | |
}) | |
} | |
function h(b) { | |
function d() { | |
c.$apply(function() { | |
g.mdMenuCtrl.close(!0, { | |
closeAll: !0 | |
}) | |
}) | |
} | |
function e(a, b) { | |
if (!a) return !1; | |
for (var c = 0, d; d = b[c]; ++c) | |
if (r.hasAttribute(a, d)) return !0; | |
return !1 | |
} | |
b = b.target; | |
do { | |
if (b == g.menuContentEl[0]) break; | |
if ((e(b, ["ng-click", "ng-href", "ui-sref"]) || "BUTTON" == b.nodeName || "MD-BUTTON" == b.nodeName) && !e(b, ["md-prevent-menu-close"])) { | |
var f = a.getClosest(b, "MD-MENU"); | |
b.hasAttribute("disabled") || f && f != g.parent[0] || d(); | |
break | |
} | |
} while (b = b.parentNode) | |
} | |
f.addClass("md-clickable"); | |
if (g.backdrop) g.backdrop.on("click", d); | |
g.menuContentEl.on("keydown", b); | |
g.menuContentEl[0].addEventListener("click", h, !0); | |
var k = g.menuContentEl[0].querySelector(r.buildSelector(["md-menu-focus-target", "md-autofocus"])); | |
k || (k = (k = g.menuContentEl[0].firstElementChild) && (k.querySelector(".md-button:not([disabled])") || k.firstElementChild)); | |
k && k.focus(); | |
return function() { | |
f.removeClass("md-clickable"); | |
g.backdrop && g.backdrop.off("click", d); | |
g.menuContentEl.off("keydown", b); | |
g.menuContentEl[0].removeEventListener("click", | |
h, !0) | |
} | |
} | |
if (!g.target) throw Error("$mdMenu.show() expected a target to animate from in options.target"); | |
angular.extend(g, { | |
alreadyOpen: !1, | |
isRemoved: !1, | |
target: angular.element(g.target), | |
parent: angular.element(g.parent), | |
menuContentEl: angular.element(f[0].querySelector("md-menu-content")) | |
}); | |
b.inherit(g.menuContentEl, g.target); | |
g.cleanupResizing = m(); | |
g.hideBackdrop = d(c, f, g); | |
return k().then(function(a) { | |
g.alreadyOpen = !0; | |
g.cleanupInteraction = q(); | |
return a | |
}) | |
} | |
function t(b, c, d, e) { | |
b = a.getClosest(b.target, "MD-MENU-ITEM"); | |
c = a.nodesToArray(c[0].children); | |
b = c.indexOf(b); | |
var f; | |
for (b += e; 0 <= b && b < c.length && (f = c[b].querySelector(".md-button"), f && -1 != f.getAttribute("tabindex") ? (f.focus(), f = g[0].activeElement == f) : f = void 0, !f); b += e); | |
return f | |
} | |
function x(b, c) { | |
function d(a) { | |
a.top = Math.max(Math.min(a.top, v.bottom - f.offsetHeight), v.top); | |
a.left = Math.max(Math.min(a.left, v.right - f.offsetWidth), v.left) | |
} | |
function e() { | |
for (var a = 0; a < k.children.length; ++a) | |
if ("none" != h.getComputedStyle(k.children[a]).display) return k.children[a] | |
} | |
var f = b[0], | |
k = b[0].firstElementChild, | |
m = k.getBoundingClientRect(); | |
b = g[0].body; | |
var l = b.getBoundingClientRect(), | |
q = h.getComputedStyle(k), | |
n = c.target[0].querySelector(r.buildSelector("md-menu-origin")) || c.target[0]; | |
b = n.getBoundingClientRect(); | |
var v = { | |
left: l.left + 8, | |
top: Math.max(l.top, 0) + 8, | |
bottom: Math.max(l.bottom, Math.max(l.top, 0) + l.height) - 8, | |
right: l.right - 8 | |
}, | |
p = { | |
top: 0, | |
left: 0, | |
right: 0, | |
bottom: 0 | |
}, | |
t = { | |
top: 0, | |
left: 0, | |
right: 0, | |
bottom: 0 | |
}, | |
w = c.mdMenuCtrl.positionMode(); | |
if ("target" == w.top || "target" == w.left || "target-right" == w.left) | |
if (l = | |
e()) l = l.firstElementChild || l, l = l.querySelector(r.buildSelector("md-menu-align-target")) || l, p = l.getBoundingClientRect(), t = { | |
top: parseFloat(f.style.top || 0), | |
left: parseFloat(f.style.left || 0) | |
}; | |
var l = {}, | |
x = "top "; | |
switch (w.top) { | |
case "target": | |
l.top = t.top + b.top - p.top; | |
break; | |
case "cascade": | |
l.top = b.top - parseFloat(q.paddingTop) - n.style.top; | |
break; | |
case "bottom": | |
l.top = b.top + b.height; | |
break; | |
default: | |
throw Error('Invalid target mode "' + w.top + '" specified for md-menu on Y axis.'); | |
} | |
q = "rtl" == a.bidi(); | |
switch (w.left) { | |
case "target": | |
l.left = | |
t.left + b.left - p.left; | |
x += q ? "right" : "left"; | |
break; | |
case "target-left": | |
l.left = b.left; | |
x += "left"; | |
break; | |
case "target-right": | |
l.left = b.right - m.width + (m.right - p.right); | |
x += "right"; | |
break; | |
case "cascade": | |
q = q ? b.left - m.width < v.left : b.right + m.width < v.right; | |
l.left = q ? b.right - n.style.left : b.left - n.style.left - m.width; | |
x += q ? "left" : "right"; | |
break; | |
case "right": | |
q ? (l.left = b.right - b.width, x += "left") : (l.left = b.right - m.width, x += "right"); | |
break; | |
case "left": | |
q ? (l.left = b.right - m.width, x += "right") : (l.left = b.left, x += "left"); | |
break; | |
default: | |
throw Error('Invalid target mode "' + | |
w.left + '" specified for md-menu on X axis.'); | |
} | |
m = c.mdMenuCtrl.offsets(); | |
l.top += m.top; | |
l.left += m.left; | |
d(l); | |
m = Math.round(100 * Math.min(b.width / f.offsetWidth, 1)) / 100; | |
b = Math.round(100 * Math.min(b.height / f.offsetHeight, 1)) / 100; | |
return { | |
top: Math.round(l.top), | |
left: Math.round(l.left), | |
transform: c.alreadyOpen ? void 0 : a.supplant("scale({0},{1})", [m, b]), | |
transformOrigin: x | |
} | |
} | |
var r = a.prefixer(), | |
v = a.dom.animator; | |
return { | |
parent: "body", | |
onShow: w, | |
onRemove: f, | |
hasBackdrop: !0, | |
disableParentScroll: !0, | |
skipCompile: !0, | |
preserveScope: !0, | |
skipHide: !0, | |
themable: !0 | |
} | |
} | |
function c(a) { | |
a instanceof angular.element && (a = a[0]); | |
return a | |
} | |
b.$inject = "$mdUtil $mdTheming $mdConstant $document $window $q $$rAF $animateCss $animate".split(" "); | |
return a("$mdMenu").setDefaults({ | |
methods: ["target"], | |
options: b | |
}) | |
} | |
ngmaterial.components.menu = angular.module("material.components.menu"); | |
angular.module("material.components.menuBar", ["material.core", "material.components.icon", "material.components.menu"]); | |
MenuBarController.$inject = "$scope $rootScope $element $attrs $mdConstant $document $mdUtil $timeout".split(" "); | |
angular.module("material.components.menuBar").controller("MenuBarController", MenuBarController); | |
var BOUND_MENU_METHODS = ["handleKeyDown", "handleMenuHover", "scheduleOpenHoveredMenu", "cancelScheduledOpen"]; | |
function MenuBarController(a, b, c, d, f, e, g, h) { | |
this.$element = c; | |
this.$attrs = d; | |
this.$mdConstant = f; | |
this.$mdUtil = g; | |
this.$document = e; | |
this.$scope = a; | |
this.$rootScope = b; | |
this.$timeout = h; | |
var l = this; | |
angular.forEach(BOUND_MENU_METHODS, function(a) { | |
l[a] = angular.bind(l, l[a]) | |
}) | |
} | |
MenuBarController.prototype.init = function() { | |
var a = this.$element, | |
b = this.$mdUtil, | |
c = this.$scope, | |
d = this, | |
f = []; | |
a.on("keydown", this.handleKeyDown); | |
this.parentToolbar = b.getClosest(a, "MD-TOOLBAR"); | |
f.push(this.$rootScope.$on("$mdMenuOpen", function(b, c) { | |
-1 != d.getMenus().indexOf(c[0]) && (a[0].classList.add("md-open"), c[0].classList.add("md-open"), d.currentlyOpenMenu = c.controller("mdMenu"), d.currentlyOpenMenu.registerContainerProxy(d.handleKeyDown), d.enableOpenOnHover()) | |
})); | |
f.push(this.$rootScope.$on("$mdMenuClose", | |
function(c, f, h) { | |
c = d.getMenus(); - 1 != c.indexOf(f[0]) && (a[0].classList.remove("md-open"), f[0].classList.remove("md-open")); | |
if (a[0].contains(f[0])) { | |
for (f = f[0]; f && -1 == c.indexOf(f);) f = b.getClosest(f, "MD-MENU", !0); | |
f && (h.skipFocus || f.querySelector("button:not([disabled])").focus(), d.currentlyOpenMenu = void 0, d.disableOpenOnHover(), d.setKeyboardMode(!0)) | |
} | |
})); | |
c.$on("$destroy", function() { | |
for (d.disableOpenOnHover(); f.length;) f.shift()() | |
}); | |
this.setKeyboardMode(!0) | |
}; | |
MenuBarController.prototype.setKeyboardMode = function(a) { | |
a ? this.$element[0].classList.add("md-keyboard-mode") : this.$element[0].classList.remove("md-keyboard-mode") | |
}; | |
MenuBarController.prototype.enableOpenOnHover = function() { | |
if (!this.openOnHoverEnabled) { | |
var a = this; | |
a.openOnHoverEnabled = !0; | |
a.parentToolbar && (a.parentToolbar.classList.add("md-has-open-menu"), a.$mdUtil.nextTick(function() { | |
angular.element(a.parentToolbar).on("click", a.handleParentClick) | |
}, !1)); | |
angular.element(a.getMenus()).on("mouseenter", a.handleMenuHover) | |
} | |
}; | |
MenuBarController.prototype.handleMenuHover = function(a) { | |
this.setKeyboardMode(!1); | |
this.openOnHoverEnabled && this.scheduleOpenHoveredMenu(a) | |
}; | |
MenuBarController.prototype.disableOpenOnHover = function() { | |
this.openOnHoverEnabled && (this.openOnHoverEnabled = !1, this.parentToolbar && (this.parentToolbar.classList.remove("md-has-open-menu"), angular.element(this.parentToolbar).off("click", this.handleParentClick)), angular.element(this.getMenus()).off("mouseenter", this.handleMenuHover)) | |
}; | |
MenuBarController.prototype.scheduleOpenHoveredMenu = function(a) { | |
a = angular.element(a.currentTarget); | |
a = a.controller("mdMenu"); | |
this.setKeyboardMode(!1); | |
this.scheduleOpenMenu(a) | |
}; | |
MenuBarController.prototype.scheduleOpenMenu = function(a) { | |
var b = this, | |
c = this.$timeout; | |
a != b.currentlyOpenMenu && (c.cancel(b.pendingMenuOpen), b.pendingMenuOpen = c(function() { | |
b.pendingMenuOpen = void 0; | |
b.currentlyOpenMenu && b.currentlyOpenMenu.close(!0, { | |
closeAll: !0 | |
}); | |
a.open() | |
}, 200, !1)) | |
}; | |
MenuBarController.prototype.handleKeyDown = function(a) { | |
var b = this.$mdConstant.KEY_CODE, | |
c = this.currentlyOpenMenu, | |
d = c && c.isOpen; | |
this.setKeyboardMode(!0); | |
var f; | |
switch (a.keyCode) { | |
case b.DOWN_ARROW: | |
c ? c.focusMenuContainer() : this.openFocusedMenu(); | |
f = !0; | |
break; | |
case b.UP_ARROW: | |
c && c.close(); | |
f = !0; | |
break; | |
case b.LEFT_ARROW: | |
b = this.focusMenu(-1); | |
d && (d = angular.element(b).controller("mdMenu"), this.scheduleOpenMenu(d)); | |
f = !0; | |
break; | |
case b.RIGHT_ARROW: | |
b = this.focusMenu(1), d && (d = angular.element(b).controller("mdMenu"), this.scheduleOpenMenu(d)), | |
f = !0 | |
} | |
f && (a && a.preventDefault && a.preventDefault(), a && a.stopImmediatePropagation && a.stopImmediatePropagation()) | |
}; | |
MenuBarController.prototype.focusMenu = function(a) { | |
var b = this.getMenus(), | |
c = this.getFocusedMenuIndex(); - 1 == c && (c = this.getOpenMenuIndex()); | |
var d = !1; | |
if (-1 == c) c = 0, d = !0; | |
else if (0 > a && 0 < c || 0 < a && c < b.length - a) c += a, d = !0; | |
if (d) return b[c].querySelector("button").focus(), b[c] | |
}; | |
MenuBarController.prototype.openFocusedMenu = function() { | |
var a = this.getFocusedMenu(); | |
a && angular.element(a).controller("mdMenu").open() | |
}; | |
MenuBarController.prototype.getMenus = function() { | |
var a = this.$element; | |
return this.$mdUtil.nodesToArray(a[0].children).filter(function(a) { | |
return "MD-MENU" == a.nodeName | |
}) | |
}; | |
MenuBarController.prototype.getFocusedMenu = function() { | |
return this.getMenus()[this.getFocusedMenuIndex()] | |
}; | |
MenuBarController.prototype.getFocusedMenuIndex = function() { | |
var a = this.$mdUtil, | |
a = a.getClosest(this.$document[0].activeElement, "MD-MENU"); | |
return a ? a = this.getMenus().indexOf(a) : -1 | |
}; | |
MenuBarController.prototype.getOpenMenuIndex = function() { | |
for (var a = this.getMenus(), b = 0; b < a.length; ++b) | |
if (a[b].classList.contains("md-open")) return b; | |
return -1 | |
}; | |
MenuBarController.prototype.handleParentClick = function(a) { | |
var b = this.querySelector("md-menu.md-open"); | |
b && !b.contains(a.target) && angular.element(b).controller("mdMenu").close() | |
}; | |
MenuBarDirective.$inject = ["$mdUtil", "$mdTheming"]; | |
angular.module("material.components.menuBar").directive("mdMenuBar", MenuBarDirective); | |
function MenuBarDirective(a, b) { | |
return { | |
restrict: "E", | |
require: "mdMenuBar", | |
controller: "MenuBarController", | |
compile: function(c, d) { | |
d.ariaRole || c[0].setAttribute("role", "menubar"); | |
angular.forEach(c[0].children, function(b) { | |
"MD-MENU" == b.nodeName && (b.hasAttribute("md-position-mode") || (b.setAttribute("md-position-mode", "left bottom"), b.querySelector("button, a, md-button").setAttribute("role", "menuitem")), b = a.nodesToArray(b.querySelectorAll("md-menu-content")), angular.forEach(b, function(a) { | |
a.classList.add("md-menu-bar-menu"); | |
a.classList.add("md-dense"); | |
a.hasAttribute("width") || a.setAttribute("width", 5) | |
})) | |
}); | |
c.find("md-menu-item").addClass("md-in-menu-bar"); | |
return function(a, c, d, h) { | |
c.addClass("_md"); | |
b(a, c); | |
h.init() | |
} | |
} | |
} | |
} | |
angular.module("material.components.menuBar").directive("mdMenuDivider", MenuDividerDirective); | |
function MenuDividerDirective() { | |
return { | |
restrict: "E", | |
compile: function(a, b) { | |
b.role || a[0].setAttribute("role", "separator") | |
} | |
} | |
} | |
MenuItemController.$inject = ["$scope", "$element", "$attrs"]; | |
angular.module("material.components.menuBar").controller("MenuItemController", MenuItemController); | |
function MenuItemController(a, b, c) { | |
this.$element = b; | |
this.$attrs = c; | |
this.$scope = a | |
} | |
MenuItemController.prototype.init = function(a) { | |
var b = this.$element, | |
c = this.$attrs; | |
this.ngModel = a; | |
if ("checkbox" == c.type || "radio" == c.type) this.mode = c.type, this.iconEl = b[0].children[0], this.buttonEl = b[0].children[1], a && this.initClickListeners() | |
}; | |
MenuItemController.prototype.clearNgAria = function() { | |
var a = this.$element[0], | |
b = ["role", "tabindex", "aria-invalid", "aria-checked"]; | |
angular.forEach(b, function(b) { | |
a.removeAttribute(b) | |
}) | |
}; | |
MenuItemController.prototype.initClickListeners = function() { | |
function a(a) { | |
if (a) h.off("click", l); | |
else h.on("click", l) | |
} | |
var b = this, | |
c = this.ngModel, | |
d = this.$scope, | |
f = this.$attrs, | |
e = this.mode; | |
this.handleClick = angular.bind(this, this.handleClick); | |
var g = this.iconEl, | |
h = angular.element(this.buttonEl), | |
l = this.handleClick; | |
f.$observe("disabled", a); | |
a(f.disabled); | |
c.$render = function() { | |
b.clearNgAria(); | |
var a; | |
"radio" == e ? (a = f.ngValue ? d.$eval(f.ngValue) : f.value, a = c.$modelValue == a) : a = c.$modelValue; | |
a ? (g.style.display = "", h.attr("aria-checked", | |
"true")) : (g.style.display = "none", h.attr("aria-checked", "false")) | |
}; | |
d.$$postDigest(c.$render) | |
}; | |
MenuItemController.prototype.handleClick = function() { | |
var a = this.mode, | |
b = this.ngModel, | |
c = this.$attrs, | |
d; | |
"checkbox" == a ? d = !b.$modelValue : "radio" == a && (d = c.ngValue ? this.$scope.$eval(c.ngValue) : c.value); | |
b.$setViewValue(d); | |
b.$render() | |
}; | |
MenuItemDirective.$inject = ["$mdUtil", "$$mdSvgRegistry"]; | |
angular.module("material.components.menuBar").directive("mdMenuItem", MenuItemDirective); | |
function MenuItemDirective(a, b) { | |
return { | |
controller: "MenuItemController", | |
require: ["mdMenuItem", "?ngModel"], | |
priority: 210, | |
compile: function(c, d) { | |
function f(a, b, d) { | |
d = d || c; | |
d instanceof angular.element && (d = d[0]); | |
d.hasAttribute(a) || d.setAttribute(a, b) | |
} | |
function e(b) { | |
b = a.prefixer(b); | |
angular.forEach(b, function(a) { | |
if (c[0].hasAttribute(a)) { | |
var b = c[0].getAttribute(a); | |
h[0].setAttribute(a, b); | |
c[0].removeAttribute(a) | |
} | |
}) | |
} | |
d = d.type; | |
if ("checkbox" != d && "radio" != d || !c.hasClass("md-in-menu-bar")) f("role", "menuitem", c[0].querySelector("md-button, button, a")); | |
else { | |
var g = c[0].textContent, | |
h = angular.element('<md-button type="button"></md-button>'), | |
l = '<md-icon md-svg-src="' + b.mdChecked + '"></md-icon>'; | |
h.html(g); | |
h.attr("tabindex", "0"); | |
c.html(""); | |
c.append(angular.element(l)); | |
c.append(h); | |
c.addClass("md-indent").removeClass("md-in-menu-bar"); | |
f("role", "checkbox" == d ? "menuitemcheckbox" : "menuitemradio", h); | |
e("ng-disabled") | |
} | |
return function(a, b, c, d) { | |
a = d[0]; | |
d = d[1]; | |
a.init(d) | |
} | |
} | |
} | |
} | |
ngmaterial.components.menuBar = angular.module("material.components.menuBar"); | |
MdNavBarController.$inject = ["$element", "$scope", "$timeout", "$mdConstant"]; | |
MdNavItem.$inject = ["$$rAF"]; | |
MdNavItemController.$inject = ["$element"]; | |
MdNavBar.$inject = ["$mdAria", "$mdTheming"]; | |
angular.module("material.components.navBar", ["material.core"]).controller("MdNavBarController", MdNavBarController).directive("mdNavBar", MdNavBar).controller("MdNavItemController", MdNavItemController).directive("mdNavItem", MdNavItem); | |
function MdNavBar(a, b) { | |
return { | |
restrict: "E", | |
transclude: !0, | |
controller: MdNavBarController, | |
controllerAs: "ctrl", | |
bindToController: !0, | |
scope: { | |
mdSelectedNavItem: "=?", | |
navBarAriaLabel: "@?" | |
}, | |
template: '<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" ng-transclude role="listbox"tabindex="0"ng-focus="ctrl.onFocus()"ng-blur="ctrl.onBlur()"ng-keydown="ctrl.onKeydown($event)"aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar></md-nav-ink-bar></div>', | |
link: function(c, d, f, e) { | |
b(d); | |
e.navBarAriaLabel || a.expectAsync(d, "aria-label", angular.noop) | |
} | |
} | |
} | |
function MdNavBarController(a, b, c, d) { | |
this._$timeout = c; | |
this._$scope = b; | |
this._$mdConstant = d; | |
this._navBarEl = a[0]; | |
var f = this, | |
e = this._$scope.$watch(function() { | |
return f._navBarEl.querySelectorAll("._md-nav-button").length | |
}, function(a) { | |
0 < a && (f._initTabs(), e()) | |
}) | |
} | |
MdNavBarController.prototype._initTabs = function() { | |
this._inkbar = angular.element(this._navBarEl.getElementsByTagName("md-nav-ink-bar")[0]); | |
var a = this; | |
this._$timeout(function() { | |
a._updateTabs(a.mdSelectedNavItem, void 0) | |
}); | |
this._$scope.$watch("ctrl.mdSelectedNavItem", function(b, c) { | |
a._$timeout(function() { | |
a._updateTabs(b, c) | |
}) | |
}) | |
}; | |
MdNavBarController.prototype._updateTabs = function(a, b) { | |
var c = this, | |
d = this._getTabs(), | |
f = -1, | |
e = -1, | |
g = this._getTabByName(a); | |
if (a = this._getTabByName(b)) a.setSelected(!1), f = d.indexOf(a); | |
g && (g.setSelected(!0), e = d.indexOf(g)); | |
this._$timeout(function() { | |
c._updateInkBarStyles(g, e, f) | |
}) | |
}; | |
MdNavBarController.prototype._updateInkBarStyles = function(a, b, c) { | |
this._inkbar.toggleClass("_md-left", b < c).toggleClass("_md-right", b > c); | |
this._inkbar.css({ | |
display: 0 > b ? "none" : "" | |
}); | |
a && (a = a.getButtonEl(), b = a.offsetLeft, this._inkbar.css({ | |
left: b + "px", | |
width: a.offsetWidth + "px" | |
})) | |
}; | |
MdNavBarController.prototype._getTabs = function() { | |
var a = Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item")); | |
return a.map(function(a) { | |
return angular.element(a).controller("mdNavItem") | |
}) | |
}; | |
MdNavBarController.prototype._getTabByName = function(a) { | |
return this._findTab(function(b) { | |
return b.getName() == a | |
}) | |
}; | |
MdNavBarController.prototype._getSelectedTab = function() { | |
return this._findTab(function(a) { | |
return a.isSelected() | |
}) | |
}; | |
MdNavBarController.prototype.getFocusedTab = function() { | |
return this._findTab(function(a) { | |
return a.hasFocus() | |
}) | |
}; | |
MdNavBarController.prototype._findTab = function(a) { | |
for (var b = this._getTabs(), c = 0; c < b.length; c++) | |
if (a(b[c])) return b[c]; | |
return null | |
}; | |
MdNavBarController.prototype.onFocus = function() { | |
var a = this._getSelectedTab(); | |
a && a.setFocused(!0) | |
}; | |
MdNavBarController.prototype.onBlur = function() { | |
var a = this.getFocusedTab(); | |
a && a.setFocused(!1) | |
}; | |
MdNavBarController.prototype._moveFocus = function(a, b) { | |
a.setFocused(!1); | |
b.setFocused(!0) | |
}; | |
MdNavBarController.prototype.onKeydown = function(a) { | |
var b = this._$mdConstant.KEY_CODE, | |
c = this._getTabs(), | |
d = this.getFocusedTab(); | |
if (d) { | |
var f = c.indexOf(d); | |
switch (a.keyCode) { | |
case b.UP_ARROW: | |
case b.LEFT_ARROW: | |
0 < f && this._moveFocus(d, c[f - 1]); | |
break; | |
case b.DOWN_ARROW: | |
case b.RIGHT_ARROW: | |
f < c.length - 1 && this._moveFocus(d, c[f + 1]); | |
break; | |
case b.SPACE: | |
case b.ENTER: | |
this._$timeout(function() { | |
d.getButtonEl().click() | |
}) | |
} | |
} | |
}; | |
function MdNavItem(a) { | |
return { | |
restrict: "E", | |
require: ["mdNavItem", "^mdNavBar"], | |
controller: MdNavItemController, | |
bindToController: !0, | |
controllerAs: "ctrl", | |
replace: !0, | |
transclude: !0, | |
template: '<li class="md-nav-item" role="option" aria-selected="{{ctrl.isSelected()}}"><md-button ng-if="ctrl.mdNavSref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ui-sref="{{ctrl.mdNavSref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavHref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-href="{{ctrl.mdNavHref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavClick" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-click="ctrl.mdNavClick()"><span ng-transclude class="_md-nav-button-text"></span></md-button></li>', | |
scope: { | |
mdNavClick: "&?", | |
mdNavHref: "@?", | |
mdNavSref: "@?", | |
name: "@" | |
}, | |
link: function(b, c, d, f) { | |
var e = f[0], | |
g = f[1]; | |
a(function() { | |
e.name || (e.name = angular.element(c[0].querySelector("._md-nav-button-text")).text().trim()); | |
var a = angular.element(c[0].querySelector("._md-nav-button")); | |
a.on("click", function() { | |
g.mdSelectedNavItem = e.name; | |
b.$apply() | |
}) | |
}) | |
} | |
} | |
} | |
function MdNavItemController(a) { | |
this._$element = a; | |
this._focused = this._selected = !1; | |
var b = !!a.attr("md-nav-click"), | |
c = !!a.attr("md-nav-href"); | |
a = !!a.attr("md-nav-sref"); | |
if (1 < (b ? 1 : 0) + (c ? 1 : 0) + (a ? 1 : 0)) throw Error("Must specify exactly one of md-nav-click, md-nav-href, md-nav-sref for nav-item directive"); | |
} | |
MdNavItemController.prototype.getNgClassMap = function() { | |
return { | |
"md-active": this._selected, | |
"md-primary": this._selected, | |
"md-unselected": !this._selected, | |
"md-focused": this._focused | |
} | |
}; | |
MdNavItemController.prototype.getName = function() { | |
return this.name | |
}; | |
MdNavItemController.prototype.getButtonEl = function() { | |
return this._$element[0].querySelector("._md-nav-button") | |
}; | |
MdNavItemController.prototype.setSelected = function(a) { | |
this._selected = a | |
}; | |
MdNavItemController.prototype.isSelected = function() { | |
return this._selected | |
}; | |
MdNavItemController.prototype.setFocused = function(a) { | |
this._focused = a | |
}; | |
MdNavItemController.prototype.hasFocus = function() { | |
return this._focused | |
}; | |
ngmaterial.components.navBar = angular.module("material.components.navBar"); | |
MdPanelService.$inject = ["$rootElement", "$rootScope", "$injector", "$window"]; | |
angular.module("material.components.panel", ["material.core", "material.components.backdrop"]).service("$mdPanel", MdPanelService); | |
var defaultZIndex = 80, | |
FOCUS_TRAP_TEMPLATE = angular.element('<div class="_md-panel-focus-trap" tabindex="0"></div>'); | |
function MdPanelService(a, b, c, d) { | |
this._defaultConfigOptions = { | |
bindToController: !0, | |
clickOutsideToClose: !1, | |
disableParentScroll: !1, | |
escapeToClose: !1, | |
focusOnOpen: !0, | |
fullscreen: !1, | |
hasBackdrop: !1, | |
propagateContainerEvents: !1, | |
transformTemplate: angular.bind(this, this._wrapTemplate), | |
trapFocus: !1, | |
zIndex: defaultZIndex | |
}; | |
this._config = {}; | |
this._$rootElement = a; | |
this._$rootScope = b; | |
this._$injector = c; | |
this._$window = d; | |
this._trackedPanels = {}; | |
this.animation = MdPanelAnimation.animation; | |
this.xPosition = MdPanelPosition.xPosition; | |
this.yPosition = MdPanelPosition.yPosition | |
} | |
MdPanelService.prototype.create = function(a) { | |
a = a || {}; | |
if (angular.isDefined(a.id) && this._trackedPanels[a.id]) return this._trackedPanels[a.id]; | |
this._config = { | |
id: a.id || "panel_" + this._$injector.get("$mdUtil").nextUid(), | |
scope: this._$rootScope.$new(!0), | |
attachTo: this._$rootElement | |
}; | |
angular.extend(this._config, this._defaultConfigOptions, a); | |
var b = new MdPanelRef(this._config, this._$injector); | |
return this._trackedPanels[a.id] = b | |
}; | |
MdPanelService.prototype.open = function(a) { | |
var b = this.create(a); | |
return b.open().then(function() { | |
return b | |
}) | |
}; | |
MdPanelService.prototype.newPanelPosition = function() { | |
return new MdPanelPosition(this._$injector) | |
}; | |
MdPanelService.prototype.newPanelAnimation = function() { | |
return new MdPanelAnimation(this._$injector) | |
}; | |
MdPanelService.prototype._wrapTemplate = function(a) { | |
a = a || ""; | |
return '<div class="md-panel-outer-wrapper"> <div class="md-panel" style="left: -9999px;">' + a + "</div></div>" | |
}; | |
function MdPanelRef(a, b) { | |
this._$q = b.get("$q"); | |
this._$mdCompiler = b.get("$mdCompiler"); | |
this._$mdConstant = b.get("$mdConstant"); | |
this._$mdUtil = b.get("$mdUtil"); | |
this._$rootScope = b.get("$rootScope"); | |
this._$animate = b.get("$animate"); | |
this._$mdPanel = b.get("$mdPanel"); | |
this._$log = b.get("$log"); | |
this._$window = b.get("$window"); | |
this._$$rAF = b.get("$$rAF"); | |
this.id = a.id; | |
this.config = a; | |
this.isAttached = !1; | |
this._removeListeners = []; | |
this._restoreScroll = null | |
} | |
MdPanelRef.prototype.open = function() { | |
var a = this; | |
return this._$q(function(b, c) { | |
b = a._done(b, a); | |
var d = a._simpleBind(a.show, a); | |
a.attach().then(d).then(b)["catch"](c) | |
}) | |
}; | |
MdPanelRef.prototype.close = function() { | |
var a = this; | |
return this._$q(function(b, c) { | |
b = a._done(b, a); | |
var d = a._simpleBind(a.detach, a); | |
a.hide().then(d).then(b)["catch"](c) | |
}) | |
}; | |
MdPanelRef.prototype.attach = function() { | |
if (this.isAttached && this.panelEl) return this._$q.when(this); | |
var a = this; | |
return this._$q(function(b, c) { | |
b = a._done(b, a); | |
var d = a.config.onDomAdded || angular.noop, | |
f = function(b) { | |
a.isAttached = !0; | |
a._addEventListeners(); | |
return b | |
}; | |
a._$q.all([a._createBackdrop(), a._createPanel().then(f)["catch"](c)]).then(d).then(b)["catch"](c) | |
}) | |
}; | |
MdPanelRef.prototype.detach = function() { | |
if (!this.isAttached) return this._$q.when(this); | |
var a = this, | |
b = a.config.onDomRemoved || angular.noop, | |
c = function() { | |
a._removeEventListeners(); | |
a._topFocusTrap && a._topFocusTrap.parentNode && a._topFocusTrap.parentNode.removeChild(a._topFocusTrap); | |
a._bottomFocusTrap && a._bottomFocusTrap.parentNode && a._bottomFocusTrap.parentNode.removeChild(a._bottomFocusTrap); | |
a.panelContainer.remove(); | |
a.isAttached = !1; | |
return a._$q.when(a) | |
}; | |
this._restoreScroll && (this._restoreScroll(), this._restoreScroll = | |
null); | |
return this._$q(function(d, f) { | |
d = a._done(d, a); | |
a._$q.all([c(), a._backdropRef ? a._backdropRef.detach() : !0]).then(b).then(d)["catch"](f) | |
}) | |
}; | |
MdPanelRef.prototype.destroy = function() { | |
this.config.scope.$destroy(); | |
this.config.locals = null | |
}; | |
MdPanelRef.prototype.show = function() { | |
if (!this.panelContainer) return this._$q(function(a, b) { | |
b("Panel does not exist yet. Call open() or attach().") | |
}); | |
if (!this.panelContainer.hasClass("_md-panel-hidden")) return this._$q.when(this); | |
var a = this, | |
b = function() { | |
a.panelContainer.removeClass("_md-panel-hidden"); | |
return a._animateOpen() | |
}; | |
return this._$q(function(c, d) { | |
c = a._done(c, a); | |
var f = a.config.onOpenComplete || angular.noop; | |
a._$q.all([a._backdropRef ? a._backdropRef.show() : a, b().then(function() { | |
a._focusOnOpen() | |
}, | |
d)]).then(f).then(c)["catch"](d) | |
}) | |
}; | |
MdPanelRef.prototype.hide = function() { | |
if (!this.panelContainer) return this._$q(function(a, c) { | |
c("Panel does not exist yet. Call open() or attach().") | |
}); | |
if (this.panelContainer.hasClass("_md-panel-hidden")) return this._$q.when(this); | |
var a = this; | |
return this._$q(function(b, c) { | |
b = a._done(b, a); | |
var d = a.config.onRemoving || angular.noop, | |
f = function() { | |
var b = a.config.origin; | |
b && getElement(b).focus() | |
}, | |
e = function() { | |
a.panelContainer.addClass("_md-panel-hidden") | |
}; | |
a._$q.all([a._backdropRef ? a._backdropRef.hide() : a, a._animateClose().then(d).then(e).then(f)["catch"](c)]).then(b, | |
c) | |
}) | |
}; | |
MdPanelRef.prototype.addClass = function(a, b) { | |
this._$log.warn("The addClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."); | |
if (!this.panelContainer) throw Error("Panel does not exist yet. Call open() or attach()."); | |
b || this.panelContainer.hasClass(a) ? b && !this.panelEl.hasClass(a) && this.panelEl.addClass(a) : this.panelContainer.addClass(a) | |
}; | |
MdPanelRef.prototype.removeClass = function(a, b) { | |
this._$log.warn("The removeClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."); | |
if (!this.panelContainer) throw Error("Panel does not exist yet. Call open() or attach()."); | |
!b && this.panelContainer.hasClass(a) ? this.panelContainer.removeClass(a) : b && this.panelEl.hasClass(a) && this.panelEl.removeClass(a) | |
}; | |
MdPanelRef.prototype.toggleClass = function(a, b) { | |
this._$log.warn("The toggleClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."); | |
if (!this.panelContainer) throw Error("Panel does not exist yet. Call open() or attach()."); | |
b ? this.panelEl.toggleClass(a) : this.panelContainer.toggleClass(a) | |
}; | |
MdPanelRef.prototype._createPanel = function() { | |
var a = this; | |
return this._$q(function(b, c) { | |
a.config.locals || (a.config.locals = {}); | |
a.config.locals.mdPanelRef = a; | |
a._$mdCompiler.compile(a.config).then(function(d) { | |
a.panelContainer = d.link(a.config.scope); | |
getElement(a.config.attachTo).append(a.panelContainer); | |
a.config.disableParentScroll && (a._restoreScroll = a._$mdUtil.disableScrollAround(null, a.panelContainer, { | |
disableScrollMask: !0 | |
})); | |
a.panelEl = angular.element(a.panelContainer[0].querySelector(".md-panel")); | |
a.config.panelClass && | |
a.panelEl.addClass(a.config.panelClass); | |
a.config.propagateContainerEvents && a.panelContainer.css("pointer-events", "none"); | |
a._$animate.pin && a._$animate.pin(a.panelContainer, getElement(a.config.attachTo)); | |
a._configureTrapFocus(); | |
a._addStyles().then(function() { | |
b(a) | |
}, c) | |
}, c) | |
}) | |
}; | |
MdPanelRef.prototype._addStyles = function() { | |
var a = this; | |
return this._$q(function(b) { | |
a.panelContainer.css("z-index", a.config.zIndex); | |
a.panelEl.css("z-index", a.config.zIndex + 1); | |
var c = function() { | |
a.panelEl.css("left", ""); | |
a.panelContainer.addClass("_md-panel-hidden"); | |
b(a) | |
}; | |
if (a.config.fullscreen) a.panelEl.addClass("_md-panel-fullscreen"), c(); | |
else { | |
var d = a.config.position; | |
d ? a._$rootScope.$$postDigest(function() { | |
a._updatePosition(!0); | |
b(a) | |
}) : c() | |
} | |
}) | |
}; | |
MdPanelRef.prototype.updatePosition = function(a) { | |
if (!this.panelContainer) throw Error("Panel does not exist yet. Call open() or attach()."); | |
this.config.position = a; | |
this._updatePosition() | |
}; | |
MdPanelRef.prototype._updatePosition = function(a) { | |
var b = this.config.position; | |
b && (b._setPanelPosition(this.panelEl), a && this.panelContainer.addClass("_md-panel-hidden"), this.panelEl.css(MdPanelPosition.absPosition.TOP, b.getTop()), this.panelEl.css(MdPanelPosition.absPosition.BOTTOM, b.getBottom()), this.panelEl.css(MdPanelPosition.absPosition.LEFT, b.getLeft()), this.panelEl.css(MdPanelPosition.absPosition.RIGHT, b.getRight()), a = this._$mdConstant.CSS.TRANSFORM, this.panelEl.css(a, b.getTransform())) | |
}; | |
MdPanelRef.prototype._focusOnOpen = function() { | |
if (this.config.focusOnOpen) { | |
var a = this; | |
this._$rootScope.$$postDigest(function() { | |
var b = a._$mdUtil.findFocusTarget(a.panelEl) || a.panelEl; | |
b.focus() | |
}) | |
} | |
}; | |
MdPanelRef.prototype._createBackdrop = function() { | |
if (this.config.hasBackdrop) { | |
if (!this._backdropRef) { | |
var a = this._$mdPanel.newPanelAnimation().openFrom(this.config.attachTo).withAnimation({ | |
open: "_md-opaque-enter", | |
close: "_md-opaque-leave" | |
}), | |
a = { | |
animation: a, | |
attachTo: this.config.attachTo, | |
focusOnOpen: !1, | |
panelClass: "_md-panel-backdrop", | |
zIndex: this.config.zIndex - 1 | |
}; | |
this._backdropRef = this._$mdPanel.create(a) | |
} | |
if (!this._backdropRef.isAttached) return this._backdropRef.attach() | |
} | |
}; | |
MdPanelRef.prototype._addEventListeners = function() { | |
this._configureEscapeToClose(); | |
this._configureClickOutsideToClose(); | |
this._configureScrollListener() | |
}; | |
MdPanelRef.prototype._removeEventListeners = function() { | |
this._removeListeners && this._removeListeners.forEach(function(a) { | |
a() | |
}); | |
this._removeListeners = [] | |
}; | |
MdPanelRef.prototype._configureEscapeToClose = function() { | |
if (this.config.escapeToClose) { | |
var a = getElement(this.config.attachTo), | |
b = this, | |
c = function(a) { | |
a.keyCode === b._$mdConstant.KEY_CODE.ESCAPE && (a.stopPropagation(), a.preventDefault(), b.close()) | |
}; | |
this.panelContainer.on("keydown", c); | |
a.on("keydown", c); | |
this._removeListeners.push(function() { | |
b.panelContainer.off("keydown", c); | |
a.off("keydown", c) | |
}) | |
} | |
}; | |
MdPanelRef.prototype._configureClickOutsideToClose = function() { | |
if (this.config.clickOutsideToClose) { | |
var a = this.panelContainer, | |
b, c = function(a) { | |
b = a.target | |
}, | |
d = this, | |
f = function(c) { | |
b === a[0] && c.target === a[0] && (c.stopPropagation(), c.preventDefault(), d.close()) | |
}; | |
a.on("mousedown", c); | |
a.on("mouseup", f); | |
this._removeListeners.push(function() { | |
a.off("mousedown", c); | |
a.off("mouseup", f) | |
}) | |
} | |
}; | |
MdPanelRef.prototype._configureScrollListener = function() { | |
var a = angular.bind(this, this._updatePosition), | |
b = this._$$rAF.throttle(a), | |
c = this, | |
d = function() { | |
c.config.disableParentScroll || b() | |
}; | |
this._$window.addEventListener("scroll", d, !0); | |
this._removeListeners.push(function() { | |
c._$window.removeEventListener("scroll", d, !0) | |
}) | |
}; | |
MdPanelRef.prototype._configureTrapFocus = function() { | |
this.panelEl.attr("tabIndex", "-1"); | |
if (this.config.trapFocus) { | |
var a = this.panelEl; | |
this._topFocusTrap = FOCUS_TRAP_TEMPLATE.clone()[0]; | |
this._bottomFocusTrap = FOCUS_TRAP_TEMPLATE.clone()[0]; | |
var b = function() { | |
a.focus() | |
}; | |
this._topFocusTrap.addEventListener("focus", b); | |
this._bottomFocusTrap.addEventListener("focus", b); | |
this._removeListeners.push(this._simpleBind(function() { | |
this._topFocusTrap.removeEventListener("focus", b); | |
this._bottomFocusTrap.removeEventListener("focus", | |
b) | |
}, this)); | |
a[0].parentNode.insertBefore(this._topFocusTrap, a[0]); | |
a.after(this._bottomFocusTrap) | |
} | |
}; | |
MdPanelRef.prototype._animateOpen = function() { | |
this.panelContainer.addClass("md-panel-is-showing"); | |
var a = this.config.animation; | |
if (!a) return this.panelContainer.addClass("_md-panel-shown"), this._$q.when(this); | |
var b = this; | |
return this._$q(function(c) { | |
var d = b._done(c, b); | |
c = function() { | |
b._$log.warn("MdPanel Animations failed. Showing panel without animating."); | |
d() | |
}; | |
a.animateOpen(b.panelEl).then(d, c) | |
}) | |
}; | |
MdPanelRef.prototype._animateClose = function() { | |
var a = this.config.animation; | |
if (!a) return this.panelContainer.removeClass("md-panel-is-showing"), this.panelContainer.removeClass("_md-panel-shown"), this._$q.when(this); | |
var b = this; | |
return this._$q(function(c) { | |
var d = function() { | |
b.panelContainer.removeClass("md-panel-is-showing"); | |
c(b) | |
}, | |
f = function() { | |
b._$log.warn("MdPanel Animations failed. Hiding panel without animating."); | |
d() | |
}; | |
a.animateClose(b.panelEl).then(d, f) | |
}) | |
}; | |
MdPanelRef.prototype._simpleBind = function(a, b) { | |
return function(c) { | |
return a.apply(b, c) | |
} | |
}; | |
MdPanelRef.prototype._done = function(a, b) { | |
return function() { | |
a(b) | |
} | |
}; | |
function MdPanelPosition(a) { | |
this._$window = a.get("$window"); | |
this._isRTL = "rtl" === a.get("$mdUtil").bidi(); | |
this._absolute = !1; | |
this._right = this._left = this._bottom = this._top = ""; | |
this._translateX = []; | |
this._translateY = []; | |
this._positions = [] | |
} | |
MdPanelPosition.xPosition = { | |
CENTER: "center", | |
ALIGN_START: "align-start", | |
ALIGN_END: "align-end", | |
OFFSET_START: "offset-start", | |
OFFSET_END: "offset-end" | |
}; | |
MdPanelPosition.yPosition = { | |
CENTER: "center", | |
ALIGN_TOPS: "align-tops", | |
ALIGN_BOTTOMS: "align-bottoms", | |
ABOVE: "above", | |
BELOW: "below" | |
}; | |
MdPanelPosition.absPosition = { | |
TOP: "top", | |
RIGHT: "right", | |
BOTTOM: "bottom", | |
LEFT: "left" | |
}; | |
MdPanelPosition.prototype.absolute = function() { | |
this._absolute = !0; | |
return this | |
}; | |
MdPanelPosition.prototype._setPosition = function(a, b) { | |
if (a === MdPanelPosition.absPosition.RIGHT || a === MdPanelPosition.absPosition.LEFT) this._left = this._right = ""; | |
else if (a === MdPanelPosition.absPosition.BOTTOM || a === MdPanelPosition.absPosition.TOP) this._top = this._bottom = ""; | |
else throw a = Object.keys(MdPanelPosition.absPosition).join().toLowerCase(), Error("Position must be one of " + a + "."); | |
this["_" + a] = angular.isString(b) ? b : "0"; | |
return this | |
}; | |
MdPanelPosition.prototype.top = function(a) { | |
return this._setPosition(MdPanelPosition.absPosition.TOP, a) | |
}; | |
MdPanelPosition.prototype.bottom = function(a) { | |
return this._setPosition(MdPanelPosition.absPosition.BOTTOM, a) | |
}; | |
MdPanelPosition.prototype.start = function(a) { | |
var b = this._isRTL ? MdPanelPosition.absPosition.RIGHT : MdPanelPosition.absPosition.LEFT; | |
return this._setPosition(b, a) | |
}; | |
MdPanelPosition.prototype.end = function(a) { | |
var b = this._isRTL ? MdPanelPosition.absPosition.LEFT : MdPanelPosition.absPosition.RIGHT; | |
return this._setPosition(b, a) | |
}; | |
MdPanelPosition.prototype.left = function(a) { | |
return this._setPosition(MdPanelPosition.absPosition.LEFT, a) | |
}; | |
MdPanelPosition.prototype.right = function(a) { | |
return this._setPosition(MdPanelPosition.absPosition.RIGHT, a) | |
}; | |
MdPanelPosition.prototype.centerHorizontally = function() { | |
this._left = "50%"; | |
this._right = ""; | |
this._translateX = ["-50%"]; | |
return this | |
}; | |
MdPanelPosition.prototype.centerVertically = function() { | |
this._top = "50%"; | |
this._bottom = ""; | |
this._translateY = ["-50%"]; | |
return this | |
}; | |
MdPanelPosition.prototype.center = function() { | |
return this.centerHorizontally().centerVertically() | |
}; | |
MdPanelPosition.prototype.relativeTo = function(a) { | |
this._absolute = !1; | |
this._relativeToEl = getElement(a); | |
return this | |
}; | |
MdPanelPosition.prototype.addPanelPosition = function(a, b) { | |
if (!this._relativeToEl) throw Error("addPanelPosition can only be used with relative positioning. Set relativeTo first."); | |
this._validateXPosition(a); | |
this._validateYPosition(b); | |
this._positions.push({ | |
x: a, | |
y: b | |
}); | |
return this | |
}; | |
MdPanelPosition.prototype._validateYPosition = function(a) { | |
if (null != a) { | |
for (var b = Object.keys(MdPanelPosition.yPosition), c = [], d, f = 0; d = b[f]; f++) | |
if (d = MdPanelPosition.yPosition[d], c.push(d), d === a) return; | |
throw Error("Panel y position only accepts the following values:\n" + c.join(" | ")); | |
} | |
}; | |
MdPanelPosition.prototype._validateXPosition = function(a) { | |
if (null != a) { | |
for (var b = Object.keys(MdPanelPosition.xPosition), c = [], d, f = 0; d = b[f]; f++) | |
if (d = MdPanelPosition.xPosition[d], c.push(d), d === a) return; | |
throw Error("Panel x Position only accepts the following values:\n" + c.join(" | ")); | |
} | |
}; | |
MdPanelPosition.prototype.withOffsetX = function(a) { | |
this._translateX.push(a); | |
return this | |
}; | |
MdPanelPosition.prototype.withOffsetY = function(a) { | |
this._translateY.push(a); | |
return this | |
}; | |
MdPanelPosition.prototype.getTop = function() { | |
return this._top | |
}; | |
MdPanelPosition.prototype.getBottom = function() { | |
return this._bottom | |
}; | |
MdPanelPosition.prototype.getLeft = function() { | |
return this._left | |
}; | |
MdPanelPosition.prototype.getRight = function() { | |
return this._right | |
}; | |
MdPanelPosition.prototype.getTransform = function() { | |
var a = this._reduceTranslateValues("translateX", this._translateX), | |
b = this._reduceTranslateValues("translateY", this._translateY); | |
return (a + " " + b).trim() | |
}; | |
MdPanelPosition.prototype._isOnscreen = function(a) { | |
var b = parseInt(this.getLeft()), | |
c = parseInt(this.getTop()), | |
d = b + a[0].offsetWidth; | |
a = c + a[0].offsetHeight; | |
return 0 <= b && 0 <= c && a <= this._$window.innerHeight && d <= this._$window.innerWidth | |
}; | |
MdPanelPosition.prototype.getActualPosition = function() { | |
return this._actualPosition | |
}; | |
MdPanelPosition.prototype._reduceTranslateValues = function(a, b) { | |
return b.map(function(b) { | |
return a + "(" + b + ")" | |
}).join(" ") | |
}; | |
MdPanelPosition.prototype._setPanelPosition = function(a) { | |
if (!this._absolute) | |
if (this._actualPosition) this._calculatePanelPosition(a, this._actualPosition); | |
else | |
for (var b = 0; b < this._positions.length && (this._actualPosition = this._positions[b], this._calculatePanelPosition(a, this._actualPosition), !this._isOnscreen(a)); b++); | |
}; | |
MdPanelPosition.prototype._reverseXPosition = function(a) { | |
if (a !== MdPanelPosition.xPosition.CENTER) return -1 < a.indexOf("start") ? a.replace("start", "end") : a.replace("end", "start") | |
}; | |
MdPanelPosition.prototype._bidi = function(a) { | |
return this._isRTL ? this._reverseXPosition(a) : a | |
}; | |
MdPanelPosition.prototype._calculatePanelPosition = function(a, b) { | |
a = a[0].getBoundingClientRect(); | |
var c = a.width; | |
a = a.height; | |
var d = this._relativeToEl[0].getBoundingClientRect(), | |
f = d.left, | |
e = d.right, | |
g = d.width; | |
switch (this._bidi(b.x)) { | |
case MdPanelPosition.xPosition.OFFSET_START: | |
this._left = f - c + "px"; | |
break; | |
case MdPanelPosition.xPosition.ALIGN_END: | |
this._left = e - c + "px"; | |
break; | |
case MdPanelPosition.xPosition.CENTER: | |
c = f + .5 * g - .5 * c; | |
this._left = c + "px"; | |
break; | |
case MdPanelPosition.xPosition.ALIGN_START: | |
this._left = f + "px"; | |
break; | |
case MdPanelPosition.xPosition.OFFSET_END: | |
this._left = e + "px" | |
} | |
c = d.top; | |
f = d.bottom; | |
d = d.height; | |
switch (b.y) { | |
case MdPanelPosition.yPosition.ABOVE: | |
this._top = c - a + "px"; | |
break; | |
case MdPanelPosition.yPosition.ALIGN_BOTTOMS: | |
this._top = f - a + "px"; | |
break; | |
case MdPanelPosition.yPosition.CENTER: | |
b = c + .5 * d - .5 * a; | |
this._top = b + "px"; | |
break; | |
case MdPanelPosition.yPosition.ALIGN_TOPS: | |
this._top = c + "px"; | |
break; | |
case MdPanelPosition.yPosition.BELOW: | |
this._top = f + "px" | |
} | |
}; | |
function MdPanelAnimation(a) { | |
this._$mdUtil = a.get("$mdUtil"); | |
this._animationClass = "" | |
} | |
MdPanelAnimation.animation = { | |
SLIDE: "md-panel-animate-slide", | |
SCALE: "md-panel-animate-scale", | |
FADE: "md-panel-animate-fade" | |
}; | |
MdPanelAnimation.prototype.openFrom = function(a) { | |
a = a.target ? a.target : a; | |
this._openFrom = this._getPanelAnimationTarget(a); | |
this._closeTo || (this._closeTo = this._openFrom); | |
return this | |
}; | |
MdPanelAnimation.prototype.closeTo = function(a) { | |
this._closeTo = this._getPanelAnimationTarget(a); | |
return this | |
}; | |
MdPanelAnimation.prototype._getPanelAnimationTarget = function(a) { | |
return angular.isDefined(a.top) || angular.isDefined(a.left) ? { | |
element: void 0, | |
bounds: { | |
top: a.top || 0, | |
left: a.left || 0 | |
} | |
} : this._getBoundingClientRect(getElement(a)) | |
}; | |
MdPanelAnimation.prototype.withAnimation = function(a) { | |
this._animationClass = a; | |
return this | |
}; | |
MdPanelAnimation.prototype.animateOpen = function(a) { | |
var b = this._$mdUtil.dom.animator; | |
this._fixBounds(a); | |
var c, d = a[0].style.transform || "", | |
f = b.toTransformCss(d), | |
e = b.toTransformCss(d); | |
switch (this._animationClass) { | |
case MdPanelAnimation.animation.SLIDE: | |
a.css("opacity", "1"); | |
c = { | |
transitionInClass: "_md-panel-animate-enter" | |
}; | |
f = b.calculateSlideToOrigin(a, this._openFrom) || ""; | |
f = b.toTransformCss(f + " " + d); | |
break; | |
case MdPanelAnimation.animation.SCALE: | |
c = { | |
transitionInClass: "_md-panel-animate-enter" | |
}; | |
f = b.calculateZoomToOrigin(a, | |
this._openFrom) || ""; | |
f = b.toTransformCss(f + " " + d); | |
break; | |
case MdPanelAnimation.animation.FADE: | |
c = { | |
transitionInClass: "_md-panel-animate-enter" | |
}; | |
break; | |
default: | |
c = angular.isString(this._animationClass) ? { | |
transitionInClass: this._animationClass | |
} : { | |
transitionInClass: this._animationClass.open, | |
transitionOutClass: this._animationClass.close | |
} | |
} | |
return b.translate3d(a, f, e, c) | |
}; | |
MdPanelAnimation.prototype.animateClose = function(a) { | |
var b = this._$mdUtil.dom.animator, | |
c, d = a[0].style.transform || "", | |
f = b.toTransformCss(d), | |
e = b.toTransformCss(d); | |
switch (this._animationClass) { | |
case MdPanelAnimation.animation.SLIDE: | |
a.css("opacity", "1"); | |
c = { | |
transitionInClass: "_md-panel-animate-leave" | |
}; | |
e = b.calculateSlideToOrigin(a, this._closeTo) || ""; | |
e = b.toTransformCss(e + " " + d); | |
break; | |
case MdPanelAnimation.animation.SCALE: | |
c = { | |
transitionInClass: "_md-panel-animate-scale-out _md-panel-animate-leave" | |
}; | |
e = b.calculateZoomToOrigin(a, | |
this._closeTo) || ""; | |
e = b.toTransformCss(e + " " + d); | |
break; | |
case MdPanelAnimation.animation.FADE: | |
c = { | |
transitionInClass: "_md-panel-animate-fade-out _md-panel-animate-leave" | |
}; | |
break; | |
default: | |
c = angular.isString(this._animationClass) ? { | |
transitionOutClass: this._animationClass | |
} : { | |
transitionInClass: this._animationClass.close, | |
transitionOutClass: this._animationClass.open | |
} | |
} | |
return b.translate3d(a, f, e, c) | |
}; | |
MdPanelAnimation.prototype._fixBounds = function(a) { | |
var b = a[0].offsetWidth; | |
a = a[0].offsetHeight; | |
this._openFrom && null == this._openFrom.bounds.height && (this._openFrom.bounds.height = a); | |
this._openFrom && null == this._openFrom.bounds.width && (this._openFrom.bounds.width = b); | |
this._closeTo && null == this._closeTo.bounds.height && (this._closeTo.bounds.height = a); | |
this._closeTo && null == this._closeTo.bounds.width && (this._closeTo.bounds.width = b) | |
}; | |
MdPanelAnimation.prototype._getBoundingClientRect = function(a) { | |
if (a instanceof angular.element) return { | |
element: a, | |
bounds: a[0].getBoundingClientRect() | |
} | |
}; | |
function getElement(a) { | |
a = angular.isString(a) ? document.querySelector(a) : a; | |
return angular.element(a) | |
} | |
ngmaterial.components.panel = angular.module("material.components.panel"); | |
angular.module("material.components.progressCircular", ["material.core"]); | |
MdProgressCircularDirective.$inject = "$window $mdProgressCircular $mdTheming $mdUtil $interval $log".split(" "); | |
angular.module("material.components.progressCircular").directive("mdProgressCircular", MdProgressCircularDirective); | |
function MdProgressCircularDirective(a, b, c, d, f) { | |
function e(e, h, k) { | |
function m(c, f, h, k, m) { | |
var q = ++L, | |
r = d.now(), | |
v = f - c, | |
p = l(e.mdDiameter), | |
t = p - b.strokeWidth / 100 * p, | |
w = h || b.easeFn, | |
x = k || b.duration; | |
f === c ? F.attr("d", g(f, p, t, m)) : H = n(function U() { | |
var b = a.Math.max(0, a.Math.min(d.now() - r, x)); | |
F.attr("d", g(w(b, c, v, x), p, t, m)); | |
q === L && b < x && (H = n(U)) | |
}) | |
} | |
function q() { | |
m(D, A, b.easeFnIndeterminate, b.durationIndeterminate, B); | |
B = (B + A) % 100; | |
var a = D; | |
D = -A; | |
A = -a | |
} | |
function r() { | |
I || (I = f(q, b.durationIndeterminate + 50, 0, !1), q(), h.addClass("md-mode-indeterminate").removeAttr("aria-valuenow")) | |
} | |
function v() { | |
I && (f.cancel(I), I = null, h.removeClass("md-mode-indeterminate")) | |
} | |
var w = h[0], | |
E = angular.element(w.querySelector("svg")), | |
F = angular.element(w.querySelector("path")), | |
D = b.startIndeterminate, | |
A = b.endIndeterminate, | |
B = 0, | |
L = 0, | |
H, I; | |
c(h); | |
h.toggleClass("_md-progress-circular-disabled", k.hasOwnProperty("disabled")); | |
"indeterminate" === e.mdMode && r(); | |
e.$on("$destroy", function() { | |
v(); | |
H && p(H) | |
}); | |
e.$watchGroup(["value", "mdMode", function() { | |
var a = w.disabled; | |
return !0 === a || !1 === a ? a : angular.isDefined(h.attr("disabled")) | |
}], | |
function(b, c) { | |
var d = b[1], | |
e = b[2], | |
f = c[2]; | |
e !== f && h.toggleClass("_md-progress-circular-disabled", !!e); | |
e ? v() : ("determinate" !== d && "indeterminate" !== d && (d = "indeterminate", k.$set("mdMode", d)), "indeterminate" === d ? r() : (b = a.Math.max(0, a.Math.min(b[0] || 0, 100)), v(), h.attr("aria-valuenow", b), m(a.Math.max(0, a.Math.min(c[0] || 0, 100)), b))) | |
}); | |
e.$watch("mdDiameter", function(a) { | |
a = l(a); | |
var c = b.strokeWidth / 100 * a, | |
d = a / 2 + "px", | |
e = { | |
width: a + "px", | |
height: a + "px" | |
}; | |
E[0].setAttribute("viewBox", "0 0 " + a + " " + a); | |
E.css(e).css("transform-origin", | |
d + " " + d + " " + d); | |
h.css(e); | |
F.css("stroke-width", c + "px") | |
}) | |
} | |
function g(a, b, c, d) { | |
d = d || 0; | |
b /= 2; | |
c /= 2; | |
var e = 3.5999 * d; | |
d = 3.5999 * a; | |
a = h(b, c, e); | |
b = h(b, c, d + e); | |
e = 0 > d ? 0 : 1; | |
d = 0 > d ? -180 <= d ? 0 : 1 : 180 >= d ? 0 : 1; | |
return "M" + a + "A" + c + "," + c + " 0 " + d + "," + e + " " + b | |
} | |
function h(b, c, d) { | |
d = (d - 90) * k; | |
return b + c * a.Math.cos(d) + "," + (b + c * a.Math.sin(d)) | |
} | |
function l(a) { | |
var c = b.progressSize; | |
if (a) { | |
var d = parseFloat(a); | |
a.lastIndexOf("%") === a.length - 1 && (d = d / 100 * c); | |
return d | |
} | |
return c | |
} | |
var n = a.requestAnimationFrame || a.webkitRequestAnimationFrame || angular.noop, | |
p = a.cancelAnimationFrame || a.webkitCancelAnimationFrame || a.webkitCancelRequestAnimationFrame || angular.noop, | |
k = a.Math.PI / 180; | |
return { | |
restrict: "E", | |
scope: { | |
value: "@", | |
mdDiameter: "@", | |
mdMode: "@" | |
}, | |
template: '<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>', | |
compile: function(a, b) { | |
a.attr({ | |
"aria-valuemin": 0, | |
"aria-valuemax": 100, | |
role: "progressbar" | |
}); | |
angular.isUndefined(b.mdMode) ? (a = (a = angular.isDefined(b.value)) ? "determinate" : "indeterminate", b.$set("mdMode", a)) : b.$set("mdMode", b.mdMode.trim()); | |
return e | |
} | |
} | |
} | |
angular.module("material.components.progressCircular").provider("$mdProgressCircular", MdProgressCircularProvider); | |
function MdProgressCircularProvider() { | |
function a(a, b, c, g) { | |
return c * a / g + b | |
} | |
function b(a, b, c, g) { | |
g = (a /= g) * a; | |
a *= g; | |
return b + c * (6 * a * g + -15 * g * g + 10 * a) | |
} | |
var c = { | |
progressSize: 50, | |
strokeWidth: 10, | |
duration: 100, | |
easeFn: a, | |
durationIndeterminate: 500, | |
startIndeterminate: 3, | |
endIndeterminate: 80, | |
easeFnIndeterminate: b, | |
easingPresets: { | |
linearEase: a, | |
materialEase: b | |
} | |
}; | |
return { | |
configure: function(a) { | |
return c = angular.extend(c, a || {}) | |
}, | |
$get: function() { | |
return c | |
} | |
} | |
} | |
ngmaterial.components.progressCircular = angular.module("material.components.progressCircular"); | |
MdProgressLinearDirective.$inject = ["$mdTheming", "$mdUtil", "$log"]; | |
angular.module("material.components.progressLinear", ["material.core"]).directive("mdProgressLinear", MdProgressLinearDirective); | |
function MdProgressLinearDirective(a, b) { | |
function c(a) { | |
a.attr("aria-valuemin", 0); | |
a.attr("aria-valuemax", 100); | |
a.attr("role", "progressbar"); | |
return d | |
} | |
function d(c, d, g) { | |
function e() { | |
g.$observe("value", function(a) { | |
a = Math.max(0, Math.min(a || 0, 100)); | |
d.attr("aria-valuenow", a); | |
"query" != n() && p(t, a) | |
}); | |
g.$observe("mdBufferValue", function(a) { | |
p(w, Math.max(0, Math.min(a || 0, 100))) | |
}); | |
g.$observe("disabled", function(a) { | |
m = !0 === a || !1 === a ? !!a : angular.isDefined(a); | |
d.toggleClass("_md-progress-linear-disabled", m); | |
x.toggleClass(k, !m) | |
}); | |
g.$observe("mdMode", function(a) { | |
k && x.removeClass(k); | |
switch (a) { | |
case "query": | |
case "buffer": | |
case "determinate": | |
case "indeterminate": | |
x.addClass(k = "md-mode-" + a); | |
break; | |
default: | |
x.addClass(k = "md-mode-indeterminate") | |
} | |
}) | |
} | |
function f() { | |
if (angular.isUndefined(g.mdMode)) { | |
var a = angular.isDefined(g.value), | |
a = a ? "determinate" : "indeterminate"; | |
d.attr("md-mode", a); | |
g.mdMode = a | |
} | |
} | |
function n() { | |
var a = (g.mdMode || "").trim(); | |
if (a) switch (a) { | |
case "determinate": | |
case "indeterminate": | |
case "buffer": | |
case "query": | |
break; | |
default: | |
a = | |
"indeterminate" | |
} | |
return a | |
} | |
function p(a, c) { | |
!m && n() && (c = b.supplant("translateX({0}%) scale({1},1)", [(c - 100) / 2, c / 100]), c = q({ | |
transform: c | |
}), angular.element(a).css(c)) | |
} | |
a(d); | |
var k, m = g.hasOwnProperty("disabled"), | |
q = b.dom.animator.toCss, | |
w = angular.element(d[0].querySelector(".md-bar1")), | |
t = angular.element(d[0].querySelector(".md-bar2")), | |
x = angular.element(d[0].querySelector(".md-container")); | |
d.attr("md-mode", n()).toggleClass("_md-progress-linear-disabled", m); | |
f(); | |
e() | |
} | |
return { | |
restrict: "E", | |
template: '<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>', | |
compile: c | |
} | |
} | |
ngmaterial.components.progressLinear = angular.module("material.components.progressLinear"); | |
mdRadioGroupDirective.$inject = ["$mdUtil", "$mdConstant", "$mdTheming", "$timeout"]; | |
mdRadioButtonDirective.$inject = ["$mdAria", "$mdUtil", "$mdTheming"]; | |
angular.module("material.components.radioButton", ["material.core"]).directive("mdRadioGroup", mdRadioGroupDirective).directive("mdRadioButton", mdRadioButtonDirective); | |
function mdRadioGroupDirective(a, b, c, d) { | |
function f(e, f, g, h) { | |
function k() { | |
f.hasClass("md-focused") || f.addClass("md-focused") | |
} | |
function l(c) { | |
var d = c.which || c.keyCode; | |
if (d == b.KEY_CODE.ENTER || c.currentTarget == c.target) switch (d) { | |
case b.KEY_CODE.LEFT_ARROW: | |
case b.KEY_CODE.UP_ARROW: | |
c.preventDefault(); | |
n.selectPrevious(); | |
k(); | |
break; | |
case b.KEY_CODE.RIGHT_ARROW: | |
case b.KEY_CODE.DOWN_ARROW: | |
c.preventDefault(); | |
n.selectNext(); | |
k(); | |
break; | |
case b.KEY_CODE.ENTER: | |
c = angular.element(a.getClosest(f[0], "form")), 0 < c.length && | |
c.triggerHandler("submit") | |
} | |
} | |
f.addClass("_md"); | |
c(f); | |
var n = h[0]; | |
g = h[1] || a.fakeNgModel(); | |
n.init(g); | |
e.mouseActive = !1; | |
f.attr({ | |
role: "radiogroup", | |
tabIndex: f.attr("tabindex") || "0" | |
}).on("keydown", l).on("mousedown", function() { | |
e.mouseActive = !0; | |
d(function() { | |
e.mouseActive = !1 | |
}, 100) | |
}).on("focus", function() { | |
!1 === e.mouseActive && n.$element.addClass("md-focused") | |
}).on("blur", function() { | |
n.$element.removeClass("md-focused") | |
}) | |
} | |
function e(a) { | |
this._radioButtonRenderFns = []; | |
this.$element = a | |
} | |
function g() { | |
return { | |
init: function(a) { | |
this._ngModelCtrl = | |
a; | |
this._ngModelCtrl.$render = angular.bind(this, this.render) | |
}, | |
add: function(a) { | |
this._radioButtonRenderFns.push(a) | |
}, | |
remove: function(a) { | |
a = this._radioButtonRenderFns.indexOf(a); - 1 !== a && this._radioButtonRenderFns.splice(a, 1) | |
}, | |
render: function() { | |
this._radioButtonRenderFns.forEach(function(a) { | |
a() | |
}) | |
}, | |
setViewValue: function(a, b) { | |
this._ngModelCtrl.$setViewValue(a, b); | |
this.render() | |
}, | |
getViewValue: function() { | |
return this._ngModelCtrl.$viewValue | |
}, | |
selectNext: function() { | |
return h(this.$element, 1) | |
}, | |
selectPrevious: function() { | |
return h(this.$element, -1) | |
}, | |
setActiveDescendant: function(a) { | |
this.$element.attr("aria-activedescendant", a) | |
}, | |
isDisabled: function() { | |
return this.$element[0].hasAttribute("disabled") | |
} | |
} | |
} | |
function h(b, c) { | |
var d = a.iterator(b[0].querySelectorAll("md-radio-button"), !0); | |
if (d.count()) { | |
var e = function(a) { | |
return !angular.element(a).attr("disabled") | |
}; | |
b = b[0].querySelector("md-radio-button.md-checked"); | |
c = d[0 > c ? "previous" : "next"](b, e) || d.first(); | |
angular.element(c).triggerHandler("click") | |
} | |
} | |
e.prototype = g(); | |
return { | |
restrict: "E", | |
controller: ["$element", | |
e | |
], | |
require: ["mdRadioGroup", "?ngModel"], | |
link: { | |
pre: f | |
} | |
} | |
} | |
function mdRadioButtonDirective(a, b, c) { | |
function d(d, e, g, h) { | |
function f() { | |
if (!h) throw "RadioButton: No RadioGroupController could be found."; | |
h.add(p); | |
g.$observe("value", p); | |
e.on("click", n).on("$destroy", function() { | |
h.remove(p) | |
}) | |
} | |
function n(a) { | |
e[0].hasAttribute("disabled") || h.isDisabled() || d.$apply(function() { | |
h.setViewValue(g.value, a && a.type) | |
}) | |
} | |
function p() { | |
function a(a) { | |
if ("MD-RADIO-GROUP" != e.parent()[0].nodeName) e.parent()[a ? "addClass" : "removeClass"]("md-checked") | |
} | |
var b = h.getViewValue() == g.value; | |
b !== | |
m && (m = b, e.attr("aria-checked", b), b ? (a(!0), e.addClass("md-checked"), h.setActiveDescendant(e.attr("id"))) : (a(!1), e.removeClass("md-checked"))) | |
} | |
function k(c, d) { | |
d.ariaId = g.id || "radio_" + b.nextUid(); | |
c.attr({ | |
id: d.ariaId, | |
role: "radio", | |
"aria-checked": "false" | |
}); | |
a.expectWithText(c, "aria-label") | |
} | |
var m; | |
c(e); | |
k(e, d); | |
f() | |
} | |
return { | |
restrict: "E", | |
require: "^mdRadioGroup", | |
transclude: !0, | |
template: '<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>', | |
link: d | |
} | |
} | |
ngmaterial.components.radioButton = angular.module("material.components.radioButton"); | |
SelectDirective.$inject = "$mdSelect $mdUtil $mdConstant $mdTheming $mdAria $compile $parse".split(" "); | |
SelectMenuDirective.$inject = ["$parse", "$mdUtil", "$mdConstant", "$mdTheming"]; | |
OptionDirective.$inject = ["$mdButtonInkRipple", "$mdUtil"]; | |
SelectProvider.$inject = ["$$interimElementProvider"]; | |
var selectNextId = 0, | |
CHECKBOX_SELECTION_INDICATOR = angular.element('<div class="md-container"><div class="md-icon"></div></div>'); | |
angular.module("material.components.select", ["material.core", "material.components.backdrop"]).directive("mdSelect", SelectDirective).directive("mdSelectMenu", SelectMenuDirective).directive("mdOption", OptionDirective).directive("mdOptgroup", OptgroupDirective).directive("mdSelectHeader", SelectHeaderDirective).provider("$mdSelect", SelectProvider); | |
function SelectDirective(a, b, c, d, f, e, g) { | |
function h(e, h) { | |
var l = angular.element("<md-select-value><span></span></md-select-value>"); | |
l.append('<span class="md-select-icon" aria-hidden="true"></span>'); | |
l.addClass("md-select-value"); | |
l[0].hasAttribute("id") || l.attr("id", "select_value_label_" + b.nextUid()); | |
e.find("md-content").length || e.append(angular.element("<md-content>").append(e.contents())); | |
h.mdOnOpen && (e.find("md-content").prepend(angular.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular></div>')), | |
e.find("md-option").attr("ng-show", "$$loadingAsyncDone")); | |
if (h.name) { | |
var k = angular.element('<select class="md-visually-hidden">'); | |
k.attr({ | |
name: h.name, | |
"aria-hidden": "true", | |
tabindex: "-1" | |
}); | |
var m = e.find("md-option"); | |
angular.forEach(m, function(a) { | |
var b = angular.element("<option>" + a.innerHTML + "</option>"); | |
a.hasAttribute("ng-value") ? b.attr("ng-value", a.getAttribute("ng-value")) : a.hasAttribute("value") && b.attr("value", a.getAttribute("value")); | |
k.append(b) | |
}); | |
k.append('<option ng-value="' + h.ngModel + '" selected></option>'); | |
e.parent().append(k) | |
} | |
var q = b.parseAttributeBoolean(h.multiple), | |
m = q ? "multiple" : "", | |
n = '<div class="md-select-menu-container" aria-hidden="true"><md-select-menu {0}>{1}</md-select-menu></div>', | |
n = b.supplant(n, [m, e.html()]); | |
e.empty().append(l); | |
e.append(n); | |
h.tabindex || h.$set("tabindex", 0); | |
return function(e, h, k, m) { | |
function l() { | |
J && (O = O || J.find("md-select-menu").controller("mdSelectMenu"), P.setLabelText(O.selectedLabels())) | |
} | |
function n() { | |
if (I) { | |
var a = O.selectedLabels({ | |
mode: "aria" | |
}); | |
h.attr("aria-label", a.length ? | |
I + ": " + a : I) | |
} | |
} | |
function v() { | |
C && C.setHasValue(0 < O.selectedLabels().length || (h[0].validity || {}).badInput) | |
} | |
function r() { | |
J = angular.element(h[0].querySelector(".md-select-menu-container")); | |
ba = e; | |
if (k.mdContainerClass) { | |
var a = J[0].getAttribute("class") + " " + k.mdContainerClass; | |
J[0].setAttribute("class", a) | |
} | |
O = J.find("md-select-menu").controller("mdSelectMenu"); | |
O.init(K, k.ngModel); | |
h.on("$destroy", function() { | |
J.remove() | |
}) | |
} | |
function p(a) { | |
if (c.isNavigationKey(a)) a.preventDefault(), t(a); | |
else if (c.isInputKey(a) || c.isNumPadKey(a)) a.preventDefault(), | |
(a = O.optNodeForKeyboardSearch(a)) && !a.hasAttribute("disabled") && (a = angular.element(a).controller("mdOption"), O.isMultiple || O.deselect(Object.keys(O.selected)[0]), O.select(a.hashKey, a.value), O.refreshViewValue()) | |
} | |
function t() { | |
ba._mdSelectIsOpen = !0; | |
h.attr("aria-expanded", "true"); | |
a.show({ | |
scope: ba, | |
preserveScope: !0, | |
skipCompile: !0, | |
element: J, | |
target: h[0], | |
selectCtrl: P, | |
preserveElement: !0, | |
hasBackdrop: !0, | |
loadingAsync: k.mdOnOpen ? e.$eval(k.mdOnOpen) || !0 : !1 | |
})["finally"](function() { | |
ba._mdSelectIsOpen = !1; | |
h.focus(); | |
h.attr("aria-expanded", "false"); | |
K.$setTouched() | |
}) | |
} | |
var w = !0, | |
x, I, C = m[0], | |
P = m[1], | |
K = m[2], | |
R = m[3], | |
S = h.find("md-select-value"); | |
m = angular.isDefined(k.readonly); | |
var T = b.parseAttributeBoolean(k.mdNoAsterisk); | |
T && h.addClass("md-no-asterisk"); | |
if (C) { | |
var da = C.isErrorGetter || function() { | |
return K.$invalid && (K.$touched || R && R.$submitted) | |
}; | |
if (C.input && h.find("md-select-header").find("input")[0] !== C.input[0]) throw Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!"); | |
C.input = h; | |
C.label || f.expect(h, "aria-label", h.attr("placeholder")); | |
e.$watch(da, C.setInvalid) | |
} | |
var J, ba, O; | |
r(); | |
d(h); | |
R && angular.isDefined(k.multiple) && b.nextTick(function() { | |
var a = K.$modelValue || K.$viewValue; | |
a && R.$setPristine() | |
}); | |
var X = K.$render; | |
K.$render = function() { | |
X(); | |
l(); | |
n(); | |
v() | |
}; | |
k.$observe("placeholder", K.$render); | |
C && C.label && k.$observe("required", function(a) { | |
C.label.toggleClass("md-required", a && !T) | |
}); | |
P.setLabelText = function(a) { | |
P.setIsPlaceholder(!a); | |
if (k.mdSelectedText) a = g(k.mdSelectedText)(e); | |
else { | |
var b = k.placeholder || | |
(C && C.label ? C.label.text() : ""); | |
a = a || b || "" | |
} | |
b = S.children().eq(0); | |
b.html(a) | |
}; | |
P.setIsPlaceholder = function(a) { | |
a ? (S.addClass("md-select-placeholder"), C && C.label && C.label.addClass("md-placeholder")) : (S.removeClass("md-select-placeholder"), C && C.label && C.label.removeClass("md-placeholder")) | |
}; | |
m || (h.on("focus", function() { | |
C && C.setFocused(!0) | |
}), h.on("blur", function(a) { | |
w && (w = !1, ba._mdSelectIsOpen && a.stopImmediatePropagation()); | |
ba._mdSelectIsOpen || (C && C.setFocused(!1), v()) | |
})); | |
P.triggerClose = function() { | |
g(k.mdOnClose)(e) | |
}; | |
e.$$postDigest(function() { | |
var a = h.attr("aria-label") || h.attr("placeholder"); | |
!a && C && C.label && (a = C.label.text()); | |
I = a; | |
f.expect(h, "aria-label", a); | |
l(); | |
n() | |
}); | |
e.$watch(function() { | |
return O.selectedLabels() | |
}, l); | |
var ea; | |
k.$observe("ngMultiple", function(a) { | |
ea && ea(); | |
var b = g(a); | |
ea = e.$watch(function() { | |
return b(e) | |
}, function(a, b) { | |
if (void 0 !== a || void 0 !== b) a ? h.attr("multiple", "multiple") : h.removeAttr("multiple"), h.attr("aria-multiselectable", a ? "true" : "false"), J && (O.setMultiple(a), X = K.$render, K.$render = function() { | |
X(); | |
l(); | |
n(); | |
v() | |
}, K.$render()) | |
}) | |
}); | |
k.$observe("disabled", function(a) { | |
angular.isString(a) && (a = !0); | |
if (void 0 === x || x !== a) | |
if (x = a) h.attr({ | |
"aria-disabled": "true" | |
}).removeAttr("tabindex").off("click", t).off("keydown", p); | |
else h.attr({ | |
tabindex: k.tabindex, | |
"aria-disabled": "false" | |
}).on("click", t).on("keydown", p) | |
}); | |
k.hasOwnProperty("disabled") || k.hasOwnProperty("ngDisabled") || (h.attr({ | |
"aria-disabled": "false" | |
}), h.on("click", t), h.on("keydown", p)); | |
m = { | |
role: "listbox", | |
"aria-expanded": "false", | |
"aria-multiselectable": q && !k.ngMultiple ? | |
"true" : "false" | |
}; | |
h[0].hasAttribute("id") || (m.id = "select_" + b.nextUid()); | |
da = "select_container_" + b.nextUid(); | |
J.attr("id", da); | |
m["aria-owns"] = da; | |
h.attr(m); | |
e.$on("$destroy", function() { | |
a.destroy()["finally"](function() { | |
C && (C.setFocused(!1), C.setHasValue(!1), C.input = null); | |
K.$setTouched() | |
}) | |
}) | |
} | |
} | |
return { | |
restrict: "E", | |
require: ["^?mdInputContainer", "mdSelect", "ngModel", "?^form"], | |
compile: h, | |
controller: function() {} | |
} | |
} | |
function SelectMenuDirective(a, b, c, d) { | |
function f(a, c, e, f) { | |
function g(a) { | |
13 != a.keyCode && 32 != a.keyCode || h(a) | |
} | |
function h(c) { | |
var d = b.getClosest(c.target, "md-option"), | |
e = d && angular.element(d).data("$mdOptionController"); | |
if (d && e) { | |
if (d.hasAttribute("disabled")) return c.stopImmediatePropagation(), !1; | |
var f = m.hashGetter(e.value), | |
g = angular.isDefined(m.selected[f]); | |
a.$apply(function() { | |
m.isMultiple ? g ? m.deselect(f) : m.select(f, e.value) : g || (m.deselect(Object.keys(m.selected)[0]), m.select(f, e.value)); | |
m.refreshViewValue() | |
}) | |
} | |
} | |
var m = f[0]; | |
c.addClass("_md"); | |
d(c); | |
c.on("click", h); | |
c.on("keypress", g) | |
} | |
function e(d, e, f) { | |
function g() { | |
var a = k.ngModel.$modelValue || k.ngModel.$viewValue || []; | |
if (angular.isArray(a)) { | |
var b = Object.keys(k.selected), | |
c = a.map(k.hashGetter), | |
b = b.filter(function(a) { | |
return -1 === c.indexOf(a) | |
}); | |
b.forEach(k.deselect); | |
c.forEach(function(b, c) { | |
k.select(b, a[c]) | |
}) | |
} | |
} | |
function h() { | |
var a = k.ngModel.$viewValue || k.ngModel.$modelValue; | |
Object.keys(k.selected).forEach(k.deselect); | |
k.select(k.hashGetter(a), a) | |
} | |
var k = this; | |
k.isMultiple = | |
angular.isDefined(e.multiple); | |
k.selected = {}; | |
k.options = {}; | |
d.$watchCollection(function() { | |
return k.options | |
}, function() { | |
k.ngModel.$render() | |
}); | |
var m; | |
k.setMultiple = function(a) { | |
function b(a, b) { | |
return angular.isArray(a || b || []) | |
} | |
var c = k.ngModel; | |
k.isMultiple = a; | |
m && m(); | |
k.isMultiple ? (c.$validators["md-multiple"] = b, c.$render = g, d.$watchCollection(k.modelBinding, function(a) { | |
b(a) && g(a); | |
k.ngModel.$setPristine() | |
}), c.$isEmpty = function(a) { | |
return !a || 0 === a.length | |
}) : (delete c.$validators["md-multiple"], c.$render = h) | |
}; | |
var l = | |
"", | |
w, t, x; | |
k.optNodeForKeyboardSearch = function(a) { | |
w && clearTimeout(w); | |
w = setTimeout(function() { | |
w = void 0; | |
l = ""; | |
t = x = void 0 | |
}, 300); | |
a = a.keyCode - (c.isNumPadKey(a) ? 48 : 0); | |
l += String.fromCharCode(a); | |
a = new RegExp("^" + l, "i"); | |
t || (t = f.find("md-option"), x = Array(t.length), angular.forEach(t, function(a, b) { | |
x[b] = a.textContent.trim() | |
})); | |
for (var b = 0; b < x.length; ++b) | |
if (a.test(x[b])) return t[b] | |
}; | |
k.init = function(b, c) { | |
k.ngModel = b; | |
k.modelBinding = c; | |
k.ngModel.$isEmpty = function(a) { | |
return !k.options[k.hashGetter(a)] | |
}; | |
if (b.$options && b.$options.trackBy) { | |
var e = {}, | |
f = a(b.$options.trackBy); | |
k.hashGetter = function(a, b) { | |
e.$value = a; | |
return f(b || d, e) | |
} | |
} else k.hashGetter = function(a) { | |
return angular.isObject(a) ? "object_" + (a.$$mdSelectId || (a.$$mdSelectId = ++selectNextId)) : a | |
}; | |
k.setMultiple(k.isMultiple) | |
}; | |
k.selectedLabels = function(a) { | |
a = a || {}; | |
a = a.mode || "html"; | |
var c = b.nodesToArray(f[0].querySelectorAll("md-option[selected]")); | |
if (c.length) { | |
var d; | |
"html" == a ? d = function(a) { | |
if (a.hasAttribute("md-option-empty")) return ""; | |
var b = a.innerHTML, | |
c = a.querySelector(".md-ripple-container"); | |
c && (b = b.replace(c.outerHTML, "")); | |
(a = a.querySelector(".md-container")) && (b = b.replace(a.outerHTML, "")); | |
return b | |
} : "aria" == a && (d = function(a) { | |
return a.hasAttribute("aria-label") ? a.getAttribute("aria-label") : a.textContent | |
}); | |
return c.map(d).join(", ") | |
} | |
return "" | |
}; | |
k.select = function(a, b) { | |
var c = k.options[a]; | |
c && c.setSelected(!0); | |
k.selected[a] = b | |
}; | |
k.deselect = function(a) { | |
var b = k.options[a]; | |
b && b.setSelected(!1); | |
delete k.selected[a] | |
}; | |
k.addOption = function(a, b) { | |
if (angular.isDefined(k.options[a])) throw Error('Duplicate md-option values are not allowed in a select. Duplicate value "' + | |
b.value + '" found.'); | |
k.options[a] = b; | |
angular.isDefined(k.selected[a]) && (k.select(a, b.value), angular.isDefined(k.ngModel.$modelValue) && k.hashGetter(k.ngModel.$modelValue) === a && k.ngModel.$validate(), k.refreshViewValue()) | |
}; | |
k.removeOption = function(a) { | |
delete k.options[a] | |
}; | |
k.refreshViewValue = function() { | |
var a = [], | |
b, c; | |
for (c in k.selected)(b = k.options[c]) ? a.push(b.value) : a.push(k.selected[c]); | |
b = k.ngModel.$options && k.ngModel.$options.trackBy; | |
a = k.isMultiple ? a : a[0]; | |
c = k.ngModel.$modelValue; | |
(b ? angular.equals(c, a) : | |
c == a) || (k.ngModel.$setViewValue(a), k.ngModel.$render()) | |
} | |
} | |
e.$inject = ["$scope", "$attrs", "$element"]; | |
return { | |
restrict: "E", | |
require: ["mdSelectMenu"], | |
scope: !1, | |
controller: e, | |
link: { | |
pre: f | |
} | |
} | |
} | |
function OptionDirective(a, b) { | |
function c(a, b) { | |
a.append(angular.element('<div class="md-text">').append(a.contents())); | |
a.attr("tabindex", b.tabindex || "0"); | |
var c; | |
c = b.value; | |
b = b.ngValue; | |
(c = c || b) || a.attr("md-option-empty", ""); | |
return d | |
} | |
function d(c, d, f, l) { | |
function e(a, b, d) { | |
if (m.hashGetter) { | |
d = m.hashGetter(b, c); | |
var f = m.hashGetter(a, c); | |
h.hashKey = f; | |
h.value = a; | |
m.removeOption(d, h); | |
m.addOption(f, h) | |
} else d || c.$$postDigest(function() { | |
e(a, b, !0) | |
}) | |
} | |
function g() { | |
var a = { | |
role: "option", | |
"aria-selected": "false" | |
}; | |
d[0].hasAttribute("id") || | |
(a.id = "select_option_" + b.nextUid()); | |
d.attr(a) | |
} | |
var h = l[0], | |
m = l[1]; | |
m.isMultiple && (d.addClass("md-checkbox-enabled"), d.prepend(CHECKBOX_SELECTION_INDICATOR.clone())); | |
angular.isDefined(f.ngValue) ? c.$watch(f.ngValue, e) : angular.isDefined(f.value) ? e(f.value) : c.$watch(function() { | |
return d.text().trim() | |
}, e); | |
f.$observe("disabled", function(a) { | |
a ? d.attr("tabindex", "-1") : d.attr("tabindex", "0") | |
}); | |
c.$$postDigest(function() { | |
f.$observe("selected", function(a) { | |
angular.isDefined(a) && ("string" == typeof a && (a = !0), a ? (m.isMultiple || | |
m.deselect(Object.keys(m.selected)[0]), m.select(h.hashKey, h.value)) : m.deselect(h.hashKey), m.refreshViewValue()) | |
}) | |
}); | |
a.attach(c, d); | |
g(); | |
c.$on("$destroy", function() { | |
m.removeOption(h.hashKey, h) | |
}) | |
} | |
function f(a) { | |
this.selected = !1; | |
this.setSelected = function(b) { | |
b && !this.selected ? a.attr({ | |
selected: "selected", | |
"aria-selected": "true" | |
}) : !b && this.selected && (a.removeAttr("selected"), a.attr("aria-selected", "false")); | |
this.selected = b | |
} | |
} | |
f.$inject = ["$element"]; | |
return { | |
restrict: "E", | |
require: ["mdOption", "^^mdSelectMenu"], | |
controller: f, | |
compile: c | |
} | |
} | |
function OptgroupDirective() { | |
function a(a, c) { | |
if (!a.parent().find("md-select-header").length) { | |
var b = a.find("label"); | |
b.length || (b = angular.element("<label>"), a.prepend(b)); | |
b.addClass("md-container-ignore"); | |
c.label && b.text(c.label) | |
} | |
} | |
return { | |
restrict: "E", | |
compile: a | |
} | |
} | |
function SelectHeaderDirective() { | |
return { | |
restrict: "E" | |
} | |
} | |
function SelectProvider(a) { | |
function b(a, b, f, e, g, h, l, n, p) { | |
function c(a, b, c) { | |
function d() { | |
b.removeClass("md-active"); | |
b.attr("aria-hidden", "true"); | |
b[0].style.display = "none"; | |
var a = c.selectCtrl; | |
if (a) { | |
var d = c.selectEl.controller("mdSelectMenu"); | |
a.setLabelText(d ? d.selectedLabels() : ""); | |
a.triggerClose() | |
}!c.$destroy && c.restoreFocus && c.target.focus() | |
} | |
c = c || {}; | |
c.cleanupInteraction(); | |
c.cleanupResizing(); | |
c.hideBackdrop(); | |
return !0 === c.$destroy ? d() : l(b, { | |
addClass: "md-leave" | |
}).start().then(d) | |
} | |
function d(c, d, k) { | |
function m(a, | |
b, c) { | |
c.parent.append(b); | |
return g(function( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment