File: /home/cafsindia/hrms_cafsindia_com/dist_new/opensourcepos.min.js
/*! opensourcepos 04-08-2016 */
function _classCallCheck(a, b) {
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function")
}
if (function(a, b) {
"object" == typeof module && "object" == typeof module.exports ? module.exports = a.document ? b(a, !0) : function(a) {
if (!a.document) throw new Error("jQuery requires a window with a document");
return b(a)
} : b(a)
}("undefined" != typeof window ? window : this, function(a, b) {
function c(a) {
var b = !!a && "length" in a && a.length,
c = na.type(a);
return "function" === c || na.isWindow(a) ? !1 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a
}
function d(a, b, c) {
if (na.isFunction(b)) return na.grep(a, function(a, d) {
return !!b.call(a, d, a) !== c
});
if (b.nodeType) return na.grep(a, function(a) {
return a === b !== c
});
if ("string" == typeof b) {
if (xa.test(b)) return na.filter(b, a, c);
b = na.filter(b, a)
}
return na.grep(a, function(a) {
return na.inArray(a, b) > -1 !== c
})
}
function e(a, b) {
do a = a[b]; while (a && 1 !== a.nodeType);
return a
}
function f(a) {
var b = {};
return na.each(a.match(Da) || [], function(a, c) {
b[c] = !0
}), b
}
function g() {
da.addEventListener ? (da.removeEventListener("DOMContentLoaded", h), a.removeEventListener("load", h)) : (da.detachEvent("onreadystatechange", h), a.detachEvent("onload", h))
}
function h() {
(da.addEventListener || "load" === a.event.type || "complete" === da.readyState) && (g(), na.ready())
}
function i(a, b, c) {
if (void 0 === c && 1 === a.nodeType) {
var d = "data-" + b.replace(Ia, "-$1").toLowerCase();
if (c = a.getAttribute(d), "string" == typeof c) {
try {
c = "true" === c ? !0 : "false" === c ? !1 : "null" === c ? null : +c + "" === c ? +c : Ha.test(c) ? na.parseJSON(c) : c
} catch (e) {}
na.data(a, b, c)
} else c = void 0
}
return c
}
function j(a) {
var b;
for (b in a)
if (("data" !== b || !na.isEmptyObject(a[b])) && "toJSON" !== b) return !1;
return !0
}
function k(a, b, c, d) {
if (Ga(a)) {
var e, f, g = na.expando,
h = a.nodeType,
i = h ? na.cache : a,
j = h ? a[g] : a[g] && g;
if (j && i[j] && (d || i[j].data) || void 0 !== c || "string" != typeof b) return j || (j = h ? a[g] = ca.pop() || na.guid++ : g), i[j] || (i[j] = h ? {} : {
toJSON: na.noop
}), ("object" == typeof b || "function" == typeof b) && (d ? i[j] = na.extend(i[j], b) : i[j].data = na.extend(i[j].data, b)), f = i[j], d || (f.data || (f.data = {}), f = f.data), void 0 !== c && (f[na.camelCase(b)] = c), "string" == typeof b ? (e = f[b], null == e && (e = f[na.camelCase(b)])) : e = f, e
}
}
function l(a, b, c) {
if (Ga(a)) {
var d, e, f = a.nodeType,
g = f ? na.cache : a,
h = f ? a[na.expando] : na.expando;
if (g[h]) {
if (b && (d = c ? g[h] : g[h].data)) {
na.isArray(b) ? b = b.concat(na.map(b, na.camelCase)) : b in d ? b = [b] : (b = na.camelCase(b), b = b in d ? [b] : b.split(" ")), e = b.length;
for (; e--;) delete d[b[e]];
if (c ? !j(d) : !na.isEmptyObject(d)) return
}(c || (delete g[h].data, j(g[h]))) && (f ? na.cleanData([a], !0) : la.deleteExpando || g != g.window ? delete g[h] : g[h] = void 0)
}
}
}
function m(a, b, c, d) {
var e, f = 1,
g = 20,
h = d ? function() {
return d.cur()
} : function() {
return na.css(a, b, "")
},
i = h(),
j = c && c[3] || (na.cssNumber[b] ? "" : "px"),
k = (na.cssNumber[b] || "px" !== j && +i) && Ka.exec(na.css(a, b));
if (k && k[3] !== j) {
j = j || k[3], c = c || [], k = +i || 1;
do f = f || ".5", k /= f, na.style(a, b, k + j); while (f !== (f = h() / i) && 1 !== f && --g)
}
return c && (k = +k || +i || 0, e = c[1] ? k + (c[1] + 1) * c[2] : +c[2], d && (d.unit = j, d.start = k, d.end = e)), e
}
function n(a) {
var b = Sa.split("|"),
c = a.createDocumentFragment();
if (c.createElement)
for (; b.length;) c.createElement(b.pop());
return c
}
function o(a, b) {
var c, d, e = 0,
f = "undefined" != typeof a.getElementsByTagName ? a.getElementsByTagName(b || "*") : "undefined" != typeof a.querySelectorAll ? a.querySelectorAll(b || "*") : void 0;
if (!f)
for (f = [], c = a.childNodes || a; null != (d = c[e]); e++) !b || na.nodeName(d, b) ? f.push(d) : na.merge(f, o(d, b));
return void 0 === b || b && na.nodeName(a, b) ? na.merge([a], f) : f
}
function p(a, b) {
for (var c, d = 0; null != (c = a[d]); d++) na._data(c, "globalEval", !b || na._data(b[d], "globalEval"))
}
function q(a) {
Oa.test(a.type) && (a.defaultChecked = a.checked)
}
function r(a, b, c, d, e) {
for (var f, g, h, i, j, k, l, m = a.length, r = n(b), s = [], t = 0; m > t; t++)
if (g = a[t], g || 0 === g)
if ("object" === na.type(g)) na.merge(s, g.nodeType ? [g] : g);
else if (Ua.test(g)) {
for (i = i || r.appendChild(b.createElement("div")), j = (Pa.exec(g) || ["", ""])[1].toLowerCase(), l = Ta[j] || Ta._default, i.innerHTML = l[1] + na.htmlPrefilter(g) + l[2], f = l[0]; f--;) i = i.lastChild;
if (!la.leadingWhitespace && Ra.test(g) && s.push(b.createTextNode(Ra.exec(g)[0])), !la.tbody)
for (g = "table" !== j || Va.test(g) ? "<table>" !== l[1] || Va.test(g) ? 0 : i : i.firstChild, f = g && g.childNodes.length; f--;) na.nodeName(k = g.childNodes[f], "tbody") && !k.childNodes.length && g.removeChild(k);
for (na.merge(s, i.childNodes), i.textContent = ""; i.firstChild;) i.removeChild(i.firstChild);
i = r.lastChild
} else s.push(b.createTextNode(g));
for (i && r.removeChild(i), la.appendChecked || na.grep(o(s, "input"), q), t = 0; g = s[t++];)
if (d && na.inArray(g, d) > -1) e && e.push(g);
else if (h = na.contains(g.ownerDocument, g), i = o(r.appendChild(g), "script"), h && p(i), c)
for (f = 0; g = i[f++];) Qa.test(g.type || "") && c.push(g);
return i = null, r
}
function s() {
return !0
}
function t() {
return !1
}
function u() {
try {
return da.activeElement
} catch (a) {}
}
function v(a, b, c, d, e, f) {
var g, h;
if ("object" == typeof b) {
"string" != typeof c && (d = d || c, c = void 0);
for (h in b) v(a, h, c, d, b[h], f);
return a
}
if (null == d && null == e ? (e = c, d = c = void 0) : null == e && ("string" == typeof c ? (e = d, d = void 0) : (e = d, d = c, c = void 0)), e === !1) e = t;
else if (!e) return a;
return 1 === f && (g = e, e = function(a) {
return na().off(a), g.apply(this, arguments)
}, e.guid = g.guid || (g.guid = na.guid++)), a.each(function() {
na.event.add(this, b, e, d, c)
})
}
function w(a, b) {
return na.nodeName(a, "table") && na.nodeName(11 !== b.nodeType ? b : b.firstChild, "tr") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a
}
function x(a) {
return a.type = (null !== na.find.attr(a, "type")) + "/" + a.type, a
}
function y(a) {
var b = eb.exec(a.type);
return b ? a.type = b[1] : a.removeAttribute("type"), a
}
function z(a, b) {
if (1 === b.nodeType && na.hasData(a)) {
var c, d, e, f = na._data(a),
g = na._data(b, f),
h = f.events;
if (h) {
delete g.handle, g.events = {};
for (c in h)
for (d = 0, e = h[c].length; e > d; d++) na.event.add(b, c, h[c][d])
}
g.data && (g.data = na.extend({}, g.data))
}
}
function A(a, b) {
var c, d, e;
if (1 === b.nodeType) {
if (c = b.nodeName.toLowerCase(), !la.noCloneEvent && b[na.expando]) {
e = na._data(b);
for (d in e.events) na.removeEvent(b, d, e.handle);
b.removeAttribute(na.expando)
}
"script" === c && b.text !== a.text ? (x(b).text = a.text, y(b)) : "object" === c ? (b.parentNode && (b.outerHTML = a.outerHTML), la.html5Clone && a.innerHTML && !na.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : "input" === c && Oa.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : "option" === c ? b.defaultSelected = b.selected = a.defaultSelected : ("input" === c || "textarea" === c) && (b.defaultValue = a.defaultValue)
}
}
function B(a, b, c, d) {
b = fa.apply([], b);
var e, f, g, h, i, j, k = 0,
l = a.length,
m = l - 1,
n = b[0],
p = na.isFunction(n);
if (p || l > 1 && "string" == typeof n && !la.checkClone && db.test(n)) return a.each(function(e) {
var f = a.eq(e);
p && (b[0] = n.call(this, e, f.html())), B(f, b, c, d)
});
if (l && (j = r(b, a[0].ownerDocument, !1, a, d), e = j.firstChild, 1 === j.childNodes.length && (j = e), e || d)) {
for (h = na.map(o(j, "script"), x), g = h.length; l > k; k++) f = j, k !== m && (f = na.clone(f, !0, !0), g && na.merge(h, o(f, "script"))), c.call(a[k], f, k);
if (g)
for (i = h[h.length - 1].ownerDocument, na.map(h, y), k = 0; g > k; k++) f = h[k], Qa.test(f.type || "") && !na._data(f, "globalEval") && na.contains(i, f) && (f.src ? na._evalUrl && na._evalUrl(f.src) : na.globalEval((f.text || f.textContent || f.innerHTML || "").replace(fb, "")));
j = e = null
}
return a
}
function C(a, b, c) {
for (var d, e = b ? na.filter(b, a) : a, f = 0; null != (d = e[f]); f++) c || 1 !== d.nodeType || na.cleanData(o(d)), d.parentNode && (c && na.contains(d.ownerDocument, d) && p(o(d, "script")), d.parentNode.removeChild(d));
return a
}
function D(a, b) {
var c = na(b.createElement(a)).appendTo(b.body),
d = na.css(c[0], "display");
return c.detach(), d
}
function E(a) {
var b = da,
c = jb[a];
return c || (c = D(a, b), "none" !== c && c || (ib = (ib || na("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement), b = (ib[0].contentWindow || ib[0].contentDocument).document, b.write(), b.close(), c = D(a, b), ib.detach()), jb[a] = c), c
}
function F(a, b) {
return {
get: function() {
return a() ? void delete this.get : (this.get = b).apply(this, arguments)
}
}
}
function G(a) {
if (a in yb) return a;
for (var b = a.charAt(0).toUpperCase() + a.slice(1), c = xb.length; c--;)
if (a = xb[c] + b, a in yb) return a
}
function H(a, b) {
for (var c, d, e, f = [], g = 0, h = a.length; h > g; g++) d = a[g], d.style && (f[g] = na._data(d, "olddisplay"), c = d.style.display, b ? (f[g] || "none" !== c || (d.style.display = ""), "" === d.style.display && Ma(d) && (f[g] = na._data(d, "olddisplay", E(d.nodeName)))) : (e = Ma(d), (c && "none" !== c || !e) && na._data(d, "olddisplay", e ? c : na.css(d, "display"))));
for (g = 0; h > g; g++) d = a[g], d.style && (b && "none" !== d.style.display && "" !== d.style.display || (d.style.display = b ? f[g] || "" : "none"));
return a
}
function I(a, b, c) {
var d = ub.exec(b);
return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b
}
function J(a, b, c, d, e) {
for (var f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, g = 0; 4 > f; f += 2) "margin" === c && (g += na.css(a, c + La[f], !0, e)), d ? ("content" === c && (g -= na.css(a, "padding" + La[f], !0, e)), "margin" !== c && (g -= na.css(a, "border" + La[f] + "Width", !0, e))) : (g += na.css(a, "padding" + La[f], !0, e), "padding" !== c && (g += na.css(a, "border" + La[f] + "Width", !0, e)));
return g
}
function K(a, b, c) {
var d = !0,
e = "width" === b ? a.offsetWidth : a.offsetHeight,
f = ob(a),
g = la.boxSizing && "border-box" === na.css(a, "boxSizing", !1, f);
if (0 >= e || null == e) {
if (e = pb(a, b, f), (0 > e || null == e) && (e = a.style[b]), lb.test(e)) return e;
d = g && (la.boxSizingReliable() || e === a.style[b]), e = parseFloat(e) || 0
}
return e + J(a, b, c || (g ? "border" : "content"), d, f) + "px"
}
function L(a, b, c, d, e) {
return new L.prototype.init(a, b, c, d, e)
}
function M() {
return a.setTimeout(function() {
zb = void 0
}), zb = na.now()
}
function N(a, b) {
var c, d = {
height: a
},
e = 0;
for (b = b ? 1 : 0; 4 > e; e += 2 - b) c = La[e], d["margin" + c] = d["padding" + c] = a;
return b && (d.opacity = d.width = a), d
}
function O(a, b, c) {
for (var d, e = (R.tweeners[b] || []).concat(R.tweeners["*"]), f = 0, g = e.length; g > f; f++)
if (d = e[f].call(c, b, a)) return d
}
function P(a, b, c) {
var d, e, f, g, h, i, j, k, l = this,
m = {},
n = a.style,
o = a.nodeType && Ma(a),
p = na._data(a, "fxshow");
c.queue || (h = na._queueHooks(a, "fx"), null == h.unqueued && (h.unqueued = 0, i = h.empty.fire, h.empty.fire = function() {
h.unqueued || i()
}), h.unqueued++, l.always(function() {
l.always(function() {
h.unqueued--, na.queue(a, "fx").length || h.empty.fire()
})
})), 1 === a.nodeType && ("height" in b || "width" in b) && (c.overflow = [n.overflow, n.overflowX, n.overflowY], j = na.css(a, "display"), k = "none" === j ? na._data(a, "olddisplay") || E(a.nodeName) : j, "inline" === k && "none" === na.css(a, "float") && (la.inlineBlockNeedsLayout && "inline" !== E(a.nodeName) ? n.zoom = 1 : n.display = "inline-block")), c.overflow && (n.overflow = "hidden", la.shrinkWrapBlocks() || l.always(function() {
n.overflow = c.overflow[0], n.overflowX = c.overflow[1], n.overflowY = c.overflow[2]
}));
for (d in b)
if (e = b[d], Bb.exec(e)) {
if (delete b[d], f = f || "toggle" === e, e === (o ? "hide" : "show")) {
if ("show" !== e || !p || void 0 === p[d]) continue;
o = !0
}
m[d] = p && p[d] || na.style(a, d)
} else j = void 0;
if (na.isEmptyObject(m)) "inline" === ("none" === j ? E(a.nodeName) : j) && (n.display = j);
else {
p ? "hidden" in p && (o = p.hidden) : p = na._data(a, "fxshow", {}), f && (p.hidden = !o), o ? na(a).show() : l.done(function() {
na(a).hide()
}), l.done(function() {
var b;
na._removeData(a, "fxshow");
for (b in m) na.style(a, b, m[b])
});
for (d in m) g = O(o ? p[d] : 0, d, l), d in p || (p[d] = g.start, o && (g.end = g.start, g.start = "width" === d || "height" === d ? 1 : 0))
}
}
function Q(a, b) {
var c, d, e, f, g;
for (c in a)
if (d = na.camelCase(c), e = b[d], f = a[c], na.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = na.cssHooks[d], g && "expand" in g) {
f = g.expand(f), delete a[d];
for (c in f) c in a || (a[c] = f[c], b[c] = e)
} else b[d] = e
}
function R(a, b, c) {
var d, e, f = 0,
g = R.prefilters.length,
h = na.Deferred().always(function() {
delete i.elem
}),
i = function() {
if (e) return !1;
for (var b = zb || M(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length; i > g; g++) j.tweens[g].run(f);
return h.notifyWith(a, [j, f, c]), 1 > f && i ? c : (h.resolveWith(a, [j]), !1)
},
j = h.promise({
elem: a,
props: na.extend({}, b),
opts: na.extend(!0, {
specialEasing: {},
easing: na.easing._default
}, c),
originalProperties: b,
originalOptions: c,
startTime: zb || M(),
duration: c.duration,
tweens: [],
createTween: function(b, c) {
var d = na.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);
return j.tweens.push(d), d
},
stop: function(b) {
var c = 0,
d = b ? j.tweens.length : 0;
if (e) return this;
for (e = !0; d > c; c++) j.tweens[c].run(1);
return b ? (h.notifyWith(a, [j, 1, 0]), h.resolveWith(a, [j, b])) : h.rejectWith(a, [j, b]), this
}
}),
k = j.props;
for (Q(k, j.opts.specialEasing); g > f; f++)
if (d = R.prefilters[f].call(j, a, k, j.opts)) return na.isFunction(d.stop) && (na._queueHooks(j.elem, j.opts.queue).stop = na.proxy(d.stop, d)), d;
return na.map(k, O, j), na.isFunction(j.opts.start) && j.opts.start.call(a, j), na.fx.timer(na.extend(i, {
elem: a,
anim: j,
queue: j.opts.queue
})), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always)
}
function S(a) {
return na.attr(a, "class") || ""
}
function T(a) {
return function(b, c) {
"string" != typeof b && (c = b, b = "*");
var d, e = 0,
f = b.toLowerCase().match(Da) || [];
if (na.isFunction(c))
for (; d = f[e++];) "+" === d.charAt(0) ? (d = d.slice(1) || "*", (a[d] = a[d] || []).unshift(c)) : (a[d] = a[d] || []).push(c)
}
}
function U(a, b, c, d) {
function e(h) {
var i;
return f[h] = !0, na.each(a[h] || [], function(a, h) {
var j = h(b, c, d);
return "string" != typeof j || g || f[j] ? g ? !(i = j) : void 0 : (b.dataTypes.unshift(j), e(j), !1)
}), i
}
var f = {},
g = a === $b;
return e(b.dataTypes[0]) || !f["*"] && e("*")
}
function V(a, b) {
var c, d, e = na.ajaxSettings.flatOptions || {};
for (d in b) void 0 !== b[d] && ((e[d] ? a : c || (c = {}))[d] = b[d]);
return c && na.extend(!0, a, c), a
}
function W(a, b, c) {
for (var d, e, f, g, h = a.contents, i = a.dataTypes;
"*" === i[0];) i.shift(), void 0 === e && (e = a.mimeType || b.getResponseHeader("Content-Type"));
if (e)
for (g in h)
if (h[g] && h[g].test(e)) {
i.unshift(g);
break
}
if (i[0] in c) f = i[0];
else {
for (g in c) {
if (!i[0] || a.converters[g + " " + i[0]]) {
f = g;
break
}
d || (d = g)
}
f = f || d
}
return f ? (f !== i[0] && i.unshift(f), c[f]) : void 0
}
function X(a, b, c, d) {
var e, f, g, h, i, j = {},
k = a.dataTypes.slice();
if (k[1])
for (g in a.converters) j[g.toLowerCase()] = a.converters[g];
for (f = k.shift(); f;)
if (a.responseFields[f] && (c[a.responseFields[f]] = b), !i && d && a.dataFilter && (b = a.dataFilter(b, a.dataType)), i = f, f = k.shift())
if ("*" === f) f = i;
else if ("*" !== i && i !== f) {
if (g = j[i + " " + f] || j["* " + f], !g)
for (e in j)
if (h = e.split(" "), h[1] === f && (g = j[i + " " + h[0]] || j["* " + h[0]])) {
g === !0 ? g = j[e] : j[e] !== !0 && (f = h[0], k.unshift(h[1]));
break
}
if (g !== !0)
if (g && a["throws"]) b = g(b);
else try {
b = g(b)
} catch (l) {
return {
state: "parsererror",
error: g ? l : "No conversion from " + i + " to " + f
}
}
}
return {
state: "success",
data: b
}
}
function Y(a) {
return a.style && a.style.display || na.css(a, "display")
}
function Z(a) {
if (!na.contains(a.ownerDocument || da, a)) return !0;
for (; a && 1 === a.nodeType;) {
if ("none" === Y(a) || "hidden" === a.type) return !0;
a = a.parentNode
}
return !1
}
function $(a, b, c, d) {
var e;
if (na.isArray(b)) na.each(b, function(b, e) {
c || dc.test(a) ? d(a, e) : $(a + "[" + ("object" == typeof e && null != e ? b : "") + "]", e, c, d)
});
else if (c || "object" !== na.type(b)) d(a, b);
else
for (e in b) $(a + "[" + e + "]", b[e], c, d)
}
function _() {
try {
return new a.XMLHttpRequest
} catch (b) {}
}
function aa() {
try {
return new a.ActiveXObject("Microsoft.XMLHTTP")
} catch (b) {}
}
function ba(a) {
return na.isWindow(a) ? a : 9 === a.nodeType ? a.defaultView || a.parentWindow : !1
}
var ca = [],
da = a.document,
ea = ca.slice,
fa = ca.concat,
ga = ca.push,
ha = ca.indexOf,
ia = {},
ja = ia.toString,
ka = ia.hasOwnProperty,
la = {},
ma = "1.12.4",
na = function(a, b) {
return new na.fn.init(a, b)
},
oa = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
pa = /^-ms-/,
qa = /-([\da-z])/gi,
ra = function(a, b) {
return b.toUpperCase()
};
na.fn = na.prototype = {
jquery: ma,
constructor: na,
selector: "",
length: 0,
toArray: function() {
return ea.call(this)
},
get: function(a) {
return null != a ? 0 > a ? this[a + this.length] : this[a] : ea.call(this)
},
pushStack: function(a) {
var b = na.merge(this.constructor(), a);
return b.prevObject = this, b.context = this.context, b
},
each: function(a) {
return na.each(this, a)
},
map: function(a) {
return this.pushStack(na.map(this, function(b, c) {
return a.call(b, c, b)
}))
},
slice: function() {
return this.pushStack(ea.apply(this, arguments))
},
first: function() {
return this.eq(0)
},
last: function() {
return this.eq(-1)
},
eq: function(a) {
var b = this.length,
c = +a + (0 > a ? b : 0);
return this.pushStack(c >= 0 && b > c ? [this[c]] : [])
},
end: function() {
return this.prevObject || this.constructor()
},
push: ga,
sort: ca.sort,
splice: ca.splice
}, na.extend = na.fn.extend = function() {
var a, b, c, d, e, f, g = arguments[0] || {},
h = 1,
i = arguments.length,
j = !1;
for ("boolean" == typeof g && (j = g, g = arguments[h] || {}, h++), "object" == typeof g || na.isFunction(g) || (g = {}), h === i && (g = this, h--); i > h; h++)
if (null != (e = arguments[h]))
for (d in e) a = g[d], c = e[d], g !== c && (j && c && (na.isPlainObject(c) || (b = na.isArray(c))) ? (b ? (b = !1, f = a && na.isArray(a) ? a : []) : f = a && na.isPlainObject(a) ? a : {}, g[d] = na.extend(j, f, c)) : void 0 !== c && (g[d] = c));
return g
}, na.extend({
expando: "jQuery" + (ma + Math.random()).replace(/\D/g, ""),
isReady: !0,
error: function(a) {
throw new Error(a)
},
noop: function() {},
isFunction: function(a) {
return "function" === na.type(a)
},
isArray: Array.isArray || function(a) {
return "array" === na.type(a)
},
isWindow: function(a) {
return null != a && a == a.window
},
isNumeric: function(a) {
var b = a && a.toString();
return !na.isArray(a) && b - parseFloat(b) + 1 >= 0
},
isEmptyObject: function(a) {
var b;
for (b in a) return !1;
return !0
},
isPlainObject: function(a) {
var b;
if (!a || "object" !== na.type(a) || a.nodeType || na.isWindow(a)) return !1;
try {
if (a.constructor && !ka.call(a, "constructor") && !ka.call(a.constructor.prototype, "isPrototypeOf")) return !1
} catch (c) {
return !1
}
if (!la.ownFirst)
for (b in a) return ka.call(a, b);
for (b in a);
return void 0 === b || ka.call(a, b)
},
type: function(a) {
return null == a ? a + "" : "object" == typeof a || "function" == typeof a ? ia[ja.call(a)] || "object" : typeof a
},
globalEval: function(b) {
b && na.trim(b) && (a.execScript || function(b) {
a.eval.call(a, b)
})(b)
},
camelCase: function(a) {
return a.replace(pa, "ms-").replace(qa, ra)
},
nodeName: function(a, b) {
return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase()
},
each: function(a, b) {
var d, e = 0;
if (c(a))
for (d = a.length; d > e && b.call(a[e], e, a[e]) !== !1; e++);
else
for (e in a)
if (b.call(a[e], e, a[e]) === !1) break;
return a
},
trim: function(a) {
return null == a ? "" : (a + "").replace(oa, "")
},
makeArray: function(a, b) {
var d = b || [];
return null != a && (c(Object(a)) ? na.merge(d, "string" == typeof a ? [a] : a) : ga.call(d, a)), d
},
inArray: function(a, b, c) {
var d;
if (b) {
if (ha) return ha.call(b, a, c);
for (d = b.length, c = c ? 0 > c ? Math.max(0, d + c) : c : 0; d > c; c++)
if (c in b && b[c] === a) return c
}
return -1
},
merge: function(a, b) {
for (var c = +b.length, d = 0, e = a.length; c > d;) a[e++] = b[d++];
if (c !== c)
for (; void 0 !== b[d];) a[e++] = b[d++];
return a.length = e, a
},
grep: function(a, b, c) {
for (var d, e = [], f = 0, g = a.length, h = !c; g > f; f++) d = !b(a[f], f), d !== h && e.push(a[f]);
return e
},
map: function(a, b, d) {
var e, f, g = 0,
h = [];
if (c(a))
for (e = a.length; e > g; g++) f = b(a[g], g, d), null != f && h.push(f);
else
for (g in a) f = b(a[g], g, d), null != f && h.push(f);
return fa.apply([], h)
},
guid: 1,
proxy: function(a, b) {
var c, d, e;
return "string" == typeof b && (e = a[b], b = a, a = e), na.isFunction(a) ? (c = ea.call(arguments, 2), d = function() {
return a.apply(b || this, c.concat(ea.call(arguments)))
}, d.guid = a.guid = a.guid || na.guid++, d) : void 0
},
now: function() {
return +new Date
},
support: la
}), "function" == typeof Symbol && (na.fn[Symbol.iterator] = ca[Symbol.iterator]), na.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(a, b) {
ia["[object " + b + "]"] = b.toLowerCase()
});
var sa = function(a) {
function b(a, b, c, d) {
var e, f, g, h, i, j, l, n, o = b && b.ownerDocument,
p = b ? b.nodeType : 9;
if (c = c || [], "string" != typeof a || !a || 1 !== p && 9 !== p && 11 !== p) return c;
if (!d && ((b ? b.ownerDocument || b : O) !== G && F(b), b = b || G, I)) {
if (11 !== p && (j = ra.exec(a)))
if (e = j[1]) {
if (9 === p) {
if (!(g = b.getElementById(e))) return c;
if (g.id === e) return c.push(g), c
} else if (o && (g = o.getElementById(e)) && M(b, g) && g.id === e) return c.push(g), c
} else {
if (j[2]) return $.apply(c, b.getElementsByTagName(a)), c;
if ((e = j[3]) && v.getElementsByClassName && b.getElementsByClassName) return $.apply(c, b.getElementsByClassName(e)), c
}
if (!(!v.qsa || T[a + " "] || J && J.test(a))) {
if (1 !== p) o = b, n = a;
else if ("object" !== b.nodeName.toLowerCase()) {
for ((h = b.getAttribute("id")) ? h = h.replace(ta, "\\$&") : b.setAttribute("id", h = N), l = z(a), f = l.length, i = ma.test(h) ? "#" + h : "[id='" + h + "']"; f--;) l[f] = i + " " + m(l[f]);
n = l.join(","), o = sa.test(a) && k(b.parentNode) || b
}
if (n) try {
return $.apply(c, o.querySelectorAll(n)), c
} catch (q) {} finally {
h === N && b.removeAttribute("id")
}
}
}
return B(a.replace(ha, "$1"), b, c, d)
}
function c() {
function a(c, d) {
return b.push(c + " ") > w.cacheLength && delete a[b.shift()], a[c + " "] = d
}
var b = [];
return a
}
function d(a) {
return a[N] = !0, a
}
function e(a) {
var b = G.createElement("div");
try {
return !!a(b)
} catch (c) {
return !1
} finally {
b.parentNode && b.parentNode.removeChild(b), b = null
}
}
function f(a, b) {
for (var c = a.split("|"), d = c.length; d--;) w.attrHandle[c[d]] = b
}
function g(a, b) {
var c = b && a,
d = c && 1 === a.nodeType && 1 === b.nodeType && (~b.sourceIndex || V) - (~a.sourceIndex || V);
if (d) return d;
if (c)
for (; c = c.nextSibling;)
if (c === b) return -1;
return a ? 1 : -1
}
function h(a) {
return function(b) {
var c = b.nodeName.toLowerCase();
return "input" === c && b.type === a
}
}
function i(a) {
return function(b) {
var c = b.nodeName.toLowerCase();
return ("input" === c || "button" === c) && b.type === a
}
}
function j(a) {
return d(function(b) {
return b = +b, d(function(c, d) {
for (var e, f = a([], c.length, b), g = f.length; g--;) c[e = f[g]] && (c[e] = !(d[e] = c[e]))
})
})
}
function k(a) {
return a && "undefined" != typeof a.getElementsByTagName && a
}
function l() {}
function m(a) {
for (var b = 0, c = a.length, d = ""; c > b; b++) d += a[b].value;
return d
}
function n(a, b, c) {
var d = b.dir,
e = c && "parentNode" === d,
f = Q++;
return b.first ? function(b, c, f) {
for (; b = b[d];)
if (1 === b.nodeType || e) return a(b, c, f)
} : function(b, c, g) {
var h, i, j, k = [P, f];
if (g) {
for (; b = b[d];)
if ((1 === b.nodeType || e) && a(b, c, g)) return !0
} else
for (; b = b[d];)
if (1 === b.nodeType || e) {
if (j = b[N] || (b[N] = {}), i = j[b.uniqueID] || (j[b.uniqueID] = {}), (h = i[d]) && h[0] === P && h[1] === f) return k[2] = h[2];
if (i[d] = k, k[2] = a(b, c, g)) return !0
}
}
}
function o(a) {
return a.length > 1 ? function(b, c, d) {
for (var e = a.length; e--;)
if (!a[e](b, c, d)) return !1;
return !0
} : a[0]
}
function p(a, c, d) {
for (var e = 0, f = c.length; f > e; e++) b(a, c[e], d);
return d
}
function q(a, b, c, d, e) {
for (var f, g = [], h = 0, i = a.length, j = null != b; i > h; h++)(f = a[h]) && (!c || c(f, d, e)) && (g.push(f), j && b.push(h));
return g
}
function r(a, b, c, e, f, g) {
return e && !e[N] && (e = r(e)), f && !f[N] && (f = r(f, g)), d(function(d, g, h, i) {
var j, k, l, m = [],
n = [],
o = g.length,
r = d || p(b || "*", h.nodeType ? [h] : h, []),
s = !a || !d && b ? r : q(r, m, a, h, i),
t = c ? f || (d ? a : o || e) ? [] : g : s;
if (c && c(s, t, h, i), e)
for (j = q(t, n), e(j, [], h, i), k = j.length; k--;)(l = j[k]) && (t[n[k]] = !(s[n[k]] = l));
if (d) {
if (f || a) {
if (f) {
for (j = [], k = t.length; k--;)(l = t[k]) && j.push(s[k] = l);
f(null, t = [], j, i)
}
for (k = t.length; k--;)(l = t[k]) && (j = f ? aa(d, l) : m[k]) > -1 && (d[j] = !(g[j] = l))
}
} else t = q(t === g ? t.splice(o, t.length) : t), f ? f(null, g, t, i) : $.apply(g, t)
})
}
function s(a) {
for (var b, c, d, e = a.length, f = w.relative[a[0].type], g = f || w.relative[" "], h = f ? 1 : 0, i = n(function(a) {
return a === b
}, g, !0), j = n(function(a) {
return aa(b, a) > -1
}, g, !0), k = [function(a, c, d) {
var e = !f && (d || c !== C) || ((b = c).nodeType ? i(a, c, d) : j(a, c, d));
return b = null, e
}]; e > h; h++)
if (c = w.relative[a[h].type]) k = [n(o(k), c)];
else {
if (c = w.filter[a[h].type].apply(null, a[h].matches), c[N]) {
for (d = ++h; e > d && !w.relative[a[d].type]; d++);
return r(h > 1 && o(k), h > 1 && m(a.slice(0, h - 1).concat({
value: " " === a[h - 2].type ? "*" : ""
})).replace(ha, "$1"), c, d > h && s(a.slice(h, d)), e > d && s(a = a.slice(d)), e > d && m(a))
}
k.push(c)
}
return o(k)
}
function t(a, c) {
var e = c.length > 0,
f = a.length > 0,
g = function(d, g, h, i, j) {
var k, l, m, n = 0,
o = "0",
p = d && [],
r = [],
s = C,
t = d || f && w.find.TAG("*", j),
u = P += null == s ? 1 : Math.random() || .1,
v = t.length;
for (j && (C = g === G || g || j); o !== v && null != (k = t[o]); o++) {
if (f && k) {
for (l = 0, g || k.ownerDocument === G || (F(k), h = !I); m = a[l++];)
if (m(k, g || G, h)) {
i.push(k);
break
}
j && (P = u)
}
e && ((k = !m && k) && n--, d && p.push(k))
}
if (n += o, e && o !== n) {
for (l = 0; m = c[l++];) m(p, r, g, h);
if (d) {
if (n > 0)
for (; o--;) p[o] || r[o] || (r[o] = Y.call(i));
r = q(r)
}
$.apply(i, r), j && !d && r.length > 0 && n + c.length > 1 && b.uniqueSort(i)
}
return j && (P = u, C = s), p
};
return e ? d(g) : g
}
var u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N = "sizzle" + 1 * new Date,
O = a.document,
P = 0,
Q = 0,
R = c(),
S = c(),
T = c(),
U = function(a, b) {
return a === b && (E = !0), 0
},
V = 1 << 31,
W = {}.hasOwnProperty,
X = [],
Y = X.pop,
Z = X.push,
$ = X.push,
_ = X.slice,
aa = function(a, b) {
for (var c = 0, d = a.length; d > c; c++)
if (a[c] === b) return c;
return -1
},
ba = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
ca = "[\\x20\\t\\r\\n\\f]",
da = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
ea = "\\[" + ca + "*(" + da + ")(?:" + ca + "*([*^$|!~]?=)" + ca + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + da + "))|)" + ca + "*\\]",
fa = ":(" + da + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + ea + ")*)|.*)\\)|)",
ga = new RegExp(ca + "+", "g"),
ha = new RegExp("^" + ca + "+|((?:^|[^\\\\])(?:\\\\.)*)" + ca + "+$", "g"),
ia = new RegExp("^" + ca + "*," + ca + "*"),
ja = new RegExp("^" + ca + "*([>+~]|" + ca + ")" + ca + "*"),
ka = new RegExp("=" + ca + "*([^\\]'\"]*?)" + ca + "*\\]", "g"),
la = new RegExp(fa),
ma = new RegExp("^" + da + "$"),
na = {
ID: new RegExp("^#(" + da + ")"),
CLASS: new RegExp("^\\.(" + da + ")"),
TAG: new RegExp("^(" + da + "|[*])"),
ATTR: new RegExp("^" + ea),
PSEUDO: new RegExp("^" + fa),
CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + ca + "*(even|odd|(([+-]|)(\\d*)n|)" + ca + "*(?:([+-]|)" + ca + "*(\\d+)|))" + ca + "*\\)|)", "i"),
bool: new RegExp("^(?:" + ba + ")$", "i"),
needsContext: new RegExp("^" + ca + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + ca + "*((?:-\\d)?\\d*)" + ca + "*\\)|)(?=[^-]|$)", "i")
},
oa = /^(?:input|select|textarea|button)$/i,
pa = /^h\d$/i,
qa = /^[^{]+\{\s*\[native \w/,
ra = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
sa = /[+~]/,
ta = /'|\\/g,
ua = new RegExp("\\\\([\\da-f]{1,6}" + ca + "?|(" + ca + ")|.)", "ig"),
va = function(a, b, c) {
var d = "0x" + b - 65536;
return d !== d || c ? b : 0 > d ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320)
},
wa = function() {
F()
};
try {
$.apply(X = _.call(O.childNodes), O.childNodes), X[O.childNodes.length].nodeType
} catch (xa) {
$ = {
apply: X.length ? function(a, b) {
Z.apply(a, _.call(b))
} : function(a, b) {
for (var c = a.length, d = 0; a[c++] = b[d++];);
a.length = c - 1
}
}
}
v = b.support = {}, y = b.isXML = function(a) {
var b = a && (a.ownerDocument || a).documentElement;
return b ? "HTML" !== b.nodeName : !1
}, F = b.setDocument = function(a) {
var b, c, d = a ? a.ownerDocument || a : O;
return d !== G && 9 === d.nodeType && d.documentElement ? (G = d, H = G.documentElement, I = !y(G), (c = G.defaultView) && c.top !== c && (c.addEventListener ? c.addEventListener("unload", wa, !1) : c.attachEvent && c.attachEvent("onunload", wa)), v.attributes = e(function(a) {
return a.className = "i", !a.getAttribute("className")
}), v.getElementsByTagName = e(function(a) {
return a.appendChild(G.createComment("")), !a.getElementsByTagName("*").length
}), v.getElementsByClassName = qa.test(G.getElementsByClassName), v.getById = e(function(a) {
return H.appendChild(a).id = N, !G.getElementsByName || !G.getElementsByName(N).length
}), v.getById ? (w.find.ID = function(a, b) {
if ("undefined" != typeof b.getElementById && I) {
var c = b.getElementById(a);
return c ? [c] : []
}
}, w.filter.ID = function(a) {
var b = a.replace(ua, va);
return function(a) {
return a.getAttribute("id") === b
}
}) : (delete w.find.ID, w.filter.ID = function(a) {
var b = a.replace(ua, va);
return function(a) {
var c = "undefined" != typeof a.getAttributeNode && a.getAttributeNode("id");
return c && c.value === b
}
}), w.find.TAG = v.getElementsByTagName ? function(a, b) {
return "undefined" != typeof b.getElementsByTagName ? b.getElementsByTagName(a) : v.qsa ? b.querySelectorAll(a) : void 0
} : function(a, b) {
var c, d = [],
e = 0,
f = b.getElementsByTagName(a);
if ("*" === a) {
for (; c = f[e++];) 1 === c.nodeType && d.push(c);
return d
}
return f
}, w.find.CLASS = v.getElementsByClassName && function(a, b) {
return "undefined" != typeof b.getElementsByClassName && I ? b.getElementsByClassName(a) : void 0
}, K = [], J = [], (v.qsa = qa.test(G.querySelectorAll)) && (e(function(a) {
H.appendChild(a).innerHTML = "<a id='" + N + "'></a><select id='" + N + "-\r\\' msallowcapture=''><option selected=''></option></select>", a.querySelectorAll("[msallowcapture^='']").length && J.push("[*^$]=" + ca + "*(?:''|\"\")"), a.querySelectorAll("[selected]").length || J.push("\\[" + ca + "*(?:value|" + ba + ")"), a.querySelectorAll("[id~=" + N + "-]").length || J.push("~="), a.querySelectorAll(":checked").length || J.push(":checked"), a.querySelectorAll("a#" + N + "+*").length || J.push(".#.+[+~]")
}), e(function(a) {
var b = G.createElement("input");
b.setAttribute("type", "hidden"), a.appendChild(b).setAttribute("name", "D"), a.querySelectorAll("[name=d]").length && J.push("name" + ca + "*[*^$|!~]?="), a.querySelectorAll(":enabled").length || J.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), J.push(",.*:")
})), (v.matchesSelector = qa.test(L = H.matches || H.webkitMatchesSelector || H.mozMatchesSelector || H.oMatchesSelector || H.msMatchesSelector)) && e(function(a) {
v.disconnectedMatch = L.call(a, "div"), L.call(a, "[s!='']:x"), K.push("!=", fa)
}), J = J.length && new RegExp(J.join("|")), K = K.length && new RegExp(K.join("|")), b = qa.test(H.compareDocumentPosition), M = b || qa.test(H.contains) ? function(a, b) {
var c = 9 === a.nodeType ? a.documentElement : a,
d = b && b.parentNode;
return a === d || !(!d || 1 !== d.nodeType || !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d)))
} : function(a, b) {
if (b)
for (; b = b.parentNode;)
if (b === a) return !0;
return !1
}, U = b ? function(a, b) {
if (a === b) return E = !0, 0;
var c = !a.compareDocumentPosition - !b.compareDocumentPosition;
return c ? c : (c = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1, 1 & c || !v.sortDetached && b.compareDocumentPosition(a) === c ? a === G || a.ownerDocument === O && M(O, a) ? -1 : b === G || b.ownerDocument === O && M(O, b) ? 1 : D ? aa(D, a) - aa(D, b) : 0 : 4 & c ? -1 : 1)
} : function(a, b) {
if (a === b) return E = !0, 0;
var c, d = 0,
e = a.parentNode,
f = b.parentNode,
h = [a],
i = [b];
if (!e || !f) return a === G ? -1 : b === G ? 1 : e ? -1 : f ? 1 : D ? aa(D, a) - aa(D, b) : 0;
if (e === f) return g(a, b);
for (c = a; c = c.parentNode;) h.unshift(c);
for (c = b; c = c.parentNode;) i.unshift(c);
for (; h[d] === i[d];) d++;
return d ? g(h[d], i[d]) : h[d] === O ? -1 : i[d] === O ? 1 : 0
}, G) : G
}, b.matches = function(a, c) {
return b(a, null, null, c)
}, b.matchesSelector = function(a, c) {
if ((a.ownerDocument || a) !== G && F(a), c = c.replace(ka, "='$1']"), !(!v.matchesSelector || !I || T[c + " "] || K && K.test(c) || J && J.test(c))) try {
var d = L.call(a, c);
if (d || v.disconnectedMatch || a.document && 11 !== a.document.nodeType) return d
} catch (e) {}
return b(c, G, null, [a]).length > 0
}, b.contains = function(a, b) {
return (a.ownerDocument || a) !== G && F(a), M(a, b)
}, b.attr = function(a, b) {
(a.ownerDocument || a) !== G && F(a);
var c = w.attrHandle[b.toLowerCase()],
d = c && W.call(w.attrHandle, b.toLowerCase()) ? c(a, b, !I) : void 0;
return void 0 !== d ? d : v.attributes || !I ? a.getAttribute(b) : (d = a.getAttributeNode(b)) && d.specified ? d.value : null
}, b.error = function(a) {
throw new Error("Syntax error, unrecognized expression: " + a)
}, b.uniqueSort = function(a) {
var b, c = [],
d = 0,
e = 0;
if (E = !v.detectDuplicates, D = !v.sortStable && a.slice(0), a.sort(U), E) {
for (; b = a[e++];) b === a[e] && (d = c.push(e));
for (; d--;) a.splice(c[d], 1)
}
return D = null, a
}, x = b.getText = function(a) {
var b, c = "",
d = 0,
e = a.nodeType;
if (e) {
if (1 === e || 9 === e || 11 === e) {
if ("string" == typeof a.textContent) return a.textContent;
for (a = a.firstChild; a; a = a.nextSibling) c += x(a)
} else if (3 === e || 4 === e) return a.nodeValue
} else
for (; b = a[d++];) c += x(b);
return c
}, w = b.selectors = {
cacheLength: 50,
createPseudo: d,
match: na,
attrHandle: {},
find: {},
relative: {
">": {
dir: "parentNode",
first: !0
},
" ": {
dir: "parentNode"
},
"+": {
dir: "previousSibling",
first: !0
},
"~": {
dir: "previousSibling"
}
},
preFilter: {
ATTR: function(a) {
return a[1] = a[1].replace(ua, va), a[3] = (a[3] || a[4] || a[5] || "").replace(ua, va), "~=" === a[2] && (a[3] = " " + a[3] + " "), a.slice(0, 4)
},
CHILD: function(a) {
return a[1] = a[1].toLowerCase(), "nth" === a[1].slice(0, 3) ? (a[3] || b.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && b.error(a[0]), a
},
PSEUDO: function(a) {
var b, c = !a[6] && a[2];
return na.CHILD.test(a[0]) ? null : (a[3] ? a[2] = a[4] || a[5] || "" : c && la.test(c) && (b = z(c, !0)) && (b = c.indexOf(")", c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3))
}
},
filter: {
TAG: function(a) {
var b = a.replace(ua, va).toLowerCase();
return "*" === a ? function() {
return !0
} : function(a) {
return a.nodeName && a.nodeName.toLowerCase() === b
}
},
CLASS: function(a) {
var b = R[a + " "];
return b || (b = new RegExp("(^|" + ca + ")" + a + "(" + ca + "|$)")) && R(a, function(a) {
return b.test("string" == typeof a.className && a.className || "undefined" != typeof a.getAttribute && a.getAttribute("class") || "")
})
},
ATTR: function(a, c, d) {
return function(e) {
var f = b.attr(e, a);
return null == f ? "!=" === c : c ? (f += "", "=" === c ? f === d : "!=" === c ? f !== d : "^=" === c ? d && 0 === f.indexOf(d) : "*=" === c ? d && f.indexOf(d) > -1 : "$=" === c ? d && f.slice(-d.length) === d : "~=" === c ? (" " + f.replace(ga, " ") + " ").indexOf(d) > -1 : "|=" === c ? f === d || f.slice(0, d.length + 1) === d + "-" : !1) : !0
}
},
CHILD: function(a, b, c, d, e) {
var f = "nth" !== a.slice(0, 3),
g = "last" !== a.slice(-4),
h = "of-type" === b;
return 1 === d && 0 === e ? function(a) {
return !!a.parentNode
} : function(b, c, i) {
var j, k, l, m, n, o, p = f !== g ? "nextSibling" : "previousSibling",
q = b.parentNode,
r = h && b.nodeName.toLowerCase(),
s = !i && !h,
t = !1;
if (q) {
if (f) {
for (; p;) {
for (m = b; m = m[p];)
if (h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) return !1;
o = p = "only" === a && !o && "nextSibling"
}
return !0
}
if (o = [g ? q.firstChild : q.lastChild],
g && s) {
for (m = q, l = m[N] || (m[N] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), j = k[a] || [], n = j[0] === P && j[1], t = n && j[2], m = n && q.childNodes[n]; m = ++n && m && m[p] || (t = n = 0) || o.pop();)
if (1 === m.nodeType && ++t && m === b) {
k[a] = [P, n, t];
break
}
} else if (s && (m = b, l = m[N] || (m[N] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), j = k[a] || [], n = j[0] === P && j[1], t = n), t === !1)
for (;
(m = ++n && m && m[p] || (t = n = 0) || o.pop()) && ((h ? m.nodeName.toLowerCase() !== r : 1 !== m.nodeType) || !++t || (s && (l = m[N] || (m[N] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), k[a] = [P, t]), m !== b)););
return t -= e, t === d || t % d === 0 && t / d >= 0
}
}
},
PSEUDO: function(a, c) {
var e, f = w.pseudos[a] || w.setFilters[a.toLowerCase()] || b.error("unsupported pseudo: " + a);
return f[N] ? f(c) : f.length > 1 ? (e = [a, a, "", c], w.setFilters.hasOwnProperty(a.toLowerCase()) ? d(function(a, b) {
for (var d, e = f(a, c), g = e.length; g--;) d = aa(a, e[g]), a[d] = !(b[d] = e[g])
}) : function(a) {
return f(a, 0, e)
}) : f
}
},
pseudos: {
not: d(function(a) {
var b = [],
c = [],
e = A(a.replace(ha, "$1"));
return e[N] ? d(function(a, b, c, d) {
for (var f, g = e(a, null, d, []), h = a.length; h--;)(f = g[h]) && (a[h] = !(b[h] = f))
}) : function(a, d, f) {
return b[0] = a, e(b, null, f, c), b[0] = null, !c.pop()
}
}),
has: d(function(a) {
return function(c) {
return b(a, c).length > 0
}
}),
contains: d(function(a) {
return a = a.replace(ua, va),
function(b) {
return (b.textContent || b.innerText || x(b)).indexOf(a) > -1
}
}),
lang: d(function(a) {
return ma.test(a || "") || b.error("unsupported lang: " + a), a = a.replace(ua, va).toLowerCase(),
function(b) {
var c;
do
if (c = I ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang")) return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + "-"); while ((b = b.parentNode) && 1 === b.nodeType);
return !1
}
}),
target: function(b) {
var c = a.location && a.location.hash;
return c && c.slice(1) === b.id
},
root: function(a) {
return a === H
},
focus: function(a) {
return a === G.activeElement && (!G.hasFocus || G.hasFocus()) && !!(a.type || a.href || ~a.tabIndex)
},
enabled: function(a) {
return a.disabled === !1
},
disabled: function(a) {
return a.disabled === !0
},
checked: function(a) {
var b = a.nodeName.toLowerCase();
return "input" === b && !!a.checked || "option" === b && !!a.selected
},
selected: function(a) {
return a.parentNode && a.parentNode.selectedIndex, a.selected === !0
},
empty: function(a) {
for (a = a.firstChild; a; a = a.nextSibling)
if (a.nodeType < 6) return !1;
return !0
},
parent: function(a) {
return !w.pseudos.empty(a)
},
header: function(a) {
return pa.test(a.nodeName)
},
input: function(a) {
return oa.test(a.nodeName)
},
button: function(a) {
var b = a.nodeName.toLowerCase();
return "input" === b && "button" === a.type || "button" === b
},
text: function(a) {
var b;
return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase())
},
first: j(function() {
return [0]
}),
last: j(function(a, b) {
return [b - 1]
}),
eq: j(function(a, b, c) {
return [0 > c ? c + b : c]
}),
even: j(function(a, b) {
for (var c = 0; b > c; c += 2) a.push(c);
return a
}),
odd: j(function(a, b) {
for (var c = 1; b > c; c += 2) a.push(c);
return a
}),
lt: j(function(a, b, c) {
for (var d = 0 > c ? c + b : c; --d >= 0;) a.push(d);
return a
}),
gt: j(function(a, b, c) {
for (var d = 0 > c ? c + b : c; ++d < b;) a.push(d);
return a
})
}
}, w.pseudos.nth = w.pseudos.eq;
for (u in {
radio: !0,
checkbox: !0,
file: !0,
password: !0,
image: !0
}) w.pseudos[u] = h(u);
for (u in {
submit: !0,
reset: !0
}) w.pseudos[u] = i(u);
return l.prototype = w.filters = w.pseudos, w.setFilters = new l, z = b.tokenize = function(a, c) {
var d, e, f, g, h, i, j, k = S[a + " "];
if (k) return c ? 0 : k.slice(0);
for (h = a, i = [], j = w.preFilter; h;) {
(!d || (e = ia.exec(h))) && (e && (h = h.slice(e[0].length) || h), i.push(f = [])), d = !1, (e = ja.exec(h)) && (d = e.shift(), f.push({
value: d,
type: e[0].replace(ha, " ")
}), h = h.slice(d.length));
for (g in w.filter) !(e = na[g].exec(h)) || j[g] && !(e = j[g](e)) || (d = e.shift(), f.push({
value: d,
type: g,
matches: e
}), h = h.slice(d.length));
if (!d) break
}
return c ? h.length : h ? b.error(a) : S(a, i).slice(0)
}, A = b.compile = function(a, b) {
var c, d = [],
e = [],
f = T[a + " "];
if (!f) {
for (b || (b = z(a)), c = b.length; c--;) f = s(b[c]), f[N] ? d.push(f) : e.push(f);
f = T(a, t(e, d)), f.selector = a
}
return f
}, B = b.select = function(a, b, c, d) {
var e, f, g, h, i, j = "function" == typeof a && a,
l = !d && z(a = j.selector || a);
if (c = c || [], 1 === l.length) {
if (f = l[0] = l[0].slice(0), f.length > 2 && "ID" === (g = f[0]).type && v.getById && 9 === b.nodeType && I && w.relative[f[1].type]) {
if (b = (w.find.ID(g.matches[0].replace(ua, va), b) || [])[0], !b) return c;
j && (b = b.parentNode), a = a.slice(f.shift().value.length)
}
for (e = na.needsContext.test(a) ? 0 : f.length; e-- && (g = f[e], !w.relative[h = g.type]);)
if ((i = w.find[h]) && (d = i(g.matches[0].replace(ua, va), sa.test(f[0].type) && k(b.parentNode) || b))) {
if (f.splice(e, 1), a = d.length && m(f), !a) return $.apply(c, d), c;
break
}
}
return (j || A(a, l))(d, b, !I, c, !b || sa.test(a) && k(b.parentNode) || b), c
}, v.sortStable = N.split("").sort(U).join("") === N, v.detectDuplicates = !!E, F(), v.sortDetached = e(function(a) {
return 1 & a.compareDocumentPosition(G.createElement("div"))
}), e(function(a) {
return a.innerHTML = "<a href='#'></a>", "#" === a.firstChild.getAttribute("href")
}) || f("type|href|height|width", function(a, b, c) {
return c ? void 0 : a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2)
}), v.attributes && e(function(a) {
return a.innerHTML = "<input/>", a.firstChild.setAttribute("value", ""), "" === a.firstChild.getAttribute("value")
}) || f("value", function(a, b, c) {
return c || "input" !== a.nodeName.toLowerCase() ? void 0 : a.defaultValue
}), e(function(a) {
return null == a.getAttribute("disabled")
}) || f(ba, function(a, b, c) {
var d;
return c ? void 0 : a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null
}), b
}(a);
na.find = sa, na.expr = sa.selectors, na.expr[":"] = na.expr.pseudos, na.uniqueSort = na.unique = sa.uniqueSort, na.text = sa.getText, na.isXMLDoc = sa.isXML, na.contains = sa.contains;
var ta = function(a, b, c) {
for (var d = [], e = void 0 !== c;
(a = a[b]) && 9 !== a.nodeType;)
if (1 === a.nodeType) {
if (e && na(a).is(c)) break;
d.push(a)
}
return d
},
ua = function(a, b) {
for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a);
return c
},
va = na.expr.match.needsContext,
wa = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,
xa = /^.[^:#\[\.,]*$/;
na.filter = function(a, b, c) {
var d = b[0];
return c && (a = ":not(" + a + ")"), 1 === b.length && 1 === d.nodeType ? na.find.matchesSelector(d, a) ? [d] : [] : na.find.matches(a, na.grep(b, function(a) {
return 1 === a.nodeType
}))
}, na.fn.extend({
find: function(a) {
var b, c = [],
d = this,
e = d.length;
if ("string" != typeof a) return this.pushStack(na(a).filter(function() {
for (b = 0; e > b; b++)
if (na.contains(d[b], this)) return !0
}));
for (b = 0; e > b; b++) na.find(a, d[b], c);
return c = this.pushStack(e > 1 ? na.unique(c) : c), c.selector = this.selector ? this.selector + " " + a : a, c
},
filter: function(a) {
return this.pushStack(d(this, a || [], !1))
},
not: function(a) {
return this.pushStack(d(this, a || [], !0))
},
is: function(a) {
return !!d(this, "string" == typeof a && va.test(a) ? na(a) : a || [], !1).length
}
});
var ya, za = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
Aa = na.fn.init = function(a, b, c) {
var d, e;
if (!a) return this;
if (c = c || ya, "string" == typeof a) {
if (d = "<" === a.charAt(0) && ">" === a.charAt(a.length - 1) && a.length >= 3 ? [null, a, null] : za.exec(a), !d || !d[1] && b) return !b || b.jquery ? (b || c).find(a) : this.constructor(b).find(a);
if (d[1]) {
if (b = b instanceof na ? b[0] : b, na.merge(this, na.parseHTML(d[1], b && b.nodeType ? b.ownerDocument || b : da, !0)), wa.test(d[1]) && na.isPlainObject(b))
for (d in b) na.isFunction(this[d]) ? this[d](b[d]) : this.attr(d, b[d]);
return this
}
if (e = da.getElementById(d[2]), e && e.parentNode) {
if (e.id !== d[2]) return ya.find(a);
this.length = 1, this[0] = e
}
return this.context = da, this.selector = a, this
}
return a.nodeType ? (this.context = this[0] = a, this.length = 1, this) : na.isFunction(a) ? "undefined" != typeof c.ready ? c.ready(a) : a(na) : (void 0 !== a.selector && (this.selector = a.selector, this.context = a.context), na.makeArray(a, this))
};
Aa.prototype = na.fn, ya = na(da);
var Ba = /^(?:parents|prev(?:Until|All))/,
Ca = {
children: !0,
contents: !0,
next: !0,
prev: !0
};
na.fn.extend({
has: function(a) {
var b, c = na(a, this),
d = c.length;
return this.filter(function() {
for (b = 0; d > b; b++)
if (na.contains(this, c[b])) return !0
})
},
closest: function(a, b) {
for (var c, d = 0, e = this.length, f = [], g = va.test(a) || "string" != typeof a ? na(a, b || this.context) : 0; e > d; d++)
for (c = this[d]; c && c !== b; c = c.parentNode)
if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && na.find.matchesSelector(c, a))) {
f.push(c);
break
}
return this.pushStack(f.length > 1 ? na.uniqueSort(f) : f)
},
index: function(a) {
return a ? "string" == typeof a ? na.inArray(this[0], na(a)) : na.inArray(a.jquery ? a[0] : a, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
},
add: function(a, b) {
return this.pushStack(na.uniqueSort(na.merge(this.get(), na(a, b))))
},
addBack: function(a) {
return this.add(null == a ? this.prevObject : this.prevObject.filter(a))
}
}), na.each({
parent: function(a) {
var b = a.parentNode;
return b && 11 !== b.nodeType ? b : null
},
parents: function(a) {
return ta(a, "parentNode")
},
parentsUntil: function(a, b, c) {
return ta(a, "parentNode", c)
},
next: function(a) {
return e(a, "nextSibling")
},
prev: function(a) {
return e(a, "previousSibling")
},
nextAll: function(a) {
return ta(a, "nextSibling")
},
prevAll: function(a) {
return ta(a, "previousSibling")
},
nextUntil: function(a, b, c) {
return ta(a, "nextSibling", c)
},
prevUntil: function(a, b, c) {
return ta(a, "previousSibling", c)
},
siblings: function(a) {
return ua((a.parentNode || {}).firstChild, a)
},
children: function(a) {
return ua(a.firstChild)
},
contents: function(a) {
return na.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : na.merge([], a.childNodes)
}
}, function(a, b) {
na.fn[a] = function(c, d) {
var e = na.map(this, b, c);
return "Until" !== a.slice(-5) && (d = c), d && "string" == typeof d && (e = na.filter(d, e)), this.length > 1 && (Ca[a] || (e = na.uniqueSort(e)), Ba.test(a) && (e = e.reverse())), this.pushStack(e)
}
});
var Da = /\S+/g;
na.Callbacks = function(a) {
a = "string" == typeof a ? f(a) : na.extend({}, a);
var b, c, d, e, g = [],
h = [],
i = -1,
j = function() {
for (e = a.once, d = b = !0; h.length; i = -1)
for (c = h.shift(); ++i < g.length;) g[i].apply(c[0], c[1]) === !1 && a.stopOnFalse && (i = g.length, c = !1);
a.memory || (c = !1), b = !1, e && (g = c ? [] : "")
},
k = {
add: function() {
return g && (c && !b && (i = g.length - 1, h.push(c)), function d(b) {
na.each(b, function(b, c) {
na.isFunction(c) ? a.unique && k.has(c) || g.push(c) : c && c.length && "string" !== na.type(c) && d(c)
})
}(arguments), c && !b && j()), this
},
remove: function() {
return na.each(arguments, function(a, b) {
for (var c;
(c = na.inArray(b, g, c)) > -1;) g.splice(c, 1), i >= c && i--
}), this
},
has: function(a) {
return a ? na.inArray(a, g) > -1 : g.length > 0
},
empty: function() {
return g && (g = []), this
},
disable: function() {
return e = h = [], g = c = "", this
},
disabled: function() {
return !g
},
lock: function() {
return e = !0, c || k.disable(), this
},
locked: function() {
return !!e
},
fireWith: function(a, c) {
return e || (c = c || [], c = [a, c.slice ? c.slice() : c], h.push(c), b || j()), this
},
fire: function() {
return k.fireWith(this, arguments), this
},
fired: function() {
return !!d
}
};
return k
}, na.extend({
Deferred: function(a) {
var b = [
["resolve", "done", na.Callbacks("once memory"), "resolved"],
["reject", "fail", na.Callbacks("once memory"), "rejected"],
["notify", "progress", na.Callbacks("memory")]
],
c = "pending",
d = {
state: function() {
return c
},
always: function() {
return e.done(arguments).fail(arguments), this
},
then: function() {
var a = arguments;
return na.Deferred(function(c) {
na.each(b, function(b, f) {
var g = na.isFunction(a[b]) && a[b];
e[f[1]](function() {
var a = g && g.apply(this, arguments);
a && na.isFunction(a.promise) ? a.promise().progress(c.notify).done(c.resolve).fail(c.reject) : c[f[0] + "With"](this === d ? c.promise() : this, g ? [a] : arguments)
})
}), a = null
}).promise()
},
promise: function(a) {
return null != a ? na.extend(a, d) : d
}
},
e = {};
return d.pipe = d.then, na.each(b, function(a, f) {
var g = f[2],
h = f[3];
d[f[1]] = g.add, h && g.add(function() {
c = h
}, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = function() {
return e[f[0] + "With"](this === e ? d : this, arguments), this
}, e[f[0] + "With"] = g.fireWith
}), d.promise(e), a && a.call(e, e), e
},
when: function(a) {
var b, c, d, e = 0,
f = ea.call(arguments),
g = f.length,
h = 1 !== g || a && na.isFunction(a.promise) ? g : 0,
i = 1 === h ? a : na.Deferred(),
j = function(a, c, d) {
return function(e) {
c[a] = this, d[a] = arguments.length > 1 ? ea.call(arguments) : e, d === b ? i.notifyWith(c, d) : --h || i.resolveWith(c, d)
}
};
if (g > 1)
for (b = new Array(g), c = new Array(g), d = new Array(g); g > e; e++) f[e] && na.isFunction(f[e].promise) ? f[e].promise().progress(j(e, c, b)).done(j(e, d, f)).fail(i.reject) : --h;
return h || i.resolveWith(d, f), i.promise()
}
});
var Ea;
na.fn.ready = function(a) {
return na.ready.promise().done(a), this
}, na.extend({
isReady: !1,
readyWait: 1,
holdReady: function(a) {
a ? na.readyWait++ : na.ready(!0)
},
ready: function(a) {
(a === !0 ? --na.readyWait : na.isReady) || (na.isReady = !0, a !== !0 && --na.readyWait > 0 || (Ea.resolveWith(da, [na]), na.fn.triggerHandler && (na(da).triggerHandler("ready"), na(da).off("ready"))))
}
}), na.ready.promise = function(b) {
if (!Ea)
if (Ea = na.Deferred(), "complete" === da.readyState || "loading" !== da.readyState && !da.documentElement.doScroll) a.setTimeout(na.ready);
else if (da.addEventListener) da.addEventListener("DOMContentLoaded", h), a.addEventListener("load", h);
else {
da.attachEvent("onreadystatechange", h), a.attachEvent("onload", h);
var c = !1;
try {
c = null == a.frameElement && da.documentElement
} catch (d) {}
c && c.doScroll && ! function e() {
if (!na.isReady) {
try {
c.doScroll("left")
} catch (b) {
return a.setTimeout(e, 50)
}
g(), na.ready()
}
}()
}
return Ea.promise(b)
}, na.ready.promise();
var Fa;
for (Fa in na(la)) break;
la.ownFirst = "0" === Fa, la.inlineBlockNeedsLayout = !1, na(function() {
var a, b, c, d;
c = da.getElementsByTagName("body")[0], c && c.style && (b = da.createElement("div"), d = da.createElement("div"), d.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", c.appendChild(d).appendChild(b), "undefined" != typeof b.style.zoom && (b.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1", la.inlineBlockNeedsLayout = a = 3 === b.offsetWidth, a && (c.style.zoom = 1)), c.removeChild(d))
}),
function() {
var a = da.createElement("div");
la.deleteExpando = !0;
try {
delete a.test
} catch (b) {
la.deleteExpando = !1
}
a = null
}();
var Ga = function(a) {
var b = na.noData[(a.nodeName + " ").toLowerCase()],
c = +a.nodeType || 1;
return 1 !== c && 9 !== c ? !1 : !b || b !== !0 && a.getAttribute("classid") === b
},
Ha = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
Ia = /([A-Z])/g;
na.extend({
cache: {},
noData: {
"applet ": !0,
"embed ": !0,
"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
},
hasData: function(a) {
return a = a.nodeType ? na.cache[a[na.expando]] : a[na.expando], !!a && !j(a)
},
data: function(a, b, c) {
return k(a, b, c)
},
removeData: function(a, b) {
return l(a, b)
},
_data: function(a, b, c) {
return k(a, b, c, !0)
},
_removeData: function(a, b) {
return l(a, b, !0)
}
}), na.fn.extend({
data: function(a, b) {
var c, d, e, f = this[0],
g = f && f.attributes;
if (void 0 === a) {
if (this.length && (e = na.data(f), 1 === f.nodeType && !na._data(f, "parsedAttrs"))) {
for (c = g.length; c--;) g[c] && (d = g[c].name, 0 === d.indexOf("data-") && (d = na.camelCase(d.slice(5)), i(f, d, e[d])));
na._data(f, "parsedAttrs", !0)
}
return e
}
return "object" == typeof a ? this.each(function() {
na.data(this, a)
}) : arguments.length > 1 ? this.each(function() {
na.data(this, a, b)
}) : f ? i(f, a, na.data(f, a)) : void 0
},
removeData: function(a) {
return this.each(function() {
na.removeData(this, a)
})
}
}), na.extend({
queue: function(a, b, c) {
var d;
return a ? (b = (b || "fx") + "queue", d = na._data(a, b), c && (!d || na.isArray(c) ? d = na._data(a, b, na.makeArray(c)) : d.push(c)), d || []) : void 0
},
dequeue: function(a, b) {
b = b || "fx";
var c = na.queue(a, b),
d = c.length,
e = c.shift(),
f = na._queueHooks(a, b),
g = function() {
na.dequeue(a, b)
};
"inprogress" === e && (e = c.shift(), d--), e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire()
},
_queueHooks: function(a, b) {
var c = b + "queueHooks";
return na._data(a, c) || na._data(a, c, {
empty: na.Callbacks("once memory").add(function() {
na._removeData(a, b + "queue"), na._removeData(a, c)
})
})
}
}), na.fn.extend({
queue: function(a, b) {
var c = 2;
return "string" != typeof a && (b = a, a = "fx", c--), arguments.length < c ? na.queue(this[0], a) : void 0 === b ? this : this.each(function() {
var c = na.queue(this, a, b);
na._queueHooks(this, a), "fx" === a && "inprogress" !== c[0] && na.dequeue(this, a)
})
},
dequeue: function(a) {
return this.each(function() {
na.dequeue(this, a)
})
},
clearQueue: function(a) {
return this.queue(a || "fx", [])
},
promise: function(a, b) {
var c, d = 1,
e = na.Deferred(),
f = this,
g = this.length,
h = function() {
--d || e.resolveWith(f, [f])
};
for ("string" != typeof a && (b = a, a = void 0), a = a || "fx"; g--;) c = na._data(f[g], a + "queueHooks"), c && c.empty && (d++, c.empty.add(h));
return h(), e.promise(b)
}
}),
function() {
var a;
la.shrinkWrapBlocks = function() {
if (null != a) return a;
a = !1;
var b, c, d;
return c = da.getElementsByTagName("body")[0], c && c.style ? (b = da.createElement("div"), d = da.createElement("div"), d.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", c.appendChild(d).appendChild(b), "undefined" != typeof b.style.zoom && (b.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1", b.appendChild(da.createElement("div")).style.width = "5px", a = 3 !== b.offsetWidth), c.removeChild(d), a) : void 0
}
}();
var Ja = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
Ka = new RegExp("^(?:([+-])=|)(" + Ja + ")([a-z%]*)$", "i"),
La = ["Top", "Right", "Bottom", "Left"],
Ma = function(a, b) {
return a = b || a, "none" === na.css(a, "display") || !na.contains(a.ownerDocument, a)
},
Na = function(a, b, c, d, e, f, g) {
var h = 0,
i = a.length,
j = null == c;
if ("object" === na.type(c)) {
e = !0;
for (h in c) Na(a, b, h, c[h], !0, f, g)
} else if (void 0 !== d && (e = !0, na.isFunction(d) || (g = !0), j && (g ? (b.call(a, d), b = null) : (j = b, b = function(a, b, c) {
return j.call(na(a), c)
})), b))
for (; i > h; h++) b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c)));
return e ? a : j ? b.call(a) : i ? b(a[0], c) : f
},
Oa = /^(?:checkbox|radio)$/i,
Pa = /<([\w:-]+)/,
Qa = /^$|\/(?:java|ecma)script/i,
Ra = /^\s+/,
Sa = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";
! function() {
var a = da.createElement("div"),
b = da.createDocumentFragment(),
c = da.createElement("input");
a.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", la.leadingWhitespace = 3 === a.firstChild.nodeType, la.tbody = !a.getElementsByTagName("tbody").length, la.htmlSerialize = !!a.getElementsByTagName("link").length, la.html5Clone = "<:nav></:nav>" !== da.createElement("nav").cloneNode(!0).outerHTML, c.type = "checkbox", c.checked = !0, b.appendChild(c), la.appendChecked = c.checked, a.innerHTML = "<textarea>x</textarea>", la.noCloneChecked = !!a.cloneNode(!0).lastChild.defaultValue, b.appendChild(a), c = da.createElement("input"), c.setAttribute("type", "radio"), c.setAttribute("checked", "checked"), c.setAttribute("name", "t"), a.appendChild(c), la.checkClone = a.cloneNode(!0).cloneNode(!0).lastChild.checked, la.noCloneEvent = !!a.addEventListener, a[na.expando] = 1, la.attributes = !a.getAttribute(na.expando)
}();
var Ta = {
option: [1, "<select multiple='multiple'>", "</select>"],
legend: [1, "<fieldset>", "</fieldset>"],
area: [1, "<map>", "</map>"],
param: [1, "<object>", "</object>"],
thead: [1, "<table>", "</table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: la.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
};
Ta.optgroup = Ta.option, Ta.tbody = Ta.tfoot = Ta.colgroup = Ta.caption = Ta.thead, Ta.th = Ta.td;
var Ua = /<|&#?\w+;/,
Va = /<tbody/i;
! function() {
var b, c, d = da.createElement("div");
for (b in {
submit: !0,
change: !0,
focusin: !0
}) c = "on" + b, (la[b] = c in a) || (d.setAttribute(c, "t"), la[b] = d.attributes[c].expando === !1);
d = null
}();
var Wa = /^(?:input|select|textarea)$/i,
Xa = /^key/,
Ya = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
Za = /^(?:focusinfocus|focusoutblur)$/,
$a = /^([^.]*)(?:\.(.+)|)/;
na.event = {
global: {},
add: function(a, b, c, d, e) {
var f, g, h, i, j, k, l, m, n, o, p, q = na._data(a);
if (q) {
for (c.handler && (i = c, c = i.handler, e = i.selector), c.guid || (c.guid = na.guid++), (g = q.events) || (g = q.events = {}), (k = q.handle) || (k = q.handle = function(a) {
return "undefined" == typeof na || a && na.event.triggered === a.type ? void 0 : na.event.dispatch.apply(k.elem, arguments)
}, k.elem = a), b = (b || "").match(Da) || [""], h = b.length; h--;) f = $a.exec(b[h]) || [], n = p = f[1], o = (f[2] || "").split(".").sort(), n && (j = na.event.special[n] || {}, n = (e ? j.delegateType : j.bindType) || n, j = na.event.special[n] || {}, l = na.extend({
type: n,
origType: p,
data: d,
handler: c,
guid: c.guid,
selector: e,
needsContext: e && na.expr.match.needsContext.test(e),
namespace: o.join(".")
}, i), (m = g[n]) || (m = g[n] = [], m.delegateCount = 0, j.setup && j.setup.call(a, d, o, k) !== !1 || (a.addEventListener ? a.addEventListener(n, k, !1) : a.attachEvent && a.attachEvent("on" + n, k))), j.add && (j.add.call(a, l), l.handler.guid || (l.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, l) : m.push(l), na.event.global[n] = !0);
a = null
}
},
remove: function(a, b, c, d, e) {
var f, g, h, i, j, k, l, m, n, o, p, q = na.hasData(a) && na._data(a);
if (q && (k = q.events)) {
for (b = (b || "").match(Da) || [""], j = b.length; j--;)
if (h = $a.exec(b[j]) || [], n = p = h[1], o = (h[2] || "").split(".").sort(), n) {
for (l = na.event.special[n] || {}, n = (d ? l.delegateType : l.bindType) || n, m = k[n] || [], h = h[2] && new RegExp("(^|\\.)" + o.join("\\.(?:.*\\.|)") + "(\\.|$)"), i = f = m.length; f--;) g = m[f], !e && p !== g.origType || c && c.guid !== g.guid || h && !h.test(g.namespace) || d && d !== g.selector && ("**" !== d || !g.selector) || (m.splice(f, 1), g.selector && m.delegateCount--, l.remove && l.remove.call(a, g));
i && !m.length && (l.teardown && l.teardown.call(a, o, q.handle) !== !1 || na.removeEvent(a, n, q.handle), delete k[n])
} else
for (n in k) na.event.remove(a, n + b[j], c, d, !0);
na.isEmptyObject(k) && (delete q.handle, na._removeData(a, "events"))
}
},
trigger: function(b, c, d, e) {
var f, g, h, i, j, k, l, m = [d || da],
n = ka.call(b, "type") ? b.type : b,
o = ka.call(b, "namespace") ? b.namespace.split(".") : [];
if (h = k = d = d || da, 3 !== d.nodeType && 8 !== d.nodeType && !Za.test(n + na.event.triggered) && (n.indexOf(".") > -1 && (o = n.split("."), n = o.shift(), o.sort()), g = n.indexOf(":") < 0 && "on" + n, b = b[na.expando] ? b : new na.Event(n, "object" == typeof b && b), b.isTrigger = e ? 2 : 3, b.namespace = o.join("."), b.rnamespace = b.namespace ? new RegExp("(^|\\.)" + o.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, b.result = void 0, b.target || (b.target = d), c = null == c ? [b] : na.makeArray(c, [b]), j = na.event.special[n] || {}, e || !j.trigger || j.trigger.apply(d, c) !== !1)) {
if (!e && !j.noBubble && !na.isWindow(d)) {
for (i = j.delegateType || n, Za.test(i + n) || (h = h.parentNode); h; h = h.parentNode) m.push(h), k = h;
k === (d.ownerDocument || da) && m.push(k.defaultView || k.parentWindow || a)
}
for (l = 0;
(h = m[l++]) && !b.isPropagationStopped();) b.type = l > 1 ? i : j.bindType || n, f = (na._data(h, "events") || {})[b.type] && na._data(h, "handle"), f && f.apply(h, c), f = g && h[g], f && f.apply && Ga(h) && (b.result = f.apply(h, c), b.result === !1 && b.preventDefault());
if (b.type = n, !e && !b.isDefaultPrevented() && (!j._default || j._default.apply(m.pop(), c) === !1) && Ga(d) && g && d[n] && !na.isWindow(d)) {
k = d[g], k && (d[g] = null), na.event.triggered = n;
try {
d[n]()
} catch (p) {}
na.event.triggered = void 0, k && (d[g] = k)
}
return b.result
}
},
dispatch: function(a) {
a = na.event.fix(a);
var b, c, d, e, f, g = [],
h = ea.call(arguments),
i = (na._data(this, "events") || {})[a.type] || [],
j = na.event.special[a.type] || {};
if (h[0] = a, a.delegateTarget = this, !j.preDispatch || j.preDispatch.call(this, a) !== !1) {
for (g = na.event.handlers.call(this, a, i), b = 0;
(e = g[b++]) && !a.isPropagationStopped();)
for (a.currentTarget = e.elem, c = 0;
(f = e.handlers[c++]) && !a.isImmediatePropagationStopped();)(!a.rnamespace || a.rnamespace.test(f.namespace)) && (a.handleObj = f, a.data = f.data, d = ((na.event.special[f.origType] || {}).handle || f.handler).apply(e.elem, h), void 0 !== d && (a.result = d) === !1 && (a.preventDefault(), a.stopPropagation()));
return j.postDispatch && j.postDispatch.call(this, a), a.result
}
},
handlers: function(a, b) {
var c, d, e, f, g = [],
h = b.delegateCount,
i = a.target;
if (h && i.nodeType && ("click" !== a.type || isNaN(a.button) || a.button < 1))
for (; i != this; i = i.parentNode || this)
if (1 === i.nodeType && (i.disabled !== !0 || "click" !== a.type)) {
for (d = [], c = 0; h > c; c++) f = b[c], e = f.selector + " ", void 0 === d[e] && (d[e] = f.needsContext ? na(e, this).index(i) > -1 : na.find(e, this, null, [i]).length), d[e] && d.push(f);
d.length && g.push({
elem: i,
handlers: d
})
}
return h < b.length && g.push({
elem: this,
handlers: b.slice(h)
}), g
},
fix: function(a) {
if (a[na.expando]) return a;
var b, c, d, e = a.type,
f = a,
g = this.fixHooks[e];
for (g || (this.fixHooks[e] = g = Ya.test(e) ? this.mouseHooks : Xa.test(e) ? this.keyHooks : {}), d = g.props ? this.props.concat(g.props) : this.props, a = new na.Event(f), b = d.length; b--;) c = d[b], a[c] = f[c];
return a.target || (a.target = f.srcElement || da), 3 === a.target.nodeType && (a.target = a.target.parentNode), a.metaKey = !!a.metaKey, g.filter ? g.filter(a, f) : a
},
props: "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function(a, b) {
return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a
}
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function(a, b) {
var c, d, e, f = b.button,
g = b.fromElement;
return null == a.pageX && null != b.clientX && (d = a.target.ownerDocument || da, e = d.documentElement, c = d.body, a.pageX = b.clientX + (e && e.scrollLeft || c && c.scrollLeft || 0) - (e && e.clientLeft || c && c.clientLeft || 0), a.pageY = b.clientY + (e && e.scrollTop || c && c.scrollTop || 0) - (e && e.clientTop || c && c.clientTop || 0)), !a.relatedTarget && g && (a.relatedTarget = g === a.target ? b.toElement : g), a.which || void 0 === f || (a.which = 1 & f ? 1 : 2 & f ? 3 : 4 & f ? 2 : 0), a
}
},
special: {
load: {
noBubble: !0
},
focus: {
trigger: function() {
if (this !== u() && this.focus) try {
return this.focus(), !1
} catch (a) {}
},
delegateType: "focusin"
},
blur: {
trigger: function() {
return this === u() && this.blur ? (this.blur(), !1) : void 0
},
delegateType: "focusout"
},
click: {
trigger: function() {
return na.nodeName(this, "input") && "checkbox" === this.type && this.click ? (this.click(), !1) : void 0
},
_default: function(a) {
return na.nodeName(a.target, "a")
}
},
beforeunload: {
postDispatch: function(a) {
void 0 !== a.result && a.originalEvent && (a.originalEvent.returnValue = a.result)
}
}
},
simulate: function(a, b, c) {
var d = na.extend(new na.Event, c, {
type: a,
isSimulated: !0
});
na.event.trigger(d, null, b), d.isDefaultPrevented() && c.preventDefault()
}
}, na.removeEvent = da.removeEventListener ? function(a, b, c) {
a.removeEventListener && a.removeEventListener(b, c)
} : function(a, b, c) {
var d = "on" + b;
a.detachEvent && ("undefined" == typeof a[d] && (a[d] = null), a.detachEvent(d, c))
}, na.Event = function(a, b) {
return this instanceof na.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || void 0 === a.defaultPrevented && a.returnValue === !1 ? s : t) : this.type = a, b && na.extend(this, b), this.timeStamp = a && a.timeStamp || na.now(), void(this[na.expando] = !0)) : new na.Event(a, b)
}, na.Event.prototype = {
constructor: na.Event,
isDefaultPrevented: t,
isPropagationStopped: t,
isImmediatePropagationStopped: t,
preventDefault: function() {
var a = this.originalEvent;
this.isDefaultPrevented = s, a && (a.preventDefault ? a.preventDefault() : a.returnValue = !1)
},
stopPropagation: function() {
var a = this.originalEvent;
this.isPropagationStopped = s, a && !this.isSimulated && (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0)
},
stopImmediatePropagation: function() {
var a = this.originalEvent;
this.isImmediatePropagationStopped = s, a && a.stopImmediatePropagation && a.stopImmediatePropagation(), this.stopPropagation()
}
}, na.each({
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function(a, b) {
na.event.special[a] = {
delegateType: b,
bindType: b,
handle: function(a) {
var c, d = this,
e = a.relatedTarget,
f = a.handleObj;
return (!e || e !== d && !na.contains(d, e)) && (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c
}
}
}), la.submit || (na.event.special.submit = {
setup: function() {
return na.nodeName(this, "form") ? !1 : void na.event.add(this, "click._submit keypress._submit", function(a) {
var b = a.target,
c = na.nodeName(b, "input") || na.nodeName(b, "button") ? na.prop(b, "form") : void 0;
c && !na._data(c, "submit") && (na.event.add(c, "submit._submit", function(a) {
a._submitBubble = !0
}), na._data(c, "submit", !0))
})
},
postDispatch: function(a) {
a._submitBubble && (delete a._submitBubble, this.parentNode && !a.isTrigger && na.event.simulate("submit", this.parentNode, a))
},
teardown: function() {
return na.nodeName(this, "form") ? !1 : void na.event.remove(this, "._submit")
}
}), la.change || (na.event.special.change = {
setup: function() {
return Wa.test(this.nodeName) ? (("checkbox" === this.type || "radio" === this.type) && (na.event.add(this, "propertychange._change", function(a) {
"checked" === a.originalEvent.propertyName && (this._justChanged = !0)
}), na.event.add(this, "click._change", function(a) {
this._justChanged && !a.isTrigger && (this._justChanged = !1), na.event.simulate("change", this, a)
})), !1) : void na.event.add(this, "beforeactivate._change", function(a) {
var b = a.target;
Wa.test(b.nodeName) && !na._data(b, "change") && (na.event.add(b, "change._change", function(a) {
!this.parentNode || a.isSimulated || a.isTrigger || na.event.simulate("change", this.parentNode, a)
}), na._data(b, "change", !0))
})
},
handle: function(a) {
var b = a.target;
return this !== b || a.isSimulated || a.isTrigger || "radio" !== b.type && "checkbox" !== b.type ? a.handleObj.handler.apply(this, arguments) : void 0
},
teardown: function() {
return na.event.remove(this, "._change"), !Wa.test(this.nodeName)
}
}), la.focusin || na.each({
focus: "focusin",
blur: "focusout"
}, function(a, b) {
var c = function(a) {
na.event.simulate(b, a.target, na.event.fix(a))
};
na.event.special[b] = {
setup: function() {
var d = this.ownerDocument || this,
e = na._data(d, b);
e || d.addEventListener(a, c, !0), na._data(d, b, (e || 0) + 1)
},
teardown: function() {
var d = this.ownerDocument || this,
e = na._data(d, b) - 1;
e ? na._data(d, b, e) : (d.removeEventListener(a, c, !0), na._removeData(d, b))
}
}
}), na.fn.extend({
on: function(a, b, c, d) {
return v(this, a, b, c, d)
},
one: function(a, b, c, d) {
return v(this, a, b, c, d, 1)
},
off: function(a, b, c) {
var d, e;
if (a && a.preventDefault && a.handleObj) return d = a.handleObj, na(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this;
if ("object" == typeof a) {
for (e in a) this.off(e, b, a[e]);
return this
}
return (b === !1 || "function" == typeof b) && (c = b, b = void 0), c === !1 && (c = t), this.each(function() {
na.event.remove(this, a, c, b)
})
},
trigger: function(a, b) {
return this.each(function() {
na.event.trigger(a, b, this)
})
},
triggerHandler: function(a, b) {
var c = this[0];
return c ? na.event.trigger(a, b, c, !0) : void 0
}
});
var _a = / jQuery\d+="(?:null|\d+)"/g,
ab = new RegExp("<(?:" + Sa + ")[\\s/>]", "i"),
bb = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
cb = /<script|<style|<link/i,
db = /checked\s*(?:[^=]|=\s*.checked.)/i,
eb = /^true\/(.*)/,
fb = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
gb = n(da),
hb = gb.appendChild(da.createElement("div"));
na.extend({
htmlPrefilter: function(a) {
return a.replace(bb, "<$1></$2>")
},
clone: function(a, b, c) {
var d, e, f, g, h, i = na.contains(a.ownerDocument, a);
if (la.html5Clone || na.isXMLDoc(a) || !ab.test("<" + a.nodeName + ">") ? f = a.cloneNode(!0) : (hb.innerHTML = a.outerHTML, hb.removeChild(f = hb.firstChild)), !(la.noCloneEvent && la.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || na.isXMLDoc(a)))
for (d = o(f), h = o(a), g = 0; null != (e = h[g]); ++g) d[g] && A(e, d[g]);
if (b)
if (c)
for (h = h || o(a), d = d || o(f), g = 0; null != (e = h[g]); g++) z(e, d[g]);
else z(a, f);
return d = o(f, "script"), d.length > 0 && p(d, !i && o(a, "script")), d = h = e = null, f
},
cleanData: function(a, b) {
for (var c, d, e, f, g = 0, h = na.expando, i = na.cache, j = la.attributes, k = na.event.special; null != (c = a[g]); g++)
if ((b || Ga(c)) && (e = c[h], f = e && i[e])) {
if (f.events)
for (d in f.events) k[d] ? na.event.remove(c, d) : na.removeEvent(c, d, f.handle);
i[e] && (delete i[e], j || "undefined" == typeof c.removeAttribute ? c[h] = void 0 : c.removeAttribute(h), ca.push(e))
}
}
}), na.fn.extend({
domManip: B,
detach: function(a) {
return C(this, a, !0)
},
remove: function(a) {
return C(this, a)
},
text: function(a) {
return Na(this, function(a) {
return void 0 === a ? na.text(this) : this.empty().append((this[0] && this[0].ownerDocument || da).createTextNode(a))
}, null, a, arguments.length)
},
append: function() {
return B(this, arguments, function(a) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var b = w(this, a);
b.appendChild(a)
}
})
},
prepend: function() {
return B(this, arguments, function(a) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var b = w(this, a);
b.insertBefore(a, b.firstChild)
}
})
},
before: function() {
return B(this, arguments, function(a) {
this.parentNode && this.parentNode.insertBefore(a, this)
})
},
after: function() {
return B(this, arguments, function(a) {
this.parentNode && this.parentNode.insertBefore(a, this.nextSibling)
})
},
empty: function() {
for (var a, b = 0; null != (a = this[b]); b++) {
for (1 === a.nodeType && na.cleanData(o(a, !1)); a.firstChild;) a.removeChild(a.firstChild);
a.options && na.nodeName(a, "select") && (a.options.length = 0)
}
return this
},
clone: function(a, b) {
return a = null == a ? !1 : a, b = null == b ? a : b, this.map(function() {
return na.clone(this, a, b)
})
},
html: function(a) {
return Na(this, function(a) {
var b = this[0] || {},
c = 0,
d = this.length;
if (void 0 === a) return 1 === b.nodeType ? b.innerHTML.replace(_a, "") : void 0;
if (!("string" != typeof a || cb.test(a) || !la.htmlSerialize && ab.test(a) || !la.leadingWhitespace && Ra.test(a) || Ta[(Pa.exec(a) || ["", ""])[1].toLowerCase()])) {
a = na.htmlPrefilter(a);
try {
for (; d > c; c++) b = this[c] || {}, 1 === b.nodeType && (na.cleanData(o(b, !1)), b.innerHTML = a);
b = 0
} catch (e) {}
}
b && this.empty().append(a)
}, null, a, arguments.length);
},
replaceWith: function() {
var a = [];
return B(this, arguments, function(b) {
var c = this.parentNode;
na.inArray(this, a) < 0 && (na.cleanData(o(this)), c && c.replaceChild(b, this))
}, a)
}
}), na.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(a, b) {
na.fn[a] = function(a) {
for (var c, d = 0, e = [], f = na(a), g = f.length - 1; g >= d; d++) c = d === g ? this : this.clone(!0), na(f[d])[b](c), ga.apply(e, c.get());
return this.pushStack(e)
}
});
var ib, jb = {
HTML: "block",
BODY: "block"
},
kb = /^margin/,
lb = new RegExp("^(" + Ja + ")(?!px)[a-z%]+$", "i"),
mb = function(a, b, c, d) {
var e, f, g = {};
for (f in b) g[f] = a.style[f], a.style[f] = b[f];
e = c.apply(a, d || []);
for (f in b) a.style[f] = g[f];
return e
},
nb = da.documentElement;
! function() {
function b() {
var b, k, l = da.documentElement;
l.appendChild(i), j.style.cssText = "-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", c = e = h = !1, d = g = !0, a.getComputedStyle && (k = a.getComputedStyle(j), c = "1%" !== (k || {}).top, h = "2px" === (k || {}).marginLeft, e = "4px" === (k || {
width: "4px"
}).width, j.style.marginRight = "50%", d = "4px" === (k || {
marginRight: "4px"
}).marginRight, b = j.appendChild(da.createElement("div")), b.style.cssText = j.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", b.style.marginRight = b.style.width = "0", j.style.width = "1px", g = !parseFloat((a.getComputedStyle(b) || {}).marginRight), j.removeChild(b)), j.style.display = "none", f = 0 === j.getClientRects().length, f && (j.style.display = "", j.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", j.childNodes[0].style.borderCollapse = "separate", b = j.getElementsByTagName("td"), b[0].style.cssText = "margin:0;border:0;padding:0;display:none", f = 0 === b[0].offsetHeight, f && (b[0].style.display = "", b[1].style.display = "none", f = 0 === b[0].offsetHeight)), l.removeChild(i)
}
var c, d, e, f, g, h, i = da.createElement("div"),
j = da.createElement("div");
j.style && (j.style.cssText = "float:left;opacity:.5", la.opacity = "0.5" === j.style.opacity, la.cssFloat = !!j.style.cssFloat, j.style.backgroundClip = "content-box", j.cloneNode(!0).style.backgroundClip = "", la.clearCloneStyle = "content-box" === j.style.backgroundClip, i = da.createElement("div"), i.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", j.innerHTML = "", i.appendChild(j), la.boxSizing = "" === j.style.boxSizing || "" === j.style.MozBoxSizing || "" === j.style.WebkitBoxSizing, na.extend(la, {
reliableHiddenOffsets: function() {
return null == c && b(), f
},
boxSizingReliable: function() {
return null == c && b(), e
},
pixelMarginRight: function() {
return null == c && b(), d
},
pixelPosition: function() {
return null == c && b(), c
},
reliableMarginRight: function() {
return null == c && b(), g
},
reliableMarginLeft: function() {
return null == c && b(), h
}
}))
}();
var ob, pb, qb = /^(top|right|bottom|left)$/;
a.getComputedStyle ? (ob = function(b) {
var c = b.ownerDocument.defaultView;
return c && c.opener || (c = a), c.getComputedStyle(b)
}, pb = function(a, b, c) {
var d, e, f, g, h = a.style;
return c = c || ob(a), g = c ? c.getPropertyValue(b) || c[b] : void 0, "" !== g && void 0 !== g || na.contains(a.ownerDocument, a) || (g = na.style(a, b)), c && !la.pixelMarginRight() && lb.test(g) && kb.test(b) && (d = h.width, e = h.minWidth, f = h.maxWidth, h.minWidth = h.maxWidth = h.width = g, g = c.width, h.width = d, h.minWidth = e, h.maxWidth = f), void 0 === g ? g : g + ""
}) : nb.currentStyle && (ob = function(a) {
return a.currentStyle
}, pb = function(a, b, c) {
var d, e, f, g, h = a.style;
return c = c || ob(a), g = c ? c[b] : void 0, null == g && h && h[b] && (g = h[b]), lb.test(g) && !qb.test(b) && (d = h.left, e = a.runtimeStyle, f = e && e.left, f && (e.left = a.currentStyle.left), h.left = "fontSize" === b ? "1em" : g, g = h.pixelLeft + "px", h.left = d, f && (e.left = f)), void 0 === g ? g : g + "" || "auto"
});
var rb = /alpha\([^)]*\)/i,
sb = /opacity\s*=\s*([^)]*)/i,
tb = /^(none|table(?!-c[ea]).+)/,
ub = new RegExp("^(" + Ja + ")(.*)$", "i"),
vb = {
position: "absolute",
visibility: "hidden",
display: "block"
},
wb = {
letterSpacing: "0",
fontWeight: "400"
},
xb = ["Webkit", "O", "Moz", "ms"],
yb = da.createElement("div").style;
na.extend({
cssHooks: {
opacity: {
get: function(a, b) {
if (b) {
var c = pb(a, "opacity");
return "" === c ? "1" : c
}
}
}
},
cssNumber: {
animationIterationCount: !0,
columnCount: !0,
fillOpacity: !0,
flexGrow: !0,
flexShrink: !0,
fontWeight: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
},
cssProps: {
"float": la.cssFloat ? "cssFloat" : "styleFloat"
},
style: function(a, b, c, d) {
if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) {
var e, f, g, h = na.camelCase(b),
i = a.style;
if (b = na.cssProps[h] || (na.cssProps[h] = G(h) || h), g = na.cssHooks[b] || na.cssHooks[h], void 0 === c) return g && "get" in g && void 0 !== (e = g.get(a, !1, d)) ? e : i[b];
if (f = typeof c, "string" === f && (e = Ka.exec(c)) && e[1] && (c = m(a, b, e), f = "number"), null != c && c === c && ("number" === f && (c += e && e[3] || (na.cssNumber[h] ? "" : "px")), la.clearCloneStyle || "" !== c || 0 !== b.indexOf("background") || (i[b] = "inherit"), !(g && "set" in g && void 0 === (c = g.set(a, c, d))))) try {
i[b] = c
} catch (j) {}
}
},
css: function(a, b, c, d) {
var e, f, g, h = na.camelCase(b);
return b = na.cssProps[h] || (na.cssProps[h] = G(h) || h), g = na.cssHooks[b] || na.cssHooks[h], g && "get" in g && (f = g.get(a, !0, c)), void 0 === f && (f = pb(a, b, d)), "normal" === f && b in wb && (f = wb[b]), "" === c || c ? (e = parseFloat(f), c === !0 || isFinite(e) ? e || 0 : f) : f
}
}), na.each(["height", "width"], function(a, b) {
na.cssHooks[b] = {
get: function(a, c, d) {
return c ? tb.test(na.css(a, "display")) && 0 === a.offsetWidth ? mb(a, vb, function() {
return K(a, b, d)
}) : K(a, b, d) : void 0
},
set: function(a, c, d) {
var e = d && ob(a);
return I(a, c, d ? J(a, b, d, la.boxSizing && "border-box" === na.css(a, "boxSizing", !1, e), e) : 0)
}
}
}), la.opacity || (na.cssHooks.opacity = {
get: function(a, b) {
return sb.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : b ? "1" : ""
},
set: function(a, b) {
var c = a.style,
d = a.currentStyle,
e = na.isNumeric(b) ? "alpha(opacity=" + 100 * b + ")" : "",
f = d && d.filter || c.filter || "";
c.zoom = 1, (b >= 1 || "" === b) && "" === na.trim(f.replace(rb, "")) && c.removeAttribute && (c.removeAttribute("filter"), "" === b || d && !d.filter) || (c.filter = rb.test(f) ? f.replace(rb, e) : f + " " + e)
}
}), na.cssHooks.marginRight = F(la.reliableMarginRight, function(a, b) {
return b ? mb(a, {
display: "inline-block"
}, pb, [a, "marginRight"]) : void 0
}), na.cssHooks.marginLeft = F(la.reliableMarginLeft, function(a, b) {
return b ? (parseFloat(pb(a, "marginLeft")) || (na.contains(a.ownerDocument, a) ? a.getBoundingClientRect().left - mb(a, {
marginLeft: 0
}, function() {
return a.getBoundingClientRect().left
}) : 0)) + "px" : void 0
}), na.each({
margin: "",
padding: "",
border: "Width"
}, function(a, b) {
na.cssHooks[a + b] = {
expand: function(c) {
for (var d = 0, e = {}, f = "string" == typeof c ? c.split(" ") : [c]; 4 > d; d++) e[a + La[d] + b] = f[d] || f[d - 2] || f[0];
return e
}
}, kb.test(a) || (na.cssHooks[a + b].set = I)
}), na.fn.extend({
css: function(a, b) {
return Na(this, function(a, b, c) {
var d, e, f = {},
g = 0;
if (na.isArray(b)) {
for (d = ob(a), e = b.length; e > g; g++) f[b[g]] = na.css(a, b[g], !1, d);
return f
}
return void 0 !== c ? na.style(a, b, c) : na.css(a, b)
}, a, b, arguments.length > 1)
},
show: function() {
return H(this, !0)
},
hide: function() {
return H(this)
},
toggle: function(a) {
return "boolean" == typeof a ? a ? this.show() : this.hide() : this.each(function() {
Ma(this) ? na(this).show() : na(this).hide()
})
}
}), na.Tween = L, L.prototype = {
constructor: L,
init: function(a, b, c, d, e, f) {
this.elem = a, this.prop = c, this.easing = e || na.easing._default, this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (na.cssNumber[c] ? "" : "px")
},
cur: function() {
var a = L.propHooks[this.prop];
return a && a.get ? a.get(this) : L.propHooks._default.get(this)
},
run: function(a) {
var b, c = L.propHooks[this.prop];
return this.pos = b = this.options.duration ? na.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : a, this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : L.propHooks._default.set(this), this
}
}, L.prototype.init.prototype = L.prototype, L.propHooks = {
_default: {
get: function(a) {
var b;
return 1 !== a.elem.nodeType || null != a.elem[a.prop] && null == a.elem.style[a.prop] ? a.elem[a.prop] : (b = na.css(a.elem, a.prop, ""), b && "auto" !== b ? b : 0)
},
set: function(a) {
na.fx.step[a.prop] ? na.fx.step[a.prop](a) : 1 !== a.elem.nodeType || null == a.elem.style[na.cssProps[a.prop]] && !na.cssHooks[a.prop] ? a.elem[a.prop] = a.now : na.style(a.elem, a.prop, a.now + a.unit)
}
}
}, L.propHooks.scrollTop = L.propHooks.scrollLeft = {
set: function(a) {
a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now)
}
}, na.easing = {
linear: function(a) {
return a
},
swing: function(a) {
return .5 - Math.cos(a * Math.PI) / 2
},
_default: "swing"
}, na.fx = L.prototype.init, na.fx.step = {};
var zb, Ab, Bb = /^(?:toggle|show|hide)$/,
Cb = /queueHooks$/;
na.Animation = na.extend(R, {
tweeners: {
"*": [function(a, b) {
var c = this.createTween(a, b);
return m(c.elem, a, Ka.exec(b), c), c
}]
},
tweener: function(a, b) {
na.isFunction(a) ? (b = a, a = ["*"]) : a = a.match(Da);
for (var c, d = 0, e = a.length; e > d; d++) c = a[d], R.tweeners[c] = R.tweeners[c] || [], R.tweeners[c].unshift(b)
},
prefilters: [P],
prefilter: function(a, b) {
b ? R.prefilters.unshift(a) : R.prefilters.push(a)
}
}), na.speed = function(a, b, c) {
var d = a && "object" == typeof a ? na.extend({}, a) : {
complete: c || !c && b || na.isFunction(a) && a,
duration: a,
easing: c && b || b && !na.isFunction(b) && b
};
return d.duration = na.fx.off ? 0 : "number" == typeof d.duration ? d.duration : d.duration in na.fx.speeds ? na.fx.speeds[d.duration] : na.fx.speeds._default, (null == d.queue || d.queue === !0) && (d.queue = "fx"), d.old = d.complete, d.complete = function() {
na.isFunction(d.old) && d.old.call(this), d.queue && na.dequeue(this, d.queue)
}, d
}, na.fn.extend({
fadeTo: function(a, b, c, d) {
return this.filter(Ma).css("opacity", 0).show().end().animate({
opacity: b
}, a, c, d)
},
animate: function(a, b, c, d) {
var e = na.isEmptyObject(a),
f = na.speed(b, c, d),
g = function() {
var b = R(this, na.extend({}, a), f);
(e || na._data(this, "finish")) && b.stop(!0)
};
return g.finish = g, e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g)
},
stop: function(a, b, c) {
var d = function(a) {
var b = a.stop;
delete a.stop, b(c)
};
return "string" != typeof a && (c = b, b = a, a = void 0), b && a !== !1 && this.queue(a || "fx", []), this.each(function() {
var b = !0,
e = null != a && a + "queueHooks",
f = na.timers,
g = na._data(this);
if (e) g[e] && g[e].stop && d(g[e]);
else
for (e in g) g[e] && g[e].stop && Cb.test(e) && d(g[e]);
for (e = f.length; e--;) f[e].elem !== this || null != a && f[e].queue !== a || (f[e].anim.stop(c), b = !1, f.splice(e, 1));
(b || !c) && na.dequeue(this, a)
})
},
finish: function(a) {
return a !== !1 && (a = a || "fx"), this.each(function() {
var b, c = na._data(this),
d = c[a + "queue"],
e = c[a + "queueHooks"],
f = na.timers,
g = d ? d.length : 0;
for (c.finish = !0, na.queue(this, a, []), e && e.stop && e.stop.call(this, !0), b = f.length; b--;) f[b].elem === this && f[b].queue === a && (f[b].anim.stop(!0), f.splice(b, 1));
for (b = 0; g > b; b++) d[b] && d[b].finish && d[b].finish.call(this);
delete c.finish
})
}
}), na.each(["toggle", "show", "hide"], function(a, b) {
var c = na.fn[b];
na.fn[b] = function(a, d, e) {
return null == a || "boolean" == typeof a ? c.apply(this, arguments) : this.animate(N(b, !0), a, d, e)
}
}), na.each({
slideDown: N("show"),
slideUp: N("hide"),
slideToggle: N("toggle"),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function(a, b) {
na.fn[a] = function(a, c, d) {
return this.animate(b, a, c, d)
}
}), na.timers = [], na.fx.tick = function() {
var a, b = na.timers,
c = 0;
for (zb = na.now(); c < b.length; c++) a = b[c], a() || b[c] !== a || b.splice(c--, 1);
b.length || na.fx.stop(), zb = void 0
}, na.fx.timer = function(a) {
na.timers.push(a), a() ? na.fx.start() : na.timers.pop()
}, na.fx.interval = 13, na.fx.start = function() {
Ab || (Ab = a.setInterval(na.fx.tick, na.fx.interval))
}, na.fx.stop = function() {
a.clearInterval(Ab), Ab = null
}, na.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
}, na.fn.delay = function(b, c) {
return b = na.fx ? na.fx.speeds[b] || b : b, c = c || "fx", this.queue(c, function(c, d) {
var e = a.setTimeout(c, b);
d.stop = function() {
a.clearTimeout(e)
}
})
},
function() {
var a, b = da.createElement("input"),
c = da.createElement("div"),
d = da.createElement("select"),
e = d.appendChild(da.createElement("option"));
c = da.createElement("div"), c.setAttribute("className", "t"), c.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", a = c.getElementsByTagName("a")[0], b.setAttribute("type", "checkbox"), c.appendChild(b), a = c.getElementsByTagName("a")[0], a.style.cssText = "top:1px", la.getSetAttribute = "t" !== c.className, la.style = /top/.test(a.getAttribute("style")), la.hrefNormalized = "/a" === a.getAttribute("href"), la.checkOn = !!b.value, la.optSelected = e.selected, la.enctype = !!da.createElement("form").enctype, d.disabled = !0, la.optDisabled = !e.disabled, b = da.createElement("input"), b.setAttribute("value", ""), la.input = "" === b.getAttribute("value"), b.value = "t", b.setAttribute("type", "radio"), la.radioValue = "t" === b.value
}();
var Db = /\r/g,
Eb = /[\x20\t\r\n\f]+/g;
na.fn.extend({
val: function(a) {
var b, c, d, e = this[0]; {
if (arguments.length) return d = na.isFunction(a), this.each(function(c) {
var e;
1 === this.nodeType && (e = d ? a.call(this, c, na(this).val()) : a, null == e ? e = "" : "number" == typeof e ? e += "" : na.isArray(e) && (e = na.map(e, function(a) {
return null == a ? "" : a + ""
})), b = na.valHooks[this.type] || na.valHooks[this.nodeName.toLowerCase()], b && "set" in b && void 0 !== b.set(this, e, "value") || (this.value = e))
});
if (e) return b = na.valHooks[e.type] || na.valHooks[e.nodeName.toLowerCase()], b && "get" in b && void 0 !== (c = b.get(e, "value")) ? c : (c = e.value, "string" == typeof c ? c.replace(Db, "") : null == c ? "" : c)
}
}
}), na.extend({
valHooks: {
option: {
get: function(a) {
var b = na.find.attr(a, "value");
return null != b ? b : na.trim(na.text(a)).replace(Eb, " ")
}
},
select: {
get: function(a) {
for (var b, c, d = a.options, e = a.selectedIndex, f = "select-one" === a.type || 0 > e, g = f ? null : [], h = f ? e + 1 : d.length, i = 0 > e ? h : f ? e : 0; h > i; i++)
if (c = d[i], !(!c.selected && i !== e || (la.optDisabled ? c.disabled : null !== c.getAttribute("disabled")) || c.parentNode.disabled && na.nodeName(c.parentNode, "optgroup"))) {
if (b = na(c).val(), f) return b;
g.push(b)
}
return g
},
set: function(a, b) {
for (var c, d, e = a.options, f = na.makeArray(b), g = e.length; g--;)
if (d = e[g], na.inArray(na.valHooks.option.get(d), f) > -1) try {
d.selected = c = !0
} catch (h) {
d.scrollHeight
} else d.selected = !1;
return c || (a.selectedIndex = -1), e
}
}
}
}), na.each(["radio", "checkbox"], function() {
na.valHooks[this] = {
set: function(a, b) {
return na.isArray(b) ? a.checked = na.inArray(na(a).val(), b) > -1 : void 0
}
}, la.checkOn || (na.valHooks[this].get = function(a) {
return null === a.getAttribute("value") ? "on" : a.value
})
});
var Fb, Gb, Hb = na.expr.attrHandle,
Ib = /^(?:checked|selected)$/i,
Jb = la.getSetAttribute,
Kb = la.input;
na.fn.extend({
attr: function(a, b) {
return Na(this, na.attr, a, b, arguments.length > 1)
},
removeAttr: function(a) {
return this.each(function() {
na.removeAttr(this, a)
})
}
}), na.extend({
attr: function(a, b, c) {
var d, e, f = a.nodeType;
if (3 !== f && 8 !== f && 2 !== f) return "undefined" == typeof a.getAttribute ? na.prop(a, b, c) : (1 === f && na.isXMLDoc(a) || (b = b.toLowerCase(), e = na.attrHooks[b] || (na.expr.match.bool.test(b) ? Gb : Fb)), void 0 !== c ? null === c ? void na.removeAttr(a, b) : e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : (a.setAttribute(b, c + ""), c) : e && "get" in e && null !== (d = e.get(a, b)) ? d : (d = na.find.attr(a, b), null == d ? void 0 : d))
},
attrHooks: {
type: {
set: function(a, b) {
if (!la.radioValue && "radio" === b && na.nodeName(a, "input")) {
var c = a.value;
return a.setAttribute("type", b), c && (a.value = c), b
}
}
}
},
removeAttr: function(a, b) {
var c, d, e = 0,
f = b && b.match(Da);
if (f && 1 === a.nodeType)
for (; c = f[e++];) d = na.propFix[c] || c, na.expr.match.bool.test(c) ? Kb && Jb || !Ib.test(c) ? a[d] = !1 : a[na.camelCase("default-" + c)] = a[d] = !1 : na.attr(a, c, ""), a.removeAttribute(Jb ? c : d)
}
}), Gb = {
set: function(a, b, c) {
return b === !1 ? na.removeAttr(a, c) : Kb && Jb || !Ib.test(c) ? a.setAttribute(!Jb && na.propFix[c] || c, c) : a[na.camelCase("default-" + c)] = a[c] = !0, c
}
}, na.each(na.expr.match.bool.source.match(/\w+/g), function(a, b) {
var c = Hb[b] || na.find.attr;
Hb[b] = Kb && Jb || !Ib.test(b) ? function(a, b, d) {
var e, f;
return d || (f = Hb[b], Hb[b] = e, e = null != c(a, b, d) ? b.toLowerCase() : null, Hb[b] = f), e
} : function(a, b, c) {
return c ? void 0 : a[na.camelCase("default-" + b)] ? b.toLowerCase() : null
}
}), Kb && Jb || (na.attrHooks.value = {
set: function(a, b, c) {
return na.nodeName(a, "input") ? void(a.defaultValue = b) : Fb && Fb.set(a, b, c)
}
}), Jb || (Fb = {
set: function(a, b, c) {
var d = a.getAttributeNode(c);
return d || a.setAttributeNode(d = a.ownerDocument.createAttribute(c)), d.value = b += "", "value" === c || b === a.getAttribute(c) ? b : void 0
}
}, Hb.id = Hb.name = Hb.coords = function(a, b, c) {
var d;
return c ? void 0 : (d = a.getAttributeNode(b)) && "" !== d.value ? d.value : null
}, na.valHooks.button = {
get: function(a, b) {
var c = a.getAttributeNode(b);
return c && c.specified ? c.value : void 0
},
set: Fb.set
}, na.attrHooks.contenteditable = {
set: function(a, b, c) {
Fb.set(a, "" === b ? !1 : b, c)
}
}, na.each(["width", "height"], function(a, b) {
na.attrHooks[b] = {
set: function(a, c) {
return "" === c ? (a.setAttribute(b, "auto"), c) : void 0
}
}
})), la.style || (na.attrHooks.style = {
get: function(a) {
return a.style.cssText || void 0
},
set: function(a, b) {
return a.style.cssText = b + ""
}
});
var Lb = /^(?:input|select|textarea|button|object)$/i,
Mb = /^(?:a|area)$/i;
na.fn.extend({
prop: function(a, b) {
return Na(this, na.prop, a, b, arguments.length > 1)
},
removeProp: function(a) {
return a = na.propFix[a] || a, this.each(function() {
try {
this[a] = void 0, delete this[a]
} catch (b) {}
})
}
}), na.extend({
prop: function(a, b, c) {
var d, e, f = a.nodeType;
if (3 !== f && 8 !== f && 2 !== f) return 1 === f && na.isXMLDoc(a) || (b = na.propFix[b] || b, e = na.propHooks[b]), void 0 !== c ? e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : a[b] = c : e && "get" in e && null !== (d = e.get(a, b)) ? d : a[b]
},
propHooks: {
tabIndex: {
get: function(a) {
var b = na.find.attr(a, "tabindex");
return b ? parseInt(b, 10) : Lb.test(a.nodeName) || Mb.test(a.nodeName) && a.href ? 0 : -1
}
}
},
propFix: {
"for": "htmlFor",
"class": "className"
}
}), la.hrefNormalized || na.each(["href", "src"], function(a, b) {
na.propHooks[b] = {
get: function(a) {
return a.getAttribute(b, 4)
}
}
}), la.optSelected || (na.propHooks.selected = {
get: function(a) {
var b = a.parentNode;
return b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex), null
},
set: function(a) {
var b = a.parentNode;
b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex)
}
}), na.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
na.propFix[this.toLowerCase()] = this
}), la.enctype || (na.propFix.enctype = "encoding");
var Nb = /[\t\r\n\f]/g;
na.fn.extend({
addClass: function(a) {
var b, c, d, e, f, g, h, i = 0;
if (na.isFunction(a)) return this.each(function(b) {
na(this).addClass(a.call(this, b, S(this)))
});
if ("string" == typeof a && a)
for (b = a.match(Da) || []; c = this[i++];)
if (e = S(c), d = 1 === c.nodeType && (" " + e + " ").replace(Nb, " ")) {
for (g = 0; f = b[g++];) d.indexOf(" " + f + " ") < 0 && (d += f + " ");
h = na.trim(d), e !== h && na.attr(c, "class", h)
}
return this
},
removeClass: function(a) {
var b, c, d, e, f, g, h, i = 0;
if (na.isFunction(a)) return this.each(function(b) {
na(this).removeClass(a.call(this, b, S(this)))
});
if (!arguments.length) return this.attr("class", "");
if ("string" == typeof a && a)
for (b = a.match(Da) || []; c = this[i++];)
if (e = S(c), d = 1 === c.nodeType && (" " + e + " ").replace(Nb, " ")) {
for (g = 0; f = b[g++];)
for (; d.indexOf(" " + f + " ") > -1;) d = d.replace(" " + f + " ", " ");
h = na.trim(d), e !== h && na.attr(c, "class", h)
}
return this
},
toggleClass: function(a, b) {
var c = typeof a;
return "boolean" == typeof b && "string" === c ? b ? this.addClass(a) : this.removeClass(a) : this.each(na.isFunction(a) ? function(c) {
na(this).toggleClass(a.call(this, c, S(this), b), b)
} : function() {
var b, d, e, f;
if ("string" === c)
for (d = 0, e = na(this), f = a.match(Da) || []; b = f[d++];) e.hasClass(b) ? e.removeClass(b) : e.addClass(b);
else(void 0 === a || "boolean" === c) && (b = S(this), b && na._data(this, "__className__", b), na.attr(this, "class", b || a === !1 ? "" : na._data(this, "__className__") || ""))
})
},
hasClass: function(a) {
var b, c, d = 0;
for (b = " " + a + " "; c = this[d++];)
if (1 === c.nodeType && (" " + S(c) + " ").replace(Nb, " ").indexOf(b) > -1) return !0;
return !1
}
}), na.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(a, b) {
na.fn[b] = function(a, c) {
return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b)
}
}), na.fn.extend({
hover: function(a, b) {
return this.mouseenter(a).mouseleave(b || a)
}
});
var Ob = a.location,
Pb = na.now(),
Qb = /\?/,
Rb = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
na.parseJSON = function(b) {
if (a.JSON && a.JSON.parse) return a.JSON.parse(b + "");
var c, d = null,
e = na.trim(b + "");
return e && !na.trim(e.replace(Rb, function(a, b, e, f) {
return c && b && (d = 0), 0 === d ? a : (c = e || b, d += !f - !e, "")
})) ? Function("return " + e)() : na.error("Invalid JSON: " + b)
}, na.parseXML = function(b) {
var c, d;
if (!b || "string" != typeof b) return null;
try {
a.DOMParser ? (d = new a.DOMParser, c = d.parseFromString(b, "text/xml")) : (c = new a.ActiveXObject("Microsoft.XMLDOM"), c.async = "false", c.loadXML(b))
} catch (e) {
c = void 0
}
return c && c.documentElement && !c.getElementsByTagName("parsererror").length || na.error("Invalid XML: " + b), c
};
var Sb = /#.*$/,
Tb = /([?&])_=[^&]*/,
Ub = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
Vb = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
Wb = /^(?:GET|HEAD)$/,
Xb = /^\/\//,
Yb = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
Zb = {},
$b = {},
_b = "*/".concat("*"),
ac = Ob.href,
bc = Yb.exec(ac.toLowerCase()) || [];
na.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: ac,
type: "GET",
isLocal: Vb.test(bc[1]),
global: !0,
processData: !0,
async: !0,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": _b,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /\bxml\b/,
html: /\bhtml/,
json: /\bjson\b/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
converters: {
"* text": String,
"text html": !0,
"text json": na.parseJSON,
"text xml": na.parseXML
},
flatOptions: {
url: !0,
context: !0
}
},
ajaxSetup: function(a, b) {
return b ? V(V(a, na.ajaxSettings), b) : V(na.ajaxSettings, a)
},
ajaxPrefilter: T(Zb),
ajaxTransport: T($b),
ajax: function(b, c) {
function d(b, c, d, e) {
var f, l, s, t, v, x = c;
2 !== u && (u = 2, i && a.clearTimeout(i), k = void 0, h = e || "", w.readyState = b > 0 ? 4 : 0, f = b >= 200 && 300 > b || 304 === b, d && (t = W(m, w, d)), t = X(m, t, w, f), f ? (m.ifModified && (v = w.getResponseHeader("Last-Modified"), v && (na.lastModified[g] = v), v = w.getResponseHeader("etag"), v && (na.etag[g] = v)), 204 === b || "HEAD" === m.type ? x = "nocontent" : 304 === b ? x = "notmodified" : (x = t.state, l = t.data, s = t.error, f = !s)) : (s = x, (b || !x) && (x = "error", 0 > b && (b = 0))), w.status = b, w.statusText = (c || x) + "", f ? p.resolveWith(n, [l, x, w]) : p.rejectWith(n, [w, x, s]), w.statusCode(r), r = void 0, j && o.trigger(f ? "ajaxSuccess" : "ajaxError", [w, m, f ? l : s]), q.fireWith(n, [w, x]), j && (o.trigger("ajaxComplete", [w, m]), --na.active || na.event.trigger("ajaxStop")))
}
"object" == typeof b && (c = b, b = void 0), c = c || {};
var e, f, g, h, i, j, k, l, m = na.ajaxSetup({}, c),
n = m.context || m,
o = m.context && (n.nodeType || n.jquery) ? na(n) : na.event,
p = na.Deferred(),
q = na.Callbacks("once memory"),
r = m.statusCode || {},
s = {},
t = {},
u = 0,
v = "canceled",
w = {
readyState: 0,
getResponseHeader: function(a) {
var b;
if (2 === u) {
if (!l)
for (l = {}; b = Ub.exec(h);) l[b[1].toLowerCase()] = b[2];
b = l[a.toLowerCase()]
}
return null == b ? null : b
},
getAllResponseHeaders: function() {
return 2 === u ? h : null
},
setRequestHeader: function(a, b) {
var c = a.toLowerCase();
return u || (a = t[c] = t[c] || a, s[a] = b), this
},
overrideMimeType: function(a) {
return u || (m.mimeType = a), this
},
statusCode: function(a) {
var b;
if (a)
if (2 > u)
for (b in a) r[b] = [r[b], a[b]];
else w.always(a[w.status]);
return this
},
abort: function(a) {
var b = a || v;
return k && k.abort(b), d(0, b), this
}
};
if (p.promise(w).complete = q.add, w.success = w.done, w.error = w.fail, m.url = ((b || m.url || ac) + "").replace(Sb, "").replace(Xb, bc[1] + "//"), m.type = c.method || c.type || m.method || m.type, m.dataTypes = na.trim(m.dataType || "*").toLowerCase().match(Da) || [""], null == m.crossDomain && (e = Yb.exec(m.url.toLowerCase()), m.crossDomain = !(!e || e[1] === bc[1] && e[2] === bc[2] && (e[3] || ("http:" === e[1] ? "80" : "443")) === (bc[3] || ("http:" === bc[1] ? "80" : "443")))), m.data && m.processData && "string" != typeof m.data && (m.data = na.param(m.data, m.traditional)), U(Zb, m, c, w), 2 === u) return w;
j = na.event && m.global, j && 0 === na.active++ && na.event.trigger("ajaxStart"), m.type = m.type.toUpperCase(), m.hasContent = !Wb.test(m.type), g = m.url, m.hasContent || (m.data && (g = m.url += (Qb.test(g) ? "&" : "?") + m.data, delete m.data), m.cache === !1 && (m.url = Tb.test(g) ? g.replace(Tb, "$1_=" + Pb++) : g + (Qb.test(g) ? "&" : "?") + "_=" + Pb++)), m.ifModified && (na.lastModified[g] && w.setRequestHeader("If-Modified-Since", na.lastModified[g]), na.etag[g] && w.setRequestHeader("If-None-Match", na.etag[g])), (m.data && m.hasContent && m.contentType !== !1 || c.contentType) && w.setRequestHeader("Content-Type", m.contentType), w.setRequestHeader("Accept", m.dataTypes[0] && m.accepts[m.dataTypes[0]] ? m.accepts[m.dataTypes[0]] + ("*" !== m.dataTypes[0] ? ", " + _b + "; q=0.01" : "") : m.accepts["*"]);
for (f in m.headers) w.setRequestHeader(f, m.headers[f]);
if (m.beforeSend && (m.beforeSend.call(n, w, m) === !1 || 2 === u)) return w.abort();
v = "abort";
for (f in {
success: 1,
error: 1,
complete: 1
}) w[f](m[f]);
if (k = U($b, m, c, w)) {
if (w.readyState = 1, j && o.trigger("ajaxSend", [w, m]), 2 === u) return w;
m.async && m.timeout > 0 && (i = a.setTimeout(function() {
w.abort("timeout")
}, m.timeout));
try {
u = 1, k.send(s, d)
} catch (x) {
if (!(2 > u)) throw x;
d(-1, x)
}
} else d(-1, "No Transport");
return w
},
getJSON: function(a, b, c) {
return na.get(a, b, c, "json")
},
getScript: function(a, b) {
return na.get(a, void 0, b, "script")
}
}), na.each(["get", "post"], function(a, b) {
na[b] = function(a, c, d, e) {
return na.isFunction(c) && (e = e || d, d = c, c = void 0), na.ajax(na.extend({
url: a,
type: b,
dataType: e,
data: c,
success: d
}, na.isPlainObject(a) && a))
}
}), na._evalUrl = function(a) {
return na.ajax({
url: a,
type: "GET",
dataType: "script",
cache: !0,
async: !1,
global: !1,
"throws": !0
})
}, na.fn.extend({
wrapAll: function(a) {
if (na.isFunction(a)) return this.each(function(b) {
na(this).wrapAll(a.call(this, b))
});
if (this[0]) {
var b = na(a, this[0].ownerDocument).eq(0).clone(!0);
this[0].parentNode && b.insertBefore(this[0]), b.map(function() {
for (var a = this; a.firstChild && 1 === a.firstChild.nodeType;) a = a.firstChild;
return a
}).append(this)
}
return this
},
wrapInner: function(a) {
return this.each(na.isFunction(a) ? function(b) {
na(this).wrapInner(a.call(this, b))
} : function() {
var b = na(this),
c = b.contents();
c.length ? c.wrapAll(a) : b.append(a)
})
},
wrap: function(a) {
var b = na.isFunction(a);
return this.each(function(c) {
na(this).wrapAll(b ? a.call(this, c) : a)
})
},
unwrap: function() {
return this.parent().each(function() {
na.nodeName(this, "body") || na(this).replaceWith(this.childNodes)
}).end()
}
}), na.expr.filters.hidden = function(a) {
return la.reliableHiddenOffsets() ? a.offsetWidth <= 0 && a.offsetHeight <= 0 && !a.getClientRects().length : Z(a)
}, na.expr.filters.visible = function(a) {
return !na.expr.filters.hidden(a)
};
var cc = /%20/g,
dc = /\[\]$/,
ec = /\r?\n/g,
fc = /^(?:submit|button|image|reset|file)$/i,
gc = /^(?:input|select|textarea|keygen)/i;
na.param = function(a, b) {
var c, d = [],
e = function(a, b) {
b = na.isFunction(b) ? b() : null == b ? "" : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
};
if (void 0 === b && (b = na.ajaxSettings && na.ajaxSettings.traditional), na.isArray(a) || a.jquery && !na.isPlainObject(a)) na.each(a, function() {
e(this.name, this.value)
});
else
for (c in a) $(c, a[c], b, e);
return d.join("&").replace(cc, "+")
}, na.fn.extend({
serialize: function() {
return na.param(this.serializeArray())
},
serializeArray: function() {
return this.map(function() {
var a = na.prop(this, "elements");
return a ? na.makeArray(a) : this
}).filter(function() {
var a = this.type;
return this.name && !na(this).is(":disabled") && gc.test(this.nodeName) && !fc.test(a) && (this.checked || !Oa.test(a))
}).map(function(a, b) {
var c = na(this).val();
return null == c ? null : na.isArray(c) ? na.map(c, function(a) {
return {
name: b.name,
value: a.replace(ec, "\r\n")
}
}) : {
name: b.name,
value: c.replace(ec, "\r\n")
}
}).get()
}
}), na.ajaxSettings.xhr = void 0 !== a.ActiveXObject ? function() {
return this.isLocal ? aa() : da.documentMode > 8 ? _() : /^(get|post|head|put|delete|options)$/i.test(this.type) && _() || aa()
} : _;
var hc = 0,
ic = {},
jc = na.ajaxSettings.xhr();
a.attachEvent && a.attachEvent("onunload", function() {
for (var a in ic) ic[a](void 0, !0)
}), la.cors = !!jc && "withCredentials" in jc, jc = la.ajax = !!jc, jc && na.ajaxTransport(function(b) {
if (!b.crossDomain || la.cors) {
var c;
return {
send: function(d, e) {
var f, g = b.xhr(),
h = ++hc;
if (g.open(b.type, b.url, b.async, b.username, b.password), b.xhrFields)
for (f in b.xhrFields) g[f] = b.xhrFields[f];
b.mimeType && g.overrideMimeType && g.overrideMimeType(b.mimeType), b.crossDomain || d["X-Requested-With"] || (d["X-Requested-With"] = "XMLHttpRequest");
for (f in d) void 0 !== d[f] && g.setRequestHeader(f, d[f] + "");
g.send(b.hasContent && b.data || null), c = function(a, d) {
var f, i, j;
if (c && (d || 4 === g.readyState))
if (delete ic[h], c = void 0, g.onreadystatechange = na.noop, d) 4 !== g.readyState && g.abort();
else {
j = {}, f = g.status, "string" == typeof g.responseText && (j.text = g.responseText);
try {
i = g.statusText
} catch (k) {
i = ""
}
f || !b.isLocal || b.crossDomain ? 1223 === f && (f = 204) : f = j.text ? 200 : 404
}
j && e(f, i, j, g.getAllResponseHeaders())
}, b.async ? 4 === g.readyState ? a.setTimeout(c) : g.onreadystatechange = ic[h] = c : c()
},
abort: function() {
c && c(void 0, !0)
}
}
}
}), na.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /\b(?:java|ecma)script\b/
},
converters: {
"text script": function(a) {
return na.globalEval(a), a
}
}
}), na.ajaxPrefilter("script", function(a) {
void 0 === a.cache && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)
}), na.ajaxTransport("script", function(a) {
if (a.crossDomain) {
var b, c = da.head || na("head")[0] || da.documentElement;
return {
send: function(d, e) {
b = da.createElement("script"), b.async = !0, a.scriptCharset && (b.charset = a.scriptCharset), b.src = a.url, b.onload = b.onreadystatechange = function(a, c) {
(c || !b.readyState || /loaded|complete/.test(b.readyState)) && (b.onload = b.onreadystatechange = null, b.parentNode && b.parentNode.removeChild(b), b = null, c || e(200, "success"))
}, c.insertBefore(b, c.firstChild)
},
abort: function() {
b && b.onload(void 0, !0)
}
}
}
});
var kc = [],
lc = /(=)\?(?=&|$)|\?\?/;
na.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var a = kc.pop() || na.expando + "_" + Pb++;
return this[a] = !0, a
}
}), na.ajaxPrefilter("json jsonp", function(b, c, d) {
var e, f, g, h = b.jsonp !== !1 && (lc.test(b.url) ? "url" : "string" == typeof b.data && 0 === (b.contentType || "").indexOf("application/x-www-form-urlencoded") && lc.test(b.data) && "data");
return h || "jsonp" === b.dataTypes[0] ? (e = b.jsonpCallback = na.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, h ? b[h] = b[h].replace(lc, "$1" + e) : b.jsonp !== !1 && (b.url += (Qb.test(b.url) ? "&" : "?") + b.jsonp + "=" + e), b.converters["script json"] = function() {
return g || na.error(e + " was not called"), g[0]
}, b.dataTypes[0] = "json", f = a[e], a[e] = function() {
g = arguments
}, d.always(function() {
void 0 === f ? na(a).removeProp(e) : a[e] = f, b[e] && (b.jsonpCallback = c.jsonpCallback, kc.push(e)), g && na.isFunction(f) && f(g[0]), g = f = void 0
}), "script") : void 0
}), na.parseHTML = function(a, b, c) {
if (!a || "string" != typeof a) return null;
"boolean" == typeof b && (c = b, b = !1), b = b || da;
var d = wa.exec(a),
e = !c && [];
return d ? [b.createElement(d[1])] : (d = r([a], b, e), e && e.length && na(e).remove(), na.merge([], d.childNodes))
};
var mc = na.fn.load;
na.fn.load = function(a, b, c) {
if ("string" != typeof a && mc) return mc.apply(this, arguments);
var d, e, f, g = this,
h = a.indexOf(" ");
return h > -1 && (d = na.trim(a.slice(h, a.length)), a = a.slice(0, h)), na.isFunction(b) ? (c = b, b = void 0) : b && "object" == typeof b && (e = "POST"), g.length > 0 && na.ajax({
url: a,
type: e || "GET",
dataType: "html",
data: b
}).done(function(a) {
f = arguments, g.html(d ? na("<div>").append(na.parseHTML(a)).find(d) : a)
}).always(c && function(a, b) {
g.each(function() {
c.apply(this, f || [a.responseText, b, a])
})
}), this
}, na.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(a, b) {
na.fn[b] = function(a) {
return this.on(b, a)
}
}), na.expr.filters.animated = function(a) {
return na.grep(na.timers, function(b) {
return a === b.elem
}).length
}, na.offset = {
setOffset: function(a, b, c) {
var d, e, f, g, h, i, j, k = na.css(a, "position"),
l = na(a),
m = {};
"static" === k && (a.style.position = "relative"), h = l.offset(), f = na.css(a, "top"), i = na.css(a, "left"), j = ("absolute" === k || "fixed" === k) && na.inArray("auto", [f, i]) > -1, j ? (d = l.position(), g = d.top, e = d.left) : (g = parseFloat(f) || 0, e = parseFloat(i) || 0), na.isFunction(b) && (b = b.call(a, c, na.extend({}, h))), null != b.top && (m.top = b.top - h.top + g), null != b.left && (m.left = b.left - h.left + e), "using" in b ? b.using.call(a, m) : l.css(m)
}
}, na.fn.extend({
offset: function(a) {
if (arguments.length) return void 0 === a ? this : this.each(function(b) {
na.offset.setOffset(this, a, b)
});
var b, c, d = {
top: 0,
left: 0
},
e = this[0],
f = e && e.ownerDocument;
if (f) return b = f.documentElement, na.contains(b, e) ? ("undefined" != typeof e.getBoundingClientRect && (d = e.getBoundingClientRect()), c = ba(f), {
top: d.top + (c.pageYOffset || b.scrollTop) - (b.clientTop || 0),
left: d.left + (c.pageXOffset || b.scrollLeft) - (b.clientLeft || 0)
}) : d
},
position: function() {
if (this[0]) {
var a, b, c = {
top: 0,
left: 0
},
d = this[0];
return "fixed" === na.css(d, "position") ? b = d.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), na.nodeName(a[0], "html") || (c = a.offset()), c.top += na.css(a[0], "borderTopWidth", !0),
c.left += na.css(a[0], "borderLeftWidth", !0)), {
top: b.top - c.top - na.css(d, "marginTop", !0),
left: b.left - c.left - na.css(d, "marginLeft", !0)
}
}
},
offsetParent: function() {
return this.map(function() {
for (var a = this.offsetParent; a && !na.nodeName(a, "html") && "static" === na.css(a, "position");) a = a.offsetParent;
return a || nb
})
}
}), na.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"
}, function(a, b) {
var c = /Y/.test(b);
na.fn[a] = function(d) {
return Na(this, function(a, d, e) {
var f = ba(a);
return void 0 === e ? f ? b in f ? f[b] : f.document.documentElement[d] : a[d] : void(f ? f.scrollTo(c ? na(f).scrollLeft() : e, c ? e : na(f).scrollTop()) : a[d] = e)
}, a, d, arguments.length, null)
}
}), na.each(["top", "left"], function(a, b) {
na.cssHooks[b] = F(la.pixelPosition, function(a, c) {
return c ? (c = pb(a, b), lb.test(c) ? na(a).position()[b] + "px" : c) : void 0
})
}), na.each({
Height: "height",
Width: "width"
}, function(a, b) {
na.each({
padding: "inner" + a,
content: b,
"": "outer" + a
}, function(c, d) {
na.fn[d] = function(d, e) {
var f = arguments.length && (c || "boolean" != typeof d),
g = c || (d === !0 || e === !0 ? "margin" : "border");
return Na(this, function(b, c, d) {
var e;
return na.isWindow(b) ? b.document.documentElement["client" + a] : 9 === b.nodeType ? (e = b.documentElement, Math.max(b.body["scroll" + a], e["scroll" + a], b.body["offset" + a], e["offset" + a], e["client" + a])) : void 0 === d ? na.css(b, c, g) : na.style(b, c, d, g)
}, b, f ? d : void 0, f, null)
}
})
}), na.fn.extend({
bind: function(a, b, c) {
return this.on(a, null, b, c)
},
unbind: function(a, b) {
return this.off(a, null, b)
},
delegate: function(a, b, c, d) {
return this.on(b, a, c, d)
},
undelegate: function(a, b, c) {
return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c)
}
}), na.fn.size = function() {
return this.length
}, na.fn.andSelf = na.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function() {
return na
});
var nc = a.jQuery,
oc = a.$;
return na.noConflict = function(b) {
return a.$ === na && (a.$ = oc), b && a.jQuery === na && (a.jQuery = nc), na
}, b || (a.jQuery = a.$ = na), na
}), function(a, b) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define(b) : a.moment = b()
}(this, function() {
"use strict";
function a() {
return md.apply(null, arguments)
}
function b(a) {
md = a
}
function c(a) {
return a instanceof Array || "[object Array]" === Object.prototype.toString.call(a)
}
function d(a) {
return "[object Object]" === Object.prototype.toString.call(a)
}
function e(a) {
var b;
for (b in a) return !1;
return !0
}
function f(a) {
return a instanceof Date || "[object Date]" === Object.prototype.toString.call(a)
}
function g(a, b) {
var c, d = [];
for (c = 0; c < a.length; ++c) d.push(b(a[c], c));
return d
}
function h(a, b) {
return Object.prototype.hasOwnProperty.call(a, b)
}
function i(a, b) {
for (var c in b) h(b, c) && (a[c] = b[c]);
return h(b, "toString") && (a.toString = b.toString), h(b, "valueOf") && (a.valueOf = b.valueOf), a
}
function j(a, b, c, d) {
return qb(a, b, c, d, !0).utc()
}
function k() {
return {
empty: !1,
unusedTokens: [],
unusedInput: [],
overflow: -2,
charsLeftOver: 0,
nullInput: !1,
invalidMonth: null,
invalidFormat: !1,
userInvalidated: !1,
iso: !1,
parsedDateParts: [],
meridiem: null
}
}
function l(a) {
return null == a._pf && (a._pf = k()), a._pf
}
function m(a) {
if (null == a._isValid) {
var b = l(a),
c = nd.call(b.parsedDateParts, function(a) {
return null != a
});
a._isValid = !isNaN(a._d.getTime()) && b.overflow < 0 && !b.empty && !b.invalidMonth && !b.invalidWeekday && !b.nullInput && !b.invalidFormat && !b.userInvalidated && (!b.meridiem || b.meridiem && c), a._strict && (a._isValid = a._isValid && 0 === b.charsLeftOver && 0 === b.unusedTokens.length && void 0 === b.bigHour)
}
return a._isValid
}
function n(a) {
var b = j(0 / 0);
return null != a ? i(l(b), a) : l(b).userInvalidated = !0, b
}
function o(a) {
return void 0 === a
}
function p(a, b) {
var c, d, e;
if (o(b._isAMomentObject) || (a._isAMomentObject = b._isAMomentObject), o(b._i) || (a._i = b._i), o(b._f) || (a._f = b._f), o(b._l) || (a._l = b._l), o(b._strict) || (a._strict = b._strict), o(b._tzm) || (a._tzm = b._tzm), o(b._isUTC) || (a._isUTC = b._isUTC), o(b._offset) || (a._offset = b._offset), o(b._pf) || (a._pf = l(b)), o(b._locale) || (a._locale = b._locale), od.length > 0)
for (c in od) d = od[c], e = b[d], o(e) || (a[d] = e);
return a
}
function q(b) {
p(this, b), this._d = new Date(null != b._d ? b._d.getTime() : 0 / 0), pd === !1 && (pd = !0, a.updateOffset(this), pd = !1)
}
function r(a) {
return a instanceof q || null != a && null != a._isAMomentObject
}
function s(a) {
return 0 > a ? Math.ceil(a) || 0 : Math.floor(a)
}
function t(a) {
var b = +a,
c = 0;
return 0 !== b && isFinite(b) && (c = s(b)), c
}
function u(a, b, c) {
var d, e = Math.min(a.length, b.length),
f = Math.abs(a.length - b.length),
g = 0;
for (d = 0; e > d; d++)(c && a[d] !== b[d] || !c && t(a[d]) !== t(b[d])) && g++;
return g + f
}
function v(b) {
a.suppressDeprecationWarnings === !1 && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + b)
}
function w(b, c) {
var d = !0;
return i(function() {
return null != a.deprecationHandler && a.deprecationHandler(null, b), d && (v(b + "\nArguments: " + Array.prototype.slice.call(arguments).join(", ") + "\n" + (new Error).stack), d = !1), c.apply(this, arguments)
}, c)
}
function x(b, c) {
null != a.deprecationHandler && a.deprecationHandler(b, c), qd[b] || (v(c), qd[b] = !0)
}
function y(a) {
return a instanceof Function || "[object Function]" === Object.prototype.toString.call(a)
}
function z(a) {
var b, c;
for (c in a) b = a[c], y(b) ? this[c] = b : this["_" + c] = b;
this._config = a, this._ordinalParseLenient = new RegExp(this._ordinalParse.source + "|" + /\d{1,2}/.source)
}
function A(a, b) {
var c, e = i({}, a);
for (c in b) h(b, c) && (d(a[c]) && d(b[c]) ? (e[c] = {}, i(e[c], a[c]), i(e[c], b[c])) : null != b[c] ? e[c] = b[c] : delete e[c]);
for (c in a) h(a, c) && !h(b, c) && d(a[c]) && (e[c] = i({}, e[c]));
return e
}
function B(a) {
null != a && this.set(a)
}
function C(a, b, c) {
var d = this._calendar[a] || this._calendar.sameElse;
return y(d) ? d.call(b, c) : d
}
function D(a) {
var b = this._longDateFormat[a],
c = this._longDateFormat[a.toUpperCase()];
return b || !c ? b : (this._longDateFormat[a] = c.replace(/MMMM|MM|DD|dddd/g, function(a) {
return a.slice(1)
}), this._longDateFormat[a])
}
function E() {
return this._invalidDate
}
function F(a) {
return this._ordinal.replace("%d", a)
}
function G(a, b, c, d) {
var e = this._relativeTime[c];
return y(e) ? e(a, b, c, d) : e.replace(/%d/i, a)
}
function H(a, b) {
var c = this._relativeTime[a > 0 ? "future" : "past"];
return y(c) ? c(b) : c.replace(/%s/i, b)
}
function I(a, b) {
var c = a.toLowerCase();
zd[c] = zd[c + "s"] = zd[b] = a
}
function J(a) {
return "string" == typeof a ? zd[a] || zd[a.toLowerCase()] : void 0
}
function K(a) {
var b, c, d = {};
for (c in a) h(a, c) && (b = J(c), b && (d[b] = a[c]));
return d
}
function L(a, b) {
Ad[a] = b
}
function M(a) {
var b = [];
for (var c in a) b.push({
unit: c,
priority: Ad[c]
});
return b.sort(function(a, b) {
return a.priority - b.priority
}), b
}
function N(b, c) {
return function(d) {
return null != d ? (P(this, b, d), a.updateOffset(this, c), this) : O(this, b)
}
}
function O(a, b) {
return a.isValid() ? a._d["get" + (a._isUTC ? "UTC" : "") + b]() : 0 / 0
}
function P(a, b, c) {
a.isValid() && a._d["set" + (a._isUTC ? "UTC" : "") + b](c)
}
function Q(a) {
return a = J(a), y(this[a]) ? this[a]() : this
}
function R(a, b) {
if ("object" == typeof a) {
a = K(a);
for (var c = M(a), d = 0; d < c.length; d++) this[c[d].unit](a[c[d].unit])
} else if (a = J(a), y(this[a])) return this[a](b);
return this
}
function S(a, b, c) {
var d = "" + Math.abs(a),
e = b - d.length,
f = a >= 0;
return (f ? c ? "+" : "" : "-") + Math.pow(10, Math.max(0, e)).toString().substr(1) + d
}
function T(a, b, c, d) {
var e = d;
"string" == typeof d && (e = function() {
return this[d]()
}), a && (Ed[a] = e), b && (Ed[b[0]] = function() {
return S(e.apply(this, arguments), b[1], b[2])
}), c && (Ed[c] = function() {
return this.localeData().ordinal(e.apply(this, arguments), a)
})
}
function U(a) {
return a.match(/\[[\s\S]/) ? a.replace(/^\[|\]$/g, "") : a.replace(/\\/g, "")
}
function V(a) {
var b, c, d = a.match(Bd);
for (b = 0, c = d.length; c > b; b++) d[b] = Ed[d[b]] ? Ed[d[b]] : U(d[b]);
return function(b) {
var e, f = "";
for (e = 0; c > e; e++) f += d[e] instanceof Function ? d[e].call(b, a) : d[e];
return f
}
}
function W(a, b) {
return a.isValid() ? (b = X(b, a.localeData()), Dd[b] = Dd[b] || V(b), Dd[b](a)) : a.localeData().invalidDate()
}
function X(a, b) {
function c(a) {
return b.longDateFormat(a) || a
}
var d = 5;
for (Cd.lastIndex = 0; d >= 0 && Cd.test(a);) a = a.replace(Cd, c), Cd.lastIndex = 0, d -= 1;
return a
}
function Y(a, b, c) {
Wd[a] = y(b) ? b : function(a) {
return a && c ? c : b
}
}
function Z(a, b) {
return h(Wd, a) ? Wd[a](b._strict, b._locale) : new RegExp($(a))
}
function $(a) {
return _(a.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(a, b, c, d, e) {
return b || c || d || e
}))
}
function _(a) {
return a.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
}
function aa(a, b) {
var c, d = b;
for ("string" == typeof a && (a = [a]), "number" == typeof b && (d = function(a, c) {
c[b] = t(a)
}), c = 0; c < a.length; c++) Xd[a[c]] = d
}
function ba(a, b) {
aa(a, function(a, c, d, e) {
d._w = d._w || {}, b(a, d._w, d, e)
})
}
function ca(a, b, c) {
null != b && h(Xd, a) && Xd[a](b, c._a, c, a)
}
function da(a, b) {
return new Date(Date.UTC(a, b + 1, 0)).getUTCDate()
}
function ea(a, b) {
return c(this._months) ? this._months[a.month()] : this._months[(this._months.isFormat || fe).test(b) ? "format" : "standalone"][a.month()]
}
function fa(a, b) {
return c(this._monthsShort) ? this._monthsShort[a.month()] : this._monthsShort[fe.test(b) ? "format" : "standalone"][a.month()]
}
function ga(a, b, c) {
var d, e, f, g = a.toLocaleLowerCase();
if (!this._monthsParse)
for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], d = 0; 12 > d; ++d) f = j([2e3, d]), this._shortMonthsParse[d] = this.monthsShort(f, "").toLocaleLowerCase(), this._longMonthsParse[d] = this.months(f, "").toLocaleLowerCase();
return c ? "MMM" === b ? (e = sd.call(this._shortMonthsParse, g), -1 !== e ? e : null) : (e = sd.call(this._longMonthsParse, g), -1 !== e ? e : null) : "MMM" === b ? (e = sd.call(this._shortMonthsParse, g), -1 !== e ? e : (e = sd.call(this._longMonthsParse, g), -1 !== e ? e : null)) : (e = sd.call(this._longMonthsParse, g), -1 !== e ? e : (e = sd.call(this._shortMonthsParse, g), -1 !== e ? e : null))
}
function ha(a, b, c) {
var d, e, f;
if (this._monthsParseExact) return ga.call(this, a, b, c);
for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), d = 0; 12 > d; d++) {
if (e = j([2e3, d]), c && !this._longMonthsParse[d] && (this._longMonthsParse[d] = new RegExp("^" + this.months(e, "").replace(".", "") + "$", "i"), this._shortMonthsParse[d] = new RegExp("^" + this.monthsShort(e, "").replace(".", "") + "$", "i")), c || this._monthsParse[d] || (f = "^" + this.months(e, "") + "|^" + this.monthsShort(e, ""), this._monthsParse[d] = new RegExp(f.replace(".", ""), "i")), c && "MMMM" === b && this._longMonthsParse[d].test(a)) return d;
if (c && "MMM" === b && this._shortMonthsParse[d].test(a)) return d;
if (!c && this._monthsParse[d].test(a)) return d
}
}
function ia(a, b) {
var c;
if (!a.isValid()) return a;
if ("string" == typeof b)
if (/^\d+$/.test(b)) b = t(b);
else if (b = a.localeData().monthsParse(b), "number" != typeof b) return a;
return c = Math.min(a.date(), da(a.year(), b)), a._d["set" + (a._isUTC ? "UTC" : "") + "Month"](b, c), a
}
function ja(b) {
return null != b ? (ia(this, b), a.updateOffset(this, !0), this) : O(this, "Month")
}
function ka() {
return da(this.year(), this.month())
}
function la(a) {
return this._monthsParseExact ? (h(this, "_monthsRegex") || na.call(this), a ? this._monthsShortStrictRegex : this._monthsShortRegex) : (h(this, "_monthsShortRegex") || (this._monthsShortRegex = ie), this._monthsShortStrictRegex && a ? this._monthsShortStrictRegex : this._monthsShortRegex)
}
function ma(a) {
return this._monthsParseExact ? (h(this, "_monthsRegex") || na.call(this), a ? this._monthsStrictRegex : this._monthsRegex) : (h(this, "_monthsRegex") || (this._monthsRegex = je), this._monthsStrictRegex && a ? this._monthsStrictRegex : this._monthsRegex)
}
function na() {
function a(a, b) {
return b.length - a.length
}
var b, c, d = [],
e = [],
f = [];
for (b = 0; 12 > b; b++) c = j([2e3, b]), d.push(this.monthsShort(c, "")), e.push(this.months(c, "")), f.push(this.months(c, "")), f.push(this.monthsShort(c, ""));
for (d.sort(a), e.sort(a), f.sort(a), b = 0; 12 > b; b++) d[b] = _(d[b]), e[b] = _(e[b]);
for (b = 0; 24 > b; b++) f[b] = _(f[b]);
this._monthsRegex = new RegExp("^(" + f.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + d.join("|") + ")", "i")
}
function oa(a) {
return pa(a) ? 366 : 365
}
function pa(a) {
return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0
}
function qa() {
return pa(this.year())
}
function ra(a, b, c, d, e, f, g) {
var h = new Date(a, b, c, d, e, f, g);
return 100 > a && a >= 0 && isFinite(h.getFullYear()) && h.setFullYear(a), h
}
function sa(a) {
var b = new Date(Date.UTC.apply(null, arguments));
return 100 > a && a >= 0 && isFinite(b.getUTCFullYear()) && b.setUTCFullYear(a), b
}
function ta(a, b, c) {
var d = 7 + b - c,
e = (7 + sa(a, 0, d).getUTCDay() - b) % 7;
return -e + d - 1
}
function ua(a, b, c, d, e) {
var f, g, h = (7 + c - d) % 7,
i = ta(a, d, e),
j = 1 + 7 * (b - 1) + h + i;
return 0 >= j ? (f = a - 1, g = oa(f) + j) : j > oa(a) ? (f = a + 1, g = j - oa(a)) : (f = a, g = j), {
year: f,
dayOfYear: g
}
}
function va(a, b, c) {
var d, e, f = ta(a.year(), b, c),
g = Math.floor((a.dayOfYear() - f - 1) / 7) + 1;
return 1 > g ? (e = a.year() - 1, d = g + wa(e, b, c)) : g > wa(a.year(), b, c) ? (d = g - wa(a.year(), b, c), e = a.year() + 1) : (e = a.year(), d = g), {
week: d,
year: e
}
}
function wa(a, b, c) {
var d = ta(a, b, c),
e = ta(a + 1, b, c);
return (oa(a) - d + e) / 7
}
function xa(a) {
return va(a, this._week.dow, this._week.doy).week
}
function ya() {
return this._week.dow
}
function za() {
return this._week.doy
}
function Aa(a) {
var b = this.localeData().week(this);
return null == a ? b : this.add(7 * (a - b), "d")
}
function Ba(a) {
var b = va(this, 1, 4).week;
return null == a ? b : this.add(7 * (a - b), "d")
}
function Ca(a, b) {
return "string" != typeof a ? a : isNaN(a) ? (a = b.weekdaysParse(a), "number" == typeof a ? a : null) : parseInt(a, 10)
}
function Da(a, b) {
return "string" == typeof a ? b.weekdaysParse(a) % 7 || 7 : isNaN(a) ? null : a
}
function Ea(a, b) {
return c(this._weekdays) ? this._weekdays[a.day()] : this._weekdays[this._weekdays.isFormat.test(b) ? "format" : "standalone"][a.day()]
}
function Fa(a) {
return this._weekdaysShort[a.day()]
}
function Ga(a) {
return this._weekdaysMin[a.day()]
}
function Ha(a, b, c) {
var d, e, f, g = a.toLocaleLowerCase();
if (!this._weekdaysParse)
for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], d = 0; 7 > d; ++d) f = j([2e3, 1]).day(d), this._minWeekdaysParse[d] = this.weekdaysMin(f, "").toLocaleLowerCase(), this._shortWeekdaysParse[d] = this.weekdaysShort(f, "").toLocaleLowerCase(), this._weekdaysParse[d] = this.weekdays(f, "").toLocaleLowerCase();
return c ? "dddd" === b ? (e = sd.call(this._weekdaysParse, g), -1 !== e ? e : null) : "ddd" === b ? (e = sd.call(this._shortWeekdaysParse, g), -1 !== e ? e : null) : (e = sd.call(this._minWeekdaysParse, g), -1 !== e ? e : null) : "dddd" === b ? (e = sd.call(this._weekdaysParse, g), -1 !== e ? e : (e = sd.call(this._shortWeekdaysParse, g), -1 !== e ? e : (e = sd.call(this._minWeekdaysParse, g), -1 !== e ? e : null))) : "ddd" === b ? (e = sd.call(this._shortWeekdaysParse, g), -1 !== e ? e : (e = sd.call(this._weekdaysParse, g), -1 !== e ? e : (e = sd.call(this._minWeekdaysParse, g), -1 !== e ? e : null))) : (e = sd.call(this._minWeekdaysParse, g), -1 !== e ? e : (e = sd.call(this._weekdaysParse, g), -1 !== e ? e : (e = sd.call(this._shortWeekdaysParse, g), -1 !== e ? e : null)))
}
function Ia(a, b, c) {
var d, e, f;
if (this._weekdaysParseExact) return Ha.call(this, a, b, c);
for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), d = 0; 7 > d; d++) {
if (e = j([2e3, 1]).day(d), c && !this._fullWeekdaysParse[d] && (this._fullWeekdaysParse[d] = new RegExp("^" + this.weekdays(e, "").replace(".", ".?") + "$", "i"), this._shortWeekdaysParse[d] = new RegExp("^" + this.weekdaysShort(e, "").replace(".", ".?") + "$", "i"), this._minWeekdaysParse[d] = new RegExp("^" + this.weekdaysMin(e, "").replace(".", ".?") + "$", "i")), this._weekdaysParse[d] || (f = "^" + this.weekdays(e, "") + "|^" + this.weekdaysShort(e, "") + "|^" + this.weekdaysMin(e, ""), this._weekdaysParse[d] = new RegExp(f.replace(".", ""), "i")), c && "dddd" === b && this._fullWeekdaysParse[d].test(a)) return d;
if (c && "ddd" === b && this._shortWeekdaysParse[d].test(a)) return d;
if (c && "dd" === b && this._minWeekdaysParse[d].test(a)) return d;
if (!c && this._weekdaysParse[d].test(a)) return d
}
}
function Ja(a) {
if (!this.isValid()) return null != a ? this : 0 / 0;
var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
return null != a ? (a = Ca(a, this.localeData()), this.add(a - b, "d")) : b
}
function Ka(a) {
if (!this.isValid()) return null != a ? this : 0 / 0;
var b = (this.day() + 7 - this.localeData()._week.dow) % 7;
return null == a ? b : this.add(a - b, "d")
}
function La(a) {
if (!this.isValid()) return null != a ? this : 0 / 0;
if (null != a) {
var b = Da(a, this.localeData());
return this.day(this.day() % 7 ? b : b - 7)
}
return this.day() || 7
}
function Ma(a) {
return this._weekdaysParseExact ? (h(this, "_weekdaysRegex") || Pa.call(this), a ? this._weekdaysStrictRegex : this._weekdaysRegex) : (h(this, "_weekdaysRegex") || (this._weekdaysRegex = pe), this._weekdaysStrictRegex && a ? this._weekdaysStrictRegex : this._weekdaysRegex)
}
function Na(a) {
return this._weekdaysParseExact ? (h(this, "_weekdaysRegex") || Pa.call(this), a ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (h(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = qe), this._weekdaysShortStrictRegex && a ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex)
}
function Oa(a) {
return this._weekdaysParseExact ? (h(this, "_weekdaysRegex") || Pa.call(this), a ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (h(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = re), this._weekdaysMinStrictRegex && a ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex)
}
function Pa() {
function a(a, b) {
return b.length - a.length
}
var b, c, d, e, f, g = [],
h = [],
i = [],
k = [];
for (b = 0; 7 > b; b++) c = j([2e3, 1]).day(b), d = this.weekdaysMin(c, ""), e = this.weekdaysShort(c, ""), f = this.weekdays(c, ""), g.push(d), h.push(e), i.push(f), k.push(d), k.push(e), k.push(f);
for (g.sort(a), h.sort(a), i.sort(a), k.sort(a), b = 0; 7 > b; b++) h[b] = _(h[b]), i[b] = _(i[b]), k[b] = _(k[b]);
this._weekdaysRegex = new RegExp("^(" + k.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + i.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + h.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + g.join("|") + ")", "i")
}
function Qa() {
return this.hours() % 12 || 12
}
function Ra() {
return this.hours() || 24
}
function Sa(a, b) {
T(a, 0, 0, function() {
return this.localeData().meridiem(this.hours(), this.minutes(), b)
})
}
function Ta(a, b) {
return b._meridiemParse
}
function Ua(a) {
return "p" === (a + "").toLowerCase().charAt(0)
}
function Va(a, b, c) {
return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM"
}
function Wa(a) {
return a ? a.toLowerCase().replace("_", "-") : a
}
function Xa(a) {
for (var b, c, d, e, f = 0; f < a.length;) {
for (e = Wa(a[f]).split("-"), b = e.length, c = Wa(a[f + 1]), c = c ? c.split("-") : null; b > 0;) {
if (d = Ya(e.slice(0, b).join("-"))) return d;
if (c && c.length >= b && u(e, c, !0) >= b - 1) break;
b--
}
f++
}
return null
}
function Ya(a) {
var b = null;
if (!we[a] && "undefined" != typeof module && module && module.exports) try {
b = se._abbr, require("./locale/" + a), Za(b)
} catch (c) {}
return we[a]
}
function Za(a, b) {
var c;
return a && (c = o(b) ? ab(a) : $a(a, b), c && (se = c)), se._abbr
}
function $a(a, b) {
if (null !== b) {
var c = ve;
return b.abbr = a, null != we[a] ? (x("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), c = we[a]._config) : null != b.parentLocale && (null != we[b.parentLocale] ? c = we[b.parentLocale]._config : x("parentLocaleUndefined", "specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")), we[a] = new B(A(c, b)), Za(a), we[a]
}
return delete we[a], null
}
function _a(a, b) {
if (null != b) {
var c, d = ve;
null != we[a] && (d = we[a]._config), b = A(d, b), c = new B(b), c.parentLocale = we[a], we[a] = c, Za(a)
} else null != we[a] && (null != we[a].parentLocale ? we[a] = we[a].parentLocale : null != we[a] && delete we[a]);
return we[a]
}
function ab(a) {
var b;
if (a && a._locale && a._locale._abbr && (a = a._locale._abbr), !a) return se;
if (!c(a)) {
if (b = Ya(a)) return b;
a = [a]
}
return Xa(a)
}
function bb() {
return rd(we)
}
function cb(a) {
var b, c = a._a;
return c && -2 === l(a).overflow && (b = c[Zd] < 0 || c[Zd] > 11 ? Zd : c[$d] < 1 || c[$d] > da(c[Yd], c[Zd]) ? $d : c[_d] < 0 || c[_d] > 24 || 24 === c[_d] && (0 !== c[ae] || 0 !== c[be] || 0 !== c[ce]) ? _d : c[ae] < 0 || c[ae] > 59 ? ae : c[be] < 0 || c[be] > 59 ? be : c[ce] < 0 || c[ce] > 999 ? ce : -1, l(a)._overflowDayOfYear && (Yd > b || b > $d) && (b = $d), l(a)._overflowWeeks && -1 === b && (b = de), l(a)._overflowWeekday && -1 === b && (b = ee), l(a).overflow = b), a
}
function db(a) {
var b, c, d, e, f, g, h = a._i,
i = xe.exec(h) || ye.exec(h);
if (i) {
for (l(a).iso = !0, b = 0, c = Ae.length; c > b; b++)
if (Ae[b][1].exec(i[1])) {
e = Ae[b][0], d = Ae[b][2] !== !1;
break
}
if (null == e) return void(a._isValid = !1);
if (i[3]) {
for (b = 0, c = Be.length; c > b; b++)
if (Be[b][1].exec(i[3])) {
f = (i[2] || " ") + Be[b][0];
break
}
if (null == f) return void(a._isValid = !1)
}
if (!d && null != f) return void(a._isValid = !1);
if (i[4]) {
if (!ze.exec(i[4])) return void(a._isValid = !1);
g = "Z"
}
a._f = e + (f || "") + (g || ""), jb(a)
} else a._isValid = !1
}
function eb(b) {
var c = Ce.exec(b._i);
return null !== c ? void(b._d = new Date(+c[1])) : (db(b), void(b._isValid === !1 && (delete b._isValid, a.createFromInputFallback(b))))
}
function fb(a, b, c) {
return null != a ? a : null != b ? b : c
}
function gb(b) {
var c = new Date(a.now());
return b._useUTC ? [c.getUTCFullYear(), c.getUTCMonth(), c.getUTCDate()] : [c.getFullYear(), c.getMonth(), c.getDate()]
}
function hb(a) {
var b, c, d, e, f = [];
if (!a._d) {
for (d = gb(a), a._w && null == a._a[$d] && null == a._a[Zd] && ib(a), a._dayOfYear && (e = fb(a._a[Yd], d[Yd]), a._dayOfYear > oa(e) && (l(a)._overflowDayOfYear = !0), c = sa(e, 0, a._dayOfYear), a._a[Zd] = c.getUTCMonth(), a._a[$d] = c.getUTCDate()), b = 0; 3 > b && null == a._a[b]; ++b) a._a[b] = f[b] = d[b];
for (; 7 > b; b++) a._a[b] = f[b] = null == a._a[b] ? 2 === b ? 1 : 0 : a._a[b];
24 === a._a[_d] && 0 === a._a[ae] && 0 === a._a[be] && 0 === a._a[ce] && (a._nextDay = !0, a._a[_d] = 0), a._d = (a._useUTC ? sa : ra).apply(null, f), null != a._tzm && a._d.setUTCMinutes(a._d.getUTCMinutes() - a._tzm), a._nextDay && (a._a[_d] = 24)
}
}
function ib(a) {
var b, c, d, e, f, g, h, i;
b = a._w, null != b.GG || null != b.W || null != b.E ? (f = 1, g = 4, c = fb(b.GG, a._a[Yd], va(rb(), 1, 4).year), d = fb(b.W, 1), e = fb(b.E, 1), (1 > e || e > 7) && (i = !0)) : (f = a._locale._week.dow, g = a._locale._week.doy, c = fb(b.gg, a._a[Yd], va(rb(), f, g).year), d = fb(b.w, 1), null != b.d ? (e = b.d, (0 > e || e > 6) && (i = !0)) : null != b.e ? (e = b.e + f, (b.e < 0 || b.e > 6) && (i = !0)) : e = f), 1 > d || d > wa(c, f, g) ? l(a)._overflowWeeks = !0 : null != i ? l(a)._overflowWeekday = !0 : (h = ua(c, d, e, f, g), a._a[Yd] = h.year, a._dayOfYear = h.dayOfYear)
}
function jb(b) {
if (b._f === a.ISO_8601) return void db(b);
b._a = [], l(b).empty = !0;
var c, d, e, f, g, h = "" + b._i,
i = h.length,
j = 0;
for (e = X(b._f, b._locale).match(Bd) || [], c = 0; c < e.length; c++) f = e[c], d = (h.match(Z(f, b)) || [])[0], d && (g = h.substr(0, h.indexOf(d)), g.length > 0 && l(b).unusedInput.push(g), h = h.slice(h.indexOf(d) + d.length), j += d.length), Ed[f] ? (d ? l(b).empty = !1 : l(b).unusedTokens.push(f), ca(f, d, b)) : b._strict && !d && l(b).unusedTokens.push(f);
l(b).charsLeftOver = i - j, h.length > 0 && l(b).unusedInput.push(h), b._a[_d] <= 12 && l(b).bigHour === !0 && b._a[_d] > 0 && (l(b).bigHour = void 0), l(b).parsedDateParts = b._a.slice(0), l(b).meridiem = b._meridiem, b._a[_d] = kb(b._locale, b._a[_d], b._meridiem), hb(b), cb(b)
}
function kb(a, b, c) {
var d;
return null == c ? b : null != a.meridiemHour ? a.meridiemHour(b, c) : null != a.isPM ? (d = a.isPM(c), d && 12 > b && (b += 12), d || 12 !== b || (b = 0), b) : b
}
function lb(a) {
var b, c, d, e, f;
if (0 === a._f.length) return l(a).invalidFormat = !0, void(a._d = new Date(0 / 0));
for (e = 0; e < a._f.length; e++) f = 0, b = p({}, a), null != a._useUTC && (b._useUTC = a._useUTC), b._f = a._f[e], jb(b), m(b) && (f += l(b).charsLeftOver, f += 10 * l(b).unusedTokens.length, l(b).score = f, (null == d || d > f) && (d = f, c = b));
i(a, c || b)
}
function mb(a) {
if (!a._d) {
var b = K(a._i);
a._a = g([b.year, b.month, b.day || b.date, b.hour, b.minute, b.second, b.millisecond], function(a) {
return a && parseInt(a, 10)
}), hb(a)
}
}
function nb(a) {
var b = new q(cb(ob(a)));
return b._nextDay && (b.add(1, "d"), b._nextDay = void 0), b
}
function ob(a) {
var b = a._i,
d = a._f;
return a._locale = a._locale || ab(a._l), null === b || void 0 === d && "" === b ? n({
nullInput: !0
}) : ("string" == typeof b && (a._i = b = a._locale.preparse(b)), r(b) ? new q(cb(b)) : (c(d) ? lb(a) : f(b) ? a._d = b : d ? jb(a) : pb(a), m(a) || (a._d = null), a))
}
function pb(b) {
var d = b._i;
void 0 === d ? b._d = new Date(a.now()) : f(d) ? b._d = new Date(d.valueOf()) : "string" == typeof d ? eb(b) : c(d) ? (b._a = g(d.slice(0), function(a) {
return parseInt(a, 10)
}), hb(b)) : "object" == typeof d ? mb(b) : "number" == typeof d ? b._d = new Date(d) : a.createFromInputFallback(b)
}
function qb(a, b, f, g, h) {
var i = {};
return "boolean" == typeof f && (g = f, f = void 0), (d(a) && e(a) || c(a) && 0 === a.length) && (a = void 0), i._isAMomentObject = !0, i._useUTC = i._isUTC = h, i._l = f, i._i = a, i._f = b, i._strict = g, nb(i)
}
function rb(a, b, c, d) {
return qb(a, b, c, d, !1)
}
function sb(a, b) {
var d, e;
if (1 === b.length && c(b[0]) && (b = b[0]), !b.length) return rb();
for (d = b[0], e = 1; e < b.length; ++e)(!b[e].isValid() || b[e][a](d)) && (d = b[e]);
return d
}
function tb() {
var a = [].slice.call(arguments, 0);
return sb("isBefore", a)
}
function ub() {
var a = [].slice.call(arguments, 0);
return sb("isAfter", a)
}
function vb(a) {
var b = K(a),
c = b.year || 0,
d = b.quarter || 0,
e = b.month || 0,
f = b.week || 0,
g = b.day || 0,
h = b.hour || 0,
i = b.minute || 0,
j = b.second || 0,
k = b.millisecond || 0;
this._milliseconds = +k + 1e3 * j + 6e4 * i + 1e3 * h * 60 * 60, this._days = +g + 7 * f, this._months = +e + 3 * d + 12 * c, this._data = {}, this._locale = ab(), this._bubble()
}
function wb(a) {
return a instanceof vb
}
function xb(a, b) {
T(a, 0, 0, function() {
var a = this.utcOffset(),
c = "+";
return 0 > a && (a = -a, c = "-"), c + S(~~(a / 60), 2) + b + S(~~a % 60, 2)
})
}
function yb(a, b) {
var c = (b || "").match(a) || [],
d = c[c.length - 1] || [],
e = (d + "").match(Ge) || ["-", 0, 0],
f = +(60 * e[1]) + t(e[2]);
return "+" === e[0] ? f : -f
}
function zb(b, c) {
var d, e;
return c._isUTC ? (d = c.clone(), e = (r(b) || f(b) ? b.valueOf() : rb(b).valueOf()) - d.valueOf(), d._d.setTime(d._d.valueOf() + e), a.updateOffset(d, !1), d) : rb(b).local()
}
function Ab(a) {
return 15 * -Math.round(a._d.getTimezoneOffset() / 15)
}
function Bb(b, c) {
var d, e = this._offset || 0;
return this.isValid() ? null != b ? ("string" == typeof b ? b = yb(Td, b) : Math.abs(b) < 16 && (b = 60 * b), !this._isUTC && c && (d = Ab(this)), this._offset = b, this._isUTC = !0, null != d && this.add(d, "m"), e !== b && (!c || this._changeInProgress ? Sb(this, Mb(b - e, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, a.updateOffset(this, !0), this._changeInProgress = null)), this) : this._isUTC ? e : Ab(this) : null != b ? this : 0 / 0
}
function Cb(a, b) {
return null != a ? ("string" != typeof a && (a = -a), this.utcOffset(a, b), this) : -this.utcOffset()
}
function Db(a) {
return this.utcOffset(0, a)
}
function Eb(a) {
return this._isUTC && (this.utcOffset(0, a), this._isUTC = !1, a && this.subtract(Ab(this), "m")), this
}
function Fb() {
return this._tzm ? this.utcOffset(this._tzm) : "string" == typeof this._i && this.utcOffset(yb(Sd, this._i)), this
}
function Gb(a) {
return this.isValid() ? (a = a ? rb(a).utcOffset() : 0, (this.utcOffset() - a) % 60 === 0) : !1
}
function Hb() {
return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset()
}
function Ib() {
if (!o(this._isDSTShifted)) return this._isDSTShifted;
var a = {};
if (p(a, this), a = ob(a), a._a) {
var b = a._isUTC ? j(a._a) : rb(a._a);
this._isDSTShifted = this.isValid() && u(a._a, b.toArray()) > 0
} else this._isDSTShifted = !1;
return this._isDSTShifted
}
function Jb() {
return this.isValid() ? !this._isUTC : !1
}
function Kb() {
return this.isValid() ? this._isUTC : !1
}
function Lb() {
return this.isValid() ? this._isUTC && 0 === this._offset : !1
}
function Mb(a, b) {
var c, d, e, f = a,
g = null;
return wb(a) ? f = {
ms: a._milliseconds,
d: a._days,
M: a._months
} : "number" == typeof a ? (f = {}, b ? f[b] = a : f.milliseconds = a) : (g = He.exec(a)) ? (c = "-" === g[1] ? -1 : 1, f = {
y: 0,
d: t(g[$d]) * c,
h: t(g[_d]) * c,
m: t(g[ae]) * c,
s: t(g[be]) * c,
ms: t(g[ce]) * c
}) : (g = Ie.exec(a)) ? (c = "-" === g[1] ? -1 : 1, f = {
y: Nb(g[2], c),
M: Nb(g[3], c),
w: Nb(g[4], c),
d: Nb(g[5], c),
h: Nb(g[6], c),
m: Nb(g[7], c),
s: Nb(g[8], c)
}) : null == f ? f = {} : "object" == typeof f && ("from" in f || "to" in f) && (e = Pb(rb(f.from), rb(f.to)), f = {}, f.ms = e.milliseconds, f.M = e.months), d = new vb(f), wb(a) && h(a, "_locale") && (d._locale = a._locale), d
}
function Nb(a, b) {
var c = a && parseFloat(a.replace(",", "."));
return (isNaN(c) ? 0 : c) * b
}
function Ob(a, b) {
var c = {
milliseconds: 0,
months: 0
};
return c.months = b.month() - a.month() + 12 * (b.year() - a.year()), a.clone().add(c.months, "M").isAfter(b) && --c.months, c.milliseconds = +b - +a.clone().add(c.months, "M"), c
}
function Pb(a, b) {
var c;
return a.isValid() && b.isValid() ? (b = zb(b, a), a.isBefore(b) ? c = Ob(a, b) : (c = Ob(b, a), c.milliseconds = -c.milliseconds, c.months = -c.months), c) : {
milliseconds: 0,
months: 0
}
}
function Qb(a) {
return 0 > a ? -1 * Math.round(-1 * a) : Math.round(a)
}
function Rb(a, b) {
return function(c, d) {
var e, f;
return null === d || isNaN(+d) || (x(b, "moment()." + b + "(period, number) is deprecated. Please use moment()." + b + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), f = c, c = d, d = f), c = "string" == typeof c ? +c : c, e = Mb(c, d), Sb(this, e, a), this
}
}
function Sb(b, c, d, e) {
var f = c._milliseconds,
g = Qb(c._days),
h = Qb(c._months);
b.isValid() && (e = null == e ? !0 : e, f && b._d.setTime(b._d.valueOf() + f * d), g && P(b, "Date", O(b, "Date") + g * d), h && ia(b, O(b, "Month") + h * d), e && a.updateOffset(b, g || h))
}
function Tb(a, b) {
var c = a.diff(b, "days", !0);
return -6 > c ? "sameElse" : -1 > c ? "lastWeek" : 0 > c ? "lastDay" : 1 > c ? "sameDay" : 2 > c ? "nextDay" : 7 > c ? "nextWeek" : "sameElse"
}
function Ub(b, c) {
var d = b || rb(),
e = zb(d, this).startOf("day"),
f = a.calendarFormat(this, e) || "sameElse",
g = c && (y(c[f]) ? c[f].call(this, d) : c[f]);
return this.format(g || this.localeData().calendar(f, this, rb(d)))
}
function Vb() {
return new q(this)
}
function Wb(a, b) {
var c = r(a) ? a : rb(a);
return this.isValid() && c.isValid() ? (b = J(o(b) ? "millisecond" : b), "millisecond" === b ? this.valueOf() > c.valueOf() : c.valueOf() < this.clone().startOf(b).valueOf()) : !1
}
function Xb(a, b) {
var c = r(a) ? a : rb(a);
return this.isValid() && c.isValid() ? (b = J(o(b) ? "millisecond" : b), "millisecond" === b ? this.valueOf() < c.valueOf() : this.clone().endOf(b).valueOf() < c.valueOf()) : !1
}
function Yb(a, b, c, d) {
return d = d || "()", ("(" === d[0] ? this.isAfter(a, c) : !this.isBefore(a, c)) && (")" === d[1] ? this.isBefore(b, c) : !this.isAfter(b, c))
}
function Zb(a, b) {
var c, d = r(a) ? a : rb(a);
return this.isValid() && d.isValid() ? (b = J(b || "millisecond"), "millisecond" === b ? this.valueOf() === d.valueOf() : (c = d.valueOf(), this.clone().startOf(b).valueOf() <= c && c <= this.clone().endOf(b).valueOf())) : !1
}
function $b(a, b) {
return this.isSame(a, b) || this.isAfter(a, b)
}
function _b(a, b) {
return this.isSame(a, b) || this.isBefore(a, b)
}
function ac(a, b, c) {
var d, e, f, g;
return this.isValid() ? (d = zb(a, this), d.isValid() ? (e = 6e4 * (d.utcOffset() - this.utcOffset()), b = J(b), "year" === b || "month" === b || "quarter" === b ? (g = bc(this, d), "quarter" === b ? g /= 3 : "year" === b && (g /= 12)) : (f = this - d, g = "second" === b ? f / 1e3 : "minute" === b ? f / 6e4 : "hour" === b ? f / 36e5 : "day" === b ? (f - e) / 864e5 : "week" === b ? (f - e) / 6048e5 : f), c ? g : s(g)) : 0 / 0) : 0 / 0
}
function bc(a, b) {
var c, d, e = 12 * (b.year() - a.year()) + (b.month() - a.month()),
f = a.clone().add(e, "months");
return 0 > b - f ? (c = a.clone().add(e - 1, "months"), d = (b - f) / (f - c)) : (c = a.clone().add(e + 1, "months"), d = (b - f) / (c - f)), -(e + d) || 0
}
function cc() {
return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")
}
function dc() {
var a = this.clone().utc();
return 0 < a.year() && a.year() <= 9999 ? y(Date.prototype.toISOString) ? this.toDate().toISOString() : W(a, "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]") : W(a, "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")
}
function ec(b) {
b || (b = this.isUtc() ? a.defaultFormatUtc : a.defaultFormat);
var c = W(this, b);
return this.localeData().postformat(c)
}
function fc(a, b) {
return this.isValid() && (r(a) && a.isValid() || rb(a).isValid()) ? Mb({
to: this,
from: a
}).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()
}
function gc(a) {
return this.from(rb(), a)
}
function hc(a, b) {
return this.isValid() && (r(a) && a.isValid() || rb(a).isValid()) ? Mb({
from: this,
to: a
}).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()
}
function ic(a) {
return this.to(rb(), a)
}
function jc(a) {
var b;
return void 0 === a ? this._locale._abbr : (b = ab(a), null != b && (this._locale = b), this)
}
function kc() {
return this._locale
}
function lc(a) {
switch (a = J(a)) {
case "year":
this.month(0);
case "quarter":
case "month":
this.date(1);
case "week":
case "isoWeek":
case "day":
case "date":
this.hours(0);
case "hour":
this.minutes(0);
case "minute":
this.seconds(0);
case "second":
this.milliseconds(0)
}
return "week" === a && this.weekday(0), "isoWeek" === a && this.isoWeekday(1), "quarter" === a && this.month(3 * Math.floor(this.month() / 3)), this
}
function mc(a) {
return a = J(a), void 0 === a || "millisecond" === a ? this : ("date" === a && (a = "day"), this.startOf(a).add(1, "isoWeek" === a ? "week" : a).subtract(1, "ms"))
}
function nc() {
return this._d.valueOf() - 6e4 * (this._offset || 0)
}
function oc() {
return Math.floor(this.valueOf() / 1e3)
}
function pc() {
return new Date(this.valueOf())
}
function qc() {
var a = this;
return [a.year(), a.month(), a.date(), a.hour(), a.minute(), a.second(), a.millisecond()]
}
function rc() {
var a = this;
return {
years: a.year(),
months: a.month(),
date: a.date(),
hours: a.hours(),
minutes: a.minutes(),
seconds: a.seconds(),
milliseconds: a.milliseconds()
}
}
function sc() {
return this.isValid() ? this.toISOString() : null
}
function tc() {
return m(this)
}
function uc() {
return i({}, l(this))
}
function vc() {
return l(this).overflow
}
function wc() {
return {
input: this._i,
format: this._f,
locale: this._locale,
isUTC: this._isUTC,
strict: this._strict
}
}
function xc(a, b) {
T(0, [a, a.length], 0, b)
}
function yc(a) {
return Cc.call(this, a, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy)
}
function zc(a) {
return Cc.call(this, a, this.isoWeek(), this.isoWeekday(), 1, 4)
}
function Ac() {
return wa(this.year(), 1, 4)
}
function Bc() {
var a = this.localeData()._week;
return wa(this.year(), a.dow, a.doy)
}
function Cc(a, b, c, d, e) {
var f;
return null == a ? va(this, d, e).year : (f = wa(a, d, e),
b > f && (b = f), Dc.call(this, a, b, c, d, e))
}
function Dc(a, b, c, d, e) {
var f = ua(a, b, c, d, e),
g = sa(f.year, 0, f.dayOfYear);
return this.year(g.getUTCFullYear()), this.month(g.getUTCMonth()), this.date(g.getUTCDate()), this
}
function Ec(a) {
return null == a ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (a - 1) + this.month() % 3)
}
function Fc(a) {
var b = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
return null == a ? b : this.add(a - b, "d")
}
function Gc(a, b) {
b[ce] = t(1e3 * ("0." + a))
}
function Hc() {
return this._isUTC ? "UTC" : ""
}
function Ic() {
return this._isUTC ? "Coordinated Universal Time" : ""
}
function Jc(a) {
return rb(1e3 * a)
}
function Kc() {
return rb.apply(null, arguments).parseZone()
}
function Lc(a) {
return a
}
function Mc(a, b, c, d) {
var e = ab(),
f = j().set(d, b);
return e[c](f, a)
}
function Nc(a, b, c) {
if ("number" == typeof a && (b = a, a = void 0), a = a || "", null != b) return Mc(a, b, c, "month");
var d, e = [];
for (d = 0; 12 > d; d++) e[d] = Mc(a, d, c, "month");
return e
}
function Oc(a, b, c, d) {
"boolean" == typeof a ? ("number" == typeof b && (c = b, b = void 0), b = b || "") : (b = a, c = b, a = !1, "number" == typeof b && (c = b, b = void 0), b = b || "");
var e = ab(),
f = a ? e._week.dow : 0;
if (null != c) return Mc(b, (c + f) % 7, d, "day");
var g, h = [];
for (g = 0; 7 > g; g++) h[g] = Mc(b, (g + f) % 7, d, "day");
return h
}
function Pc(a, b) {
return Nc(a, b, "months")
}
function Qc(a, b) {
return Nc(a, b, "monthsShort")
}
function Rc(a, b, c) {
return Oc(a, b, c, "weekdays")
}
function Sc(a, b, c) {
return Oc(a, b, c, "weekdaysShort")
}
function Tc(a, b, c) {
return Oc(a, b, c, "weekdaysMin")
}
function Uc() {
var a = this._data;
return this._milliseconds = Ue(this._milliseconds), this._days = Ue(this._days), this._months = Ue(this._months), a.milliseconds = Ue(a.milliseconds), a.seconds = Ue(a.seconds), a.minutes = Ue(a.minutes), a.hours = Ue(a.hours), a.months = Ue(a.months), a.years = Ue(a.years), this
}
function Vc(a, b, c, d) {
var e = Mb(b, c);
return a._milliseconds += d * e._milliseconds, a._days += d * e._days, a._months += d * e._months, a._bubble()
}
function Wc(a, b) {
return Vc(this, a, b, 1)
}
function Xc(a, b) {
return Vc(this, a, b, -1)
}
function Yc(a) {
return 0 > a ? Math.floor(a) : Math.ceil(a)
}
function Zc() {
var a, b, c, d, e, f = this._milliseconds,
g = this._days,
h = this._months,
i = this._data;
return f >= 0 && g >= 0 && h >= 0 || 0 >= f && 0 >= g && 0 >= h || (f += 864e5 * Yc(_c(h) + g), g = 0, h = 0), i.milliseconds = f % 1e3, a = s(f / 1e3), i.seconds = a % 60, b = s(a / 60), i.minutes = b % 60, c = s(b / 60), i.hours = c % 24, g += s(c / 24), e = s($c(g)), h += e, g -= Yc(_c(e)), d = s(h / 12), h %= 12, i.days = g, i.months = h, i.years = d, this
}
function $c(a) {
return 4800 * a / 146097
}
function _c(a) {
return 146097 * a / 4800
}
function ad(a) {
var b, c, d = this._milliseconds;
if (a = J(a), "month" === a || "year" === a) return b = this._days + d / 864e5, c = this._months + $c(b), "month" === a ? c : c / 12;
switch (b = this._days + Math.round(_c(this._months)), a) {
case "week":
return b / 7 + d / 6048e5;
case "day":
return b + d / 864e5;
case "hour":
return 24 * b + d / 36e5;
case "minute":
return 1440 * b + d / 6e4;
case "second":
return 86400 * b + d / 1e3;
case "millisecond":
return Math.floor(864e5 * b) + d;
default:
throw new Error("Unknown unit " + a)
}
}
function bd() {
return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * t(this._months / 12)
}
function cd(a) {
return function() {
return this.as(a)
}
}
function dd(a) {
return a = J(a), this[a + "s"]()
}
function ed(a) {
return function() {
return this._data[a]
}
}
function fd() {
return s(this.days() / 7)
}
function gd(a, b, c, d, e) {
return e.relativeTime(b || 1, !!c, a, d)
}
function hd(a, b, c) {
var d = Mb(a).abs(),
e = jf(d.as("s")),
f = jf(d.as("m")),
g = jf(d.as("h")),
h = jf(d.as("d")),
i = jf(d.as("M")),
j = jf(d.as("y")),
k = e < kf.s && ["s", e] || 1 >= f && ["m"] || f < kf.m && ["mm", f] || 1 >= g && ["h"] || g < kf.h && ["hh", g] || 1 >= h && ["d"] || h < kf.d && ["dd", h] || 1 >= i && ["M"] || i < kf.M && ["MM", i] || 1 >= j && ["y"] || ["yy", j];
return k[2] = b, k[3] = +a > 0, k[4] = c, gd.apply(null, k)
}
function id(a) {
return void 0 === a ? jf : "function" == typeof a ? (jf = a, !0) : !1
}
function jd(a, b) {
return void 0 === kf[a] ? !1 : void 0 === b ? kf[a] : (kf[a] = b, !0)
}
function kd(a) {
var b = this.localeData(),
c = hd(this, !a, b);
return a && (c = b.pastFuture(+this, c)), b.postformat(c)
}
function ld() {
var a, b, c, d = lf(this._milliseconds) / 1e3,
e = lf(this._days),
f = lf(this._months);
a = s(d / 60), b = s(a / 60), d %= 60, a %= 60, c = s(f / 12), f %= 12;
var g = c,
h = f,
i = e,
j = b,
k = a,
l = d,
m = this.asSeconds();
return m ? (0 > m ? "-" : "") + "P" + (g ? g + "Y" : "") + (h ? h + "M" : "") + (i ? i + "D" : "") + (j || k || l ? "T" : "") + (j ? j + "H" : "") + (k ? k + "M" : "") + (l ? l + "S" : "") : "P0D"
}
var md, nd;
nd = Array.prototype.some ? Array.prototype.some : function(a) {
for (var b = Object(this), c = b.length >>> 0, d = 0; c > d; d++)
if (d in b && a.call(this, b[d], d, b)) return !0;
return !1
};
var od = a.momentProperties = [],
pd = !1,
qd = {};
a.suppressDeprecationWarnings = !1, a.deprecationHandler = null;
var rd;
rd = Object.keys ? Object.keys : function(a) {
var b, c = [];
for (b in a) h(a, b) && c.push(b);
return c
};
var sd, td = {
sameDay: "[Today at] LT",
nextDay: "[Tomorrow at] LT",
nextWeek: "dddd [at] LT",
lastDay: "[Yesterday at] LT",
lastWeek: "[Last] dddd [at] LT",
sameElse: "L"
},
ud = {
LTS: "h:mm:ss A",
LT: "h:mm A",
L: "MM/DD/YYYY",
LL: "MMMM D, YYYY",
LLL: "MMMM D, YYYY h:mm A",
LLLL: "dddd, MMMM D, YYYY h:mm A"
},
vd = "Invalid date",
wd = "%d",
xd = /\d{1,2}/,
yd = {
future: "in %s",
past: "%s ago",
s: "a few seconds",
m: "a minute",
mm: "%d minutes",
h: "an hour",
hh: "%d hours",
d: "a day",
dd: "%d days",
M: "a month",
MM: "%d months",
y: "a year",
yy: "%d years"
},
zd = {},
Ad = {},
Bd = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
Cd = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
Dd = {},
Ed = {},
Fd = /\d/,
Gd = /\d\d/,
Hd = /\d{3}/,
Id = /\d{4}/,
Jd = /[+-]?\d{6}/,
Kd = /\d\d?/,
Ld = /\d\d\d\d?/,
Md = /\d\d\d\d\d\d?/,
Nd = /\d{1,3}/,
Od = /\d{1,4}/,
Pd = /[+-]?\d{1,6}/,
Qd = /\d+/,
Rd = /[+-]?\d+/,
Sd = /Z|[+-]\d\d:?\d\d/gi,
Td = /Z|[+-]\d\d(?::?\d\d)?/gi,
Ud = /[+-]?\d+(\.\d{1,3})?/,
Vd = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,
Wd = {},
Xd = {},
Yd = 0,
Zd = 1,
$d = 2,
_d = 3,
ae = 4,
be = 5,
ce = 6,
de = 7,
ee = 8;
sd = Array.prototype.indexOf ? Array.prototype.indexOf : function(a) {
var b;
for (b = 0; b < this.length; ++b)
if (this[b] === a) return b;
return -1
}, T("M", ["MM", 2], "Mo", function() {
return this.month() + 1
}), T("MMM", 0, 0, function(a) {
return this.localeData().monthsShort(this, a)
}), T("MMMM", 0, 0, function(a) {
return this.localeData().months(this, a)
}), I("month", "M"), L("month", 8), Y("M", Kd), Y("MM", Kd, Gd), Y("MMM", function(a, b) {
return b.monthsShortRegex(a)
}), Y("MMMM", function(a, b) {
return b.monthsRegex(a)
}), aa(["M", "MM"], function(a, b) {
b[Zd] = t(a) - 1
}), aa(["MMM", "MMMM"], function(a, b, c, d) {
var e = c._locale.monthsParse(a, d, c._strict);
null != e ? b[Zd] = e : l(c).invalidMonth = a
});
var fe = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,
ge = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
he = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
ie = Vd,
je = Vd;
T("Y", 0, 0, function() {
var a = this.year();
return 9999 >= a ? "" + a : "+" + a
}), T(0, ["YY", 2], 0, function() {
return this.year() % 100
}), T(0, ["YYYY", 4], 0, "year"), T(0, ["YYYYY", 5], 0, "year"), T(0, ["YYYYYY", 6, !0], 0, "year"), I("year", "y"), L("year", 1), Y("Y", Rd), Y("YY", Kd, Gd), Y("YYYY", Od, Id), Y("YYYYY", Pd, Jd), Y("YYYYYY", Pd, Jd), aa(["YYYYY", "YYYYYY"], Yd), aa("YYYY", function(b, c) {
c[Yd] = 2 === b.length ? a.parseTwoDigitYear(b) : t(b)
}), aa("YY", function(b, c) {
c[Yd] = a.parseTwoDigitYear(b)
}), aa("Y", function(a, b) {
b[Yd] = parseInt(a, 10)
}), a.parseTwoDigitYear = function(a) {
return t(a) + (t(a) > 68 ? 1900 : 2e3)
};
var ke = N("FullYear", !0);
T("w", ["ww", 2], "wo", "week"), T("W", ["WW", 2], "Wo", "isoWeek"), I("week", "w"), I("isoWeek", "W"), L("week", 5), L("isoWeek", 5), Y("w", Kd), Y("ww", Kd, Gd), Y("W", Kd), Y("WW", Kd, Gd), ba(["w", "ww", "W", "WW"], function(a, b, c, d) {
b[d.substr(0, 1)] = t(a)
});
var le = {
dow: 0,
doy: 6
};
T("d", 0, "do", "day"), T("dd", 0, 0, function(a) {
return this.localeData().weekdaysMin(this, a)
}), T("ddd", 0, 0, function(a) {
return this.localeData().weekdaysShort(this, a)
}), T("dddd", 0, 0, function(a) {
return this.localeData().weekdays(this, a)
}), T("e", 0, 0, "weekday"), T("E", 0, 0, "isoWeekday"), I("day", "d"), I("weekday", "e"), I("isoWeekday", "E"), L("day", 11), L("weekday", 11), L("isoWeekday", 11), Y("d", Kd), Y("e", Kd), Y("E", Kd), Y("dd", function(a, b) {
return b.weekdaysMinRegex(a)
}), Y("ddd", function(a, b) {
return b.weekdaysShortRegex(a)
}), Y("dddd", function(a, b) {
return b.weekdaysRegex(a)
}), ba(["dd", "ddd", "dddd"], function(a, b, c, d) {
var e = c._locale.weekdaysParse(a, d, c._strict);
null != e ? b.d = e : l(c).invalidWeekday = a
}), ba(["d", "e", "E"], function(a, b, c, d) {
b[d] = t(a)
});
var me = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
ne = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
oe = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
pe = Vd,
qe = Vd,
re = Vd;
T("H", ["HH", 2], 0, "hour"), T("h", ["hh", 2], 0, Qa), T("k", ["kk", 2], 0, Ra), T("hmm", 0, 0, function() {
return "" + Qa.apply(this) + S(this.minutes(), 2)
}), T("hmmss", 0, 0, function() {
return "" + Qa.apply(this) + S(this.minutes(), 2) + S(this.seconds(), 2)
}), T("Hmm", 0, 0, function() {
return "" + this.hours() + S(this.minutes(), 2)
}), T("Hmmss", 0, 0, function() {
return "" + this.hours() + S(this.minutes(), 2) + S(this.seconds(), 2)
}), Sa("a", !0), Sa("A", !1), I("hour", "h"), L("hour", 13), Y("a", Ta), Y("A", Ta), Y("H", Kd), Y("h", Kd), Y("HH", Kd, Gd), Y("hh", Kd, Gd), Y("hmm", Ld), Y("hmmss", Md), Y("Hmm", Ld), Y("Hmmss", Md), aa(["H", "HH"], _d), aa(["a", "A"], function(a, b, c) {
c._isPm = c._locale.isPM(a), c._meridiem = a
}), aa(["h", "hh"], function(a, b, c) {
b[_d] = t(a), l(c).bigHour = !0
}), aa("hmm", function(a, b, c) {
var d = a.length - 2;
b[_d] = t(a.substr(0, d)), b[ae] = t(a.substr(d)), l(c).bigHour = !0
}), aa("hmmss", function(a, b, c) {
var d = a.length - 4,
e = a.length - 2;
b[_d] = t(a.substr(0, d)), b[ae] = t(a.substr(d, 2)), b[be] = t(a.substr(e)), l(c).bigHour = !0
}), aa("Hmm", function(a, b) {
var c = a.length - 2;
b[_d] = t(a.substr(0, c)), b[ae] = t(a.substr(c))
}), aa("Hmmss", function(a, b) {
var c = a.length - 4,
d = a.length - 2;
b[_d] = t(a.substr(0, c)), b[ae] = t(a.substr(c, 2)), b[be] = t(a.substr(d))
});
var se, te = /[ap]\.?m?\.?/i,
ue = N("Hours", !0),
ve = {
calendar: td,
longDateFormat: ud,
invalidDate: vd,
ordinal: wd,
ordinalParse: xd,
relativeTime: yd,
months: ge,
monthsShort: he,
week: le,
weekdays: me,
weekdaysMin: oe,
weekdaysShort: ne,
meridiemParse: te
},
we = {},
xe = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,
ye = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,
ze = /Z|[+-]\d\d(?::?\d\d)?/,
Ae = [
["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
["YYYY-DDD", /\d{4}-\d{3}/],
["YYYY-MM", /\d{4}-\d\d/, !1],
["YYYYYYMMDD", /[+-]\d{10}/],
["YYYYMMDD", /\d{8}/],
["GGGG[W]WWE", /\d{4}W\d{3}/],
["GGGG[W]WW", /\d{4}W\d{2}/, !1],
["YYYYDDD", /\d{7}/]
],
Be = [
["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
["HH:mm:ss", /\d\d:\d\d:\d\d/],
["HH:mm", /\d\d:\d\d/],
["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
["HHmmss", /\d\d\d\d\d\d/],
["HHmm", /\d\d\d\d/],
["HH", /\d\d/]
],
Ce = /^\/?Date\((\-?\d+)/i;
a.createFromInputFallback = w("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function(a) {
a._d = new Date(a._i + (a._useUTC ? " UTC" : ""))
}), a.ISO_8601 = function() {};
var De = w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
var a = rb.apply(null, arguments);
return this.isValid() && a.isValid() ? this > a ? this : a : n()
}),
Ee = w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
var a = rb.apply(null, arguments);
return this.isValid() && a.isValid() ? a > this ? this : a : n()
}),
Fe = function() {
return Date.now ? Date.now() : +new Date
};
xb("Z", ":"), xb("ZZ", ""), Y("Z", Td), Y("ZZ", Td), aa(["Z", "ZZ"], function(a, b, c) {
c._useUTC = !0, c._tzm = yb(Td, a)
});
var Ge = /([\+\-]|\d\d)/gi;
a.updateOffset = function() {};
var He = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,
Ie = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;
Mb.fn = vb.prototype;
var Je = Rb(1, "add"),
Ke = Rb(-1, "subtract");
a.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ", a.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
var Le = w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(a) {
return void 0 === a ? this.localeData() : this.locale(a)
});
T(0, ["gg", 2], 0, function() {
return this.weekYear() % 100
}), T(0, ["GG", 2], 0, function() {
return this.isoWeekYear() % 100
}), xc("gggg", "weekYear"), xc("ggggg", "weekYear"), xc("GGGG", "isoWeekYear"), xc("GGGGG", "isoWeekYear"), I("weekYear", "gg"), I("isoWeekYear", "GG"), L("weekYear", 1), L("isoWeekYear", 1), Y("G", Rd), Y("g", Rd), Y("GG", Kd, Gd), Y("gg", Kd, Gd), Y("GGGG", Od, Id), Y("gggg", Od, Id), Y("GGGGG", Pd, Jd), Y("ggggg", Pd, Jd), ba(["gggg", "ggggg", "GGGG", "GGGGG"], function(a, b, c, d) {
b[d.substr(0, 2)] = t(a)
}), ba(["gg", "GG"], function(b, c, d, e) {
c[e] = a.parseTwoDigitYear(b)
}), T("Q", 0, "Qo", "quarter"), I("quarter", "Q"), L("quarter", 7), Y("Q", Fd), aa("Q", function(a, b) {
b[Zd] = 3 * (t(a) - 1)
}), T("D", ["DD", 2], "Do", "date"), I("date", "D"), L("date", 9), Y("D", Kd), Y("DD", Kd, Gd), Y("Do", function(a, b) {
return a ? b._ordinalParse : b._ordinalParseLenient
}), aa(["D", "DD"], $d), aa("Do", function(a, b) {
b[$d] = t(a.match(Kd)[0], 10)
});
var Me = N("Date", !0);
T("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), I("dayOfYear", "DDD"), L("dayOfYear", 4), Y("DDD", Nd), Y("DDDD", Hd), aa(["DDD", "DDDD"], function(a, b, c) {
c._dayOfYear = t(a)
}), T("m", ["mm", 2], 0, "minute"), I("minute", "m"), L("minute", 14), Y("m", Kd), Y("mm", Kd, Gd), aa(["m", "mm"], ae);
var Ne = N("Minutes", !1);
T("s", ["ss", 2], 0, "second"), I("second", "s"), L("second", 15), Y("s", Kd), Y("ss", Kd, Gd), aa(["s", "ss"], be);
var Oe = N("Seconds", !1);
T("S", 0, 0, function() {
return ~~(this.millisecond() / 100)
}), T(0, ["SS", 2], 0, function() {
return ~~(this.millisecond() / 10)
}), T(0, ["SSS", 3], 0, "millisecond"), T(0, ["SSSS", 4], 0, function() {
return 10 * this.millisecond()
}), T(0, ["SSSSS", 5], 0, function() {
return 100 * this.millisecond()
}), T(0, ["SSSSSS", 6], 0, function() {
return 1e3 * this.millisecond()
}), T(0, ["SSSSSSS", 7], 0, function() {
return 1e4 * this.millisecond()
}), T(0, ["SSSSSSSS", 8], 0, function() {
return 1e5 * this.millisecond()
}), T(0, ["SSSSSSSSS", 9], 0, function() {
return 1e6 * this.millisecond()
}), I("millisecond", "ms"), L("millisecond", 16), Y("S", Nd, Fd), Y("SS", Nd, Gd), Y("SSS", Nd, Hd);
var Pe;
for (Pe = "SSSS"; Pe.length <= 9; Pe += "S") Y(Pe, Qd);
for (Pe = "S"; Pe.length <= 9; Pe += "S") aa(Pe, Gc);
var Qe = N("Milliseconds", !1);
T("z", 0, 0, "zoneAbbr"), T("zz", 0, 0, "zoneName");
var Re = q.prototype;
Re.add = Je, Re.calendar = Ub, Re.clone = Vb, Re.diff = ac, Re.endOf = mc, Re.format = ec, Re.from = fc, Re.fromNow = gc, Re.to = hc, Re.toNow = ic, Re.get = Q, Re.invalidAt = vc, Re.isAfter = Wb, Re.isBefore = Xb, Re.isBetween = Yb, Re.isSame = Zb, Re.isSameOrAfter = $b, Re.isSameOrBefore = _b, Re.isValid = tc, Re.lang = Le, Re.locale = jc, Re.localeData = kc, Re.max = Ee, Re.min = De, Re.parsingFlags = uc, Re.set = R, Re.startOf = lc, Re.subtract = Ke, Re.toArray = qc, Re.toObject = rc, Re.toDate = pc, Re.toISOString = dc, Re.toJSON = sc, Re.toString = cc, Re.unix = oc, Re.valueOf = nc, Re.creationData = wc, Re.year = ke, Re.isLeapYear = qa, Re.weekYear = yc, Re.isoWeekYear = zc, Re.quarter = Re.quarters = Ec, Re.month = ja, Re.daysInMonth = ka, Re.week = Re.weeks = Aa, Re.isoWeek = Re.isoWeeks = Ba, Re.weeksInYear = Bc, Re.isoWeeksInYear = Ac, Re.date = Me, Re.day = Re.days = Ja, Re.weekday = Ka, Re.isoWeekday = La, Re.dayOfYear = Fc, Re.hour = Re.hours = ue, Re.minute = Re.minutes = Ne, Re.second = Re.seconds = Oe, Re.millisecond = Re.milliseconds = Qe, Re.utcOffset = Bb, Re.utc = Db, Re.local = Eb, Re.parseZone = Fb, Re.hasAlignedHourOffset = Gb, Re.isDST = Hb, Re.isLocal = Jb, Re.isUtcOffset = Kb, Re.isUtc = Lb, Re.isUTC = Lb, Re.zoneAbbr = Hc, Re.zoneName = Ic, Re.dates = w("dates accessor is deprecated. Use date instead.", Me), Re.months = w("months accessor is deprecated. Use month instead", ja), Re.years = w("years accessor is deprecated. Use year instead", ke), Re.zone = w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", Cb), Re.isDSTShifted = w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", Ib);
var Se = Re,
Te = B.prototype;
Te.calendar = C, Te.longDateFormat = D, Te.invalidDate = E, Te.ordinal = F, Te.preparse = Lc, Te.postformat = Lc, Te.relativeTime = G, Te.pastFuture = H, Te.set = z, Te.months = ea, Te.monthsShort = fa, Te.monthsParse = ha, Te.monthsRegex = ma, Te.monthsShortRegex = la, Te.week = xa, Te.firstDayOfYear = za, Te.firstDayOfWeek = ya, Te.weekdays = Ea, Te.weekdaysMin = Ga, Te.weekdaysShort = Fa, Te.weekdaysParse = Ia, Te.weekdaysRegex = Ma, Te.weekdaysShortRegex = Na, Te.weekdaysMinRegex = Oa, Te.isPM = Ua, Te.meridiem = Va, Za("en", {
ordinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal: function(a) {
var b = a % 10,
c = 1 === t(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th";
return a + c
}
}), a.lang = w("moment.lang is deprecated. Use moment.locale instead.", Za), a.langData = w("moment.langData is deprecated. Use moment.localeData instead.", ab);
var Ue = Math.abs,
Ve = cd("ms"),
We = cd("s"),
Xe = cd("m"),
Ye = cd("h"),
Ze = cd("d"),
$e = cd("w"),
_e = cd("M"),
af = cd("y"),
bf = ed("milliseconds"),
cf = ed("seconds"),
df = ed("minutes"),
ef = ed("hours"),
ff = ed("days"),
gf = ed("months"),
hf = ed("years"),
jf = Math.round,
kf = {
s: 45,
m: 45,
h: 22,
d: 26,
M: 11
},
lf = Math.abs,
mf = vb.prototype;
mf.abs = Uc, mf.add = Wc, mf.subtract = Xc, mf.as = ad, mf.asMilliseconds = Ve, mf.asSeconds = We, mf.asMinutes = Xe, mf.asHours = Ye, mf.asDays = Ze, mf.asWeeks = $e, mf.asMonths = _e, mf.asYears = af, mf.valueOf = bd, mf._bubble = Zc, mf.get = dd, mf.milliseconds = bf, mf.seconds = cf, mf.minutes = df, mf.hours = ef, mf.days = ff, mf.weeks = fd, mf.months = gf, mf.years = hf, mf.humanize = kd, mf.toISOString = ld, mf.toString = ld, mf.toJSON = ld, mf.locale = jc, mf.localeData = kc, mf.toIsoString = w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", ld), mf.lang = Le, T("X", 0, 0, "unix"), T("x", 0, 0, "valueOf"), Y("x", Rd), Y("X", Ud), aa("X", function(a, b, c) {
c._d = new Date(1e3 * parseFloat(a, 10))
}), aa("x", function(a, b, c) {
c._d = new Date(t(a))
}), a.version = "2.14.1", b(rb), a.fn = Se, a.min = tb, a.max = ub, a.now = Fe, a.utc = j, a.unix = Jc, a.months = Pc, a.isDate = f, a.locale = Za, a.invalid = n, a.duration = Mb, a.isMoment = r, a.weekdays = Rc, a.parseZone = Kc, a.localeData = ab, a.isDuration = wb, a.monthsShort = Qc, a.weekdaysMin = Tc, a.defineLocale = $a, a.updateLocale = _a, a.locales = bb, a.weekdaysShort = Sc, a.normalizeUnits = J, a.relativeTimeRounding = id, a.relativeTimeThreshold = jd, a.calendarFormat = Tb, a.prototype = Se;
var nf = a;
return nf
}), function(a, b) {
if ("function" == typeof define && define.amd) define(["moment", "jquery"], function(c, d) {
return a.daterangepicker = b(c, d)
});
else if ("object" == typeof module && module.exports) {
var c = "undefined" != typeof window ? window.jQuery : void 0;
c || (c = require("jquery"), c.fn || (c.fn = {})), module.exports = b(require("moment"), c)
} else a.daterangepicker = b(a.moment, a.jQuery)
}(this, function(a, b) {
var c = function(c, d, e) {
if (this.parentEl = "body", this.element = b(c), this.startDate = a().startOf("day"), this.endDate = a().endOf("day"), this.minDate = !1, this.maxDate = !1, this.dateLimit = !1, this.autoApply = !1, this.singleDatePicker = !1, this.showDropdowns = !1, this.showWeekNumbers = !1, this.showISOWeekNumbers = !1, this.showCustomRangeLabel = !0, this.timePicker = !1, this.timePicker24Hour = !1, this.timePickerIncrement = 1, this.timePickerSeconds = !1, this.linkedCalendars = !0, this.autoUpdateInput = !0, this.alwaysShowCalendars = !1, this.ranges = {}, this.opens = "right", this.element.hasClass("pull-right") && (this.opens = "left"), this.drops = "down", this.element.hasClass("dropup") && (this.drops = "up"), this.buttonClasses = "btn btn-sm", this.applyClass = "btn-success", this.cancelClass = "btn-default", this.locale = {
direction: "ltr",
format: "MM/DD/YYYY",
separator: " - ",
applyLabel: "Apply",
cancelLabel: "Cancel",
weekLabel: "W",
customRangeLabel: "Custom Range",
daysOfWeek: a.weekdaysMin(),
monthNames: a.monthsShort(),
firstDay: a.localeData().firstDayOfWeek()
}, this.callback = function() {}, this.isShowing = !1, this.leftCalendar = {}, this.rightCalendar = {}, ("object" != typeof d || null === d) && (d = {}), d = b.extend(this.element.data(), d), "string" == typeof d.template || d.template instanceof b || (d.template = '<div class="daterangepicker dropdown-menu"><div class="calendar right"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_end" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="calendar left"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_start" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="ranges"><div class="range_inputs"><button class="applyBtn" disabled="disabled" type="button"></button> <button class="cancelBtn" type="button"></button></div></div></div>'), this.parentEl = b(d.parentEl && b(d.parentEl).length ? d.parentEl : this.parentEl), this.container = b(d.template).appendTo(this.parentEl), "object" == typeof d.locale && ("string" == typeof d.locale.direction && (this.locale.direction = d.locale.direction), "string" == typeof d.locale.format && (this.locale.format = d.locale.format), "string" == typeof d.locale.separator && (this.locale.separator = d.locale.separator), "object" == typeof d.locale.daysOfWeek && (this.locale.daysOfWeek = d.locale.daysOfWeek.slice()), "object" == typeof d.locale.monthNames && (this.locale.monthNames = d.locale.monthNames.slice()), "number" == typeof d.locale.firstDay && (this.locale.firstDay = d.locale.firstDay), "string" == typeof d.locale.applyLabel && (this.locale.applyLabel = d.locale.applyLabel), "string" == typeof d.locale.cancelLabel && (this.locale.cancelLabel = d.locale.cancelLabel), "string" == typeof d.locale.weekLabel && (this.locale.weekLabel = d.locale.weekLabel), "string" == typeof d.locale.customRangeLabel && (this.locale.customRangeLabel = d.locale.customRangeLabel)), this.container.addClass(this.locale.direction), "string" == typeof d.startDate && (this.startDate = a(d.startDate, this.locale.format)), "string" == typeof d.endDate && (this.endDate = a(d.endDate, this.locale.format)), "string" == typeof d.minDate && (this.minDate = a(d.minDate, this.locale.format)), "string" == typeof d.maxDate && (this.maxDate = a(d.maxDate, this.locale.format)), "object" == typeof d.startDate && (this.startDate = a(d.startDate)), "object" == typeof d.endDate && (this.endDate = a(d.endDate)), "object" == typeof d.minDate && (this.minDate = a(d.minDate)), "object" == typeof d.maxDate && (this.maxDate = a(d.maxDate)), this.minDate && this.startDate.isBefore(this.minDate) && (this.startDate = this.minDate.clone()), this.maxDate && this.endDate.isAfter(this.maxDate) && (this.endDate = this.maxDate.clone()), "string" == typeof d.applyClass && (this.applyClass = d.applyClass), "string" == typeof d.cancelClass && (this.cancelClass = d.cancelClass), "object" == typeof d.dateLimit && (this.dateLimit = d.dateLimit), "string" == typeof d.opens && (this.opens = d.opens), "string" == typeof d.drops && (this.drops = d.drops), "boolean" == typeof d.showWeekNumbers && (this.showWeekNumbers = d.showWeekNumbers), "boolean" == typeof d.showISOWeekNumbers && (this.showISOWeekNumbers = d.showISOWeekNumbers), "string" == typeof d.buttonClasses && (this.buttonClasses = d.buttonClasses), "object" == typeof d.buttonClasses && (this.buttonClasses = d.buttonClasses.join(" ")), "boolean" == typeof d.showDropdowns && (this.showDropdowns = d.showDropdowns), "boolean" == typeof d.showCustomRangeLabel && (this.showCustomRangeLabel = d.showCustomRangeLabel), "boolean" == typeof d.singleDatePicker && (this.singleDatePicker = d.singleDatePicker, this.singleDatePicker && (this.endDate = this.startDate.clone())), "boolean" == typeof d.timePicker && (this.timePicker = d.timePicker), "boolean" == typeof d.timePickerSeconds && (this.timePickerSeconds = d.timePickerSeconds), "number" == typeof d.timePickerIncrement && (this.timePickerIncrement = d.timePickerIncrement), "boolean" == typeof d.timePicker24Hour && (this.timePicker24Hour = d.timePicker24Hour), "boolean" == typeof d.autoApply && (this.autoApply = d.autoApply), "boolean" == typeof d.autoUpdateInput && (this.autoUpdateInput = d.autoUpdateInput), "boolean" == typeof d.linkedCalendars && (this.linkedCalendars = d.linkedCalendars), "function" == typeof d.isInvalidDate && (this.isInvalidDate = d.isInvalidDate), "function" == typeof d.isCustomDate && (this.isCustomDate = d.isCustomDate), "boolean" == typeof d.alwaysShowCalendars && (this.alwaysShowCalendars = d.alwaysShowCalendars), 0 != this.locale.firstDay)
for (var f = this.locale.firstDay; f > 0;) this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()), f--;
var g, h, i;
if ("undefined" == typeof d.startDate && "undefined" == typeof d.endDate && b(this.element).is("input[type=text]")) {
var j = b(this.element).val(),
k = j.split(this.locale.separator);
g = h = null, 2 == k.length ? (g = a(k[0], this.locale.format), h = a(k[1], this.locale.format)) : this.singleDatePicker && "" !== j && (g = a(j, this.locale.format), h = a(j, this.locale.format)), null !== g && null !== h && (this.setStartDate(g), this.setEndDate(h))
}
if ("object" == typeof d.ranges) {
for (i in d.ranges) {
g = "string" == typeof d.ranges[i][0] ? a(d.ranges[i][0], this.locale.format) : a(d.ranges[i][0]), h = "string" == typeof d.ranges[i][1] ? a(d.ranges[i][1], this.locale.format) : a(d.ranges[i][1]), this.minDate && g.isBefore(this.minDate) && (g = this.minDate.clone());
var l = this.maxDate;
if (this.dateLimit && l && g.clone().add(this.dateLimit).isAfter(l) && (l = g.clone().add(this.dateLimit)), l && h.isAfter(l) && (h = l.clone()), !(this.minDate && h.isBefore(this.minDate, this.timepicker ? "minute" : "day") || l && g.isAfter(l, this.timepicker ? "minute" : "day"))) {
var m = document.createElement("textarea");
m.innerHTML = i;
var n = m.value;
this.ranges[n] = [g, h]
}
}
var o = "<ul>";
for (i in this.ranges) o += '<li data-range-key="' + i + '">' + i + "</li>";
this.showCustomRangeLabel && (o += '<li data-range-key="' + this.locale.customRangeLabel + '">' + this.locale.customRangeLabel + "</li>"), o += "</ul>", this.container.find(".ranges").prepend(o)
}
"function" == typeof e && (this.callback = e), this.timePicker || (this.startDate = this.startDate.startOf("day"), this.endDate = this.endDate.endOf("day"), this.container.find(".calendar-time").hide()), this.timePicker && this.autoApply && (this.autoApply = !1), this.autoApply && "object" != typeof d.ranges ? this.container.find(".ranges").hide() : this.autoApply && this.container.find(".applyBtn, .cancelBtn").addClass("hide"), this.singleDatePicker && (this.container.addClass("single"), this.container.find(".calendar.left").addClass("single"), this.container.find(".calendar.left").show(), this.container.find(".calendar.right").hide(), this.container.find(".daterangepicker_input input, .daterangepicker_input > i").hide(), this.timePicker ? this.container.find(".ranges ul").hide() : this.container.find(".ranges").hide()), ("undefined" == typeof d.ranges && !this.singleDatePicker || this.alwaysShowCalendars) && this.container.addClass("show-calendar"), this.container.addClass("opens" + this.opens), "undefined" != typeof d.ranges && "right" == this.opens && this.container.find(".ranges").prependTo(this.container.find(".calendar.left").parent()), this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses), this.applyClass.length && this.container.find(".applyBtn").addClass(this.applyClass), this.cancelClass.length && this.container.find(".cancelBtn").addClass(this.cancelClass), this.container.find(".applyBtn").html(this.locale.applyLabel), this.container.find(".cancelBtn").html(this.locale.cancelLabel), this.container.find(".calendar").on("click.daterangepicker", ".prev", b.proxy(this.clickPrev, this)).on("click.daterangepicker", ".next", b.proxy(this.clickNext, this)).on("mousedown.daterangepicker", "td.available", b.proxy(this.clickDate, this)).on("mouseenter.daterangepicker", "td.available", b.proxy(this.hoverDate, this)).on("mouseleave.daterangepicker", "td.available", b.proxy(this.updateFormInputs, this)).on("change.daterangepicker", "select.yearselect", b.proxy(this.monthOrYearChanged, this)).on("change.daterangepicker", "select.monthselect", b.proxy(this.monthOrYearChanged, this)).on("change.daterangepicker", "select.hourselect,select.minuteselect,select.secondselect,select.ampmselect", b.proxy(this.timeChanged, this)).on("click.daterangepicker", ".daterangepicker_input input", b.proxy(this.showCalendars, this)).on("focus.daterangepicker", ".daterangepicker_input input", b.proxy(this.formInputsFocused, this)).on("blur.daterangepicker", ".daterangepicker_input input", b.proxy(this.formInputsBlurred, this)).on("change.daterangepicker", ".daterangepicker_input input", b.proxy(this.formInputsChanged, this)), this.container.find(".ranges").on("click.daterangepicker", "button.applyBtn", b.proxy(this.clickApply, this)).on("click.daterangepicker", "button.cancelBtn", b.proxy(this.clickCancel, this)).on("click.daterangepicker", "li", b.proxy(this.clickRange, this)).on("mouseenter.daterangepicker", "li", b.proxy(this.hoverRange, this)).on("mouseleave.daterangepicker", "li", b.proxy(this.updateFormInputs, this)), this.element.is("input") || this.element.is("button") ? this.element.on({
"click.daterangepicker": b.proxy(this.show, this),
"focus.daterangepicker": b.proxy(this.show, this),
"keyup.daterangepicker": b.proxy(this.elementChanged, this),
"keydown.daterangepicker": b.proxy(this.keydown, this)
}) : this.element.on("click.daterangepicker", b.proxy(this.toggle, this)), this.element.is("input") && !this.singleDatePicker && this.autoUpdateInput ? (this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)), this.element.trigger("change")) : this.element.is("input") && this.autoUpdateInput && (this.element.val(this.startDate.format(this.locale.format)), this.element.trigger("change"))
};
return c.prototype = {
constructor: c,
setStartDate: function(b) {
"string" == typeof b && (this.startDate = a(b, this.locale.format)), "object" == typeof b && (this.startDate = a(b)), this.timePicker || (this.startDate = this.startDate.startOf("day")), this.timePicker && this.timePickerIncrement && this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement), this.minDate && this.startDate.isBefore(this.minDate) && (this.startDate = this.minDate, this.timePicker && this.timePickerIncrement && this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement)), this.maxDate && this.startDate.isAfter(this.maxDate) && (this.startDate = this.maxDate, this.timePicker && this.timePickerIncrement && this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement)), this.isShowing || this.updateElement(), this.updateMonthsInView()
},
setEndDate: function(b) {
"string" == typeof b && (this.endDate = a(b, this.locale.format)), "object" == typeof b && (this.endDate = a(b)), this.timePicker || (this.endDate = this.endDate.endOf("day")), this.timePicker && this.timePickerIncrement && this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement), this.endDate.isBefore(this.startDate) && (this.endDate = this.startDate.clone()), this.maxDate && this.endDate.isAfter(this.maxDate) && (this.endDate = this.maxDate), this.dateLimit && this.startDate.clone().add(this.dateLimit).isBefore(this.endDate) && (this.endDate = this.startDate.clone().add(this.dateLimit)), this.previousRightTime = this.endDate.clone(), this.isShowing || this.updateElement(), this.updateMonthsInView()
},
isInvalidDate: function() {
return !1
},
isCustomDate: function() {
return !1
},
updateView: function() {
this.timePicker && (this.renderTimePicker("left"), this.renderTimePicker("right"), this.endDate ? this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled") : this.container.find(".right .calendar-time select").attr("disabled", "disabled").addClass("disabled")), this.endDate ? (this.container.find('input[name="daterangepicker_end"]').removeClass("active"), this.container.find('input[name="daterangepicker_start"]').addClass("active")) : (this.container.find('input[name="daterangepicker_end"]').addClass("active"), this.container.find('input[name="daterangepicker_start"]').removeClass("active")), this.updateMonthsInView(), this.updateCalendars(), this.updateFormInputs()
},
updateMonthsInView: function() {
if (this.endDate) {
if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month && (this.startDate.format("YYYY-MM") == this.leftCalendar.month.format("YYYY-MM") || this.startDate.format("YYYY-MM") == this.rightCalendar.month.format("YYYY-MM")) && (this.endDate.format("YYYY-MM") == this.leftCalendar.month.format("YYYY-MM") || this.endDate.format("YYYY-MM") == this.rightCalendar.month.format("YYYY-MM"))) return;
this.leftCalendar.month = this.startDate.clone().date(2), this.rightCalendar.month = this.linkedCalendars || this.endDate.month() == this.startDate.month() && this.endDate.year() == this.startDate.year() ? this.startDate.clone().date(2).add(1, "month") : this.endDate.clone().date(2);
} else this.leftCalendar.month.format("YYYY-MM") != this.startDate.format("YYYY-MM") && this.rightCalendar.month.format("YYYY-MM") != this.startDate.format("YYYY-MM") && (this.leftCalendar.month = this.startDate.clone().date(2), this.rightCalendar.month = this.startDate.clone().date(2).add(1, "month"));
this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate && (this.rightCalendar.month = this.maxDate.clone().date(2), this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, "month"))
},
updateCalendars: function() {
if (this.timePicker) {
var a, b, c;
if (this.endDate) {
if (a = parseInt(this.container.find(".left .hourselect").val(), 10), b = parseInt(this.container.find(".left .minuteselect").val(), 10), c = this.timePickerSeconds ? parseInt(this.container.find(".left .secondselect").val(), 10) : 0, !this.timePicker24Hour) {
var d = this.container.find(".left .ampmselect").val();
"PM" === d && 12 > a && (a += 12), "AM" === d && 12 === a && (a = 0)
}
} else if (a = parseInt(this.container.find(".right .hourselect").val(), 10), b = parseInt(this.container.find(".right .minuteselect").val(), 10), c = this.timePickerSeconds ? parseInt(this.container.find(".right .secondselect").val(), 10) : 0, !this.timePicker24Hour) {
var d = this.container.find(".right .ampmselect").val();
"PM" === d && 12 > a && (a += 12), "AM" === d && 12 === a && (a = 0)
}
this.leftCalendar.month.hour(a).minute(b).second(c), this.rightCalendar.month.hour(a).minute(b).second(c)
}
this.renderCalendar("left"), this.renderCalendar("right"), this.container.find(".ranges li").removeClass("active"), null != this.endDate && this.calculateChosenLabel()
},
renderCalendar: function(c) {
var d = "left" == c ? this.leftCalendar : this.rightCalendar,
e = d.month.month(),
f = d.month.year(),
g = d.month.hour(),
h = d.month.minute(),
i = d.month.second(),
j = a([f, e]).daysInMonth(),
k = a([f, e, 1]),
l = a([f, e, j]),
m = a(k).subtract(1, "month").month(),
n = a(k).subtract(1, "month").year(),
o = a([n, m]).daysInMonth(),
p = k.day(),
d = [];
d.firstDay = k, d.lastDay = l;
for (var q = 0; 6 > q; q++) d[q] = [];
var r = o - p + this.locale.firstDay + 1;
r > o && (r -= 7), p == this.locale.firstDay && (r = o - 6);
for (var s, t, u = a([n, m, r, 12, h, i]), q = 0, s = 0, t = 0; 42 > q; q++, s++, u = a(u).add(24, "hour")) q > 0 && s % 7 === 0 && (s = 0, t++), d[t][s] = u.clone().hour(g).minute(h).second(i), u.hour(12), this.minDate && d[t][s].format("YYYY-MM-DD") == this.minDate.format("YYYY-MM-DD") && d[t][s].isBefore(this.minDate) && "left" == c && (d[t][s] = this.minDate.clone()), this.maxDate && d[t][s].format("YYYY-MM-DD") == this.maxDate.format("YYYY-MM-DD") && d[t][s].isAfter(this.maxDate) && "right" == c && (d[t][s] = this.maxDate.clone());
"left" == c ? this.leftCalendar.calendar = d : this.rightCalendar.calendar = d;
var v = "left" == c ? this.minDate : this.startDate,
w = this.maxDate,
x = ("left" == c ? this.startDate : this.endDate, "ltr" == this.locale.direction ? {
left: "chevron-left",
right: "chevron-right"
} : {
left: "chevron-right",
right: "chevron-left"
}),
y = '<table class="table-condensed">';
y += "<thead>", y += "<tr>", (this.showWeekNumbers || this.showISOWeekNumbers) && (y += "<th></th>"), y += v && !v.isBefore(d.firstDay) || this.linkedCalendars && "left" != c ? "<th></th>" : '<th class="prev available"><i class="fa fa-' + x.left + " glyphicon glyphicon-" + x.left + '"></i></th>';
var z = this.locale.monthNames[d[1][1].month()] + d[1][1].format(" YYYY");
if (this.showDropdowns) {
for (var A = d[1][1].month(), B = d[1][1].year(), C = w && w.year() || B + 5, D = v && v.year() || B - 50, E = B == D, F = B == C, G = '<select class="monthselect">', H = 0; 12 > H; H++) G += (!E || H >= v.month()) && (!F || H <= w.month()) ? "<option value='" + H + "'" + (H === A ? " selected='selected'" : "") + ">" + this.locale.monthNames[H] + "</option>" : "<option value='" + H + "'" + (H === A ? " selected='selected'" : "") + " disabled='disabled'>" + this.locale.monthNames[H] + "</option>";
G += "</select>";
for (var I = '<select class="yearselect">', J = D; C >= J; J++) I += '<option value="' + J + '"' + (J === B ? ' selected="selected"' : "") + ">" + J + "</option>";
I += "</select>", z = G + I
}
if (y += '<th colspan="5" class="month">' + z + "</th>", y += w && !w.isAfter(d.lastDay) || this.linkedCalendars && "right" != c && !this.singleDatePicker ? "<th></th>" : '<th class="next available"><i class="fa fa-' + x.right + " glyphicon glyphicon-" + x.right + '"></i></th>', y += "</tr>", y += "<tr>", (this.showWeekNumbers || this.showISOWeekNumbers) && (y += '<th class="week">' + this.locale.weekLabel + "</th>"), b.each(this.locale.daysOfWeek, function(a, b) {
y += "<th>" + b + "</th>"
}), y += "</tr>", y += "</thead>", y += "<tbody>", null == this.endDate && this.dateLimit) {
var K = this.startDate.clone().add(this.dateLimit).endOf("day");
(!w || K.isBefore(w)) && (w = K)
}
for (var t = 0; 6 > t; t++) {
y += "<tr>", this.showWeekNumbers ? y += '<td class="week">' + d[t][0].week() + "</td>" : this.showISOWeekNumbers && (y += '<td class="week">' + d[t][0].isoWeek() + "</td>");
for (var s = 0; 7 > s; s++) {
var L = [];
d[t][s].isSame(new Date, "day") && L.push("today"), d[t][s].isoWeekday() > 5 && L.push("weekend"), d[t][s].month() != d[1][1].month() && L.push("off"), this.minDate && d[t][s].isBefore(this.minDate, "day") && L.push("off", "disabled"), w && d[t][s].isAfter(w, "day") && L.push("off", "disabled"), this.isInvalidDate(d[t][s]) && L.push("off", "disabled"), d[t][s].format("YYYY-MM-DD") == this.startDate.format("YYYY-MM-DD") && L.push("active", "start-date"), null != this.endDate && d[t][s].format("YYYY-MM-DD") == this.endDate.format("YYYY-MM-DD") && L.push("active", "end-date"), null != this.endDate && d[t][s] > this.startDate && d[t][s] < this.endDate && L.push("in-range");
var M = this.isCustomDate(d[t][s]);
M !== !1 && ("string" == typeof M ? L.push(M) : Array.prototype.push.apply(L, M));
for (var N = "", O = !1, q = 0; q < L.length; q++) N += L[q] + " ", "disabled" == L[q] && (O = !0);
O || (N += "available"), y += '<td class="' + N.replace(/^\s+|\s+$/g, "") + '" data-title="r' + t + "c" + s + '">' + d[t][s].date() + "</td>"
}
y += "</tr>"
}
y += "</tbody>", y += "</table>", this.container.find(".calendar." + c + " .calendar-table").html(y)
},
renderTimePicker: function(a) {
if ("right" != a || this.endDate) {
var b, c, d, e = this.maxDate;
if (!this.dateLimit || this.maxDate && !this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate) || (e = this.startDate.clone().add(this.dateLimit)), "left" == a) c = this.startDate.clone(), d = this.minDate;
else if ("right" == a) {
c = this.endDate.clone(), d = this.startDate;
var f = this.container.find(".calendar.right .calendar-time div");
if (!this.endDate && "" != f.html() && (c.hour(f.find(".hourselect option:selected").val() || c.hour()), c.minute(f.find(".minuteselect option:selected").val() || c.minute()), c.second(f.find(".secondselect option:selected").val() || c.second()), !this.timePicker24Hour)) {
var g = f.find(".ampmselect option:selected").val();
"PM" === g && c.hour() < 12 && c.hour(c.hour() + 12), "AM" === g && 12 === c.hour() && c.hour(0)
}
c.isBefore(this.startDate) && (c = this.startDate.clone()), e && c.isAfter(e) && (c = e.clone())
}
b = '<select class="hourselect">';
for (var h = this.timePicker24Hour ? 0 : 1, i = this.timePicker24Hour ? 23 : 12, j = h; i >= j; j++) {
var k = j;
this.timePicker24Hour || (k = c.hour() >= 12 ? 12 == j ? 12 : j + 12 : 12 == j ? 0 : j);
var l = c.clone().hour(k),
m = !1;
d && l.minute(59).isBefore(d) && (m = !0), e && l.minute(0).isAfter(e) && (m = !0), b += k != c.hour() || m ? m ? '<option value="' + j + '" disabled="disabled" class="disabled">' + j + "</option>" : '<option value="' + j + '">' + j + "</option>" : '<option value="' + j + '" selected="selected">' + j + "</option>"
}
b += "</select> ", b += ': <select class="minuteselect">';
for (var j = 0; 60 > j; j += this.timePickerIncrement) {
var n = 10 > j ? "0" + j : j,
l = c.clone().minute(j),
m = !1;
d && l.second(59).isBefore(d) && (m = !0), e && l.second(0).isAfter(e) && (m = !0), b += c.minute() != j || m ? m ? '<option value="' + j + '" disabled="disabled" class="disabled">' + n + "</option>" : '<option value="' + j + '">' + n + "</option>" : '<option value="' + j + '" selected="selected">' + n + "</option>"
}
if (b += "</select> ", this.timePickerSeconds) {
b += ': <select class="secondselect">';
for (var j = 0; 60 > j; j++) {
var n = 10 > j ? "0" + j : j,
l = c.clone().second(j),
m = !1;
d && l.isBefore(d) && (m = !0), e && l.isAfter(e) && (m = !0), b += c.second() != j || m ? m ? '<option value="' + j + '" disabled="disabled" class="disabled">' + n + "</option>" : '<option value="' + j + '">' + n + "</option>" : '<option value="' + j + '" selected="selected">' + n + "</option>"
}
b += "</select> "
}
if (!this.timePicker24Hour) {
b += '<select class="ampmselect">';
var o = "",
p = "";
d && c.clone().hour(12).minute(0).second(0).isBefore(d) && (o = ' disabled="disabled" class="disabled"'), e && c.clone().hour(0).minute(0).second(0).isAfter(e) && (p = ' disabled="disabled" class="disabled"'), b += c.hour() >= 12 ? '<option value="AM"' + o + '>AM</option><option value="PM" selected="selected"' + p + ">PM</option>" : '<option value="AM" selected="selected"' + o + '>AM</option><option value="PM"' + p + ">PM</option>", b += "</select>"
}
this.container.find(".calendar." + a + " .calendar-time div").html(b)
}
},
updateFormInputs: function() {
this.container.find("input[name=daterangepicker_start]").is(":focus") || this.container.find("input[name=daterangepicker_end]").is(":focus") || (this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)), this.endDate && this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)), this.singleDatePicker || this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)) ? this.container.find("button.applyBtn").removeAttr("disabled") : this.container.find("button.applyBtn").attr("disabled", "disabled"))
},
move: function() {
var a, c = {
top: 0,
left: 0
},
d = b(window).width();
this.parentEl.is("body") || (c = {
top: this.parentEl.offset().top - this.parentEl.scrollTop(),
left: this.parentEl.offset().left - this.parentEl.scrollLeft()
}, d = this.parentEl[0].clientWidth + this.parentEl.offset().left), a = "up" == this.drops ? this.element.offset().top - this.container.outerHeight() - c.top : this.element.offset().top + this.element.outerHeight() - c.top, this.container["up" == this.drops ? "addClass" : "removeClass"]("dropup"), "left" == this.opens ? (this.container.css({
top: a,
right: d - this.element.offset().left - this.element.outerWidth(),
left: "auto"
}), this.container.offset().left < 0 && this.container.css({
right: "auto",
left: 9
})) : "center" == this.opens ? (this.container.css({
top: a,
left: this.element.offset().left - c.left + this.element.outerWidth() / 2 - this.container.outerWidth() / 2,
right: "auto"
}), this.container.offset().left < 0 && this.container.css({
right: "auto",
left: 9
})) : (this.container.css({
top: a,
left: this.element.offset().left - c.left,
right: "auto"
}), this.container.offset().left + this.container.outerWidth() > b(window).width() && this.container.css({
left: "auto",
right: 0
}))
},
show: function() {
this.isShowing || (this._outsideClickProxy = b.proxy(function(a) {
this.outsideClick(a)
}, this), b(document).on("mousedown.daterangepicker", this._outsideClickProxy).on("touchend.daterangepicker", this._outsideClickProxy).on("click.daterangepicker", "[data-toggle=dropdown]", this._outsideClickProxy).on("focusin.daterangepicker", this._outsideClickProxy), b(window).on("resize.daterangepicker", b.proxy(function(a) {
this.move(a)
}, this)), this.oldStartDate = this.startDate.clone(), this.oldEndDate = this.endDate.clone(), this.previousRightTime = this.endDate.clone(), this.updateView(), this.container.show(), this.move(), this.element.trigger("show.daterangepicker", this), this.isShowing = !0)
},
hide: function() {
this.isShowing && (this.endDate || (this.startDate = this.oldStartDate.clone(), this.endDate = this.oldEndDate.clone()), this.startDate.isSame(this.oldStartDate) && this.endDate.isSame(this.oldEndDate) || this.callback(this.startDate, this.endDate, this.chosenLabel), this.updateElement(), b(document).off(".daterangepicker"), b(window).off(".daterangepicker"), this.container.hide(), this.element.trigger("hide.daterangepicker", this), this.isShowing = !1)
},
toggle: function() {
this.isShowing ? this.hide() : this.show()
},
outsideClick: function(a) {
var c = b(a.target);
"focusin" == a.type || c.closest(this.element).length || c.closest(this.container).length || c.closest(".calendar-table").length || (this.hide(), this.element.trigger("outsideClick.daterangepicker", this))
},
showCalendars: function() {
this.container.addClass("show-calendar"), this.move(), this.element.trigger("showCalendar.daterangepicker", this)
},
hideCalendars: function() {
this.container.removeClass("show-calendar"), this.element.trigger("hideCalendar.daterangepicker", this)
},
hoverRange: function(a) {
if (!this.container.find("input[name=daterangepicker_start]").is(":focus") && !this.container.find("input[name=daterangepicker_end]").is(":focus")) {
var b = a.target.getAttribute("data-range-key");
if (b == this.locale.customRangeLabel) this.updateView();
else {
var c = this.ranges[b];
this.container.find("input[name=daterangepicker_start]").val(c[0].format(this.locale.format)), this.container.find("input[name=daterangepicker_end]").val(c[1].format(this.locale.format))
}
}
},
clickRange: function(a) {
var b = a.target.getAttribute("data-range-key");
if (this.chosenLabel = b, b == this.locale.customRangeLabel) this.showCalendars();
else {
var c = this.ranges[b];
this.startDate = c[0], this.endDate = c[1], this.timePicker || (this.startDate.startOf("day"), this.endDate.endOf("day")), this.alwaysShowCalendars || this.hideCalendars(), this.clickApply()
}
},
clickPrev: function(a) {
var c = b(a.target).parents(".calendar");
c.hasClass("left") ? (this.leftCalendar.month.subtract(1, "month"), this.linkedCalendars && this.rightCalendar.month.subtract(1, "month")) : this.rightCalendar.month.subtract(1, "month"), this.updateCalendars()
},
clickNext: function(a) {
var c = b(a.target).parents(".calendar");
c.hasClass("left") ? this.leftCalendar.month.add(1, "month") : (this.rightCalendar.month.add(1, "month"), this.linkedCalendars && this.leftCalendar.month.add(1, "month")), this.updateCalendars()
},
hoverDate: function(a) {
if (b(a.target).hasClass("available")) {
var c = b(a.target).attr("data-title"),
d = c.substr(1, 1),
e = c.substr(3, 1),
f = b(a.target).parents(".calendar"),
g = f.hasClass("left") ? this.leftCalendar.calendar[d][e] : this.rightCalendar.calendar[d][e];
this.endDate && !this.container.find("input[name=daterangepicker_start]").is(":focus") ? this.container.find("input[name=daterangepicker_start]").val(g.format(this.locale.format)) : this.endDate || this.container.find("input[name=daterangepicker_end]").is(":focus") || this.container.find("input[name=daterangepicker_end]").val(g.format(this.locale.format));
var h = this.leftCalendar,
i = this.rightCalendar,
j = this.startDate;
this.endDate || this.container.find(".calendar td").each(function(a, c) {
if (!b(c).hasClass("week")) {
var d = b(c).attr("data-title"),
e = d.substr(1, 1),
f = d.substr(3, 1),
k = b(c).parents(".calendar"),
l = k.hasClass("left") ? h.calendar[e][f] : i.calendar[e][f];
l.isAfter(j) && l.isBefore(g) || l.isSame(g, "day") ? b(c).addClass("in-range") : b(c).removeClass("in-range")
}
})
}
},
clickDate: function(a) {
if (b(a.target).hasClass("available")) {
var c = b(a.target).attr("data-title"),
d = c.substr(1, 1),
e = c.substr(3, 1),
f = b(a.target).parents(".calendar"),
g = f.hasClass("left") ? this.leftCalendar.calendar[d][e] : this.rightCalendar.calendar[d][e];
if (this.endDate || g.isBefore(this.startDate, "day")) {
if (this.timePicker) {
var h = parseInt(this.container.find(".left .hourselect").val(), 10);
if (!this.timePicker24Hour) {
var i = this.container.find(".left .ampmselect").val();
"PM" === i && 12 > h && (h += 12), "AM" === i && 12 === h && (h = 0)
}
var j = parseInt(this.container.find(".left .minuteselect").val(), 10),
k = this.timePickerSeconds ? parseInt(this.container.find(".left .secondselect").val(), 10) : 0;
g = g.clone().hour(h).minute(j).second(k)
}
this.endDate = null, this.setStartDate(g.clone())
} else if (!this.endDate && g.isBefore(this.startDate)) this.setEndDate(this.startDate.clone());
else {
if (this.timePicker) {
var h = parseInt(this.container.find(".right .hourselect").val(), 10);
if (!this.timePicker24Hour) {
var i = this.container.find(".right .ampmselect").val();
"PM" === i && 12 > h && (h += 12), "AM" === i && 12 === h && (h = 0)
}
var j = parseInt(this.container.find(".right .minuteselect").val(), 10),
k = this.timePickerSeconds ? parseInt(this.container.find(".right .secondselect").val(), 10) : 0;
g = g.clone().hour(h).minute(j).second(k)
}
this.setEndDate(g.clone()), this.autoApply && (this.calculateChosenLabel(), this.clickApply())
}
this.singleDatePicker && (this.setEndDate(this.startDate), this.timePicker || this.clickApply()), this.updateView(), a.stopPropagation()
}
},
calculateChosenLabel: function() {
var a = !0,
b = 0;
for (var c in this.ranges) {
if (this.timePicker) {
if (this.startDate.isSame(this.ranges[c][0]) && this.endDate.isSame(this.ranges[c][1])) {
a = !1, this.chosenLabel = this.container.find(".ranges li:eq(" + b + ")").addClass("active").html();
break
}
} else if (this.startDate.format("YYYY-MM-DD") == this.ranges[c][0].format("YYYY-MM-DD") && this.endDate.format("YYYY-MM-DD") == this.ranges[c][1].format("YYYY-MM-DD")) {
a = !1, this.chosenLabel = this.container.find(".ranges li:eq(" + b + ")").addClass("active").html();
break
}
b++
}
a && this.showCustomRangeLabel && (this.chosenLabel = this.container.find(".ranges li:last").addClass("active").html(), this.showCalendars())
},
clickApply: function() {
this.hide(), this.element.trigger("apply.daterangepicker", this)
},
clickCancel: function() {
this.startDate = this.oldStartDate, this.endDate = this.oldEndDate, this.hide(), this.element.trigger("cancel.daterangepicker", this)
},
monthOrYearChanged: function(a) {
var c = b(a.target).closest(".calendar").hasClass("left"),
d = c ? "left" : "right",
e = this.container.find(".calendar." + d),
f = parseInt(e.find(".monthselect").val(), 10),
g = e.find(".yearselect").val();
c || (g < this.startDate.year() || g == this.startDate.year() && f < this.startDate.month()) && (f = this.startDate.month(), g = this.startDate.year()), this.minDate && (g < this.minDate.year() || g == this.minDate.year() && f < this.minDate.month()) && (f = this.minDate.month(), g = this.minDate.year()), this.maxDate && (g > this.maxDate.year() || g == this.maxDate.year() && f > this.maxDate.month()) && (f = this.maxDate.month(), g = this.maxDate.year()), c ? (this.leftCalendar.month.month(f).year(g), this.linkedCalendars && (this.rightCalendar.month = this.leftCalendar.month.clone().add(1, "month"))) : (this.rightCalendar.month.month(f).year(g), this.linkedCalendars && (this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, "month"))), this.updateCalendars()
},
timeChanged: function(a) {
var c = b(a.target).closest(".calendar"),
d = c.hasClass("left"),
e = parseInt(c.find(".hourselect").val(), 10),
f = parseInt(c.find(".minuteselect").val(), 10),
g = this.timePickerSeconds ? parseInt(c.find(".secondselect").val(), 10) : 0;
if (!this.timePicker24Hour) {
var h = c.find(".ampmselect").val();
"PM" === h && 12 > e && (e += 12), "AM" === h && 12 === e && (e = 0)
}
if (d) {
var i = this.startDate.clone();
i.hour(e), i.minute(f), i.second(g), this.setStartDate(i), this.singleDatePicker ? this.endDate = this.startDate.clone() : this.endDate && this.endDate.format("YYYY-MM-DD") == i.format("YYYY-MM-DD") && this.endDate.isBefore(i) && this.setEndDate(i.clone())
} else if (this.endDate) {
var j = this.endDate.clone();
j.hour(e), j.minute(f), j.second(g), this.setEndDate(j)
}
this.updateCalendars(), this.updateFormInputs(), this.renderTimePicker("left"), this.renderTimePicker("right")
},
formInputsChanged: function(c) {
var d = b(c.target).closest(".calendar").hasClass("right"),
e = a(this.container.find('input[name="daterangepicker_start"]').val(), this.locale.format),
f = a(this.container.find('input[name="daterangepicker_end"]').val(), this.locale.format);
e.isValid() && f.isValid() && (d && f.isBefore(e) && (e = f.clone()), this.setStartDate(e), this.setEndDate(f), d ? this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)) : this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))), this.updateView()
},
formInputsFocused: function(a) {
this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass("active"), b(a.target).addClass("active");
var c = b(a.target).closest(".calendar").hasClass("right");
c && (this.endDate = null, this.setStartDate(this.startDate.clone()), this.updateView())
},
formInputsBlurred: function() {
if (!this.endDate) {
var b = this.container.find('input[name="daterangepicker_end"]').val(),
c = a(b, this.locale.format);
c.isValid() && (this.setEndDate(c), this.updateView())
}
},
elementChanged: function() {
if (this.element.is("input") && this.element.val().length && !(this.element.val().length < this.locale.format.length)) {
var b = this.element.val().split(this.locale.separator),
c = null,
d = null;
2 === b.length && (c = a(b[0], this.locale.format), d = a(b[1], this.locale.format)), (this.singleDatePicker || null === c || null === d) && (c = a(this.element.val(), this.locale.format), d = c), c.isValid() && d.isValid() && (this.setStartDate(c), this.setEndDate(d), this.updateView())
}
},
keydown: function(a) {
(9 === a.keyCode || 13 === a.keyCode) && this.hide()
},
updateElement: function() {
this.element.is("input") && !this.singleDatePicker && this.autoUpdateInput ? (this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)), this.element.trigger("change")) : this.element.is("input") && this.autoUpdateInput && (this.element.val(this.startDate.format(this.locale.format)), this.element.trigger("change"))
},
remove: function() {
this.container.remove(), this.element.off(".daterangepicker"), this.element.removeData()
}
}, b.fn.daterangepicker = function(a, d) {
return this.each(function() {
var e = b(this);
e.data("daterangepicker") && e.data("daterangepicker").remove(), e.data("daterangepicker", new c(e, a, d))
}), this
}, c
}), function(a, b) {
"function" == typeof define && define.amd ? define(["jquery"], function(a) {
return b(a)
}) : "object" == typeof exports ? module.exports = b(require("jquery")) : b(jQuery)
}(this, function(a) {
! function(a) {
"use strict";
function b(b) {
var c = [{
re: /[\xC0-\xC6]/g,
ch: "A"
}, {
re: /[\xE0-\xE6]/g,
ch: "a"
}, {
re: /[\xC8-\xCB]/g,
ch: "E"
}, {
re: /[\xE8-\xEB]/g,
ch: "e"
}, {
re: /[\xCC-\xCF]/g,
ch: "I"
}, {
re: /[\xEC-\xEF]/g,
ch: "i"
}, {
re: /[\xD2-\xD6]/g,
ch: "O"
}, {
re: /[\xF2-\xF6]/g,
ch: "o"
}, {
re: /[\xD9-\xDC]/g,
ch: "U"
}, {
re: /[\xF9-\xFC]/g,
ch: "u"
}, {
re: /[\xC7-\xE7]/g,
ch: "c"
}, {
re: /[\xD1]/g,
ch: "N"
}, {
re: /[\xF1]/g,
ch: "n"
}];
return a.each(c, function() {
b = b.replace(this.re, this.ch)
}), b
}
function c(a) {
var b = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"`": "`"
},
c = "(?:" + Object.keys(b).join("|") + ")",
d = new RegExp(c),
e = new RegExp(c, "g"),
f = null == a ? "" : "" + a;
return d.test(f) ? f.replace(e, function(a) {
return b[a]
}) : f
}
function d(b, c) {
var d = arguments,
f = b,
g = c;
[].shift.apply(d);
var h, i = this.each(function() {
var b = a(this);
if (b.is("select")) {
var c = b.data("selectpicker"),
i = "object" == typeof f && f;
if (c) {
if (i)
for (var j in i) i.hasOwnProperty(j) && (c.options[j] = i[j])
} else {
var k = a.extend({}, e.DEFAULTS, a.fn.selectpicker.defaults || {}, b.data(), i);
k.template = a.extend({}, e.DEFAULTS.template, a.fn.selectpicker.defaults ? a.fn.selectpicker.defaults.template : {}, b.data().template, i.template), b.data("selectpicker", c = new e(this, k, g))
}
"string" == typeof f && (h = c[f] instanceof Function ? c[f].apply(c, d) : c.options[f])
}
});
return "undefined" != typeof h ? h : i
}
String.prototype.includes || ! function() {
var a = {}.toString,
b = function() {
try {
var a = {},
b = Object.defineProperty,
c = b(a, a, a) && b
} catch (d) {}
return c
}(),
c = "".indexOf,
d = function(b) {
if (null == this) throw new TypeError;
var d = String(this);
if (b && "[object RegExp]" == a.call(b)) throw new TypeError;
var e = d.length,
f = String(b),
g = f.length,
h = arguments.length > 1 ? arguments[1] : void 0,
i = h ? Number(h) : 0;
i != i && (i = 0);
var j = Math.min(Math.max(i, 0), e);
return g + j > e ? !1 : -1 != c.call(d, f, i)
};
b ? b(String.prototype, "includes", {
value: d,
configurable: !0,
writable: !0
}) : String.prototype.includes = d
}(), String.prototype.startsWith || ! function() {
var a = function() {
try {
var a = {},
b = Object.defineProperty,
c = b(a, a, a) && b
} catch (d) {}
return c
}(),
b = {}.toString,
c = function(a) {
if (null == this) throw new TypeError;
var c = String(this);
if (a && "[object RegExp]" == b.call(a)) throw new TypeError;
var d = c.length,
e = String(a),
f = e.length,
g = arguments.length > 1 ? arguments[1] : void 0,
h = g ? Number(g) : 0;
h != h && (h = 0);
var i = Math.min(Math.max(h, 0), d);
if (f + i > d) return !1;
for (var j = -1; ++j < f;)
if (c.charCodeAt(i + j) != e.charCodeAt(j)) return !1;
return !0
};
a ? a(String.prototype, "startsWith", {
value: c,
configurable: !0,
writable: !0
}) : String.prototype.startsWith = c
}(), Object.keys || (Object.keys = function(a, b, c) {
c = [];
for (b in a) c.hasOwnProperty.call(a, b) && c.push(b);
return c
}), a.fn.triggerNative = function(a) {
var b, c = this[0];
c.dispatchEvent ? ("function" == typeof Event ? b = new Event(a, {
bubbles: !0
}) : (b = document.createEvent("Event"), b.initEvent(a, !0, !1)), c.dispatchEvent(b)) : (c.fireEvent && (b = document.createEventObject(), b.eventType = a, c.fireEvent("on" + a, b)), this.trigger(a))
}, a.expr[":"].icontains = function(b, c, d) {
var e = a(b),
f = (e.data("tokens") || e.text()).toUpperCase();
return f.includes(d[3].toUpperCase())
}, a.expr[":"].ibegins = function(b, c, d) {
var e = a(b),
f = (e.data("tokens") || e.text()).toUpperCase();
return f.startsWith(d[3].toUpperCase())
}, a.expr[":"].aicontains = function(b, c, d) {
var e = a(b),
f = (e.data("tokens") || e.data("normalizedText") || e.text()).toUpperCase();
return f.includes(d[3].toUpperCase())
}, a.expr[":"].aibegins = function(b, c, d) {
var e = a(b),
f = (e.data("tokens") || e.data("normalizedText") || e.text()).toUpperCase();
return f.startsWith(d[3].toUpperCase())
};
var e = function(b, c, d) {
d && (d.stopPropagation(), d.preventDefault()), this.$element = a(b), this.$newElement = null, this.$button = null, this.$menu = null, this.$lis = null, this.options = c, null === this.options.title && (this.options.title = this.$element.attr("title")), this.val = e.prototype.val, this.render = e.prototype.render, this.refresh = e.prototype.refresh, this.setStyle = e.prototype.setStyle, this.selectAll = e.prototype.selectAll, this.deselectAll = e.prototype.deselectAll, this.destroy = e.prototype.destroy, this.remove = e.prototype.remove, this.show = e.prototype.show, this.hide = e.prototype.hide, this.init()
};
e.VERSION = "1.10.0", e.DEFAULTS = {
noneSelectedText: "Nothing selected",
noneResultsText: "No results matched {0}",
countSelectedText: function(a) {
return 1 == a ? "{0} item selected" : "{0} items selected"
},
maxOptionsText: function(a, b) {
return [1 == a ? "Limit reached ({n} item max)" : "Limit reached ({n} items max)", 1 == b ? "Group limit reached ({n} item max)" : "Group limit reached ({n} items max)"]
},
selectAllText: "Select All",
deselectAllText: "Deselect All",
doneButton: !1,
doneButtonText: "Close",
multipleSeparator: ", ",
styleBase: "btn",
style: "btn-default",
size: "auto",
title: null,
selectedTextFormat: "values",
width: !1,
container: !1,
hideDisabled: !1,
showSubtext: !1,
showIcon: !0,
showContent: !0,
dropupAuto: !0,
header: !1,
liveSearch: !1,
liveSearchPlaceholder: null,
liveSearchNormalize: !1,
liveSearchStyle: "contains",
actionsBox: !1,
iconBase: "glyphicon",
tickIcon: "glyphicon-ok",
showTick: !1,
template: {
caret: '<span class="caret"></span>'
},
maxOptions: !1,
mobile: !1,
selectOnTab: !1,
dropdownAlignRight: !1
}, e.prototype = {
constructor: e,
init: function() {
var b = this,
c = this.$element.attr("id");
this.$element.addClass("bs-select-hidden"), this.liObj = {}, this.multiple = this.$element.prop("multiple"), this.autofocus = this.$element.prop("autofocus"), this.$newElement = this.createView(), this.$element.after(this.$newElement).appendTo(this.$newElement), this.$button = this.$newElement.children("button"), this.$menu = this.$newElement.children(".dropdown-menu"), this.$menuInner = this.$menu.children(".inner"), this.$searchbox = this.$menu.find("input"), this.$element.removeClass("bs-select-hidden"), this.options.dropdownAlignRight && this.$menu.addClass("dropdown-menu-right"), "undefined" != typeof c && (this.$button.attr("data-id", c), a('label[for="' + c + '"]').click(function(a) {
a.preventDefault(), b.$button.focus()
})), this.checkDisabled(), this.clickListener(), this.options.liveSearch && this.liveSearchListener(), this.render(), this.setStyle(), this.setWidth(), this.options.container && this.selectPosition(), this.$menu.data("this", this), this.$newElement.data("this", this), this.options.mobile && this.mobile(), this.$newElement.on({
"hide.bs.dropdown": function(a) {
b.$element.trigger("hide.bs.select", a)
},
"hidden.bs.dropdown": function(a) {
b.$element.trigger("hidden.bs.select", a)
},
"show.bs.dropdown": function(a) {
b.$element.trigger("show.bs.select", a)
},
"shown.bs.dropdown": function(a) {
b.$element.trigger("shown.bs.select", a)
}
}), b.$element[0].hasAttribute("required") && this.$element.on("invalid", function() {
b.$button.addClass("bs-invalid").focus(), b.$element.on({
"focus.bs.select": function() {
b.$button.focus(), b.$element.off("focus.bs.select")
},
"shown.bs.select": function() {
b.$element.val(b.$element.val()).off("shown.bs.select")
},
"rendered.bs.select": function() {
this.validity.valid && b.$button.removeClass("bs-invalid"), b.$element.off("rendered.bs.select")
}
})
}), setTimeout(function() {
b.$element.trigger("loaded.bs.select")
})
},
createDropdown: function() {
var b = this.multiple || this.options.showTick ? " show-tick" : "",
d = this.$element.parent().hasClass("input-group") ? " input-group-btn" : "",
e = this.autofocus ? " autofocus" : "",
f = this.options.header ? '<div class="popover-title"><button type="button" class="close" aria-hidden="true">×</button>' + this.options.header + "</div>" : "",
g = this.options.liveSearch ? '<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"' + (null === this.options.liveSearchPlaceholder ? "" : ' placeholder="' + c(this.options.liveSearchPlaceholder) + '"') + "></div>" : "",
h = this.multiple && this.options.actionsBox ? '<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">' + this.options.selectAllText + '</button><button type="button" class="actions-btn bs-deselect-all btn btn-default">' + this.options.deselectAllText + "</button></div></div>" : "",
i = this.multiple && this.options.doneButton ? '<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">' + this.options.doneButtonText + "</button></div></div>" : "",
j = '<div class="btn-group bootstrap-select' + b + d + '"><button type="button" class="' + this.options.styleBase + ' dropdown-toggle" data-toggle="dropdown"' + e + '><span class="filter-option pull-left"></span> <span class="bs-caret">' + this.options.template.caret + '</span></button><div class="dropdown-menu open">' + f + g + h + '<ul class="dropdown-menu inner" role="menu"></ul>' + i + "</div></div>";
return a(j)
},
createView: function() {
var a = this.createDropdown(),
b = this.createLi();
return a.find("ul")[0].innerHTML = b, a
},
reloadLi: function() {
this.destroyLi();
var a = this.createLi();
this.$menuInner[0].innerHTML = a
},
destroyLi: function() {
this.$menu.find("li").remove()
},
createLi: function() {
var d = this,
e = [],
f = 0,
g = document.createElement("option"),
h = -1,
i = function(a, b, c, d) {
return "<li" + ("undefined" != typeof c & "" !== c ? ' class="' + c + '"' : "") + ("undefined" != typeof b & null !== b ? ' data-original-index="' + b + '"' : "") + ("undefined" != typeof d & null !== d ? 'data-optgroup="' + d + '"' : "") + ">" + a + "</li>"
},
j = function(a, e, f, g) {
return '<a tabindex="0"' + ("undefined" != typeof e ? ' class="' + e + '"' : "") + ("undefined" != typeof f ? ' style="' + f + '"' : "") + (d.options.liveSearchNormalize ? ' data-normalized-text="' + b(c(a)) + '"' : "") + ("undefined" != typeof g || null !== g ? ' data-tokens="' + g + '"' : "") + ">" + a + '<span class="' + d.options.iconBase + " " + d.options.tickIcon + ' check-mark"></span></a>'
};
if (this.options.title && !this.multiple && (h--, !this.$element.find(".bs-title-option").length)) {
var k = this.$element[0];
g.className = "bs-title-option", g.appendChild(document.createTextNode(this.options.title)), g.value = "", k.insertBefore(g, k.firstChild), void 0 === a(k.options[k.selectedIndex]).attr("selected") && (g.selected = !0)
}
return this.$element.find("option").each(function(b) {
var c = a(this);
if (h++, !c.hasClass("bs-title-option")) {
var g = this.className || "",
k = this.style.cssText,
l = c.data("content") ? c.data("content") : c.html(),
m = c.data("tokens") ? c.data("tokens") : null,
n = "undefined" != typeof c.data("subtext") ? '<small class="text-muted">' + c.data("subtext") + "</small>" : "",
o = "undefined" != typeof c.data("icon") ? '<span class="' + d.options.iconBase + " " + c.data("icon") + '"></span> ' : "",
p = "OPTGROUP" === this.parentNode.tagName,
q = this.disabled || p && this.parentNode.disabled;
if ("" !== o && q && (o = "<span>" + o + "</span>"), d.options.hideDisabled && q && !p) return void h--;
if (c.data("content") || (l = o + '<span class="text">' + l + n + "</span>"), p && c.data("divider") !== !0) {
var r = " " + this.parentNode.className || "";
if (0 === c.index()) {
f += 1;
var s = this.parentNode.label,
t = "undefined" != typeof c.parent().data("subtext") ? '<small class="text-muted">' + c.parent().data("subtext") + "</small>" : "",
u = c.parent().data("icon") ? '<span class="' + d.options.iconBase + " " + c.parent().data("icon") + '"></span> ' : "";
s = u + '<span class="text">' + s + t + "</span>", 0 !== b && e.length > 0 && (h++, e.push(i("", null, "divider", f + "div"))), h++, e.push(i(s, null, "dropdown-header" + r, f))
}
if (d.options.hideDisabled && q) return void h--;
e.push(i(j(l, "opt " + g + r, k, m), b, "", f))
} else c.data("divider") === !0 ? e.push(i("", b, "divider")) : c.data("hidden") === !0 ? e.push(i(j(l, g, k, m), b, "hidden is-hidden")) : (this.previousElementSibling && "OPTGROUP" === this.previousElementSibling.tagName && (h++, e.push(i("", null, "divider", f + "div"))), e.push(i(j(l, g, k, m), b)));
d.liObj[b] = h
}
}), this.multiple || 0 !== this.$element.find("option:selected").length || this.options.title || this.$element.find("option").eq(0).prop("selected", !0).attr("selected", "selected"),
e.join("")
},
findLis: function() {
return null == this.$lis && (this.$lis = this.$menu.find("li")), this.$lis
},
render: function(b) {
var c, d = this;
b !== !1 && this.$element.find("option").each(function(a) {
var b = d.findLis().eq(d.liObj[a]);
d.setDisabled(a, this.disabled || "OPTGROUP" === this.parentNode.tagName && this.parentNode.disabled, b), d.setSelected(a, this.selected, b)
}), this.tabIndex();
var e = this.$element.find("option").map(function() {
if (this.selected) {
if (d.options.hideDisabled && (this.disabled || "OPTGROUP" === this.parentNode.tagName && this.parentNode.disabled)) return;
var b, c = a(this),
e = c.data("icon") && d.options.showIcon ? '<i class="' + d.options.iconBase + " " + c.data("icon") + '"></i> ' : "";
return b = d.options.showSubtext && c.data("subtext") && !d.multiple ? ' <small class="text-muted">' + c.data("subtext") + "</small>" : "", "undefined" != typeof c.attr("title") ? c.attr("title") : c.data("content") && d.options.showContent ? c.data("content") : e + c.html() + b
}
}).toArray(),
f = this.multiple ? e.join(this.options.multipleSeparator) : e[0];
if (this.multiple && this.options.selectedTextFormat.indexOf("count") > -1) {
var g = this.options.selectedTextFormat.split(">");
if (g.length > 1 && e.length > g[1] || 1 == g.length && e.length >= 2) {
c = this.options.hideDisabled ? ", [disabled]" : "";
var h = this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]' + c).length,
i = "function" == typeof this.options.countSelectedText ? this.options.countSelectedText(e.length, h) : this.options.countSelectedText;
f = i.replace("{0}", e.length.toString()).replace("{1}", h.toString())
}
}
void 0 == this.options.title && (this.options.title = this.$element.attr("title")), "static" == this.options.selectedTextFormat && (f = this.options.title), f || (f = "undefined" != typeof this.options.title ? this.options.title : this.options.noneSelectedText), this.$button.attr("title", a.trim(f.replace(/<[^>]*>?/g, ""))), this.$button.children(".filter-option").html(f), this.$element.trigger("rendered.bs.select")
},
setStyle: function(a, b) {
this.$element.attr("class") && this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, ""));
var c = a ? a : this.options.style;
"add" == b ? this.$button.addClass(c) : "remove" == b ? this.$button.removeClass(c) : (this.$button.removeClass(this.options.style), this.$button.addClass(c))
},
liHeight: function(b) {
if (b || this.options.size !== !1 && !this.sizeInfo) {
var c = document.createElement("div"),
d = document.createElement("div"),
e = document.createElement("ul"),
f = document.createElement("li"),
g = document.createElement("li"),
h = document.createElement("a"),
i = document.createElement("span"),
j = this.options.header && this.$menu.find(".popover-title").length > 0 ? this.$menu.find(".popover-title")[0].cloneNode(!0) : null,
k = this.options.liveSearch ? document.createElement("div") : null,
l = this.options.actionsBox && this.multiple && this.$menu.find(".bs-actionsbox").length > 0 ? this.$menu.find(".bs-actionsbox")[0].cloneNode(!0) : null,
m = this.options.doneButton && this.multiple && this.$menu.find(".bs-donebutton").length > 0 ? this.$menu.find(".bs-donebutton")[0].cloneNode(!0) : null;
if (i.className = "text", c.className = this.$menu[0].parentNode.className + " open", d.className = "dropdown-menu open", e.className = "dropdown-menu inner", f.className = "divider", i.appendChild(document.createTextNode("Inner text")), h.appendChild(i), g.appendChild(h), e.appendChild(g), e.appendChild(f), j && d.appendChild(j), k) {
var n = document.createElement("span");
k.className = "bs-searchbox", n.className = "form-control", k.appendChild(n), d.appendChild(k)
}
l && d.appendChild(l), d.appendChild(e), m && d.appendChild(m), c.appendChild(d), document.body.appendChild(c);
var o = h.offsetHeight,
p = j ? j.offsetHeight : 0,
q = k ? k.offsetHeight : 0,
r = l ? l.offsetHeight : 0,
s = m ? m.offsetHeight : 0,
t = a(f).outerHeight(!0),
u = "function" == typeof getComputedStyle ? getComputedStyle(d) : !1,
v = u ? null : a(d),
w = parseInt(u ? u.paddingTop : v.css("paddingTop")) + parseInt(u ? u.paddingBottom : v.css("paddingBottom")) + parseInt(u ? u.borderTopWidth : v.css("borderTopWidth")) + parseInt(u ? u.borderBottomWidth : v.css("borderBottomWidth")),
x = w + parseInt(u ? u.marginTop : v.css("marginTop")) + parseInt(u ? u.marginBottom : v.css("marginBottom")) + 2;
document.body.removeChild(c), this.sizeInfo = {
liHeight: o,
headerHeight: p,
searchHeight: q,
actionsHeight: r,
doneButtonHeight: s,
dividerHeight: t,
menuPadding: w,
menuExtras: x
}
}
},
setSize: function() {
if (this.findLis(), this.liHeight(), this.options.header && this.$menu.css("padding-top", 0), this.options.size !== !1) {
var b, c, d, e, f = this,
g = this.$menu,
h = this.$menuInner,
i = a(window),
j = this.$newElement[0].offsetHeight,
k = this.sizeInfo.liHeight,
l = this.sizeInfo.headerHeight,
m = this.sizeInfo.searchHeight,
n = this.sizeInfo.actionsHeight,
o = this.sizeInfo.doneButtonHeight,
p = this.sizeInfo.dividerHeight,
q = this.sizeInfo.menuPadding,
r = this.sizeInfo.menuExtras,
s = this.options.hideDisabled ? ".disabled" : "",
t = function() {
d = f.$newElement.offset().top - i.scrollTop(), e = i.height() - d - j
};
if (t(), "auto" === this.options.size) {
var u = function() {
var i, j = function(b, c) {
return function(d) {
return c ? d.classList ? d.classList.contains(b) : a(d).hasClass(b) : !(d.classList ? d.classList.contains(b) : a(d).hasClass(b))
}
},
p = f.$menuInner[0].getElementsByTagName("li"),
s = Array.prototype.filter ? Array.prototype.filter.call(p, j("hidden", !1)) : f.$lis.not(".hidden"),
u = Array.prototype.filter ? Array.prototype.filter.call(s, j("dropdown-header", !0)) : s.filter(".dropdown-header");
t(), b = e - r, f.options.container ? (g.data("height") || g.data("height", g.height()), c = g.data("height")) : c = g.height(), f.options.dropupAuto && f.$newElement.toggleClass("dropup", d > e && c > b - r), f.$newElement.hasClass("dropup") && (b = d - r), i = s.length + u.length > 3 ? 3 * k + r - 2 : 0, g.css({
"max-height": b + "px",
overflow: "hidden",
"min-height": i + l + m + n + o + "px"
}), h.css({
"max-height": b - l - m - n - o - q + "px",
"overflow-y": "auto",
"min-height": Math.max(i - q, 0) + "px"
})
};
u(), this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize", u), i.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize", u)
} else if (this.options.size && "auto" != this.options.size && this.$lis.not(s).length > this.options.size) {
var v = this.$lis.not(".divider").not(s).children().slice(0, this.options.size).last().parent().index(),
w = this.$lis.slice(0, v + 1).filter(".divider").length;
b = k * this.options.size + w * p + q, f.options.container ? (g.data("height") || g.data("height", g.height()), c = g.data("height")) : c = g.height(), f.options.dropupAuto && this.$newElement.toggleClass("dropup", d > e && c > b - r), g.css({
"max-height": b + l + m + n + o + "px",
overflow: "hidden",
"min-height": ""
}), h.css({
"max-height": b - q + "px",
"overflow-y": "auto",
"min-height": ""
})
}
}
},
setWidth: function() {
if ("auto" === this.options.width) {
this.$menu.css("min-width", "0");
var a = this.$menu.parent().clone().appendTo("body"),
b = this.options.container ? this.$newElement.clone().appendTo("body") : a,
c = a.children(".dropdown-menu").outerWidth(),
d = b.css("width", "auto").children("button").outerWidth();
a.remove(), b.remove(), this.$newElement.css("width", Math.max(c, d) + "px")
} else "fit" === this.options.width ? (this.$menu.css("min-width", ""), this.$newElement.css("width", "").addClass("fit-width")) : this.options.width ? (this.$menu.css("min-width", ""), this.$newElement.css("width", this.options.width)) : (this.$menu.css("min-width", ""), this.$newElement.css("width", ""));
this.$newElement.hasClass("fit-width") && "fit" !== this.options.width && this.$newElement.removeClass("fit-width")
},
selectPosition: function() {
this.$bsContainer = a('<div class="bs-container" />');
var b, c, d = this,
e = function(a) {
d.$bsContainer.addClass(a.attr("class").replace(/form-control|fit-width/gi, "")).toggleClass("dropup", a.hasClass("dropup")), b = a.offset(), c = a.hasClass("dropup") ? 0 : a[0].offsetHeight, d.$bsContainer.css({
top: b.top + c,
left: b.left,
width: a[0].offsetWidth
})
};
this.$button.on("click", function() {
var b = a(this);
d.isDisabled() || (e(d.$newElement), d.$bsContainer.appendTo(d.options.container).toggleClass("open", !b.hasClass("open")).append(d.$menu))
}), a(window).on("resize scroll", function() {
e(d.$newElement)
}), this.$element.on("hide.bs.select", function() {
d.$menu.data("height", d.$menu.height()), d.$bsContainer.detach()
})
},
setSelected: function(a, b, c) {
c || (c = this.findLis().eq(this.liObj[a])), c.toggleClass("selected", b)
},
setDisabled: function(a, b, c) {
c || (c = this.findLis().eq(this.liObj[a])), b ? c.addClass("disabled").children("a").attr("href", "#").attr("tabindex", -1) : c.removeClass("disabled").children("a").removeAttr("href").attr("tabindex", 0)
},
isDisabled: function() {
return this.$element[0].disabled
},
checkDisabled: function() {
var a = this;
this.isDisabled() ? (this.$newElement.addClass("disabled"), this.$button.addClass("disabled").attr("tabindex", -1)) : (this.$button.hasClass("disabled") && (this.$newElement.removeClass("disabled"), this.$button.removeClass("disabled")), -1 != this.$button.attr("tabindex") || this.$element.data("tabindex") || this.$button.removeAttr("tabindex")), this.$button.click(function() {
return !a.isDisabled()
})
},
tabIndex: function() {
this.$element.data("tabindex") !== this.$element.attr("tabindex") && -98 !== this.$element.attr("tabindex") && "-98" !== this.$element.attr("tabindex") && (this.$element.data("tabindex", this.$element.attr("tabindex")), this.$button.attr("tabindex", this.$element.data("tabindex"))), this.$element.attr("tabindex", -98)
},
clickListener: function() {
var b = this,
c = a(document);
this.$newElement.on("touchstart.dropdown", ".dropdown-menu", function(a) {
a.stopPropagation()
}), c.data("spaceSelect", !1), this.$button.on("keyup", function(a) {
/(32)/.test(a.keyCode.toString(10)) && c.data("spaceSelect") && (a.preventDefault(), c.data("spaceSelect", !1))
}), this.$button.on("click", function() {
b.setSize()
}), this.$element.on("shown.bs.select", function() {
if (b.options.liveSearch || b.multiple) {
if (!b.multiple) {
var a = b.liObj[b.$element[0].selectedIndex];
if ("number" != typeof a || b.options.size === !1) return;
var c = b.$lis.eq(a)[0].offsetTop - b.$menuInner[0].offsetTop;
c = c - b.$menuInner[0].offsetHeight / 2 + b.sizeInfo.liHeight / 2, b.$menuInner[0].scrollTop = c
}
} else b.$menuInner.find(".selected a").focus()
}), this.$menuInner.on("click", "li a", function(c) {
var d = a(this),
e = d.parent().data("originalIndex"),
f = b.$element.val(),
g = b.$element.prop("selectedIndex");
if (b.multiple && c.stopPropagation(), c.preventDefault(), !b.isDisabled() && !d.parent().hasClass("disabled")) {
var h = b.$element.find("option"),
i = h.eq(e),
j = i.prop("selected"),
k = i.parent("optgroup"),
l = b.options.maxOptions,
m = k.data("maxOptions") || !1;
if (b.multiple) {
if (i.prop("selected", !j), b.setSelected(e, !j), d.blur(), l !== !1 || m !== !1) {
var n = l < h.filter(":selected").length,
o = m < k.find("option:selected").length;
if (l && n || m && o)
if (l && 1 == l) h.prop("selected", !1), i.prop("selected", !0), b.$menuInner.find(".selected").removeClass("selected"), b.setSelected(e, !0);
else if (m && 1 == m) {
k.find("option:selected").prop("selected", !1), i.prop("selected", !0);
var p = d.parent().data("optgroup");
b.$menuInner.find('[data-optgroup="' + p + '"]').removeClass("selected"), b.setSelected(e, !0)
} else {
var q = "function" == typeof b.options.maxOptionsText ? b.options.maxOptionsText(l, m) : b.options.maxOptionsText,
r = q[0].replace("{n}", l),
s = q[1].replace("{n}", m),
t = a('<div class="notify"></div>');
q[2] && (r = r.replace("{var}", q[2][l > 1 ? 0 : 1]), s = s.replace("{var}", q[2][m > 1 ? 0 : 1])), i.prop("selected", !1), b.$menu.append(t), l && n && (t.append(a("<div>" + r + "</div>")), b.$element.trigger("maxReached.bs.select")), m && o && (t.append(a("<div>" + s + "</div>")), b.$element.trigger("maxReachedGrp.bs.select")), setTimeout(function() {
b.setSelected(e, !1)
}, 10), t.delay(750).fadeOut(300, function() {
a(this).remove()
})
}
}
} else h.prop("selected", !1), i.prop("selected", !0), b.$menuInner.find(".selected").removeClass("selected"), b.setSelected(e, !0);
b.multiple ? b.options.liveSearch && b.$searchbox.focus() : b.$button.focus(), (f != b.$element.val() && b.multiple || g != b.$element.prop("selectedIndex") && !b.multiple) && b.$element.trigger("changed.bs.select", [e, i.prop("selected"), j]).triggerNative("change")
}
}), this.$menu.on("click", "li.disabled a, .popover-title, .popover-title :not(.close)", function(c) {
c.currentTarget == this && (c.preventDefault(), c.stopPropagation(), b.options.liveSearch && !a(c.target).hasClass("close") ? b.$searchbox.focus() : b.$button.focus())
}), this.$menuInner.on("click", ".divider, .dropdown-header", function(a) {
a.preventDefault(), a.stopPropagation(), b.options.liveSearch ? b.$searchbox.focus() : b.$button.focus()
}), this.$menu.on("click", ".popover-title .close", function() {
b.$button.click()
}), this.$searchbox.on("click", function(a) {
a.stopPropagation()
}), this.$menu.on("click", ".actions-btn", function(c) {
b.options.liveSearch ? b.$searchbox.focus() : b.$button.focus(), c.preventDefault(), c.stopPropagation(), a(this).hasClass("bs-select-all") ? b.selectAll() : b.deselectAll()
}), this.$element.change(function() {
b.render(!1)
})
},
liveSearchListener: function() {
var d = this,
e = a('<li class="no-results"></li>');
this.$button.on("click.dropdown.data-api touchstart.dropdown.data-api", function() {
d.$menuInner.find(".active").removeClass("active"), d.$searchbox.val() && (d.$searchbox.val(""), d.$lis.not(".is-hidden").removeClass("hidden"), e.parent().length && e.remove()), d.multiple || d.$menuInner.find(".selected").addClass("active"), setTimeout(function() {
d.$searchbox.focus()
}, 10)
}), this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api", function(a) {
a.stopPropagation()
}), this.$searchbox.on("input propertychange", function() {
if (d.$searchbox.val()) {
var f = d.$lis.not(".is-hidden").removeClass("hidden").children("a");
f = f.not(d.options.liveSearchNormalize ? ":a" + d._searchStyle() + '("' + b(d.$searchbox.val()) + '")' : ":" + d._searchStyle() + '("' + d.$searchbox.val() + '")'), f.parent().addClass("hidden"), d.$lis.filter(".dropdown-header").each(function() {
var b = a(this),
c = b.data("optgroup");
0 === d.$lis.filter("[data-optgroup=" + c + "]").not(b).not(".hidden").length && (b.addClass("hidden"), d.$lis.filter("[data-optgroup=" + c + "div]").addClass("hidden"))
});
var g = d.$lis.not(".hidden");
g.each(function(b) {
var c = a(this);
c.hasClass("divider") && (c.index() === g.first().index() || c.index() === g.last().index() || g.eq(b + 1).hasClass("divider")) && c.addClass("hidden")
}), d.$lis.not(".hidden, .no-results").length ? e.parent().length && e.remove() : (e.parent().length && e.remove(), e.html(d.options.noneResultsText.replace("{0}", '"' + c(d.$searchbox.val()) + '"')).show(), d.$menuInner.append(e))
} else d.$lis.not(".is-hidden").removeClass("hidden"), e.parent().length && e.remove();
d.$lis.filter(".active").removeClass("active"), d.$searchbox.val() && d.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(), a(this).focus()
})
},
_searchStyle: function() {
var a = {
begins: "ibegins",
startsWith: "ibegins"
};
return a[this.options.liveSearchStyle] || "icontains"
},
val: function(a) {
return "undefined" != typeof a ? (this.$element.val(a), this.render(), this.$element) : this.$element.val()
},
changeAll: function(b) {
"undefined" == typeof b && (b = !0), this.findLis();
for (var c = this.$element.find("option"), d = this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected", b), e = d.length, f = [], g = 0; e > g; g++) {
var h = d[g].getAttribute("data-original-index");
f[f.length] = c.eq(h)[0]
}
a(f).prop("selected", b), this.render(!1), this.$element.trigger("changed.bs.select").triggerNative("change")
},
selectAll: function() {
return this.changeAll(!0)
},
deselectAll: function() {
return this.changeAll(!1)
},
toggle: function(a) {
a = a || window.event, a && a.stopPropagation(), this.$button.trigger("click")
},
keydown: function(c) {
var d, e, f, g, h, i, j, k, l, m = a(this),
n = m.is("input") ? m.parent().parent() : m.parent(),
o = n.data("this"),
p = ":not(.disabled, .hidden, .dropdown-header, .divider)",
q = {
32: " ",
48: "0",
49: "1",
50: "2",
51: "3",
52: "4",
53: "5",
54: "6",
55: "7",
56: "8",
57: "9",
59: ";",
65: "a",
66: "b",
67: "c",
68: "d",
69: "e",
70: "f",
71: "g",
72: "h",
73: "i",
74: "j",
75: "k",
76: "l",
77: "m",
78: "n",
79: "o",
80: "p",
81: "q",
82: "r",
83: "s",
84: "t",
85: "u",
86: "v",
87: "w",
88: "x",
89: "y",
90: "z",
96: "0",
97: "1",
98: "2",
99: "3",
100: "4",
101: "5",
102: "6",
103: "7",
104: "8",
105: "9"
};
if (o.options.liveSearch && (n = m.parent().parent()), o.options.container && (n = o.$menu), d = a("[role=menu] li", n), l = o.$newElement.hasClass("open"), !l && (c.keyCode >= 48 && c.keyCode <= 57 || c.keyCode >= 96 && c.keyCode <= 105 || c.keyCode >= 65 && c.keyCode <= 90) && (o.options.container ? o.$button.trigger("click") : (o.setSize(), o.$menu.parent().addClass("open"), l = !0), o.$searchbox.focus()), o.options.liveSearch && (/(^9$|27)/.test(c.keyCode.toString(10)) && l && 0 === o.$menu.find(".active").length && (c.preventDefault(), o.$menu.parent().removeClass("open"), o.options.container && o.$newElement.removeClass("open"), o.$button.focus()), d = a("[role=menu] li" + p, n), m.val() || /(38|40)/.test(c.keyCode.toString(10)) || 0 === d.filter(".active").length && (d = o.$menuInner.find("li"), d = d.filter(o.options.liveSearchNormalize ? ":a" + o._searchStyle() + "(" + b(q[c.keyCode]) + ")" : ":" + o._searchStyle() + "(" + q[c.keyCode] + ")"))), d.length) {
if (/(38|40)/.test(c.keyCode.toString(10))) e = d.index(d.find("a").filter(":focus").parent()), g = d.filter(p).first().index(), h = d.filter(p).last().index(), f = d.eq(e).nextAll(p).eq(0).index(), i = d.eq(e).prevAll(p).eq(0).index(), j = d.eq(f).prevAll(p).eq(0).index(), o.options.liveSearch && (d.each(function(b) {
a(this).hasClass("disabled") || a(this).data("index", b)
}), e = d.index(d.filter(".active")), g = d.first().data("index"), h = d.last().data("index"), f = d.eq(e).nextAll().eq(0).data("index"), i = d.eq(e).prevAll().eq(0).data("index"), j = d.eq(f).prevAll().eq(0).data("index")), k = m.data("prevIndex"), 38 == c.keyCode ? (o.options.liveSearch && e--, e != j && e > i && (e = i), g > e && (e = g), e == k && (e = h)) : 40 == c.keyCode && (o.options.liveSearch && e++, -1 == e && (e = 0), e != j && f > e && (e = f), e > h && (e = h), e == k && (e = g)), m.data("prevIndex", e), o.options.liveSearch ? (c.preventDefault(), m.hasClass("dropdown-toggle") || (d.removeClass("active").eq(e).addClass("active").children("a").focus(), m.focus())) : d.eq(e).children("a").focus();
else if (!m.is("input")) {
var r, s, t = [];
d.each(function() {
a(this).hasClass("disabled") || a.trim(a(this).children("a").text().toLowerCase()).substring(0, 1) == q[c.keyCode] && t.push(a(this).index())
}), r = a(document).data("keycount"), r++, a(document).data("keycount", r), s = a.trim(a(":focus").text().toLowerCase()).substring(0, 1), s != q[c.keyCode] ? (r = 1, a(document).data("keycount", r)) : r >= t.length && (a(document).data("keycount", 0), r > t.length && (r = 1)), d.eq(t[r - 1]).children("a").focus()
}
if ((/(13|32)/.test(c.keyCode.toString(10)) || /(^9$)/.test(c.keyCode.toString(10)) && o.options.selectOnTab) && l) {
if (/(32)/.test(c.keyCode.toString(10)) || c.preventDefault(), o.options.liveSearch) /(32)/.test(c.keyCode.toString(10)) || (o.$menuInner.find(".active a").click(), m.focus());
else {
var u = a(":focus");
u.click(), u.focus(), c.preventDefault(), a(document).data("spaceSelect", !0)
}
a(document).data("keycount", 0)
}(/(^9$|27)/.test(c.keyCode.toString(10)) && l && (o.multiple || o.options.liveSearch) || /(27)/.test(c.keyCode.toString(10)) && !l) && (o.$menu.parent().removeClass("open"), o.options.container && o.$newElement.removeClass("open"), o.$button.focus())
}
},
mobile: function() {
this.$element.addClass("mobile-device")
},
refresh: function() {
this.$lis = null, this.liObj = {}, this.reloadLi(), this.render(), this.checkDisabled(), this.liHeight(!0), this.setStyle(), this.setWidth(), this.$lis && this.$searchbox.trigger("propertychange"), this.$element.trigger("refreshed.bs.select")
},
hide: function() {
this.$newElement.hide()
},
show: function() {
this.$newElement.show()
},
remove: function() {
this.$newElement.remove(), this.$element.remove()
},
destroy: function() {
this.$newElement.before(this.$element).remove(), this.$bsContainer ? this.$bsContainer.remove() : this.$menu.remove(), this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")
}
};
var f = a.fn.selectpicker;
a.fn.selectpicker = d, a.fn.selectpicker.Constructor = e, a.fn.selectpicker.noConflict = function() {
return a.fn.selectpicker = f, this
}, a(document).data("keycount", 0).on("keydown.bs.select", '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input', e.prototype.keydown).on("focusin.modal", '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input', function(a) {
a.stopPropagation()
}), a(window).on("load.bs.select.data-api", function() {
a(".selectpicker").each(function() {
var b = a(this);
d.call(b, b.data())
})
})
}(a)
}), function(a) {
"use strict";
var b = null,
c = function(a) {
var b = arguments,
c = !0,
d = 1;
return a = a.replace(/%s/g, function() {
var a = b[d++];
return "undefined" == typeof a ? (c = !1, "") : a
}), c ? a : ""
},
d = function(b, c, d, e) {
var f = "";
return a.each(b, function(a, b) {
return b[c] === e ? (f = b[d], !1) : !0
}), f
},
e = function(b, c) {
var d = -1;
return a.each(b, function(a, b) {
return b.field === c ? (d = a, !1) : !0
}), d
},
f = function(b) {
var c, d, e, f = 0,
g = [];
for (c = 0; c < b[0].length; c++) f += b[0][c].colspan || 1;
for (c = 0; c < b.length; c++)
for (g[c] = [], d = 0; f > d; d++) g[c][d] = !1;
for (c = 0; c < b.length; c++)
for (d = 0; d < b[c].length; d++) {
var h = b[c][d],
i = h.rowspan || 1,
j = h.colspan || 1,
k = a.inArray(!1, g[c]);
for (1 === j && (h.fieldIndex = k, "undefined" == typeof h.field && (h.field = k)), e = 0; i > e; e++) g[c + e][k] = !0;
for (e = 0; j > e; e++) g[c][k + e] = !0
}
},
g = function() {
if (null === b) {
var c, d, e = a("<p/>").addClass("fixed-table-scroll-inner"),
f = a("<div/>").addClass("fixed-table-scroll-outer");
f.append(e), a("body").append(f), c = e[0].offsetWidth, f.css("overflow", "scroll"), d = e[0].offsetWidth, c === d && (d = f[0].clientWidth), f.remove(), b = c - d
}
return b
},
h = function(b, d, e, f) {
var g = d;
if ("string" == typeof d) {
var h = d.split(".");
h.length > 1 ? (g = window, a.each(h, function(a, b) {
g = g[b]
})) : g = window[d]
}
return "object" == typeof g ? g : "function" == typeof g ? g.apply(b, e) : !g && "string" == typeof d && c.apply(this, [d].concat(e)) ? c.apply(this, [d].concat(e)) : f
},
i = function(b, c, d) {
var e = Object.getOwnPropertyNames(b),
f = Object.getOwnPropertyNames(c),
g = "";
if (d && e.length !== f.length) return !1;
for (var h = 0; h < e.length; h++)
if (g = e[h], a.inArray(g, f) > -1 && b[g] !== c[g]) return !1;
return !0
},
j = function(a) {
return "string" == typeof a ? a.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/`/g, "`") : a
},
k = function(b) {
var c = 0;
return b.children().each(function() {
c < a(this).outerHeight(!0) && (c = a(this).outerHeight(!0))
}), c
},
l = function(a) {
for (var b in a) {
var c = b.split(/(?=[A-Z])/).join("-").toLowerCase();
c !== b && (a[c] = a[b], delete a[b])
}
return a
},
m = function(a, b, c) {
var d = a;
if ("string" != typeof b || a.hasOwnProperty(b)) return c ? j(a[b]) : a[b];
var e = b.split(".");
for (var f in e) d = d && d[e[f]];
return c ? j(d) : d
},
n = function() {
return !!(navigator.userAgent.indexOf("MSIE ") > 0 || navigator.userAgent.match(/Trident.*rv\:11\./))
},
o = function() {
Object.keys || (Object.keys = function() {
var a = Object.prototype.hasOwnProperty,
b = !{
toString: null
}.propertyIsEnumerable("toString"),
c = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"],
d = c.length;
return function(e) {
if ("object" != typeof e && ("function" != typeof e || null === e)) throw new TypeError("Object.keys called on non-object");
var f, g, h = [];
for (f in e) a.call(e, f) && h.push(f);
if (b)
for (g = 0; d > g; g++) a.call(e, c[g]) && h.push(c[g]);
return h
}
}())
},
p = function(b, c) {
this.options = c, this.$el = a(b), this.$el_ = this.$el.clone(), this.timeoutId_ = 0, this.timeoutFooter_ = 0, this.init()
};
p.DEFAULTS = {
classes: "table table-hover",
locale: void 0,
height: void 0,
undefinedText: "-",
sortName: void 0,
sortOrder: "asc",
sortStable: !1,
striped: !1,
columns: [
[]
],
data: [],
dataField: "rows",
method: "get",
url: void 0,
ajax: void 0,
cache: !0,
contentType: "application/json",
dataType: "json",
ajaxOptions: {},
queryParams: function(a) {
return a
},
queryParamsType: "limit",
responseHandler: function(a) {
return a
},
pagination: !1,
onlyInfoPagination: !1,
sidePagination: "client",
totalRows: 0,
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50, 100],
paginationHAlign: "right",
paginationVAlign: "bottom",
paginationDetailHAlign: "left",
paginationPreText: "‹",
paginationNextText: "›",
search: !1,
searchOnEnterKey: !1,
strictSearch: !1,
searchAlign: "right",
selectItemName: "btSelectItem",
showHeader: !0,
showFooter: !1,
showColumns: !1,
showPaginationSwitch: !1,
showRefresh: !1,
showToggle: !1,
buttonsAlign: "right",
smartDisplay: !0,
escape: !1,
minimumCountColumns: 1,
idField: void 0,
uniqueId: void 0,
cardView: !1,
detailView: !1,
detailFormatter: function() {
return ""
},
trimOnSearch: !0,
clickToSelect: !1,
singleSelect: !1,
toolbar: void 0,
toolbarAlign: "left",
checkboxHeader: !0,
sortable: !0,
silentSort: !0,
maintainSelected: !1,
searchTimeOut: 500,
searchText: "",
iconSize: void 0,
buttonsClass: "default",
iconsPrefix: "glyphicon",
icons: {
paginationSwitchDown: "glyphicon-collapse-down icon-chevron-down",
paginationSwitchUp: "glyphicon-collapse-up icon-chevron-up",
refresh: "glyphicon-refresh icon-refresh",
toggle: "glyphicon-list-alt icon-list-alt",
columns: "glyphicon-th icon-th",
detailOpen: "glyphicon-plus icon-plus",
detailClose: "glyphicon-minus icon-minus"
},
customSearch: a.noop,
customSort: a.noop,
rowStyle: function() {
return {}
},
rowAttributes: function() {
return {}
},
footerStyle: function() {
return {}
},
onAll: function() {
return !1
},
onClickCell: function() {
return !1
},
onDblClickCell: function() {
return !1
},
onClickRow: function() {
return !1
},
onDblClickRow: function() {
return !1
},
onSort: function() {
return !1
},
onCheck: function() {
return !1
},
onUncheck: function() {
return !1
},
onCheckAll: function() {
return !1
},
onUncheckAll: function() {
return !1
},
onCheckSome: function() {
return !1
},
onUncheckSome: function() {
return !1
},
onLoadSuccess: function() {
return !1
},
onLoadError: function() {
return !1
},
onColumnSwitch: function() {
return !1
},
onPageChange: function() {
return !1
},
onSearch: function() {
return !1
},
onToggle: function() {
return !1
},
onPreBody: function() {
return !1
},
onPostBody: function() {
return !1
},
onPostHeader: function() {
return !1
},
onExpandRow: function() {
return !1
},
onCollapseRow: function() {
return !1
},
onRefreshOptions: function() {
return !1
},
onRefresh: function() {
return !1
},
onResetView: function() {
return !1
}
}, p.LOCALES = {}, p.LOCALES["en-US"] = p.LOCALES.en = {
formatLoadingMessage: function() {
return "Loading, please wait..."
},
formatRecordsPerPage: function(a) {
return c("%s rows per page", a)
},
formatShowingRows: function(a, b, d) {
return c("Showing %s to %s of %s rows", a, b, d)
},
formatDetailPagination: function(a) {
return c("Showing %s rows", a)
},
formatSearch: function() {
return "Search"
},
formatNoMatches: function() {
return "No matching records found"
},
formatPaginationSwitch: function() {
return "Hide/Show pagination"
},
formatRefresh: function() {
return "Refresh"
},
formatToggle: function() {
return "Toggle"
},
formatColumns: function() {
return "Columns"
},
formatAllRows: function() {
return "All"
}
}, a.extend(p.DEFAULTS, p.LOCALES["en-US"]), p.COLUMN_DEFAULTS = {
radio: !1,
checkbox: !1,
checkboxEnabled: !0,
field: void 0,
title: void 0,
titleTooltip: void 0,
"class": void 0,
align: void 0,
halign: void 0,
falign: void 0,
valign: void 0,
width: void 0,
sortable: !1,
order: "asc",
visible: !0,
switchable: !0,
clickToSelect: !0,
formatter: void 0,
footerFormatter: void 0,
events: void 0,
sorter: void 0,
sortName: void 0,
cellStyle: void 0,
searchable: !0,
searchFormatter: !0,
cardVisible: !0
}, p.EVENTS = {
"all.bs.table": "onAll",
//"click-cell.bs.table": "onClickCell",
"dbl-click-cell.bs.table": "onDblClickCell",
//"click-row.bs.table": "onClickRow",
"dbl-click-row.bs.table": "onDblClickRow",
"sort.bs.table": "onSort",
"check.bs.table": "onCheck",
"uncheck.bs.table": "onUncheck",
"check-all.bs.table": "onCheckAll",
"uncheck-all.bs.table": "onUncheckAll",
"check-some.bs.table": "onCheckSome",
"uncheck-some.bs.table": "onUncheckSome",
"load-success.bs.table": "onLoadSuccess",
"load-error.bs.table": "onLoadError",
"column-switch.bs.table": "onColumnSwitch",
"page-change.bs.table": "onPageChange",
"search.bs.table": "onSearch",
"toggle.bs.table": "onToggle",
"pre-body.bs.table": "onPreBody",
"post-body.bs.table": "onPostBody",
"post-header.bs.table": "onPostHeader",
"expand-row.bs.table": "onExpandRow",
"collapse-row.bs.table": "onCollapseRow",
"refresh-options.bs.table": "onRefreshOptions",
"reset-view.bs.table": "onResetView",
"refresh.bs.table": "onRefresh"
}, p.prototype.init = function() {
this.initLocale(), this.initContainer(), this.initTable(), this.initHeader(), this.initData(), this.initFooter(), this.initToolbar(), this.initPagination(), this.initBody(), this.initSearchText(), this.initServer()
}, p.prototype.initLocale = function() {
if (this.options.locale) {
var b = this.options.locale.split(/-|_/);
b[0].toLowerCase(), b[1] && b[1].toUpperCase(), a.fn.bootstrapTable.locales[this.options.locale] ? a.extend(this.options, a.fn.bootstrapTable.locales[this.options.locale]) : a.fn.bootstrapTable.locales[b.join("-")] ? a.extend(this.options, a.fn.bootstrapTable.locales[b.join("-")]) : a.fn.bootstrapTable.locales[b[0]] && a.extend(this.options, a.fn.bootstrapTable.locales[b[0]])
}
}, p.prototype.initContainer = function() {
this.$container = a(['<div class="bootstrap-table">', '<div class="fixed-table-toolbar"></div>', "top" === this.options.paginationVAlign || "both" === this.options.paginationVAlign ? '<div class="fixed-table-pagination" style="clear: both;"></div>' : "", '<div class="fixed-table-container">', '<div class="fixed-table-header"><table></table></div>', '<div class="fixed-table-body">', '<div class="fixed-table-loading">', this.options.formatLoadingMessage(), "</div>", "</div>", '<div class="fixed-table-footer"><table><tr></tr></table></div>', "bottom" === this.options.paginationVAlign || "both" === this.options.paginationVAlign ? '<div class="fixed-table-pagination"></div>' : "", "</div>", "</div>"].join("")), this.$container.insertAfter(this.$el), this.$tableContainer = this.$container.find(".fixed-table-container"), this.$tableHeader = this.$container.find(".fixed-table-header"), this.$tableBody = this.$container.find(".fixed-table-body"), this.$tableLoading = this.$container.find(".fixed-table-loading"), this.$tableFooter = this.$container.find(".fixed-table-footer"), this.$toolbar = this.$container.find(".fixed-table-toolbar"), this.$pagination = this.$container.find(".fixed-table-pagination"), this.$tableBody.append(this.$el), this.$container.after('<div class="clearfix"></div>'), this.$el.addClass(this.options.classes), this.options.striped && this.$el.addClass("table-striped"), -1 !== a.inArray("table-no-bordered", this.options.classes.split(" ")) && this.$tableContainer.addClass("table-no-bordered")
}, p.prototype.initTable = function() {
var b = this,
c = [],
d = [];
if (this.$header = this.$el.find(">thead"), this.$header.length || (this.$header = a("<thead></thead>").appendTo(this.$el)), this.$header.find("tr").each(function() {
var b = [];
a(this).find("th").each(function() {
"undefined" != typeof a(this).data("field") && a(this).data("field", a(this).data("field") + ""), b.push(a.extend({}, {
title: a(this).html(),
"class": a(this).attr("class"),
titleTooltip: a(this).attr("title"),
rowspan: a(this).attr("rowspan") ? +a(this).attr("rowspan") : void 0,
colspan: a(this).attr("colspan") ? +a(this).attr("colspan") : void 0
}, a(this).data()))
}), c.push(b)
}), a.isArray(this.options.columns[0]) || (this.options.columns = [this.options.columns]), this.options.columns = a.extend(!0, [], c, this.options.columns), this.columns = [], f(this.options.columns), a.each(this.options.columns, function(c, d) {
a.each(d, function(d, e) {
e = a.extend({}, p.COLUMN_DEFAULTS, e), "undefined" != typeof e.fieldIndex && (b.columns[e.fieldIndex] = e), b.options.columns[c][d] = e
})
}), !this.options.data.length) {
var e = [];
this.$el.find(">tbody>tr").each(function(c) {
var f = {};
f._id = a(this).attr("id"), f._class = a(this).attr("class"), f._data = l(a(this).data()), a(this).find(">td").each(function(d) {
for (var g, h, i = a(this), j = +i.attr("colspan") || 1, k = +i.attr("rowspan") || 1; e[c] && e[c][d]; d++);
for (g = d; d + j > g; g++)
for (h = c; c + k > h; h++) e[h] || (e[h] = []), e[h][g] = !0;
var m = b.columns[d].field;
f[m] = a(this).html(), f["_" + m + "_id"] = a(this).attr("id"), f["_" + m + "_class"] = a(this).attr("class"), f["_" + m + "_rowspan"] = a(this).attr("rowspan"), f["_" + m + "_colspan"] = a(this).attr("colspan"), f["_" + m + "_title"] = a(this).attr("title"), f["_" + m + "_data"] = l(a(this).data())
}), d.push(f)
}), this.options.data = d, d.length && (this.fromHtml = !0)
}
}, p.prototype.initHeader = function() {
var b = this,
d = {},
e = [];
this.header = {
fields: [],
styles: [],
classes: [],
formatters: [],
events: [],
sorters: [],
sortNames: [],
cellStyles: [],
searchables: []
}, a.each(this.options.columns, function(f, g) {
e.push("<tr>"), 0 === f && !b.options.cardView && b.options.detailView && e.push(c('<th class="detail" rowspan="%s"><div class="fht-cell"></div></th>', b.options.columns.length)), a.each(g, function(a, f) {
var g = "",
h = "",
i = "",
j = "",
k = c(' class="%s"', f["class"]),
l = (b.options.sortOrder || f.order, "px"),
m = f.width;
if (void 0 === f.width || b.options.cardView || "string" == typeof f.width && -1 !== f.width.indexOf("%") && (l = "%"), f.width && "string" == typeof f.width && (m = f.width.replace("%", "").replace("px", "")), h = c("text-align: %s; ", f.halign ? f.halign : f.align), i = c("text-align: %s; ", f.align), j = c("vertical-align: %s; ", f.valign), j += c("width: %s; ", !f.checkbox && !f.radio || m ? m ? m + l : void 0 : "36px"),
"undefined" != typeof f.fieldIndex) {
if (b.header.fields[f.fieldIndex] = f.field, b.header.styles[f.fieldIndex] = i + j, b.header.classes[f.fieldIndex] = k, b.header.formatters[f.fieldIndex] = f.formatter, b.header.events[f.fieldIndex] = f.events, b.header.sorters[f.fieldIndex] = f.sorter, b.header.sortNames[f.fieldIndex] = f.sortName, b.header.cellStyles[f.fieldIndex] = f.cellStyle, b.header.searchables[f.fieldIndex] = f.searchable, !f.visible) return;
if (b.options.cardView && !f.cardVisible) return;
d[f.field] = f
}
e.push("<th" + c(' title="%s"', f.titleTooltip), f.checkbox || f.radio ? c(' class="bs-checkbox %s"', f["class"] || "") : k, c(' style="%s"', h + j), c(' rowspan="%s"', f.rowspan), c(' colspan="%s"', f.colspan), c(' data-field="%s"', f.field), "tabindex='0'", ">"), e.push(c('<div class="th-inner %s">', b.options.sortable && f.sortable ? "sortable both" : "")), g = f.title, f.checkbox && (!b.options.singleSelect && b.options.checkboxHeader && (g = '<input name="btSelectAll" type="checkbox" />'), b.header.stateField = f.field), f.radio && (g = "", b.header.stateField = f.field, b.options.singleSelect = !0), e.push(g), e.push("</div>"), e.push('<div class="fht-cell"></div>'), e.push("</div>"), e.push("</th>")
}), e.push("</tr>")
}), this.$header.html(e.join("")), this.$header.find("th[data-field]").each(function() {
a(this).data(d[a(this).data("field")])
}), this.$container.off("click", ".th-inner").on("click", ".th-inner", function(c) {
var d = a(this);
return b.options.detailView && d.closest(".bootstrap-table")[0] !== b.$container[0] ? !1 : void(b.options.sortable && d.parent().data().sortable && b.onSort(c))
}), this.$header.children().children().off("keypress").on("keypress", function(c) {
if (b.options.sortable && a(this).data().sortable) {
var d = c.keyCode || c.which;
13 == d && b.onSort(c)
}
}), a(window).off("resize.bootstrap-table"), !this.options.showHeader || this.options.cardView ? (this.$header.hide(), this.$tableHeader.hide(), this.$tableLoading.css("top", 0)) : (this.$header.show(), this.$tableHeader.show(), this.$tableLoading.css("top", this.$header.outerHeight() + 1), this.getCaret(), a(window).on("resize.bootstrap-table", a.proxy(this.resetWidth, this))), this.$selectAll = this.$header.find('[name="btSelectAll"]'), this.$selectAll.off("click").on("click", function() {
var c = a(this).prop("checked");
b[c ? "checkAll" : "uncheckAll"](), b.updateSelected()
})
}, p.prototype.initFooter = function() {
!this.options.showFooter || this.options.cardView ? this.$tableFooter.hide() : this.$tableFooter.show()
}, p.prototype.initData = function(a, b) {
this.data = "append" === b ? this.data.concat(a) : "prepend" === b ? [].concat(a).concat(this.data) : a || this.options.data, this.options.data = "append" === b ? this.options.data.concat(a) : "prepend" === b ? [].concat(a).concat(this.options.data) : this.data, "server" !== this.options.sidePagination && this.initSort()
}, p.prototype.initSort = function() {
var b = this,
c = this.options.sortName,
d = "desc" === this.options.sortOrder ? -1 : 1,
e = a.inArray(this.options.sortName, this.header.fields);
return this.options.customSort !== a.noop ? void this.options.customSort.apply(this, [this.options.sortName, this.options.sortOrder]) : void(-1 !== e && (this.options.sortStable && a.each(this.data, function(a, b) {
b.hasOwnProperty("_position") || (b._position = a)
}), this.data.sort(function(f, g) {
b.header.sortNames[e] && (c = b.header.sortNames[e]);
var i = m(f, c, b.options.escape),
j = m(g, c, b.options.escape),
k = h(b.header, b.header.sorters[e], [i, j]);
return void 0 !== k ? d * k : ((void 0 === i || null === i) && (i = ""), (void 0 === j || null === j) && (j = ""), b.options.sortStable && i === j && (i = f._position, j = g._position), a.isNumeric(i) && a.isNumeric(j) ? (i = parseFloat(i), j = parseFloat(j), j > i ? -1 * d : d) : i === j ? 0 : ("string" != typeof i && (i = i.toString()), -1 === i.localeCompare(j) ? -1 * d : d))
})))
}, p.prototype.onSort = function(b) {
var c = "keypress" === b.type ? a(b.currentTarget) : a(b.currentTarget).parent(),
d = this.$header.find("th").eq(c.index());
return this.$header.add(this.$header_).find("span.order").remove(), this.options.sortName === c.data("field") ? this.options.sortOrder = "asc" === this.options.sortOrder ? "desc" : "asc" : (this.options.sortName = c.data("field"), this.options.sortOrder = "asc" === c.data("order") ? "desc" : "asc"), this.trigger("sort", this.options.sortName, this.options.sortOrder), c.add(d).data("order", this.options.sortOrder), this.getCaret(), "server" === this.options.sidePagination ? void this.initServer(this.options.silentSort) : (this.initSort(), void this.initBody())
}, p.prototype.initToolbar = function() {
var b, d, e = this,
f = [],
g = 0,
i = 0;
this.$toolbar.find(".bs-bars").children().length && a("body").append(a(this.options.toolbar)), this.$toolbar.html(""), ("string" == typeof this.options.toolbar || "object" == typeof this.options.toolbar) && a(c('<div class="bs-bars pull-%s"></div>', this.options.toolbarAlign)).appendTo(this.$toolbar).append(a(this.options.toolbar)), f = [c('<div class="columns columns-%s btn-group pull-%s">', this.options.buttonsAlign, this.options.buttonsAlign)], "string" == typeof this.options.icons && (this.options.icons = h(null, this.options.icons)), this.options.showPaginationSwitch && f.push(c('<button class="btn' + c(" btn-%s", this.options.buttonsClass) + c(" btn-%s", this.options.iconSize) + '" type="button" name="paginationSwitch" title="%s">', this.options.formatPaginationSwitch()), c('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.paginationSwitchDown), "</button>"), this.options.showRefresh && f.push(c('<button class="btn' + c(" btn-%s", this.options.buttonsClass) + c(" btn-%s", this.options.iconSize) + '" type="button" name="refresh" title="%s">', this.options.formatRefresh()), c('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.refresh), "</button>"), this.options.showToggle && f.push(c('<button class="btn' + c(" btn-%s", this.options.buttonsClass) + c(" btn-%s", this.options.iconSize) + '" type="button" name="toggle" title="%s">', this.options.formatToggle()), c('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.toggle), "</button>"), this.options.showColumns && (f.push(c('<div class="keep-open btn-group" title="%s">', this.options.formatColumns()), '<button type="button" class="btn' + c(" btn-%s", this.options.buttonsClass) + c(" btn-%s", this.options.iconSize) + ' dropdown-toggle" data-toggle="dropdown">', c('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.columns), ' <span class="caret"></span>', "</button>", '<ul class="dropdown-menu" role="menu">'), a.each(this.columns, function(a, b) {
if (!(b.radio || b.checkbox || e.options.cardView && !b.cardVisible)) {
var d = b.visible ? ' checked="checked"' : "";
b.switchable && (f.push(c('<li><label><input type="checkbox" data-field="%s" value="%s"%s> %s</label></li>', b.field, a, d, b.title)), i++)
}
}), f.push("</ul>", "</div>")), f.push("</div>"), (this.showToolbar || f.length > 2) && this.$toolbar.append(f.join("")), this.options.showPaginationSwitch && this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click", a.proxy(this.togglePagination, this)), this.options.showRefresh && this.$toolbar.find('button[name="refresh"]').off("click").on("click", a.proxy(this.refresh, this)), this.options.showToggle && this.$toolbar.find('button[name="toggle"]').off("click").on("click", function() {
e.toggleView()
}), this.options.showColumns && (b = this.$toolbar.find(".keep-open"), i <= this.options.minimumCountColumns && b.find("input").prop("disabled", !0), b.find("li").off("click").on("click", function(a) {
a.stopImmediatePropagation()
}), b.find("input").off("click").on("click", function() {
var b = a(this);
e.toggleColumn(a(this).val(), b.prop("checked"), !1), e.trigger("column-switch", a(this).data("field"), b.prop("checked"))
})), this.options.search && (f = [], f.push('<div class="pull-' + this.options.searchAlign + ' search">', c('<input class="form-control' + c(" input-%s", this.options.iconSize) + '" type="text" placeholder="%s">', this.options.formatSearch()), "</div>"), this.$toolbar.append(f.join("")), d = this.$toolbar.find(".search input"), d.off("keyup drop").on("keyup drop", function(b) {
e.options.searchOnEnterKey && 13 !== b.keyCode || a.inArray(b.keyCode, [37, 38, 39, 40]) > -1 || (clearTimeout(g), g = setTimeout(function() {
e.onSearch(b)
}, e.options.searchTimeOut))
}), n() && d.off("mouseup").on("mouseup", function(a) {
clearTimeout(g), g = setTimeout(function() {
e.onSearch(a)
}, e.options.searchTimeOut)
}))
}, p.prototype.onSearch = function(b) {
var c = a.trim(a(b.currentTarget).val());
this.options.trimOnSearch && a(b.currentTarget).val() !== c && a(b.currentTarget).val(c), c !== this.searchText && (this.searchText = c, this.options.searchText = c, this.options.pageNumber = 1, this.initSearch(), this.updatePagination(), this.trigger("search", c))
}, p.prototype.initSearch = function() {
var b = this;
if ("server" !== this.options.sidePagination) {
if (this.options.customSearch !== a.noop) return void this.options.customSearch.apply(this, [this.searchText]);
var c = this.searchText && (this.options.escape ? j(this.searchText) : this.searchText).toLowerCase(),
d = a.isEmptyObject(this.filterColumns) ? null : this.filterColumns;
this.data = d ? a.grep(this.options.data, function(b) {
for (var c in d)
if (a.isArray(d[c]) && -1 === a.inArray(b[c], d[c]) || b[c] !== d[c]) return !1;
return !0
}) : this.options.data, this.data = c ? a.grep(this.data, function(d, f) {
for (var g = 0; g < b.header.fields.length; g++)
if (b.header.searchables[g]) {
var i, j = a.isNumeric(b.header.fields[g]) ? parseInt(b.header.fields[g], 10) : b.header.fields[g],
k = b.columns[e(b.columns, j)];
if ("string" == typeof j) {
i = d;
for (var l = j.split("."), m = 0; m < l.length; m++) i = i[l[m]];
k && k.searchFormatter && (i = h(k, b.header.formatters[g], [i, d, f], i))
} else i = d[j];
if ("string" == typeof i || "number" == typeof i)
if (b.options.strictSearch) {
if ((i + "").toLowerCase() === c) return !0
} else if (-1 !== (i + "").toLowerCase().indexOf(c)) return !0
}
return !1
}) : this.data
}
}, p.prototype.initPagination = function() {
if (!this.options.pagination) return void this.$pagination.hide();
this.$pagination.show();
var b, d, e, f, g, h, i, j, k, l = this,
m = [],
n = !1,
o = this.getData(),
p = this.options.pageList;
if ("server" !== this.options.sidePagination && (this.options.totalRows = o.length), this.totalPages = 0, this.options.totalRows) {
if (this.options.pageSize === this.options.formatAllRows()) this.options.pageSize = this.options.totalRows, n = !0;
else if (this.options.pageSize === this.options.totalRows) {
var q = "string" == typeof this.options.pageList ? this.options.pageList.replace("[", "").replace("]", "").replace(/ /g, "").toLowerCase().split(",") : this.options.pageList;
a.inArray(this.options.formatAllRows().toLowerCase(), q) > -1 && (n = !0)
}
this.totalPages = ~~((this.options.totalRows - 1) / this.options.pageSize) + 1, this.options.totalPages = this.totalPages
}
if (this.totalPages > 0 && this.options.pageNumber > this.totalPages && (this.options.pageNumber = this.totalPages), this.pageFrom = (this.options.pageNumber - 1) * this.options.pageSize + 1, this.pageTo = this.options.pageNumber * this.options.pageSize, this.pageTo > this.options.totalRows && (this.pageTo = this.options.totalRows), m.push('<div class="pull-' + this.options.paginationDetailHAlign + ' pagination-detail">', '<span class="pagination-info">', this.options.onlyInfoPagination ? this.options.formatDetailPagination(this.options.totalRows) : this.options.formatShowingRows(this.pageFrom, this.pageTo, this.options.totalRows), "</span>"), !this.options.onlyInfoPagination) {
m.push('<span class="page-list">');
var r = [c('<span class="btn-group %s">', "top" === this.options.paginationVAlign || "both" === this.options.paginationVAlign ? "dropdown" : "dropup"), '<button type="button" class="btn' + c(" btn-%s", this.options.buttonsClass) + c(" btn-%s", this.options.iconSize) + ' dropdown-toggle" data-toggle="dropdown">', '<span class="page-size">', n ? this.options.formatAllRows() : this.options.pageSize, "</span>", ' <span class="caret"></span>', "</button>", '<ul class="dropdown-menu" role="menu">'];
if ("string" == typeof this.options.pageList) {
var s = this.options.pageList.replace("[", "").replace("]", "").replace(/ /g, "").split(",");
p = [], a.each(s, function(a, b) {
p.push(b.toUpperCase() === l.options.formatAllRows().toUpperCase() ? l.options.formatAllRows() : +b)
})
}
for (a.each(p, function(a, b) {
if (!l.options.smartDisplay || 0 === a || p[a - 1] <= l.options.totalRows) {
var d;
d = n ? b === l.options.formatAllRows() ? ' class="active"' : "" : b === l.options.pageSize ? ' class="active"' : "", r.push(c('<li%s><a href="javascript:void(0)">%s</a></li>', d, b))
}
}), r.push("</ul></span>"), m.push(this.options.formatRecordsPerPage(r.join(""))), m.push("</span>"), m.push("</div>", '<div class="pull-' + this.options.paginationHAlign + ' pagination">', '<ul class="pagination' + c(" pagination-%s", this.options.iconSize) + '">', '<li class="page-pre"><a href="javascript:void(0)">' + this.options.paginationPreText + "</a></li>"), this.totalPages < 5 ? (d = 1, e = this.totalPages) : (d = this.options.pageNumber - 2, e = d + 4, 1 > d && (d = 1, e = 5), e > this.totalPages && (e = this.totalPages, d = e - 4)), this.totalPages >= 6 && (this.options.pageNumber >= 3 && (m.push('<li class="page-first' + (1 === this.options.pageNumber ? " active" : "") + '">', '<a href="javascript:void(0)">', 1, "</a>", "</li>"), d++), this.options.pageNumber >= 4 && (4 == this.options.pageNumber || 6 == this.totalPages || 7 == this.totalPages ? d-- : m.push('<li class="page-first-separator disabled">', '<a href="javascript:void(0)">...</a>', "</li>"), e--)), this.totalPages >= 7 && this.options.pageNumber >= this.totalPages - 2 && d--, 6 == this.totalPages ? this.options.pageNumber >= this.totalPages - 2 && e++ : this.totalPages >= 7 && (7 == this.totalPages || this.options.pageNumber >= this.totalPages - 3) && e++, b = d; e >= b; b++) m.push('<li class="page-number' + (b === this.options.pageNumber ? " active" : "") + '">', '<a href="javascript:void(0)">', b, "</a>", "</li>");
this.totalPages >= 8 && this.options.pageNumber <= this.totalPages - 4 && m.push('<li class="page-last-separator disabled">', '<a href="javascript:void(0)">...</a>', "</li>"), this.totalPages >= 6 && this.options.pageNumber <= this.totalPages - 3 && m.push('<li class="page-last' + (this.totalPages === this.options.pageNumber ? " active" : "") + '">', '<a href="javascript:void(0)">', this.totalPages, "</a>", "</li>"), m.push('<li class="page-next"><a href="javascript:void(0)">' + this.options.paginationNextText + "</a></li>", "</ul>", "</div>")
}
this.$pagination.html(m.join("")), this.options.onlyInfoPagination || (f = this.$pagination.find(".page-list a"), g = this.$pagination.find(".page-first"), h = this.$pagination.find(".page-pre"), i = this.$pagination.find(".page-next"), j = this.$pagination.find(".page-last"), k = this.$pagination.find(".page-number"), this.options.smartDisplay && (this.totalPages <= 1 && this.$pagination.find("div.pagination").hide(), (p.length < 2 || this.options.totalRows <= p[0]) && this.$pagination.find("span.page-list").hide(), this.$pagination[this.getData().length ? "show" : "hide"]()), n && (this.options.pageSize = this.options.formatAllRows()), f.off("click").on("click", a.proxy(this.onPageListChange, this)), g.off("click").on("click", a.proxy(this.onPageFirst, this)), h.off("click").on("click", a.proxy(this.onPagePre, this)), i.off("click").on("click", a.proxy(this.onPageNext, this)), j.off("click").on("click", a.proxy(this.onPageLast, this)), k.off("click").on("click", a.proxy(this.onPageNumber, this)))
}, p.prototype.updatePagination = function(b) {
b && a(b.currentTarget).hasClass("disabled") || (this.options.maintainSelected || this.resetRows(), this.initPagination(), "server" === this.options.sidePagination ? this.initServer() : this.initBody(), this.trigger("page-change", this.options.pageNumber, this.options.pageSize))
}, p.prototype.onPageListChange = function(b) {
var c = a(b.currentTarget);
c.parent().addClass("active").siblings().removeClass("active"), this.options.pageSize = c.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? this.options.formatAllRows() : +c.text(), this.$toolbar.find(".page-size").text(this.options.pageSize), this.updatePagination(b)
}, p.prototype.onPageFirst = function(a) {
this.options.pageNumber = 1, this.updatePagination(a)
}, p.prototype.onPagePre = function(a) {
this.options.pageNumber - 1 === 0 ? this.options.pageNumber = this.options.totalPages : this.options.pageNumber--, this.updatePagination(a)
}, p.prototype.onPageNext = function(a) {
this.options.pageNumber + 1 > this.options.totalPages ? this.options.pageNumber = 1 : this.options.pageNumber++, this.updatePagination(a)
}, p.prototype.onPageLast = function(a) {
this.options.pageNumber = this.totalPages, this.updatePagination(a)
}, p.prototype.onPageNumber = function(b) {
this.options.pageNumber !== +a(b.currentTarget).text() && (this.options.pageNumber = +a(b.currentTarget).text(), this.updatePagination(b))
}, p.prototype.initBody = function(b) {
var f = this,
g = [],
i = this.getData();
this.trigger("pre-body", i), this.$body = this.$el.find(">tbody"), this.$body.length || (this.$body = a("<tbody></tbody>").appendTo(this.$el)), this.options.pagination && "server" !== this.options.sidePagination || (this.pageFrom = 1, this.pageTo = i.length);
for (var k = this.pageFrom - 1; k < this.pageTo; k++) {
var l, n = i[k],
o = {},
p = [],
q = "",
r = {},
s = [];
if (o = h(this.options, this.options.rowStyle, [n, k], o), o && o.css)
for (l in o.css) p.push(l + ": " + o.css[l]);
if (r = h(this.options, this.options.rowAttributes, [n, k], r))
for (l in r) s.push(c('%s="%s"', l, j(r[l])));
n._data && !a.isEmptyObject(n._data) && a.each(n._data, function(a, b) {
"index" !== a && (q += c(' data-%s="%s"', a, b))
}), g.push("<tr", c(" %s", s.join(" ")), c(' id="%s"', a.isArray(n) ? void 0 : n._id), c(' class="%s"', o.classes || (a.isArray(n) ? void 0 : n._class)), c(' data-index="%s"', k), c(' data-uniqueid="%s"', n[this.options.uniqueId]), c("%s", q), ">"), this.options.cardView && g.push(c('<td colspan="%s"><div class="card-views">', this.header.fields.length)), !this.options.cardView && this.options.detailView && g.push("<td>", '<a class="detail-icon" href="javascript:">', c('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.detailOpen), "</a>", "</td>"), a.each(this.header.fields, function(b, e) {
var i = "",
j = m(n, e, f.options.escape),
l = "",
q = {},
r = "",
s = f.header.classes[b],
t = "",
u = "",
v = "",
w = "",
x = f.columns[b];
if (!(f.fromHtml && "undefined" == typeof j || !x.visible || f.options.cardView && !x.cardVisible)) {
if (o = c('style="%s"', p.concat(f.header.styles[b]).join("; ")), n["_" + e + "_id"] && (r = c(' id="%s"', n["_" + e + "_id"])), n["_" + e + "_class"] && (s = c(' class="%s"', n["_" + e + "_class"])), n["_" + e + "_rowspan"] && (u = c(' rowspan="%s"', n["_" + e + "_rowspan"])), n["_" + e + "_colspan"] && (v = c(' colspan="%s"', n["_" + e + "_colspan"])), n["_" + e + "_title"] && (w = c(' title="%s"', n["_" + e + "_title"])), q = h(f.header, f.header.cellStyles[b], [j, n, k, e], q), q.classes && (s = c(' class="%s"', q.classes)), q.css) {
var y = [];
for (var z in q.css) y.push(z + ": " + q.css[z]);
o = c('style="%s"', y.concat(f.header.styles[b]).join("; "))
}
j = h(x, f.header.formatters[b], [j, n, k], j), n["_" + e + "_data"] && !a.isEmptyObject(n["_" + e + "_data"]) && a.each(n["_" + e + "_data"], function(a, b) {
"index" !== a && (t += c(' data-%s="%s"', a, b))
}), x.checkbox || x.radio ? (l = x.checkbox ? "checkbox" : l, l = x.radio ? "radio" : l, i = [c(f.options.cardView ? '<div class="card-view %s">' : '<td class="bs-checkbox %s">', x["class"] || ""), "<input" + c(' data-index="%s"', k) + c(' name="%s"', f.options.selectItemName) + c(' type="%s"', l) + c(' value="%s"', n[f.options.idField]) + c(' checked="%s"', j === !0 || j && j.checked ? "checked" : void 0) + c(' disabled="%s"', !x.checkboxEnabled || j && j.disabled ? "disabled" : void 0) + " />", f.header.formatters[b] && "string" == typeof j ? j : "", f.options.cardView ? "</div>" : "</td>"].join(""), n[f.header.stateField] = j === !0 || j && j.checked) : (j = "undefined" == typeof j || null === j ? f.options.undefinedText : j, i = f.options.cardView ? ['<div class="card-view">', f.options.showHeader ? c('<span class="title" %s>%s</span>', o, d(f.columns, "field", "title", e)) : "", c('<span class="value">%s</span>', j), "</div>"].join("") : [c("<td%s %s %s %s %s %s %s>", r, s, o, t, u, v, w), j, "</td>"].join(""), f.options.cardView && f.options.smartDisplay && "" === j && (i = '<div class="card-view"></div>')), g.push(i)
}
}), this.options.cardView && g.push("</div></td>"), g.push("</tr>")
}
g.length || g.push('<tr class="no-records-found">', c('<td colspan="%s">%s</td>', this.$header.find("th").length, this.options.formatNoMatches()), "</tr>"), this.$body.html(g.join("")), b || this.scrollTo(0), this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick", function(b) {
var d = a(this),
g = d.parent(),
h = f.data[g.data("index")],
i = d[0].cellIndex,
j = f.getVisibleFields(),
k = j[f.options.detailView && !f.options.cardView ? i - 1 : i],
l = f.columns[e(f.columns, k)],
n = m(h, k, f.options.escape);
if (!d.find(".detail-icon").length && (f.trigger("click" === b.type ? "click-cell" : "dbl-click-cell", k, n, h, d), f.trigger("click" === b.type ? "click-row" : "dbl-click-row", h, g, k), "click" === b.type && f.options.clickToSelect && l.clickToSelect)) {
var o = g.find(c('[name="%s"]', f.options.selectItemName));
o.length && o[0].click()
}
}), this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click", function() {
var b = a(this),
d = b.parent().parent(),
e = d.data("index"),
g = i[e];
if (d.next().is("tr.detail-view")) b.find("i").attr("class", c("%s %s", f.options.iconsPrefix, f.options.icons.detailOpen)), d.next().remove(), f.trigger("collapse-row", e, g);
else {
b.find("i").attr("class", c("%s %s", f.options.iconsPrefix, f.options.icons.detailClose)), d.after(c('<tr class="detail-view"><td colspan="%s"></td></tr>', d.find("td").length));
var j = d.next().find("td"),
k = h(f.options, f.options.detailFormatter, [e, g, j], "");
1 === j.length && j.append(k), f.trigger("expand-row", e, g, j)
}
f.resetView()
}), this.$selectItem = this.$body.find(c('[name="%s"]', this.options.selectItemName)), this.$selectItem.off("click").on("click", function(b) {
b.stopImmediatePropagation();
var c = a(this),
d = c.prop("checked"),
e = f.data[c.data("index")];
f.options.maintainSelected && a(this).is(":radio") && a.each(f.options.data, function(a, b) {
b[f.header.stateField] = !1
}), e[f.header.stateField] = d, f.options.singleSelect && (f.$selectItem.not(this).each(function() {
f.data[a(this).data("index")][f.header.stateField] = !1
}), f.$selectItem.filter(":checked").not(this).prop("checked", !1)), f.updateSelected(), f.trigger(d ? "check" : "uncheck", e, c)
}), a.each(this.header.events, function(b, c) {
if (c) {
"string" == typeof c && (c = h(null, c));
var d = f.header.fields[b],
e = a.inArray(d, f.getVisibleFields());
f.options.detailView && !f.options.cardView && (e += 1);
for (var g in c) f.$body.find(">tr:not(.no-records-found)").each(function() {
var b = a(this),
h = b.find(f.options.cardView ? ".card-view" : "td").eq(e),
i = g.indexOf(" "),
j = g.substring(0, i),
k = g.substring(i + 1),
l = c[g];
h.find(k).off(j).on(j, function(a) {
var c = b.data("index"),
e = f.data[c],
g = e[d];
l.apply(this, [a, g, e, c])
})
})
}
}), this.updateSelected(), this.resetView(), this.trigger("post-body", i)
}, p.prototype.initServer = function(b, c, d) {
var e, f = this,
g = {},
i = {
searchText: this.searchText,
sortName: this.options.sortName,
sortOrder: this.options.sortOrder
};
this.options.pagination && (i.pageSize = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize, i.pageNumber = this.options.pageNumber), (d || this.options.url || this.options.ajax) && ("limit" === this.options.queryParamsType && (i = {
search: i.searchText,
sort: i.sortName,
order: i.sortOrder
}, this.options.pagination && (i.offset = this.options.pageSize === this.options.formatAllRows() ? 0 : this.options.pageSize * (this.options.pageNumber - 1), i.limit = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize)), a.isEmptyObject(this.filterColumnsPartial) || (i.filter = JSON.stringify(this.filterColumnsPartial, null)), g = h(this.options, this.options.queryParams, [i], g), a.extend(g, c || {}), g !== !1 && (b || this.$tableLoading.show(), e = a.extend({}, h(null, this.options.ajaxOptions), {
type: this.options.method,
url: d || this.options.url,
data: "application/json" === this.options.contentType && "post" === this.options.method ? JSON.stringify(g) : g,
cache: this.options.cache,
contentType: this.options.contentType,
dataType: this.options.dataType,
success: function(a) {
a = h(f.options, f.options.responseHandler, [a], a), f.load(a), f.trigger("load-success", a), b || f.$tableLoading.hide()
},
error: function(a) {
f.trigger("load-error", a.status, a), b || f.$tableLoading.hide()
}
}), this.options.ajax ? h(this, this.options.ajax, [e], null) : (this._xhr && 4 !== this._xhr.readyState && this._xhr.abort(), this._xhr = a.ajax(e))))
}, p.prototype.initSearchText = function() {
if (this.options.search && "" !== this.options.searchText) {
var a = this.$toolbar.find(".search input");
a.val(this.options.searchText), this.onSearch({
currentTarget: a
})
}
}, p.prototype.getCaret = function() {
var b = this;
a.each(this.$header.find("th"), function(c, d) {
a(d).find(".sortable").removeClass("desc asc").addClass(a(d).data("field") === b.options.sortName ? b.options.sortOrder : "both")
})
}, p.prototype.updateSelected = function() {
var b = this.$selectItem.filter(":enabled").length && this.$selectItem.filter(":enabled").length === this.$selectItem.filter(":enabled").filter(":checked").length;
this.$selectAll.add(this.$selectAll_).prop("checked", b), this.$selectItem.each(function() {
a(this).closest("tr")[a(this).prop("checked") ? "addClass" : "removeClass"]("selected")
})
}, p.prototype.updateRows = function() {
var b = this;
this.$selectItem.each(function() {
b.data[a(this).data("index")][b.header.stateField] = a(this).prop("checked")
})
}, p.prototype.resetRows = function() {
var b = this;
a.each(this.data, function(a, c) {
b.$selectAll.prop("checked", !1), b.$selectItem.prop("checked", !1), b.header.stateField && (c[b.header.stateField] = !1)
})
}, p.prototype.trigger = function(b) {
var c = Array.prototype.slice.call(arguments, 1);
b += ".bs.table", this.options[p.EVENTS[b]].apply(this.options, c), this.$el.trigger(a.Event(b), c), this.options.onAll(b, c), this.$el.trigger(a.Event("all.bs.table"), [b, c])
}, p.prototype.resetHeader = function() {
clearTimeout(this.timeoutId_), this.timeoutId_ = setTimeout(a.proxy(this.fitHeader, this), this.$el.is(":hidden") ? 100 : 0)
}, p.prototype.fitHeader = function() {
var b, d, e, f, h = this;
if (h.$el.is(":hidden")) return void(h.timeoutId_ = setTimeout(a.proxy(h.fitHeader, h), 100));
if (b = this.$tableBody.get(0), d = b.scrollWidth > b.clientWidth && b.scrollHeight > b.clientHeight + this.$header.outerHeight() ? g() : 0, this.$el.css("margin-top", -this.$header.outerHeight()), e = a(":focus"), e.length > 0) {
var i = e.parents("th");
if (i.length > 0) {
var j = i.attr("data-field");
if (void 0 !== j) {
var k = this.$header.find("[data-field='" + j + "']");
k.length > 0 && k.find(":input").addClass("focus-temp")
}
}
}
this.$header_ = this.$header.clone(!0, !0), this.$selectAll_ = this.$header_.find('[name="btSelectAll"]'), this.$tableHeader.css({
"margin-right": d
}).find("table").css("width", this.$el.outerWidth()).html("").attr("class", this.$el.attr("class")).append(this.$header_), f = a(".focus-temp:visible:eq(0)"), f.length > 0 && (f.focus(), this.$header.find(".focus-temp").removeClass("focus-temp")), this.$header.find("th[data-field]").each(function() {
h.$header_.find(c('th[data-field="%s"]', a(this).data("field"))).data(a(this).data())
});
var l = this.getVisibleFields(),
m = this.$header_.find("th");
this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(b) {
var d = a(this),
e = b;
h.options.detailView && !h.options.cardView && (0 === b && h.$header_.find("th.detail").find(".fht-cell").width(d.innerWidth()), e = b - 1);
var f = h.$header_.find(c('th[data-field="%s"]', l[e]));
f.length > 1 && (f = a(m[d[0].cellIndex])), f.find(".fht-cell").width(d.innerWidth())
}), this.$tableBody.off("scroll").on("scroll", function() {
h.$tableHeader.scrollLeft(a(this).scrollLeft()), h.options.showFooter && !h.options.cardView && h.$tableFooter.scrollLeft(a(this).scrollLeft())
}), h.trigger("post-header")
}, p.prototype.resetFooter = function() {
var b = this,
d = b.getData(),
e = [];
this.options.showFooter && !this.options.cardView && (!this.options.cardView && this.options.detailView && e.push('<td><div class="th-inner"> </div><div class="fht-cell"></div></td>'), a.each(this.columns, function(a, f) {
var g, i = "",
j = "",
k = [],
l = {},
m = c(' class="%s"', f["class"]);
if (f.visible && (!b.options.cardView || f.cardVisible)) {
if (i = c("text-align: %s; ", f.falign ? f.falign : f.align), j = c("vertical-align: %s; ", f.valign), l = h(null, b.options.footerStyle), l && l.css)
for (g in l.css) k.push(g + ": " + l.css[g]);
e.push("<td", m, c(' style="%s"', i + j + k.concat().join("; ")), ">"), e.push('<div class="th-inner">'), e.push(h(f, f.footerFormatter, [d], " ") || " "), e.push("</div>"), e.push('<div class="fht-cell"></div>'), e.push("</div>"), e.push("</td>")
}
}), this.$tableFooter.find("tr").html(e.join("")), this.$tableFooter.show(), clearTimeout(this.timeoutFooter_), this.timeoutFooter_ = setTimeout(a.proxy(this.fitFooter, this), this.$el.is(":hidden") ? 100 : 0))
}, p.prototype.fitFooter = function() {
var b, c, d;
return clearTimeout(this.timeoutFooter_), this.$el.is(":hidden") ? void(this.timeoutFooter_ = setTimeout(a.proxy(this.fitFooter, this), 100)) : (c = this.$el.css("width"), d = c > this.$tableBody.width() ? g() : 0, this.$tableFooter.css({
"margin-right": d
}).find("table").css("width", c).attr("class", this.$el.attr("class")), b = this.$tableFooter.find("td"), void this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(c) {
var d = a(this);
b.eq(c).find(".fht-cell").width(d.innerWidth())
}))
}, p.prototype.toggleColumn = function(a, b, d) {
if (-1 !== a && (this.columns[a].visible = b, this.initHeader(), this.initSearch(), this.initPagination(), this.initBody(), this.options.showColumns)) {
var e = this.$toolbar.find(".keep-open input").prop("disabled", !1);
d && e.filter(c('[value="%s"]', a)).prop("checked", b), e.filter(":checked").length <= this.options.minimumCountColumns && e.filter(":checked").prop("disabled", !0)
}
}, p.prototype.toggleRow = function(a, b, d) {
-1 !== a && this.$body.find("undefined" != typeof a ? c('tr[data-index="%s"]', a) : c('tr[data-uniqueid="%s"]', b))[d ? "show" : "hide"]()
}, p.prototype.getVisibleFields = function() {
var b = this,
c = [];
return a.each(this.header.fields, function(a, d) {
var f = b.columns[e(b.columns, d)];
f.visible && c.push(d)
}), c
}, p.prototype.resetView = function(a) {
var b = 0;
if (a && a.height && (this.options.height = a.height), this.$selectAll.prop("checked", this.$selectItem.length > 0 && this.$selectItem.length === this.$selectItem.filter(":checked").length), this.options.height) {
var c = k(this.$toolbar),
d = k(this.$pagination),
e = this.options.height - c - d;
this.$tableContainer.css("height", e + "px")
}
return this.options.cardView ? (this.$el.css("margin-top", "0"), this.$tableContainer.css("padding-bottom", "0"), void this.$tableFooter.hide()) : (this.options.showHeader && this.options.height ? (this.$tableHeader.show(), this.resetHeader(), b += this.$header.outerHeight()) : (this.$tableHeader.hide(), this.trigger("post-header")), this.options.showFooter && (this.resetFooter(), this.options.height && (b += this.$tableFooter.outerHeight() + 1)), this.getCaret(), this.$tableContainer.css("padding-bottom", b + "px"), void this.trigger("reset-view"))
}, p.prototype.getData = function(b) {
return !this.searchText && a.isEmptyObject(this.filterColumns) && a.isEmptyObject(this.filterColumnsPartial) ? b ? this.options.data.slice(this.pageFrom - 1, this.pageTo) : this.options.data : b ? this.data.slice(this.pageFrom - 1, this.pageTo) : this.data
}, p.prototype.load = function(b) {
var c = !1;
"server" === this.options.sidePagination ? (this.options.totalRows = b.total, c = b.fixedScroll, b = b[this.options.dataField]) : a.isArray(b) || (c = b.fixedScroll, b = b.data), this.initData(b), this.initSearch(), this.initPagination(), this.initBody(c)
}, p.prototype.append = function(a) {
this.initData(a, "append"), this.initSearch(), this.initPagination(), this.initSort(), this.initBody(!0)
}, p.prototype.prepend = function(a) {
this.initData(a, "prepend"), this.initSearch(), this.initPagination(), this.initSort(), this.initBody(!0)
}, p.prototype.remove = function(b) {
var c, d, e = this.options.data.length;
if (b.hasOwnProperty("field") && b.hasOwnProperty("values")) {
for (c = e - 1; c >= 0; c--) d = this.options.data[c], d.hasOwnProperty(b.field) && -1 !== a.inArray(d[b.field], b.values) && (this.options.data.splice(c, 1), "server" === this.options.sidePagination && (this.options.totalRows -= 1));
e !== this.options.data.length && (this.initSearch(), this.initPagination(), this.initSort(), this.initBody(!0))
}
}, p.prototype.removeAll = function() {
this.options.data.length > 0 && (this.options.data.splice(0, this.options.data.length), this.initSearch(), this.initPagination(), this.initBody(!0))
}, p.prototype.getRowByUniqueId = function(a) {
var b, c, d, e = this.options.uniqueId,
f = this.options.data.length,
g = null;
for (b = f - 1; b >= 0; b--) {
if (c = this.options.data[b], c.hasOwnProperty(e)) d = c[e];
else {
if (!c._data.hasOwnProperty(e)) continue;
d = c._data[e]
}
if ("string" == typeof d ? a = a.toString() : "number" == typeof d && (Number(d) === d && d % 1 === 0 ? a = parseInt(a) : d === Number(d) && 0 !== d && (a = parseFloat(a))), d === a) {
g = c;
break
}
}
return g
}, p.prototype.removeByUniqueId = function(a) {
var b = this.options.data.length,
c = this.getRowByUniqueId(a);
c && this.options.data.splice(this.options.data.indexOf(c), 1), b !== this.options.data.length && (this.initSearch(), this.initPagination(), this.initBody(!0))
}, p.prototype.updateByUniqueId = function(b) {
var c = this,
d = a.isArray(b) ? b : [b];
a.each(d, function(b, d) {
var e;
d.hasOwnProperty("id") && d.hasOwnProperty("row") && (e = a.inArray(c.getRowByUniqueId(d.id), c.options.data), -1 !== e && a.extend(c.options.data[e], d.row));
}), this.initSearch(), this.initSort(), this.initBody(!0)
}, p.prototype.insertRow = function(a) {
a.hasOwnProperty("index") && a.hasOwnProperty("row") && (this.data.splice(a.index, 0, a.row), this.initSearch(), this.initPagination(), this.initSort(), this.initBody(!0))
}, p.prototype.updateRow = function(b) {
var c = this,
d = a.isArray(b) ? b : [b];
a.each(d, function(b, d) {
d.hasOwnProperty("index") && d.hasOwnProperty("row") && a.extend(c.options.data[d.index], d.row)
}), this.initSearch(), this.initSort(), this.initBody(!0)
}, p.prototype.showRow = function(a) {
(a.hasOwnProperty("index") || a.hasOwnProperty("uniqueId")) && this.toggleRow(a.index, a.uniqueId, !0)
}, p.prototype.hideRow = function(a) {
(a.hasOwnProperty("index") || a.hasOwnProperty("uniqueId")) && this.toggleRow(a.index, a.uniqueId, !1)
}, p.prototype.getRowsHidden = function(b) {
var c = a(this.$body[0]).children().filter(":hidden"),
d = 0;
if (b)
for (; d < c.length; d++) a(c[d]).show();
return c
}, p.prototype.mergeCells = function(b) {
var c, d, e, f = b.index,
g = a.inArray(b.field, this.getVisibleFields()),
h = b.rowspan || 1,
i = b.colspan || 1,
j = this.$body.find(">tr");
if (this.options.detailView && !this.options.cardView && (g += 1), e = j.eq(f).find(">td").eq(g), !(0 > f || 0 > g || f >= this.data.length)) {
for (c = f; f + h > c; c++)
for (d = g; g + i > d; d++) j.eq(c).find(">td").eq(d).hide();
e.attr("rowspan", h).attr("colspan", i).show()
}
}, p.prototype.updateCell = function(a) {
a.hasOwnProperty("index") && a.hasOwnProperty("field") && a.hasOwnProperty("value") && (this.data[a.index][a.field] = a.value, a.reinit !== !1 && (this.initSort(), this.initBody(!0)))
}, p.prototype.getOptions = function() {
return this.options
}, p.prototype.getSelections = function() {
var b = this;
return a.grep(this.options.data, function(a) {
return a[b.header.stateField]
})
}, p.prototype.getAllSelections = function() {
var b = this;
return a.grep(this.options.data, function(a) {
return a[b.header.stateField]
})
}, p.prototype.checkAll = function() {
this.checkAll_(!0)
}, p.prototype.uncheckAll = function() {
this.checkAll_(!1)
}, p.prototype.checkInvert = function() {
var b = this,
c = b.$selectItem.filter(":enabled"),
d = c.filter(":checked");
c.each(function() {
a(this).prop("checked", !a(this).prop("checked"))
}), b.updateRows(), b.updateSelected(), b.trigger("uncheck-some", d), d = b.getSelections(), b.trigger("check-some", d)
}, p.prototype.checkAll_ = function(a) {
var b;
a || (b = this.getSelections()), this.$selectAll.add(this.$selectAll_).prop("checked", a), this.$selectItem.filter(":enabled").prop("checked", a), this.updateRows(), a && (b = this.getSelections()), this.trigger(a ? "check-all" : "uncheck-all", b)
}, p.prototype.check = function(a) {
this.check_(!0, a)
}, p.prototype.uncheck = function(a) {
this.check_(!1, a)
}, p.prototype.check_ = function(a, b) {
var d = this.$selectItem.filter(c('[data-index="%s"]', b)).prop("checked", a);
this.data[b][this.header.stateField] = a, this.updateSelected(), this.trigger(a ? "check" : "uncheck", this.data[b], d)
}, p.prototype.checkBy = function(a) {
this.checkBy_(!0, a)
}, p.prototype.uncheckBy = function(a) {
this.checkBy_(!1, a)
}, p.prototype.checkBy_ = function(b, d) {
if (d.hasOwnProperty("field") && d.hasOwnProperty("values")) {
var e = this,
f = [];
a.each(this.options.data, function(g, h) {
if (!h.hasOwnProperty(d.field)) return !1;
if (-1 !== a.inArray(h[d.field], d.values)) {
var i = e.$selectItem.filter(":enabled").filter(c('[data-index="%s"]', g)).prop("checked", b);
h[e.header.stateField] = b, f.push(h), e.trigger(b ? "check" : "uncheck", h, i)
}
}), this.updateSelected(), this.trigger(b ? "check-some" : "uncheck-some", f)
}
}, p.prototype.destroy = function() {
this.$el.insertBefore(this.$container), a(this.options.toolbar).insertBefore(this.$el), this.$container.next().remove(), this.$container.remove(), this.$el.html(this.$el_.html()).css("margin-top", "0").attr("class", this.$el_.attr("class") || "")
}, p.prototype.showLoading = function() {
this.$tableLoading.show()
}, p.prototype.hideLoading = function() {
this.$tableLoading.hide()
}, p.prototype.togglePagination = function() {
this.options.pagination = !this.options.pagination;
var a = this.$toolbar.find('button[name="paginationSwitch"] i');
this.options.pagination ? a.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchDown) : a.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchUp), this.updatePagination()
}, p.prototype.refresh = function(a) {
a && a.url && (this.options.pageNumber = 1), this.initServer(a && a.silent, a && a.query, a && a.url), this.trigger("refresh", a)
}, p.prototype.resetWidth = function() {
this.options.showHeader && this.options.height && this.fitHeader(), this.options.showFooter && this.fitFooter()
}, p.prototype.showColumn = function(a) {
this.toggleColumn(e(this.columns, a), !0, !0)
}, p.prototype.hideColumn = function(a) {
this.toggleColumn(e(this.columns, a), !1, !0)
}, p.prototype.getHiddenColumns = function() {
return a.grep(this.columns, function(a) {
return !a.visible
})
}, p.prototype.getVisibleColumns = function() {
return a.grep(this.columns, function(a) {
return a.visible
})
}, p.prototype.toggleAllColumns = function(b) {
if (a.each(this.columns, function(a) {
this.columns[a].visible = b
}), this.initHeader(), this.initSearch(), this.initPagination(), this.initBody(), this.options.showColumns) {
var c = this.$toolbar.find(".keep-open input").prop("disabled", !1);
c.filter(":checked").length <= this.options.minimumCountColumns && c.filter(":checked").prop("disabled", !0)
}
}, p.prototype.showAllColumns = function() {
this.toggleAllColumns(!0)
}, p.prototype.hideAllColumns = function() {
this.toggleAllColumns(!1)
}, p.prototype.filterBy = function(b) {
this.filterColumns = a.isEmptyObject(b) ? {} : b, this.options.pageNumber = 1, this.initSearch(), this.updatePagination()
}, p.prototype.scrollTo = function(a) {
return "string" == typeof a && (a = "bottom" === a ? this.$tableBody[0].scrollHeight : 0), "number" == typeof a && this.$tableBody.scrollTop(a), "undefined" == typeof a ? this.$tableBody.scrollTop() : void 0
}, p.prototype.getScrollPosition = function() {
return this.scrollTo()
}, p.prototype.selectPage = function(a) {
a > 0 && a <= this.options.totalPages && (this.options.pageNumber = a, this.updatePagination())
}, p.prototype.prevPage = function() {
this.options.pageNumber > 1 && (this.options.pageNumber--, this.updatePagination())
}, p.prototype.nextPage = function() {
this.options.pageNumber < this.options.totalPages && (this.options.pageNumber++, this.updatePagination())
}, p.prototype.toggleView = function() {
this.options.cardView = !this.options.cardView, this.initHeader(), this.initBody(), this.trigger("toggle", this.options.cardView)
}, p.prototype.refreshOptions = function(b) {
i(this.options, b, !0) || (this.options = a.extend(this.options, b), this.trigger("refresh-options", this.options), this.destroy(), this.init())
}, p.prototype.resetSearch = function(a) {
var b = this.$toolbar.find(".search input");
b.val(a || ""), this.onSearch({
currentTarget: b
})
}, p.prototype.expandRow_ = function(a, b) {
var d = this.$body.find(c('> tr[data-index="%s"]', b));
d.next().is("tr.detail-view") === (a ? !1 : !0) && d.find("> td > .detail-icon").click()
}, p.prototype.expandRow = function(a) {
this.expandRow_(!0, a)
}, p.prototype.collapseRow = function(a) {
this.expandRow_(!1, a)
}, p.prototype.expandAllRows = function(b) {
if (b) {
var d = this.$body.find(c('> tr[data-index="%s"]', 0)),
e = this,
f = null,
g = !1,
h = -1;
if (d.next().is("tr.detail-view") ? d.next().next().is("tr.detail-view") || (d.next().find(".detail-icon").click(), g = !0) : (d.find("> td > .detail-icon").click(), g = !0), g) try {
h = setInterval(function() {
f = e.$body.find("tr.detail-view").last().find(".detail-icon"), f.length > 0 ? f.click() : clearInterval(h)
}, 1)
} catch (i) {
clearInterval(h)
}
} else
for (var j = this.$body.children(), k = 0; k < j.length; k++) this.expandRow_(!0, a(j[k]).data("index"))
}, p.prototype.collapseAllRows = function(b) {
if (b) this.expandRow_(!1, 0);
else
for (var c = this.$body.children(), d = 0; d < c.length; d++) this.expandRow_(!1, a(c[d]).data("index"))
}, p.prototype.updateFormatText = function(a, b) {
this.options[c("format%s", a)] && ("string" == typeof b ? this.options[c("format%s", a)] = function() {
return b
} : "function" == typeof b && (this.options[c("format%s", a)] = b)), this.initToolbar(), this.initPagination(), this.initBody()
};
var q = ["getOptions", "getSelections", "getAllSelections", "getData", "load", "append", "prepend", "remove", "removeAll", "insertRow", "updateRow", "updateCell", "updateByUniqueId", "removeByUniqueId", "getRowByUniqueId", "showRow", "hideRow", "getRowsHidden", "mergeCells", "checkAll", "uncheckAll", "checkInvert", "check", "uncheck", "checkBy", "uncheckBy", "refresh", "resetView", "resetWidth", "destroy", "showLoading", "hideLoading", "showColumn", "hideColumn", "getHiddenColumns", "getVisibleColumns", "showAllColumns", "hideAllColumns", "filterBy", "scrollTo", "getScrollPosition", "selectPage", "prevPage", "nextPage", "togglePagination", "toggleView", "refreshOptions", "resetSearch", "expandRow", "collapseRow", "expandAllRows", "collapseAllRows", "updateFormatText"];
a.fn.bootstrapTable = function(b) {
var c, d = Array.prototype.slice.call(arguments, 1);
return this.each(function() {
var e = a(this),
f = e.data("bootstrap.table"),
g = a.extend({}, p.DEFAULTS, e.data(), "object" == typeof b && b);
if ("string" == typeof b) {
if (a.inArray(b, q) < 0) throw new Error("Unknown method: " + b);
if (!f) return;
c = f[b].apply(f, d), "destroy" === b && e.removeData("bootstrap.table")
}
f || e.data("bootstrap.table", f = new p(this, g))
}), "undefined" == typeof c ? this : c
}, a.fn.bootstrapTable.Constructor = p, a.fn.bootstrapTable.defaults = p.DEFAULTS, a.fn.bootstrapTable.columnDefaults = p.COLUMN_DEFAULTS, a.fn.bootstrapTable.locales = p.LOCALES, a.fn.bootstrapTable.methods = q, a.fn.bootstrapTable.utils = {
sprintf: c,
getFieldIndex: e,
compareObjects: i,
calculateObjectValue: h,
getItemField: m,
objectKeys: o,
isIEBrowser: n
}, a(function() {
a('[data-toggle="table"]').bootstrapTable()
})
}(jQuery), function(a) {
"use strict";
var b = a.fn.bootstrapTable.utils.sprintf,
c = {
json: "JSON",
xml: "XML",
png: "PNG",
csv: "CSV",
txt: "TXT",
sql: "SQL",
doc: "MS-Word",
excel: "MS-Excel",
powerpoint: "MS-Powerpoint",
pdf: "PDF"
};
a.extend(a.fn.bootstrapTable.defaults, {
showExport: !1,
exportDataType: "selected",
exportTypes: ["json", "xml", "csv", "txt", "sql", "excel","pdf"],
exportOptions: {}
}), a.extend(a.fn.bootstrapTable.defaults.icons, {
"export": "glyphicon-export icon-share"
}), a.extend(a.fn.bootstrapTable.locales, {
formatExport: function() {
return "Export data"
}
}), a.extend(a.fn.bootstrapTable.defaults, a.fn.bootstrapTable.locales);
var d = a.fn.bootstrapTable.Constructor,
e = d.prototype.initToolbar;
d.prototype.initToolbar = function() {
if (this.showToolbar = this.options.showExport, e.apply(this, Array.prototype.slice.apply(arguments)), this.options.showExport) {
var d = this,
f = this.$toolbar.find(">.btn-group"),
g = f.find("div.export");
if (!g.length) {
g = a(['<div class="export btn-group">', '<button class="btn' + b(" btn-%s", this.options.buttonsClass) + b(" btn-%s", this.options.iconSize) + ' dropdown-toggle" title="' + this.options.formatExport() + '" data-toggle="dropdown" type="button">', b('<i class="%s %s"></i> ', this.options.iconsPrefix, this.options.icons["export"]), '<span class="caret"></span>', "</button>", '<ul class="dropdown-menu" role="menu">', "</ul>", "</div>"].join("")).appendTo(f);
var h = g.find(".dropdown-menu"),
i = this.options.exportTypes;
if ("string" == typeof this.options.exportTypes) {
var j = this.options.exportTypes.slice(1, -1).replace(/ /g, "").split(",");
i = [], a.each(j, function(a, b) {
i.push(b.slice(1, -1))
})
}
a.each(i, function(a, b) {
c.hasOwnProperty(b) && h.append(['<li data-type="' + b + '">', '<a href="javascript:void(0)">', c[b], "</a>", "</li>"].join(""))
}), h.find("li").click(function() {
var b = a(this).data("type"),
c = function() {
d.$el.tableExport(a.extend({}, d.options.exportOptions, {
type: b,
escape: !1
}))
};
if ("all" === d.options.exportDataType && d.options.pagination) d.$el.one("server" === d.options.sidePagination ? "post-body.bs.table" : "page-change.bs.table", function() {
c(), d.togglePagination()
}), d.togglePagination();
else if ("selected" === d.options.exportDataType) {
var e = d.getData(),
f = d.getAllSelections();
d.load(f), c(), d.load(e)
} else c()
})
}
}
}
}(jQuery), ! function(a) {
"use strict";
var b = function(b, c) {
b.options.columnsHidden.length > 0 && a.each(b.columns, function(d, e) {
-1 !== b.options.columnsHidden.indexOf(e.field) && e.visible !== c && b.toggleColumn(a.fn.bootstrapTable.utils.getFieldIndex(b.columns, e.field), c, !0)
})
},
c = function(a) {
(a.options.height || a.options.showFooter) && setTimeout(function() {
a.resetView.call(a)
}, 1)
},
d = function(a, b, d) {
a.options.minHeight ? b <= a.options.minWidth && d <= a.options.minHeight ? e(a) : b > a.options.minWidth && d > a.options.minHeight && f(a) : b <= a.options.minWidth ? e(a) : b > a.options.minWidth && f(a), c(a)
},
e = function(a) {
g(a, !1), b(a, !1)
},
f = function(a) {
g(a, !0), b(a, !0)
},
g = function(a, b) {
a.options.cardView = b, a.toggleView()
},
h = function(a, b) {
var c;
return function() {
var d = this,
e = arguments,
f = function() {
c = null, a.apply(d, e)
};
clearTimeout(c), c = setTimeout(f, b)
}
};
a.extend(a.fn.bootstrapTable.defaults, {
mobileResponsive: !1,
minWidth: 562,
minHeight: void 0,
heightThreshold: 100,
checkOnInit: !0,
columnsHidden: []
});
var i = a.fn.bootstrapTable.Constructor,
j = i.prototype.init;
i.prototype.init = function() {
if (j.apply(this, Array.prototype.slice.apply(arguments)), this.options.mobileResponsive && this.options.minWidth) {
this.options.minWidth < 100 && this.options.resizable && (console.log("The minWidth when the resizable extension is active should be greater or equal than 100"), this.options.minWidth = 100);
var b = this,
c = {
width: a(window).width(),
height: a(window).height()
};
if (a(window).on("resize orientationchange", h(function() {
var e = a(this).height(),
f = a(this).width();
(Math.abs(c.height - e) > b.options.heightThreshold || c.width != f) && (d(b, f, e), c = {
width: f,
height: e
})
}, 200)), this.options.checkOnInit) {
var e = a(window).height(),
f = a(window).width();
d(this, f, e), c = {
width: f,
height: e
}
}
}
}
}(jQuery), "undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery");
if (+ function(a) {
"use strict";
var b = a.fn.jquery.split(" ")[0].split(".");
if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1 || b[0] > 3) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")
}(jQuery), + function(a) {
"use strict";
function b() {
var a = document.createElement("bootstrap"),
b = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var c in b)
if (void 0 !== a.style[c]) return {
end: b[c]
};
return !1
}
a.fn.emulateTransitionEnd = function(b) {
var c = !1,
d = this;
a(this).one("bsTransitionEnd", function() {
c = !0
});
var e = function() {
c || a(d).trigger(a.support.transition.end)
};
return setTimeout(e, b), this
}, a(function() {
a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = {
bindType: a.support.transition.end,
delegateType: a.support.transition.end,
handle: function(b) {
return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0
}
})
})
}(jQuery), + function(a) {
"use strict";
function b(b) {
return this.each(function() {
var c = a(this),
e = c.data("bs.alert");
e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c)
})
}
var c = '[data-dismiss="alert"]',
d = function(b) {
a(b).on("click", c, this.close)
};
d.VERSION = "3.3.7", d.TRANSITION_DURATION = 150, d.prototype.close = function(b) {
function c() {
g.detach().trigger("closed.bs.alert").remove()
}
var e = a(this),
f = e.attr("data-target");
f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, ""));
var g = a("#" === f ? [] : f);
b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c())
};
var e = a.fn.alert;
a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function() {
return a.fn.alert = e, this
}, a(document).on("click.bs.alert.data-api", c, d.prototype.close)
}(jQuery), + function(a) {
"use strict";
function b(b) {
return this.each(function() {
var d = a(this),
e = d.data("bs.button"),
f = "object" == typeof b && b;
e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b)
})
}
var c = function(b, d) {
this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1
};
c.VERSION = "3.3.7", c.DEFAULTS = {
loadingText: "loading..."
}, c.prototype.setState = function(b) {
var c = "disabled",
d = this.$element,
e = d.is("input") ? "val" : "html",
f = d.data();
b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function() {
d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c).prop(c, !0)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c).prop(c, !1))
}, this), 0)
}, c.prototype.toggle = function() {
var a = !0,
b = this.$element.closest('[data-toggle="buttons"]');
if (b.length) {
var c = this.$element.find("input");
"radio" == c.prop("type") ? (c.prop("checked") && (a = !1), b.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == c.prop("type") && (c.prop("checked") !== this.$element.hasClass("active") && (a = !1), this.$element.toggleClass("active")), c.prop("checked", this.$element.hasClass("active")), a && c.trigger("change")
} else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")
};
var d = a.fn.button;
a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function() {
return a.fn.button = d, this
}, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(c) {
var d = a(c.target).closest(".btn");
b.call(d, "toggle"), a(c.target).is('input[type="radio"], input[type="checkbox"]') || (c.preventDefault(), d.is("input,button") ? d.trigger("focus") : d.find("input:visible,button:visible").first().trigger("focus"))
}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(b) {
a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))
})
}(jQuery), + function(a) {
"use strict";
function b(b) {
return this.each(function() {
var d = a(this),
e = d.data("bs.carousel"),
f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b),
g = "string" == typeof b ? b : f.slide;
e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()
})
}
var c = function(b, c) {
this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this))
};
c.VERSION = "3.3.7", c.TRANSITION_DURATION = 600, c.DEFAULTS = {
interval: 5e3,
pause: "hover",
wrap: !0,
keyboard: !0
}, c.prototype.keydown = function(a) {
if (!/input|textarea/i.test(a.target.tagName)) {
switch (a.which) {
case 37:
this.prev();
break;
case 39:
this.next();
break;
default:
return
}
a.preventDefault()
}
}, c.prototype.cycle = function(b) {
return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this
}, c.prototype.getItemIndex = function(a) {
return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active)
}, c.prototype.getItemForDirection = function(a, b) {
var c = this.getItemIndex(b),
d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1;
if (d && !this.options.wrap) return b;
var e = "prev" == a ? -1 : 1,
f = (c + e) % this.$items.length;
return this.$items.eq(f)
}, c.prototype.to = function(a) {
var b = this,
c = this.getItemIndex(this.$active = this.$element.find(".item.active"));
return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function() {
b.to(a)
}) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a))
}, c.prototype.pause = function(b) {
return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
}, c.prototype.next = function() {
return this.sliding ? void 0 : this.slide("next")
}, c.prototype.prev = function() {
return this.sliding ? void 0 : this.slide("prev")
}, c.prototype.slide = function(b, d) {
var e = this.$element.find(".item.active"),
f = d || this.getItemForDirection(b, e),
g = this.interval,
h = "next" == b ? "left" : "right",
i = this;
if (f.hasClass("active")) return this.sliding = !1;
var j = f[0],
k = a.Event("slide.bs.carousel", {
relatedTarget: j,
direction: h
});
if (this.$element.trigger(k), !k.isDefaultPrevented()) {
if (this.sliding = !0, g && this.pause(), this.$indicators.length) {
this.$indicators.find(".active").removeClass("active");
var l = a(this.$indicators.children()[this.getItemIndex(f)]);
l && l.addClass("active")
}
var m = a.Event("slid.bs.carousel", {
relatedTarget: j,
direction: h
});
return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function() {
f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function() {
i.$element.trigger(m)
}, 0)
}).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this
}
};
var d = a.fn.carousel;
a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function() {
return a.fn.carousel = d, this
};
var e = function(c) {
var d, e = a(this),
f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));
if (f.hasClass("carousel")) {
var g = a.extend({}, f.data(), e.data()),
h = e.attr("data-slide-to");
h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault()
}
};
a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function() {
a('[data-ride="carousel"]').each(function() {
var c = a(this);
b.call(c, c.data())
})
})
}(jQuery), + function(a) {
"use strict";
function b(b) {
var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "");
return a(d)
}
function c(b) {
return this.each(function() {
var c = a(this),
e = c.data("bs.collapse"),
f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b);
!e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]()
})
}
var d = function(b, c) {
this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
};
d.VERSION = "3.3.7", d.TRANSITION_DURATION = 350, d.DEFAULTS = {
toggle: !0
}, d.prototype.dimension = function() {
var a = this.$element.hasClass("width");
return a ? "width" : "height"
}, d.prototype.show = function() {
if (!this.transitioning && !this.$element.hasClass("in")) {
var b, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) {
var f = a.Event("show.bs.collapse");
if (this.$element.trigger(f), !f.isDefaultPrevented()) {
e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null));
var g = this.dimension();
this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
var h = function() {
this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
};
if (!a.support.transition) return h.call(this);
var i = a.camelCase(["scroll", g].join("-"));
this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])
}
}
}
}, d.prototype.hide = function() {
if (!this.transitioning && this.$element.hasClass("in")) {
var b = a.Event("hide.bs.collapse");
if (this.$element.trigger(b), !b.isDefaultPrevented()) {
var c = this.dimension();
this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
var e = function() {
this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
};
return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this)
}
}
}, d.prototype.toggle = function() {
this[this.$element.hasClass("in") ? "hide" : "show"]()
}, d.prototype.getParent = function() {
return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function(c, d) {
var e = a(d);
this.addAriaAndCollapsedClass(b(e), e)
}, this)).end()
}, d.prototype.addAriaAndCollapsedClass = function(a, b) {
var c = a.hasClass("in");
a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c)
};
var e = a.fn.collapse;
a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function() {
return a.fn.collapse = e, this
}, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(d) {
var e = a(this);
e.attr("data-target") || d.preventDefault();
var f = b(e),
g = f.data("bs.collapse"),
h = g ? "toggle" : e.data();
c.call(f, h)
})
}(jQuery), + function(a) {
"use strict";
function b(b) {
var c = b.attr("data-target");
c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ""));
var d = c && a(c);
return d && d.length ? d : b.parent()
}
function c(c) {
c && 3 === c.which || (a(e).remove(), a(f).each(function() {
var d = a(this),
e = b(d),
f = {
relatedTarget: this
};
e.hasClass("open") && (c && "click" == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event("hide.bs.dropdown", f)), c.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger(a.Event("hidden.bs.dropdown", f)))))
}))
}
function d(b) {
return this.each(function() {
var c = a(this),
d = c.data("bs.dropdown");
d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c)
})
}
var e = ".dropdown-backdrop",
f = '[data-toggle="dropdown"]',
g = function(b) {
a(b).on("click.bs.dropdown", this.toggle)
};
g.VERSION = "3.3.7", g.prototype.toggle = function(d) {
var e = a(this);
if (!e.is(".disabled, :disabled")) {
var f = b(e),
g = f.hasClass("open");
if (c(), !g) {
"ontouchstart" in document.documentElement && !f.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c);
var h = {
relatedTarget: this
};
if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented()) return;
e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger(a.Event("shown.bs.dropdown", h))
}
return !1
}
}, g.prototype.keydown = function(c) {
if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) {
var d = a(this);
if (c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")) {
var e = b(d),
g = e.hasClass("open");
if (!g && 27 != c.which || g && 27 == c.which) return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click");
var h = " li:not(.disabled):visible a",
i = e.find(".dropdown-menu" + h);
if (i.length) {
var j = i.index(c.target);
38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus")
}
}
}
};
var h = a.fn.dropdown;
a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function() {
return a.fn.dropdown = h, this
}, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function(a) {
a.stopPropagation()
}).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", g.prototype.keydown)
}(jQuery), + function(a) {
"use strict";
function b(b, d) {
return this.each(function() {
var e = a(this),
f = e.data("bs.modal"),
g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b);
f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d)
})
}
var c = function(b, c) {
this.options = c, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function() {
this.$element.trigger("loaded.bs.modal")
}, this))
};
c.VERSION = "3.3.7", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = {
backdrop: !0,
keyboard: !0,
show: !0
}, c.prototype.toggle = function(a) {
return this.isShown ? this.hide() : this.show(a)
}, c.prototype.show = function(b) {
var d = this,
e = a.Event("show.bs.modal", {
relatedTarget: b
});
this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function() {
d.$element.one("mouseup.dismiss.bs.modal", function(b) {
a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0)
})
}), this.backdrop(function() {
var e = a.support.transition && d.$element.hasClass("fade");
d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in"), d.enforceFocus();
var f = a.Event("shown.bs.modal", {
relatedTarget: b
});
e ? d.$dialog.one("bsTransitionEnd", function() {
d.$element.trigger("focus").trigger(f)
}).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f)
}))
}, c.prototype.hide = function(b) {
b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal())
}, c.prototype.enforceFocus = function() {
a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function(a) {
document === a.target || this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")
}, this))
}, c.prototype.escape = function() {
this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function(a) {
27 == a.which && this.hide()
}, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
}, c.prototype.resize = function() {
this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal")
}, c.prototype.hideModal = function() {
var a = this;
this.$element.hide(), this.backdrop(function() {
a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal")
})
}, c.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
}, c.prototype.backdrop = function(b) {
var d = this,
e = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var f = a.support.transition && e;
if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function(a) {
return this.ignoreBackdropClick ? void(this.ignoreBackdropClick = !1) : void(a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
}, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return;
f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass("in");
var g = function() {
d.removeBackdrop(), b && b()
};
a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g()
} else b && b()
}, c.prototype.handleUpdate = function() {
this.adjustDialog()
}, c.prototype.adjustDialog = function() {
var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "",
paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""
})
}, c.prototype.resetAdjustments = function() {
this.$element.css({
paddingLeft: "",
paddingRight: ""
})
}, c.prototype.checkScrollbar = function() {
var a = window.innerWidth;
if (!a) {
var b = document.documentElement.getBoundingClientRect();
a = b.right - Math.abs(b.left)
}
this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar()
}, c.prototype.setScrollbar = function() {
var a = parseInt(this.$body.css("padding-right") || 0, 10);
this.originalBodyPad = document.body.style.paddingRight || "",
this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)
}, c.prototype.resetScrollbar = function() {
this.$body.css("padding-right", this.originalBodyPad)
}, c.prototype.measureScrollbar = function() {
var a = document.createElement("div");
a.className = "modal-scrollbar-measure", this.$body.append(a);
var b = a.offsetWidth - a.clientWidth;
return this.$body[0].removeChild(a), b
};
var d = a.fn.modal;
a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function() {
return a.fn.modal = d, this
}, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(c) {
var d = a(this),
e = d.attr("href"),
f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")),
g = f.data("bs.modal") ? "toggle" : a.extend({
remote: !/#/.test(e) && e
}, f.data(), d.data());
d.is("a") && c.preventDefault(), f.one("show.bs.modal", function(a) {
a.isDefaultPrevented() || f.one("hidden.bs.modal", function() {
d.is(":visible") && d.trigger("focus")
})
}), b.call(f, g, this)
})
}(jQuery), + function(a) {
"use strict";
function b(b) {
return this.each(function() {
var d = a(this),
e = d.data("bs.tooltip"),
f = "object" == typeof b && b;
(e || !/destroy|hide/.test(b)) && (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]())
})
}
var c = function(a, b) {
this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", a, b)
};
c.VERSION = "3.3.7", c.TRANSITION_DURATION = 150, c.DEFAULTS = {
animation: !0,
placement: "top",
selector: !1,
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
trigger: "hover focus",
title: "",
delay: 0,
html: !1,
container: !1,
viewport: {
selector: "body",
padding: 0
}
}, c.prototype.init = function(b, c, d) {
if (this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = {
click: !1,
hover: !1,
focus: !1
}, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!");
for (var e = this.options.trigger.split(" "), f = e.length; f--;) {
var g = e[f];
if ("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this));
else if ("manual" != g) {
var h = "hover" == g ? "mouseenter" : "focusin",
i = "hover" == g ? "mouseleave" : "focusout";
this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this))
}
}
this.options.selector ? this._options = a.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle()
}, c.prototype.getDefaults = function() {
return c.DEFAULTS
}, c.prototype.getOptions = function(b) {
return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {
show: b.delay,
hide: b.delay
}), b
}, c.prototype.getDelegateOptions = function() {
var b = {},
c = this.getDefaults();
return this._options && a.each(this._options, function(a, d) {
c[a] != d && (b[a] = d)
}), b
}, c.prototype.enter = function(b) {
var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusin" == b.type ? "focus" : "hover"] = !0), c.tip().hasClass("in") || "in" == c.hoverState ? void(c.hoverState = "in") : (clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void(c.timeout = setTimeout(function() {
"in" == c.hoverState && c.show()
}, c.options.delay.show)) : c.show())
}, c.prototype.isInStateTrue = function() {
for (var a in this.inState)
if (this.inState[a]) return !0;
return !1
}, c.prototype.leave = function(b) {
var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusout" == b.type ? "focus" : "hover"] = !1), c.isInStateTrue() ? void 0 : (clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void(c.timeout = setTimeout(function() {
"out" == c.hoverState && c.hide()
}, c.options.delay.hide)) : c.hide())
}, c.prototype.show = function() {
var b = a.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
this.$element.trigger(b);
var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
if (b.isDefaultPrevented() || !d) return;
var e = this,
f = this.tip(),
g = this.getUID(this.type);
this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");
var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement,
i = /\s?auto?\s?/i,
j = i.test(h);
j && (h = h.replace(i, "") || "top"), f.detach().css({
top: 0,
left: 0,
display: "block"
}).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type);
var k = this.getPosition(),
l = f[0].offsetWidth,
m = f[0].offsetHeight;
if (j) {
var n = h,
o = this.getPosition(this.$viewport);
h = "bottom" == h && k.bottom + m > o.bottom ? "top" : "top" == h && k.top - m < o.top ? "bottom" : "right" == h && k.right + l > o.width ? "left" : "left" == h && k.left - l < o.left ? "right" : h, f.removeClass(n).addClass(h)
}
var p = this.getCalculatedOffset(h, k, l, m);
this.applyPlacement(p, h);
var q = function() {
var a = e.hoverState;
e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e)
};
a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION) : q()
}
}, c.prototype.applyPlacement = function(b, c) {
var d = this.tip(),
e = d[0].offsetWidth,
f = d[0].offsetHeight,
g = parseInt(d.css("margin-top"), 10),
h = parseInt(d.css("margin-left"), 10);
isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({
using: function(a) {
d.css({
top: Math.round(a.top),
left: Math.round(a.left)
})
}
}, b), 0), d.addClass("in");
var i = d[0].offsetWidth,
j = d[0].offsetHeight;
"top" == c && j != f && (b.top = b.top + f - j);
var k = this.getViewportAdjustedDelta(c, b, i, j);
k.left ? b.left += k.left : b.top += k.top;
var l = /top|bottom/.test(c),
m = l ? 2 * k.left - e + i : 2 * k.top - f + j,
n = l ? "offsetWidth" : "offsetHeight";
d.offset(b), this.replaceArrow(m, d[0][n], l)
}, c.prototype.replaceArrow = function(a, b, c) {
this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "")
}, c.prototype.setContent = function() {
var a = this.tip(),
b = this.getTitle();
a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right")
}, c.prototype.hide = function(b) {
function d() {
"in" != e.hoverState && f.detach(), e.$element && e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b()
}
var e = this,
f = a(this.$tip),
g = a.Event("hide.bs." + this.type);
return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass("in"), a.support.transition && f.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this)
}, c.prototype.fixTitle = function() {
var a = this.$element;
(a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")
}, c.prototype.hasContent = function() {
return this.getTitle()
}, c.prototype.getPosition = function(b) {
b = b || this.$element;
var c = b[0],
d = "BODY" == c.tagName,
e = c.getBoundingClientRect();
null == e.width && (e = a.extend({}, e, {
width: e.right - e.left,
height: e.bottom - e.top
}));
var f = window.SVGElement && c instanceof window.SVGElement,
g = d ? {
top: 0,
left: 0
} : f ? null : b.offset(),
h = {
scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop()
},
i = d ? {
width: a(window).width(),
height: a(window).height()
} : null;
return a.extend({}, e, h, i, g)
}, c.prototype.getCalculatedOffset = function(a, b, c, d) {
return "bottom" == a ? {
top: b.top + b.height,
left: b.left + b.width / 2 - c / 2
} : "top" == a ? {
top: b.top - d,
left: b.left + b.width / 2 - c / 2
} : "left" == a ? {
top: b.top + b.height / 2 - d / 2,
left: b.left - c
} : {
top: b.top + b.height / 2 - d / 2,
left: b.left + b.width
}
}, c.prototype.getViewportAdjustedDelta = function(a, b, c, d) {
var e = {
top: 0,
left: 0
};
if (!this.$viewport) return e;
var f = this.options.viewport && this.options.viewport.padding || 0,
g = this.getPosition(this.$viewport);
if (/right|left/.test(a)) {
var h = b.top - f - g.scroll,
i = b.top + f - g.scroll + d;
h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i)
} else {
var j = b.left - f,
k = b.left + f + c;
j < g.left ? e.left = g.left - j : k > g.right && (e.left = g.left + g.width - k)
}
return e
}, c.prototype.getTitle = function() {
var a, b = this.$element,
c = this.options;
return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title)
}, c.prototype.getUID = function(a) {
do a += ~~(1e6 * Math.random()); while (document.getElementById(a));
return a
}, c.prototype.tip = function() {
if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");
return this.$tip
}, c.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}, c.prototype.enable = function() {
this.enabled = !0
}, c.prototype.disable = function() {
this.enabled = !1
}, c.prototype.toggleEnabled = function() {
this.enabled = !this.enabled
}, c.prototype.toggle = function(b) {
var c = this;
b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), b ? (c.inState.click = !c.inState.click, c.isInStateTrue() ? c.enter(c) : c.leave(c)) : c.tip().hasClass("in") ? c.leave(c) : c.enter(c)
}, c.prototype.destroy = function() {
var a = this;
clearTimeout(this.timeout), this.hide(function() {
a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null, a.$element = null
})
};
var d = a.fn.tooltip;
a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function() {
return a.fn.tooltip = d, this
}
}(jQuery), + function(a) {
"use strict";
function b(b) {
return this.each(function() {
var d = a(this),
e = d.data("bs.popover"),
f = "object" == typeof b && b;
(e || !/destroy|hide/.test(b)) && (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]())
})
}
var c = function(a, b) {
this.init("popover", a, b)
};
if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js");
c.VERSION = "3.3.7", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
placement: "right",
trigger: "click",
content: "",
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
}), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function() {
return c.DEFAULTS
}, c.prototype.setContent = function() {
var a = this.tip(),
b = this.getTitle(),
c = this.getContent();
a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide()
}, c.prototype.hasContent = function() {
return this.getTitle() || this.getContent()
}, c.prototype.getContent = function() {
var a = this.$element,
b = this.options;
return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content)
}, c.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".arrow")
};
var d = a.fn.popover;
a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function() {
return a.fn.popover = d, this
}
}(jQuery), + function(a) {
"use strict";
function b(c, d) {
this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body) ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", a.proxy(this.process, this)), this.refresh(), this.process()
}
function c(c) {
return this.each(function() {
var d = a(this),
e = d.data("bs.scrollspy"),
f = "object" == typeof c && c;
e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]()
})
}
b.VERSION = "3.3.7", b.DEFAULTS = {
offset: 10
}, b.prototype.getScrollHeight = function() {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}, b.prototype.refresh = function() {
var b = this,
c = "offset",
d = 0;
this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = "position", d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function() {
var b = a(this),
e = b.data("target") || b.attr("href"),
f = /^#./.test(e) && a(e);
return f && f.length && f.is(":visible") && [
[f[c]().top + d, e]
] || null
}).sort(function(a, b) {
return a[0] - b[0]
}).each(function() {
b.offsets.push(this[0]), b.targets.push(this[1])
})
}, b.prototype.process = function() {
var a, b = this.$scrollElement.scrollTop() + this.options.offset,
c = this.getScrollHeight(),
d = this.options.offset + c - this.$scrollElement.height(),
e = this.offsets,
f = this.targets,
g = this.activeTarget;
if (this.scrollHeight != c && this.refresh(), b >= d) return g != (a = f[f.length - 1]) && this.activate(a);
if (g && b < e[0]) return this.activeTarget = null, this.clear();
for (a = e.length; a--;) g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a])
}, b.prototype.activate = function(b) {
this.activeTarget = b, this.clear();
var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]',
d = a(c).parents("li").addClass("active");
d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy")
}, b.prototype.clear = function() {
a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
};
var d = a.fn.scrollspy;
a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function() {
return a.fn.scrollspy = d, this
}, a(window).on("load.bs.scrollspy.data-api", function() {
a('[data-spy="scroll"]').each(function() {
var b = a(this);
c.call(b, b.data())
})
})
}(jQuery), + function(a) {
"use strict";
function b(b) {
return this.each(function() {
var d = a(this),
e = d.data("bs.tab");
e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]()
})
}
var c = function(b) {
this.element = a(b)
};
c.VERSION = "3.3.7", c.TRANSITION_DURATION = 150, c.prototype.show = function() {
var b = this.element,
c = b.closest("ul:not(.dropdown-menu)"),
d = b.data("target");
if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {
var e = c.find(".active:last a"),
f = a.Event("hide.bs.tab", {
relatedTarget: b[0]
}),
g = a.Event("show.bs.tab", {
relatedTarget: e[0]
});
if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {
var h = a(d);
this.activate(b.closest("li"), c), this.activate(h, h.parent(), function() {
e.trigger({
type: "hidden.bs.tab",
relatedTarget: b[0]
}), b.trigger({
type: "shown.bs.tab",
relatedTarget: e[0]
})
})
}
}
}, c.prototype.activate = function(b, d, e) {
function f() {
g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu").length && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e()
}
var g = d.find("> .active"),
h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length);
g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in")
};
var d = a.fn.tab;
a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function() {
return a.fn.tab = d, this
};
var e = function(c) {
c.preventDefault(), b.call(a(this), "show")
};
a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)
}(jQuery), + function(a) {
"use strict";
function b(b) {
return this.each(function() {
var d = a(this),
e = d.data("bs.affix"),
f = "object" == typeof b && b;
e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]()
})
}
var c = function(b, d) {
this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition()
};
c.VERSION = "3.3.7", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = {
offset: 0,
target: window
}, c.prototype.getState = function(a, b, c, d) {
var e = this.$target.scrollTop(),
f = this.$element.offset(),
g = this.$target.height();
if (null != c && "top" == this.affixed) return c > e ? "top" : !1;
if ("bottom" == this.affixed) return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom";
var h = null == this.affixed,
i = h ? e : f.top,
j = h ? g : b;
return null != c && c >= e ? "top" : null != d && i + j >= a - d ? "bottom" : !1
}, c.prototype.getPinnedOffset = function() {
if (this.pinnedOffset) return this.pinnedOffset;
this.$element.removeClass(c.RESET).addClass("affix");
var a = this.$target.scrollTop(),
b = this.$element.offset();
return this.pinnedOffset = b.top - a
}, c.prototype.checkPositionWithEventLoop = function() {
setTimeout(a.proxy(this.checkPosition, this), 1)
}, c.prototype.checkPosition = function() {
if (this.$element.is(":visible")) {
var b = this.$element.height(),
d = this.options.offset,
e = d.top,
f = d.bottom,
g = Math.max(a(document).height(), a(document.body).height());
"object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));
var h = this.getState(g, b, e, f);
if (this.affixed != h) {
null != this.unpin && this.$element.css("top", "");
var i = "affix" + (h ? "-" + h : ""),
j = a.Event(i + ".bs.affix");
if (this.$element.trigger(j), j.isDefaultPrevented()) return;
this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix")
}
"bottom" == h && this.$element.offset({
top: g - b - f
})
}
};
var d = a.fn.affix;
a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function() {
return a.fn.affix = d, this
}, a(window).on("load", function() {
a('[data-spy="affix"]').each(function() {
var c = a(this),
d = c.data();
d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d)
})
})
}(jQuery), ! function(a, b) {
"use strict";
"undefined" != typeof module && module.exports ? module.exports = b(require("jquery"), require("bootstrap")) : "function" == typeof define && define.amd ? define("bootstrap-dialog", ["jquery", "bootstrap"], function(a) {
return b(a)
}) : a.BootstrapDialog = b(a.jQuery)
}(this, function(a) {
"use strict";
var b = a.fn.modal.Constructor,
c = function(a, c) {
b.call(this, a, c)
};
c.getModalVersion = function() {
var b = null;
return b = "undefined" == typeof a.fn.modal.Constructor.VERSION ? "v3.1" : /3\.2\.\d+/.test(a.fn.modal.Constructor.VERSION) ? "v3.2" : /3\.3\.[1,2]/.test(a.fn.modal.Constructor.VERSION) ? "v3.3" : "v3.3.4"
}, c.ORIGINAL_BODY_PADDING = parseInt(a("body").css("padding-right") || 0, 10), c.METHODS_TO_OVERRIDE = {}, c.METHODS_TO_OVERRIDE["v3.1"] = {}, c.METHODS_TO_OVERRIDE["v3.2"] = {
hide: function(b) {
if (b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented()) {
this.isShown = !1;
var c = this.getGlobalOpenedDialogs();
0 === c.length && this.$body.removeClass("modal-open"), this.resetScrollbar(), this.escape(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal()
}
}
}, c.METHODS_TO_OVERRIDE["v3.3"] = {
setScrollbar: function() {
var a = c.ORIGINAL_BODY_PADDING;
this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)
},
resetScrollbar: function() {
var a = this.getGlobalOpenedDialogs();
0 === a.length && this.$body.css("padding-right", c.ORIGINAL_BODY_PADDING)
},
hideModal: function() {
this.$element.hide(), this.backdrop(a.proxy(function() {
var a = this.getGlobalOpenedDialogs();
0 === a.length && this.$body.removeClass("modal-open"), this.resetAdjustments(), this.resetScrollbar(), this.$element.trigger("hidden.bs.modal")
}, this))
}
}, c.METHODS_TO_OVERRIDE["v3.3.4"] = a.extend({}, c.METHODS_TO_OVERRIDE["v3.3"]), c.prototype = {
constructor: c,
getGlobalOpenedDialogs: function() {
var b = [];
return a.each(d.dialogs, function(a, c) {
c.isRealized() && c.isOpened() && b.push(c)
}), b
}
}, c.prototype = a.extend(c.prototype, b.prototype, c.METHODS_TO_OVERRIDE[c.getModalVersion()]);
var d = function(b) {
this.defaultOptions = a.extend(!0, {
id: d.newGuid(),
buttons: [],
data: {},
onshow: null,
onshown: null,
onhide: null,
onhidden: null
}, d.defaultOptions), this.indexedButtons = {}, this.registeredButtonHotkeys = {}, this.draggableData = {
isMouseDown: !1,
mouseOffset: {}
}, this.realized = !1, this.opened = !1, this.initOptions(b), this.holdThisInstance()
};
return d.BootstrapDialogModal = c, d.NAMESPACE = "bootstrap-dialog", d.TYPE_DEFAULT = "type-default", d.TYPE_INFO = "type-info", d.TYPE_PRIMARY = "type-primary", d.TYPE_SUCCESS = "type-success", d.TYPE_WARNING = "type-warning", d.TYPE_DANGER = "type-danger", d.DEFAULT_TEXTS = {}, d.DEFAULT_TEXTS[d.TYPE_DEFAULT] = "Information", d.DEFAULT_TEXTS[d.TYPE_INFO] = "Information", d.DEFAULT_TEXTS[d.TYPE_PRIMARY] = "Information", d.DEFAULT_TEXTS[d.TYPE_SUCCESS] = "Success", d.DEFAULT_TEXTS[d.TYPE_WARNING] = "Warning", d.DEFAULT_TEXTS[d.TYPE_DANGER] = "Danger", d.DEFAULT_TEXTS.OK = "OK", d.DEFAULT_TEXTS.CANCEL = "Cancel", d.DEFAULT_TEXTS.CONFIRM = "Confirmation", d.SIZE_NORMAL = "size-normal", d.SIZE_SMALL = "size-small", d.SIZE_WIDE = "size-wide", d.SIZE_LARGE = "size-large", d.BUTTON_SIZES = {}, d.BUTTON_SIZES[d.SIZE_NORMAL] = "", d.BUTTON_SIZES[d.SIZE_SMALL] = "", d.BUTTON_SIZES[d.SIZE_WIDE] = "", d.BUTTON_SIZES[d.SIZE_LARGE] = "btn-lg", d.ICON_SPINNER = "glyphicon glyphicon-asterisk", d.defaultOptions = {
type: d.TYPE_PRIMARY,
size: d.SIZE_NORMAL,
cssClass: "",
title: null,
message: null,
nl2br: !0,
closable: !0,
closeByBackdrop: !1,
closeByKeyboard: !1,
closeIcon: "×",
spinicon: d.ICON_SPINNER,
autodestroy: !0,
draggable: !0,
animate: !0,
description: "",
tabindex: -1
}, d.configDefaultOptions = function(b) {
d.defaultOptions = a.extend(!0, d.defaultOptions, b)
}, d.dialogs = {}, d.openAll = function() {
a.each(d.dialogs, function(a, b) {
b.open()
})
}, d.closeAll = function() {
a.each(d.dialogs, function(a, b) {
b.close()
})
}, d.getDialog = function(a) {
var b = null;
return "undefined" != typeof d.dialogs[a] && (b = d.dialogs[a]), b
}, d.setDialog = function(a) {
return d.dialogs[a.getId()] = a, a
}, d.addDialog = function(a) {
return d.setDialog(a)
}, d.moveFocus = function() {
var b = null;
a.each(d.dialogs, function(a, c) {
c.isRealized() && c.isOpened() && (b = c)
}), null !== b && b.getModal().focus()
}, d.METHODS_TO_OVERRIDE = {}, d.METHODS_TO_OVERRIDE["v3.1"] = {
handleModalBackdropEvent: function() {
return this.getModal().on("click", {
dialog: this
}, function(a) {
a.target === this && a.data.dialog.isClosable() && a.data.dialog.canCloseByBackdrop() && a.data.dialog.close()
}), this
},
updateZIndex: function() {
if (this.isOpened()) {
var b = 1040,
c = 1050,
e = 0;
a.each(d.dialogs, function(a, b) {
b.isRealized() && b.isOpened() && e++
});
var f = this.getModal(),
g = f.data("bs.modal").$backdrop;
f.css("z-index", c + 20 * (e - 1)), g.css("z-index", b + 20 * (e - 1))
}
return this
},
open: function() {
return !this.isRealized() && this.realize(), this.getModal().modal("show"), this.updateZIndex(), this
}
}, d.METHODS_TO_OVERRIDE["v3.2"] = {
handleModalBackdropEvent: d.METHODS_TO_OVERRIDE["v3.1"].handleModalBackdropEvent,
updateZIndex: d.METHODS_TO_OVERRIDE["v3.1"].updateZIndex,
open: d.METHODS_TO_OVERRIDE["v3.1"].open
}, d.METHODS_TO_OVERRIDE["v3.3"] = {}, d.METHODS_TO_OVERRIDE["v3.3.4"] = a.extend({}, d.METHODS_TO_OVERRIDE["v3.1"]), d.prototype = {
constructor: d,
initOptions: function(b) {
return this.options = a.extend(!0, this.defaultOptions, b), this
},
holdThisInstance: function() {
return d.addDialog(this), this
},
initModalStuff: function() {
return this.setModal(this.createModal()).setModalDialog(this.createModalDialog()).setModalContent(this.createModalContent()).setModalHeader(this.createModalHeader()).setModalBody(this.createModalBody()).setModalFooter(this.createModalFooter()), this.getModal().append(this.getModalDialog()), this.getModalDialog().append(this.getModalContent()), this.getModalContent().append(this.getModalHeader()).append(this.getModalBody()).append(this.getModalFooter()), this
},
createModal: function() {
var b = a('<div class="modal" role="dialog" aria-hidden="true"></div>');
return b.prop("id", this.getId()), b.attr("aria-labelledby", this.getId() + "_title"), b
},
getModal: function() {
return this.$modal
},
setModal: function(a) {
return this.$modal = a, this
},
createModalDialog: function() {
return a('<div class="modal-dialog"></div>')
},
getModalDialog: function() {
return this.$modalDialog
},
setModalDialog: function(a) {
return this.$modalDialog = a, this
},
createModalContent: function() {
return a('<div class="modal-content"></div>')
},
getModalContent: function() {
return this.$modalContent
},
setModalContent: function(a) {
return this.$modalContent = a, this
},
createModalHeader: function() {
return a('<div class="modal-header"></div>')
},
getModalHeader: function() {
return this.$modalHeader
},
setModalHeader: function(a) {
return this.$modalHeader = a, this
},
createModalBody: function() {
return a('<div class="modal-body"></div>')
},
getModalBody: function() {
return this.$modalBody
},
setModalBody: function(a) {
return this.$modalBody = a, this
},
createModalFooter: function() {
return a('<div class="modal-footer"></div>')
},
getModalFooter: function() {
return this.$modalFooter
},
setModalFooter: function(a) {
return this.$modalFooter = a, this
},
createDynamicContent: function(a) {
var b = null;
return b = "function" == typeof a ? a.call(a, this) : a, "string" == typeof b && (b = this.formatStringContent(b)), b
},
formatStringContent: function(a) {
return this.options.nl2br ? a.replace(/\r\n/g, "<br />").replace(/[\r\n]/g, "<br />") : a
},
setData: function(a, b) {
return this.options.data[a] = b, this
},
getData: function(a) {
return this.options.data[a]
},
setId: function(a) {
return this.options.id = a, this
},
getId: function() {
return this.options.id
},
getType: function() {
return this.options.type
},
setType: function(a) {
return this.options.type = a, this.updateType(), this
},
updateType: function() {
if (this.isRealized()) {
var a = [d.TYPE_DEFAULT, d.TYPE_INFO, d.TYPE_PRIMARY, d.TYPE_SUCCESS, d.TYPE_WARNING, d.TYPE_DANGER];
this.getModal().removeClass(a.join(" ")).addClass(this.getType())
}
return this
},
getSize: function() {
return this.options.size
},
setSize: function(a) {
return this.options.size = a, this.updateSize(), this
},
updateSize: function() {
if (this.isRealized()) {
var b = this;
this.getModal().removeClass(d.SIZE_NORMAL).removeClass(d.SIZE_SMALL).removeClass(d.SIZE_WIDE).removeClass(d.SIZE_LARGE), this.getModal().addClass(this.getSize()), this.getModalDialog().removeClass("modal-sm"), this.getSize() === d.SIZE_SMALL && this.getModalDialog().addClass("modal-sm"), this.getModalDialog().removeClass("modal-lg"), this.getSize() === d.SIZE_WIDE && this.getModalDialog().addClass("modal-lg"), a.each(this.options.buttons, function(c, d) {
var e = b.getButton(d.id),
f = ["btn-lg", "btn-sm", "btn-xs"],
g = !1;
if ("string" == typeof d.cssClass) {
var h = d.cssClass.split(" ");
a.each(h, function(b, c) {
-1 !== a.inArray(c, f) && (g = !0)
})
}
g || (e.removeClass(f.join(" ")), e.addClass(b.getButtonSize()))
})
}
return this
},
getCssClass: function() {
return this.options.cssClass
},
setCssClass: function(a) {
return this.options.cssClass = a, this
},
getTitle: function() {
return this.options.title
},
setTitle: function(a) {
return this.options.title = a, this.updateTitle(), this
},
updateTitle: function() {
if (this.isRealized()) {
var a = null !== this.getTitle() ? this.createDynamicContent(this.getTitle()) : this.getDefaultText();
this.getModalHeader().find("." + this.getNamespace("title")).html("").append(a).prop("id", this.getId() + "_title")
}
return this
},
getMessage: function() {
return this.options.message
},
setMessage: function(a) {
return this.options.message = a, this.updateMessage(), this
},
updateMessage: function() {
if (this.isRealized()) {
var a = this.createDynamicContent(this.getMessage());
this.getModalBody().find("." + this.getNamespace("message")).html("").append(a)
}
return this
},
isClosable: function() {
return this.options.closable
},
setClosable: function(a) {
return this.options.closable = a, this.updateClosable(), this
},
setCloseByBackdrop: function(a) {
return this.options.closeByBackdrop = a, this
},
canCloseByBackdrop: function() {
return this.options.closeByBackdrop
},
setCloseByKeyboard: function(a) {
return this.options.closeByKeyboard = a, this
},
canCloseByKeyboard: function() {
return this.options.closeByKeyboard
},
isAnimate: function() {
return this.options.animate
},
setAnimate: function(a) {
return this.options.animate = a, this
},
updateAnimate: function() {
return this.isRealized() && this.getModal().toggleClass("fade", this.isAnimate()), this
},
getSpinicon: function() {
return this.options.spinicon
},
setSpinicon: function(a) {
return this.options.spinicon = a, this
},
addButton: function(a) {
return this.options.buttons.push(a), this
},
addButtons: function(b) {
var c = this;
return a.each(b, function(a, b) {
c.addButton(b)
}), this
},
getButtons: function() {
return this.options.buttons
},
setButtons: function(a) {
return this.options.buttons = a, this.updateButtons(), this
},
getButton: function(a) {
return "undefined" != typeof this.indexedButtons[a] ? this.indexedButtons[a] : null
},
getButtonSize: function() {
return "undefined" != typeof d.BUTTON_SIZES[this.getSize()] ? d.BUTTON_SIZES[this.getSize()] : ""
},
updateButtons: function() {
return this.isRealized() && (0 === this.getButtons().length ? this.getModalFooter().hide() : this.getModalFooter().show().find("." + this.getNamespace("footer")).html("").append(this.createFooterButtons())), this
},
isAutodestroy: function() {
return this.options.autodestroy
},
setAutodestroy: function(a) {
this.options.autodestroy = a
},
getDescription: function() {
return this.options.description
},
setDescription: function(a) {
return this.options.description = a, this
},
setTabindex: function(a) {
return this.options.tabindex = a, this
},
getTabindex: function() {
return this.options.tabindex
},
updateTabindex: function() {
return this.isRealized() && this.getModal().attr("tabindex", this.getTabindex()), this
},
getDefaultText: function() {
return d.DEFAULT_TEXTS[this.getType()]
},
getNamespace: function(a) {
return d.NAMESPACE + "-" + a
},
createHeaderContent: function() {
var b = a("<div></div>");
return b.addClass(this.getNamespace("header")), b.append(this.createTitleContent()), b.prepend(this.createCloseButton()), b
},
createTitleContent: function() {
var b = a("<div></div>");
return b.addClass(this.getNamespace("title")), b
},
createCloseButton: function() {
var b = a("<div></div>");
b.addClass(this.getNamespace("close-button"));
var c = a('<button class="close"></button>');
return c.append(this.options.closeIcon), b.append(c), b.on("click", {
dialog: this
}, function(a) {
a.data.dialog.close()
}), b
},
createBodyContent: function() {
var b = a("<div></div>");
return b.addClass(this.getNamespace("body")), b.append(this.createMessageContent()), b
},
createMessageContent: function() {
var b = a("<div></div>");
return b.addClass(this.getNamespace("message")), b
},
createFooterContent: function() {
var b = a("<div></div>");
return b.addClass(this.getNamespace("footer")), b
},
createFooterButtons: function() {
var b = this,
c = a("<div></div>");
return c.addClass(this.getNamespace("footer-buttons")), this.indexedButtons = {}, a.each(this.options.buttons, function(a, e) {
e.id || (e.id = d.newGuid());
var f = b.createButton(e);
b.indexedButtons[e.id] = f, c.append(f)
}), c
},
createButton: function(b) {
var c = a('<button class="btn"></button>');
return c.prop("id", b.id), c.data("button", b), "undefined" != typeof b.icon && "" !== a.trim(b.icon) && c.append(this.createButtonIcon(b.icon)), "undefined" != typeof b.label && c.append(b.label), c.addClass("undefined" != typeof b.cssClass && "" !== a.trim(b.cssClass) ? b.cssClass : "btn-default"), "undefined" != typeof b.hotkey && (this.registeredButtonHotkeys[b.hotkey] = c), c.on("click", {
dialog: this,
$button: c,
button: b
}, function(a) {
var b = a.data.dialog,
c = a.data.$button,
d = c.data("button");
return d.autospin && c.toggleSpin(!0), "function" == typeof d.action ? d.action.call(c, b, a) : void 0
}), this.enhanceButton(c), "undefined" != typeof b.enabled && c.toggleEnable(b.enabled), c
},
enhanceButton: function(a) {
return a.dialog = this, a.toggleEnable = function(a) {
var b = this;
return "undefined" != typeof a ? b.prop("disabled", !a).toggleClass("disabled", !a) : b.prop("disabled", !b.prop("disabled")), b
}, a.enable = function() {
var a = this;
return a.toggleEnable(!0), a
}, a.disable = function() {
var a = this;
return a.toggleEnable(!1), a
}, a.toggleSpin = function(b) {
var c = this,
d = c.dialog,
e = c.find("." + d.getNamespace("button-icon"));
return "undefined" == typeof b && (b = !(a.find(".icon-spin").length > 0)),
b ? (e.hide(), a.prepend(d.createButtonIcon(d.getSpinicon()).addClass("icon-spin"))) : (e.show(), a.find(".icon-spin").remove()), c
}, a.spin = function() {
var a = this;
return a.toggleSpin(!0), a
}, a.stopSpin = function() {
var a = this;
return a.toggleSpin(!1), a
}, this
},
createButtonIcon: function(b) {
var c = a("<span></span>");
return c.addClass(this.getNamespace("button-icon")).addClass(b), c
},
enableButtons: function(b) {
return a.each(this.indexedButtons, function(a, c) {
c.toggleEnable(b)
}), this
},
updateClosable: function() {
return this.isRealized() && this.getModalHeader().find("." + this.getNamespace("close-button")).toggle(this.isClosable()), this
},
onShow: function(a) {
return this.options.onshow = a, this
},
onShown: function(a) {
return this.options.onshown = a, this
},
onHide: function(a) {
return this.options.onhide = a, this
},
onHidden: function(a) {
return this.options.onhidden = a, this
},
isRealized: function() {
return this.realized
},
setRealized: function(a) {
return this.realized = a, this
},
isOpened: function() {
return this.opened
},
setOpened: function(a) {
return this.opened = a, this
},
handleModalEvents: function() {
return this.getModal().on("show.bs.modal", {
dialog: this
}, function(a) {
var b = a.data.dialog;
if (b.setOpened(!0), b.isModalEvent(a) && "function" == typeof b.options.onshow) {
var c = b.options.onshow(b);
return c === !1 && b.setOpened(!1), c
}
}), this.getModal().on("shown.bs.modal", {
dialog: this
}, function(a) {
var b = a.data.dialog;
b.isModalEvent(a) && "function" == typeof b.options.onshown && b.options.onshown(b)
}), this.getModal().on("hide.bs.modal", {
dialog: this
}, function(a) {
var b = a.data.dialog;
if (b.setOpened(!1), b.isModalEvent(a) && "function" == typeof b.options.onhide) {
var c = b.options.onhide(b);
return c === !1 && b.setOpened(!0), c
}
}), this.getModal().on("hidden.bs.modal", {
dialog: this
}, function(b) {
var c = b.data.dialog;
c.isModalEvent(b) && "function" == typeof c.options.onhidden && c.options.onhidden(c), c.isAutodestroy() && (c.setRealized(!1), delete d.dialogs[c.getId()], a(this).remove()), d.moveFocus()
}), this.handleModalBackdropEvent(), this.getModal().on("keyup", {
dialog: this
}, function(a) {
27 === a.which && a.data.dialog.isClosable() && a.data.dialog.canCloseByKeyboard() && a.data.dialog.close()
}), this.getModal().on("keyup", {
dialog: this
}, function(b) {
var c = b.data.dialog;
if ("undefined" != typeof c.registeredButtonHotkeys[b.which]) {
var d = a(c.registeredButtonHotkeys[b.which]);
!d.prop("disabled") && d.focus().trigger("click")
}
}), this
},
handleModalBackdropEvent: function() {
return this.getModal().on("click", {
dialog: this
}, function(b) {
a(b.target).hasClass("modal-backdrop") && b.data.dialog.isClosable() && b.data.dialog.canCloseByBackdrop() && b.data.dialog.close()
}), this
},
isModalEvent: function(a) {
return "undefined" != typeof a.namespace && "bs.modal" === a.namespace
},
makeModalDraggable: function() {
return this.options.draggable && (this.getModalHeader().addClass(this.getNamespace("draggable")).on("mousedown", {
dialog: this
}, function(a) {
var b = a.data.dialog;
b.draggableData.isMouseDown = !0;
var c = b.getModalDialog().offset();
b.draggableData.mouseOffset = {
top: a.clientY - c.top,
left: a.clientX - c.left
}
}), this.getModal().on("mouseup mouseleave", {
dialog: this
}, function(a) {
a.data.dialog.draggableData.isMouseDown = !1
}), a("body").on("mousemove", {
dialog: this
}, function(a) {
var b = a.data.dialog;
b.draggableData.isMouseDown && b.getModalDialog().offset({
top: a.clientY - b.draggableData.mouseOffset.top,
left: a.clientX - b.draggableData.mouseOffset.left
})
})), this
},
realize: function() {
return this.initModalStuff(), this.getModal().addClass(d.NAMESPACE).addClass(this.getCssClass()), this.updateSize(), this.getDescription() && this.getModal().attr("aria-describedby", this.getDescription()), this.getModalFooter().append(this.createFooterContent()), this.getModalHeader().append(this.createHeaderContent()), this.getModalBody().append(this.createBodyContent()), this.getModal().data("bs.modal", new c(this.getModal(), {
backdrop: "static",
keyboard: !1,
show: !1
})), this.makeModalDraggable(), this.handleModalEvents(), this.setRealized(!0), this.updateButtons(), this.updateType(), this.updateTitle(), this.updateMessage(), this.updateClosable(), this.updateAnimate(), this.updateSize(), this.updateTabindex(), this
},
open: function() {
return !this.isRealized() && this.realize(), this.getModal().modal("show"), this
},
close: function() {
return !this.isRealized() && this.realize(), this.getModal().modal("hide"), this
}
}, d.prototype = a.extend(d.prototype, d.METHODS_TO_OVERRIDE[c.getModalVersion()]), d.newGuid = function() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(a) {
var b = 16 * Math.random() | 0,
c = "x" === a ? b : 3 & b | 8;
return c.toString(16)
})
}, d.show = function(a) {
return new d(a).open()
}, d.alert = function() {
var b = {},
c = {
type: d.TYPE_PRIMARY,
title: null,
message: null,
closable: !1,
draggable: !1,
buttonLabel: d.DEFAULT_TEXTS.OK,
callback: null
};
b = "object" == typeof arguments[0] && arguments[0].constructor === {}.constructor ? a.extend(!0, c, arguments[0]) : a.extend(!0, c, {
message: arguments[0],
callback: "undefined" != typeof arguments[1] ? arguments[1] : null
});
var e = new d(b);
return e.setData("callback", b.callback), e.addButton({
label: b.buttonLabel,
action: function(a) {
return "function" == typeof a.getData("callback") && a.getData("callback").call(this, !0) === !1 ? !1 : (a.setData("btnClicked", !0), a.close())
}
}), e.onHide("function" == typeof e.options.onhide ? function(a) {
var b = !0;
return !a.getData("btnClicked") && a.isClosable() && "function" == typeof a.getData("callback") && (b = a.getData("callback")(!1)), b === !1 ? !1 : b = this.onhide(a)
}.bind({
onhide: e.options.onhide
}) : function(a) {
var b = !0;
return !a.getData("btnClicked") && a.isClosable() && "function" == typeof a.getData("callback") && (b = a.getData("callback")(!1)), b
}), e.open()
}, d.confirm = function() {
var b = {},
c = {
type: d.TYPE_PRIMARY,
title: null,
message: null,
closable: !1,
draggable: !1,
btnCancelLabel: d.DEFAULT_TEXTS.CANCEL,
btnCancelClass: null,
btnOKLabel: d.DEFAULT_TEXTS.OK,
btnOKClass: null,
callback: null
};
b = "object" == typeof arguments[0] && arguments[0].constructor === {}.constructor ? a.extend(!0, c, arguments[0]) : a.extend(!0, c, {
message: arguments[0],
callback: "undefined" != typeof arguments[1] ? arguments[1] : null
}), null === b.btnOKClass && (b.btnOKClass = ["btn", b.type.split("-")[1]].join("-"));
var e = new d(b);
return e.setData("callback", b.callback), e.addButton({
label: b.btnCancelLabel,
cssClass: b.btnCancelClass,
action: function(a) {
return "function" == typeof a.getData("callback") && a.getData("callback").call(this, !1) === !1 ? !1 : a.close()
}
}), e.addButton({
label: b.btnOKLabel,
cssClass: b.btnOKClass,
action: function(a) {
return "function" == typeof a.getData("callback") && a.getData("callback").call(this, !0) === !1 ? !1 : a.close()
}
}), e.open()
}, d.warning = function(a) {
return new d({
type: d.TYPE_WARNING,
message: a
}).open()
}, d.danger = function(a) {
return new d({
type: d.TYPE_DANGER,
message: a
}).open()
}, d.success = function(a) {
return new d({
type: d.TYPE_SUCCESS,
message: a
}).open()
}, d
}), ! function(a, b) {
"function" == typeof define && define.amd ? define([], function() {
return a.Chartist = b()
}) : "object" == typeof exports ? module.exports = b() : a.Chartist = b()
}(this, function() {
var a = {
version: "0.9.8"
};
return function(a, b, c) {
"use strict";
c.namespaces = {
svg: "http://www.w3.org/2000/svg",
xmlns: "http://www.w3.org/2000/xmlns/",
xhtml: "http://www.w3.org/1999/xhtml",
xlink: "http://www.w3.org/1999/xlink",
ct: "http://gionkunz.github.com/chartist-js/ct"
}, c.noop = function(a) {
return a
}, c.alphaNumerate = function(a) {
return String.fromCharCode(97 + a % 26)
}, c.extend = function(a) {
a = a || {};
var b = Array.prototype.slice.call(arguments, 1);
return b.forEach(function(b) {
for (var d in b) a[d] = "object" != typeof b[d] || null === b[d] || b[d] instanceof Array ? b[d] : c.extend({}, a[d], b[d])
}), a
}, c.replaceAll = function(a, b, c) {
return a.replace(new RegExp(b, "g"), c)
}, c.ensureUnit = function(a, b) {
return "number" == typeof a && (a += b), a
}, c.quantity = function(a) {
if ("string" == typeof a) {
var b = /^(\d+)\s*(.*)$/g.exec(a);
return {
value: +b[1],
unit: b[2] || void 0
}
}
return {
value: a
}
}, c.querySelector = function(a) {
return a instanceof Node ? a : b.querySelector(a)
}, c.times = function(a) {
return Array.apply(null, new Array(a))
}, c.sum = function(a, b) {
return a + (b ? b : 0)
}, c.mapMultiply = function(a) {
return function(b) {
return b * a
}
}, c.mapAdd = function(a) {
return function(b) {
return b + a
}
}, c.serialMap = function(a, b) {
var d = [],
e = Math.max.apply(null, a.map(function(a) {
return a.length
}));
return c.times(e).forEach(function(c, e) {
var f = a.map(function(a) {
return a[e]
});
d[e] = b.apply(null, f)
}), d
}, c.roundWithPrecision = function(a, b) {
var d = Math.pow(10, b || c.precision);
return Math.round(a * d) / d
}, c.precision = 8, c.escapingMap = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
}, c.serialize = function(a) {
return null === a || void 0 === a ? a : ("number" == typeof a ? a = "" + a : "object" == typeof a && (a = JSON.stringify({
data: a
})), Object.keys(c.escapingMap).reduce(function(a, b) {
return c.replaceAll(a, b, c.escapingMap[b])
}, a))
}, c.deserialize = function(a) {
if ("string" != typeof a) return a;
a = Object.keys(c.escapingMap).reduce(function(a, b) {
return c.replaceAll(a, c.escapingMap[b], b)
}, a);
try {
a = JSON.parse(a), a = void 0 !== a.data ? a.data : a
} catch (b) {}
return a
}, c.createSvg = function(a, b, d, e) {
var f;
return b = b || "100%", d = d || "100%", Array.prototype.slice.call(a.querySelectorAll("svg")).filter(function(a) {
return a.getAttributeNS(c.namespaces.xmlns, "ct")
}).forEach(function(b) {
a.removeChild(b)
}), f = new c.Svg("svg").attr({
width: b,
height: d
}).addClass(e).attr({
style: "width: " + b + "; height: " + d + ";"
}), a.appendChild(f._node), f
}, c.normalizeData = function(a) {
if (a = a || {
series: [],
labels: []
}, a.series = a.series || [], a.labels = a.labels || [], a.series.length > 0 && 0 === a.labels.length) {
var b, d = c.getDataArray(a);
b = d.every(function(a) {
return a instanceof Array
}) ? Math.max.apply(null, d.map(function(a) {
return a.length
})) : d.length, a.labels = c.times(b).map(function() {
return ""
})
}
return a
}, c.reverseData = function(a) {
a.labels.reverse(), a.series.reverse();
for (var b = 0; b < a.series.length; b++) "object" == typeof a.series[b] && void 0 !== a.series[b].data ? a.series[b].data.reverse() : a.series[b] instanceof Array && a.series[b].reverse()
}, c.getDataArray = function(a, b, d) {
function e(a) {
if (!c.isFalseyButZero(a)) {
if ((a.data || a) instanceof Array) return (a.data || a).map(e);
if (a.hasOwnProperty("value")) return e(a.value);
if (d) {
var b = {};
return "string" == typeof d ? b[d] = c.getNumberOrUndefined(a) : b.y = c.getNumberOrUndefined(a), b.x = a.hasOwnProperty("x") ? c.getNumberOrUndefined(a.x) : b.x, b.y = a.hasOwnProperty("y") ? c.getNumberOrUndefined(a.y) : b.y, b
}
return c.getNumberOrUndefined(a)
}
}
return (b && !a.reversed || !b && a.reversed) && (c.reverseData(a), a.reversed = !a.reversed), a.series.map(e)
}, c.normalizePadding = function(a, b) {
return b = b || 0, "number" == typeof a ? {
top: a,
right: a,
bottom: a,
left: a
} : {
top: "number" == typeof a.top ? a.top : b,
right: "number" == typeof a.right ? a.right : b,
bottom: "number" == typeof a.bottom ? a.bottom : b,
left: "number" == typeof a.left ? a.left : b
}
}, c.getMetaData = function(a, b) {
var d = a.data ? a.data[b] : a[b];
return d ? c.serialize(d.meta) : void 0
}, c.orderOfMagnitude = function(a) {
return Math.floor(Math.log(Math.abs(a)) / Math.LN10)
}, c.projectLength = function(a, b, c) {
return b / c.range * a
}, c.getAvailableHeight = function(a, b) {
return Math.max((c.quantity(b.height).value || a.height()) - (b.chartPadding.top + b.chartPadding.bottom) - b.axisX.offset, 0)
}, c.getHighLow = function(a, b, d) {
function e(a) {
if (void 0 !== a)
if (a instanceof Array)
for (var b = 0; b < a.length; b++) e(a[b]);
else {
var c = d ? +a[d] : +a;
g && c > f.high && (f.high = c), h && c < f.low && (f.low = c)
}
}
b = c.extend({}, b, d ? b["axis" + d.toUpperCase()] : {});
var f = {
high: void 0 === b.high ? -Number.MAX_VALUE : +b.high,
low: void 0 === b.low ? Number.MAX_VALUE : +b.low
},
g = void 0 === b.high,
h = void 0 === b.low;
return (g || h) && e(a), (b.referenceValue || 0 === b.referenceValue) && (f.high = Math.max(b.referenceValue, f.high), f.low = Math.min(b.referenceValue, f.low)), f.high <= f.low && (0 === f.low ? f.high = 1 : f.low < 0 ? f.high = 0 : f.high > 0 ? f.low = 0 : (f.high = 1, f.low = 0)), f
}, c.isNum = function(a) {
return !isNaN(a) && isFinite(a)
}, c.isFalseyButZero = function(a) {
return !a && 0 !== a
}, c.getNumberOrUndefined = function(a) {
return isNaN(+a) ? void 0 : +a
}, c.getMultiValue = function(a, b) {
return c.isNum(a) ? +a : a ? a[b || "y"] || 0 : 0
}, c.rho = function(a) {
function b(a, c) {
return a % c === 0 ? c : b(c, a % c)
}
function c(a) {
return a * a + 1
}
if (1 === a) return a;
var d, e = 2,
f = 2;
if (a % 2 === 0) return 2;
do e = c(e) % a, f = c(c(f)) % a, d = b(Math.abs(e - f), a); while (1 === d);
return d
}, c.getBounds = function(a, b, d, e) {
var f, g, h, i = 0,
j = {
high: b.high,
low: b.low
};
j.valueRange = j.high - j.low, j.oom = c.orderOfMagnitude(j.valueRange), j.step = Math.pow(10, j.oom), j.min = Math.floor(j.low / j.step) * j.step, j.max = Math.ceil(j.high / j.step) * j.step, j.range = j.max - j.min, j.numberOfSteps = Math.round(j.range / j.step);
var k = c.projectLength(a, j.step, j),
l = d > k,
m = e ? c.rho(j.range) : 0;
if (e && c.projectLength(a, 1, j) >= d) j.step = 1;
else if (e && m < j.step && c.projectLength(a, m, j) >= d) j.step = m;
else
for (;;) {
if (l && c.projectLength(a, j.step, j) <= d) j.step *= 2;
else {
if (l || !(c.projectLength(a, j.step / 2, j) >= d)) break;
if (j.step /= 2, e && j.step % 1 !== 0) {
j.step *= 2;
break
}
}
if (i++ > 1e3) throw new Error("Exceeded maximum number of iterations while optimizing scale step!")
}
var n = 2.221e-16;
for (j.step = Math.max(j.step, n), g = j.min, h = j.max; g + j.step <= j.low;) g += j.step;
for (; h - j.step >= j.high;) h -= j.step;
j.min = g, j.max = h, j.range = j.max - j.min;
var o = [];
for (f = j.min; f <= j.max; f += j.step) {
var p = c.roundWithPrecision(f);
p !== o[o.length - 1] && o.push(f)
}
return j.values = o, j
}, c.polarToCartesian = function(a, b, c, d) {
var e = (d - 90) * Math.PI / 180;
return {
x: a + c * Math.cos(e),
y: b + c * Math.sin(e)
}
}, c.createChartRect = function(a, b, d) {
var e = !(!b.axisX && !b.axisY),
f = e ? b.axisY.offset : 0,
g = e ? b.axisX.offset : 0,
h = a.width() || c.quantity(b.width).value || 0,
i = a.height() || c.quantity(b.height).value || 0,
j = c.normalizePadding(b.chartPadding, d);
h = Math.max(h, f + j.left + j.right), i = Math.max(i, g + j.top + j.bottom);
var k = {
padding: j,
width: function() {
return this.x2 - this.x1
},
height: function() {
return this.y1 - this.y2
}
};
return e ? ("start" === b.axisX.position ? (k.y2 = j.top + g, k.y1 = Math.max(i - j.bottom, k.y2 + 1)) : (k.y2 = j.top, k.y1 = Math.max(i - j.bottom - g, k.y2 + 1)), "start" === b.axisY.position ? (k.x1 = j.left + f, k.x2 = Math.max(h - j.right, k.x1 + 1)) : (k.x1 = j.left, k.x2 = Math.max(h - j.right - f, k.x1 + 1))) : (k.x1 = j.left, k.x2 = Math.max(h - j.right, k.x1 + 1), k.y2 = j.top, k.y1 = Math.max(i - j.bottom, k.y2 + 1)), k
}, c.createGrid = function(a, b, d, e, f, g, h, i) {
var j = {};
j[d.units.pos + "1"] = a, j[d.units.pos + "2"] = a, j[d.counterUnits.pos + "1"] = e, j[d.counterUnits.pos + "2"] = e + f;
var k = g.elem("line", j, h.join(" "));
i.emit("draw", c.extend({
type: "grid",
axis: d,
index: b,
group: g,
element: k
}, j))
}, c.createLabel = function(a, b, d, e, f, g, h, i, j, k, l) {
var m, n = {};
if (n[f.units.pos] = a + h[f.units.pos], n[f.counterUnits.pos] = h[f.counterUnits.pos], n[f.units.len] = b, n[f.counterUnits.len] = Math.max(0, g - 10), k) {
var o = '<span class="' + j.join(" ") + '" style="' + f.units.len + ": " + Math.round(n[f.units.len]) + "px; " + f.counterUnits.len + ": " + Math.round(n[f.counterUnits.len]) + 'px">' + e[d] + "</span>";
m = i.foreignObject(o, c.extend({
style: "overflow: visible;"
}, n))
} else m = i.elem("text", n, j.join(" ")).text(e[d]);
l.emit("draw", c.extend({
type: "label",
axis: f,
index: d,
group: i,
element: m,
text: e[d]
}, n))
}, c.getSeriesOption = function(a, b, c) {
if (a.name && b.series && b.series[a.name]) {
var d = b.series[a.name];
return d.hasOwnProperty(c) ? d[c] : b[c]
}
return b[c]
}, c.optionsProvider = function(b, d, e) {
function f(b) {
var f = h;
if (h = c.extend({}, j), d)
for (i = 0; i < d.length; i++) {
var g = a.matchMedia(d[i][0]);
g.matches && (h = c.extend(h, d[i][1]))
}
e && b && e.emit("optionsChanged", {
previousOptions: f,
currentOptions: h
})
}
function g() {
k.forEach(function(a) {
a.removeListener(f)
})
}
var h, i, j = c.extend({}, b),
k = [];
if (!a.matchMedia) throw "window.matchMedia not found! Make sure you're using a polyfill.";
if (d)
for (i = 0; i < d.length; i++) {
var l = a.matchMedia(d[i][0]);
l.addListener(f), k.push(l)
}
return f(), {
removeMediaQueryListeners: g,
getCurrentOptions: function() {
return c.extend({}, h)
}
}
}, c.splitIntoSegments = function(a, b, d) {
var e = {
increasingX: !1,
fillHoles: !1
};
d = c.extend({}, e, d);
for (var f = [], g = !0, h = 0; h < a.length; h += 2) void 0 === b[h / 2].value ? d.fillHoles || (g = !0) : (d.increasingX && h >= 2 && a[h] <= a[h - 2] && (g = !0), g && (f.push({
pathCoordinates: [],
valueData: []
}), g = !1), f[f.length - 1].pathCoordinates.push(a[h], a[h + 1]), f[f.length - 1].valueData.push(b[h / 2]));
return f
}
}(window, document, a),
function(a, b, c) {
"use strict";
c.Interpolation = {}, c.Interpolation.none = function(a) {
var b = {
fillHoles: !1
};
return a = c.extend({}, b, a),
function(b, d) {
for (var e = new c.Svg.Path, f = !0, g = 0; g < b.length; g += 2) {
var h = b[g],
i = b[g + 1],
j = d[g / 2];
void 0 !== j.value ? (f ? e.move(h, i, !1, j) : e.line(h, i, !1, j), f = !1) : a.fillHoles || (f = !0)
}
return e
}
}, c.Interpolation.simple = function(a) {
var b = {
divisor: 2,
fillHoles: !1
};
a = c.extend({}, b, a);
var d = 1 / Math.max(1, a.divisor);
return function(b, e) {
for (var f, g, h, i = new c.Svg.Path, j = 0; j < b.length; j += 2) {
var k = b[j],
l = b[j + 1],
m = (k - f) * d,
n = e[j / 2];
void 0 !== n.value ? (void 0 === h ? i.move(k, l, !1, n) : i.curve(f + m, g, k - m, l, k, l, !1, n), f = k, g = l, h = n) : a.fillHoles || (f = k = h = void 0)
}
return i
}
}, c.Interpolation.cardinal = function(a) {
var b = {
tension: 1,
fillHoles: !1
};
a = c.extend({}, b, a);
var d = Math.min(1, Math.max(0, a.tension)),
e = 1 - d;
return function f(b, g) {
var h = c.splitIntoSegments(b, g, {
fillHoles: a.fillHoles
});
if (h.length) {
if (h.length > 1) {
var i = [];
return h.forEach(function(a) {
i.push(f(a.pathCoordinates, a.valueData))
}), c.Svg.Path.join(i)
}
if (b = h[0].pathCoordinates, g = h[0].valueData, b.length <= 4) return c.Interpolation.none()(b, g);
for (var j, k = (new c.Svg.Path).move(b[0], b[1], !1, g[0]), l = 0, m = b.length; m - 2 * !j > l; l += 2) {
var n = [{
x: +b[l - 2],
y: +b[l - 1]
}, {
x: +b[l],
y: +b[l + 1]
}, {
x: +b[l + 2],
y: +b[l + 3]
}, {
x: +b[l + 4],
y: +b[l + 5]
}];
j ? l ? m - 4 === l ? n[3] = {
x: +b[0],
y: +b[1]
} : m - 2 === l && (n[2] = {
x: +b[0],
y: +b[1]
}, n[3] = {
x: +b[2],
y: +b[3]
}) : n[0] = {
x: +b[m - 2],
y: +b[m - 1]
} : m - 4 === l ? n[3] = n[2] : l || (n[0] = {
x: +b[l],
y: +b[l + 1]
}), k.curve(d * (-n[0].x + 6 * n[1].x + n[2].x) / 6 + e * n[2].x, d * (-n[0].y + 6 * n[1].y + n[2].y) / 6 + e * n[2].y, d * (n[1].x + 6 * n[2].x - n[3].x) / 6 + e * n[2].x, d * (n[1].y + 6 * n[2].y - n[3].y) / 6 + e * n[2].y, n[2].x, n[2].y, !1, g[(l + 2) / 2])
}
return k
}
return c.Interpolation.none()([])
}
}, c.Interpolation.monotoneCubic = function(a) {
var b = {
fillHoles: !1
};
return a = c.extend({}, b, a),
function d(b, e) {
var f = c.splitIntoSegments(b, e, {
fillHoles: a.fillHoles,
increasingX: !0
});
if (f.length) {
if (f.length > 1) {
var g = [];
return f.forEach(function(a) {
g.push(d(a.pathCoordinates, a.valueData))
}), c.Svg.Path.join(g)
}
if (b = f[0].pathCoordinates, e = f[0].valueData, b.length <= 4) return c.Interpolation.none()(b, e);
var h, i, j = [],
k = [],
l = b.length / 2,
m = [],
n = [],
o = [],
p = [];
for (h = 0; l > h; h++) j[h] = b[2 * h], k[h] = b[2 * h + 1];
for (h = 0; l - 1 > h; h++) o[h] = k[h + 1] - k[h], p[h] = j[h + 1] - j[h], n[h] = o[h] / p[h];
for (m[0] = n[0], m[l - 1] = n[l - 2], h = 1; l - 1 > h; h++) 0 === n[h] || 0 === n[h - 1] || n[h - 1] > 0 != n[h] > 0 ? m[h] = 0 : (m[h] = 3 * (p[h - 1] + p[h]) / ((2 * p[h] + p[h - 1]) / n[h - 1] + (p[h] + 2 * p[h - 1]) / n[h]), isFinite(m[h]) || (m[h] = 0));
for (i = (new c.Svg.Path).move(j[0], k[0], !1, e[0]), h = 0; l - 1 > h; h++) i.curve(j[h] + p[h] / 3, k[h] + m[h] * p[h] / 3, j[h + 1] - p[h] / 3, k[h + 1] - m[h + 1] * p[h] / 3, j[h + 1], k[h + 1], !1, e[h + 1]);
return i
}
return c.Interpolation.none()([])
}
}, c.Interpolation.step = function(a) {
var b = {
postpone: !0,
fillHoles: !1
};
return a = c.extend({}, b, a),
function(b, d) {
for (var e, f, g, h = new c.Svg.Path, i = 0; i < b.length; i += 2) {
var j = b[i],
k = b[i + 1],
l = d[i / 2];
void 0 !== l.value ? (void 0 === g ? h.move(j, k, !1, l) : (a.postpone ? h.line(j, f, !1, g) : h.line(e, k, !1, l), h.line(j, k, !1, l)), e = j, f = k, g = l) : a.fillHoles || (e = f = g = void 0)
}
return h
}
}
}(window, document, a),
function(a, b, c) {
"use strict";
c.EventEmitter = function() {
function a(a, b) {
d[a] = d[a] || [], d[a].push(b)
}
function b(a, b) {
d[a] && (b ? (d[a].splice(d[a].indexOf(b), 1), 0 === d[a].length && delete d[a]) : delete d[a])
}
function c(a, b) {
d[a] && d[a].forEach(function(a) {
a(b)
}), d["*"] && d["*"].forEach(function(c) {
c(a, b)
})
}
var d = [];
return {
addEventHandler: a,
removeEventHandler: b,
emit: c
}
}
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a) {
var b = [];
if (a.length)
for (var c = 0; c < a.length; c++) b.push(a[c]);
return b
}
function e(a, b) {
var d = b || this.prototype || c.Class,
e = Object.create(d);
c.Class.cloneDefinitions(e, a);
var f = function() {
var a, b = e.constructor || function() {};
return a = this === c ? Object.create(e) : this, b.apply(a, Array.prototype.slice.call(arguments, 0)), a
};
return f.prototype = e, f["super"] = d, f.extend = this.extend, f
}
function f() {
var a = d(arguments),
b = a[0];
return a.splice(1, a.length - 1).forEach(function(a) {
Object.getOwnPropertyNames(a).forEach(function(c) {
delete b[c], Object.defineProperty(b, c, Object.getOwnPropertyDescriptor(a, c))
})
}), b
}
c.Class = {
extend: e,
cloneDefinitions: f
}
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a, b, d) {
return a && (this.data = a, this.eventEmitter.emit("data", {
type: "update",
data: this.data
})), b && (this.options = c.extend({}, d ? this.options : this.defaultOptions, b), this.initializeTimeoutId || (this.optionsProvider.removeMediaQueryListeners(), this.optionsProvider = c.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter))), this.initializeTimeoutId || this.createChart(this.optionsProvider.getCurrentOptions()), this
}
function e() {
return this.initializeTimeoutId ? a.clearTimeout(this.initializeTimeoutId) : (a.removeEventListener("resize", this.resizeListener), this.optionsProvider.removeMediaQueryListeners()), this
}
function f(a, b) {
return this.eventEmitter.addEventHandler(a, b), this
}
function g(a, b) {
return this.eventEmitter.removeEventHandler(a, b), this
}
function h() {
a.addEventListener("resize", this.resizeListener), this.optionsProvider = c.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter), this.eventEmitter.addEventHandler("optionsChanged", function() {
this.update()
}.bind(this)), this.options.plugins && this.options.plugins.forEach(function(a) {
a instanceof Array ? a[0](this, a[1]) : a(this)
}.bind(this)), this.eventEmitter.emit("data", {
type: "initial",
data: this.data
}), this.createChart(this.optionsProvider.getCurrentOptions()), this.initializeTimeoutId = void 0
}
function i(a, b, d, e, f) {
this.container = c.querySelector(a), this.data = b, this.defaultOptions = d, this.options = e, this.responsiveOptions = f, this.eventEmitter = c.EventEmitter(), this.supportsForeignObject = c.Svg.isSupported("Extensibility"), this.supportsAnimations = c.Svg.isSupported("AnimationEventsAttribute"), this.resizeListener = function() {
this.update()
}.bind(this), this.container && (this.container.__chartist__ && this.container.__chartist__.detach(), this.container.__chartist__ = this), this.initializeTimeoutId = setTimeout(h.bind(this), 0)
}
c.Base = c.Class.extend({
constructor: i,
optionsProvider: void 0,
container: void 0,
svg: void 0,
eventEmitter: void 0,
createChart: function() {
throw new Error("Base chart type can't be instantiated!")
},
update: d,
detach: e,
on: f,
off: g,
version: c.version,
supportsForeignObject: !1
})
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a, d, e, f, g) {
a instanceof Element ? this._node = a : (this._node = b.createElementNS(c.namespaces.svg, a), "svg" === a && this.attr({
"xmlns:ct": c.namespaces.ct
})), d && this.attr(d), e && this.addClass(e), f && (g && f._node.firstChild ? f._node.insertBefore(this._node, f._node.firstChild) : f._node.appendChild(this._node))
}
function e(a, b) {
return "string" == typeof a ? b ? this._node.getAttributeNS(b, a) : this._node.getAttribute(a) : (Object.keys(a).forEach(function(b) {
if (void 0 !== a[b])
if (-1 !== b.indexOf(":")) {
var d = b.split(":");
this._node.setAttributeNS(c.namespaces[d[0]], b, a[b])
} else this._node.setAttribute(b, a[b])
}.bind(this)), this)
}
function f(a, b, d, e) {
return new c.Svg(a, b, d, this, e)
}
function g() {
return this._node.parentNode instanceof SVGElement ? new c.Svg(this._node.parentNode) : null
}
function h() {
for (var a = this._node;
"svg" !== a.nodeName;) a = a.parentNode;
return new c.Svg(a)
}
function i(a) {
var b = this._node.querySelector(a);
return b ? new c.Svg(b) : null
}
function j(a) {
var b = this._node.querySelectorAll(a);
return b.length ? new c.Svg.List(b) : null
}
function k(a, d, e, f) {
if ("string" == typeof a) {
var g = b.createElement("div");
g.innerHTML = a, a = g.firstChild
}
a.setAttribute("xmlns", c.namespaces.xmlns);
var h = this.elem("foreignObject", d, e, f);
return h._node.appendChild(a), h
}
function l(a) {
return this._node.appendChild(b.createTextNode(a)), this
}
function m() {
for (; this._node.firstChild;) this._node.removeChild(this._node.firstChild);
return this
}
function n() {
return this._node.parentNode.removeChild(this._node), this.parent()
}
function o(a) {
return this._node.parentNode.replaceChild(a._node, this._node), a
}
function p(a, b) {
return b && this._node.firstChild ? this._node.insertBefore(a._node, this._node.firstChild) : this._node.appendChild(a._node), this
}
function q() {
return this._node.getAttribute("class") ? this._node.getAttribute("class").trim().split(/\s+/) : []
}
function r(a) {
return this._node.setAttribute("class", this.classes(this._node).concat(a.trim().split(/\s+/)).filter(function(a, b, c) {
return c.indexOf(a) === b
}).join(" ")), this
}
function s(a) {
var b = a.trim().split(/\s+/);
return this._node.setAttribute("class", this.classes(this._node).filter(function(a) {
return -1 === b.indexOf(a)
}).join(" ")), this
}
function t() {
return this._node.setAttribute("class", ""), this
}
function u() {
return this._node.getBoundingClientRect().height
}
function v() {
return this._node.getBoundingClientRect().width
}
function w(a, b, d) {
return void 0 === b && (b = !0), Object.keys(a).forEach(function(e) {
function f(a, b) {
var f, g, h, i = {};
a.easing && (h = a.easing instanceof Array ? a.easing : c.Svg.Easing[a.easing], delete a.easing), a.begin = c.ensureUnit(a.begin, "ms"), a.dur = c.ensureUnit(a.dur, "ms"), h && (a.calcMode = "spline", a.keySplines = h.join(" "), a.keyTimes = "0;1"), b && (a.fill = "freeze", i[e] = a.from, this.attr(i), g = c.quantity(a.begin || 0).value, a.begin = "indefinite"), f = this.elem("animate", c.extend({
attributeName: e
}, a)), b && setTimeout(function() {
try {
f._node.beginElement()
} catch (b) {
i[e] = a.to, this.attr(i), f.remove()
}
}.bind(this), g), d && f._node.addEventListener("beginEvent", function() {
d.emit("animationBegin", {
element: this,
animate: f._node,
params: a
})
}.bind(this)), f._node.addEventListener("endEvent", function() {
d && d.emit("animationEnd", {
element: this,
animate: f._node,
params: a
}), b && (i[e] = a.to, this.attr(i), f.remove())
}.bind(this))
}
a[e] instanceof Array ? a[e].forEach(function(a) {
f.bind(this)(a, !1)
}.bind(this)) : f.bind(this)(a[e], b)
}.bind(this)), this
}
function x(a) {
var b = this;
this.svgElements = [];
for (var d = 0; d < a.length; d++) this.svgElements.push(new c.Svg(a[d]));
Object.keys(c.Svg.prototype).filter(function(a) {
return -1 === ["constructor", "parent", "querySelector", "querySelectorAll", "replace", "append", "classes", "height", "width"].indexOf(a)
}).forEach(function(a) {
b[a] = function() {
var d = Array.prototype.slice.call(arguments, 0);
return b.svgElements.forEach(function(b) {
c.Svg.prototype[a].apply(b, d)
}), b
}
})
}
c.Svg = c.Class.extend({
constructor: d,
attr: e,
elem: f,
parent: g,
root: h,
querySelector: i,
querySelectorAll: j,
foreignObject: k,
text: l,
empty: m,
remove: n,
replace: o,
append: p,
classes: q,
addClass: r,
removeClass: s,
removeAllClasses: t,
height: u,
width: v,
animate: w
}), c.Svg.isSupported = function(a) {
return b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#" + a, "1.1")
};
var y = {
easeInSine: [.47, 0, .745, .715],
easeOutSine: [.39, .575, .565, 1],
easeInOutSine: [.445, .05, .55, .95],
easeInQuad: [.55, .085, .68, .53],
easeOutQuad: [.25, .46, .45, .94],
easeInOutQuad: [.455, .03, .515, .955],
easeInCubic: [.55, .055, .675, .19],
easeOutCubic: [.215, .61, .355, 1],
easeInOutCubic: [.645, .045, .355, 1],
easeInQuart: [.895, .03, .685, .22],
easeOutQuart: [.165, .84, .44, 1],
easeInOutQuart: [.77, 0, .175, 1],
easeInQuint: [.755, .05, .855, .06],
easeOutQuint: [.23, 1, .32, 1],
easeInOutQuint: [.86, 0, .07, 1],
easeInExpo: [.95, .05, .795, .035],
easeOutExpo: [.19, 1, .22, 1],
easeInOutExpo: [1, 0, 0, 1],
easeInCirc: [.6, .04, .98, .335],
easeOutCirc: [.075, .82, .165, 1],
easeInOutCirc: [.785, .135, .15, .86],
easeInBack: [.6, -.28, .735, .045],
easeOutBack: [.175, .885, .32, 1.275],
easeInOutBack: [.68, -.55, .265, 1.55]
};
c.Svg.Easing = y, c.Svg.List = c.Class.extend({
constructor: x
})
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a, b, d, e, f, g) {
var h = c.extend({
command: f ? a.toLowerCase() : a.toUpperCase()
}, b, g ? {
data: g
} : {});
d.splice(e, 0, h)
}
function e(a, b) {
a.forEach(function(c, d) {
u[c.command.toLowerCase()].forEach(function(e, f) {
b(c, e, d, f, a)
})
})
}
function f(a, b) {
this.pathElements = [], this.pos = 0, this.close = a, this.options = c.extend({}, v, b)
}
function g(a) {
return void 0 !== a ? (this.pos = Math.max(0, Math.min(this.pathElements.length, a)), this) : this.pos
}
function h(a) {
return this.pathElements.splice(this.pos, a), this
}
function i(a, b, c, e) {
return d("M", {
x: +a,
y: +b
}, this.pathElements, this.pos++, c, e), this
}
function j(a, b, c, e) {
return d("L", {
x: +a,
y: +b
}, this.pathElements, this.pos++, c, e), this
}
function k(a, b, c, e, f, g, h, i) {
return d("C", {
x1: +a,
y1: +b,
x2: +c,
y2: +e,
x: +f,
y: +g
}, this.pathElements, this.pos++, h, i), this
}
function l(a, b, c, e, f, g, h, i, j) {
return d("A", {
rx: +a,
ry: +b,
xAr: +c,
lAf: +e,
sf: +f,
x: +g,
y: +h
}, this.pathElements, this.pos++, i, j), this
}
function m(a) {
var b = a.replace(/([A-Za-z])([0-9])/g, "$1 $2").replace(/([0-9])([A-Za-z])/g, "$1 $2").split(/[\s,]+/).reduce(function(a, b) {
return b.match(/[A-Za-z]/) && a.push([]), a[a.length - 1].push(b), a
}, []);
"Z" === b[b.length - 1][0].toUpperCase() && b.pop();
var d = b.map(function(a) {
var b = a.shift(),
d = u[b.toLowerCase()];
return c.extend({
command: b
}, d.reduce(function(b, c, d) {
return b[c] = +a[d], b
}, {}))
}),
e = [this.pos, 0];
return Array.prototype.push.apply(e, d), Array.prototype.splice.apply(this.pathElements, e), this.pos += d.length, this
}
function n() {
var a = Math.pow(10, this.options.accuracy);
return this.pathElements.reduce(function(b, c) {
var d = u[c.command.toLowerCase()].map(function(b) {
return this.options.accuracy ? Math.round(c[b] * a) / a : c[b]
}.bind(this));
return b + c.command + d.join(",")
}.bind(this), "") + (this.close ? "Z" : "")
}
function o(a, b) {
return e(this.pathElements, function(c, d) {
c[d] *= "x" === d[0] ? a : b
}), this
}
function p(a, b) {
return e(this.pathElements, function(c, d) {
c[d] += "x" === d[0] ? a : b
}), this
}
function q(a) {
return e(this.pathElements, function(b, c, d, e, f) {
var g = a(b, c, d, e, f);
(g || 0 === g) && (b[c] = g)
}), this
}
function r(a) {
var b = new c.Svg.Path(a || this.close);
return b.pos = this.pos, b.pathElements = this.pathElements.slice().map(function(a) {
return c.extend({}, a)
}), b.options = c.extend({}, this.options), b
}
function s(a) {
var b = [new c.Svg.Path];
return this.pathElements.forEach(function(d) {
d.command === a.toUpperCase() && 0 !== b[b.length - 1].pathElements.length && b.push(new c.Svg.Path), b[b.length - 1].pathElements.push(d)
}), b
}
function t(a, b, d) {
for (var e = new c.Svg.Path(b, d), f = 0; f < a.length; f++)
for (var g = a[f], h = 0; h < g.pathElements.length; h++) e.pathElements.push(g.pathElements[h]);
return e
}
var u = {
m: ["x", "y"],
l: ["x", "y"],
c: ["x1", "y1", "x2", "y2", "x", "y"],
a: ["rx", "ry", "xAr", "lAf", "sf", "x", "y"]
},
v = {
accuracy: 3
};
c.Svg.Path = c.Class.extend({
constructor: f,
position: g,
remove: h,
move: i,
line: j,
curve: k,
arc: l,
scale: o,
translate: p,
transform: q,
parse: m,
stringify: n,
clone: r,
splitByCommand: s
}), c.Svg.Path.elementDescriptions = u, c.Svg.Path.join = t
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a, b, c, d) {
this.units = a, this.counterUnits = a === f.x ? f.y : f.x, this.chartRect = b, this.axisLength = b[a.rectEnd] - b[a.rectStart], this.gridOffset = b[a.rectOffset], this.ticks = c, this.options = d
}
function e(a, b, d, e, f) {
var g = e["axis" + this.units.pos.toUpperCase()],
h = this.ticks.map(this.projectValue.bind(this)),
i = this.ticks.map(g.labelInterpolationFnc);
h.forEach(function(j, k) {
var l, m = {
x: 0,
y: 0
};
l = h[k + 1] ? h[k + 1] - j : Math.max(this.axisLength - j, 30), c.isFalseyButZero(i[k]) && "" !== i[k] || ("x" === this.units.pos ? (j = this.chartRect.x1 + j, m.x = e.axisX.labelOffset.x, m.y = "start" === e.axisX.position ? this.chartRect.padding.top + e.axisX.labelOffset.y + (d ? 5 : 20) : this.chartRect.y1 + e.axisX.labelOffset.y + (d ? 5 : 20)) : (j = this.chartRect.y1 - j, m.y = e.axisY.labelOffset.y - (d ? l : 0), m.x = "start" === e.axisY.position ? d ? this.chartRect.padding.left + e.axisY.labelOffset.x : this.chartRect.x1 - 10 : this.chartRect.x2 + e.axisY.labelOffset.x + 10), g.showGrid && c.createGrid(j, k, this, this.gridOffset, this.chartRect[this.counterUnits.len](), a, [e.classNames.grid, e.classNames[this.units.dir]], f), g.showLabel && c.createLabel(j, l, k, i, this, g.offset, m, b, [e.classNames.label, e.classNames[this.units.dir], e.classNames[g.position]], d, f))
}.bind(this))
}
var f = {
x: {
pos: "x",
len: "width",
dir: "horizontal",
rectStart: "x1",
rectEnd: "x2",
rectOffset: "y2"
},
y: {
pos: "y",
len: "height",
dir: "vertical",
rectStart: "y2",
rectEnd: "y1",
rectOffset: "x1"
}
};
c.Axis = c.Class.extend({
constructor: d,
createGridAndLabels: e,
projectValue: function() {
throw new Error("Base axis can't be instantiated!")
}
}), c.Axis.units = f
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a, b, d, e) {
var f = e.highLow || c.getHighLow(b.normalized, e, a.pos);
this.bounds = c.getBounds(d[a.rectEnd] - d[a.rectStart], f, e.scaleMinSpace || 20, e.onlyInteger), this.range = {
min: this.bounds.min,
max: this.bounds.max
}, c.AutoScaleAxis["super"].constructor.call(this, a, d, this.bounds.values, e)
}
function e(a) {
return this.axisLength * (+c.getMultiValue(a, this.units.pos) - this.bounds.min) / this.bounds.range
}
c.AutoScaleAxis = c.Axis.extend({
constructor: d,
projectValue: e
})
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a, b, d, e) {
var f = e.highLow || c.getHighLow(b.normalized, e, a.pos);
this.divisor = e.divisor || 1, this.ticks = e.ticks || c.times(this.divisor).map(function(a, b) {
return f.low + (f.high - f.low) / this.divisor * b
}.bind(this)), this.ticks.sort(function(a, b) {
return a - b
}), this.range = {
min: f.low,
max: f.high
}, c.FixedScaleAxis["super"].constructor.call(this, a, d, this.ticks, e), this.stepLength = this.axisLength / this.divisor
}
function e(a) {
return this.axisLength * (+c.getMultiValue(a, this.units.pos) - this.range.min) / (this.range.max - this.range.min)
}
c.FixedScaleAxis = c.Axis.extend({
constructor: d,
projectValue: e
})
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a, b, d, e) {
c.StepAxis["super"].constructor.call(this, a, d, e.ticks, e), this.stepLength = this.axisLength / (e.ticks.length - (e.stretch ? 1 : 0))
}
function e(a, b) {
return this.stepLength * b
}
c.StepAxis = c.Axis.extend({
constructor: d,
projectValue: e
})
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a) {
this.data = c.normalizeData(this.data);
var b = {
raw: this.data,
normalized: c.getDataArray(this.data, a.reverseData, !0)
};
this.svg = c.createSvg(this.container, a.width, a.height, a.classNames.chart);
var d, e, g = this.svg.elem("g").addClass(a.classNames.gridGroup),
h = this.svg.elem("g"),
i = this.svg.elem("g").addClass(a.classNames.labelGroup),
j = c.createChartRect(this.svg, a, f.padding);
d = void 0 === a.axisX.type ? new c.StepAxis(c.Axis.units.x, b, j, c.extend({}, a.axisX, {
ticks: b.raw.labels,
stretch: a.fullWidth
})) : a.axisX.type.call(c, c.Axis.units.x, b, j, a.axisX), e = void 0 === a.axisY.type ? new c.AutoScaleAxis(c.Axis.units.y, b, j, c.extend({}, a.axisY, {
high: c.isNum(a.high) ? a.high : a.axisY.high,
low: c.isNum(a.low) ? a.low : a.axisY.low
})) : a.axisY.type.call(c, c.Axis.units.y, b, j, a.axisY), d.createGridAndLabels(g, i, this.supportsForeignObject, a, this.eventEmitter), e.createGridAndLabels(g, i, this.supportsForeignObject, a, this.eventEmitter), b.raw.series.forEach(function(f, g) {
var i = h.elem("g");
i.attr({
"ct:series-name": f.name,
"ct:meta": c.serialize(f.meta)
}), i.addClass([a.classNames.series, f.className || a.classNames.series + "-" + c.alphaNumerate(g)].join(" "));
var k = [],
l = [];
b.normalized[g].forEach(function(a, h) {
var i = {
x: j.x1 + d.projectValue(a, h, b.normalized[g]),
y: j.y1 - e.projectValue(a, h, b.normalized[g])
};
k.push(i.x, i.y), l.push({
value: a,
valueIndex: h,
meta: c.getMetaData(f, h)
})
}.bind(this));
var m = {
lineSmooth: c.getSeriesOption(f, a, "lineSmooth"),
showPoint: c.getSeriesOption(f, a, "showPoint"),
showLine: c.getSeriesOption(f, a, "showLine"),
showArea: c.getSeriesOption(f, a, "showArea"),
areaBase: c.getSeriesOption(f, a, "areaBase")
},
n = "function" == typeof m.lineSmooth ? m.lineSmooth : m.lineSmooth ? c.Interpolation.monotoneCubic() : c.Interpolation.none(),
o = n(k, l);
if (m.showPoint && o.pathElements.forEach(function(b) {
var h = i.elem("line", {
x1: b.x,
y1: b.y,
x2: b.x + .01,
y2: b.y
}, a.classNames.point).attr({
"ct:value": [b.data.value.x, b.data.value.y].filter(c.isNum).join(","),
"ct:meta": b.data.meta
});
this.eventEmitter.emit("draw", {
type: "point",
value: b.data.value,
index: b.data.valueIndex,
meta: b.data.meta,
series: f,
seriesIndex: g,
axisX: d,
axisY: e,
group: i,
element: h,
x: b.x,
y: b.y
})
}.bind(this)), m.showLine) {
var p = i.elem("path", {
d: o.stringify()
}, a.classNames.line, !0);
this.eventEmitter.emit("draw", {
type: "line",
values: b.normalized[g],
path: o.clone(),
chartRect: j,
index: g,
series: f,
seriesIndex: g,
axisX: d,
axisY: e,
group: i,
element: p
})
}
if (m.showArea && e.range) {
var q = Math.max(Math.min(m.areaBase, e.range.max), e.range.min),
r = j.y1 - e.projectValue(q);
o.splitByCommand("M").filter(function(a) {
return a.pathElements.length > 1
}).map(function(a) {
var b = a.pathElements[0],
c = a.pathElements[a.pathElements.length - 1];
return a.clone(!0).position(0).remove(1).move(b.x, r).line(b.x, b.y).position(a.pathElements.length + 1).line(c.x, r)
}).forEach(function(c) {
var h = i.elem("path", {
d: c.stringify()
}, a.classNames.area, !0);
this.eventEmitter.emit("draw", {
type: "area",
values: b.normalized[g],
path: c.clone(),
series: f,
seriesIndex: g,
axisX: d,
axisY: e,
chartRect: j,
index: g,
group: i,
element: h
})
}.bind(this))
}
}.bind(this)), this.eventEmitter.emit("created", {
bounds: e.bounds,
chartRect: j,
axisX: d,
axisY: e,
svg: this.svg,
options: a
})
}
function e(a, b, d, e) {
c.Line["super"].constructor.call(this, a, b, f, c.extend({}, f, d), e)
}
var f = {
axisX: {
offset: 30,
position: "end",
labelOffset: {
x: 0,
y: 0
},
showLabel: !0,
showGrid: !0,
labelInterpolationFnc: c.noop,
type: void 0
},
axisY: {
offset: 40,
position: "start",
labelOffset: {
x: 0,
y: 0
},
showLabel: !0,
showGrid: !0,
labelInterpolationFnc: c.noop,
type: void 0,
scaleMinSpace: 20,
onlyInteger: !1
},
width: void 0,
height: void 0,
showLine: !0,
showPoint: !0,
showArea: !1,
areaBase: 0,
lineSmooth: !0,
low: void 0,
high: void 0,
chartPadding: {
top: 15,
right: 15,
bottom: 5,
left: 10
},
fullWidth: !1,
reverseData: !1,
classNames: {
chart: "ct-chart-line",
label: "ct-label",
labelGroup: "ct-labels",
series: "ct-series",
line: "ct-line",
point: "ct-point",
area: "ct-area",
grid: "ct-grid",
gridGroup: "ct-grids",
vertical: "ct-vertical",
horizontal: "ct-horizontal",
start: "ct-start",
end: "ct-end"
}
};
c.Line = c.Base.extend({
constructor: e,
createChart: d
})
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a) {
this.data = c.normalizeData(this.data);
var b, d = {
raw: this.data,
normalized: a.distributeSeries ? c.getDataArray(this.data, a.reverseData, a.horizontalBars ? "x" : "y").map(function(a) {
return [a]
}) : c.getDataArray(this.data, a.reverseData, a.horizontalBars ? "x" : "y")
};
this.svg = c.createSvg(this.container, a.width, a.height, a.classNames.chart + (a.horizontalBars ? " " + a.classNames.horizontalBars : ""));
var e = this.svg.elem("g").addClass(a.classNames.gridGroup),
g = this.svg.elem("g"),
h = this.svg.elem("g").addClass(a.classNames.labelGroup);
if (a.stackBars && 0 !== d.normalized.length) {
var i = c.serialMap(d.normalized, function() {
return Array.prototype.slice.call(arguments).map(function(a) {
return a
}).reduce(function(a, b) {
return {
x: a.x + (b && b.x) || 0,
y: a.y + (b && b.y) || 0
}
}, {
x: 0,
y: 0
})
});
b = c.getHighLow([i], c.extend({}, a, {
referenceValue: 0
}), a.horizontalBars ? "x" : "y")
} else b = c.getHighLow(d.normalized, c.extend({}, a, {
referenceValue: 0
}), a.horizontalBars ? "x" : "y");
b.high = +a.high || (0 === a.high ? 0 : b.high), b.low = +a.low || (0 === a.low ? 0 : b.low);
var j, k, l, m, n, o = c.createChartRect(this.svg, a, f.padding);
k = a.distributeSeries && a.stackBars ? d.raw.labels.slice(0, 1) : d.raw.labels, a.horizontalBars ? (j = m = void 0 === a.axisX.type ? new c.AutoScaleAxis(c.Axis.units.x, d, o, c.extend({}, a.axisX, {
highLow: b,
referenceValue: 0
})) : a.axisX.type.call(c, c.Axis.units.x, d, o, c.extend({}, a.axisX, {
highLow: b,
referenceValue: 0
})), l = n = void 0 === a.axisY.type ? new c.StepAxis(c.Axis.units.y, d, o, {
ticks: k
}) : a.axisY.type.call(c, c.Axis.units.y, d, o, a.axisY)) : (l = m = void 0 === a.axisX.type ? new c.StepAxis(c.Axis.units.x, d, o, {
ticks: k
}) : a.axisX.type.call(c, c.Axis.units.x, d, o, a.axisX), j = n = void 0 === a.axisY.type ? new c.AutoScaleAxis(c.Axis.units.y, d, o, c.extend({}, a.axisY, {
highLow: b,
referenceValue: 0
})) : a.axisY.type.call(c, c.Axis.units.y, d, o, c.extend({}, a.axisY, {
highLow: b,
referenceValue: 0
})));
var p = a.horizontalBars ? o.x1 + j.projectValue(0) : o.y1 - j.projectValue(0),
q = [];
l.createGridAndLabels(e, h, this.supportsForeignObject, a, this.eventEmitter), j.createGridAndLabels(e, h, this.supportsForeignObject, a, this.eventEmitter), d.raw.series.forEach(function(b, e) {
var f, h, i = e - (d.raw.series.length - 1) / 2;
f = a.distributeSeries && !a.stackBars ? l.axisLength / d.normalized.length / 2 : a.distributeSeries && a.stackBars ? l.axisLength / 2 : l.axisLength / d.normalized[e].length / 2, h = g.elem("g"), h.attr({
"ct:series-name": b.name,
"ct:meta": c.serialize(b.meta)
}), h.addClass([a.classNames.series, b.className || a.classNames.series + "-" + c.alphaNumerate(e)].join(" ")), d.normalized[e].forEach(function(g, k) {
var r, s, t, u;
if (u = a.distributeSeries && !a.stackBars ? e : a.distributeSeries && a.stackBars ? 0 : k, r = a.horizontalBars ? {
x: o.x1 + j.projectValue(g && g.x ? g.x : 0, k, d.normalized[e]),
y: o.y1 - l.projectValue(g && g.y ? g.y : 0, u, d.normalized[e])
} : {
x: o.x1 + l.projectValue(g && g.x ? g.x : 0, u, d.normalized[e]),
y: o.y1 - j.projectValue(g && g.y ? g.y : 0, k, d.normalized[e])
}, l instanceof c.StepAxis && (l.options.stretch || (r[l.units.pos] += f * (a.horizontalBars ? -1 : 1)), r[l.units.pos] += a.stackBars || a.distributeSeries ? 0 : i * a.seriesBarDistance * (a.horizontalBars ? -1 : 1)), t = q[k] || p, q[k] = t - (p - r[l.counterUnits.pos]), void 0 !== g) {
var v = {};
v[l.units.pos + "1"] = r[l.units.pos], v[l.units.pos + "2"] = r[l.units.pos], !a.stackBars || "accumulate" !== a.stackMode && a.stackMode ? (v[l.counterUnits.pos + "1"] = p, v[l.counterUnits.pos + "2"] = r[l.counterUnits.pos]) : (v[l.counterUnits.pos + "1"] = t, v[l.counterUnits.pos + "2"] = q[k]), v.x1 = Math.min(Math.max(v.x1, o.x1), o.x2), v.x2 = Math.min(Math.max(v.x2, o.x1), o.x2), v.y1 = Math.min(Math.max(v.y1, o.y2), o.y1), v.y2 = Math.min(Math.max(v.y2, o.y2), o.y1), s = h.elem("line", v, a.classNames.bar).attr({
"ct:value": [g.x, g.y].filter(c.isNum).join(","),
"ct:meta": c.getMetaData(b, k)
}), this.eventEmitter.emit("draw", c.extend({
type: "bar",
value: g,
index: k,
meta: c.getMetaData(b, k),
series: b,
seriesIndex: e,
axisX: m,
axisY: n,
chartRect: o,
group: h,
element: s
}, v))
}
}.bind(this))
}.bind(this)), this.eventEmitter.emit("created", {
bounds: j.bounds,
chartRect: o,
axisX: m,
axisY: n,
svg: this.svg,
options: a
})
}
function e(a, b, d, e) {
c.Bar["super"].constructor.call(this, a, b, f, c.extend({}, f, d), e)
}
var f = {
axisX: {
offset: 30,
position: "end",
labelOffset: {
x: 0,
y: 0
},
showLabel: !0,
showGrid: !0,
labelInterpolationFnc: c.noop,
scaleMinSpace: 30,
onlyInteger: !1
},
axisY: {
offset: 40,
position: "start",
labelOffset: {
x: 0,
y: 0
},
showLabel: !0,
showGrid: !0,
labelInterpolationFnc: c.noop,
scaleMinSpace: 20,
onlyInteger: !1
},
width: void 0,
height: void 0,
high: void 0,
low: void 0,
chartPadding: {
top: 15,
right: 15,
bottom: 5,
left: 10
},
seriesBarDistance: 15,
stackBars: !1,
stackMode: "accumulate",
horizontalBars: !1,
distributeSeries: !1,
reverseData: !1,
classNames: {
chart: "ct-chart-bar",
horizontalBars: "ct-horizontal-bars",
label: "ct-label",
labelGroup: "ct-labels",
series: "ct-series",
bar: "ct-bar",
grid: "ct-grid",
gridGroup: "ct-grids",
vertical: "ct-vertical",
horizontal: "ct-horizontal",
start: "ct-start",
end: "ct-end"
}
};
c.Bar = c.Base.extend({
constructor: e,
createChart: d
})
}(window, document, a),
function(a, b, c) {
"use strict";
function d(a, b, c) {
var d = b.x > a.x;
return d && "explode" === c || !d && "implode" === c ? "start" : d && "implode" === c || !d && "explode" === c ? "end" : "middle"
}
function e(a) {
this.data = c.normalizeData(this.data);
var b, e, f, h, i, j = [],
k = a.startAngle,
l = c.getDataArray(this.data, a.reverseData);
this.svg = c.createSvg(this.container, a.width, a.height, a.donut ? a.classNames.chartDonut : a.classNames.chartPie), e = c.createChartRect(this.svg, a, g.padding), f = Math.min(e.width() / 2, e.height() / 2), i = a.total || l.reduce(function(a, b) {
return a + b
}, 0);
var m = c.quantity(a.donutWidth);
"%" === m.unit && (m.value *= f / 100), f -= a.donut ? m.value / 2 : 0, h = "outside" === a.labelPosition || a.donut ? f : "center" === a.labelPosition ? 0 : f / 2, h += a.labelOffset;
var n = {
x: e.x1 + e.width() / 2,
y: e.y2 + e.height() / 2
},
o = 1 === this.data.series.filter(function(a) {
return a.hasOwnProperty("value") ? 0 !== a.value : 0 !== a
}).length;
a.showLabel && (b = this.svg.elem("g", null, null, !0));
for (var p = 0; p < this.data.series.length; p++)
if (0 !== l[p] || !a.ignoreEmptyValues) {
var q = this.data.series[p];
j[p] = this.svg.elem("g", null, null, !0), j[p].attr({
"ct:series-name": q.name
}), j[p].addClass([a.classNames.series, q.className || a.classNames.series + "-" + c.alphaNumerate(p)].join(" "));
var r = k + l[p] / i * 360,
s = Math.max(0, k - (0 === p || o ? 0 : .2));
r - s >= 359.99 && (r = s + 359.99);
var t = c.polarToCartesian(n.x, n.y, f, s),
u = c.polarToCartesian(n.x, n.y, f, r),
v = new c.Svg.Path(!a.donut).move(u.x, u.y).arc(f, f, 0, r - k > 180, 0, t.x, t.y);
a.donut || v.line(n.x, n.y);
var w = j[p].elem("path", {
d: v.stringify()
}, a.donut ? a.classNames.sliceDonut : a.classNames.slicePie);
if (w.attr({
"ct:value": l[p],
"ct:meta": c.serialize(q.meta)
}), a.donut && w.attr({
style: "stroke-width: " + m.value + "px"
}), this.eventEmitter.emit("draw", {
type: "slice",
value: l[p],
totalDataSum: i,
index: p,
meta: q.meta,
series: q,
group: j[p],
element: w,
path: v.clone(),
center: n,
radius: f,
startAngle: k,
endAngle: r
}), a.showLabel) {
var x = c.polarToCartesian(n.x, n.y, h, k + (r - k) / 2),
y = a.labelInterpolationFnc(this.data.labels && !c.isFalseyButZero(this.data.labels[p]) ? this.data.labels[p] : l[p], p);
if (y || 0 === y) {
var z = b.elem("text", {
dx: x.x,
dy: x.y,
"text-anchor": d(n, x, a.labelDirection)
}, a.classNames.label).text("" + y);
this.eventEmitter.emit("draw", {
type: "label",
index: p,
group: b,
element: z,
text: "" + y,
x: x.x,
y: x.y
})
}
}
k = r
}
this.eventEmitter.emit("created", {
chartRect: e,
svg: this.svg,
options: a
})
}
function f(a, b, d, e) {
c.Pie["super"].constructor.call(this, a, b, g, c.extend({}, g, d), e)
}
var g = {
width: void 0,
height: void 0,
chartPadding: 5,
classNames: {
chartPie: "ct-chart-pie",
chartDonut: "ct-chart-donut",
series: "ct-series",
slicePie: "ct-slice-pie",
sliceDonut: "ct-slice-donut",
label: "ct-label"
},
startAngle: 0,
total: void 0,
donut: !1,
donutWidth: 60,
showLabel: !0,
labelOffset: 0,
labelPosition: "inside",
labelInterpolationFnc: c.noop,
labelDirection: "neutral",
reverseData: !1,
ignoreEmptyValues: !1
};
c.Pie = c.Base.extend({
constructor: f,
createChart: e,
determineAnchorPosition: d
})
}(window, document, a), a
}), ! function(a, b) {
"function" == typeof define && define.amd ? define([], function() {
return a.returnExportsGlobal = b()
}) : "object" == typeof exports ? module.exports = b() : a["Chartist.plugins.ctAxisTitle"] = b()
}(this, function() {
return function(a, b, c) {
"use strict";
var d = {
axisTitle: "",
axisClass: "ct-axis-title",
offset: {
x: 0,
y: 0
},
textAnchor: "middle",
flipText: !1
},
e = {
xAxis: d,
yAxis: d
};
c.plugins = c.plugins || {}, c.plugins.ctAxisTitle = function(a) {
return a = c.extend({}, e, a),
function(b) {
b.on("created", function(b) {
if (!a.axisX.axisTitle && !a.axisY.axisTitle) throw new Error("ctAxisTitle plugin - You must provide at least one axis title");
if (!b.axisX && !b.axisY) throw new Error("ctAxisTitle plugin can only be used on charts that have at least one axis");
var d, e, f;
if (a.axisX.axisTitle && b.axisX && (d = b.axisX.axisLength / 2 + b.options.axisX.offset + b.options.chartPadding.left, e = b.options.chartPadding.top, "end" === b.options.axisX.position && (e += b.axisY.axisLength), f = new c.Svg("text"), f.addClass(a.axisX.axisClass), f.text(a.axisX.axisTitle), f.attr({
x: d + a.axisX.offset.x,
y: e + a.axisX.offset.y,
"text-anchor": a.axisX.textAnchor
}), b.svg.append(f, !0)), a.axisY.axisTitle && b.axisY) {
d = 0, e = b.axisY.axisLength / 2 + b.options.chartPadding.top, "end" === b.options.axisY.position && (d = b.axisX.axisLength);
var g = "rotate(" + (a.axisY.flipTitle ? -90 : 90) + ", " + d + ", " + e + ")";
f = new c.Svg("text"), f.addClass(a.axisY.axisClass), f.text(a.axisY.axisTitle), f.attr({
x: d + a.axisY.offset.x,
y: e + a.axisY.offset.y,
transform: g,
"text-anchor": a.axisY.textAnchor
}), b.svg.append(f, !0)
}
})
}
}
}(window, document, Chartist), Chartist.plugins.ctAxisTitle
}), ! function(a, b) {
"function" == typeof define && define.amd ? define([], function() {
return a.returnExportsGlobal = b()
}) : "object" == typeof exports ? module.exports = b() : a["Chartist.plugins.ctPointLabels"] = b()
}(this, function() {
return function(a, b, c) {
"use strict";
var d = {
labelClass: "ct-label",
labelOffset: {
x: 0,
y: -10
},
textAnchor: "middle",
labelInterpolationFnc: c.noop
};
c.plugins = c.plugins || {}, c.plugins.ctPointLabels = function(a) {
return a = c.extend({}, d, a),
function(b) {
b instanceof c.Line && b.on("draw", function(b) {
"point" === b.type && b.group.elem("text", {
x: b.x + a.labelOffset.x,
y: b.y + a.labelOffset.y,
style: "text-anchor: " + a.textAnchor
}, a.labelClass).text(a.labelInterpolationFnc(void 0 === b.value.x ? b.value.y : b.value.x + ", " + b.value.y))
})
}
}
}(window, document, Chartist), Chartist.plugins.ctPointLabels
}), ! function(a, b) {
"function" == typeof define && define.amd ? define(["chartist"], function(c) {
return a.returnExportsGlobal = b(c)
}) : "object" == typeof exports ? module.exports = b(require("chartist")) : a["Chartist.plugins.tooltips"] = b(Chartist)
}(this, function(a) {
return function(a, b, c) {
"use strict";
function d(a) {
f(a, "tooltip-show") || (a.className = a.className + " tooltip-show")
}
function e(a) {
var b = new RegExp("tooltip-show\\s*", "gi");
a.className = a.className.replace(b, "").trim()
}
function f(a, b) {
return (" " + a.getAttribute("class") + " ").indexOf(" " + b + " ") > -1
}
function g(a, b) {
do a = a.nextSibling; while (a && !f(a, b));
return a
}
function h(a) {
return a.innerText || a.textContent
}
var i = {
currency: void 0,
tooltipOffset: {
x: 0,
y: -20
},
appendToBody: !1,
"class": void 0,
pointClass: "ct-point"
};
c.plugins = c.plugins || {}, c.plugins.tooltip = function(a) {
return a = c.extend({}, i, a),
function(i) {
function j(a, b, c) {
m.addEventListener(a, function(a) {
b && !f(a.target, b) || c(a)
})
}
function k(b) {
o = o || n.offsetHeight, p = p || n.offsetWidth, a.appendToBody ? (n.style.top = b.pageY - o + a.tooltipOffset.y + "px", n.style.left = b.pageX - p / 2 + a.tooltipOffset.x + "px") : (n.style.top = (b.layerY || b.offsetY) - o + a.tooltipOffset.y + "px", n.style.left = (b.layerX || b.offsetX) - p / 2 + a.tooltipOffset.x + "px")
}
var l = a.pointClass;
i instanceof c.Bar ? l = "ct-bar" : i instanceof c.Pie && (l = i.options.donut ? "ct-slice-donut" : "ct-slice-pie");
var m = i.container,
n = m.querySelector(".chartist-tooltip");
n || (n = b.createElement("div"), n.className = a["class"] ? "chartist-tooltip " + a["class"] : "chartist-tooltip", a.appendToBody ? b.body.appendChild(n) : m.appendChild(n));
var o = n.offsetHeight,
p = n.offsetWidth;
e(n), j("mouseover", l, function(e) {
var f = e.target,
j = "",
l = i instanceof c.Pie ? f : f.parentNode,
m = l ? f.parentNode.getAttribute("ct:meta") || f.parentNode.getAttribute("ct:series-name") : "",
q = f.getAttribute("ct:meta") || m || "",
r = !!q,
s = f.getAttribute("ct:value");
if (a.transformTooltipTextFnc && "function" == typeof a.transformTooltipTextFnc && (s = a.transformTooltipTextFnc(s)), a.tooltipFnc && "function" == typeof a.tooltipFnc) j = a.tooltipFnc(q, s);
else {
if (a.metaIsHTML) {
var t = b.createElement("textarea");
t.innerHTML = q, q = t.value
}
if (q = '<span class="chartist-tooltip-meta">' + q + "</span>", r) j += q + "<br>";
else if (i instanceof c.Pie) {
var u = g(f, "ct-label");
u && (j += h(u) + "<br>")
}
s && (a.currency && (s = a.currency + s.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")), s = '<span class="chartist-tooltip-value">' + s + "</span>", j += s)
}
j && (n.innerHTML = j, k(e), d(n), o = n.offsetHeight, p = n.offsetWidth)
}), j("mouseout", l, function() {
e(n)
}), j("mousemove", null, function(a) {
k(a)
})
}
}
}(window, document, a), a.plugins.tooltips
}), "undefined" == typeof jQuery) throw new Error("Jasny Bootstrap's JavaScript requires jQuery"); + function(a) {
"use strict";
function b() {
var a = document.createElement("bootstrap"),
b = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var c in b)
if (void 0 !== a.style[c]) return {
end: b[c]
};
return !1
}
void 0 === a.support.transition && (a.fn.emulateTransitionEnd = function(b) {
var c = !1,
d = this;
a(this).one(a.support.transition.end, function() {
c = !0
});
var e = function() {
c || a(d).trigger(a.support.transition.end)
};
return setTimeout(e, b), this
}, a(function() {
a.support.transition = b()
}))
}(window.jQuery), + function(a) {
"use strict";
var b = function(c, d) {
this.$element = a(c), this.options = a.extend({}, b.DEFAULTS, d), this.state = null, this.placement = null, this.options.recalc && (this.calcClone(), a(window).on("resize", a.proxy(this.recalc, this))), this.options.autohide && a(document).on("click", a.proxy(this.autohide, this)), this.options.toggle && this.toggle(), this.options.disablescrolling && (this.options.disableScrolling = this.options.disablescrolling, delete this.options.disablescrolling)
};
b.DEFAULTS = {
toggle: !0,
placement: "auto",
autohide: !0,
recalc: !0,
disableScrolling: !0
}, b.prototype.offset = function() {
switch (this.placement) {
case "left":
case "right":
return this.$element.outerWidth();
case "top":
case "bottom":
return this.$element.outerHeight()
}
}, b.prototype.calcPlacement = function() {
function b(a, b) {
if ("auto" === e.css(b)) return a;
if ("auto" === e.css(a)) return b;
var c = parseInt(e.css(a), 10),
d = parseInt(e.css(b), 10);
return c > d ? b : a
}
if ("auto" !== this.options.placement) return void(this.placement = this.options.placement);
this.$element.hasClass("in") || this.$element.css("visiblity", "hidden !important").addClass("in");
var c = a(window).width() / this.$element.width(),
d = a(window).height() / this.$element.height(),
e = this.$element;
this.placement = c >= d ? b("left", "right") : b("top", "bottom"), "hidden !important" === this.$element.css("visibility") && this.$element.removeClass("in").css("visiblity", "")
}, b.prototype.opposite = function(a) {
switch (a) {
case "top":
return "bottom";
case "left":
return "right";
case "bottom":
return "top";
case "right":
return "left"
}
}, b.prototype.getCanvasElements = function() {
var b = this.options.canvas ? a(this.options.canvas) : this.$element,
c = b.find("*").filter(function() {
return "fixed" === a(this).css("position")
}).not(this.options.exclude);
return b.add(c)
}, b.prototype.slide = function(b, c, d) {
if (!a.support.transition) {
var e = {};
return e[this.placement] = "+=" + c, b.animate(e, 350, d)
}
var f = this.placement,
g = this.opposite(f);
b.each(function() {
"auto" !== a(this).css(f) && a(this).css(f, (parseInt(a(this).css(f), 10) || 0) + c), "auto" !== a(this).css(g) && a(this).css(g, (parseInt(a(this).css(g), 10) || 0) - c)
}), this.$element.one(a.support.transition.end, d).emulateTransitionEnd(350)
}, b.prototype.disableScrolling = function() {
var b = a("body").width(),
c = "padding-" + this.opposite(this.placement);
if (void 0 === a("body").data("offcanvas-style") && a("body").data("offcanvas-style", a("body").attr("style") || ""), a("body").css("overflow", "hidden"), a("body").width() > b) {
var d = parseInt(a("body").css(c), 10) + a("body").width() - b;
setTimeout(function() {
a("body").css(c, d)
}, 1)
}
}, b.prototype.show = function() {
if (!this.state) {
var b = a.Event("show.bs.offcanvas");
if (this.$element.trigger(b), !b.isDefaultPrevented()) {
this.state = "slide-in", this.calcPlacement();
var c = this.getCanvasElements(),
d = this.placement,
e = this.opposite(d),
f = this.offset(); - 1 !== c.index(this.$element) && (a(this.$element).data("offcanvas-style", a(this.$element).attr("style") || ""), this.$element.css(d, -1 * f), this.$element.css(d)), c.addClass("canvas-sliding").each(function() {
void 0 === a(this).data("offcanvas-style") && a(this).data("offcanvas-style", a(this).attr("style") || ""), "static" === a(this).css("position") && a(this).css("position", "relative"), "auto" !== a(this).css(d) && "0px" !== a(this).css(d) || "auto" !== a(this).css(e) && "0px" !== a(this).css(e) || a(this).css(d, 0)
}), this.options.disableScrolling && this.disableScrolling();
var g = function() {
"slide-in" == this.state && (this.state = "slid", c.removeClass("canvas-sliding").addClass("canvas-slid"), this.$element.trigger("shown.bs.offcanvas"))
};
setTimeout(a.proxy(function() {
this.$element.addClass("in"), this.slide(c, f, a.proxy(g, this))
}, this), 1)
}
}
}, b.prototype.hide = function() {
if ("slid" === this.state) {
var b = a.Event("hide.bs.offcanvas");
if (this.$element.trigger(b), !b.isDefaultPrevented()) {
this.state = "slide-out";
var c = a(".canvas-slid"),
d = (this.placement, -1 * this.offset()),
e = function() {
"slide-out" == this.state && (this.state = null, this.placement = null, this.$element.removeClass("in"), c.removeClass("canvas-sliding"), c.add(this.$element).add("body").each(function() {
a(this).attr("style", a(this).data("offcanvas-style")).removeData("offcanvas-style")
}), this.$element.trigger("hidden.bs.offcanvas"))
};
c.removeClass("canvas-slid").addClass("canvas-sliding"), setTimeout(a.proxy(function() {
this.slide(c, d, a.proxy(e, this))
}, this), 1)
}
}
}, b.prototype.toggle = function() {
"slide-in" !== this.state && "slide-out" !== this.state && this["slid" === this.state ? "hide" : "show"]()
}, b.prototype.calcClone = function() {
this.$calcClone = this.$element.clone().html("").addClass("offcanvas-clone").removeClass("in").appendTo(a("body"))
}, b.prototype.recalc = function() {
if ("none" !== this.$calcClone.css("display") && ("slid" === this.state || "slide-in" === this.state)) {
this.state = null, this.placement = null;
var b = this.getCanvasElements();
this.$element.removeClass("in"), b.removeClass("canvas-slid"), b.add(this.$element).add("body").each(function() {
a(this).attr("style", a(this).data("offcanvas-style")).removeData("offcanvas-style")
})
}
}, b.prototype.autohide = function(b) {
0 === a(b.target).closest(this.$element).length && this.hide()
};
var c = a.fn.offcanvas;
a.fn.offcanvas = function(c) {
return this.each(function() {
var d = a(this),
e = d.data("bs.offcanvas"),
f = a.extend({}, b.DEFAULTS, d.data(), "object" == typeof c && c);
e || d.data("bs.offcanvas", e = new b(this, f)), "string" == typeof c && e[c]()
})
}, a.fn.offcanvas.Constructor = b, a.fn.offcanvas.noConflict = function() {
return a.fn.offcanvas = c, this
}, a(document).on("click.bs.offcanvas.data-api", "[data-toggle=offcanvas]", function(b) {
var c, d = a(this),
e = d.attr("data-target") || b.preventDefault() || (c = d.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, ""),
f = a(e),
g = f.data("bs.offcanvas"),
h = g ? "toggle" : d.data();
b.stopPropagation(), g ? g.toggle() : f.offcanvas(h)
})
}(window.jQuery), + function(a) {
"use strict";
var b = function(c, d) {
this.$element = a(c), this.options = a.extend({}, b.DEFAULTS, d), this.$element.on("click.bs.rowlink", "td:not(.rowlink-skip)", a.proxy(this.click, this))
};
b.DEFAULTS = {
target: "a"
}, b.prototype.click = function(b) {
var c = a(b.currentTarget).closest("tr").find(this.options.target)[0];
if (a(b.target)[0] !== c)
if (b.preventDefault(), c.click) c.click();
else if (document.createEvent) {
var d = document.createEvent("MouseEvents");
d.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), c.dispatchEvent(d)
}
};
var c = a.fn.rowlink;
a.fn.rowlink = function(c) {
return this.each(function() {
var d = a(this),
e = d.data("bs.rowlink");
e || d.data("bs.rowlink", e = new b(this, c))
})
}, a.fn.rowlink.Constructor = b, a.fn.rowlink.noConflict = function() {
return a.fn.rowlink = c, this
}, a(document).on("click.bs.rowlink.data-api", '[data-link="row"]', function(b) {
if (0 === a(b.target).closest(".rowlink-skip").length) {
var c = a(this);
c.data("bs.rowlink") || (c.rowlink(c.data()), a(b.target).trigger("click.bs.rowlink"))
}
})
}(window.jQuery), + function(a) {
"use strict";
var b = void 0 !== window.orientation,
c = navigator.userAgent.toLowerCase().indexOf("android") > -1,
d = "Microsoft Internet Explorer" == window.navigator.appName,
e = function(b, d) {
c || (this.$element = a(b), this.options = a.extend({}, e.DEFAULTS, d), this.mask = String(this.options.mask), this.init(), this.listen(), this.checkVal())
};
e.DEFAULTS = {
mask: "",
placeholder: "_",
definitions: {
9: "[0-9]",
a: "[A-Za-z]",
w: "[A-Za-z0-9]",
"*": "."
}
}, e.prototype.init = function() {
var b = this.options.definitions,
c = this.mask.length;
this.tests = [], this.partialPosition = this.mask.length, this.firstNonMaskPos = null, a.each(this.mask.split(""), a.proxy(function(a, d) {
"?" == d ? (c--, this.partialPosition = a) : b[d] ? (this.tests.push(new RegExp(b[d])), null === this.firstNonMaskPos && (this.firstNonMaskPos = this.tests.length - 1)) : this.tests.push(null)
}, this)), this.buffer = a.map(this.mask.split(""), a.proxy(function(a) {
return "?" != a ? b[a] ? this.options.placeholder : a : void 0
}, this)), this.focusText = this.$element.val(), this.$element.data("rawMaskFn", a.proxy(function() {
return a.map(this.buffer, function(a, b) {
return this.tests[b] && a != this.options.placeholder ? a : null
}).join("")
}, this))
}, e.prototype.listen = function() {
if (!this.$element.attr("readonly")) {
var b = (d ? "paste" : "input") + ".mask";
this.$element.on("unmask.bs.inputmask", a.proxy(this.unmask, this)).on("focus.bs.inputmask", a.proxy(this.focusEvent, this)).on("blur.bs.inputmask", a.proxy(this.blurEvent, this)).on("keydown.bs.inputmask", a.proxy(this.keydownEvent, this)).on("keypress.bs.inputmask", a.proxy(this.keypressEvent, this)).on(b, a.proxy(this.pasteEvent, this))
}
}, e.prototype.caret = function(a, b) {
if (0 !== this.$element.length) {
if ("number" == typeof a) return b = "number" == typeof b ? b : a, this.$element.each(function() {
if (this.setSelectionRange) this.setSelectionRange(a, b);
else if (this.createTextRange) {
var c = this.createTextRange();
c.collapse(!0), c.moveEnd("character", b), c.moveStart("character", a), c.select()
}
});
if (this.$element[0].setSelectionRange) a = this.$element[0].selectionStart, b = this.$element[0].selectionEnd;
else if (document.selection && document.selection.createRange) {
var c = document.selection.createRange();
a = 0 - c.duplicate().moveStart("character", -1e5), b = a + c.text.length
}
return {
begin: a,
end: b
}
}
}, e.prototype.seekNext = function(a) {
for (var b = this.mask.length; ++a <= b && !this.tests[a];);
return a
}, e.prototype.seekPrev = function(a) {
for (; --a >= 0 && !this.tests[a];);
return a
}, e.prototype.shiftL = function(a, b) {
var c = this.mask.length;
if (!(0 > a)) {
for (var d = a, e = this.seekNext(b); c > d; d++)
if (this.tests[d]) {
if (!(c > e && this.tests[d].test(this.buffer[e]))) break;
this.buffer[d] = this.buffer[e], this.buffer[e] = this.options.placeholder, e = this.seekNext(e)
}
this.writeBuffer(), this.caret(Math.max(this.firstNonMaskPos, a))
}
}, e.prototype.shiftR = function(a) {
for (var b = this.mask.length, c = a, d = this.options.placeholder; b > c; c++)
if (this.tests[c]) {
var e = this.seekNext(c),
f = this.buffer[c];
if (this.buffer[c] = d, !(b > e && this.tests[e].test(f))) break;
d = f
}
}, e.prototype.unmask = function() {
this.$element.unbind(".mask").removeData("inputmask")
}, e.prototype.focusEvent = function() {
this.focusText = this.$element.val();
var a = this.mask.length,
b = this.checkVal();
this.writeBuffer();
var c = this,
d = function() {
b == a ? c.caret(0, b) : c.caret(b)
};
d(), setTimeout(d, 50)
}, e.prototype.blurEvent = function() {
this.checkVal(), this.$element.val() !== this.focusText && this.$element.trigger("change")
}, e.prototype.keydownEvent = function(a) {
var c = a.which;
if (8 == c || 46 == c || b && 127 == c) {
var d = this.caret(),
e = d.begin,
f = d.end;
return f - e === 0 && (e = 46 != c ? this.seekPrev(e) : f = this.seekNext(e - 1), f = 46 == c ? this.seekNext(f) : f), this.clearBuffer(e, f), this.shiftL(e, f - 1), !1
}
return 27 == c ? (this.$element.val(this.focusText), this.caret(0, this.checkVal()), !1) : void 0
}, e.prototype.keypressEvent = function(a) {
var b = this.mask.length,
c = a.which,
d = this.caret();
if (a.ctrlKey || a.altKey || a.metaKey || 32 > c) return !0;
if (c) {
d.end - d.begin !== 0 && (this.clearBuffer(d.begin, d.end), this.shiftL(d.begin, d.end - 1));
var e = this.seekNext(d.begin - 1);
if (b > e) {
var f = String.fromCharCode(c);
if (this.tests[e].test(f)) {
this.shiftR(e), this.buffer[e] = f, this.writeBuffer();
var g = this.seekNext(e);
this.caret(g)
}
}
return !1
}
}, e.prototype.pasteEvent = function() {
var a = this;
setTimeout(function() {
a.caret(a.checkVal(!0))
}, 0)
}, e.prototype.clearBuffer = function(a, b) {
for (var c = this.mask.length, d = a; b > d && c > d; d++) this.tests[d] && (this.buffer[d] = this.options.placeholder)
}, e.prototype.writeBuffer = function() {
return this.$element.val(this.buffer.join("")).val()
}, e.prototype.checkVal = function(a) {
for (var b = this.mask.length, c = this.$element.val(), d = -1, e = 0, f = 0; b > e; e++)
if (this.tests[e]) {
for (this.buffer[e] = this.options.placeholder; f++ < c.length;) {
var g = c.charAt(f - 1);
if (this.tests[e].test(g)) {
this.buffer[e] = g, d = e;
break
}
}
if (f > c.length) break
} else this.buffer[e] == c.charAt(f) && e != this.partialPosition && (f++, d = e);
return !a && d + 1 < this.partialPosition ? (this.$element.val(""), this.clearBuffer(0, b)) : (a || d + 1 >= this.partialPosition) && (this.writeBuffer(), a || this.$element.val(this.$element.val().substring(0, d + 1))), this.partialPosition ? e : this.firstNonMaskPos
};
var f = a.fn.inputmask;
a.fn.inputmask = function(b) {
return this.each(function() {
var c = a(this),
d = c.data("bs.inputmask");
d || c.data("bs.inputmask", d = new e(this, b))
})
}, a.fn.inputmask.Constructor = e, a.fn.inputmask.noConflict = function() {
return a.fn.inputmask = f, this
}, a(document).on("focus.bs.inputmask.data-api", "[data-mask]", function() {
var b = a(this);
b.data("bs.inputmask") || b.inputmask(b.data())
})
}(window.jQuery), + function(a) {
"use strict";
var b = "Microsoft Internet Explorer" == window.navigator.appName,
c = function(b, c) {
if (this.$element = a(b), this.$input = this.$element.find(":file"), 0 !== this.$input.length) {
this.name = this.$input.attr("name") || c.name, this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]'), 0 === this.$hidden.length && (this.$hidden = a('<input type="hidden">').insertBefore(this.$input)), this.$preview = this.$element.find(".fileinput-preview");
var d = this.$preview.css("height");
"inline" !== this.$preview.css("display") && "0px" !== d && "none" !== d && this.$preview.css("line-height", d), this.original = {
exists: this.$element.hasClass("fileinput-exists"),
preview: this.$preview.html(),
hiddenVal: this.$hidden.val()
}, this.listen()
}
};
c.prototype.listen = function() {
this.$input.on("change.bs.fileinput", a.proxy(this.change, this)), a(this.$input[0].form).on("reset.bs.fileinput", a.proxy(this.reset, this)), this.$element.find('[data-trigger="fileinput"]').on("click.bs.fileinput", a.proxy(this.trigger, this)), this.$element.find('[data-dismiss="fileinput"]').on("click.bs.fileinput", a.proxy(this.clear, this))
}, c.prototype.change = function(b) {
var c = void 0 === b.target.files ? b.target && b.target.value ? [{
name: b.target.value.replace(/^.+\\/, "")
}] : [] : b.target.files;
if (b.stopPropagation(), 0 === c.length) return void this.clear();
this.$hidden.val(""), this.$hidden.attr("name", ""), this.$input.attr("name", this.name);
var d = c[0];
if (this.$preview.length > 0 && ("undefined" != typeof d.type ? d.type.match(/^image\/(gif|png|jpeg)$/) : d.name.match(/\.(gif|png|jpe?g)$/i)) && "undefined" != typeof FileReader) {
var e = new FileReader,
f = this.$preview,
g = this.$element;
e.onload = function(b) {
var e = a("<img>");
e[0].src = b.target.result, c[0].result = b.target.result, g.find(".fileinput-filename").text(d.name), "none" != f.css("max-height") && e.css("max-height", parseInt(f.css("max-height"), 10) - parseInt(f.css("padding-top"), 10) - parseInt(f.css("padding-bottom"), 10) - parseInt(f.css("border-top"), 10) - parseInt(f.css("border-bottom"), 10)), f.html(e),
g.addClass("fileinput-exists").removeClass("fileinput-new"), g.trigger("change.bs.fileinput", c)
}, e.readAsDataURL(d)
} else this.$element.find(".fileinput-filename").text(d.name), this.$preview.text(d.name), this.$element.addClass("fileinput-exists").removeClass("fileinput-new"), this.$element.trigger("change.bs.fileinput")
}, c.prototype.clear = function(a) {
if (a && a.preventDefault(), this.$hidden.val(""), this.$hidden.attr("name", this.name), this.$input.attr("name", ""), b) {
var c = this.$input.clone(!0);
this.$input.after(c), this.$input.remove(), this.$input = c
} else this.$input.val("");
this.$preview.html(""), this.$element.find(".fileinput-filename").text(""), this.$element.addClass("fileinput-new").removeClass("fileinput-exists"), void 0 !== a && (this.$input.trigger("change"), this.$element.trigger("clear.bs.fileinput"))
}, c.prototype.reset = function() {
this.clear(), this.$hidden.val(this.original.hiddenVal), this.$preview.html(this.original.preview), this.$element.find(".fileinput-filename").text(""), this.original.exists ? this.$element.addClass("fileinput-exists").removeClass("fileinput-new") : this.$element.addClass("fileinput-new").removeClass("fileinput-exists"), this.$element.trigger("reset.bs.fileinput")
}, c.prototype.trigger = function(a) {
this.$input.trigger("click"), a.preventDefault()
};
var d = a.fn.fileinput;
a.fn.fileinput = function(b) {
return this.each(function() {
var d = a(this),
e = d.data("bs.fileinput");
e || d.data("bs.fileinput", e = new c(this, b)), "string" == typeof b && e[b]()
})
}, a.fn.fileinput.Constructor = c, a.fn.fileinput.noConflict = function() {
return a.fn.fileinput = d, this
}, a(document).on("click.fileinput.data-api", '[data-provides="fileinput"]', function(b) {
var c = a(this);
if (!c.data("bs.fileinput")) {
c.fileinput(c.data());
var d = a(b.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
d.length > 0 && (b.preventDefault(), d.trigger("click.bs.fileinput"))
}
})
}(window.jQuery),
function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : a("undefined" != typeof jQuery ? jQuery : window.Zepto)
}(function(a) {
"use strict";
function b(b) {
var c = b.data;
b.isDefaultPrevented() || (b.preventDefault(), a(b.target).ajaxSubmit(c))
}
function c(b) {
var c = b.target,
d = a(c);
if (!d.is("[type=submit],[type=image]")) {
var e = d.closest("[type=submit]");
if (0 === e.length) return;
c = e[0]
}
var f = this;
if (f.clk = c, "image" == c.type)
if (void 0 !== b.offsetX) f.clk_x = b.offsetX, f.clk_y = b.offsetY;
else if ("function" == typeof a.fn.offset) {
var g = d.offset();
f.clk_x = b.pageX - g.left, f.clk_y = b.pageY - g.top
} else f.clk_x = b.pageX - c.offsetLeft, f.clk_y = b.pageY - c.offsetTop;
setTimeout(function() {
f.clk = f.clk_x = f.clk_y = null
}, 100)
}
function d() {
if (a.fn.ajaxSubmit.debug) {
var b = "[jquery.form] " + Array.prototype.join.call(arguments, "");
window.console && window.console.log ? window.console.log(b) : window.opera && window.opera.postError && window.opera.postError(b)
}
}
var e = {};
e.fileapi = void 0 !== a("<input type='file'/>").get(0).files, e.formdata = void 0 !== window.FormData;
var f = !!a.fn.prop;
a.fn.attr2 = function() {
if (!f) return this.attr.apply(this, arguments);
var a = this.prop.apply(this, arguments);
return a && a.jquery || "string" == typeof a ? a : this.attr.apply(this, arguments)
}, a.fn.ajaxSubmit = function(b) {
function c(c) {
var d, e, f = a.param(c, b.traditional).split("&"),
g = f.length,
h = [];
for (d = 0; g > d; d++) f[d] = f[d].replace(/\+/g, " "), e = f[d].split("="), h.push([decodeURIComponent(e[0]), decodeURIComponent(e[1])]);
return h
}
function g(d) {
for (var e = new FormData, f = 0; f < d.length; f++) e.append(d[f].name, d[f].value);
if (b.extraData) {
var g = c(b.extraData);
for (f = 0; f < g.length; f++) g[f] && e.append(g[f][0], g[f][1])
}
b.data = null;
var h = a.extend(!0, {}, a.ajaxSettings, b, {
contentType: !1,
processData: !1,
cache: !1,
type: i || "POST"
});
b.uploadProgress && (h.xhr = function() {
var c = a.ajaxSettings.xhr();
return c.upload && c.upload.addEventListener("progress", function(a) {
var c = 0,
d = a.loaded || a.position,
e = a.total;
a.lengthComputable && (c = Math.ceil(d / e * 100)), b.uploadProgress(a, d, e, c)
}, !1), c
}), h.data = null;
var j = h.beforeSend;
return h.beforeSend = function(a, c) {
c.data = b.formData ? b.formData : e, j && j.call(this, a, c)
}, a.ajax(h)
}
function h(c) {
function e(a) {
var b = null;
try {
a.contentWindow && (b = a.contentWindow.document)
} catch (c) {
d("cannot get iframe.contentWindow document: " + c)
}
if (b) return b;
try {
b = a.contentDocument ? a.contentDocument : a.document
} catch (c) {
d("cannot get iframe.contentDocument: " + c), b = a.document
}
return b
}
function g() {
function b() {
try {
var a = e(r).readyState;
d("state = " + a), a && "uninitialized" == a.toLowerCase() && setTimeout(b, 50)
} catch (c) {
d("Server abort: ", c, " (", c.name, ")"), h(A), w && clearTimeout(w), w = void 0
}
}
var c = l.attr2("target"),
f = l.attr2("action");
x.setAttribute("target", o), (!i || /post/i.test(i)) && x.setAttribute("method", "POST"), f != m.url && x.setAttribute("action", m.url), m.skipEncodingOverride || i && !/post/i.test(i) || l.attr({
encoding: "multipart/form-data",
enctype: "multipart/form-data"
}), m.timeout && (w = setTimeout(function() {
v = !0, h(z)
}, m.timeout));
var g = [];
try {
if (m.extraData)
for (var j in m.extraData) m.extraData.hasOwnProperty(j) && g.push(a.isPlainObject(m.extraData[j]) && m.extraData[j].hasOwnProperty("name") && m.extraData[j].hasOwnProperty("value") ? a('<input type="hidden" name="' + m.extraData[j].name + '">').val(m.extraData[j].value).appendTo(x)[0] : a('<input type="hidden" name="' + j + '">').val(m.extraData[j]).appendTo(x)[0]);
m.iframeTarget || q.appendTo("body"), r.attachEvent ? r.attachEvent("onload", h) : r.addEventListener("load", h, !1), setTimeout(b, 15);
try {
x.submit()
} catch (k) {
var n = document.createElement("form").submit;
n.apply(x)
}
} finally {
x.setAttribute("action", f), c ? x.setAttribute("target", c) : l.removeAttr("target"), a(g).remove()
}
}
function h(b) {
if (!s.aborted && !F) {
if (E = e(r), E || (d("cannot access response document"), b = A), b === z && s) return s.abort("timeout"), void y.reject(s, "timeout");
if (b == A && s) return s.abort("server abort"), void y.reject(s, "error", "server abort");
if (E && E.location.href != m.iframeSrc || v) {
r.detachEvent ? r.detachEvent("onload", h) : r.removeEventListener("load", h, !1);
var c, f = "success";
try {
if (v) throw "timeout";
var g = "xml" == m.dataType || E.XMLDocument || a.isXMLDoc(E);
if (d("isXml=" + g), !g && window.opera && (null === E.body || !E.body.innerHTML) && --G) return d("requeing onLoad callback, DOM not available"), void setTimeout(h, 250);
var i = E.body ? E.body : E.documentElement;
s.responseText = i ? i.innerHTML : null, s.responseXML = E.XMLDocument ? E.XMLDocument : E, g && (m.dataType = "xml"), s.getResponseHeader = function(a) {
var b = {
"content-type": m.dataType
};
return b[a.toLowerCase()]
}, i && (s.status = Number(i.getAttribute("status")) || s.status, s.statusText = i.getAttribute("statusText") || s.statusText);
var j = (m.dataType || "").toLowerCase(),
k = /(json|script|text)/.test(j);
if (k || m.textarea) {
var l = E.getElementsByTagName("textarea")[0];
if (l) s.responseText = l.value, s.status = Number(l.getAttribute("status")) || s.status, s.statusText = l.getAttribute("statusText") || s.statusText;
else if (k) {
var o = E.getElementsByTagName("pre")[0],
p = E.getElementsByTagName("body")[0];
o ? s.responseText = o.textContent ? o.textContent : o.innerText : p && (s.responseText = p.textContent ? p.textContent : p.innerText)
}
} else "xml" == j && !s.responseXML && s.responseText && (s.responseXML = H(s.responseText));
try {
D = J(s, j, m)
} catch (t) {
f = "parsererror", s.error = c = t || f
}
} catch (t) {
d("error caught: ", t), f = "error", s.error = c = t || f
}
s.aborted && (d("upload aborted"), f = null), s.status && (f = s.status >= 200 && s.status < 300 || 304 === s.status ? "success" : "error"), "success" === f ? (m.success && m.success.call(m.context, D, "success", s), y.resolve(s.responseText, "success", s), n && a.event.trigger("ajaxSuccess", [s, m])) : f && (void 0 === c && (c = s.statusText), m.error && m.error.call(m.context, s, f, c), y.reject(s, "error", c), n && a.event.trigger("ajaxError", [s, m, c])), n && a.event.trigger("ajaxComplete", [s, m]), n && !--a.active && a.event.trigger("ajaxStop"), m.complete && m.complete.call(m.context, s, f), F = !0, m.timeout && clearTimeout(w), setTimeout(function() {
m.iframeTarget ? q.attr("src", m.iframeSrc) : q.remove(), s.responseXML = null
}, 100)
}
}
}
var j, k, m, n, o, q, r, s, t, u, v, w, x = l[0],
y = a.Deferred();
if (y.abort = function(a) {
s.abort(a)
}, c)
for (k = 0; k < p.length; k++) j = a(p[k]), f ? j.prop("disabled", !1) : j.removeAttr("disabled");
if (m = a.extend(!0, {}, a.ajaxSettings, b), m.context = m.context || m, o = "jqFormIO" + (new Date).getTime(), m.iframeTarget ? (q = a(m.iframeTarget), u = q.attr2("name"), u ? o = u : q.attr2("name", o)) : (q = a('<iframe name="' + o + '" src="' + m.iframeSrc + '" />'), q.css({
position: "absolute",
top: "-1000px",
left: "-1000px"
})), r = q[0], s = {
aborted: 0,
responseText: null,
responseXML: null,
status: 0,
statusText: "n/a",
getAllResponseHeaders: function() {},
getResponseHeader: function() {},
setRequestHeader: function() {},
abort: function(b) {
var c = "timeout" === b ? "timeout" : "aborted";
d("aborting upload... " + c), this.aborted = 1;
try {
r.contentWindow.document.execCommand && r.contentWindow.document.execCommand("Stop")
} catch (e) {}
q.attr("src", m.iframeSrc), s.error = c, m.error && m.error.call(m.context, s, c, b), n && a.event.trigger("ajaxError", [s, m, c]), m.complete && m.complete.call(m.context, s, c)
}
}, n = m.global, n && 0 === a.active++ && a.event.trigger("ajaxStart"), n && a.event.trigger("ajaxSend", [s, m]), m.beforeSend && m.beforeSend.call(m.context, s, m) === !1) return m.global && a.active--, y.reject(), y;
if (s.aborted) return y.reject(), y;
t = x.clk, t && (u = t.name, u && !t.disabled && (m.extraData = m.extraData || {}, m.extraData[u] = t.value, "image" == t.type && (m.extraData[u + ".x"] = x.clk_x, m.extraData[u + ".y"] = x.clk_y)));
var z = 1,
A = 2,
B = a("meta[name=csrf-token]").attr("content"),
C = a("meta[name=csrf-param]").attr("content");
C && B && (m.extraData = m.extraData || {}, m.extraData[C] = B), m.forceSync ? g() : setTimeout(g, 10);
var D, E, F, G = 50,
H = a.parseXML || function(a, b) {
return window.ActiveXObject ? (b = new ActiveXObject("Microsoft.XMLDOM"), b.async = "false", b.loadXML(a)) : b = (new DOMParser).parseFromString(a, "text/xml"), b && b.documentElement && "parsererror" != b.documentElement.nodeName ? b : null
},
I = a.parseJSON || function(a) {
return window.eval("(" + a + ")")
},
J = function(b, c, d) {
var e = b.getResponseHeader("content-type") || "",
f = "xml" === c || !c && e.indexOf("xml") >= 0,
g = f ? b.responseXML : b.responseText;
return f && "parsererror" === g.documentElement.nodeName && a.error && a.error("parsererror"), d && d.dataFilter && (g = d.dataFilter(g, c)), "string" == typeof g && ("json" === c || !c && e.indexOf("json") >= 0 ? g = I(g) : ("script" === c || !c && e.indexOf("javascript") >= 0) && a.globalEval(g)), g
};
return y
}
if (!this.length) return d("ajaxSubmit: skipping submit process - no element selected"), this;
var i, j, k, l = this;
"function" == typeof b ? b = {
success: b
} : void 0 === b && (b = {}), i = b.type || this.attr2("method"), j = b.url || this.attr2("action"), k = "string" == typeof j ? a.trim(j) : "", k = k || window.location.href || "", k && (k = (k.match(/^([^#]+)/) || [])[1]), b = a.extend(!0, {
url: k,
success: a.ajaxSettings.success,
type: i || a.ajaxSettings.type,
iframeSrc: /^https/i.test(window.location.href || "") ? "javascript:false" : "about:blank"
}, b);
var m = {};
if (this.trigger("form-pre-serialize", [this, b, m]), m.veto) return d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"), this;
if (b.beforeSerialize && b.beforeSerialize(this, b) === !1) return d("ajaxSubmit: submit aborted via beforeSerialize callback"), this;
var n = b.traditional;
void 0 === n && (n = a.ajaxSettings.traditional);
var o, p = [],
q = this.formToArray(b.semantic, p);
if (b.data && (b.extraData = b.data, o = a.param(b.data, n)), b.beforeSubmit && b.beforeSubmit(q, this, b) === !1) return d("ajaxSubmit: submit aborted via beforeSubmit callback"), this;
if (this.trigger("form-submit-validate", [q, this, b, m]), m.veto) return d("ajaxSubmit: submit vetoed via form-submit-validate trigger"), this;
var r = a.param(q, n);
o && (r = r ? r + "&" + o : o), "GET" == b.type.toUpperCase() ? (b.url += (b.url.indexOf("?") >= 0 ? "&" : "?") + r, b.data = null) : b.data = r;
var s = [];
if (b.resetForm && s.push(function() {
l.resetForm()
}), b.clearForm && s.push(function() {
l.clearForm(b.includeHidden)
}), !b.dataType && b.target) {
var t = b.success || function() {};
s.push(function(c) {
var d = b.replaceTarget ? "replaceWith" : "html";
a(b.target)[d](c).each(t, arguments)
})
} else b.success && s.push(b.success);
if (b.success = function(a, c, d) {
for (var e = b.context || this, f = 0, g = s.length; g > f; f++) s[f].apply(e, [a, c, d || l, l])
}, b.error) {
var u = b.error;
b.error = function(a, c, d) {
var e = b.context || this;
u.apply(e, [a, c, d, l])
}
}
if (b.complete) {
var v = b.complete;
b.complete = function(a, c) {
var d = b.context || this;
v.apply(d, [a, c, l])
}
}
var w = a("input[type=file]:enabled", this).filter(function() {
return "" !== a(this).val()
}),
x = w.length > 0,
y = "multipart/form-data",
z = l.attr("enctype") == y || l.attr("encoding") == y,
A = e.fileapi && e.formdata;
d("fileAPI :" + A);
var B, C = (x || z) && !A;
b.iframe !== !1 && (b.iframe || C) ? b.closeKeepAlive ? a.get(b.closeKeepAlive, function() {
B = h(q)
}) : B = h(q) : B = (x || z) && A ? g(q) : a.ajax(b), l.removeData("jqxhr").data("jqxhr", B);
for (var D = 0; D < p.length; D++) p[D] = null;
return this.trigger("form-submit-notify", [this, b]), this
}, a.fn.ajaxForm = function(e) {
if (e = e || {}, e.delegation = e.delegation && a.isFunction(a.fn.on), !e.delegation && 0 === this.length) {
var f = {
s: this.selector,
c: this.context
};
return !a.isReady && f.s ? (d("DOM not ready, queuing ajaxForm"), a(function() {
a(f.s, f.c).ajaxForm(e)
}), this) : (d("terminating; zero elements found by selector" + (a.isReady ? "" : " (DOM not ready)")), this)
}
return e.delegation ? (a(document).off("submit.form-plugin", this.selector, b).off("click.form-plugin", this.selector, c).on("submit.form-plugin", this.selector, e, b).on("click.form-plugin", this.selector, e, c), this) : this.ajaxFormUnbind().bind("submit.form-plugin", e, b).bind("click.form-plugin", e, c)
}, a.fn.ajaxFormUnbind = function() {
return this.unbind("submit.form-plugin click.form-plugin")
}, a.fn.formToArray = function(b, c) {
var d = [];
if (0 === this.length) return d;
var f = this[0],
g = b ? f.getElementsByTagName("*") : f.elements;
if (!g) return d;
var h, i, j, k, l, m, n;
for (h = 0, m = g.length; m > h; h++)
if (l = g[h], j = l.name, j && !l.disabled)
if (b && f.clk && "image" == l.type) f.clk == l && (d.push({
name: j,
value: a(l).val(),
type: l.type
}), d.push({
name: j + ".x",
value: f.clk_x
}, {
name: j + ".y",
value: f.clk_y
}));
else if (k = a.fieldValue(l, !0), k && k.constructor == Array)
for (c && c.push(l), i = 0, n = k.length; n > i; i++) d.push({
name: j,
value: k[i]
});
else if (e.fileapi && "file" == l.type) {
c && c.push(l);
var o = l.files;
if (o.length)
for (i = 0; i < o.length; i++) d.push({
name: j,
value: o[i],
type: l.type
});
else d.push({
name: j,
value: "",
type: l.type
})
} else null !== k && "undefined" != typeof k && (c && c.push(l), d.push({
name: j,
value: k,
type: l.type,
required: l.required
}));
if (!b && f.clk) {
var p = a(f.clk),
q = p[0];
j = q.name, j && !q.disabled && "image" == q.type && (d.push({
name: j,
value: p.val()
}), d.push({
name: j + ".x",
value: f.clk_x
}, {
name: j + ".y",
value: f.clk_y
}))
}
return d
}, a.fn.formSerialize = function(b) {
return a.param(this.formToArray(b))
}, a.fn.fieldSerialize = function(b) {
var c = [];
return this.each(function() {
var d = this.name;
if (d) {
var e = a.fieldValue(this, b);
if (e && e.constructor == Array)
for (var f = 0, g = e.length; g > f; f++) c.push({
name: d,
value: e[f]
});
else null !== e && "undefined" != typeof e && c.push({
name: this.name,
value: e
})
}
}), a.param(c)
}, a.fn.fieldValue = function(b) {
for (var c = [], d = 0, e = this.length; e > d; d++) {
var f = this[d],
g = a.fieldValue(f, b);
null === g || "undefined" == typeof g || g.constructor == Array && !g.length || (g.constructor == Array ? a.merge(c, g) : c.push(g))
}
return c
}, a.fieldValue = function(b, c) {
var d = b.name,
e = b.type,
f = b.tagName.toLowerCase();
if (void 0 === c && (c = !0), c && (!d || b.disabled || "reset" == e || "button" == e || ("checkbox" == e || "radio" == e) && !b.checked || ("submit" == e || "image" == e) && b.form && b.form.clk != b || "select" == f && -1 == b.selectedIndex)) return null;
if ("select" == f) {
var g = b.selectedIndex;
if (0 > g) return null;
for (var h = [], i = b.options, j = "select-one" == e, k = j ? g + 1 : i.length, l = j ? g : 0; k > l; l++) {
var m = i[l];
if (m.selected) {
var n = m.value;
if (n || (n = m.attributes && m.attributes.value && !m.attributes.value.specified ? m.text : m.value), j) return n;
h.push(n)
}
}
return h
}
return a(b).val()
}, a.fn.clearForm = function(b) {
return this.each(function() {
a("input,select,textarea", this).clearFields(b)
})
}, a.fn.clearFields = a.fn.clearInputs = function(b) {
var c = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;
return this.each(function() {
var d = this.type,
e = this.tagName.toLowerCase();
c.test(d) || "textarea" == e ? this.value = "" : "checkbox" == d || "radio" == d ? this.checked = !1 : "select" == e ? this.selectedIndex = -1 : "file" == d ? /MSIE/.test(navigator.userAgent) ? a(this).replaceWith(a(this).clone(!0)) : a(this).val("") : b && (b === !0 && /hidden/.test(d) || "string" == typeof b && a(this).is(b)) && (this.value = "")
})
}, a.fn.resetForm = function() {
return this.each(function() {
("function" == typeof this.reset || "object" == typeof this.reset && !this.reset.nodeType) && this.reset()
})
}, a.fn.enable = function(a) {
return void 0 === a && (a = !0), this.each(function() {
this.disabled = !a
})
}, a.fn.selected = function(b) {
return void 0 === b && (b = !0), this.each(function() {
var c = this.type;
if ("checkbox" == c || "radio" == c) this.checked = b;
else if ("option" == this.tagName.toLowerCase()) {
var d = a(this).parent("select");
b && d[0] && "select-one" == d[0].type && d.find("option").selected(!1), this.selected = b
}
})
}, a.fn.ajaxSubmit.debug = !1
}),
function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : a(jQuery)
}(function(a) {
function b(b, d) {
var e, f, g, h = b.nodeName.toLowerCase();
return "area" === h ? (e = b.parentNode, f = e.name, b.href && f && "map" === e.nodeName.toLowerCase() ? (g = a("img[usemap='#" + f + "']")[0], !!g && c(g)) : !1) : (/^(input|select|textarea|button|object)$/.test(h) ? !b.disabled : "a" === h ? b.href || d : d) && c(b)
}
function c(b) {
return a.expr.filters.visible(b) && !a(b).parents().addBack().filter(function() {
return "hidden" === a.css(this, "visibility")
}).length
}
function d(a) {
for (var b, c; a.length && a[0] !== document;) {
if (b = a.css("position"), ("absolute" === b || "relative" === b || "fixed" === b) && (c = parseInt(a.css("zIndex"), 10), !isNaN(c) && 0 !== c)) return c;
a = a.parent()
}
return 0
}
function e() {
this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = {
closeText: "Done",
prevText: "Prev",
nextText: "Next",
currentText: "Today",
monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
weekHeader: "Wk",
dateFormat: "mm/dd/yy",
firstDay: 0,
isRTL: !1,
showMonthAfterYear: !1,
yearSuffix: ""
}, this._defaults = {
showOn: "focus",
showAnim: "fadeIn",
showOptions: {},
defaultDate: null,
appendText: "",
buttonText: "...",
buttonImage: "",
buttonImageOnly: !1,
hideIfNoPrevNext: !1,
navigationAsDateFormat: !1,
gotoCurrent: !1,
changeMonth: !1,
changeYear: !1,
yearRange: "c-10:c+10",
showOtherMonths: !1,
selectOtherMonths: !1,
showWeek: !1,
calculateWeek: this.iso8601Week,
shortYearCutoff: "+10",
minDate: null,
maxDate: null,
duration: "fast",
beforeShowDay: null,
beforeShow: null,
onSelect: null,
onChangeMonthYear: null,
onClose: null,
numberOfMonths: 1,
showCurrentAtPos: 0,
stepMonths: 1,
stepBigMonths: 12,
altField: "",
altFormat: "",
constrainInput: !0,
showButtonPanel: !1,
autoSize: !1,
disabled: !1
}, a.extend(this._defaults, this.regional[""]), this.regional.en = a.extend(!0, {}, this.regional[""]), this.regional["en-US"] = a.extend(!0, {}, this.regional.en), this.dpDiv = f(a("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))
}
function f(b) {
var c = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
return b.delegate(c, "mouseout", function() {
a(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && a(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && a(this).removeClass("ui-datepicker-next-hover")
}).delegate(c, "mouseover", g)
}
function g() {
a.datepicker._isDisabledDatepicker(r.inline ? r.dpDiv.parent()[0] : r.input[0]) || (a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), a(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && a(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && a(this).addClass("ui-datepicker-next-hover"))
}
function h(b, c) {
a.extend(b, c);
for (var d in c) null == c[d] && (b[d] = c[d]);
return b
}
function i(a) {
return function() {
var b = this.element.val();
a.apply(this, arguments), this._refresh(), b !== this.element.val() && this._trigger("change")
}
}
a.ui = a.ui || {}, a.extend(a.ui, {
version: "1.11.4",
keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
}
}), a.fn.extend({
scrollParent: function(b) {
var c = this.css("position"),
d = "absolute" === c,
e = b ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
f = this.parents().filter(function() {
var b = a(this);
return d && "static" === b.css("position") ? !1 : e.test(b.css("overflow") + b.css("overflow-y") + b.css("overflow-x"))
}).eq(0);
return "fixed" !== c && f.length ? f : a(this[0].ownerDocument || document)
},
uniqueId: function() {
var a = 0;
return function() {
return this.each(function() {
this.id || (this.id = "ui-id-" + ++a)
})
}
}(),
removeUniqueId: function() {
return this.each(function() {
/^ui-id-\d+$/.test(this.id) && a(this).removeAttr("id")
})
}
}), a.extend(a.expr[":"], {
data: a.expr.createPseudo ? a.expr.createPseudo(function(b) {
return function(c) {
return !!a.data(c, b)
}
}) : function(b, c, d) {
return !!a.data(b, d[3])
},
focusable: function(c) {
return b(c, !isNaN(a.attr(c, "tabindex")))
},
tabbable: function(c) {
var d = a.attr(c, "tabindex"),
e = isNaN(d);
return (e || d >= 0) && b(c, !e)
}
}), a("<a>").outerWidth(1).jquery || a.each(["Width", "Height"], function(b, c) {
function d(b, c, d, f) {
return a.each(e, function() {
c -= parseFloat(a.css(b, "padding" + this)) || 0, d && (c -= parseFloat(a.css(b, "border" + this + "Width")) || 0), f && (c -= parseFloat(a.css(b, "margin" + this)) || 0)
}), c
}
var e = "Width" === c ? ["Left", "Right"] : ["Top", "Bottom"],
f = c.toLowerCase(),
g = {
innerWidth: a.fn.innerWidth,
innerHeight: a.fn.innerHeight,
outerWidth: a.fn.outerWidth,
outerHeight: a.fn.outerHeight
};
a.fn["inner" + c] = function(b) {
return void 0 === b ? g["inner" + c].call(this) : this.each(function() {
a(this).css(f, d(this, b) + "px")
})
}, a.fn["outer" + c] = function(b, e) {
return "number" != typeof b ? g["outer" + c].call(this, b) : this.each(function() {
a(this).css(f, d(this, b, !0, e) + "px")
})
}
}), a.fn.addBack || (a.fn.addBack = function(a) {
return this.add(null == a ? this.prevObject : this.prevObject.filter(a))
}), a("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (a.fn.removeData = function(b) {
return function(c) {
return arguments.length ? b.call(this, a.camelCase(c)) : b.call(this)
}
}(a.fn.removeData)), a.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), a.fn.extend({
focus: function(b) {
return function(c, d) {
return "number" == typeof c ? this.each(function() {
var b = this;
setTimeout(function() {
a(b).focus(), d && d.call(b)
}, c)
}) : b.apply(this, arguments)
}
}(a.fn.focus),
disableSelection: function() {
var a = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown";
return function() {
return this.bind(a + ".ui-disableSelection", function(a) {
a.preventDefault()
})
}
}(),
enableSelection: function() {
return this.unbind(".ui-disableSelection")
},
zIndex: function(b) {
if (void 0 !== b) return this.css("zIndex", b);
if (this.length)
for (var c, d, e = a(this[0]); e.length && e[0] !== document;) {
if (c = e.css("position"), ("absolute" === c || "relative" === c || "fixed" === c) && (d = parseInt(e.css("zIndex"), 10), !isNaN(d) && 0 !== d)) return d;
e = e.parent()
}
return 0
}
}), a.ui.plugin = {
add: function(b, c, d) {
var e, f = a.ui[b].prototype;
for (e in d) f.plugins[e] = f.plugins[e] || [], f.plugins[e].push([c, d[e]])
},
call: function(a, b, c, d) {
var e, f = a.plugins[b];
if (f && (d || a.element[0].parentNode && 11 !== a.element[0].parentNode.nodeType))
for (e = 0; e < f.length; e++) a.options[f[e][0]] && f[e][1].apply(a.element, c)
}
};
var j = 0,
k = Array.prototype.slice;
a.cleanData = function(b) {
return function(c) {
var d, e, f;
for (f = 0; null != (e = c[f]); f++) try {
d = a._data(e, "events"), d && d.remove && a(e).triggerHandler("remove")
} catch (g) {}
b(c)
}
}(a.cleanData), a.widget = function(b, c, d) {
var e, f, g, h, i = {},
j = b.split(".")[0];
return b = b.split(".")[1], e = j + "-" + b, d || (d = c, c = a.Widget), a.expr[":"][e.toLowerCase()] = function(b) {
return !!a.data(b, e)
}, a[j] = a[j] || {}, f = a[j][b], g = a[j][b] = function(a, b) {
return this._createWidget ? void(arguments.length && this._createWidget(a, b)) : new g(a, b)
}, a.extend(g, f, {
version: d.version,
_proto: a.extend({}, d),
_childConstructors: []
}), h = new c, h.options = a.widget.extend({}, h.options), a.each(d, function(b, d) {
return a.isFunction(d) ? void(i[b] = function() {
var a = function() {
return c.prototype[b].apply(this, arguments)
},
e = function(a) {
return c.prototype[b].apply(this, a)
};
return function() {
var b, c = this._super,
f = this._superApply;
return this._super = a, this._superApply = e, b = d.apply(this, arguments), this._super = c, this._superApply = f, b
}
}()) : void(i[b] = d)
}), g.prototype = a.widget.extend(h, {
widgetEventPrefix: f ? h.widgetEventPrefix || b : b
}, i, {
constructor: g,
namespace: j,
widgetName: b,
widgetFullName: e
}), f ? (a.each(f._childConstructors, function(b, c) {
var d = c.prototype;
a.widget(d.namespace + "." + d.widgetName, g, c._proto)
}), delete f._childConstructors) : c._childConstructors.push(g), a.widget.bridge(b, g), g
}, a.widget.extend = function(b) {
for (var c, d, e = k.call(arguments, 1), f = 0, g = e.length; g > f; f++)
for (c in e[f]) d = e[f][c], e[f].hasOwnProperty(c) && void 0 !== d && (b[c] = a.isPlainObject(d) ? a.isPlainObject(b[c]) ? a.widget.extend({}, b[c], d) : a.widget.extend({}, d) : d);
return b
}, a.widget.bridge = function(b, c) {
var d = c.prototype.widgetFullName || b;
a.fn[b] = function(e) {
var f = "string" == typeof e,
g = k.call(arguments, 1),
h = this;
return f ? this.each(function() {
var c, f = a.data(this, d);
return "instance" === e ? (h = f, !1) : f ? a.isFunction(f[e]) && "_" !== e.charAt(0) ? (c = f[e].apply(f, g), c !== f && void 0 !== c ? (h = c && c.jquery ? h.pushStack(c.get()) : c, !1) : void 0) : a.error("no such method '" + e + "' for " + b + " widget instance") : a.error("cannot call methods on " + b + " prior to initialization; attempted to call method '" + e + "'")
}) : (g.length && (e = a.widget.extend.apply(null, [e].concat(g))), this.each(function() {
var b = a.data(this, d);
b ? (b.option(e || {}), b._init && b._init()) : a.data(this, d, new c(e, this))
})), h
}
}, a.Widget = function() {}, a.Widget._childConstructors = [], a.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
disabled: !1,
create: null
},
_createWidget: function(b, c) {
c = a(c || this.defaultElement || this)[0], this.element = a(c), this.uuid = j++, this.eventNamespace = "." + this.widgetName + this.uuid, this.bindings = a(), this.hoverable = a(), this.focusable = a(), c !== this && (a.data(c, this.widgetFullName, this), this._on(!0, this.element, {
remove: function(a) {
a.target === c && this.destroy()
}
}), this.document = a(c.style ? c.ownerDocument : c.document || c), this.window = a(this.document[0].defaultView || this.document[0].parentWindow)), this.options = a.widget.extend({}, this.options, this._getCreateOptions(), b), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
},
_getCreateOptions: a.noop,
_getCreateEventData: a.noop,
_create: a.noop,
_init: a.noop,
destroy: function() {
this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
},
_destroy: a.noop,
widget: function() {
return this.element
},
option: function(b, c) {
var d, e, f, g = b;
if (0 === arguments.length) return a.widget.extend({}, this.options);
if ("string" == typeof b)
if (g = {}, d = b.split("."), b = d.shift(), d.length) {
for (e = g[b] = a.widget.extend({}, this.options[b]), f = 0; f < d.length - 1; f++) e[d[f]] = e[d[f]] || {}, e = e[d[f]];
if (b = d.pop(), 1 === arguments.length) return void 0 === e[b] ? null : e[b];
e[b] = c
} else {
if (1 === arguments.length) return void 0 === this.options[b] ? null : this.options[b];
g[b] = c
}
return this._setOptions(g), this
},
_setOptions: function(a) {
var b;
for (b in a) this._setOption(b, a[b]);
return this
},
_setOption: function(a, b) {
return this.options[a] = b, "disabled" === a && (this.widget().toggleClass(this.widgetFullName + "-disabled", !!b), b && (this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus"))), this
},
enable: function() {
return this._setOptions({
disabled: !1
})
},
disable: function() {
return this._setOptions({
disabled: !0
})
},
_on: function(b, c, d) {
var e, f = this;
"boolean" != typeof b && (d = c, c = b, b = !1), d ? (c = e = a(c), this.bindings = this.bindings.add(c)) : (d = c, c = this.element, e = this.widget()), a.each(d, function(d, g) {
function h() {
return b || f.options.disabled !== !0 && !a(this).hasClass("ui-state-disabled") ? ("string" == typeof g ? f[g] : g).apply(f, arguments) : void 0
}
"string" != typeof g && (h.guid = g.guid = g.guid || h.guid || a.guid++);
var i = d.match(/^([\w:-]*)\s*(.*)$/),
j = i[1] + f.eventNamespace,
k = i[2];
k ? e.delegate(k, j, h) : c.bind(j, h)
})
},
_off: function(b, c) {
c = (c || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, b.unbind(c).undelegate(c), this.bindings = a(this.bindings.not(b).get()), this.focusable = a(this.focusable.not(b).get()), this.hoverable = a(this.hoverable.not(b).get())
},
_delay: function(a, b) {
function c() {
return ("string" == typeof a ? d[a] : a).apply(d, arguments)
}
var d = this;
return setTimeout(c, b || 0)
},
_hoverable: function(b) {
this.hoverable = this.hoverable.add(b), this._on(b, {
mouseenter: function(b) {
a(b.currentTarget).addClass("ui-state-hover")
},
mouseleave: function(b) {
a(b.currentTarget).removeClass("ui-state-hover")
}
})
},
_focusable: function(b) {
this.focusable = this.focusable.add(b), this._on(b, {
focusin: function(b) {
a(b.currentTarget).addClass("ui-state-focus")
},
focusout: function(b) {
a(b.currentTarget).removeClass("ui-state-focus")
}
})
},
_trigger: function(b, c, d) {
var e, f, g = this.options[b];
if (d = d || {}, c = a.Event(c), c.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(), c.target = this.element[0], f = c.originalEvent)
for (e in f) e in c || (c[e] = f[e]);
return this.element.trigger(c, d), !(a.isFunction(g) && g.apply(this.element[0], [c].concat(d)) === !1 || c.isDefaultPrevented())
}
}, a.each({
show: "fadeIn",
hide: "fadeOut"
}, function(b, c) {
a.Widget.prototype["_" + b] = function(d, e, f) {
"string" == typeof e && (e = {
effect: e
});
var g, h = e ? e === !0 || "number" == typeof e ? c : e.effect || c : b;
e = e || {}, "number" == typeof e && (e = {
duration: e
}), g = !a.isEmptyObject(e), e.complete = f, e.delay && d.delay(e.delay), g && a.effects && a.effects.effect[h] ? d[b](e) : h !== b && d[h] ? d[h](e.duration, e.easing, f) : d.queue(function(c) {
a(this)[b](), f && f.call(d[0]), c()
})
}
});
var l = (a.widget, !1);
a(document).mouseup(function() {
l = !1
});
a.widget("ui.mouse", {
version: "1.11.4",
options: {
cancel: "input,textarea,button,select,option",
distance: 1,
delay: 0
},
_mouseInit: function() {
var b = this;
this.element.bind("mousedown." + this.widgetName, function(a) {
return b._mouseDown(a)
}).bind("click." + this.widgetName, function(c) {
return !0 === a.data(c.target, b.widgetName + ".preventClickEvent") ? (a.removeData(c.target, b.widgetName + ".preventClickEvent"), c.stopImmediatePropagation(), !1) : void 0
}), this.started = !1
},
_mouseDestroy: function() {
this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
},
_mouseDown: function(b) {
if (!l) {
this._mouseMoved = !1, this._mouseStarted && this._mouseUp(b), this._mouseDownEvent = b;
var c = this,
d = 1 === b.which,
e = "string" == typeof this.options.cancel && b.target.nodeName ? a(b.target).closest(this.options.cancel).length : !1;
return d && !e && this._mouseCapture(b) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() {
c.mouseDelayMet = !0
}, this.options.delay)), this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = this._mouseStart(b) !== !1, !this._mouseStarted) ? (b.preventDefault(), !0) : (!0 === a.data(b.target, this.widgetName + ".preventClickEvent") && a.removeData(b.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(a) {
return c._mouseMove(a)
}, this._mouseUpDelegate = function(a) {
return c._mouseUp(a)
}, this.document.bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), b.preventDefault(), l = !0, !0)) : !0
}
},
_mouseMove: function(b) {
if (this._mouseMoved) {
if (a.ui.ie && (!document.documentMode || document.documentMode < 9) && !b.button) return this._mouseUp(b);
if (!b.which) return this._mouseUp(b);
}
return (b.which || b.button) && (this._mouseMoved = !0), this._mouseStarted ? (this._mouseDrag(b), b.preventDefault()) : (this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, b) !== !1, this._mouseStarted ? this._mouseDrag(b) : this._mouseUp(b)), !this._mouseStarted)
},
_mouseUp: function(b) {
return this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, b.target === this._mouseDownEvent.target && a.data(b.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(b)), l = !1, !1
},
_mouseDistanceMet: function(a) {
return Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance
},
_mouseDelayMet: function() {
return this.mouseDelayMet
},
_mouseStart: function() {},
_mouseDrag: function() {},
_mouseStop: function() {},
_mouseCapture: function() {
return !0
}
});
! function() {
function b(a, b, c) {
return [parseFloat(a[0]) * (n.test(a[0]) ? b / 100 : 1), parseFloat(a[1]) * (n.test(a[1]) ? c / 100 : 1)]
}
function c(b, c) {
return parseInt(a.css(b, c), 10) || 0
}
function d(b) {
var c = b[0];
return 9 === c.nodeType ? {
width: b.width(),
height: b.height(),
offset: {
top: 0,
left: 0
}
} : a.isWindow(c) ? {
width: b.width(),
height: b.height(),
offset: {
top: b.scrollTop(),
left: b.scrollLeft()
}
} : c.preventDefault ? {
width: 0,
height: 0,
offset: {
top: c.pageY,
left: c.pageX
}
} : {
width: b.outerWidth(),
height: b.outerHeight(),
offset: b.offset()
}
}
a.ui = a.ui || {};
var e, f, g = Math.max,
h = Math.abs,
i = Math.round,
j = /left|center|right/,
k = /top|center|bottom/,
l = /[\+\-]\d+(\.[\d]+)?%?/,
m = /^\w+/,
n = /%$/,
o = a.fn.position;
a.position = {
scrollbarWidth: function() {
if (void 0 !== e) return e;
var b, c, d = a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),
f = d.children()[0];
return a("body").append(d), b = f.offsetWidth, d.css("overflow", "scroll"), c = f.offsetWidth, b === c && (c = d[0].clientWidth), d.remove(), e = b - c
},
getScrollInfo: function(b) {
var c = b.isWindow || b.isDocument ? "" : b.element.css("overflow-x"),
d = b.isWindow || b.isDocument ? "" : b.element.css("overflow-y"),
e = "scroll" === c || "auto" === c && b.width < b.element[0].scrollWidth,
f = "scroll" === d || "auto" === d && b.height < b.element[0].scrollHeight;
return {
width: f ? a.position.scrollbarWidth() : 0,
height: e ? a.position.scrollbarWidth() : 0
}
},
getWithinInfo: function(b) {
var c = a(b || window),
d = a.isWindow(c[0]),
e = !!c[0] && 9 === c[0].nodeType;
return {
element: c,
isWindow: d,
isDocument: e,
offset: c.offset() || {
left: 0,
top: 0
},
scrollLeft: c.scrollLeft(),
scrollTop: c.scrollTop(),
width: d || e ? c.width() : c.outerWidth(),
height: d || e ? c.height() : c.outerHeight()
}
}
}, a.fn.position = function(e) {
if (!e || !e.of) return o.apply(this, arguments);
e = a.extend({}, e);
var n, p, q, r, s, t, u = a(e.of),
v = a.position.getWithinInfo(e.within),
w = a.position.getScrollInfo(v),
x = (e.collision || "flip").split(" "),
y = {};
return t = d(u), u[0].preventDefault && (e.at = "left top"), p = t.width, q = t.height, r = t.offset, s = a.extend({}, r), a.each(["my", "at"], function() {
var a, b, c = (e[this] || "").split(" ");
1 === c.length && (c = j.test(c[0]) ? c.concat(["center"]) : k.test(c[0]) ? ["center"].concat(c) : ["center", "center"]), c[0] = j.test(c[0]) ? c[0] : "center", c[1] = k.test(c[1]) ? c[1] : "center", a = l.exec(c[0]), b = l.exec(c[1]), y[this] = [a ? a[0] : 0, b ? b[0] : 0], e[this] = [m.exec(c[0])[0], m.exec(c[1])[0]]
}), 1 === x.length && (x[1] = x[0]), "right" === e.at[0] ? s.left += p : "center" === e.at[0] && (s.left += p / 2), "bottom" === e.at[1] ? s.top += q : "center" === e.at[1] && (s.top += q / 2), n = b(y.at, p, q), s.left += n[0], s.top += n[1], this.each(function() {
var d, j, k = a(this),
l = k.outerWidth(),
m = k.outerHeight(),
o = c(this, "marginLeft"),
t = c(this, "marginTop"),
z = l + o + c(this, "marginRight") + w.width,
A = m + t + c(this, "marginBottom") + w.height,
B = a.extend({}, s),
C = b(y.my, k.outerWidth(), k.outerHeight());
"right" === e.my[0] ? B.left -= l : "center" === e.my[0] && (B.left -= l / 2), "bottom" === e.my[1] ? B.top -= m : "center" === e.my[1] && (B.top -= m / 2), B.left += C[0], B.top += C[1], f || (B.left = i(B.left), B.top = i(B.top)), d = {
marginLeft: o,
marginTop: t
}, a.each(["left", "top"], function(b, c) {
a.ui.position[x[b]] && a.ui.position[x[b]][c](B, {
targetWidth: p,
targetHeight: q,
elemWidth: l,
elemHeight: m,
collisionPosition: d,
collisionWidth: z,
collisionHeight: A,
offset: [n[0] + C[0], n[1] + C[1]],
my: e.my,
at: e.at,
within: v,
elem: k
})
}), e.using && (j = function(a) {
var b = r.left - B.left,
c = b + p - l,
d = r.top - B.top,
f = d + q - m,
i = {
target: {
element: u,
left: r.left,
top: r.top,
width: p,
height: q
},
element: {
element: k,
left: B.left,
top: B.top,
width: l,
height: m
},
horizontal: 0 > c ? "left" : b > 0 ? "right" : "center",
vertical: 0 > f ? "top" : d > 0 ? "bottom" : "middle"
};
l > p && h(b + c) < p && (i.horizontal = "center"), m > q && h(d + f) < q && (i.vertical = "middle"), i.important = g(h(b), h(c)) > g(h(d), h(f)) ? "horizontal" : "vertical", e.using.call(this, a, i)
}), k.offset(a.extend(B, {
using: j
}))
})
}, a.ui.position = {
fit: {
left: function(a, b) {
var c, d = b.within,
e = d.isWindow ? d.scrollLeft : d.offset.left,
f = d.width,
h = a.left - b.collisionPosition.marginLeft,
i = e - h,
j = h + b.collisionWidth - f - e;
b.collisionWidth > f ? i > 0 && 0 >= j ? (c = a.left + i + b.collisionWidth - f - e, a.left += i - c) : a.left = j > 0 && 0 >= i ? e : i > j ? e + f - b.collisionWidth : e : i > 0 ? a.left += i : j > 0 ? a.left -= j : a.left = g(a.left - h, a.left)
},
top: function(a, b) {
var c, d = b.within,
e = d.isWindow ? d.scrollTop : d.offset.top,
f = b.within.height,
h = a.top - b.collisionPosition.marginTop,
i = e - h,
j = h + b.collisionHeight - f - e;
b.collisionHeight > f ? i > 0 && 0 >= j ? (c = a.top + i + b.collisionHeight - f - e, a.top += i - c) : a.top = j > 0 && 0 >= i ? e : i > j ? e + f - b.collisionHeight : e : i > 0 ? a.top += i : j > 0 ? a.top -= j : a.top = g(a.top - h, a.top)
}
},
flip: {
left: function(a, b) {
var c, d, e = b.within,
f = e.offset.left + e.scrollLeft,
g = e.width,
i = e.isWindow ? e.scrollLeft : e.offset.left,
j = a.left - b.collisionPosition.marginLeft,
k = j - i,
l = j + b.collisionWidth - g - i,
m = "left" === b.my[0] ? -b.elemWidth : "right" === b.my[0] ? b.elemWidth : 0,
n = "left" === b.at[0] ? b.targetWidth : "right" === b.at[0] ? -b.targetWidth : 0,
o = -2 * b.offset[0];
0 > k ? (c = a.left + m + n + o + b.collisionWidth - g - f, (0 > c || c < h(k)) && (a.left += m + n + o)) : l > 0 && (d = a.left - b.collisionPosition.marginLeft + m + n + o - i, (d > 0 || h(d) < l) && (a.left += m + n + o))
},
top: function(a, b) {
var c, d, e = b.within,
f = e.offset.top + e.scrollTop,
g = e.height,
i = e.isWindow ? e.scrollTop : e.offset.top,
j = a.top - b.collisionPosition.marginTop,
k = j - i,
l = j + b.collisionHeight - g - i,
m = "top" === b.my[1],
n = m ? -b.elemHeight : "bottom" === b.my[1] ? b.elemHeight : 0,
o = "top" === b.at[1] ? b.targetHeight : "bottom" === b.at[1] ? -b.targetHeight : 0,
p = -2 * b.offset[1];
0 > k ? (d = a.top + n + o + p + b.collisionHeight - g - f, (0 > d || d < h(k)) && (a.top += n + o + p)) : l > 0 && (c = a.top - b.collisionPosition.marginTop + n + o + p - i, (c > 0 || h(c) < l) && (a.top += n + o + p))
}
},
flipfit: {
left: function() {
a.ui.position.flip.left.apply(this, arguments), a.ui.position.fit.left.apply(this, arguments)
},
top: function() {
a.ui.position.flip.top.apply(this, arguments), a.ui.position.fit.top.apply(this, arguments)
}
}
},
function() {
var b, c, d, e, g, h = document.getElementsByTagName("body")[0],
i = document.createElement("div");
b = document.createElement(h ? "div" : "body"), d = {
visibility: "hidden",
width: 0,
height: 0,
border: 0,
margin: 0,
background: "none"
}, h && a.extend(d, {
position: "absolute",
left: "-1000px",
top: "-1000px"
});
for (g in d) b.style[g] = d[g];
b.appendChild(i), c = h || document.documentElement, c.insertBefore(b, c.firstChild), i.style.cssText = "position: absolute; left: 10.7432222px;", e = a(i).offset().left, f = e > 10 && 11 > e, b.innerHTML = "", c.removeChild(b)
}()
}();
a.ui.position, a.widget("ui.accordion", {
version: "1.11.4",
options: {
active: 0,
animate: {},
collapsible: !1,
event: "click",
header: "> li > :first-child,> :not(li):even",
heightStyle: "auto",
icons: {
activeHeader: "ui-icon-triangle-1-s",
header: "ui-icon-triangle-1-e"
},
activate: null,
beforeActivate: null
},
hideProps: {
borderTopWidth: "hide",
borderBottomWidth: "hide",
paddingTop: "hide",
paddingBottom: "hide",
height: "hide"
},
showProps: {
borderTopWidth: "show",
borderBottomWidth: "show",
paddingTop: "show",
paddingBottom: "show",
height: "show"
},
_create: function() {
var b = this.options;
this.prevShow = this.prevHide = a(), this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role", "tablist"), b.collapsible || b.active !== !1 && null != b.active || (b.active = 0), this._processPanels(), b.active < 0 && (b.active += this.headers.length), this._refresh()
},
_getCreateEventData: function() {
return {
header: this.active,
panel: this.active.length ? this.active.next() : a()
}
},
_createIcons: function() {
var b = this.options.icons;
b && (a("<span>").addClass("ui-accordion-header-icon ui-icon " + b.header).prependTo(this.headers), this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader), this.headers.addClass("ui-accordion-icons"))
},
_destroyIcons: function() {
this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()
},
_destroy: function() {
var a;
this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"), this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(), this._destroyIcons(), a = this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display", "").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(), "content" !== this.options.heightStyle && a.css("height", "")
},
_setOption: function(a, b) {
return "active" === a ? void this._activate(b) : ("event" === a && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(b)), this._super(a, b), "collapsible" !== a || b || this.options.active !== !1 || this._activate(0), "icons" === a && (this._destroyIcons(), b && this._createIcons()), void("disabled" === a && (this.element.toggleClass("ui-state-disabled", !!b).attr("aria-disabled", b), this.headers.add(this.headers.next()).toggleClass("ui-state-disabled", !!b))))
},
_keydown: function(b) {
if (!b.altKey && !b.ctrlKey) {
var c = a.ui.keyCode,
d = this.headers.length,
e = this.headers.index(b.target),
f = !1;
switch (b.keyCode) {
case c.RIGHT:
case c.DOWN:
f = this.headers[(e + 1) % d];
break;
case c.LEFT:
case c.UP:
f = this.headers[(e - 1 + d) % d];
break;
case c.SPACE:
case c.ENTER:
this._eventHandler(b);
break;
case c.HOME:
f = this.headers[0];
break;
case c.END:
f = this.headers[d - 1]
}
f && (a(b.target).attr("tabIndex", -1), a(f).attr("tabIndex", 0), f.focus(), b.preventDefault())
}
},
_panelKeyDown: function(b) {
b.keyCode === a.ui.keyCode.UP && b.ctrlKey && a(b.currentTarget).prev().focus()
},
refresh: function() {
var b = this.options;
this._processPanels(), b.active === !1 && b.collapsible === !0 || !this.headers.length ? (b.active = !1, this.active = a()) : b.active === !1 ? this._activate(0) : this.active.length && !a.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (b.active = !1, this.active = a()) : this._activate(Math.max(0, b.active - 1)) : b.active = this.headers.index(this.active), this._destroyIcons(), this._refresh()
},
_processPanels: function() {
var a = this.headers,
b = this.panels;
this.headers = this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"), this.panels = this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(), b && (this._off(a.not(this.headers)), this._off(b.not(this.panels)))
},
_refresh: function() {
var b, c = this.options,
d = c.heightStyle,
e = this.element.parent();
this.active = this._findActive(c.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"), this.active.next().addClass("ui-accordion-content-active").show(), this.headers.attr("role", "tab").each(function() {
var b = a(this),
c = b.uniqueId().attr("id"),
d = b.next(),
e = d.uniqueId().attr("id");
b.attr("aria-controls", e), d.attr("aria-labelledby", c)
}).next().attr("role", "tabpanel"), this.headers.not(this.active).attr({
"aria-selected": "false",
"aria-expanded": "false",
tabIndex: -1
}).next().attr({
"aria-hidden": "true"
}).hide(), this.active.length ? this.active.attr({
"aria-selected": "true",
"aria-expanded": "true",
tabIndex: 0
}).next().attr({
"aria-hidden": "false"
}) : this.headers.eq(0).attr("tabIndex", 0), this._createIcons(), this._setupEvents(c.event), "fill" === d ? (b = e.height(), this.element.siblings(":visible").each(function() {
var c = a(this),
d = c.css("position");
"absolute" !== d && "fixed" !== d && (b -= c.outerHeight(!0))
}), this.headers.each(function() {
b -= a(this).outerHeight(!0)
}), this.headers.next().each(function() {
a(this).height(Math.max(0, b - a(this).innerHeight() + a(this).height()))
}).css("overflow", "auto")) : "auto" === d && (b = 0, this.headers.next().each(function() {
b = Math.max(b, a(this).css("height", "").height())
}).height(b))
},
_activate: function(b) {
var c = this._findActive(b)[0];
c !== this.active[0] && (c = c || this.active[0], this._eventHandler({
target: c,
currentTarget: c,
preventDefault: a.noop
}))
},
_findActive: function(b) {
return "number" == typeof b ? this.headers.eq(b) : a()
},
_setupEvents: function(b) {
var c = {
keydown: "_keydown"
};
b && a.each(b.split(" "), function(a, b) {
c[b] = "_eventHandler"
}), this._off(this.headers.add(this.headers.next())), this._on(this.headers, c), this._on(this.headers.next(), {
keydown: "_panelKeyDown"
}), this._hoverable(this.headers), this._focusable(this.headers)
},
_eventHandler: function(b) {
var c = this.options,
d = this.active,
e = a(b.currentTarget),
f = e[0] === d[0],
g = f && c.collapsible,
h = g ? a() : e.next(),
i = d.next(),
j = {
oldHeader: d,
oldPanel: i,
newHeader: g ? a() : e,
newPanel: h
};
b.preventDefault(), f && !c.collapsible || this._trigger("beforeActivate", b, j) === !1 || (c.active = g ? !1 : this.headers.index(e), this.active = f ? a() : e, this._toggle(j), d.removeClass("ui-accordion-header-active ui-state-active"), c.icons && d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header), f || (e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"), c.icons && e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader), e.next().addClass("ui-accordion-content-active")))
},
_toggle: function(b) {
var c = b.newPanel,
d = this.prevShow.length ? this.prevShow : b.oldPanel;
this.prevShow.add(this.prevHide).stop(!0, !0), this.prevShow = c, this.prevHide = d, this.options.animate ? this._animate(c, d, b) : (d.hide(), c.show(), this._toggleComplete(b)), d.attr({
"aria-hidden": "true"
}), d.prev().attr({
"aria-selected": "false",
"aria-expanded": "false"
}), c.length && d.length ? d.prev().attr({
tabIndex: -1,
"aria-expanded": "false"
}) : c.length && this.headers.filter(function() {
return 0 === parseInt(a(this).attr("tabIndex"), 10)
}).attr("tabIndex", -1), c.attr("aria-hidden", "false").prev().attr({
"aria-selected": "true",
"aria-expanded": "true",
tabIndex: 0
})
},
_animate: function(a, b, c) {
var d, e, f, g = this,
h = 0,
i = a.css("box-sizing"),
j = a.length && (!b.length || a.index() < b.index()),
k = this.options.animate || {},
l = j && k.down || k,
m = function() {
g._toggleComplete(c)
};
return "number" == typeof l && (f = l), "string" == typeof l && (e = l), e = e || l.easing || k.easing, f = f || l.duration || k.duration, b.length ? a.length ? (d = a.show().outerHeight(), b.animate(this.hideProps, {
duration: f,
easing: e,
step: function(a, b) {
b.now = Math.round(a)
}
}), void a.hide().animate(this.showProps, {
duration: f,
easing: e,
complete: m,
step: function(a, c) {
c.now = Math.round(a), "height" !== c.prop ? "content-box" === i && (h += c.now) : "content" !== g.options.heightStyle && (c.now = Math.round(d - b.outerHeight() - h), h = 0)
}
})) : b.animate(this.hideProps, f, e, m) : a.animate(this.showProps, f, e, m)
},
_toggleComplete: function(a) {
var b = a.oldPanel;
b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"), b.length && (b.parent()[0].className = b.parent()[0].className), this._trigger("activate", null, a)
}
}), a.widget("ui.menu", {
version: "1.11.4",
defaultElement: "<ul>",
delay: 300,
options: {
icons: {
submenu: "ui-icon-carat-1-e"
},
items: "> *",
menus: "ul",
position: {
my: "left-1 top",
at: "right top"
},
role: "menu",
blur: null,
focus: null,
select: null
},
_create: function() {
this.activeMenu = this.element, this.mouseHandled = !1, this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length).attr({
role: this.options.role,
tabIndex: 0
}), this.options.disabled && this.element.addClass("ui-state-disabled").attr("aria-disabled", "true"), this._on({
"mousedown .ui-menu-item": function(a) {
a.preventDefault()
},
"click .ui-menu-item": function(b) {
var c = a(b.target);
!this.mouseHandled && c.not(".ui-state-disabled").length && (this.select(b), b.isPropagationStopped() || (this.mouseHandled = !0), c.has(".ui-menu").length ? this.expand(b) : !this.element.is(":focus") && a(this.document[0].activeElement).closest(".ui-menu").length && (this.element.trigger("focus", [!0]), this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer)))
},
"mouseenter .ui-menu-item": function(b) {
if (!this.previousFilter) {
var c = a(b.currentTarget);
c.siblings(".ui-state-active").removeClass("ui-state-active"), this.focus(b, c)
}
},
mouseleave: "collapseAll",
"mouseleave .ui-menu": "collapseAll",
focus: function(a, b) {
var c = this.active || this.element.find(this.options.items).eq(0);
b || this.focus(a, c)
},
blur: function(b) {
this._delay(function() {
a.contains(this.element[0], this.document[0].activeElement) || this.collapseAll(b)
})
},
keydown: "_keydown"
}), this.refresh(), this._on(this.document, {
click: function(a) {
this._closeOnDocumentClick(a) && this.collapseAll(a), this.mouseHandled = !1
}
})
},
_destroy: function() {
this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(), this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function() {
var b = a(this);
b.data("ui-menu-submenu-carat") && b.remove()
}), this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
},
_keydown: function(b) {
var c, d, e, f, g = !0;
switch (b.keyCode) {
case a.ui.keyCode.PAGE_UP:
this.previousPage(b);
break;
case a.ui.keyCode.PAGE_DOWN:
this.nextPage(b);
break;
case a.ui.keyCode.HOME:
this._move("first", "first", b);
break;
case a.ui.keyCode.END:
this._move("last", "last", b);
break;
case a.ui.keyCode.UP:
this.previous(b);
break;
case a.ui.keyCode.DOWN:
this.next(b);
break;
case a.ui.keyCode.LEFT:
this.collapse(b);
break;
case a.ui.keyCode.RIGHT:
this.active && !this.active.is(".ui-state-disabled") && this.expand(b);
break;
case a.ui.keyCode.ENTER:
case a.ui.keyCode.SPACE:
this._activate(b);
break;
case a.ui.keyCode.ESCAPE:
this.collapse(b);
break;
default:
g = !1, d = this.previousFilter || "", e = String.fromCharCode(b.keyCode), f = !1, clearTimeout(this.filterTimer), e === d ? f = !0 : e = d + e, c = this._filterMenuItems(e), c = f && -1 !== c.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : c, c.length || (e = String.fromCharCode(b.keyCode), c = this._filterMenuItems(e)), c.length ? (this.focus(b, c), this.previousFilter = e, this.filterTimer = this._delay(function() {
delete this.previousFilter
}, 1e3)) : delete this.previousFilter
}
g && b.preventDefault()
},
_activate: function(a) {
this.active.is(".ui-state-disabled") || (this.active.is("[aria-haspopup='true']") ? this.expand(a) : this.select(a))
},
refresh: function() {
var b, c, d = this,
e = this.options.icons.submenu,
f = this.element.find(this.options.menus);
this.element.toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length), f.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({
role: this.options.role,
"aria-hidden": "true",
"aria-expanded": "false"
}).each(function() {
var b = a(this),
c = b.parent(),
d = a("<span>").addClass("ui-menu-icon ui-icon " + e).data("ui-menu-submenu-carat", !0);
c.attr("aria-haspopup", "true").prepend(d), b.attr("aria-labelledby", c.attr("id"))
}), b = f.add(this.element), c = b.find(this.options.items), c.not(".ui-menu-item").each(function() {
var b = a(this);
d._isDivider(b) && b.addClass("ui-widget-content ui-menu-divider")
}), c.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({
tabIndex: -1,
role: this._itemRole()
}), c.filter(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !a.contains(this.element[0], this.active[0]) && this.blur()
},
_itemRole: function() {
return {
menu: "menuitem",
listbox: "option"
}[this.options.role]
},
_setOption: function(a, b) {
"icons" === a && this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu), "disabled" === a && this.element.toggleClass("ui-state-disabled", !!b).attr("aria-disabled", b), this._super(a, b)
},
focus: function(a, b) {
var c, d;
this.blur(a, a && "focus" === a.type), this._scrollIntoView(b), this.active = b.first(), d = this.active.addClass("ui-state-focus").removeClass("ui-state-active"), this.options.role && this.element.attr("aria-activedescendant", d.attr("id")), this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"), a && "keydown" === a.type ? this._close() : this.timer = this._delay(function() {
this._close()
}, this.delay), c = b.children(".ui-menu"), c.length && a && /^mouse/.test(a.type) && this._startOpening(c), this.activeMenu = b.parent(), this._trigger("focus", a, {
item: b
})
},
_scrollIntoView: function(b) {
var c, d, e, f, g, h;
this._hasScroll() && (c = parseFloat(a.css(this.activeMenu[0], "borderTopWidth")) || 0, d = parseFloat(a.css(this.activeMenu[0], "paddingTop")) || 0, e = b.offset().top - this.activeMenu.offset().top - c - d, f = this.activeMenu.scrollTop(), g = this.activeMenu.height(), h = b.outerHeight(), 0 > e ? this.activeMenu.scrollTop(f + e) : e + h > g && this.activeMenu.scrollTop(f + e - g + h))
},
blur: function(a, b) {
b || clearTimeout(this.timer), this.active && (this.active.removeClass("ui-state-focus"), this.active = null, this._trigger("blur", a, {
item: this.active
}))
},
_startOpening: function(a) {
clearTimeout(this.timer), "true" === a.attr("aria-hidden") && (this.timer = this._delay(function() {
this._close(), this._open(a)
}, this.delay))
},
_open: function(b) {
var c = a.extend({ of: this.active
}, this.options.position);
clearTimeout(this.timer), this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden", "true"), b.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(c)
},
collapseAll: function(b, c) {
clearTimeout(this.timer), this.timer = this._delay(function() {
var d = c ? this.element : a(b && b.target).closest(this.element.find(".ui-menu"));
d.length || (d = this.element), this._close(d), this.blur(b), this.activeMenu = d
}, this.delay)
},
_close: function(a) {
a || (a = this.active ? this.active.parent() : this.element), a.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")
},
_closeOnDocumentClick: function(b) {
return !a(b.target).closest(".ui-menu").length
},
_isDivider: function(a) {
return !/[^\-\u2014\u2013\s]/.test(a.text())
},
collapse: function(a) {
var b = this.active && this.active.parent().closest(".ui-menu-item", this.element);
b && b.length && (this._close(), this.focus(a, b))
},
expand: function(a) {
var b = this.active && this.active.children(".ui-menu ").find(this.options.items).first();
b && b.length && (this._open(b.parent()), this._delay(function() {
this.focus(a, b)
}))
},
next: function(a) {
this._move("next", "first", a)
},
previous: function(a) {
this._move("prev", "last", a)
},
isFirstItem: function() {
return this.active && !this.active.prevAll(".ui-menu-item").length
},
isLastItem: function() {
return this.active && !this.active.nextAll(".ui-menu-item").length
},
_move: function(a, b, c) {
var d;
this.active && (d = "first" === a || "last" === a ? this.active["first" === a ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : this.active[a + "All"](".ui-menu-item").eq(0)), d && d.length && this.active || (d = this.activeMenu.find(this.options.items)[b]()), this.focus(c, d)
},
nextPage: function(b) {
var c, d, e;
return this.active ? void(this.isLastItem() || (this._hasScroll() ? (d = this.active.offset().top, e = this.element.height(), this.active.nextAll(".ui-menu-item").each(function() {
return c = a(this), c.offset().top - d - e < 0
}), this.focus(b, c)) : this.focus(b, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]()))) : void this.next(b)
},
previousPage: function(b) {
var c, d, e;
return this.active ? void(this.isFirstItem() || (this._hasScroll() ? (d = this.active.offset().top, e = this.element.height(), this.active.prevAll(".ui-menu-item").each(function() {
return c = a(this), c.offset().top - d + e > 0
}), this.focus(b, c)) : this.focus(b, this.activeMenu.find(this.options.items).first()))) : void this.next(b)
},
_hasScroll: function() {
return this.element.outerHeight() < this.element.prop("scrollHeight")
},
select: function(b) {
this.active = this.active || a(b.target).closest(".ui-menu-item");
var c = {
item: this.active
};
this.active.has(".ui-menu").length || this.collapseAll(b, !0), this._trigger("select", b, c)
},
_filterMenuItems: function(b) {
var c = b.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"),
d = new RegExp("^" + c, "i");
return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function() {
return d.test(a.trim(a(this).text()))
})
}
});
a.widget("ui.autocomplete", {
version: "1.11.4",
defaultElement: "<input>",
options: {
appendTo: null,
autoFocus: !1,
delay: 300,
minLength: 1,
position: {
my: "left top",
at: "left bottom",
collision: "none"
},
source: null,
change: null,
close: null,
focus: null,
open: null,
response: null,
search: null,
select: null
},
requestIndex: 0,
pending: 0,
_create: function() {
var b, c, d, e = this.element[0].nodeName.toLowerCase(),
f = "textarea" === e,
g = "input" === e;
this.isMultiLine = f ? !0 : g ? !1 : this.element.prop("isContentEditable"), this.valueMethod = this.element[f || g ? "val" : "text"], this.isNewMenu = !0, this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off"), this._on(this.element, {
keydown: function(e) {
if (this.element.prop("readOnly")) return b = !0, d = !0, void(c = !0);
b = !1, d = !1, c = !1;
var f = a.ui.keyCode;
switch (e.keyCode) {
case f.PAGE_UP:
b = !0, this._move("previousPage", e);
break;
case f.PAGE_DOWN:
b = !0, this._move("nextPage", e);
break;
case f.UP:
b = !0, this._keyEvent("previous", e);
break;
case f.DOWN:
b = !0, this._keyEvent("next", e);
break;
case f.ENTER:
this.menu.active && (b = !0, e.preventDefault(), this.menu.select(e));
break;
case f.TAB:
this.menu.active && this.menu.select(e);
break;
case f.ESCAPE:
this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term), this.close(e), e.preventDefault());
break;
default:
c = !0, this._searchTimeout(e)
}
},
keypress: function(d) {
if (b) return b = !1, void((!this.isMultiLine || this.menu.element.is(":visible")) && d.preventDefault());
if (!c) {
var e = a.ui.keyCode;
switch (d.keyCode) {
case e.PAGE_UP:
this._move("previousPage", d);
break;
case e.PAGE_DOWN:
this._move("nextPage", d);
break;
case e.UP:
this._keyEvent("previous", d);
break;
case e.DOWN:
this._keyEvent("next", d)
}
}
},
input: function(a) {
return d ? (d = !1, void a.preventDefault()) : void this._searchTimeout(a)
},
focus: function() {
this.selectedItem = null, this.previous = this._value()
},
blur: function(a) {
return this.cancelBlur ? void delete this.cancelBlur : (clearTimeout(this.searching), this.close(a), void this._change(a))
}
}), this._initSource(), this.menu = a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({
role: null
}).hide().menu("instance"), this._on(this.menu.element, {
mousedown: function(b) {
b.preventDefault(), this.cancelBlur = !0, this._delay(function() {
delete this.cancelBlur
});
var c = this.menu.element[0];
a(b.target).closest(".ui-menu-item").length || this._delay(function() {
var b = this;
this.document.one("mousedown", function(d) {
d.target === b.element[0] || d.target === c || a.contains(c, d.target) || b.close()
})
})
},
menufocus: function(b, c) {
var d, e;
return this.isNewMenu && (this.isNewMenu = !1, b.originalEvent && /^mouse/.test(b.originalEvent.type)) ? (this.menu.blur(), void this.document.one("mousemove", function() {
a(b.target).trigger(b.originalEvent)
})) : (e = c.item.data("ui-autocomplete-item"), !1 !== this._trigger("focus", b, {
item: e
}) && b.originalEvent && /^key/.test(b.originalEvent.type) && this._value(e.value), d = c.item.attr("aria-label") || e.value, void(d && a.trim(d).length && (this.liveRegion.children().hide(), a("<div>").text(d).appendTo(this.liveRegion))))
},
menuselect: function(a, b) {
var c = b.item.data("ui-autocomplete-item"),
d = this.previous;
this.element[0] !== this.document[0].activeElement && (this.element.focus(), this.previous = d, this._delay(function() {
this.previous = d, this.selectedItem = c
})), !1 !== this._trigger("select", a, {
item: c
}) && this._value(c.value), this.term = this._value(), this.close(a), this.selectedItem = c
}
}), this.liveRegion = a("<span>", {
role: "status",
"aria-live": "assertive",
"aria-relevant": "additions"
}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body), this._on(this.window, {
beforeunload: function() {
this.element.removeAttr("autocomplete")
}
})
},
_destroy: function() {
clearTimeout(this.searching), this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"), this.menu.element.remove(), this.liveRegion.remove()
},
_setOption: function(a, b) {
this._super(a, b), "source" === a && this._initSource(), "appendTo" === a && this.menu.element.appendTo(this._appendTo()), "disabled" === a && b && this.xhr && this.xhr.abort()
},
_appendTo: function() {
var b = this.options.appendTo;
return b && (b = b.jquery || b.nodeType ? a(b) : this.document.find(b).eq(0)), b && b[0] || (b = this.element.closest(".ui-front")), b.length || (b = this.document[0].body), b
},
_initSource: function() {
var b, c, d = this;
a.isArray(this.options.source) ? (b = this.options.source, this.source = function(c, d) {
d(a.ui.autocomplete.filter(b, c.term))
}) : "string" == typeof this.options.source ? (c = this.options.source, this.source = function(b, e) {
d.xhr && d.xhr.abort(), d.xhr = a.ajax({
url: c,
data: b,
dataType: "json",
success: function(a) {
e(a)
},
error: function() {
e([])
}
})
}) : this.source = this.options.source
},
_searchTimeout: function(a) {
clearTimeout(this.searching), this.searching = this._delay(function() {
var b = this.term === this._value(),
c = this.menu.element.is(":visible"),
d = a.altKey || a.ctrlKey || a.metaKey || a.shiftKey;
(!b || b && !c && !d) && (this.selectedItem = null, this.search(null, a))
}, this.options.delay)
},
search: function(a, b) {
return a = null != a ? a : this._value(), this.term = this._value(), a.length < this.options.minLength ? this.close(b) : this._trigger("search", b) !== !1 ? this._search(a) : void 0
},
_search: function(a) {
this.pending++, this.element.addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({
term: a
}, this._response())
},
_response: function() {
var b = ++this.requestIndex;
return a.proxy(function(a) {
b === this.requestIndex && this.__response(a), this.pending--, this.pending || this.element.removeClass("ui-autocomplete-loading")
}, this)
},
__response: function(a) {
a && (a = this._normalize(a)), this._trigger("response", null, {
content: a
}), !this.options.disabled && a && a.length && !this.cancelSearch ? (this._suggest(a), this._trigger("open")) : this._close()
},
close: function(a) {
this.cancelSearch = !0, this._close(a)
},
_close: function(a) {
this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", a))
},
_change: function(a) {
this.previous !== this._value() && this._trigger("change", a, {
item: this.selectedItem
})
},
_normalize: function(b) {
return b.length && b[0].label && b[0].value ? b : a.map(b, function(b) {
return "string" == typeof b ? {
label: b,
value: b
} : a.extend({}, b, {
label: b.label || b.value,
value: b.value || b.label
})
})
},
_suggest: function(b) {
var c = this.menu.element.empty();
this._renderMenu(c, b), this.isNewMenu = !0, this.menu.refresh(), c.show(), this._resizeMenu(), c.position(a.extend({ of: this.element
}, this.options.position)), this.options.autoFocus && this.menu.next()
},
_resizeMenu: function() {
var a = this.menu.element;
a.outerWidth(Math.max(a.width("").outerWidth() + 1, this.element.outerWidth()))
},
_renderMenu: function(b, c) {
var d = this;
a.each(c, function(a, c) {
d._renderItemData(b, c)
})
},
_renderItemData: function(a, b) {
return this._renderItem(a, b).data("ui-autocomplete-item", b)
},
_renderItem: function(b, c) {
return a("<li>").text(c.label).appendTo(b)
},
_move: function(a, b) {
return this.menu.element.is(":visible") ? this.menu.isFirstItem() && /^previous/.test(a) || this.menu.isLastItem() && /^next/.test(a) ? (this.isMultiLine || this._value(this.term), void this.menu.blur()) : void this.menu[a](b) : void this.search(null, b)
},
widget: function() {
return this.menu.element
},
_value: function() {
return this.valueMethod.apply(this.element, arguments)
},
_keyEvent: function(a, b) {
(!this.isMultiLine || this.menu.element.is(":visible")) && (this._move(a, b), b.preventDefault())
}
}), a.extend(a.ui.autocomplete, {
escapeRegex: function(a) {
return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
},
filter: function(b, c) {
var d = new RegExp(a.ui.autocomplete.escapeRegex(c), "i");
return a.grep(b, function(a) {
return d.test(a.label || a.value || a);
})
}
}), a.widget("ui.autocomplete", a.ui.autocomplete, {
options: {
messages: {
noResults: "No search results.",
results: function(a) {
return a + (a > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate."
}
}
},
__response: function(b) {
var c;
this._superApply(arguments), this.options.disabled || this.cancelSearch || (c = b && b.length ? this.options.messages.results(b.length) : this.options.messages.noResults, this.liveRegion.children().hide(), a("<div>").text(c).appendTo(this.liveRegion))
}
});
var m, n = (a.ui.autocomplete, "ui-button ui-widget ui-state-default ui-corner-all"),
o = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
p = function() {
var b = a(this);
setTimeout(function() {
b.find(":ui-button").button("refresh")
}, 1)
},
q = function(b) {
var c = b.name,
d = b.form,
e = a([]);
return c && (c = c.replace(/'/g, "\\'"), e = d ? a(d).find("[name='" + c + "'][type=radio]") : a("[name='" + c + "'][type=radio]", b.ownerDocument).filter(function() {
return !this.form
})), e
};
a.widget("ui.button", {
version: "1.11.4",
defaultElement: "<button>",
options: {
disabled: null,
text: !0,
label: null,
icons: {
primary: null,
secondary: null
}
},
_create: function() {
this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace, p), "boolean" != typeof this.options.disabled ? this.options.disabled = !!this.element.prop("disabled") : this.element.prop("disabled", this.options.disabled), this._determineButtonType(), this.hasTitle = !!this.buttonElement.attr("title");
var b = this,
c = this.options,
d = "checkbox" === this.type || "radio" === this.type,
e = d ? "" : "ui-state-active";
null === c.label && (c.label = "input" === this.type ? this.buttonElement.val() : this.buttonElement.html()), this._hoverable(this.buttonElement), this.buttonElement.addClass(n).attr("role", "button").bind("mouseenter" + this.eventNamespace, function() {
c.disabled || this === m && a(this).addClass("ui-state-active")
}).bind("mouseleave" + this.eventNamespace, function() {
c.disabled || a(this).removeClass(e)
}).bind("click" + this.eventNamespace, function(a) {
c.disabled && (a.preventDefault(), a.stopImmediatePropagation())
}), this._on({
focus: function() {
this.buttonElement.addClass("ui-state-focus")
},
blur: function() {
this.buttonElement.removeClass("ui-state-focus")
}
}), d && this.element.bind("change" + this.eventNamespace, function() {
b.refresh()
}), "checkbox" === this.type ? this.buttonElement.bind("click" + this.eventNamespace, function() {
return c.disabled ? !1 : void 0
}) : "radio" === this.type ? this.buttonElement.bind("click" + this.eventNamespace, function() {
if (c.disabled) return !1;
a(this).addClass("ui-state-active"), b.buttonElement.attr("aria-pressed", "true");
var d = b.element[0];
q(d).not(d).map(function() {
return a(this).button("widget")[0]
}).removeClass("ui-state-active").attr("aria-pressed", "false")
}) : (this.buttonElement.bind("mousedown" + this.eventNamespace, function() {
return c.disabled ? !1 : (a(this).addClass("ui-state-active"), m = this, void b.document.one("mouseup", function() {
m = null
}))
}).bind("mouseup" + this.eventNamespace, function() {
return c.disabled ? !1 : void a(this).removeClass("ui-state-active")
}).bind("keydown" + this.eventNamespace, function(b) {
return c.disabled ? !1 : void((b.keyCode === a.ui.keyCode.SPACE || b.keyCode === a.ui.keyCode.ENTER) && a(this).addClass("ui-state-active"))
}).bind("keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
a(this).removeClass("ui-state-active")
}), this.buttonElement.is("a") && this.buttonElement.keyup(function(b) {
b.keyCode === a.ui.keyCode.SPACE && a(this).click()
})), this._setOption("disabled", c.disabled), this._resetButton()
},
_determineButtonType: function() {
var a, b, c;
this.type = this.element.is("[type=checkbox]") ? "checkbox" : this.element.is("[type=radio]") ? "radio" : this.element.is("input") ? "input" : "button", "checkbox" === this.type || "radio" === this.type ? (a = this.element.parents().last(), b = "label[for='" + this.element.attr("id") + "']", this.buttonElement = a.find(b), this.buttonElement.length || (a = a.length ? a.siblings() : this.element.siblings(), this.buttonElement = a.filter(b), this.buttonElement.length || (this.buttonElement = a.find(b))), this.element.addClass("ui-helper-hidden-accessible"), c = this.element.is(":checked"), c && this.buttonElement.addClass("ui-state-active"), this.buttonElement.prop("aria-pressed", c)) : this.buttonElement = this.element
},
widget: function() {
return this.buttonElement
},
_destroy: function() {
this.element.removeClass("ui-helper-hidden-accessible"), this.buttonElement.removeClass(n + " ui-state-active " + o).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()), this.hasTitle || this.buttonElement.removeAttr("title")
},
_setOption: function(a, b) {
return this._super(a, b), "disabled" === a ? (this.widget().toggleClass("ui-state-disabled", !!b), this.element.prop("disabled", !!b), void(b && this.buttonElement.removeClass("checkbox" === this.type || "radio" === this.type ? "ui-state-focus" : "ui-state-focus ui-state-active"))) : void this._resetButton()
},
refresh: function() {
var b = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass("ui-button-disabled");
b !== this.options.disabled && this._setOption("disabled", b), "radio" === this.type ? q(this.element[0]).each(function() {
a(this).is(":checked") ? a(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true") : a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false")
}) : "checkbox" === this.type && (this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false"))
},
_resetButton: function() {
if ("input" === this.type) return void(this.options.label && this.element.val(this.options.label));
var b = this.buttonElement.removeClass(o),
c = a("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),
d = this.options.icons,
e = d.primary && d.secondary,
f = [];
d.primary || d.secondary ? (this.options.text && f.push("ui-button-text-icon" + (e ? "s" : d.primary ? "-primary" : "-secondary")), d.primary && b.prepend("<span class='ui-button-icon-primary ui-icon " + d.primary + "'></span>"), d.secondary && b.append("<span class='ui-button-icon-secondary ui-icon " + d.secondary + "'></span>"), this.options.text || (f.push(e ? "ui-button-icons-only" : "ui-button-icon-only"), this.hasTitle || b.attr("title", a.trim(c)))) : f.push("ui-button-text-only"), b.addClass(f.join(" "))
}
}), a.widget("ui.buttonset", {
version: "1.11.4",
options: {
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
},
_create: function() {
this.element.addClass("ui-buttonset")
},
_init: function() {
this.refresh()
},
_setOption: function(a, b) {
"disabled" === a && this.buttons.button("option", a, b), this._super(a, b)
},
refresh: function() {
var b = "rtl" === this.element.css("direction"),
c = this.element.find(this.options.items),
d = c.filter(":ui-button");
c.not(":ui-button").button(), d.button("refresh"), this.buttons = c.map(function() {
return a(this).button("widget")[0]
}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b ? "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(b ? "ui-corner-left" : "ui-corner-right").end().end()
},
_destroy: function() {
this.element.removeClass("ui-buttonset"), this.buttons.map(function() {
return a(this).button("widget")[0]
}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")
}
});
a.ui.button;
a.extend(a.ui, {
datepicker: {
version: "1.11.4"
}
});
var r;
a.extend(e.prototype, {
markerClassName: "hasDatepicker",
maxRows: 4,
_widgetDatepicker: function() {
return this.dpDiv
},
setDefaults: function(a) {
return h(this._defaults, a || {}), this
},
_attachDatepicker: function(b, c) {
var d, e, f;
d = b.nodeName.toLowerCase(), e = "div" === d || "span" === d, b.id || (this.uuid += 1, b.id = "dp" + this.uuid), f = this._newInst(a(b), e), f.settings = a.extend({}, c || {}), "input" === d ? this._connectDatepicker(b, f) : e && this._inlineDatepicker(b, f)
},
_newInst: function(b, c) {
var d = b[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1");
return {
id: d,
input: b,
selectedDay: 0,
selectedMonth: 0,
selectedYear: 0,
drawMonth: 0,
drawYear: 0,
inline: c,
dpDiv: c ? f(a("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv
}
},
_connectDatepicker: function(b, c) {
var d = a(b);
c.append = a([]), c.trigger = a([]), d.hasClass(this.markerClassName) || (this._attachments(d, c), d.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp), this._autoSize(c), a.data(b, "datepicker", c), c.settings.disabled && this._disableDatepicker(b))
},
_attachments: function(b, c) {
var d, e, f, g = this._get(c, "appendText"),
h = this._get(c, "isRTL");
c.append && c.append.remove(), g && (c.append = a("<span class='" + this._appendClass + "'>" + g + "</span>"), b[h ? "before" : "after"](c.append)), b.unbind("focus", this._showDatepicker), c.trigger && c.trigger.remove(), d = this._get(c, "showOn"), ("focus" === d || "both" === d) && b.focus(this._showDatepicker), ("button" === d || "both" === d) && (e = this._get(c, "buttonText"), f = this._get(c, "buttonImage"), c.trigger = a(this._get(c, "buttonImageOnly") ? a("<img/>").addClass(this._triggerClass).attr({
src: f,
alt: e,
title: e
}) : a("<button type='button'></button>").addClass(this._triggerClass).html(f ? a("<img/>").attr({
src: f,
alt: e,
title: e
}) : e)), b[h ? "before" : "after"](c.trigger), c.trigger.click(function() {
return a.datepicker._datepickerShowing && a.datepicker._lastInput === b[0] ? a.datepicker._hideDatepicker() : a.datepicker._datepickerShowing && a.datepicker._lastInput !== b[0] ? (a.datepicker._hideDatepicker(), a.datepicker._showDatepicker(b[0])) : a.datepicker._showDatepicker(b[0]), !1
}))
},
_autoSize: function(a) {
if (this._get(a, "autoSize") && !a.inline) {
var b, c, d, e, f = new Date(2009, 11, 20),
g = this._get(a, "dateFormat");
g.match(/[DM]/) && (b = function(a) {
for (c = 0, d = 0, e = 0; e < a.length; e++) a[e].length > c && (c = a[e].length, d = e);
return d
}, f.setMonth(b(this._get(a, g.match(/MM/) ? "monthNames" : "monthNamesShort"))), f.setDate(b(this._get(a, g.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - f.getDay())), a.input.attr("size", this._formatDate(a, f).length)
}
},
_inlineDatepicker: function(b, c) {
var d = a(b);
d.hasClass(this.markerClassName) || (d.addClass(this.markerClassName).append(c.dpDiv), a.data(b, "datepicker", c), this._setDate(c, this._getDefaultDate(c), !0), this._updateDatepicker(c), this._updateAlternate(c), c.settings.disabled && this._disableDatepicker(b), c.dpDiv.css("display", "block"))
},
_dialogDatepicker: function(b, c, d, e, f) {
var g, i, j, k, l, m = this._dialogInst;
return m || (this.uuid += 1, g = "dp" + this.uuid, this._dialogInput = a("<input type='text' id='" + g + "' style='position: absolute; top: -100px; width: 0px;'/>"), this._dialogInput.keydown(this._doKeyDown), a("body").append(this._dialogInput), m = this._dialogInst = this._newInst(this._dialogInput, !1), m.settings = {}, a.data(this._dialogInput[0], "datepicker", m)), h(m.settings, e || {}), c = c && c.constructor === Date ? this._formatDate(m, c) : c, this._dialogInput.val(c), this._pos = f ? f.length ? f : [f.pageX, f.pageY] : null, this._pos || (i = document.documentElement.clientWidth, j = document.documentElement.clientHeight, k = document.documentElement.scrollLeft || document.body.scrollLeft, l = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [i / 2 - 100 + k, j / 2 - 150 + l]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), m.settings.onSelect = d, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), a.blockUI && a.blockUI(this.dpDiv), a.data(this._dialogInput[0], "datepicker", m), this
},
_destroyDatepicker: function(b) {
var c, d = a(b),
e = a.data(b, "datepicker");
d.hasClass(this.markerClassName) && (c = b.nodeName.toLowerCase(), a.removeData(b, "datepicker"), "input" === c ? (e.append.remove(), e.trigger.remove(), d.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : ("div" === c || "span" === c) && d.removeClass(this.markerClassName).empty(), r === e && (r = null))
},
_enableDatepicker: function(b) {
var c, d, e = a(b),
f = a.data(b, "datepicker");
e.hasClass(this.markerClassName) && (c = b.nodeName.toLowerCase(), "input" === c ? (b.disabled = !1, f.trigger.filter("button").each(function() {
this.disabled = !1
}).end().filter("img").css({
opacity: "1.0",
cursor: ""
})) : ("div" === c || "span" === c) && (d = e.children("." + this._inlineClass), d.children().removeClass("ui-state-disabled"), d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = a.map(this._disabledInputs, function(a) {
return a === b ? null : a
}))
},
_disableDatepicker: function(b) {
var c, d, e = a(b),
f = a.data(b, "datepicker");
e.hasClass(this.markerClassName) && (c = b.nodeName.toLowerCase(), "input" === c ? (b.disabled = !0, f.trigger.filter("button").each(function() {
this.disabled = !0
}).end().filter("img").css({
opacity: "0.5",
cursor: "default"
})) : ("div" === c || "span" === c) && (d = e.children("." + this._inlineClass), d.children().addClass("ui-state-disabled"), d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = a.map(this._disabledInputs, function(a) {
return a === b ? null : a
}), this._disabledInputs[this._disabledInputs.length] = b)
},
_isDisabledDatepicker: function(a) {
if (!a) return !1;
for (var b = 0; b < this._disabledInputs.length; b++)
if (this._disabledInputs[b] === a) return !0;
return !1
},
_getInst: function(b) {
try {
return a.data(b, "datepicker")
} catch (c) {
throw "Missing instance data for this datepicker"
}
},
_optionDatepicker: function(b, c, d) {
var e, f, g, i, j = this._getInst(b);
return 2 === arguments.length && "string" == typeof c ? "defaults" === c ? a.extend({}, a.datepicker._defaults) : j ? "all" === c ? a.extend({}, j.settings) : this._get(j, c) : null : (e = c || {}, "string" == typeof c && (e = {}, e[c] = d), void(j && (this._curInst === j && this._hideDatepicker(), f = this._getDateDatepicker(b, !0), g = this._getMinMaxDate(j, "min"), i = this._getMinMaxDate(j, "max"), h(j.settings, e), null !== g && void 0 !== e.dateFormat && void 0 === e.minDate && (j.settings.minDate = this._formatDate(j, g)), null !== i && void 0 !== e.dateFormat && void 0 === e.maxDate && (j.settings.maxDate = this._formatDate(j, i)), "disabled" in e && (e.disabled ? this._disableDatepicker(b) : this._enableDatepicker(b)), this._attachments(a(b), j), this._autoSize(j), this._setDate(j, f), this._updateAlternate(j), this._updateDatepicker(j))))
},
_changeDatepicker: function(a, b, c) {
this._optionDatepicker(a, b, c)
},
_refreshDatepicker: function(a) {
var b = this._getInst(a);
b && this._updateDatepicker(b)
},
_setDateDatepicker: function(a, b) {
var c = this._getInst(a);
c && (this._setDate(c, b), this._updateDatepicker(c), this._updateAlternate(c))
},
_getDateDatepicker: function(a, b) {
var c = this._getInst(a);
return c && !c.inline && this._setDateFromField(c, b), c ? this._getDate(c) : null
},
_doKeyDown: function(b) {
var c, d, e, f = a.datepicker._getInst(b.target),
g = !0,
h = f.dpDiv.is(".ui-datepicker-rtl");
if (f._keyEvent = !0, a.datepicker._datepickerShowing) switch (b.keyCode) {
case 9:
a.datepicker._hideDatepicker(), g = !1;
break;
case 13:
return e = a("td." + a.datepicker._dayOverClass + ":not(." + a.datepicker._currentClass + ")", f.dpDiv), e[0] && a.datepicker._selectDay(b.target, f.selectedMonth, f.selectedYear, e[0]), c = a.datepicker._get(f, "onSelect"), c ? (d = a.datepicker._formatDate(f), c.apply(f.input ? f.input[0] : null, [d, f])) : a.datepicker._hideDatepicker(), !1;
case 27:
a.datepicker._hideDatepicker();
break;
case 33:
a.datepicker._adjustDate(b.target, b.ctrlKey ? -a.datepicker._get(f, "stepBigMonths") : -a.datepicker._get(f, "stepMonths"), "M");
break;
case 34:
a.datepicker._adjustDate(b.target, b.ctrlKey ? +a.datepicker._get(f, "stepBigMonths") : +a.datepicker._get(f, "stepMonths"), "M");
break;
case 35:
(b.ctrlKey || b.metaKey) && a.datepicker._clearDate(b.target), g = b.ctrlKey || b.metaKey;
break;
case 36:
(b.ctrlKey || b.metaKey) && a.datepicker._gotoToday(b.target), g = b.ctrlKey || b.metaKey;
break;
case 37:
(b.ctrlKey || b.metaKey) && a.datepicker._adjustDate(b.target, h ? 1 : -1, "D"), g = b.ctrlKey || b.metaKey, b.originalEvent.altKey && a.datepicker._adjustDate(b.target, b.ctrlKey ? -a.datepicker._get(f, "stepBigMonths") : -a.datepicker._get(f, "stepMonths"), "M");
break;
case 38:
(b.ctrlKey || b.metaKey) && a.datepicker._adjustDate(b.target, -7, "D"), g = b.ctrlKey || b.metaKey;
break;
case 39:
(b.ctrlKey || b.metaKey) && a.datepicker._adjustDate(b.target, h ? -1 : 1, "D"), g = b.ctrlKey || b.metaKey, b.originalEvent.altKey && a.datepicker._adjustDate(b.target, b.ctrlKey ? +a.datepicker._get(f, "stepBigMonths") : +a.datepicker._get(f, "stepMonths"), "M");
break;
case 40:
(b.ctrlKey || b.metaKey) && a.datepicker._adjustDate(b.target, 7, "D"), g = b.ctrlKey || b.metaKey;
break;
default:
g = !1
} else 36 === b.keyCode && b.ctrlKey ? a.datepicker._showDatepicker(this) : g = !1;
g && (b.preventDefault(), b.stopPropagation())
},
_doKeyPress: function(b) {
var c, d, e = a.datepicker._getInst(b.target);
return a.datepicker._get(e, "constrainInput") ? (c = a.datepicker._possibleChars(a.datepicker._get(e, "dateFormat")), d = String.fromCharCode(null == b.charCode ? b.keyCode : b.charCode), b.ctrlKey || b.metaKey || " " > d || !c || c.indexOf(d) > -1) : void 0
},
_doKeyUp: function(b) {
var c, d = a.datepicker._getInst(b.target);
if (d.input.val() !== d.lastVal) try {
c = a.datepicker.parseDate(a.datepicker._get(d, "dateFormat"), d.input ? d.input.val() : null, a.datepicker._getFormatConfig(d)), c && (a.datepicker._setDateFromField(d), a.datepicker._updateAlternate(d), a.datepicker._updateDatepicker(d))
} catch (e) {}
return !0
},
_showDatepicker: function(b) {
if (b = b.target || b, "input" !== b.nodeName.toLowerCase() && (b = a("input", b.parentNode)[0]), !a.datepicker._isDisabledDatepicker(b) && a.datepicker._lastInput !== b) {
var c, e, f, g, i, j, k;
c = a.datepicker._getInst(b), a.datepicker._curInst && a.datepicker._curInst !== c && (a.datepicker._curInst.dpDiv.stop(!0, !0), c && a.datepicker._datepickerShowing && a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])), e = a.datepicker._get(c, "beforeShow"), f = e ? e.apply(b, [b, c]) : {}, f !== !1 && (h(c.settings, f), c.lastVal = null, a.datepicker._lastInput = b, a.datepicker._setDateFromField(c), a.datepicker._inDialog && (b.value = ""), a.datepicker._pos || (a.datepicker._pos = a.datepicker._findPos(b), a.datepicker._pos[1] += b.offsetHeight), g = !1, a(b).parents().each(function() {
return g |= "fixed" === a(this).css("position"), !g
}), i = {
left: a.datepicker._pos[0],
top: a.datepicker._pos[1]
}, a.datepicker._pos = null, c.dpDiv.empty(), c.dpDiv.css({
position: "absolute",
display: "block",
top: "-1000px"
}), a.datepicker._updateDatepicker(c), i = a.datepicker._checkOffset(c, i, g), c.dpDiv.css({
position: a.datepicker._inDialog && a.blockUI ? "static" : g ? "fixed" : "absolute",
display: "none",
left: i.left + "px",
top: i.top + "px"
}), c.inline || (j = a.datepicker._get(c, "showAnim"), k = a.datepicker._get(c, "duration"), c.dpDiv.css("z-index", d(a(b)) + 1), a.datepicker._datepickerShowing = !0, a.effects && a.effects.effect[j] ? c.dpDiv.show(j, a.datepicker._get(c, "showOptions"), k) : c.dpDiv[j || "show"](j ? k : null), a.datepicker._shouldFocusInput(c) && c.input.focus(), a.datepicker._curInst = c))
}
},
_updateDatepicker: function(b) {
this.maxRows = 4, r = b, b.dpDiv.empty().append(this._generateHTML(b)), this._attachHandlers(b);
var c, d = this._getNumberOfMonths(b),
e = d[1],
f = 17,
h = b.dpDiv.find("." + this._dayOverClass + " a");
h.length > 0 && g.apply(h.get(0)), b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), e > 1 && b.dpDiv.addClass("ui-datepicker-multi-" + e).css("width", f * e + "em"), b.dpDiv[(1 !== d[0] || 1 !== d[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), b.dpDiv[(this._get(b, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), b === a.datepicker._curInst && a.datepicker._datepickerShowing && a.datepicker._shouldFocusInput(b) && b.input.focus(), b.yearshtml && (c = b.yearshtml, setTimeout(function() {
c === b.yearshtml && b.yearshtml && b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml), c = b.yearshtml = null
}, 0))
},
_shouldFocusInput: function(a) {
return a.input && a.input.is(":visible") && !a.input.is(":disabled") && !a.input.is(":focus")
},
_checkOffset: function(b, c, d) {
var e = b.dpDiv.outerWidth(),
f = b.dpDiv.outerHeight(),
g = b.input ? b.input.outerWidth() : 0,
h = b.input ? b.input.outerHeight() : 0,
i = document.documentElement.clientWidth + (d ? 0 : a(document).scrollLeft()),
j = document.documentElement.clientHeight + (d ? 0 : a(document).scrollTop());
return c.left -= this._get(b, "isRTL") ? e - g : 0, c.left -= d && c.left === b.input.offset().left ? a(document).scrollLeft() : 0, c.top -= d && c.top === b.input.offset().top + h ? a(document).scrollTop() : 0, c.left -= Math.min(c.left, c.left + e > i && i > e ? Math.abs(c.left + e - i) : 0), c.top -= Math.min(c.top, c.top + f > j && j > f ? Math.abs(f + h) : 0), c
},
_findPos: function(b) {
for (var c, d = this._getInst(b), e = this._get(d, "isRTL"); b && ("hidden" === b.type || 1 !== b.nodeType || a.expr.filters.hidden(b));) b = b[e ? "previousSibling" : "nextSibling"];
return c = a(b).offset(), [c.left, c.top]
},
_hideDatepicker: function(b) {
var c, d, e, f, g = this._curInst;
!g || b && g !== a.data(b, "datepicker") || this._datepickerShowing && (c = this._get(g, "showAnim"), d = this._get(g, "duration"), e = function() {
a.datepicker._tidyDialog(g)
}, a.effects && (a.effects.effect[c] || a.effects[c]) ? g.dpDiv.hide(c, a.datepicker._get(g, "showOptions"), d, e) : g.dpDiv["slideDown" === c ? "slideUp" : "fadeIn" === c ? "fadeOut" : "hide"](c ? d : null, e), c || e(), this._datepickerShowing = !1, f = this._get(g, "onClose"), f && f.apply(g.input ? g.input[0] : null, [g.input ? g.input.val() : "", g]), this._lastInput = null, this._inDialog && (this._dialogInput.css({
position: "absolute",
left: "0",
top: "-100px"
}), a.blockUI && (a.unblockUI(), a("body").append(this.dpDiv))), this._inDialog = !1)
},
_tidyDialog: function(a) {
a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
},
_checkExternalClick: function(b) {
if (a.datepicker._curInst) {
var c = a(b.target),
d = a.datepicker._getInst(c[0]);
(c[0].id !== a.datepicker._mainDivId && 0 === c.parents("#" + a.datepicker._mainDivId).length && !c.hasClass(a.datepicker.markerClassName) && !c.closest("." + a.datepicker._triggerClass).length && a.datepicker._datepickerShowing && (!a.datepicker._inDialog || !a.blockUI) || c.hasClass(a.datepicker.markerClassName) && a.datepicker._curInst !== d) && a.datepicker._hideDatepicker()
}
},
_adjustDate: function(b, c, d) {
var e = a(b),
f = this._getInst(e[0]);
this._isDisabledDatepicker(e[0]) || (this._adjustInstDate(f, c + ("M" === d ? this._get(f, "showCurrentAtPos") : 0), d), this._updateDatepicker(f))
},
_gotoToday: function(b) {
var c, d = a(b),
e = this._getInst(d[0]);
this._get(e, "gotoCurrent") && e.currentDay ? (e.selectedDay = e.currentDay, e.drawMonth = e.selectedMonth = e.currentMonth, e.drawYear = e.selectedYear = e.currentYear) : (c = new Date, e.selectedDay = c.getDate(), e.drawMonth = e.selectedMonth = c.getMonth(), e.drawYear = e.selectedYear = c.getFullYear()), this._notifyChange(e), this._adjustDate(d)
},
_selectMonthYear: function(b, c, d) {
var e = a(b),
f = this._getInst(e[0]);
f["selected" + ("M" === d ? "Month" : "Year")] = f["draw" + ("M" === d ? "Month" : "Year")] = parseInt(c.options[c.selectedIndex].value, 10), this._notifyChange(f), this._adjustDate(e)
},
_selectDay: function(b, c, d, e) {
var f, g = a(b);
a(e).hasClass(this._unselectableClass) || this._isDisabledDatepicker(g[0]) || (f = this._getInst(g[0]), f.selectedDay = f.currentDay = a("a", e).html(), f.selectedMonth = f.currentMonth = c, f.selectedYear = f.currentYear = d, this._selectDate(b, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear)))
},
_clearDate: function(b) {
var c = a(b);
this._selectDate(c, "")
},
_selectDate: function(b, c) {
var d, e = a(b),
f = this._getInst(e[0]);
c = null != c ? c : this._formatDate(f), f.input && f.input.val(c), this._updateAlternate(f), d = this._get(f, "onSelect"), d ? d.apply(f.input ? f.input[0] : null, [c, f]) : f.input && f.input.trigger("change"), f.inline ? this._updateDatepicker(f) : (this._hideDatepicker(), this._lastInput = f.input[0], "object" != typeof f.input[0] && f.input.focus(), this._lastInput = null)
},
_updateAlternate: function(b) {
var c, d, e, f = this._get(b, "altField");
f && (c = this._get(b, "altFormat") || this._get(b, "dateFormat"), d = this._getDate(b), e = this.formatDate(c, d, this._getFormatConfig(b)), a(f).each(function() {
a(this).val(e)
}))
},
noWeekends: function(a) {
var b = a.getDay();
return [b > 0 && 6 > b, ""]
},
iso8601Week: function(a) {
var b, c = new Date(a.getTime());
return c.setDate(c.getDate() + 4 - (c.getDay() || 7)), b = c.getTime(), c.setMonth(0), c.setDate(1), Math.floor(Math.round((b - c) / 864e5) / 7) + 1
},
parseDate: function(b, c, d) {
if (null == b || null == c) throw "Invalid arguments";
if (c = "object" == typeof c ? c.toString() : c + "", "" === c) return null;
var e, f, g, h, i = 0,
j = (d ? d.shortYearCutoff : null) || this._defaults.shortYearCutoff,
k = "string" != typeof j ? j : (new Date).getFullYear() % 100 + parseInt(j, 10),
l = (d ? d.dayNamesShort : null) || this._defaults.dayNamesShort,
m = (d ? d.dayNames : null) || this._defaults.dayNames,
n = (d ? d.monthNamesShort : null) || this._defaults.monthNamesShort,
o = (d ? d.monthNames : null) || this._defaults.monthNames,
p = -1,
q = -1,
r = -1,
s = -1,
t = !1,
u = function(a) {
var c = e + 1 < b.length && b.charAt(e + 1) === a;
return c && e++, c
},
v = function(a) {
var b = u(a),
d = "@" === a ? 14 : "!" === a ? 20 : "y" === a && b ? 4 : "o" === a ? 3 : 2,
e = "y" === a ? d : 1,
f = new RegExp("^\\d{" + e + "," + d + "}"),
g = c.substring(i).match(f);
if (!g) throw "Missing number at position " + i;
return i += g[0].length, parseInt(g[0], 10)
},
w = function(b, d, e) {
var f = -1,
g = a.map(u(b) ? e : d, function(a, b) {
return [
[b, a]
]
}).sort(function(a, b) {
return -(a[1].length - b[1].length)
});
if (a.each(g, function(a, b) {
var d = b[1];
return c.substr(i, d.length).toLowerCase() === d.toLowerCase() ? (f = b[0], i += d.length, !1) : void 0
}), -1 !== f) return f + 1;
throw "Unknown name at position " + i
},
x = function() {
if (c.charAt(i) !== b.charAt(e)) throw "Unexpected literal at position " + i;
i++
};
for (e = 0; e < b.length; e++)
if (t) "'" !== b.charAt(e) || u("'") ? x() : t = !1;
else switch (b.charAt(e)) {
case "d":
r = v("d");
break;
case "D":
w("D", l, m);
break;
case "o":
s = v("o");
break;
case "m":
q = v("m");
break;
case "M":
q = w("M", n, o);
break;
case "y":
p = v("y");
break;
case "@":
h = new Date(v("@")), p = h.getFullYear(), q = h.getMonth() + 1, r = h.getDate();
break;
case "!":
h = new Date((v("!") - this._ticksTo1970) / 1e4), p = h.getFullYear(), q = h.getMonth() + 1, r = h.getDate();
break;
case "'":
u("'") ? x() : t = !0;
break;
default:
x()
}
if (i < c.length && (g = c.substr(i), !/^\s+/.test(g))) throw "Extra/unparsed characters found in date: " + g;
if (-1 === p ? p = (new Date).getFullYear() : 100 > p && (p += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (k >= p ? 0 : -100)), s > -1)
for (q = 1, r = s;;) {
if (f = this._getDaysInMonth(p, q - 1), f >= r) break;
q++, r -= f
}
if (h = this._daylightSavingAdjust(new Date(p, q - 1, r)), h.getFullYear() !== p || h.getMonth() + 1 !== q || h.getDate() !== r) throw "Invalid date";
return h
},
ATOM: "yy-mm-dd",
COOKIE: "D, dd M yy",
ISO_8601: "yy-mm-dd",
RFC_822: "D, d M y",
RFC_850: "DD, dd-M-y",
RFC_1036: "D, d M y",
RFC_1123: "D, d M yy",
RFC_2822: "D, d M yy",
RSS: "D, d M y",
TICKS: "!",
TIMESTAMP: "@",
W3C: "yy-mm-dd",
_ticksTo1970: 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 60 * 60 * 1e7,
formatDate: function(a, b, c) {
if (!b) return "";
var d, e = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort,
f = (c ? c.dayNames : null) || this._defaults.dayNames,
g = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort,
h = (c ? c.monthNames : null) || this._defaults.monthNames,
i = function(b) {
var c = d + 1 < a.length && a.charAt(d + 1) === b;
return c && d++, c
},
j = function(a, b, c) {
var d = "" + b;
if (i(a))
for (; d.length < c;) d = "0" + d;
return d
},
k = function(a, b, c, d) {
return i(a) ? d[b] : c[b]
},
l = "",
m = !1;
if (b)
for (d = 0; d < a.length; d++)
if (m) "'" !== a.charAt(d) || i("'") ? l += a.charAt(d) : m = !1;
else switch (a.charAt(d)) {
case "d":
l += j("d", b.getDate(), 2);
break;
case "D":
l += k("D", b.getDay(), e, f);
break;
case "o":
l += j("o", Math.round((new Date(b.getFullYear(), b.getMonth(), b.getDate()).getTime() - new Date(b.getFullYear(), 0, 0).getTime()) / 864e5), 3);
break;
case "m":
l += j("m", b.getMonth() + 1, 2);
break;
case "M":
l += k("M", b.getMonth(), g, h);
break;
case "y":
l += i("y") ? b.getFullYear() : (b.getYear() % 100 < 10 ? "0" : "") + b.getYear() % 100;
break;
case "@":
l += b.getTime();
break;
case "!":
l += 1e4 * b.getTime() + this._ticksTo1970;
break;
case "'":
i("'") ? l += "'" : m = !0;
break;
default:
l += a.charAt(d)
}
return l
},
_possibleChars: function(a) {
var b, c = "",
d = !1,
e = function(c) {
var d = b + 1 < a.length && a.charAt(b + 1) === c;
return d && b++, d
};
for (b = 0; b < a.length; b++)
if (d) "'" !== a.charAt(b) || e("'") ? c += a.charAt(b) : d = !1;
else switch (a.charAt(b)) {
case "d":
case "m":
case "y":
case "@":
c += "0123456789";
break;
case "D":
case "M":
return null;
case "'":
e("'") ? c += "'" : d = !0;
break;
default:
c += a.charAt(b)
}
return c
},
_get: function(a, b) {
return void 0 !== a.settings[b] ? a.settings[b] : this._defaults[b]
},
_setDateFromField: function(a, b) {
if (a.input.val() !== a.lastVal) {
var c = this._get(a, "dateFormat"),
d = a.lastVal = a.input ? a.input.val() : null,
e = this._getDefaultDate(a),
f = e,
g = this._getFormatConfig(a);
try {
f = this.parseDate(c, d, g) || e
} catch (h) {
d = b ? "" : d
}
a.selectedDay = f.getDate(), a.drawMonth = a.selectedMonth = f.getMonth(), a.drawYear = a.selectedYear = f.getFullYear(), a.currentDay = d ? f.getDate() : 0, a.currentMonth = d ? f.getMonth() : 0, a.currentYear = d ? f.getFullYear() : 0, this._adjustInstDate(a)
}
},
_getDefaultDate: function(a) {
return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date))
},
_determineDate: function(b, c, d) {
var e = function(a) {
var b = new Date;
return b.setDate(b.getDate() + a), b
},
f = function(c) {
try {
return a.datepicker.parseDate(a.datepicker._get(b, "dateFormat"), c, a.datepicker._getFormatConfig(b))
} catch (d) {}
for (var e = (c.toLowerCase().match(/^c/) ? a.datepicker._getDate(b) : null) || new Date, f = e.getFullYear(), g = e.getMonth(), h = e.getDate(), i = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, j = i.exec(c); j;) {
switch (j[2] || "d") {
case "d":
case "D":
h += parseInt(j[1], 10);
break;
case "w":
case "W":
h += 7 * parseInt(j[1], 10);
break;
case "m":
case "M":
g += parseInt(j[1], 10), h = Math.min(h, a.datepicker._getDaysInMonth(f, g));
break;
case "y":
case "Y":
f += parseInt(j[1], 10), h = Math.min(h, a.datepicker._getDaysInMonth(f, g))
}
j = i.exec(c)
}
return new Date(f, g, h)
},
g = null == c || "" === c ? d : "string" == typeof c ? f(c) : "number" == typeof c ? isNaN(c) ? d : e(c) : new Date(c.getTime());
return g = g && "Invalid Date" === g.toString() ? d : g, g && (g.setHours(0), g.setMinutes(0), g.setSeconds(0), g.setMilliseconds(0)), this._daylightSavingAdjust(g)
},
_daylightSavingAdjust: function(a) {
return a ? (a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0), a) : null
},
_setDate: function(a, b, c) {
var d = !b,
e = a.selectedMonth,
f = a.selectedYear,
g = this._restrictMinMax(a, this._determineDate(a, b, new Date));
a.selectedDay = a.currentDay = g.getDate(), a.drawMonth = a.selectedMonth = a.currentMonth = g.getMonth(), a.drawYear = a.selectedYear = a.currentYear = g.getFullYear(), e === a.selectedMonth && f === a.selectedYear || c || this._notifyChange(a), this._adjustInstDate(a), a.input && a.input.val(d ? "" : this._formatDate(a))
},
_getDate: function(a) {
var b = !a.currentYear || a.input && "" === a.input.val() ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay));
return b
},
_attachHandlers: function(b) {
var c = this._get(b, "stepMonths"),
d = "#" + b.id.replace(/\\\\/g, "\\");
b.dpDiv.find("[data-handler]").map(function() {
var b = {
prev: function() {
a.datepicker._adjustDate(d, -c, "M")
},
next: function() {
a.datepicker._adjustDate(d, +c, "M")
},
hide: function() {
a.datepicker._hideDatepicker()
},
today: function() {
a.datepicker._gotoToday(d)
},
selectDay: function() {
return a.datepicker._selectDay(d, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1
},
selectMonth: function() {
return a.datepicker._selectMonthYear(d, this, "M"), !1
},
selectYear: function() {
return a.datepicker._selectMonthYear(d, this, "Y"), !1
}
};
a(this).bind(this.getAttribute("data-event"), b[this.getAttribute("data-handler")])
})
},
_generateHTML: function(a) {
var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O = new Date,
P = this._daylightSavingAdjust(new Date(O.getFullYear(), O.getMonth(), O.getDate())),
Q = this._get(a, "isRTL"),
R = this._get(a, "showButtonPanel"),
S = this._get(a, "hideIfNoPrevNext"),
T = this._get(a, "navigationAsDateFormat"),
U = this._getNumberOfMonths(a),
V = this._get(a, "showCurrentAtPos"),
W = this._get(a, "stepMonths"),
X = 1 !== U[0] || 1 !== U[1],
Y = this._daylightSavingAdjust(a.currentDay ? new Date(a.currentYear, a.currentMonth, a.currentDay) : new Date(9999, 9, 9)),
Z = this._getMinMaxDate(a, "min"),
$ = this._getMinMaxDate(a, "max"),
_ = a.drawMonth - V,
aa = a.drawYear;
if (0 > _ && (_ += 12, aa--), $)
for (b = this._daylightSavingAdjust(new Date($.getFullYear(), $.getMonth() - U[0] * U[1] + 1, $.getDate())), b = Z && Z > b ? Z : b; this._daylightSavingAdjust(new Date(aa, _, 1)) > b;) _--, 0 > _ && (_ = 11, aa--);
for (a.drawMonth = _, a.drawYear = aa, c = this._get(a, "prevText"), c = T ? this.formatDate(c, this._daylightSavingAdjust(new Date(aa, _ - W, 1)), this._getFormatConfig(a)) : c, d = this._canAdjustMonth(a, -1, aa, _) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + c + "'><span class='ui-icon ui-icon-circle-triangle-" + (Q ? "e" : "w") + "'>" + c + "</span></a>" : S ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + c + "'><span class='ui-icon ui-icon-circle-triangle-" + (Q ? "e" : "w") + "'>" + c + "</span></a>", e = this._get(a, "nextText"), e = T ? this.formatDate(e, this._daylightSavingAdjust(new Date(aa, _ + W, 1)), this._getFormatConfig(a)) : e,
f = this._canAdjustMonth(a, 1, aa, _) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + e + "'><span class='ui-icon ui-icon-circle-triangle-" + (Q ? "w" : "e") + "'>" + e + "</span></a>" : S ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + e + "'><span class='ui-icon ui-icon-circle-triangle-" + (Q ? "w" : "e") + "'>" + e + "</span></a>", g = this._get(a, "currentText"), h = this._get(a, "gotoCurrent") && a.currentDay ? Y : P, g = T ? this.formatDate(g, h, this._getFormatConfig(a)) : g, i = a.inline ? "" : "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(a, "closeText") + "</button>", j = R ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (Q ? i : "") + (this._isInRange(a, h) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + g + "</button>" : "") + (Q ? "" : i) + "</div>" : "", k = parseInt(this._get(a, "firstDay"), 10), k = isNaN(k) ? 0 : k, l = this._get(a, "showWeek"), m = this._get(a, "dayNames"), n = this._get(a, "dayNamesMin"), o = this._get(a, "monthNames"), p = this._get(a, "monthNamesShort"), q = this._get(a, "beforeShowDay"), r = this._get(a, "showOtherMonths"), s = this._get(a, "selectOtherMonths"), t = this._getDefaultDate(a), u = "", w = 0; w < U[0]; w++) {
for (x = "", this.maxRows = 4, y = 0; y < U[1]; y++) {
if (z = this._daylightSavingAdjust(new Date(aa, _, a.selectedDay)), A = " ui-corner-all", B = "", X) {
if (B += "<div class='ui-datepicker-group", U[1] > 1) switch (y) {
case 0:
B += " ui-datepicker-group-first", A = " ui-corner-" + (Q ? "right" : "left");
break;
case U[1] - 1:
B += " ui-datepicker-group-last", A = " ui-corner-" + (Q ? "left" : "right");
break;
default:
B += " ui-datepicker-group-middle", A = ""
}
B += "'>"
}
for (B += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + A + "'>" + (/all|left/.test(A) && 0 === w ? Q ? f : d : "") + (/all|right/.test(A) && 0 === w ? Q ? d : f : "") + this._generateMonthYearHeader(a, _, aa, Z, $, w > 0 || y > 0, o, p) + "</div><table class='ui-datepicker-calendar'><thead><tr>", C = l ? "<th class='ui-datepicker-week-col'>" + this._get(a, "weekHeader") + "</th>" : "", v = 0; 7 > v; v++) D = (v + k) % 7, C += "<th scope='col'" + ((v + k + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + "><span title='" + m[D] + "'>" + n[D] + "</span></th>";
for (B += C + "</tr></thead><tbody>", E = this._getDaysInMonth(aa, _), aa === a.selectedYear && _ === a.selectedMonth && (a.selectedDay = Math.min(a.selectedDay, E)), F = (this._getFirstDayOfMonth(aa, _) - k + 7) % 7, G = Math.ceil((F + E) / 7), H = X && this.maxRows > G ? this.maxRows : G, this.maxRows = H, I = this._daylightSavingAdjust(new Date(aa, _, 1 - F)), J = 0; H > J; J++) {
for (B += "<tr>", K = l ? "<td class='ui-datepicker-week-col'>" + this._get(a, "calculateWeek")(I) + "</td>" : "", v = 0; 7 > v; v++) L = q ? q.apply(a.input ? a.input[0] : null, [I]) : [!0, ""], M = I.getMonth() !== _, N = M && !s || !L[0] || Z && Z > I || $ && I > $, K += "<td class='" + ((v + k + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (M ? " ui-datepicker-other-month" : "") + (I.getTime() === z.getTime() && _ === a.selectedMonth && a._keyEvent || t.getTime() === I.getTime() && t.getTime() === z.getTime() ? " " + this._dayOverClass : "") + (N ? " " + this._unselectableClass + " ui-state-disabled" : "") + (M && !r ? "" : " " + L[1] + (I.getTime() === Y.getTime() ? " " + this._currentClass : "") + (I.getTime() === P.getTime() ? " ui-datepicker-today" : "")) + "'" + (M && !r || !L[2] ? "" : " title='" + L[2].replace(/'/g, "'") + "'") + (N ? "" : " data-handler='selectDay' data-event='click' data-month='" + I.getMonth() + "' data-year='" + I.getFullYear() + "'") + ">" + (M && !r ? " " : N ? "<span class='ui-state-default'>" + I.getDate() + "</span>" : "<a class='ui-state-default" + (I.getTime() === P.getTime() ? " ui-state-highlight" : "") + (I.getTime() === Y.getTime() ? " ui-state-active" : "") + (M ? " ui-priority-secondary" : "") + "' href='#'>" + I.getDate() + "</a>") + "</td>", I.setDate(I.getDate() + 1), I = this._daylightSavingAdjust(I);
B += K + "</tr>"
}
_++, _ > 11 && (_ = 0, aa++), B += "</tbody></table>" + (X ? "</div>" + (U[0] > 0 && y === U[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : ""), x += B
}
u += x
}
return u += j, a._keyEvent = !1, u
},
_generateMonthYearHeader: function(a, b, c, d, e, f, g, h) {
var i, j, k, l, m, n, o, p, q = this._get(a, "changeMonth"),
r = this._get(a, "changeYear"),
s = this._get(a, "showMonthAfterYear"),
t = "<div class='ui-datepicker-title'>",
u = "";
if (f || !q) u += "<span class='ui-datepicker-month'>" + g[b] + "</span>";
else {
for (i = d && d.getFullYear() === c, j = e && e.getFullYear() === c, u += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", k = 0; 12 > k; k++)(!i || k >= d.getMonth()) && (!j || k <= e.getMonth()) && (u += "<option value='" + k + "'" + (k === b ? " selected='selected'" : "") + ">" + h[k] + "</option>");
u += "</select>"
}
if (s || (t += u + (!f && q && r ? "" : " ")), !a.yearshtml)
if (a.yearshtml = "", f || !r) t += "<span class='ui-datepicker-year'>" + c + "</span>";
else {
for (l = this._get(a, "yearRange").split(":"), m = (new Date).getFullYear(), n = function(a) {
var b = a.match(/c[+\-].*/) ? c + parseInt(a.substring(1), 10) : a.match(/[+\-].*/) ? m + parseInt(a, 10) : parseInt(a, 10);
return isNaN(b) ? m : b
}, o = n(l[0]), p = Math.max(o, n(l[1] || "")), o = d ? Math.max(o, d.getFullYear()) : o, p = e ? Math.min(p, e.getFullYear()) : p, a.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; p >= o; o++) a.yearshtml += "<option value='" + o + "'" + (o === c ? " selected='selected'" : "") + ">" + o + "</option>";
a.yearshtml += "</select>", t += a.yearshtml, a.yearshtml = null
}
return t += this._get(a, "yearSuffix"), s && (t += (!f && q && r ? "" : " ") + u), t += "</div>"
},
_adjustInstDate: function(a, b, c) {
var d = a.drawYear + ("Y" === c ? b : 0),
e = a.drawMonth + ("M" === c ? b : 0),
f = Math.min(a.selectedDay, this._getDaysInMonth(d, e)) + ("D" === c ? b : 0),
g = this._restrictMinMax(a, this._daylightSavingAdjust(new Date(d, e, f)));
a.selectedDay = g.getDate(), a.drawMonth = a.selectedMonth = g.getMonth(), a.drawYear = a.selectedYear = g.getFullYear(), ("M" === c || "Y" === c) && this._notifyChange(a)
},
_restrictMinMax: function(a, b) {
var c = this._getMinMaxDate(a, "min"),
d = this._getMinMaxDate(a, "max"),
e = c && c > b ? c : b;
return d && e > d ? d : e
},
_notifyChange: function(a) {
var b = this._get(a, "onChangeMonthYear");
b && b.apply(a.input ? a.input[0] : null, [a.selectedYear, a.selectedMonth + 1, a])
},
_getNumberOfMonths: function(a) {
var b = this._get(a, "numberOfMonths");
return null == b ? [1, 1] : "number" == typeof b ? [1, b] : b
},
_getMinMaxDate: function(a, b) {
return this._determineDate(a, this._get(a, b + "Date"), null)
},
_getDaysInMonth: function(a, b) {
return 32 - this._daylightSavingAdjust(new Date(a, b, 32)).getDate()
},
_getFirstDayOfMonth: function(a, b) {
return new Date(a, b, 1).getDay()
},
_canAdjustMonth: function(a, b, c, d) {
var e = this._getNumberOfMonths(a),
f = this._daylightSavingAdjust(new Date(c, d + (0 > b ? b : e[0] * e[1]), 1));
return 0 > b && f.setDate(this._getDaysInMonth(f.getFullYear(), f.getMonth())), this._isInRange(a, f)
},
_isInRange: function(a, b) {
var c, d, e = this._getMinMaxDate(a, "min"),
f = this._getMinMaxDate(a, "max"),
g = null,
h = null,
i = this._get(a, "yearRange");
return i && (c = i.split(":"), d = (new Date).getFullYear(), g = parseInt(c[0], 10), h = parseInt(c[1], 10), c[0].match(/[+\-].*/) && (g += d), c[1].match(/[+\-].*/) && (h += d)), (!e || b.getTime() >= e.getTime()) && (!f || b.getTime() <= f.getTime()) && (!g || b.getFullYear() >= g) && (!h || b.getFullYear() <= h)
},
_getFormatConfig: function(a) {
var b = this._get(a, "shortYearCutoff");
return b = "string" != typeof b ? b : (new Date).getFullYear() % 100 + parseInt(b, 10), {
shortYearCutoff: b,
dayNamesShort: this._get(a, "dayNamesShort"),
dayNames: this._get(a, "dayNames"),
monthNamesShort: this._get(a, "monthNamesShort"),
monthNames: this._get(a, "monthNames")
}
},
_formatDate: function(a, b, c, d) {
b || (a.currentDay = a.selectedDay, a.currentMonth = a.selectedMonth, a.currentYear = a.selectedYear);
var e = b ? "object" == typeof b ? b : this._daylightSavingAdjust(new Date(d, c, b)) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay));
return this.formatDate(this._get(a, "dateFormat"), e, this._getFormatConfig(a))
}
}), a.fn.datepicker = function(b) {
if (!this.length) return this;
a.datepicker.initialized || (a(document).mousedown(a.datepicker._checkExternalClick), a.datepicker.initialized = !0), 0 === a("#" + a.datepicker._mainDivId).length && a("body").append(a.datepicker.dpDiv);
var c = Array.prototype.slice.call(arguments, 1);
return "string" != typeof b || "isDisabled" !== b && "getDate" !== b && "widget" !== b ? "option" === b && 2 === arguments.length && "string" == typeof arguments[1] ? a.datepicker["_" + b + "Datepicker"].apply(a.datepicker, [this[0]].concat(c)) : this.each(function() {
"string" == typeof b ? a.datepicker["_" + b + "Datepicker"].apply(a.datepicker, [this].concat(c)) : a.datepicker._attachDatepicker(this, b)
}) : a.datepicker["_" + b + "Datepicker"].apply(a.datepicker, [this[0]].concat(c))
}, a.datepicker = new e, a.datepicker.initialized = !1, a.datepicker.uuid = (new Date).getTime(), a.datepicker.version = "1.11.4";
a.datepicker;
a.widget("ui.draggable", a.ui.mouse, {
version: "1.11.4",
widgetEventPrefix: "drag",
options: {
addClasses: !0,
appendTo: "parent",
axis: !1,
connectToSortable: !1,
containment: !1,
cursor: "auto",
cursorAt: !1,
grid: !1,
handle: !1,
helper: "original",
iframeFix: !1,
opacity: !1,
refreshPositions: !1,
revert: !1,
revertDuration: 500,
scope: "default",
scroll: !0,
scrollSensitivity: 20,
scrollSpeed: 20,
snap: !1,
snapMode: "both",
snapTolerance: 20,
stack: !1,
zIndex: !1,
drag: null,
start: null,
stop: null
},
_create: function() {
"original" === this.options.helper && this._setPositionRelative(), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._setHandleClassName(), this._mouseInit()
},
_setOption: function(a, b) {
this._super(a, b), "handle" === a && (this._removeHandleClassName(), this._setHandleClassName())
},
_destroy: function() {
return (this.helper || this.element).is(".ui-draggable-dragging") ? void(this.destroyOnClear = !0) : (this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._removeHandleClassName(), void this._mouseDestroy())
},
_mouseCapture: function(b) {
var c = this.options;
return this._blurActiveElement(b), this.helper || c.disabled || a(b.target).closest(".ui-resizable-handle").length > 0 ? !1 : (this.handle = this._getHandle(b), this.handle ? (this._blockFrames(c.iframeFix === !0 ? "iframe" : c.iframeFix), !0) : !1)
},
_blockFrames: function(b) {
this.iframeBlocks = this.document.find(b).map(function() {
var b = a(this);
return a("<div>").css("position", "absolute").appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset())[0]
})
},
_unblockFrames: function() {
this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)
},
_blurActiveElement: function(b) {
var c = this.document[0];
if (this.handleElement.is(b.target)) try {
c.activeElement && "body" !== c.activeElement.nodeName.toLowerCase() && a(c.activeElement).blur()
} catch (d) {}
},
_mouseStart: function(b) {
var c = this.options;
return this.helper = this._createHelper(b), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), a.ui.ddmanager && (a.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(!0), this.offsetParent = this.helper.offsetParent(), this.hasFixedAncestor = this.helper.parents().filter(function() {
return "fixed" === a(this).css("position")
}).length > 0, this.positionAbs = this.element.offset(), this._refreshOffsets(b), this.originalPosition = this.position = this._generatePosition(b, !1), this.originalPageX = b.pageX, this.originalPageY = b.pageY, c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt), this._setContainment(), this._trigger("start", b) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this._normalizeRightBottom(), this._mouseDrag(b, !0), a.ui.ddmanager && a.ui.ddmanager.dragStart(this, b), !0)
},
_refreshOffsets: function(a) {
this.offset = {
top: this.positionAbs.top - this.margins.top,
left: this.positionAbs.left - this.margins.left,
scroll: !1,
parent: this._getParentOffset(),
relative: this._getRelativeOffset()
}, this.offset.click = {
left: a.pageX - this.offset.left,
top: a.pageY - this.offset.top
}
},
_mouseDrag: function(b, c) {
if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(b, !0), this.positionAbs = this._convertPositionTo("absolute"), !c) {
var d = this._uiHash();
if (this._trigger("drag", b, d) === !1) return this._mouseUp({}), !1;
this.position = d.position
}
return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", a.ui.ddmanager && a.ui.ddmanager.drag(this, b), !1
},
_mouseStop: function(b) {
var c = this,
d = !1;
return a.ui.ddmanager && !this.options.dropBehaviour && (d = a.ui.ddmanager.drop(this, b)), this.dropped && (d = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !d || "valid" === this.options.revert && d || this.options.revert === !0 || a.isFunction(this.options.revert) && this.options.revert.call(this.element, d) ? a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
c._trigger("stop", b) !== !1 && c._clear()
}) : this._trigger("stop", b) !== !1 && this._clear(), !1
},
_mouseUp: function(b) {
return this._unblockFrames(), a.ui.ddmanager && a.ui.ddmanager.dragStop(this, b), this.handleElement.is(b.target) && this.element.focus(), a.ui.mouse.prototype._mouseUp.call(this, b)
},
cancel: function() {
return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(), this
},
_getHandle: function(b) {
return this.options.handle ? !!a(b.target).closest(this.element.find(this.options.handle)).length : !0
},
_setHandleClassName: function() {
this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element, this.handleElement.addClass("ui-draggable-handle")
},
_removeHandleClassName: function() {
this.handleElement.removeClass("ui-draggable-handle")
},
_createHelper: function(b) {
var c = this.options,
d = a.isFunction(c.helper),
e = d ? a(c.helper.apply(this.element[0], [b])) : "clone" === c.helper ? this.element.clone().removeAttr("id") : this.element;
return e.parents("body").length || e.appendTo("parent" === c.appendTo ? this.element[0].parentNode : c.appendTo), d && e[0] === this.element[0] && this._setPositionRelative(), e[0] === this.element[0] || /(fixed|absolute)/.test(e.css("position")) || e.css("position", "absolute"), e
},
_setPositionRelative: function() {
/^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative")
},
_adjustOffsetFromHelper: function(b) {
"string" == typeof b && (b = b.split(" ")), a.isArray(b) && (b = {
left: +b[0],
top: +b[1] || 0
}), "left" in b && (this.offset.click.left = b.left + this.margins.left), "right" in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), "top" in b && (this.offset.click.top = b.top + this.margins.top), "bottom" in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top)
},
_isRootNode: function(a) {
return /(html|body)/i.test(a.tagName) || a === this.document[0]
},
_getParentOffset: function() {
var b = this.offsetParent.offset(),
c = this.document[0];
return "absolute" === this.cssPosition && this.scrollParent[0] !== c && a.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()), this._isRootNode(this.offsetParent[0]) && (b = {
top: 0,
left: 0
}), {
top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
}
},
_getRelativeOffset: function() {
if ("relative" !== this.cssPosition) return {
top: 0,
left: 0
};
var a = this.element.position(),
b = this._isRootNode(this.scrollParent[0]);
return {
top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + (b ? 0 : this.scrollParent.scrollTop()),
left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + (b ? 0 : this.scrollParent.scrollLeft())
}
},
_cacheMargins: function() {
this.margins = {
left: parseInt(this.element.css("marginLeft"), 10) || 0,
top: parseInt(this.element.css("marginTop"), 10) || 0,
right: parseInt(this.element.css("marginRight"), 10) || 0,
bottom: parseInt(this.element.css("marginBottom"), 10) || 0
}
},
_cacheHelperProportions: function() {
this.helperProportions = {
width: this.helper.outerWidth(),
height: this.helper.outerHeight()
}
},
_setContainment: function() {
var b, c, d, e = this.options,
f = this.document[0];
return this.relativeContainer = null, e.containment ? "window" === e.containment ? void(this.containment = [a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, a(window).scrollLeft() + a(window).width() - this.helperProportions.width - this.margins.left, a(window).scrollTop() + (a(window).height() || f.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]) : "document" === e.containment ? void(this.containment = [0, 0, a(f).width() - this.helperProportions.width - this.margins.left, (a(f).height() || f.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]) : e.containment.constructor === Array ? void(this.containment = e.containment) : ("parent" === e.containment && (e.containment = this.helper[0].parentNode), c = a(e.containment), d = c[0], void(d && (b = /(scroll|auto)/.test(c.css("overflow")), this.containment = [(parseInt(c.css("borderLeftWidth"), 10) || 0) + (parseInt(c.css("paddingLeft"), 10) || 0), (parseInt(c.css("borderTopWidth"), 10) || 0) + (parseInt(c.css("paddingTop"), 10) || 0), (b ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(c.css("borderRightWidth"), 10) || 0) - (parseInt(c.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (b ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(c.css("borderBottomWidth"), 10) || 0) - (parseInt(c.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = c))) : void(this.containment = null)
},
_convertPositionTo: function(a, b) {
b || (b = this.position);
var c = "absolute" === a ? 1 : -1,
d = this._isRootNode(this.scrollParent[0]);
return {
top: b.top + this.offset.relative.top * c + this.offset.parent.top * c - ("fixed" === this.cssPosition ? -this.offset.scroll.top : d ? 0 : this.offset.scroll.top) * c,
left: b.left + this.offset.relative.left * c + this.offset.parent.left * c - ("fixed" === this.cssPosition ? -this.offset.scroll.left : d ? 0 : this.offset.scroll.left) * c
}
},
_generatePosition: function(a, b) {
var c, d, e, f, g = this.options,
h = this._isRootNode(this.scrollParent[0]),
i = a.pageX,
j = a.pageY;
return h && this.offset.scroll || (this.offset.scroll = {
top: this.scrollParent.scrollTop(),
left: this.scrollParent.scrollLeft()
}), b && (this.containment && (this.relativeContainer ? (d = this.relativeContainer.offset(), c = [this.containment[0] + d.left, this.containment[1] + d.top, this.containment[2] + d.left, this.containment[3] + d.top]) : c = this.containment, a.pageX - this.offset.click.left < c[0] && (i = c[0] + this.offset.click.left), a.pageY - this.offset.click.top < c[1] && (j = c[1] + this.offset.click.top), a.pageX - this.offset.click.left > c[2] && (i = c[2] + this.offset.click.left), a.pageY - this.offset.click.top > c[3] && (j = c[3] + this.offset.click.top)), g.grid && (e = g.grid[1] ? this.originalPageY + Math.round((j - this.originalPageY) / g.grid[1]) * g.grid[1] : this.originalPageY, j = c ? e - this.offset.click.top >= c[1] || e - this.offset.click.top > c[3] ? e : e - this.offset.click.top >= c[1] ? e - g.grid[1] : e + g.grid[1] : e, f = g.grid[0] ? this.originalPageX + Math.round((i - this.originalPageX) / g.grid[0]) * g.grid[0] : this.originalPageX, i = c ? f - this.offset.click.left >= c[0] || f - this.offset.click.left > c[2] ? f : f - this.offset.click.left >= c[0] ? f - g.grid[0] : f + g.grid[0] : f), "y" === g.axis && (i = this.originalPageX), "x" === g.axis && (j = this.originalPageY)), {
top: j - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.offset.scroll.top : h ? 0 : this.offset.scroll.top),
left: i - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.offset.scroll.left : h ? 0 : this.offset.scroll.left)
}
},
_clear: function() {
this.helper.removeClass("ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1, this.destroyOnClear && this.destroy()
},
_normalizeRightBottom: function() {
"y" !== this.options.axis && "auto" !== this.helper.css("right") && (this.helper.width(this.helper.width()), this.helper.css("right", "auto")), "x" !== this.options.axis && "auto" !== this.helper.css("bottom") && (this.helper.height(this.helper.height()), this.helper.css("bottom", "auto"))
},
_trigger: function(b, c, d) {
return d = d || this._uiHash(), a.ui.plugin.call(this, b, [c, d, this], !0), /^(drag|start|stop)/.test(b) && (this.positionAbs = this._convertPositionTo("absolute"), d.offset = this.positionAbs), a.Widget.prototype._trigger.call(this, b, c, d)
},
plugins: {},
_uiHash: function() {
return {
helper: this.helper,
position: this.position,
originalPosition: this.originalPosition,
offset: this.positionAbs
}
}
}), a.ui.plugin.add("draggable", "connectToSortable", {
start: function(b, c, d) {
var e = a.extend({}, c, {
item: d.element
});
d.sortables = [], a(d.options.connectToSortable).each(function() {
var c = a(this).sortable("instance");
c && !c.options.disabled && (d.sortables.push(c), c.refreshPositions(), c._trigger("activate", b, e))
})
},
stop: function(b, c, d) {
var e = a.extend({}, c, {
item: d.element
});
d.cancelHelperRemoval = !1, a.each(d.sortables, function() {
var a = this;
a.isOver ? (a.isOver = 0, d.cancelHelperRemoval = !0, a.cancelHelperRemoval = !1, a._storedCSS = {
position: a.placeholder.css("position"),
top: a.placeholder.css("top"),
left: a.placeholder.css("left")
}, a._mouseStop(b), a.options.helper = a.options._helper) : (a.cancelHelperRemoval = !0, a._trigger("deactivate", b, e))
})
},
drag: function(b, c, d) {
a.each(d.sortables, function() {
var e = !1,
f = this;
f.positionAbs = d.positionAbs, f.helperProportions = d.helperProportions, f.offset.click = d.offset.click, f._intersectsWith(f.containerCache) && (e = !0, a.each(d.sortables, function() {
return this.positionAbs = d.positionAbs, this.helperProportions = d.helperProportions, this.offset.click = d.offset.click, this !== f && this._intersectsWith(this.containerCache) && a.contains(f.element[0], this.element[0]) && (e = !1), e
})), e ? (f.isOver || (f.isOver = 1, d._parent = c.helper.parent(), f.currentItem = c.helper.appendTo(f.element).data("ui-sortable-item", !0), f.options._helper = f.options.helper, f.options.helper = function() {
return c.helper[0]
}, b.target = f.currentItem[0], f._mouseCapture(b, !0), f._mouseStart(b, !0, !0), f.offset.click.top = d.offset.click.top, f.offset.click.left = d.offset.click.left, f.offset.parent.left -= d.offset.parent.left - f.offset.parent.left, f.offset.parent.top -= d.offset.parent.top - f.offset.parent.top, d._trigger("toSortable", b), d.dropped = f.element, a.each(d.sortables, function() {
this.refreshPositions()
}), d.currentItem = d.element, f.fromOutside = d), f.currentItem && (f._mouseDrag(b), c.position = f.position)) : f.isOver && (f.isOver = 0, f.cancelHelperRemoval = !0, f.options._revert = f.options.revert, f.options.revert = !1, f._trigger("out", b, f._uiHash(f)), f._mouseStop(b, !0), f.options.revert = f.options._revert, f.options.helper = f.options._helper, f.placeholder && f.placeholder.remove(), c.helper.appendTo(d._parent), d._refreshOffsets(b), c.position = d._generatePosition(b, !0), d._trigger("fromSortable", b), d.dropped = !1, a.each(d.sortables, function() {
this.refreshPositions()
}))
})
}
}), a.ui.plugin.add("draggable", "cursor", {
start: function(b, c, d) {
var e = a("body"),
f = d.options;
e.css("cursor") && (f._cursor = e.css("cursor")), e.css("cursor", f.cursor)
},
stop: function(b, c, d) {
var e = d.options;
e._cursor && a("body").css("cursor", e._cursor)
}
}), a.ui.plugin.add("draggable", "opacity", {
start: function(b, c, d) {
var e = a(c.helper),
f = d.options;
e.css("opacity") && (f._opacity = e.css("opacity")), e.css("opacity", f.opacity)
},
stop: function(b, c, d) {
var e = d.options;
e._opacity && a(c.helper).css("opacity", e._opacity)
}
}), a.ui.plugin.add("draggable", "scroll", {
start: function(a, b, c) {
c.scrollParentNotHidden || (c.scrollParentNotHidden = c.helper.scrollParent(!1)), c.scrollParentNotHidden[0] !== c.document[0] && "HTML" !== c.scrollParentNotHidden[0].tagName && (c.overflowOffset = c.scrollParentNotHidden.offset())
},
drag: function(b, c, d) {
var e = d.options,
f = !1,
g = d.scrollParentNotHidden[0],
h = d.document[0];
g !== h && "HTML" !== g.tagName ? (e.axis && "x" === e.axis || (d.overflowOffset.top + g.offsetHeight - b.pageY < e.scrollSensitivity ? g.scrollTop = f = g.scrollTop + e.scrollSpeed : b.pageY - d.overflowOffset.top < e.scrollSensitivity && (g.scrollTop = f = g.scrollTop - e.scrollSpeed)), e.axis && "y" === e.axis || (d.overflowOffset.left + g.offsetWidth - b.pageX < e.scrollSensitivity ? g.scrollLeft = f = g.scrollLeft + e.scrollSpeed : b.pageX - d.overflowOffset.left < e.scrollSensitivity && (g.scrollLeft = f = g.scrollLeft - e.scrollSpeed))) : (e.axis && "x" === e.axis || (b.pageY - a(h).scrollTop() < e.scrollSensitivity ? f = a(h).scrollTop(a(h).scrollTop() - e.scrollSpeed) : a(window).height() - (b.pageY - a(h).scrollTop()) < e.scrollSensitivity && (f = a(h).scrollTop(a(h).scrollTop() + e.scrollSpeed))), e.axis && "y" === e.axis || (b.pageX - a(h).scrollLeft() < e.scrollSensitivity ? f = a(h).scrollLeft(a(h).scrollLeft() - e.scrollSpeed) : a(window).width() - (b.pageX - a(h).scrollLeft()) < e.scrollSensitivity && (f = a(h).scrollLeft(a(h).scrollLeft() + e.scrollSpeed)))), f !== !1 && a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, b)
}
}), a.ui.plugin.add("draggable", "snap", {
start: function(b, c, d) {
var e = d.options;
d.snapElements = [], a(e.snap.constructor !== String ? e.snap.items || ":data(ui-draggable)" : e.snap).each(function() {
var b = a(this),
c = b.offset();
this !== d.element[0] && d.snapElements.push({
item: this,
width: b.outerWidth(),
height: b.outerHeight(),
top: c.top,
left: c.left
})
})
},
drag: function(b, c, d) {
var e, f, g, h, i, j, k, l, m, n, o = d.options,
p = o.snapTolerance,
q = c.offset.left,
r = q + d.helperProportions.width,
s = c.offset.top,
t = s + d.helperProportions.height;
for (m = d.snapElements.length - 1; m >= 0; m--) i = d.snapElements[m].left - d.margins.left, j = i + d.snapElements[m].width, k = d.snapElements[m].top - d.margins.top, l = k + d.snapElements[m].height, i - p > r || q > j + p || k - p > t || s > l + p || !a.contains(d.snapElements[m].item.ownerDocument, d.snapElements[m].item) ? (d.snapElements[m].snapping && d.options.snap.release && d.options.snap.release.call(d.element, b, a.extend(d._uiHash(), {
snapItem: d.snapElements[m].item
})), d.snapElements[m].snapping = !1) : ("inner" !== o.snapMode && (e = Math.abs(k - t) <= p, f = Math.abs(l - s) <= p, g = Math.abs(i - r) <= p, h = Math.abs(j - q) <= p, e && (c.position.top = d._convertPositionTo("relative", {
top: k - d.helperProportions.height,
left: 0
}).top), f && (c.position.top = d._convertPositionTo("relative", {
top: l,
left: 0
}).top), g && (c.position.left = d._convertPositionTo("relative", {
top: 0,
left: i - d.helperProportions.width
}).left), h && (c.position.left = d._convertPositionTo("relative", {
top: 0,
left: j
}).left)), n = e || f || g || h, "outer" !== o.snapMode && (e = Math.abs(k - s) <= p, f = Math.abs(l - t) <= p, g = Math.abs(i - q) <= p, h = Math.abs(j - r) <= p, e && (c.position.top = d._convertPositionTo("relative", {
top: k,
left: 0
}).top), f && (c.position.top = d._convertPositionTo("relative", {
top: l - d.helperProportions.height,
left: 0
}).top), g && (c.position.left = d._convertPositionTo("relative", {
top: 0,
left: i
}).left), h && (c.position.left = d._convertPositionTo("relative", {
top: 0,
left: j - d.helperProportions.width
}).left)), !d.snapElements[m].snapping && (e || f || g || h || n) && d.options.snap.snap && d.options.snap.snap.call(d.element, b, a.extend(d._uiHash(), {
snapItem: d.snapElements[m].item
})), d.snapElements[m].snapping = e || f || g || h || n)
}
}), a.ui.plugin.add("draggable", "stack", {
start: function(b, c, d) {
var e, f = d.options,
g = a.makeArray(a(f.stack)).sort(function(b, c) {
return (parseInt(a(b).css("zIndex"), 10) || 0) - (parseInt(a(c).css("zIndex"), 10) || 0)
});
g.length && (e = parseInt(a(g[0]).css("zIndex"), 10) || 0, a(g).each(function(b) {
a(this).css("zIndex", e + b)
}), this.css("zIndex", e + g.length))
}
}), a.ui.plugin.add("draggable", "zIndex", {
start: function(b, c, d) {
var e = a(c.helper),
f = d.options;
e.css("zIndex") && (f._zIndex = e.css("zIndex")), e.css("zIndex", f.zIndex)
},
stop: function(b, c, d) {
var e = d.options;
e._zIndex && a(c.helper).css("zIndex", e._zIndex)
}
});
a.ui.draggable;
a.widget("ui.resizable", a.ui.mouse, {
version: "1.11.4",
widgetEventPrefix: "resize",
options: {
alsoResize: !1,
animate: !1,
animateDuration: "slow",
animateEasing: "swing",
aspectRatio: !1,
autoHide: !1,
containment: !1,
ghost: !1,
grid: !1,
handles: "e,s,se",
helper: !1,
maxHeight: null,
maxWidth: null,
minHeight: 10,
minWidth: 10,
zIndex: 90,
resize: null,
start: null,
stop: null
},
_num: function(a) {
return parseInt(a, 10) || 0
},
_isNumber: function(a) {
return !isNaN(parseInt(a, 10))
},
_hasScroll: function(b, c) {
if ("hidden" === a(b).css("overflow")) return !1;
var d = c && "left" === c ? "scrollLeft" : "scrollTop",
e = !1;
return b[d] > 0 ? !0 : (b[d] = 1, e = b[d] > 0, b[d] = 0, e)
},
_create: function() {
var b, c, d, e, f, g = this,
h = this.options;
if (this.element.addClass("ui-resizable"), a.extend(this, {
_aspectRatio: !!h.aspectRatio,
aspectRatio: h.aspectRatio,
originalElement: this.element,
_proportionallyResizeElements: [],
_helper: h.helper || h.ghost || h.animate ? h.helper || "ui-resizable-helper" : null
}), this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
position: this.element.css("position"),
width: this.element.outerWidth(),
height: this.element.outerHeight(),
top: this.element.css("top"),
left: this.element.css("left")
})), this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")), this.elementIsWrapper = !0, this.element.css({
marginLeft: this.originalElement.css("marginLeft"),
marginTop: this.originalElement.css("marginTop"),
marginRight: this.originalElement.css("marginRight"),
marginBottom: this.originalElement.css("marginBottom")
}), this.originalElement.css({
marginLeft: 0,
marginTop: 0,
marginRight: 0,
marginBottom: 0
}), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({
position: "static",
zoom: 1,
display: "block"
})), this.originalElement.css({
margin: this.originalElement.css("margin")
}), this._proportionallyResize()), this.handles = h.handles || (a(".ui-resizable-handle", this.element).length ? {
n: ".ui-resizable-n",
e: ".ui-resizable-e",
s: ".ui-resizable-s",
w: ".ui-resizable-w",
se: ".ui-resizable-se",
sw: ".ui-resizable-sw",
ne: ".ui-resizable-ne",
nw: ".ui-resizable-nw"
} : "e,s,se"), this._handles = a(), this.handles.constructor === String)
for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), b = this.handles.split(","), this.handles = {}, c = 0; c < b.length; c++) d = a.trim(b[c]), f = "ui-resizable-" + d, e = a("<div class='ui-resizable-handle " + f + "'></div>"), e.css({
zIndex: h.zIndex
}), "se" === d && e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[d] = ".ui-resizable-" + d, this.element.append(e);
this._renderAxis = function(b) {
var c, d, e, f;
b = b || this.element;
for (c in this.handles) this.handles[c].constructor === String ? this.handles[c] = this.element.children(this.handles[c]).first().show() : (this.handles[c].jquery || this.handles[c].nodeType) && (this.handles[c] = a(this.handles[c]), this._on(this.handles[c], {
mousedown: g._mouseDown
})), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (d = a(this.handles[c], this.element), f = /sw|ne|nw|se|n|s/.test(c) ? d.outerHeight() : d.outerWidth(), e = ["padding", /ne|nw|n/.test(c) ? "Top" : /se|sw|s/.test(c) ? "Bottom" : /^e$/.test(c) ? "Right" : "Left"].join(""), b.css(e, f), this._proportionallyResize()), this._handles = this._handles.add(this.handles[c])
}, this._renderAxis(this.element), this._handles = this._handles.add(this.element.find(".ui-resizable-handle")), this._handles.disableSelection(), this._handles.mouseover(function() {
g.resizing || (this.className && (e = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), g.axis = e && e[1] ? e[1] : "se")
}), h.autoHide && (this._handles.hide(), a(this.element).addClass("ui-resizable-autohide").mouseenter(function() {
h.disabled || (a(this).removeClass("ui-resizable-autohide"), g._handles.show())
}).mouseleave(function() {
h.disabled || g.resizing || (a(this).addClass("ui-resizable-autohide"), g._handles.hide())
})), this._mouseInit()
},
_destroy: function() {
this._mouseDestroy();
var b, c = function(b) {
a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
};
return this.elementIsWrapper && (c(this.element), b = this.element, this.originalElement.css({
position: b.css("position"),
width: b.outerWidth(),
height: b.outerHeight(),
top: b.css("top"),
left: b.css("left")
}).insertAfter(b), b.remove()), this.originalElement.css("resize", this.originalResizeStyle), c(this.originalElement), this
},
_mouseCapture: function(b) {
var c, d, e = !1;
for (c in this.handles) d = a(this.handles[c])[0], (d === b.target || a.contains(d, b.target)) && (e = !0);
return !this.options.disabled && e
},
_mouseStart: function(b) {
var c, d, e, f = this.options,
g = this.element;
return this.resizing = !0, this._renderProxy(), c = this._num(this.helper.css("left")), d = this._num(this.helper.css("top")), f.containment && (c += a(f.containment).scrollLeft() || 0, d += a(f.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {
left: c,
top: d
}, this.size = this._helper ? {
width: this.helper.width(),
height: this.helper.height()
} : {
width: g.width(),
height: g.height()
}, this.originalSize = this._helper ? {
width: g.outerWidth(),
height: g.outerHeight()
} : {
width: g.width(),
height: g.height()
}, this.sizeDiff = {
width: g.outerWidth() - g.width(),
height: g.outerHeight() - g.height()
}, this.originalPosition = {
left: c,
top: d
}, this.originalMousePosition = {
left: b.pageX,
top: b.pageY
}, this.aspectRatio = "number" == typeof f.aspectRatio ? f.aspectRatio : this.originalSize.width / this.originalSize.height || 1, e = a(".ui-resizable-" + this.axis).css("cursor"), a("body").css("cursor", "auto" === e ? this.axis + "-resize" : e), g.addClass("ui-resizable-resizing"), this._propagate("start", b), !0
},
_mouseDrag: function(b) {
var c, d, e = this.originalMousePosition,
f = this.axis,
g = b.pageX - e.left || 0,
h = b.pageY - e.top || 0,
i = this._change[f];
return this._updatePrevProperties(), i ? (c = i.apply(this, [b, g, h]), this._updateVirtualBoundaries(b.shiftKey), (this._aspectRatio || b.shiftKey) && (c = this._updateRatio(c, b)), c = this._respectSize(c, b), this._updateCache(c), this._propagate("resize", b), d = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), a.isEmptyObject(d) || (this._updatePrevProperties(), this._trigger("resize", b, this.ui()), this._applyChanges()), !1) : !1
},
_mouseStop: function(b) {
this.resizing = !1;
var c, d, e, f, g, h, i, j = this.options,
k = this;
return this._helper && (c = this._proportionallyResizeElements, d = c.length && /textarea/i.test(c[0].nodeName), e = d && this._hasScroll(c[0], "left") ? 0 : k.sizeDiff.height, f = d ? 0 : k.sizeDiff.width, g = {
width: k.helper.width() - f,
height: k.helper.height() - e
}, h = parseInt(k.element.css("left"), 10) + (k.position.left - k.originalPosition.left) || null, i = parseInt(k.element.css("top"), 10) + (k.position.top - k.originalPosition.top) || null, j.animate || this.element.css(a.extend(g, {
top: i,
left: h
})), k.helper.height(k.size.height), k.helper.width(k.size.width), this._helper && !j.animate && this._proportionallyResize()), a("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", b), this._helper && this.helper.remove(), !1
},
_updatePrevProperties: function() {
this.prevPosition = {
top: this.position.top,
left: this.position.left
}, this.prevSize = {
width: this.size.width,
height: this.size.height
}
},
_applyChanges: function() {
var a = {};
return this.position.top !== this.prevPosition.top && (a.top = this.position.top + "px"), this.position.left !== this.prevPosition.left && (a.left = this.position.left + "px"), this.size.width !== this.prevSize.width && (a.width = this.size.width + "px"), this.size.height !== this.prevSize.height && (a.height = this.size.height + "px"), this.helper.css(a), a
},
_updateVirtualBoundaries: function(a) {
var b, c, d, e, f, g = this.options;
f = {
minWidth: this._isNumber(g.minWidth) ? g.minWidth : 0,
maxWidth: this._isNumber(g.maxWidth) ? g.maxWidth : 1 / 0,
minHeight: this._isNumber(g.minHeight) ? g.minHeight : 0,
maxHeight: this._isNumber(g.maxHeight) ? g.maxHeight : 1 / 0
}, (this._aspectRatio || a) && (b = f.minHeight * this.aspectRatio, d = f.minWidth / this.aspectRatio, c = f.maxHeight * this.aspectRatio, e = f.maxWidth / this.aspectRatio, b > f.minWidth && (f.minWidth = b), d > f.minHeight && (f.minHeight = d), c < f.maxWidth && (f.maxWidth = c), e < f.maxHeight && (f.maxHeight = e)), this._vBoundaries = f
},
_updateCache: function(a) {
this.offset = this.helper.offset(), this._isNumber(a.left) && (this.position.left = a.left), this._isNumber(a.top) && (this.position.top = a.top), this._isNumber(a.height) && (this.size.height = a.height), this._isNumber(a.width) && (this.size.width = a.width)
},
_updateRatio: function(a) {
var b = this.position,
c = this.size,
d = this.axis;
return this._isNumber(a.height) ? a.width = a.height * this.aspectRatio : this._isNumber(a.width) && (a.height = a.width / this.aspectRatio), "sw" === d && (a.left = b.left + (c.width - a.width), a.top = null), "nw" === d && (a.top = b.top + (c.height - a.height), a.left = b.left + (c.width - a.width)), a
},
_respectSize: function(a) {
var b = this._vBoundaries,
c = this.axis,
d = this._isNumber(a.width) && b.maxWidth && b.maxWidth < a.width,
e = this._isNumber(a.height) && b.maxHeight && b.maxHeight < a.height,
f = this._isNumber(a.width) && b.minWidth && b.minWidth > a.width,
g = this._isNumber(a.height) && b.minHeight && b.minHeight > a.height,
h = this.originalPosition.left + this.originalSize.width,
i = this.position.top + this.size.height,
j = /sw|nw|w/.test(c),
k = /nw|ne|n/.test(c);
return f && (a.width = b.minWidth), g && (a.height = b.minHeight), d && (a.width = b.maxWidth), e && (a.height = b.maxHeight), f && j && (a.left = h - b.minWidth), d && j && (a.left = h - b.maxWidth), g && k && (a.top = i - b.minHeight), e && k && (a.top = i - b.maxHeight), a.width || a.height || a.left || !a.top ? a.width || a.height || a.top || !a.left || (a.left = null) : a.top = null, a
},
_getPaddingPlusBorderDimensions: function(a) {
for (var b = 0, c = [], d = [a.css("borderTopWidth"), a.css("borderRightWidth"), a.css("borderBottomWidth"), a.css("borderLeftWidth")], e = [a.css("paddingTop"), a.css("paddingRight"), a.css("paddingBottom"), a.css("paddingLeft")]; 4 > b; b++) c[b] = parseInt(d[b], 10) || 0, c[b] += parseInt(e[b], 10) || 0;
return {
height: c[0] + c[2],
width: c[1] + c[3]
}
},
_proportionallyResize: function() {
if (this._proportionallyResizeElements.length)
for (var a, b = 0, c = this.helper || this.element; b < this._proportionallyResizeElements.length; b++) a = this._proportionallyResizeElements[b], this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(a)), a.css({
height: c.height() - this.outerDimensions.height || 0,
width: c.width() - this.outerDimensions.width || 0
})
},
_renderProxy: function() {
var b = this.element,
c = this.options;
this.elementOffset = b.offset(), this._helper ? (this.helper = this.helper || a("<div style='overflow:hidden;'></div>"), this.helper.addClass(this._helper).css({
width: this.element.outerWidth() - 1,
height: this.element.outerHeight() - 1,
position: "absolute",
left: this.elementOffset.left + "px",
top: this.elementOffset.top + "px",
zIndex: ++c.zIndex
}), this.helper.appendTo("body").disableSelection()) : this.helper = this.element
},
_change: {
e: function(a, b) {
return {
width: this.originalSize.width + b
}
},
w: function(a, b) {
var c = this.originalSize,
d = this.originalPosition;
return {
left: d.left + b,
width: c.width - b
}
},
n: function(a, b, c) {
var d = this.originalSize,
e = this.originalPosition;
return {
top: e.top + c,
height: d.height - c
}
},
s: function(a, b, c) {
return {
height: this.originalSize.height + c
}
},
se: function(b, c, d) {
return a.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [b, c, d]))
},
sw: function(b, c, d) {
return a.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [b, c, d]))
},
ne: function(b, c, d) {
return a.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [b, c, d]))
},
nw: function(b, c, d) {
return a.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [b, c, d]))
}
},
_propagate: function(b, c) {
a.ui.plugin.call(this, b, [c, this.ui()]), "resize" !== b && this._trigger(b, c, this.ui())
},
plugins: {},
ui: function() {
return {
originalElement: this.originalElement,
element: this.element,
helper: this.helper,
position: this.position,
size: this.size,
originalSize: this.originalSize,
originalPosition: this.originalPosition
}
}
}), a.ui.plugin.add("resizable", "animate", {
stop: function(b) {
var c = a(this).resizable("instance"),
d = c.options,
e = c._proportionallyResizeElements,
f = e.length && /textarea/i.test(e[0].nodeName),
g = f && c._hasScroll(e[0], "left") ? 0 : c.sizeDiff.height,
h = f ? 0 : c.sizeDiff.width,
i = {
width: c.size.width - h,
height: c.size.height - g
},
j = parseInt(c.element.css("left"), 10) + (c.position.left - c.originalPosition.left) || null,
k = parseInt(c.element.css("top"), 10) + (c.position.top - c.originalPosition.top) || null;
c.element.animate(a.extend(i, k && j ? {
top: k,
left: j
} : {}), {
duration: d.animateDuration,
easing: d.animateEasing,
step: function() {
var d = {
width: parseInt(c.element.css("width"), 10),
height: parseInt(c.element.css("height"), 10),
top: parseInt(c.element.css("top"), 10),
left: parseInt(c.element.css("left"), 10)
};
e && e.length && a(e[0]).css({
width: d.width,
height: d.height
}), c._updateCache(d), c._propagate("resize", b)
}
})
}
}), a.ui.plugin.add("resizable", "containment", {
start: function() {
var b, c, d, e, f, g, h, i = a(this).resizable("instance"),
j = i.options,
k = i.element,
l = j.containment,
m = l instanceof a ? l.get(0) : /parent/.test(l) ? k.parent().get(0) : l;
m && (i.containerElement = a(m), /document/.test(l) || l === document ? (i.containerOffset = {
left: 0,
top: 0
}, i.containerPosition = {
left: 0,
top: 0
}, i.parentData = {
element: a(document),
left: 0,
top: 0,
width: a(document).width(),
height: a(document).height() || document.body.parentNode.scrollHeight
}) : (b = a(m), c = [], a(["Top", "Right", "Left", "Bottom"]).each(function(a, d) {
c[a] = i._num(b.css("padding" + d))
}), i.containerOffset = b.offset(), i.containerPosition = b.position(), i.containerSize = {
height: b.innerHeight() - c[3],
width: b.innerWidth() - c[1]
}, d = i.containerOffset, e = i.containerSize.height, f = i.containerSize.width, g = i._hasScroll(m, "left") ? m.scrollWidth : f, h = i._hasScroll(m) ? m.scrollHeight : e, i.parentData = {
element: m,
left: d.left,
top: d.top,
width: g,
height: h
}))
},
resize: function(b) {
var c, d, e, f, g = a(this).resizable("instance"),
h = g.options,
i = g.containerOffset,
j = g.position,
k = g._aspectRatio || b.shiftKey,
l = {
top: 0,
left: 0
},
m = g.containerElement,
n = !0;
m[0] !== document && /static/.test(m.css("position")) && (l = i), j.left < (g._helper ? i.left : 0) && (g.size.width = g.size.width + (g._helper ? g.position.left - i.left : g.position.left - l.left), k && (g.size.height = g.size.width / g.aspectRatio, n = !1), g.position.left = h.helper ? i.left : 0), j.top < (g._helper ? i.top : 0) && (g.size.height = g.size.height + (g._helper ? g.position.top - i.top : g.position.top), k && (g.size.width = g.size.height * g.aspectRatio, n = !1), g.position.top = g._helper ? i.top : 0), e = g.containerElement.get(0) === g.element.parent().get(0), f = /relative|absolute/.test(g.containerElement.css("position")), e && f ? (g.offset.left = g.parentData.left + g.position.left, g.offset.top = g.parentData.top + g.position.top) : (g.offset.left = g.element.offset().left, g.offset.top = g.element.offset().top), c = Math.abs(g.sizeDiff.width + (g._helper ? g.offset.left - l.left : g.offset.left - i.left)), d = Math.abs(g.sizeDiff.height + (g._helper ? g.offset.top - l.top : g.offset.top - i.top)), c + g.size.width >= g.parentData.width && (g.size.width = g.parentData.width - c, k && (g.size.height = g.size.width / g.aspectRatio, n = !1)), d + g.size.height >= g.parentData.height && (g.size.height = g.parentData.height - d, k && (g.size.width = g.size.height * g.aspectRatio, n = !1)), n || (g.position.left = g.prevPosition.left, g.position.top = g.prevPosition.top, g.size.width = g.prevSize.width, g.size.height = g.prevSize.height)
},
stop: function() {
var b = a(this).resizable("instance"),
c = b.options,
d = b.containerOffset,
e = b.containerPosition,
f = b.containerElement,
g = a(b.helper),
h = g.offset(),
i = g.outerWidth() - b.sizeDiff.width,
j = g.outerHeight() - b.sizeDiff.height;
b._helper && !c.animate && /relative/.test(f.css("position")) && a(this).css({
left: h.left - e.left - d.left,
width: i,
height: j
}), b._helper && !c.animate && /static/.test(f.css("position")) && a(this).css({
left: h.left - e.left - d.left,
width: i,
height: j
})
}
}), a.ui.plugin.add("resizable", "alsoResize", {
start: function() {
var b = a(this).resizable("instance"),
c = b.options;
a(c.alsoResize).each(function() {
var b = a(this);
b.data("ui-resizable-alsoresize", {
width: parseInt(b.width(), 10),
height: parseInt(b.height(), 10),
left: parseInt(b.css("left"), 10),
top: parseInt(b.css("top"), 10)
})
})
},
resize: function(b, c) {
var d = a(this).resizable("instance"),
e = d.options,
f = d.originalSize,
g = d.originalPosition,
h = {
height: d.size.height - f.height || 0,
width: d.size.width - f.width || 0,
top: d.position.top - g.top || 0,
left: d.position.left - g.left || 0
};
a(e.alsoResize).each(function() {
var b = a(this),
d = a(this).data("ui-resizable-alsoresize"),
e = {},
f = b.parents(c.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
a.each(f, function(a, b) {
var c = (d[b] || 0) + (h[b] || 0);
c && c >= 0 && (e[b] = c || null)
}), b.css(e)
})
},
stop: function() {
a(this).removeData("resizable-alsoresize")
}
}), a.ui.plugin.add("resizable", "ghost", {
start: function() {
var b = a(this).resizable("instance"),
c = b.options,
d = b.size;
b.ghost = b.originalElement.clone(), b.ghost.css({
opacity: .25,
display: "block",
position: "relative",
height: d.height,
width: d.width,
margin: 0,
left: 0,
top: 0
}).addClass("ui-resizable-ghost").addClass("string" == typeof c.ghost ? c.ghost : ""), b.ghost.appendTo(b.helper)
},
resize: function() {
var b = a(this).resizable("instance");
b.ghost && b.ghost.css({
position: "relative",
height: b.size.height,
width: b.size.width
})
},
stop: function() {
var b = a(this).resizable("instance");
b.ghost && b.helper && b.helper.get(0).removeChild(b.ghost.get(0))
}
}), a.ui.plugin.add("resizable", "grid", {
resize: function() {
var b, c = a(this).resizable("instance"),
d = c.options,
e = c.size,
f = c.originalSize,
g = c.originalPosition,
h = c.axis,
i = "number" == typeof d.grid ? [d.grid, d.grid] : d.grid,
j = i[0] || 1,
k = i[1] || 1,
l = Math.round((e.width - f.width) / j) * j,
m = Math.round((e.height - f.height) / k) * k,
n = f.width + l,
o = f.height + m,
p = d.maxWidth && d.maxWidth < n,
q = d.maxHeight && d.maxHeight < o,
r = d.minWidth && d.minWidth > n,
s = d.minHeight && d.minHeight > o;
d.grid = i, r && (n += j), s && (o += k), p && (n -= j), q && (o -= k), /^(se|s|e)$/.test(h) ? (c.size.width = n, c.size.height = o) : /^(ne)$/.test(h) ? (c.size.width = n, c.size.height = o, c.position.top = g.top - m) : /^(sw)$/.test(h) ? (c.size.width = n, c.size.height = o, c.position.left = g.left - l) : ((0 >= o - k || 0 >= n - j) && (b = c._getPaddingPlusBorderDimensions(this)), o - k > 0 ? (c.size.height = o, c.position.top = g.top - m) : (o = k - b.height, c.size.height = o, c.position.top = g.top + f.height - o), n - j > 0 ? (c.size.width = n, c.position.left = g.left - l) : (n = j - b.width, c.size.width = n, c.position.left = g.left + f.width - n))
}
});
a.ui.resizable, a.widget("ui.dialog", {
version: "1.11.4",
options: {
appendTo: "body",
autoOpen: !0,
buttons: [],
closeOnEscape: !0,
closeText: "Close",
dialogClass: "",
draggable: !0,
hide: null,
height: "auto",
maxHeight: null,
maxWidth: null,
minHeight: 150,
minWidth: 150,
modal: !1,
position: {
my: "center",
at: "center",
of: window,
collision: "fit",
using: function(b) {
var c = a(this).css(b).offset().top;
0 > c && a(this).css("top", b.top - c)
}
},
resizable: !0,
show: null,
title: null,
width: 300,
beforeClose: null,
close: null,
drag: null,
dragStart: null,
dragStop: null,
focus: null,
open: null,
resize: null,
resizeStart: null,
resizeStop: null
},
sizeRelatedOptions: {
buttons: !0,
height: !0,
maxHeight: !0,
maxWidth: !0,
minHeight: !0,
minWidth: !0,
width: !0
},
resizableRelatedOptions: {
maxHeight: !0,
maxWidth: !0,
minHeight: !0,
minWidth: !0
},
_create: function() {
this.originalCss = {
display: this.element[0].style.display,
width: this.element[0].style.width,
minHeight: this.element[0].style.minHeight,
maxHeight: this.element[0].style.maxHeight,
height: this.element[0].style.height
}, this.originalPosition = {
parent: this.element.parent(),
index: this.element.parent().children().index(this.element)
}, this.originalTitle = this.element.attr("title"), this.options.title = this.options.title || this.originalTitle, this._createWrapper(), this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog), this._createTitlebar(), this._createButtonPane(), this.options.draggable && a.fn.draggable && this._makeDraggable(), this.options.resizable && a.fn.resizable && this._makeResizable(), this._isOpen = !1, this._trackFocus()
},
_init: function() {
this.options.autoOpen && this.open()
},
_appendTo: function() {
var b = this.options.appendTo;
return b && (b.jquery || b.nodeType) ? a(b) : this.document.find(b || "body").eq(0)
},
_destroy: function() {
var a, b = this.originalPosition;
this._untrackInstance(), this._destroyOverlay(), this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(), this.uiDialog.stop(!0, !0).remove(), this.originalTitle && this.element.attr("title", this.originalTitle), a = b.parent.children().eq(b.index), a.length && a[0] !== this.element[0] ? a.before(this.element) : b.parent.append(this.element)
},
widget: function() {
return this.uiDialog
},
disable: a.noop,
enable: a.noop,
close: function(b) {
var c, d = this;
if (this._isOpen && this._trigger("beforeClose", b) !== !1) {
if (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), !this.opener.filter(":focusable").focus().length) try {
c = this.document[0].activeElement, c && "body" !== c.nodeName.toLowerCase() && a(c).blur()
} catch (e) {}
this._hide(this.uiDialog, this.options.hide, function() {
d._trigger("close", b)
})
}
},
isOpen: function() {
return this._isOpen
},
moveToTop: function() {
this._moveToTop()
},
_moveToTop: function(b, c) {
var d = !1,
e = this.uiDialog.siblings(".ui-front:visible").map(function() {
return +a(this).css("z-index")
}).get(),
f = Math.max.apply(null, e);
return f >= +this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", f + 1), d = !0), d && !c && this._trigger("focus", b), d
},
open: function() {
var b = this;
return this._isOpen ? void(this._moveToTop() && this._focusTabbable()) : (this._isOpen = !0, this.opener = a(this.document[0].activeElement), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, !0), this.overlay && this.overlay.css("z-index", this.uiDialog.css("z-index") - 1), this._show(this.uiDialog, this.options.show, function() {
b._focusTabbable(), b._trigger("focus")
}), this._makeFocusTarget(), void this._trigger("open"))
},
_focusTabbable: function() {
var a = this._focusedElement;
a || (a = this.element.find("[autofocus]")), a.length || (a = this.element.find(":tabbable")), a.length || (a = this.uiDialogButtonPane.find(":tabbable")), a.length || (a = this.uiDialogTitlebarClose.filter(":tabbable")), a.length || (a = this.uiDialog), a.eq(0).focus()
},
_keepFocus: function(b) {
function c() {
var b = this.document[0].activeElement,
c = this.uiDialog[0] === b || a.contains(this.uiDialog[0], b);
c || this._focusTabbable()
}
b.preventDefault(), c.call(this), this._delay(c)
},
_createWrapper: function() {
this.uiDialog = a("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + this.options.dialogClass).hide().attr({
tabIndex: -1,
role: "dialog"
}).appendTo(this._appendTo()), this._on(this.uiDialog, {
keydown: function(b) {
if (this.options.closeOnEscape && !b.isDefaultPrevented() && b.keyCode && b.keyCode === a.ui.keyCode.ESCAPE) return b.preventDefault(), void this.close(b);
if (b.keyCode === a.ui.keyCode.TAB && !b.isDefaultPrevented()) {
var c = this.uiDialog.find(":tabbable"),
d = c.filter(":first"),
e = c.filter(":last");
b.target !== e[0] && b.target !== this.uiDialog[0] || b.shiftKey ? b.target !== d[0] && b.target !== this.uiDialog[0] || !b.shiftKey || (this._delay(function() {
e.focus()
}), b.preventDefault()) : (this._delay(function() {
d.focus()
}), b.preventDefault())
}
},
mousedown: function(a) {
this._moveToTop(a) && this._focusTabbable()
}
}), this.element.find("[aria-describedby]").length || this.uiDialog.attr({
"aria-describedby": this.element.uniqueId().attr("id")
})
},
_createTitlebar: function() {
var b;
this.uiDialogTitlebar = a("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog), this._on(this.uiDialogTitlebar, {
mousedown: function(b) {
a(b.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.focus()
}
}), this.uiDialogTitlebarClose = a("<button type='button'></button>").button({
label: this.options.closeText,
icons: {
primary: "ui-icon-closethick"
},
text: !1
}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar), this._on(this.uiDialogTitlebarClose, {
click: function(a) {
a.preventDefault(), this.close(a)
}
}), b = a("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar), this._title(b), this.uiDialog.attr({
"aria-labelledby": b.attr("id")
})
},
_title: function(a) {
this.options.title || a.html(" "), a.text(this.options.title)
},
_createButtonPane: function() {
this.uiDialogButtonPane = a("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), this.uiButtonSet = a("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane), this._createButtons()
},
_createButtons: function() {
var b = this,
c = this.options.buttons;
return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), a.isEmptyObject(c) || a.isArray(c) && !c.length ? void this.uiDialog.removeClass("ui-dialog-buttons") : (a.each(c, function(c, d) {
var e, f;
d = a.isFunction(d) ? {
click: d,
text: c
} : d, d = a.extend({
type: "button"
}, d), e = d.click, d.click = function() {
e.apply(b.element[0], arguments)
}, f = {
icons: d.icons,
text: d.showText
}, delete d.icons, delete d.showText, a("<button></button>", d).button(f).appendTo(b.uiButtonSet)
}), this.uiDialog.addClass("ui-dialog-buttons"), void this.uiDialogButtonPane.appendTo(this.uiDialog))
},
_makeDraggable: function() {
function b(a) {
return {
position: a.position,
offset: a.offset
}
}
var c = this,
d = this.options;
this.uiDialog.draggable({
cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
handle: ".ui-dialog-titlebar",
containment: "document",
start: function(d, e) {
a(this).addClass("ui-dialog-dragging"), c._blockFrames(), c._trigger("dragStart", d, b(e))
},
drag: function(a, d) {
c._trigger("drag", a, b(d))
},
stop: function(e, f) {
var g = f.offset.left - c.document.scrollLeft(),
h = f.offset.top - c.document.scrollTop();
d.position = {
my: "left top",
at: "left" + (g >= 0 ? "+" : "") + g + " top" + (h >= 0 ? "+" : "") + h,
of: c.window
}, a(this).removeClass("ui-dialog-dragging"), c._unblockFrames(), c._trigger("dragStop", e, b(f))
}
})
},
_makeResizable: function() {
function b(a) {
return {
originalPosition: a.originalPosition,
originalSize: a.originalSize,
position: a.position,
size: a.size
}
}
var c = this,
d = this.options,
e = d.resizable,
f = this.uiDialog.css("position"),
g = "string" == typeof e ? e : "n,e,s,w,se,sw,ne,nw";
this.uiDialog.resizable({
cancel: ".ui-dialog-content",
containment: "document",
alsoResize: this.element,
maxWidth: d.maxWidth,
maxHeight: d.maxHeight,
minWidth: d.minWidth,
minHeight: this._minHeight(),
handles: g,
start: function(d, e) {
a(this).addClass("ui-dialog-resizing"), c._blockFrames(), c._trigger("resizeStart", d, b(e))
},
resize: function(a, d) {
c._trigger("resize", a, b(d))
},
stop: function(e, f) {
var g = c.uiDialog.offset(),
h = g.left - c.document.scrollLeft(),
i = g.top - c.document.scrollTop();
d.height = c.uiDialog.height(), d.width = c.uiDialog.width(), d.position = {
my: "left top",
at: "left" + (h >= 0 ? "+" : "") + h + " top" + (i >= 0 ? "+" : "") + i,
of: c.window
}, a(this).removeClass("ui-dialog-resizing"), c._unblockFrames(), c._trigger("resizeStop", e, b(f))
}
}).css("position", f)
},
_trackFocus: function() {
this._on(this.widget(), {
focusin: function(b) {
this._makeFocusTarget(), this._focusedElement = a(b.target)
}
})
},
_makeFocusTarget: function() {
this._untrackInstance(), this._trackingInstances().unshift(this)
},
_untrackInstance: function() {
var b = this._trackingInstances(),
c = a.inArray(this, b); - 1 !== c && b.splice(c, 1)
},
_trackingInstances: function() {
var a = this.document.data("ui-dialog-instances");
return a || (a = [], this.document.data("ui-dialog-instances", a)), a
},
_minHeight: function() {
var a = this.options;
return "auto" === a.height ? a.minHeight : Math.min(a.minHeight, a.height)
},
_position: function() {
var a = this.uiDialog.is(":visible");
a || this.uiDialog.show(), this.uiDialog.position(this.options.position), a || this.uiDialog.hide()
},
_setOptions: function(b) {
var c = this,
d = !1,
e = {};
a.each(b, function(a, b) {
c._setOption(a, b), a in c.sizeRelatedOptions && (d = !0), a in c.resizableRelatedOptions && (e[a] = b)
}), d && (this._size(), this._position()), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", e)
},
_setOption: function(a, b) {
var c, d, e = this.uiDialog;
"dialogClass" === a && e.removeClass(this.options.dialogClass).addClass(b), "disabled" !== a && (this._super(a, b), "appendTo" === a && this.uiDialog.appendTo(this._appendTo()), "buttons" === a && this._createButtons(), "closeText" === a && this.uiDialogTitlebarClose.button({
label: "" + b
}), "draggable" === a && (c = e.is(":data(ui-draggable)"), c && !b && e.draggable("destroy"), !c && b && this._makeDraggable()), "position" === a && this._position(), "resizable" === a && (d = e.is(":data(ui-resizable)"), d && !b && e.resizable("destroy"), d && "string" == typeof b && e.resizable("option", "handles", b), d || b === !1 || this._makeResizable()), "title" === a && this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))
},
_size: function() {
var a, b, c, d = this.options;
this.element.show().css({
width: "auto",
minHeight: 0,
maxHeight: "none",
height: 0
}), d.minWidth > d.width && (d.width = d.minWidth), a = this.uiDialog.css({
height: "auto",
width: d.width
}).outerHeight(), b = Math.max(0, d.minHeight - a), c = "number" == typeof d.maxHeight ? Math.max(0, d.maxHeight - a) : "none", "auto" === d.height ? this.element.css({
minHeight: b,
maxHeight: c,
height: "auto"
}) : this.element.height(Math.max(0, d.height - a)), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight())
},
_blockFrames: function() {
this.iframeBlocks = this.document.find("iframe").map(function() {
var b = a(this);
return a("<div>").css({
position: "absolute",
width: b.outerWidth(),
height: b.outerHeight()
}).appendTo(b.parent()).offset(b.offset())[0]
})
},
_unblockFrames: function() {
this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)
},
_allowInteraction: function(b) {
return a(b.target).closest(".ui-dialog").length ? !0 : !!a(b.target).closest(".ui-datepicker").length
},
_createOverlay: function() {
if (this.options.modal) {
var b = !0;
this._delay(function() {
b = !1
}), this.document.data("ui-dialog-overlays") || this._on(this.document, {
focusin: function(a) {
b || this._allowInteraction(a) || (a.preventDefault(), this._trackingInstances()[0]._focusTabbable())
}
}), this.overlay = a("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()), this._on(this.overlay, {
mousedown: "_keepFocus"
}), this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays") || 0) + 1)
}
},
_destroyOverlay: function() {
if (this.options.modal && this.overlay) {
var a = this.document.data("ui-dialog-overlays") - 1;
a ? this.document.data("ui-dialog-overlays", a) : this.document.unbind("focusin").removeData("ui-dialog-overlays"), this.overlay.remove(), this.overlay = null
}
}
});
a.widget("ui.droppable", {
version: "1.11.4",
widgetEventPrefix: "drop",
options: {
accept: "*",
activeClass: !1,
addClasses: !0,
greedy: !1,
hoverClass: !1,
scope: "default",
tolerance: "intersect",
activate: null,
deactivate: null,
drop: null,
out: null,
over: null
},
_create: function() {
var b, c = this.options,
d = c.accept;
this.isover = !1, this.isout = !0, this.accept = a.isFunction(d) ? d : function(a) {
return a.is(d)
}, this.proportions = function() {
return arguments.length ? void(b = arguments[0]) : b ? b : b = {
width: this.element[0].offsetWidth,
height: this.element[0].offsetHeight
}
}, this._addToManager(c.scope), c.addClasses && this.element.addClass("ui-droppable")
},
_addToManager: function(b) {
a.ui.ddmanager.droppables[b] = a.ui.ddmanager.droppables[b] || [], a.ui.ddmanager.droppables[b].push(this)
},
_splice: function(a) {
for (var b = 0; b < a.length; b++) a[b] === this && a.splice(b, 1)
},
_destroy: function() {
var b = a.ui.ddmanager.droppables[this.options.scope];
this._splice(b), this.element.removeClass("ui-droppable ui-droppable-disabled")
},
_setOption: function(b, c) {
if ("accept" === b) this.accept = a.isFunction(c) ? c : function(a) {
return a.is(c)
};
else if ("scope" === b) {
var d = a.ui.ddmanager.droppables[this.options.scope];
this._splice(d), this._addToManager(c)
}
this._super(b, c)
},
_activate: function(b) {
var c = a.ui.ddmanager.current;
this.options.activeClass && this.element.addClass(this.options.activeClass), c && this._trigger("activate", b, this.ui(c))
},
_deactivate: function(b) {
var c = a.ui.ddmanager.current;
this.options.activeClass && this.element.removeClass(this.options.activeClass), c && this._trigger("deactivate", b, this.ui(c))
},
_over: function(b) {
var c = a.ui.ddmanager.current;
c && (c.currentItem || c.element)[0] !== this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", b, this.ui(c)))
},
_out: function(b) {
var c = a.ui.ddmanager.current;
c && (c.currentItem || c.element)[0] !== this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", b, this.ui(c)))
},
_drop: function(b, c) {
var d = c || a.ui.ddmanager.current,
e = !1;
return d && (d.currentItem || d.element)[0] !== this.element[0] ? (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
var c = a(this).droppable("instance");
return c.options.greedy && !c.options.disabled && c.options.scope === d.options.scope && c.accept.call(c.element[0], d.currentItem || d.element) && a.ui.intersect(d, a.extend(c, {
offset: c.element.offset()
}), c.options.tolerance, b) ? (e = !0, !1) : void 0
}), e ? !1 : this.accept.call(this.element[0], d.currentItem || d.element) ? (this.options.activeClass && this.element.removeClass(this.options.activeClass), this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("drop", b, this.ui(d)), this.element) : !1) : !1
},
ui: function(a) {
return {
draggable: a.currentItem || a.element,
helper: a.helper,
position: a.position,
offset: a.positionAbs
}
}
}), a.ui.intersect = function() {
function a(a, b, c) {
return a >= b && b + c > a
}
return function(b, c, d, e) {
if (!c.offset) return !1;
var f = (b.positionAbs || b.position.absolute).left + b.margins.left,
g = (b.positionAbs || b.position.absolute).top + b.margins.top,
h = f + b.helperProportions.width,
i = g + b.helperProportions.height,
j = c.offset.left,
k = c.offset.top,
l = j + c.proportions().width,
m = k + c.proportions().height;
switch (d) {
case "fit":
return f >= j && l >= h && g >= k && m >= i;
case "intersect":
return j < f + b.helperProportions.width / 2 && h - b.helperProportions.width / 2 < l && k < g + b.helperProportions.height / 2 && i - b.helperProportions.height / 2 < m;
case "pointer":
return a(e.pageY, k, c.proportions().height) && a(e.pageX, j, c.proportions().width);
case "touch":
return (g >= k && m >= g || i >= k && m >= i || k > g && i > m) && (f >= j && l >= f || h >= j && l >= h || j > f && h > l);
default:
return !1
}
}
}(), a.ui.ddmanager = {
current: null,
droppables: {
"default": []
},
prepareOffsets: function(b, c) {
var d, e, f = a.ui.ddmanager.droppables[b.options.scope] || [],
g = c ? c.type : null,
h = (b.currentItem || b.element).find(":data(ui-droppable)").addBack();
a: for (d = 0; d < f.length; d++)
if (!(f[d].options.disabled || b && !f[d].accept.call(f[d].element[0], b.currentItem || b.element))) {
for (e = 0; e < h.length; e++)
if (h[e] === f[d].element[0]) {
f[d].proportions().height = 0;
continue a
}
f[d].visible = "none" !== f[d].element.css("display"), f[d].visible && ("mousedown" === g && f[d]._activate.call(f[d], c), f[d].offset = f[d].element.offset(), f[d].proportions({
width: f[d].element[0].offsetWidth,
height: f[d].element[0].offsetHeight
}))
}
},
drop: function(b, c) {
var d = !1;
return a.each((a.ui.ddmanager.droppables[b.options.scope] || []).slice(), function() {
this.options && (!this.options.disabled && this.visible && a.ui.intersect(b, this, this.options.tolerance, c) && (d = this._drop.call(this, c) || d), !this.options.disabled && this.visible && this.accept.call(this.element[0], b.currentItem || b.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, c)))
}), d
},
dragStart: function(b, c) {
b.element.parentsUntil("body").bind("scroll.droppable", function() {
b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c)
})
},
drag: function(b, c) {
b.options.refreshPositions && a.ui.ddmanager.prepareOffsets(b, c), a.each(a.ui.ddmanager.droppables[b.options.scope] || [], function() {
if (!this.options.disabled && !this.greedyChild && this.visible) {
var d, e, f, g = a.ui.intersect(b, this, this.options.tolerance, c),
h = !g && this.isover ? "isout" : g && !this.isover ? "isover" : null;
h && (this.options.greedy && (e = this.options.scope, f = this.element.parents(":data(ui-droppable)").filter(function() {
return a(this).droppable("instance").options.scope === e
}), f.length && (d = a(f[0]).droppable("instance"), d.greedyChild = "isover" === h)), d && "isover" === h && (d.isover = !1, d.isout = !0, d._out.call(d, c)), this[h] = !0, this["isout" === h ? "isover" : "isout"] = !1, this["isover" === h ? "_over" : "_out"].call(this, c), d && "isout" === h && (d.isout = !1, d.isover = !0, d._over.call(d, c)))
}
})
},
dragStop: function(b, c) {
b.element.parentsUntil("body").unbind("scroll.droppable"), b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c)
}
};
var s = (a.ui.droppable, "ui-effects-"),
t = a;
a.effects = {
effect: {}
},
function(a, b) {
function c(a, b, c) {
var d = l[b.type] || {};
return null == a ? c || !b.def ? null : b.def : (a = d.floor ? ~~a : parseFloat(a), isNaN(a) ? b.def : d.mod ? (a + d.mod) % d.mod : 0 > a ? 0 : d.max < a ? d.max : a)
}
function d(b) {
var c = j(),
d = c._rgba = [];
return b = b.toLowerCase(), o(i, function(a, e) {
var f, g = e.re.exec(b),
h = g && e.parse(g),
i = e.space || "rgba";
return h ? (f = c[i](h), c[k[i].cache] = f[k[i].cache], d = c._rgba = f._rgba, !1) : void 0
}), d.length ? ("0,0,0,0" === d.join() && a.extend(d, f.transparent), c) : f[b]
}
function e(a, b, c) {
return c = (c + 1) % 1, 1 > 6 * c ? a + (b - a) * c * 6 : 1 > 2 * c ? b : 2 > 3 * c ? a + (b - a) * (2 / 3 - c) * 6 : a
}
var f, g = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
h = /^([\-+])=\s*(\d+\.?\d*)/,
i = [{
re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
parse: function(a) {
return [a[1], a[2], a[3], a[4]]
}
}, {
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
parse: function(a) {
return [2.55 * a[1], 2.55 * a[2], 2.55 * a[3], a[4]]
}
}, {
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
parse: function(a) {
return [parseInt(a[1], 16), parseInt(a[2], 16), parseInt(a[3], 16)]
}
}, {
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
parse: function(a) {
return [parseInt(a[1] + a[1], 16), parseInt(a[2] + a[2], 16), parseInt(a[3] + a[3], 16)];
}
}, {
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
space: "hsla",
parse: function(a) {
return [a[1], a[2] / 100, a[3] / 100, a[4]]
}
}],
j = a.Color = function(b, c, d, e) {
return new a.Color.fn.parse(b, c, d, e)
},
k = {
rgba: {
props: {
red: {
idx: 0,
type: "byte"
},
green: {
idx: 1,
type: "byte"
},
blue: {
idx: 2,
type: "byte"
}
}
},
hsla: {
props: {
hue: {
idx: 0,
type: "degrees"
},
saturation: {
idx: 1,
type: "percent"
},
lightness: {
idx: 2,
type: "percent"
}
}
}
},
l = {
"byte": {
floor: !0,
max: 255
},
percent: {
max: 1
},
degrees: {
mod: 360,
floor: !0
}
},
m = j.support = {},
n = a("<p>")[0],
o = a.each;
n.style.cssText = "background-color:rgba(1,1,1,.5)", m.rgba = n.style.backgroundColor.indexOf("rgba") > -1, o(k, function(a, b) {
b.cache = "_" + a, b.props.alpha = {
idx: 3,
type: "percent",
def: 1
}
}), j.fn = a.extend(j.prototype, {
parse: function(e, g, h, i) {
if (e === b) return this._rgba = [null, null, null, null], this;
(e.jquery || e.nodeType) && (e = a(e).css(g), g = b);
var l = this,
m = a.type(e),
n = this._rgba = [];
return g !== b && (e = [e, g, h, i], m = "array"), "string" === m ? this.parse(d(e) || f._default) : "array" === m ? (o(k.rgba.props, function(a, b) {
n[b.idx] = c(e[b.idx], b)
}), this) : "object" === m ? (e instanceof j ? o(k, function(a, b) {
e[b.cache] && (l[b.cache] = e[b.cache].slice())
}) : o(k, function(b, d) {
var f = d.cache;
o(d.props, function(a, b) {
if (!l[f] && d.to) {
if ("alpha" === a || null == e[a]) return;
l[f] = d.to(l._rgba)
}
l[f][b.idx] = c(e[a], b, !0)
}), l[f] && a.inArray(null, l[f].slice(0, 3)) < 0 && (l[f][3] = 1, d.from && (l._rgba = d.from(l[f])))
}), this) : void 0
},
is: function(a) {
var b = j(a),
c = !0,
d = this;
return o(k, function(a, e) {
var f, g = b[e.cache];
return g && (f = d[e.cache] || e.to && e.to(d._rgba) || [], o(e.props, function(a, b) {
return null != g[b.idx] ? c = g[b.idx] === f[b.idx] : void 0
})), c
}), c
},
_space: function() {
var a = [],
b = this;
return o(k, function(c, d) {
b[d.cache] && a.push(c)
}), a.pop()
},
transition: function(a, b) {
var d = j(a),
e = d._space(),
f = k[e],
g = 0 === this.alpha() ? j("transparent") : this,
h = g[f.cache] || f.to(g._rgba),
i = h.slice();
return d = d[f.cache], o(f.props, function(a, e) {
var f = e.idx,
g = h[f],
j = d[f],
k = l[e.type] || {};
null !== j && (null === g ? i[f] = j : (k.mod && (j - g > k.mod / 2 ? g += k.mod : g - j > k.mod / 2 && (g -= k.mod)), i[f] = c((j - g) * b + g, e)))
}), this[e](i)
},
blend: function(b) {
if (1 === this._rgba[3]) return this;
var c = this._rgba.slice(),
d = c.pop(),
e = j(b)._rgba;
return j(a.map(c, function(a, b) {
return (1 - d) * e[b] + d * a
}))
},
toRgbaString: function() {
var b = "rgba(",
c = a.map(this._rgba, function(a, b) {
return null == a ? b > 2 ? 1 : 0 : a
});
return 1 === c[3] && (c.pop(), b = "rgb("), b + c.join() + ")"
},
toHslaString: function() {
var b = "hsla(",
c = a.map(this.hsla(), function(a, b) {
return null == a && (a = b > 2 ? 1 : 0), b && 3 > b && (a = Math.round(100 * a) + "%"), a
});
return 1 === c[3] && (c.pop(), b = "hsl("), b + c.join() + ")"
},
toHexString: function(b) {
var c = this._rgba.slice(),
d = c.pop();
return b && c.push(~~(255 * d)), "#" + a.map(c, function(a) {
return a = (a || 0).toString(16), 1 === a.length ? "0" + a : a
}).join("")
},
toString: function() {
return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
}
}), j.fn.parse.prototype = j.fn, k.hsla.to = function(a) {
if (null == a[0] || null == a[1] || null == a[2]) return [null, null, null, a[3]];
var b, c, d = a[0] / 255,
e = a[1] / 255,
f = a[2] / 255,
g = a[3],
h = Math.max(d, e, f),
i = Math.min(d, e, f),
j = h - i,
k = h + i,
l = .5 * k;
return b = i === h ? 0 : d === h ? 60 * (e - f) / j + 360 : e === h ? 60 * (f - d) / j + 120 : 60 * (d - e) / j + 240, c = 0 === j ? 0 : .5 >= l ? j / k : j / (2 - k), [Math.round(b) % 360, c, l, null == g ? 1 : g]
}, k.hsla.from = function(a) {
if (null == a[0] || null == a[1] || null == a[2]) return [null, null, null, a[3]];
var b = a[0] / 360,
c = a[1],
d = a[2],
f = a[3],
g = .5 >= d ? d * (1 + c) : d + c - d * c,
h = 2 * d - g;
return [Math.round(255 * e(h, g, b + 1 / 3)), Math.round(255 * e(h, g, b)), Math.round(255 * e(h, g, b - 1 / 3)), f]
}, o(k, function(d, e) {
var f = e.props,
g = e.cache,
i = e.to,
k = e.from;
j.fn[d] = function(d) {
if (i && !this[g] && (this[g] = i(this._rgba)), d === b) return this[g].slice();
var e, h = a.type(d),
l = "array" === h || "object" === h ? d : arguments,
m = this[g].slice();
return o(f, function(a, b) {
var d = l["object" === h ? a : b.idx];
null == d && (d = m[b.idx]), m[b.idx] = c(d, b)
}), k ? (e = j(k(m)), e[g] = m, e) : j(m)
}, o(f, function(b, c) {
j.fn[b] || (j.fn[b] = function(e) {
var f, g = a.type(e),
i = "alpha" === b ? this._hsla ? "hsla" : "rgba" : d,
j = this[i](),
k = j[c.idx];
return "undefined" === g ? k : ("function" === g && (e = e.call(this, k), g = a.type(e)), null == e && c.empty ? this : ("string" === g && (f = h.exec(e), f && (e = k + parseFloat(f[2]) * ("+" === f[1] ? 1 : -1))), j[c.idx] = e, this[i](j)))
})
})
}), j.hook = function(b) {
var c = b.split(" ");
o(c, function(b, c) {
a.cssHooks[c] = {
set: function(b, e) {
var f, g, h = "";
if ("transparent" !== e && ("string" !== a.type(e) || (f = d(e)))) {
if (e = j(f || e), !m.rgba && 1 !== e._rgba[3]) {
for (g = "backgroundColor" === c ? b.parentNode : b;
("" === h || "transparent" === h) && g && g.style;) try {
h = a.css(g, "backgroundColor"), g = g.parentNode
} catch (i) {}
e = e.blend(h && "transparent" !== h ? h : "_default")
}
e = e.toRgbaString()
}
try {
b.style[c] = e
} catch (i) {}
}
}, a.fx.step[c] = function(b) {
b.colorInit || (b.start = j(b.elem, c), b.end = j(b.end), b.colorInit = !0), a.cssHooks[c].set(b.elem, b.start.transition(b.end, b.pos))
}
})
}, j.hook(g), a.cssHooks.borderColor = {
expand: function(a) {
var b = {};
return o(["Top", "Right", "Bottom", "Left"], function(c, d) {
b["border" + d + "Color"] = a
}), b
}
}, f = a.Color.names = {
aqua: "#00ffff",
black: "#000000",
blue: "#0000ff",
fuchsia: "#ff00ff",
gray: "#808080",
green: "#008000",
lime: "#00ff00",
maroon: "#800000",
navy: "#000080",
olive: "#808000",
purple: "#800080",
red: "#ff0000",
silver: "#c0c0c0",
teal: "#008080",
white: "#ffffff",
yellow: "#ffff00",
transparent: [null, null, null, 0],
_default: "#ffffff"
}
}(t),
function() {
function b(b) {
var c, d, e = b.ownerDocument.defaultView ? b.ownerDocument.defaultView.getComputedStyle(b, null) : b.currentStyle,
f = {};
if (e && e.length && e[0] && e[e[0]])
for (d = e.length; d--;) c = e[d], "string" == typeof e[c] && (f[a.camelCase(c)] = e[c]);
else
for (c in e) "string" == typeof e[c] && (f[c] = e[c]);
return f
}
function c(b, c) {
var d, f, g = {};
for (d in c) f = c[d], b[d] !== f && (e[d] || (a.fx.step[d] || !isNaN(parseFloat(f))) && (g[d] = f));
return g
}
var d = ["add", "remove", "toggle"],
e = {
border: 1,
borderBottom: 1,
borderColor: 1,
borderLeft: 1,
borderRight: 1,
borderTop: 1,
borderWidth: 1,
margin: 1,
padding: 1
};
a.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(b, c) {
a.fx.step[c] = function(a) {
("none" !== a.end && !a.setAttr || 1 === a.pos && !a.setAttr) && (t.style(a.elem, c, a.end), a.setAttr = !0)
}
}), a.fn.addBack || (a.fn.addBack = function(a) {
return this.add(null == a ? this.prevObject : this.prevObject.filter(a))
}), a.effects.animateClass = function(e, f, g, h) {
var i = a.speed(f, g, h);
return this.queue(function() {
var f, g = a(this),
h = g.attr("class") || "",
j = i.children ? g.find("*").addBack() : g;
j = j.map(function() {
var c = a(this);
return {
el: c,
start: b(this)
}
}), f = function() {
a.each(d, function(a, b) {
e[b] && g[b + "Class"](e[b])
})
}, f(), j = j.map(function() {
return this.end = b(this.el[0]), this.diff = c(this.start, this.end), this
}), g.attr("class", h), j = j.map(function() {
var b = this,
c = a.Deferred(),
d = a.extend({}, i, {
queue: !1,
complete: function() {
c.resolve(b)
}
});
return this.el.animate(this.diff, d), c.promise()
}), a.when.apply(a, j.get()).done(function() {
f(), a.each(arguments, function() {
var b = this.el;
a.each(this.diff, function(a) {
b.css(a, "")
})
}), i.complete.call(g[0])
})
})
}, a.fn.extend({
addClass: function(b) {
return function(c, d, e, f) {
return d ? a.effects.animateClass.call(this, {
add: c
}, d, e, f) : b.apply(this, arguments)
}
}(a.fn.addClass),
removeClass: function(b) {
return function(c, d, e, f) {
return arguments.length > 1 ? a.effects.animateClass.call(this, {
remove: c
}, d, e, f) : b.apply(this, arguments)
}
}(a.fn.removeClass),
toggleClass: function(b) {
return function(c, d, e, f, g) {
return "boolean" == typeof d || void 0 === d ? e ? a.effects.animateClass.call(this, d ? {
add: c
} : {
remove: c
}, e, f, g) : b.apply(this, arguments) : a.effects.animateClass.call(this, {
toggle: c
}, d, e, f)
}
}(a.fn.toggleClass),
switchClass: function(b, c, d, e, f) {
return a.effects.animateClass.call(this, {
add: c,
remove: b
}, d, e, f)
}
})
}(),
function() {
function b(b, c, d, e) {
return a.isPlainObject(b) && (c = b, b = b.effect), b = {
effect: b
}, null == c && (c = {}), a.isFunction(c) && (e = c, d = null, c = {}), ("number" == typeof c || a.fx.speeds[c]) && (e = d, d = c, c = {}), a.isFunction(d) && (e = d, d = null), c && a.extend(b, c), d = d || c.duration, b.duration = a.fx.off ? 0 : "number" == typeof d ? d : d in a.fx.speeds ? a.fx.speeds[d] : a.fx.speeds._default, b.complete = e || c.complete, b
}
function c(b) {
return !b || "number" == typeof b || a.fx.speeds[b] ? !0 : "string" != typeof b || a.effects.effect[b] ? a.isFunction(b) ? !0 : "object" != typeof b || b.effect ? !1 : !0 : !0
}
a.extend(a.effects, {
version: "1.11.4",
save: function(a, b) {
for (var c = 0; c < b.length; c++) null !== b[c] && a.data(s + b[c], a[0].style[b[c]])
},
restore: function(a, b) {
var c, d;
for (d = 0; d < b.length; d++) null !== b[d] && (c = a.data(s + b[d]), void 0 === c && (c = ""), a.css(b[d], c))
},
setMode: function(a, b) {
return "toggle" === b && (b = a.is(":hidden") ? "show" : "hide"), b
},
getBaseline: function(a, b) {
var c, d;
switch (a[0]) {
case "top":
c = 0;
break;
case "middle":
c = .5;
break;
case "bottom":
c = 1;
break;
default:
c = a[0] / b.height
}
switch (a[1]) {
case "left":
d = 0;
break;
case "center":
d = .5;
break;
case "right":
d = 1;
break;
default:
d = a[1] / b.width
}
return {
x: d,
y: c
}
},
createWrapper: function(b) {
if (b.parent().is(".ui-effects-wrapper")) return b.parent();
var c = {
width: b.outerWidth(!0),
height: b.outerHeight(!0),
"float": b.css("float")
},
d = a("<div></div>").addClass("ui-effects-wrapper").css({
fontSize: "100%",
background: "transparent",
border: "none",
margin: 0,
padding: 0
}),
e = {
width: b.width(),
height: b.height()
},
f = document.activeElement;
try {
f.id
} catch (g) {
f = document.body
}
return b.wrap(d), (b[0] === f || a.contains(b[0], f)) && a(f).focus(), d = b.parent(), "static" === b.css("position") ? (d.css({
position: "relative"
}), b.css({
position: "relative"
})) : (a.extend(c, {
position: b.css("position"),
zIndex: b.css("z-index")
}), a.each(["top", "left", "bottom", "right"], function(a, d) {
c[d] = b.css(d), isNaN(parseInt(c[d], 10)) && (c[d] = "auto")
}), b.css({
position: "relative",
top: 0,
left: 0,
right: "auto",
bottom: "auto"
})), b.css(e), d.css(c).show()
},
removeWrapper: function(b) {
var c = document.activeElement;
return b.parent().is(".ui-effects-wrapper") && (b.parent().replaceWith(b), (b[0] === c || a.contains(b[0], c)) && a(c).focus()), b
},
setTransition: function(b, c, d, e) {
return e = e || {}, a.each(c, function(a, c) {
var f = b.cssUnit(c);
f[0] > 0 && (e[c] = f[0] * d + f[1])
}), e
}
}), a.fn.extend({
effect: function() {
function c(b) {
function c() {
a.isFunction(f) && f.call(e[0]), a.isFunction(b) && b()
}
var e = a(this),
f = d.complete,
h = d.mode;
(e.is(":hidden") ? "hide" === h : "show" === h) ? (e[h](), c()) : g.call(e[0], d, c)
}
var d = b.apply(this, arguments),
e = d.mode,
f = d.queue,
g = a.effects.effect[d.effect];
return a.fx.off || !g ? e ? this[e](d.duration, d.complete) : this.each(function() {
d.complete && d.complete.call(this)
}) : f === !1 ? this.each(c) : this.queue(f || "fx", c)
},
show: function(a) {
return function(d) {
if (c(d)) return a.apply(this, arguments);
var e = b.apply(this, arguments);
return e.mode = "show", this.effect.call(this, e)
}
}(a.fn.show),
hide: function(a) {
return function(d) {
if (c(d)) return a.apply(this, arguments);
var e = b.apply(this, arguments);
return e.mode = "hide", this.effect.call(this, e)
}
}(a.fn.hide),
toggle: function(a) {
return function(d) {
if (c(d) || "boolean" == typeof d) return a.apply(this, arguments);
var e = b.apply(this, arguments);
return e.mode = "toggle", this.effect.call(this, e)
}
}(a.fn.toggle),
cssUnit: function(b) {
var c = this.css(b),
d = [];
return a.each(["em", "px", "%", "pt"], function(a, b) {
c.indexOf(b) > 0 && (d = [parseFloat(c), b])
}), d
}
})
}(),
function() {
var b = {};
a.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(a, c) {
b[c] = function(b) {
return Math.pow(b, a + 2)
}
}), a.extend(b, {
Sine: function(a) {
return 1 - Math.cos(a * Math.PI / 2)
},
Circ: function(a) {
return 1 - Math.sqrt(1 - a * a)
},
Elastic: function(a) {
return 0 === a || 1 === a ? a : -Math.pow(2, 8 * (a - 1)) * Math.sin((80 * (a - 1) - 7.5) * Math.PI / 15)
},
Back: function(a) {
return a * a * (3 * a - 2)
},
Bounce: function(a) {
for (var b, c = 4; a < ((b = Math.pow(2, --c)) - 1) / 11;);
return 1 / Math.pow(4, 3 - c) - 7.5625 * Math.pow((3 * b - 2) / 22 - a, 2)
}
}), a.each(b, function(b, c) {
a.easing["easeIn" + b] = c, a.easing["easeOut" + b] = function(a) {
return 1 - c(1 - a)
}, a.easing["easeInOut" + b] = function(a) {
return .5 > a ? c(2 * a) / 2 : 1 - c(-2 * a + 2) / 2
}
})
}();
a.effects, a.effects.effect.blind = function(b, c) {
var d, e, f, g = a(this),
h = /up|down|vertical/,
i = /up|left|vertical|horizontal/,
j = ["position", "top", "bottom", "left", "right", "height", "width"],
k = a.effects.setMode(g, b.mode || "hide"),
l = b.direction || "up",
m = h.test(l),
n = m ? "height" : "width",
o = m ? "top" : "left",
p = i.test(l),
q = {},
r = "show" === k;
g.parent().is(".ui-effects-wrapper") ? a.effects.save(g.parent(), j) : a.effects.save(g, j), g.show(), d = a.effects.createWrapper(g).css({
overflow: "hidden"
}), e = d[n](), f = parseFloat(d.css(o)) || 0, q[n] = r ? e : 0, p || (g.css(m ? "bottom" : "right", 0).css(m ? "top" : "left", "auto").css({
position: "absolute"
}), q[o] = r ? f : e + f), r && (d.css(n, 0), p || d.css(o, f + e)), d.animate(q, {
duration: b.duration,
easing: b.easing,
queue: !1,
complete: function() {
"hide" === k && g.hide(), a.effects.restore(g, j), a.effects.removeWrapper(g), c()
}
})
}, a.effects.effect.bounce = function(b, c) {
var d, e, f, g = a(this),
h = ["position", "top", "bottom", "left", "right", "height", "width"],
i = a.effects.setMode(g, b.mode || "effect"),
j = "hide" === i,
k = "show" === i,
l = b.direction || "up",
m = b.distance,
n = b.times || 5,
o = 2 * n + (k || j ? 1 : 0),
p = b.duration / o,
q = b.easing,
r = "up" === l || "down" === l ? "top" : "left",
s = "up" === l || "left" === l,
t = g.queue(),
u = t.length;
for ((k || j) && h.push("opacity"), a.effects.save(g, h), g.show(), a.effects.createWrapper(g), m || (m = g["top" === r ? "outerHeight" : "outerWidth"]() / 3), k && (f = {
opacity: 1
}, f[r] = 0, g.css("opacity", 0).css(r, s ? 2 * -m : 2 * m).animate(f, p, q)), j && (m /= Math.pow(2, n - 1)), f = {}, f[r] = 0, d = 0; n > d; d++) e = {}, e[r] = (s ? "-=" : "+=") + m, g.animate(e, p, q).animate(f, p, q), m = j ? 2 * m : m / 2;
j && (e = {
opacity: 0
}, e[r] = (s ? "-=" : "+=") + m, g.animate(e, p, q)), g.queue(function() {
j && g.hide(), a.effects.restore(g, h), a.effects.removeWrapper(g), c()
}), u > 1 && t.splice.apply(t, [1, 0].concat(t.splice(u, o + 1))), g.dequeue()
}, a.effects.effect.clip = function(b, c) {
var d, e, f, g = a(this),
h = ["position", "top", "bottom", "left", "right", "height", "width"],
i = a.effects.setMode(g, b.mode || "hide"),
j = "show" === i,
k = b.direction || "vertical",
l = "vertical" === k,
m = l ? "height" : "width",
n = l ? "top" : "left",
o = {};
a.effects.save(g, h), g.show(), d = a.effects.createWrapper(g).css({
overflow: "hidden"
}), e = "IMG" === g[0].tagName ? d : g, f = e[m](), j && (e.css(m, 0), e.css(n, f / 2)), o[m] = j ? f : 0, o[n] = j ? 0 : f / 2, e.animate(o, {
queue: !1,
duration: b.duration,
easing: b.easing,
complete: function() {
j || g.hide(), a.effects.restore(g, h), a.effects.removeWrapper(g), c()
}
})
}, a.effects.effect.drop = function(b, c) {
var d, e = a(this),
f = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"],
g = a.effects.setMode(e, b.mode || "hide"),
h = "show" === g,
i = b.direction || "left",
j = "up" === i || "down" === i ? "top" : "left",
k = "up" === i || "left" === i ? "pos" : "neg",
l = {
opacity: h ? 1 : 0
};
a.effects.save(e, f), e.show(), a.effects.createWrapper(e), d = b.distance || e["top" === j ? "outerHeight" : "outerWidth"](!0) / 2, h && e.css("opacity", 0).css(j, "pos" === k ? -d : d), l[j] = (h ? "pos" === k ? "+=" : "-=" : "pos" === k ? "-=" : "+=") + d, e.animate(l, {
queue: !1,
duration: b.duration,
easing: b.easing,
complete: function() {
"hide" === g && e.hide(), a.effects.restore(e, f), a.effects.removeWrapper(e), c()
}
})
}, a.effects.effect.explode = function(b, c) {
function d() {
t.push(this), t.length === l * m && e()
}
function e() {
n.css({
visibility: "visible"
}), a(t).remove(), p || n.hide(), c()
}
var f, g, h, i, j, k, l = b.pieces ? Math.round(Math.sqrt(b.pieces)) : 3,
m = l,
n = a(this),
o = a.effects.setMode(n, b.mode || "hide"),
p = "show" === o,
q = n.show().css("visibility", "hidden").offset(),
r = Math.ceil(n.outerWidth() / m),
s = Math.ceil(n.outerHeight() / l),
t = [];
for (f = 0; l > f; f++)
for (i = q.top + f * s, k = f - (l - 1) / 2, g = 0; m > g; g++) h = q.left + g * r, j = g - (m - 1) / 2, n.clone().appendTo("body").wrap("<div></div>").css({
position: "absolute",
visibility: "visible",
left: -g * r,
top: -f * s
}).parent().addClass("ui-effects-explode").css({
position: "absolute",
overflow: "hidden",
width: r,
height: s,
left: h + (p ? j * r : 0),
top: i + (p ? k * s : 0),
opacity: p ? 0 : 1
}).animate({
left: h + (p ? 0 : j * r),
top: i + (p ? 0 : k * s),
opacity: p ? 1 : 0
}, b.duration || 500, b.easing, d)
}, a.effects.effect.fade = function(b, c) {
var d = a(this),
e = a.effects.setMode(d, b.mode || "toggle");
d.animate({
opacity: e
}, {
queue: !1,
duration: b.duration,
easing: b.easing,
complete: c
})
}, a.effects.effect.fold = function(b, c) {
var d, e, f = a(this),
g = ["position", "top", "bottom", "left", "right", "height", "width"],
h = a.effects.setMode(f, b.mode || "hide"),
i = "show" === h,
j = "hide" === h,
k = b.size || 15,
l = /([0-9]+)%/.exec(k),
m = !!b.horizFirst,
n = i !== m,
o = n ? ["width", "height"] : ["height", "width"],
p = b.duration / 2,
q = {},
r = {};
a.effects.save(f, g), f.show(), d = a.effects.createWrapper(f).css({
overflow: "hidden"
}), e = n ? [d.width(), d.height()] : [d.height(), d.width()], l && (k = parseInt(l[1], 10) / 100 * e[j ? 0 : 1]), i && d.css(m ? {
height: 0,
width: k
} : {
height: k,
width: 0
}), q[o[0]] = i ? e[0] : k, r[o[1]] = i ? e[1] : 0, d.animate(q, p, b.easing).animate(r, p, b.easing, function() {
j && f.hide(), a.effects.restore(f, g), a.effects.removeWrapper(f), c()
})
}, a.effects.effect.highlight = function(b, c) {
var d = a(this),
e = ["backgroundImage", "backgroundColor", "opacity"],
f = a.effects.setMode(d, b.mode || "show"),
g = {
backgroundColor: d.css("backgroundColor")
};
"hide" === f && (g.opacity = 0), a.effects.save(d, e), d.show().css({
backgroundImage: "none",
backgroundColor: b.color || "#ffff99"
}).animate(g, {
queue: !1,
duration: b.duration,
easing: b.easing,
complete: function() {
"hide" === f && d.hide(), a.effects.restore(d, e), c()
}
})
}, a.effects.effect.size = function(b, c) {
var d, e, f, g = a(this),
h = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"],
i = ["position", "top", "bottom", "left", "right", "overflow", "opacity"],
j = ["width", "height", "overflow"],
k = ["fontSize"],
l = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
m = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
n = a.effects.setMode(g, b.mode || "effect"),
o = b.restore || "effect" !== n,
p = b.scale || "both",
q = b.origin || ["middle", "center"],
r = g.css("position"),
s = o ? h : i,
t = {
height: 0,
width: 0,
outerHeight: 0,
outerWidth: 0
};
"show" === n && g.show(), d = {
height: g.height(),
width: g.width(),
outerHeight: g.outerHeight(),
outerWidth: g.outerWidth()
}, "toggle" === b.mode && "show" === n ? (g.from = b.to || t, g.to = b.from || d) : (g.from = b.from || ("show" === n ? t : d), g.to = b.to || ("hide" === n ? t : d)), f = {
from: {
y: g.from.height / d.height,
x: g.from.width / d.width
},
to: {
y: g.to.height / d.height,
x: g.to.width / d.width
}
}, ("box" === p || "both" === p) && (f.from.y !== f.to.y && (s = s.concat(l), g.from = a.effects.setTransition(g, l, f.from.y, g.from), g.to = a.effects.setTransition(g, l, f.to.y, g.to)), f.from.x !== f.to.x && (s = s.concat(m), g.from = a.effects.setTransition(g, m, f.from.x, g.from), g.to = a.effects.setTransition(g, m, f.to.x, g.to))), ("content" === p || "both" === p) && f.from.y !== f.to.y && (s = s.concat(k).concat(j), g.from = a.effects.setTransition(g, k, f.from.y, g.from), g.to = a.effects.setTransition(g, k, f.to.y, g.to)), a.effects.save(g, s), g.show(), a.effects.createWrapper(g), g.css("overflow", "hidden").css(g.from), q && (e = a.effects.getBaseline(q, d), g.from.top = (d.outerHeight - g.outerHeight()) * e.y, g.from.left = (d.outerWidth - g.outerWidth()) * e.x, g.to.top = (d.outerHeight - g.to.outerHeight) * e.y, g.to.left = (d.outerWidth - g.to.outerWidth) * e.x), g.css(g.from), ("content" === p || "both" === p) && (l = l.concat(["marginTop", "marginBottom"]).concat(k), m = m.concat(["marginLeft", "marginRight"]), j = h.concat(l).concat(m), g.find("*[width]").each(function() {
var c = a(this),
d = {
height: c.height(),
width: c.width(),
outerHeight: c.outerHeight(),
outerWidth: c.outerWidth()
};
o && a.effects.save(c, j), c.from = {
height: d.height * f.from.y,
width: d.width * f.from.x,
outerHeight: d.outerHeight * f.from.y,
outerWidth: d.outerWidth * f.from.x
}, c.to = {
height: d.height * f.to.y,
width: d.width * f.to.x,
outerHeight: d.height * f.to.y,
outerWidth: d.width * f.to.x
}, f.from.y !== f.to.y && (c.from = a.effects.setTransition(c, l, f.from.y, c.from), c.to = a.effects.setTransition(c, l, f.to.y, c.to)), f.from.x !== f.to.x && (c.from = a.effects.setTransition(c, m, f.from.x, c.from), c.to = a.effects.setTransition(c, m, f.to.x, c.to)), c.css(c.from), c.animate(c.to, b.duration, b.easing, function() {
o && a.effects.restore(c, j)
})
})), g.animate(g.to, {
queue: !1,
duration: b.duration,
easing: b.easing,
complete: function() {
0 === g.to.opacity && g.css("opacity", g.from.opacity), "hide" === n && g.hide(), a.effects.restore(g, s), o || ("static" === r ? g.css({
position: "relative",
top: g.to.top,
left: g.to.left
}) : a.each(["top", "left"], function(a, b) {
g.css(b, function(b, c) {
var d = parseInt(c, 10),
e = a ? g.to.left : g.to.top;
return "auto" === c ? e + "px" : d + e + "px"
})
})), a.effects.removeWrapper(g), c()
}
})
}, a.effects.effect.scale = function(b, c) {
var d = a(this),
e = a.extend(!0, {}, b),
f = a.effects.setMode(d, b.mode || "effect"),
g = parseInt(b.percent, 10) || (0 === parseInt(b.percent, 10) ? 0 : "hide" === f ? 0 : 100),
h = b.direction || "both",
i = b.origin,
j = {
height: d.height(),
width: d.width(),
outerHeight: d.outerHeight(),
outerWidth: d.outerWidth()
},
k = {
y: "horizontal" !== h ? g / 100 : 1,
x: "vertical" !== h ? g / 100 : 1
};
e.effect = "size", e.queue = !1, e.complete = c, "effect" !== f && (e.origin = i || ["middle", "center"], e.restore = !0), e.from = b.from || ("show" === f ? {
height: 0,
width: 0,
outerHeight: 0,
outerWidth: 0
} : j), e.to = {
height: j.height * k.y,
width: j.width * k.x,
outerHeight: j.outerHeight * k.y,
outerWidth: j.outerWidth * k.x
}, e.fade && ("show" === f && (e.from.opacity = 0, e.to.opacity = 1), "hide" === f && (e.from.opacity = 1, e.to.opacity = 0)), d.effect(e)
}, a.effects.effect.puff = function(b, c) {
var d = a(this),
e = a.effects.setMode(d, b.mode || "hide"),
f = "hide" === e,
g = parseInt(b.percent, 10) || 150,
h = g / 100,
i = {
height: d.height(),
width: d.width(),
outerHeight: d.outerHeight(),
outerWidth: d.outerWidth()
};
a.extend(b, {
effect: "scale",
queue: !1,
fade: !0,
mode: e,
complete: c,
percent: f ? g : 100,
from: f ? i : {
height: i.height * h,
width: i.width * h,
outerHeight: i.outerHeight * h,
outerWidth: i.outerWidth * h
}
}), d.effect(b)
}, a.effects.effect.pulsate = function(b, c) {
var d, e = a(this),
f = a.effects.setMode(e, b.mode || "show"),
g = "show" === f,
h = "hide" === f,
i = g || "hide" === f,
j = 2 * (b.times || 5) + (i ? 1 : 0),
k = b.duration / j,
l = 0,
m = e.queue(),
n = m.length;
for ((g || !e.is(":visible")) && (e.css("opacity", 0).show(), l = 1), d = 1; j > d; d++) e.animate({
opacity: l
}, k, b.easing), l = 1 - l;
e.animate({
opacity: l
}, k, b.easing), e.queue(function() {
h && e.hide(), c()
}), n > 1 && m.splice.apply(m, [1, 0].concat(m.splice(n, j + 1))), e.dequeue()
}, a.effects.effect.shake = function(b, c) {
var d, e = a(this),
f = ["position", "top", "bottom", "left", "right", "height", "width"],
g = a.effects.setMode(e, b.mode || "effect"),
h = b.direction || "left",
i = b.distance || 20,
j = b.times || 3,
k = 2 * j + 1,
l = Math.round(b.duration / k),
m = "up" === h || "down" === h ? "top" : "left",
n = "up" === h || "left" === h,
o = {},
p = {},
q = {},
r = e.queue(),
s = r.length;
for (a.effects.save(e, f), e.show(), a.effects.createWrapper(e), o[m] = (n ? "-=" : "+=") + i, p[m] = (n ? "+=" : "-=") + 2 * i, q[m] = (n ? "-=" : "+=") + 2 * i, e.animate(o, l, b.easing), d = 1; j > d; d++) e.animate(p, l, b.easing).animate(q, l, b.easing);
e.animate(p, l, b.easing).animate(o, l / 2, b.easing).queue(function() {
"hide" === g && e.hide(), a.effects.restore(e, f), a.effects.removeWrapper(e), c()
}), s > 1 && r.splice.apply(r, [1, 0].concat(r.splice(s, k + 1))), e.dequeue()
}, a.effects.effect.slide = function(b, c) {
var d, e = a(this),
f = ["position", "top", "bottom", "left", "right", "width", "height"],
g = a.effects.setMode(e, b.mode || "show"),
h = "show" === g,
i = b.direction || "left",
j = "up" === i || "down" === i ? "top" : "left",
k = "up" === i || "left" === i,
l = {};
a.effects.save(e, f), e.show(), d = b.distance || e["top" === j ? "outerHeight" : "outerWidth"](!0), a.effects.createWrapper(e).css({
overflow: "hidden"
}), h && e.css(j, k ? isNaN(d) ? "-" + d : -d : d), l[j] = (h ? k ? "+=" : "-=" : k ? "-=" : "+=") + d, e.animate(l, {
queue: !1,
duration: b.duration,
easing: b.easing,
complete: function() {
"hide" === g && e.hide(), a.effects.restore(e, f), a.effects.removeWrapper(e), c()
}
})
}, a.effects.effect.transfer = function(b, c) {
var d = a(this),
e = a(b.to),
f = "fixed" === e.css("position"),
g = a("body"),
h = f ? g.scrollTop() : 0,
i = f ? g.scrollLeft() : 0,
j = e.offset(),
k = {
top: j.top - h,
left: j.left - i,
height: e.innerHeight(),
width: e.innerWidth()
},
l = d.offset(),
m = a("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(b.className).css({
top: l.top - h,
left: l.left - i,
height: d.innerHeight(),
width: d.innerWidth(),
position: f ? "fixed" : "absolute"
}).animate(k, b.duration, b.easing, function() {
m.remove(), c()
})
}, a.widget("ui.progressbar", {
version: "1.11.4",
options: {
max: 100,
value: 0,
change: null,
complete: null
},
min: 0,
_create: function() {
this.oldValue = this.options.value = this._constrainedValue(), this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({
role: "progressbar",
"aria-valuemin": this.min
}), this.valueDiv = a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element), this._refreshValue()
},
_destroy: function() {
this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.valueDiv.remove()
},
value: function(a) {
return void 0 === a ? this.options.value : (this.options.value = this._constrainedValue(a), void this._refreshValue())
},
_constrainedValue: function(a) {
return void 0 === a && (a = this.options.value), this.indeterminate = a === !1, "number" != typeof a && (a = 0), this.indeterminate ? !1 : Math.min(this.options.max, Math.max(this.min, a))
},
_setOptions: function(a) {
var b = a.value;
delete a.value, this._super(a), this.options.value = this._constrainedValue(b), this._refreshValue()
},
_setOption: function(a, b) {
"max" === a && (b = Math.max(this.min, b)), "disabled" === a && this.element.toggleClass("ui-state-disabled", !!b).attr("aria-disabled", b), this._super(a, b)
},
_percentage: function() {
return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min)
},
_refreshValue: function() {
var b = this.options.value,
c = this._percentage();
this.valueDiv.toggle(this.indeterminate || b > this.min).toggleClass("ui-corner-right", b === this.options.max).width(c.toFixed(0) + "%"), this.element.toggleClass("ui-progressbar-indeterminate", this.indeterminate), this.indeterminate ? (this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = a("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))) : (this.element.attr({
"aria-valuemax": this.options.max,
"aria-valuenow": b
}), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !== b && (this.oldValue = b, this._trigger("change")), b === this.options.max && this._trigger("complete")
}
}), a.widget("ui.selectable", a.ui.mouse, {
version: "1.11.4",
options: {
appendTo: "body",
autoRefresh: !0,
distance: 0,
filter: "*",
tolerance: "touch",
selected: null,
selecting: null,
start: null,
stop: null,
unselected: null,
unselecting: null
},
_create: function() {
var b, c = this;
this.element.addClass("ui-selectable"), this.dragged = !1, this.refresh = function() {
b = a(c.options.filter, c.element[0]), b.addClass("ui-selectee"), b.each(function() {
var b = a(this),
c = b.offset();
a.data(this, "selectable-item", {
element: this,
$element: b,
left: c.left,
top: c.top,
right: c.left + b.outerWidth(),
bottom: c.top + b.outerHeight(),
startselected: !1,
selected: b.hasClass("ui-selected"),
selecting: b.hasClass("ui-selecting"),
unselecting: b.hasClass("ui-unselecting")
})
})
}, this.refresh(), this.selectees = b.addClass("ui-selectee"), this._mouseInit(), this.helper = a("<div class='ui-selectable-helper'></div>")
},
_destroy: function() {
this.selectees.removeClass("ui-selectee").removeData("selectable-item"), this.element.removeClass("ui-selectable ui-selectable-disabled"), this._mouseDestroy()
},
_mouseStart: function(b) {
var c = this,
d = this.options;
this.opos = [b.pageX, b.pageY], this.options.disabled || (this.selectees = a(d.filter, this.element[0]), this._trigger("start", b), a(d.appendTo).append(this.helper), this.helper.css({
left: b.pageX,
top: b.pageY,
width: 0,
height: 0
}), d.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function() {
var d = a.data(this, "selectable-item");
d.startselected = !0, b.metaKey || b.ctrlKey || (d.$element.removeClass("ui-selected"), d.selected = !1, d.$element.addClass("ui-unselecting"), d.unselecting = !0, c._trigger("unselecting", b, {
unselecting: d.element
}))
}), a(b.target).parents().addBack().each(function() {
var d, e = a.data(this, "selectable-item");
return e ? (d = !b.metaKey && !b.ctrlKey || !e.$element.hasClass("ui-selected"), e.$element.removeClass(d ? "ui-unselecting" : "ui-selected").addClass(d ? "ui-selecting" : "ui-unselecting"), e.unselecting = !d, e.selecting = d, e.selected = d, d ? c._trigger("selecting", b, {
selecting: e.element
}) : c._trigger("unselecting", b, {
unselecting: e.element
}), !1) : void 0
}))
},
_mouseDrag: function(b) {
if (this.dragged = !0, !this.options.disabled) {
var c, d = this,
e = this.options,
f = this.opos[0],
g = this.opos[1],
h = b.pageX,
i = b.pageY;
return f > h && (c = h, h = f, f = c), g > i && (c = i, i = g, g = c), this.helper.css({
left: f,
top: g,
width: h - f,
height: i - g
}), this.selectees.each(function() {
var c = a.data(this, "selectable-item"),
j = !1;
c && c.element !== d.element[0] && ("touch" === e.tolerance ? j = !(c.left > h || c.right < f || c.top > i || c.bottom < g) : "fit" === e.tolerance && (j = c.left > f && c.right < h && c.top > g && c.bottom < i), j ? (c.selected && (c.$element.removeClass("ui-selected"), c.selected = !1), c.unselecting && (c.$element.removeClass("ui-unselecting"), c.unselecting = !1), c.selecting || (c.$element.addClass("ui-selecting"), c.selecting = !0, d._trigger("selecting", b, {
selecting: c.element
}))) : (c.selecting && ((b.metaKey || b.ctrlKey) && c.startselected ? (c.$element.removeClass("ui-selecting"), c.selecting = !1, c.$element.addClass("ui-selected"), c.selected = !0) : (c.$element.removeClass("ui-selecting"), c.selecting = !1, c.startselected && (c.$element.addClass("ui-unselecting"), c.unselecting = !0), d._trigger("unselecting", b, {
unselecting: c.element
}))), c.selected && (b.metaKey || b.ctrlKey || c.startselected || (c.$element.removeClass("ui-selected"), c.selected = !1, c.$element.addClass("ui-unselecting"), c.unselecting = !0, d._trigger("unselecting", b, {
unselecting: c.element
})))))
}), !1
}
},
_mouseStop: function(b) {
var c = this;
return this.dragged = !1, a(".ui-unselecting", this.element[0]).each(function() {
var d = a.data(this, "selectable-item");
d.$element.removeClass("ui-unselecting"), d.unselecting = !1, d.startselected = !1, c._trigger("unselected", b, {
unselected: d.element
})
}), a(".ui-selecting", this.element[0]).each(function() {
var d = a.data(this, "selectable-item");
d.$element.removeClass("ui-selecting").addClass("ui-selected"), d.selecting = !1, d.selected = !0, d.startselected = !0, c._trigger("selected", b, {
selected: d.element
})
}), this._trigger("stop", b), this.helper.remove(), !1
}
}), a.widget("ui.selectmenu", {
version: "1.11.4",
defaultElement: "<select>",
options: {
appendTo: null,
disabled: null,
icons: {
button: "ui-icon-triangle-1-s"
},
position: {
my: "left top",
at: "left bottom",
collision: "none"
},
width: null,
change: null,
close: null,
focus: null,
open: null,
select: null
},
_create: function() {
var a = this.element.uniqueId().attr("id");
this.ids = {
element: a,
button: a + "-button",
menu: a + "-menu"
}, this._drawButton(), this._drawMenu(), this.options.disabled && this.disable()
},
_drawButton: function() {
var b = this;
this.label = a("label[for='" + this.ids.element + "']").attr("for", this.ids.button), this._on(this.label, {
click: function(a) {
this.button.focus(), a.preventDefault()
}
}), this.element.hide(), this.button = a("<span>", {
"class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
tabindex: this.options.disabled ? -1 : 0,
id: this.ids.button,
role: "combobox",
"aria-expanded": "false",
"aria-autocomplete": "list",
"aria-owns": this.ids.menu,
"aria-haspopup": "true"
}).insertAfter(this.element), a("<span>", {
"class": "ui-icon " + this.options.icons.button
}).prependTo(this.button), this.buttonText = a("<span>", {
"class": "ui-selectmenu-text"
}).appendTo(this.button), this._setText(this.buttonText, this.element.find("option:selected").text()), this._resizeButton(), this._on(this.button, this._buttonEvents), this.button.one("focusin", function() {
b.menuItems || b._refreshMenu()
}), this._hoverable(this.button), this._focusable(this.button)
},
_drawMenu: function() {
var b = this;
this.menu = a("<ul>", {
"aria-hidden": "true",
"aria-labelledby": this.ids.button,
id: this.ids.menu
}), this.menuWrap = a("<div>", {
"class": "ui-selectmenu-menu ui-front"
}).append(this.menu).appendTo(this._appendTo()), this.menuInstance = this.menu.menu({
role: "listbox",
select: function(a, c) {
a.preventDefault(), b._setSelection(), b._select(c.item.data("ui-selectmenu-item"), a)
},
focus: function(a, c) {
var d = c.item.data("ui-selectmenu-item");
null != b.focusIndex && d.index !== b.focusIndex && (b._trigger("focus", a, {
item: d
}), b.isOpen || b._select(d, a)), b.focusIndex = d.index, b.button.attr("aria-activedescendant", b.menuItems.eq(d.index).attr("id"))
}
}).menu("instance"), this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"), this.menuInstance._off(this.menu, "mouseleave"), this.menuInstance._closeOnDocumentClick = function() {
return !1
}, this.menuInstance._isDivider = function() {
return !1
}
},
refresh: function() {
this._refreshMenu(), this._setText(this.buttonText, this._getSelectedItem().text()), this.options.width || this._resizeButton()
},
_refreshMenu: function() {
this.menu.empty();
var a, b = this.element.find("option");
b.length && (this._parseOptions(b), this._renderMenu(this.menu, this.items), this.menuInstance.refresh(), this.menuItems = this.menu.find("li").not(".ui-selectmenu-optgroup"), a = this._getSelectedItem(), this.menuInstance.focus(null, a), this._setAria(a.data("ui-selectmenu-item")), this._setOption("disabled", this.element.prop("disabled")))
},
open: function(a) {
this.options.disabled || (this.menuItems ? (this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),
this.menuInstance.focus(null, this._getSelectedItem())) : this._refreshMenu(), this.isOpen = !0, this._toggleAttr(), this._resizeMenu(), this._position(), this._on(this.document, this._documentClick), this._trigger("open", a))
},
_position: function() {
this.menuWrap.position(a.extend({ of: this.button
}, this.options.position))
},
close: function(a) {
this.isOpen && (this.isOpen = !1, this._toggleAttr(), this.range = null, this._off(this.document), this._trigger("close", a))
},
widget: function() {
return this.button
},
menuWidget: function() {
return this.menu
},
_renderMenu: function(b, c) {
var d = this,
e = "";
a.each(c, function(c, f) {
f.optgroup !== e && (a("<li>", {
"class": "ui-selectmenu-optgroup ui-menu-divider" + (f.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : ""),
text: f.optgroup
}).appendTo(b), e = f.optgroup), d._renderItemData(b, f)
})
},
_renderItemData: function(a, b) {
return this._renderItem(a, b).data("ui-selectmenu-item", b)
},
_renderItem: function(b, c) {
var d = a("<li>");
return c.disabled && d.addClass("ui-state-disabled"), this._setText(d, c.label), d.appendTo(b)
},
_setText: function(a, b) {
b ? a.text(b) : a.html(" ")
},
_move: function(a, b) {
var c, d, e = ".ui-menu-item";
this.isOpen ? c = this.menuItems.eq(this.focusIndex) : (c = this.menuItems.eq(this.element[0].selectedIndex), e += ":not(.ui-state-disabled)"), d = "first" === a || "last" === a ? c["first" === a ? "prevAll" : "nextAll"](e).eq(-1) : c[a + "All"](e).eq(0), d.length && this.menuInstance.focus(b, d)
},
_getSelectedItem: function() {
return this.menuItems.eq(this.element[0].selectedIndex)
},
_toggle: function(a) {
this[this.isOpen ? "close" : "open"](a)
},
_setSelection: function() {
var a;
this.range && (window.getSelection ? (a = window.getSelection(), a.removeAllRanges(), a.addRange(this.range)) : this.range.select(), this.button.focus())
},
_documentClick: {
mousedown: function(b) {
this.isOpen && (a(b.target).closest(".ui-selectmenu-menu, #" + this.ids.button).length || this.close(b))
}
},
_buttonEvents: {
mousedown: function() {
var a;
window.getSelection ? (a = window.getSelection(), a.rangeCount && (this.range = a.getRangeAt(0))) : this.range = document.selection.createRange()
},
click: function(a) {
this._setSelection(), this._toggle(a)
},
keydown: function(b) {
var c = !0;
switch (b.keyCode) {
case a.ui.keyCode.TAB:
case a.ui.keyCode.ESCAPE:
this.close(b), c = !1;
break;
case a.ui.keyCode.ENTER:
this.isOpen && this._selectFocusedItem(b);
break;
case a.ui.keyCode.UP:
b.altKey ? this._toggle(b) : this._move("prev", b);
break;
case a.ui.keyCode.DOWN:
b.altKey ? this._toggle(b) : this._move("next", b);
break;
case a.ui.keyCode.SPACE:
this.isOpen ? this._selectFocusedItem(b) : this._toggle(b);
break;
case a.ui.keyCode.LEFT:
this._move("prev", b);
break;
case a.ui.keyCode.RIGHT:
this._move("next", b);
break;
case a.ui.keyCode.HOME:
case a.ui.keyCode.PAGE_UP:
this._move("first", b);
break;
case a.ui.keyCode.END:
case a.ui.keyCode.PAGE_DOWN:
this._move("last", b);
break;
default:
this.menu.trigger(b), c = !1
}
c && b.preventDefault()
}
},
_selectFocusedItem: function(a) {
var b = this.menuItems.eq(this.focusIndex);
b.hasClass("ui-state-disabled") || this._select(b.data("ui-selectmenu-item"), a)
},
_select: function(a, b) {
var c = this.element[0].selectedIndex;
this.element[0].selectedIndex = a.index, this._setText(this.buttonText, a.label), this._setAria(a), this._trigger("select", b, {
item: a
}), a.index !== c && this._trigger("change", b, {
item: a
}), this.close(b)
},
_setAria: function(a) {
var b = this.menuItems.eq(a.index).attr("id");
this.button.attr({
"aria-labelledby": b,
"aria-activedescendant": b
}), this.menu.attr("aria-activedescendant", b)
},
_setOption: function(a, b) {
"icons" === a && this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(b.button), this._super(a, b), "appendTo" === a && this.menuWrap.appendTo(this._appendTo()), "disabled" === a && (this.menuInstance.option("disabled", b), this.button.toggleClass("ui-state-disabled", b).attr("aria-disabled", b), this.element.prop("disabled", b), b ? (this.button.attr("tabindex", -1), this.close()) : this.button.attr("tabindex", 0)), "width" === a && this._resizeButton()
},
_appendTo: function() {
var b = this.options.appendTo;
return b && (b = b.jquery || b.nodeType ? a(b) : this.document.find(b).eq(0)), b && b[0] || (b = this.element.closest(".ui-front")), b.length || (b = this.document[0].body), b
},
_toggleAttr: function() {
this.button.toggleClass("ui-corner-top", this.isOpen).toggleClass("ui-corner-all", !this.isOpen).attr("aria-expanded", this.isOpen), this.menuWrap.toggleClass("ui-selectmenu-open", this.isOpen), this.menu.attr("aria-hidden", !this.isOpen)
},
_resizeButton: function() {
var a = this.options.width;
a || (a = this.element.show().outerWidth(), this.element.hide()), this.button.outerWidth(a)
},
_resizeMenu: function() {
this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1))
},
_getCreateOptions: function() {
return {
disabled: this.element.prop("disabled")
}
},
_parseOptions: function(b) {
var c = [];
b.each(function(b, d) {
var e = a(d),
f = e.parent("optgroup");
c.push({
element: e,
index: b,
value: e.val(),
label: e.text(),
optgroup: f.attr("label") || "",
disabled: f.prop("disabled") || e.prop("disabled")
})
}), this.items = c
},
_destroy: function() {
this.menuWrap.remove(), this.button.remove(), this.element.show(), this.element.removeUniqueId(), this.label.attr("for", this.ids.element)
}
}), a.widget("ui.slider", a.ui.mouse, {
version: "1.11.4",
widgetEventPrefix: "slide",
options: {
animate: !1,
distance: 0,
max: 100,
min: 0,
orientation: "horizontal",
range: !1,
step: 1,
value: 0,
values: null,
change: null,
slide: null,
start: null,
stop: null
},
numPages: 5,
_create: function() {
this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this._calculateNewMax(), this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all"), this._refresh(), this._setOption("disabled", this.options.disabled), this._animateOff = !1
},
_refresh: function() {
this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue()
},
_createHandles: function() {
var b, c, d = this.options,
e = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),
f = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",
g = [];
for (c = d.values && d.values.length || 1, e.length > c && (e.slice(c).remove(), e = e.slice(0, c)), b = e.length; c > b; b++) g.push(f);
this.handles = e.add(a(g.join("")).appendTo(this.element)), this.handle = this.handles.eq(0), this.handles.each(function(b) {
a(this).data("ui-slider-handle-index", b)
})
},
_createRange: function() {
var b = this.options,
c = "";
b.range ? (b.range === !0 && (b.values ? b.values.length && 2 !== b.values.length ? b.values = [b.values[0], b.values[0]] : a.isArray(b.values) && (b.values = b.values.slice(0)) : b.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({
left: "",
bottom: ""
}) : (this.range = a("<div></div>").appendTo(this.element), c = "ui-slider-range ui-widget-header ui-corner-all"), this.range.addClass(c + ("min" === b.range || "max" === b.range ? " ui-slider-range-" + b.range : ""))) : (this.range && this.range.remove(), this.range = null)
},
_setupEvents: function() {
this._off(this.handles), this._on(this.handles, this._handleEvents), this._hoverable(this.handles), this._focusable(this.handles)
},
_destroy: function() {
this.handles.remove(), this.range && this.range.remove(), this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"), this._mouseDestroy()
},
_mouseCapture: function(b) {
var c, d, e, f, g, h, i, j, k = this,
l = this.options;
return l.disabled ? !1 : (this.elementSize = {
width: this.element.outerWidth(),
height: this.element.outerHeight()
}, this.elementOffset = this.element.offset(), c = {
x: b.pageX,
y: b.pageY
}, d = this._normValueFromMouse(c), e = this._valueMax() - this._valueMin() + 1, this.handles.each(function(b) {
var c = Math.abs(d - k.values(b));
(e > c || e === c && (b === k._lastChangedValue || k.values(b) === l.min)) && (e = c, f = a(this), g = b)
}), h = this._start(b, g), h === !1 ? !1 : (this._mouseSliding = !0, this._handleIndex = g, f.addClass("ui-state-active").focus(), i = f.offset(), j = !a(b.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = j ? {
left: 0,
top: 0
} : {
left: b.pageX - i.left - f.width() / 2,
top: b.pageY - i.top - f.height() / 2 - (parseInt(f.css("borderTopWidth"), 10) || 0) - (parseInt(f.css("borderBottomWidth"), 10) || 0) + (parseInt(f.css("marginTop"), 10) || 0)
}, this.handles.hasClass("ui-state-hover") || this._slide(b, g, d), this._animateOff = !0, !0))
},
_mouseStart: function() {
return !0
},
_mouseDrag: function(a) {
var b = {
x: a.pageX,
y: a.pageY
},
c = this._normValueFromMouse(b);
return this._slide(a, this._handleIndex, c), !1
},
_mouseStop: function(a) {
return this.handles.removeClass("ui-state-active"), this._mouseSliding = !1, this._stop(a, this._handleIndex), this._change(a, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1, !1
},
_detectOrientation: function() {
this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
},
_normValueFromMouse: function(a) {
var b, c, d, e, f;
return "horizontal" === this.orientation ? (b = this.elementSize.width, c = a.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (b = this.elementSize.height, c = a.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), d = c / b, d > 1 && (d = 1), 0 > d && (d = 0), "vertical" === this.orientation && (d = 1 - d), e = this._valueMax() - this._valueMin(), f = this._valueMin() + d * e, this._trimAlignValue(f)
},
_start: function(a, b) {
var c = {
handle: this.handles[b],
value: this.value()
};
return this.options.values && this.options.values.length && (c.value = this.values(b), c.values = this.values()), this._trigger("start", a, c)
},
_slide: function(a, b, c) {
var d, e, f;
this.options.values && this.options.values.length ? (d = this.values(b ? 0 : 1), 2 === this.options.values.length && this.options.range === !0 && (0 === b && c > d || 1 === b && d > c) && (c = d), c !== this.values(b) && (e = this.values(), e[b] = c, f = this._trigger("slide", a, {
handle: this.handles[b],
value: c,
values: e
}), d = this.values(b ? 0 : 1), f !== !1 && this.values(b, c))) : c !== this.value() && (f = this._trigger("slide", a, {
handle: this.handles[b],
value: c
}), f !== !1 && this.value(c))
},
_stop: function(a, b) {
var c = {
handle: this.handles[b],
value: this.value()
};
this.options.values && this.options.values.length && (c.value = this.values(b), c.values = this.values()), this._trigger("stop", a, c)
},
_change: function(a, b) {
if (!this._keySliding && !this._mouseSliding) {
var c = {
handle: this.handles[b],
value: this.value()
};
this.options.values && this.options.values.length && (c.value = this.values(b), c.values = this.values()), this._lastChangedValue = b, this._trigger("change", a, c)
}
},
value: function(a) {
return arguments.length ? (this.options.value = this._trimAlignValue(a), this._refreshValue(), void this._change(null, 0)) : this._value()
},
values: function(b, c) {
var d, e, f;
if (arguments.length > 1) return this.options.values[b] = this._trimAlignValue(c), this._refreshValue(), void this._change(null, b);
if (!arguments.length) return this._values();
if (!a.isArray(arguments[0])) return this.options.values && this.options.values.length ? this._values(b) : this.value();
for (d = this.options.values, e = arguments[0], f = 0; f < d.length; f += 1) d[f] = this._trimAlignValue(e[f]), this._change(null, f);
this._refreshValue()
},
_setOption: function(b, c) {
var d, e = 0;
switch ("range" === b && this.options.range === !0 && ("min" === c ? (this.options.value = this._values(0), this.options.values = null) : "max" === c && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), a.isArray(this.options.values) && (e = this.options.values.length), "disabled" === b && this.element.toggleClass("ui-state-disabled", !!c), this._super(b, c), b) {
case "orientation":
this._detectOrientation(), this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation), this._refreshValue(), this.handles.css("horizontal" === c ? "bottom" : "left", "");
break;
case "value":
this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1;
break;
case "values":
for (this._animateOff = !0, this._refreshValue(), d = 0; e > d; d += 1) this._change(null, d);
this._animateOff = !1;
break;
case "step":
case "min":
case "max":
this._animateOff = !0, this._calculateNewMax(), this._refreshValue(), this._animateOff = !1;
break;
case "range":
this._animateOff = !0, this._refresh(), this._animateOff = !1
}
},
_value: function() {
var a = this.options.value;
return a = this._trimAlignValue(a)
},
_values: function(a) {
var b, c, d;
if (arguments.length) return b = this.options.values[a], b = this._trimAlignValue(b);
if (this.options.values && this.options.values.length) {
for (c = this.options.values.slice(), d = 0; d < c.length; d += 1) c[d] = this._trimAlignValue(c[d]);
return c
}
return []
},
_trimAlignValue: function(a) {
if (a <= this._valueMin()) return this._valueMin();
if (a >= this._valueMax()) return this._valueMax();
var b = this.options.step > 0 ? this.options.step : 1,
c = (a - this._valueMin()) % b,
d = a - c;
return 2 * Math.abs(c) >= b && (d += c > 0 ? b : -b), parseFloat(d.toFixed(5))
},
_calculateNewMax: function() {
var a = this.options.max,
b = this._valueMin(),
c = this.options.step,
d = Math.floor(+(a - b).toFixed(this._precision()) / c) * c;
a = d + b, this.max = parseFloat(a.toFixed(this._precision()))
},
_precision: function() {
var a = this._precisionOf(this.options.step);
return null !== this.options.min && (a = Math.max(a, this._precisionOf(this.options.min))), a
},
_precisionOf: function(a) {
var b = a.toString(),
c = b.indexOf(".");
return -1 === c ? 0 : b.length - c - 1
},
_valueMin: function() {
return this.options.min
},
_valueMax: function() {
return this.max
},
_refreshValue: function() {
var b, c, d, e, f, g = this.options.range,
h = this.options,
i = this,
j = this._animateOff ? !1 : h.animate,
k = {};
this.options.values && this.options.values.length ? this.handles.each(function(d) {
c = (i.values(d) - i._valueMin()) / (i._valueMax() - i._valueMin()) * 100, k["horizontal" === i.orientation ? "left" : "bottom"] = c + "%", a(this).stop(1, 1)[j ? "animate" : "css"](k, h.animate), i.options.range === !0 && ("horizontal" === i.orientation ? (0 === d && i.range.stop(1, 1)[j ? "animate" : "css"]({
left: c + "%"
}, h.animate), 1 === d && i.range[j ? "animate" : "css"]({
width: c - b + "%"
}, {
queue: !1,
duration: h.animate
})) : (0 === d && i.range.stop(1, 1)[j ? "animate" : "css"]({
bottom: c + "%"
}, h.animate), 1 === d && i.range[j ? "animate" : "css"]({
height: c - b + "%"
}, {
queue: !1,
duration: h.animate
}))), b = c
}) : (d = this.value(), e = this._valueMin(), f = this._valueMax(), c = f !== e ? (d - e) / (f - e) * 100 : 0, k["horizontal" === this.orientation ? "left" : "bottom"] = c + "%", this.handle.stop(1, 1)[j ? "animate" : "css"](k, h.animate), "min" === g && "horizontal" === this.orientation && this.range.stop(1, 1)[j ? "animate" : "css"]({
width: c + "%"
}, h.animate), "max" === g && "horizontal" === this.orientation && this.range[j ? "animate" : "css"]({
width: 100 - c + "%"
}, {
queue: !1,
duration: h.animate
}), "min" === g && "vertical" === this.orientation && this.range.stop(1, 1)[j ? "animate" : "css"]({
height: c + "%"
}, h.animate), "max" === g && "vertical" === this.orientation && this.range[j ? "animate" : "css"]({
height: 100 - c + "%"
}, {
queue: !1,
duration: h.animate
}))
},
_handleEvents: {
keydown: function(b) {
var c, d, e, f, g = a(b.target).data("ui-slider-handle-index");
switch (b.keyCode) {
case a.ui.keyCode.HOME:
case a.ui.keyCode.END:
case a.ui.keyCode.PAGE_UP:
case a.ui.keyCode.PAGE_DOWN:
case a.ui.keyCode.UP:
case a.ui.keyCode.RIGHT:
case a.ui.keyCode.DOWN:
case a.ui.keyCode.LEFT:
if (b.preventDefault(), !this._keySliding && (this._keySliding = !0, a(b.target).addClass("ui-state-active"), c = this._start(b, g), c === !1)) return
}
switch (f = this.options.step, d = e = this.options.values && this.options.values.length ? this.values(g) : this.value(), b.keyCode) {
case a.ui.keyCode.HOME:
e = this._valueMin();
break;
case a.ui.keyCode.END:
e = this._valueMax();
break;
case a.ui.keyCode.PAGE_UP:
e = this._trimAlignValue(d + (this._valueMax() - this._valueMin()) / this.numPages);
break;
case a.ui.keyCode.PAGE_DOWN:
e = this._trimAlignValue(d - (this._valueMax() - this._valueMin()) / this.numPages);
break;
case a.ui.keyCode.UP:
case a.ui.keyCode.RIGHT:
if (d === this._valueMax()) return;
e = this._trimAlignValue(d + f);
break;
case a.ui.keyCode.DOWN:
case a.ui.keyCode.LEFT:
if (d === this._valueMin()) return;
e = this._trimAlignValue(d - f)
}
this._slide(b, g, e)
},
keyup: function(b) {
var c = a(b.target).data("ui-slider-handle-index");
this._keySliding && (this._keySliding = !1, this._stop(b, c), this._change(b, c), a(b.target).removeClass("ui-state-active"))
}
}
}), a.widget("ui.sortable", a.ui.mouse, {
version: "1.11.4",
widgetEventPrefix: "sort",
ready: !1,
options: {
appendTo: "parent",
axis: !1,
connectWith: !1,
containment: !1,
cursor: "auto",
cursorAt: !1,
dropOnEmpty: !0,
forcePlaceholderSize: !1,
forceHelperSize: !1,
grid: !1,
handle: !1,
helper: "original",
items: "> *",
opacity: !1,
placeholder: !1,
revert: !1,
scroll: !0,
scrollSensitivity: 20,
scrollSpeed: 20,
scope: "default",
tolerance: "intersect",
zIndex: 1e3,
activate: null,
beforeStop: null,
change: null,
deactivate: null,
out: null,
over: null,
receive: null,
remove: null,
sort: null,
start: null,
stop: null,
update: null
},
_isOverAxis: function(a, b, c) {
return a >= b && b + c > a
},
_isFloating: function(a) {
return /left|right/.test(a.css("float")) || /inline|table-cell/.test(a.css("display"))
},
_create: function() {
this.containerCache = {}, this.element.addClass("ui-sortable"), this.refresh(), this.offset = this.element.offset(), this._mouseInit(), this._setHandleClassName(), this.ready = !0
},
_setOption: function(a, b) {
this._super(a, b), "handle" === a && this._setHandleClassName()
},
_setHandleClassName: function() {
this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"), a.each(this.items, function() {
(this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item).addClass("ui-sortable-handle")
})
},
_destroy: function() {
this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"), this._mouseDestroy();
for (var a = this.items.length - 1; a >= 0; a--) this.items[a].item.removeData(this.widgetName + "-item");
return this
},
_mouseCapture: function(b, c) {
var d = null,
e = !1,
f = this;
return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (this._refreshItems(b), a(b.target).parents().each(function() {
return a.data(this, f.widgetName + "-item") === f ? (d = a(this), !1) : void 0
}), a.data(b.target, f.widgetName + "-item") === f && (d = a(b.target)), d && (!this.options.handle || c || (a(this.options.handle, d).find("*").addBack().each(function() {
this === b.target && (e = !0)
}), e)) ? (this.currentItem = d, this._removeCurrentsFromItems(), !0) : !1)
},
_mouseStart: function(b, c, d) {
var e, f, g = this.options;
if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(b), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {
top: this.offset.top - this.margins.top,
left: this.offset.left - this.margins.left
}, a.extend(this.offset, {
click: {
left: b.pageX - this.offset.left,
top: b.pageY - this.offset.top
},
parent: this._getParentOffset(),
relative: this._getRelativeOffset()
}), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(b), this.originalPageX = b.pageX, this.originalPageY = b.pageY, g.cursorAt && this._adjustOffsetFromHelper(g.cursorAt), this.domPosition = {
prev: this.currentItem.prev()[0],
parent: this.currentItem.parent()[0]
}, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), g.containment && this._setContainment(), g.cursor && "auto" !== g.cursor && (f = this.document.find("body"), this.storedCursor = f.css("cursor"), f.css("cursor", g.cursor), this.storedStylesheet = a("<style>*{ cursor: " + g.cursor + " !important; }</style>").appendTo(f)), g.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", g.opacity)), g.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", g.zIndex)), this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", b, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !d)
for (e = this.containers.length - 1; e >= 0; e--) this.containers[e]._trigger("activate", b, this._uiHash(this));
return a.ui.ddmanager && (a.ui.ddmanager.current = this), a.ui.ddmanager && !g.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this.dragging = !0, this.helper.addClass("ui-sortable-helper"), this._mouseDrag(b), !0
},
_mouseDrag: function(b) {
var c, d, e, f, g = this.options,
h = !1;
for (this.position = this._generatePosition(b), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - b.pageY < g.scrollSensitivity ? this.scrollParent[0].scrollTop = h = this.scrollParent[0].scrollTop + g.scrollSpeed : b.pageY - this.overflowOffset.top < g.scrollSensitivity && (this.scrollParent[0].scrollTop = h = this.scrollParent[0].scrollTop - g.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - b.pageX < g.scrollSensitivity ? this.scrollParent[0].scrollLeft = h = this.scrollParent[0].scrollLeft + g.scrollSpeed : b.pageX - this.overflowOffset.left < g.scrollSensitivity && (this.scrollParent[0].scrollLeft = h = this.scrollParent[0].scrollLeft - g.scrollSpeed)) : (b.pageY - this.document.scrollTop() < g.scrollSensitivity ? h = this.document.scrollTop(this.document.scrollTop() - g.scrollSpeed) : this.window.height() - (b.pageY - this.document.scrollTop()) < g.scrollSensitivity && (h = this.document.scrollTop(this.document.scrollTop() + g.scrollSpeed)), b.pageX - this.document.scrollLeft() < g.scrollSensitivity ? h = this.document.scrollLeft(this.document.scrollLeft() - g.scrollSpeed) : this.window.width() - (b.pageX - this.document.scrollLeft()) < g.scrollSensitivity && (h = this.document.scrollLeft(this.document.scrollLeft() + g.scrollSpeed))), h !== !1 && a.ui.ddmanager && !g.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), c = this.items.length - 1; c >= 0; c--)
if (d = this.items[c], e = d.item[0], f = this._intersectsWithPointer(d), f && d.instance === this.currentContainer && e !== this.currentItem[0] && this.placeholder[1 === f ? "next" : "prev"]()[0] !== e && !a.contains(this.placeholder[0], e) && ("semi-dynamic" === this.options.type ? !a.contains(this.element[0], e) : !0)) {
if (this.direction = 1 === f ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(d)) break;
this._rearrange(b, d), this._trigger("change", b, this._uiHash());
break
}
return this._contactContainers(b), a.ui.ddmanager && a.ui.ddmanager.drag(this, b), this._trigger("sort", b, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1
},
_mouseStop: function(b, c) {
if (b) {
if (a.ui.ddmanager && !this.options.dropBehaviour && a.ui.ddmanager.drop(this, b), this.options.revert) {
var d = this,
e = this.placeholder.offset(),
f = this.options.axis,
g = {};
f && "x" !== f || (g.left = e.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)), f && "y" !== f || (g.top = e.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop)), this.reverting = !0, a(this.helper).animate(g, parseInt(this.options.revert, 10) || 500, function() {
d._clear(b)
})
} else this._clear(b, c);
return !1
}
},
cancel: function() {
if (this.dragging) {
this._mouseUp({
target: null
}), "original" === this.options.helper ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show();
for (var b = this.containers.length - 1; b >= 0; b--) this.containers[b]._trigger("deactivate", null, this._uiHash(this)), this.containers[b].containerCache.over && (this.containers[b]._trigger("out", null, this._uiHash(this)), this.containers[b].containerCache.over = 0)
}
return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), a.extend(this, {
helper: null,
dragging: !1,
reverting: !1,
_noFinalSort: null
}), this.domPosition.prev ? a(this.domPosition.prev).after(this.currentItem) : a(this.domPosition.parent).prepend(this.currentItem)), this
},
serialize: function(b) {
var c = this._getItemsAsjQuery(b && b.connected),
d = [];
return b = b || {}, a(c).each(function() {
var c = (a(b.item || this).attr(b.attribute || "id") || "").match(b.expression || /(.+)[\-=_](.+)/);
c && d.push((b.key || c[1] + "[]") + "=" + (b.key && b.expression ? c[1] : c[2]))
}), !d.length && b.key && d.push(b.key + "="), d.join("&")
},
toArray: function(b) {
var c = this._getItemsAsjQuery(b && b.connected),
d = [];
return b = b || {}, c.each(function() {
d.push(a(b.item || this).attr(b.attribute || "id") || "")
}), d
},
_intersectsWith: function(a) {
var b = this.positionAbs.left,
c = b + this.helperProportions.width,
d = this.positionAbs.top,
e = d + this.helperProportions.height,
f = a.left,
g = f + a.width,
h = a.top,
i = h + a.height,
j = this.offset.click.top,
k = this.offset.click.left,
l = "x" === this.options.axis || d + j > h && i > d + j,
m = "y" === this.options.axis || b + k > f && g > b + k,
n = l && m;
return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" : "height"] > a[this.floating ? "width" : "height"] ? n : f < b + this.helperProportions.width / 2 && c - this.helperProportions.width / 2 < g && h < d + this.helperProportions.height / 2 && e - this.helperProportions.height / 2 < i
},
_intersectsWithPointer: function(a) {
var b = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, a.top, a.height),
c = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, a.left, a.width),
d = b && c,
e = this._getDragVerticalDirection(),
f = this._getDragHorizontalDirection();
return d ? this.floating ? f && "right" === f || "down" === e ? 2 : 1 : e && ("down" === e ? 2 : 1) : !1
},
_intersectsWithSides: function(a) {
var b = this._isOverAxis(this.positionAbs.top + this.offset.click.top, a.top + a.height / 2, a.height),
c = this._isOverAxis(this.positionAbs.left + this.offset.click.left, a.left + a.width / 2, a.width),
d = this._getDragVerticalDirection(),
e = this._getDragHorizontalDirection();
return this.floating && e ? "right" === e && c || "left" === e && !c : d && ("down" === d && b || "up" === d && !b)
},
_getDragVerticalDirection: function() {
var a = this.positionAbs.top - this.lastPositionAbs.top;
return 0 !== a && (a > 0 ? "down" : "up")
},
_getDragHorizontalDirection: function() {
var a = this.positionAbs.left - this.lastPositionAbs.left;
return 0 !== a && (a > 0 ? "right" : "left")
},
refresh: function(a) {
return this._refreshItems(a), this._setHandleClassName(), this.refreshPositions(), this
},
_connectWith: function() {
var a = this.options;
return a.connectWith.constructor === String ? [a.connectWith] : a.connectWith
},
_getItemsAsjQuery: function(b) {
function c() {
h.push(this)
}
var d, e, f, g, h = [],
i = [],
j = this._connectWith();
if (j && b)
for (d = j.length - 1; d >= 0; d--)
for (f = a(j[d], this.document[0]), e = f.length - 1; e >= 0; e--) g = a.data(f[e], this.widgetFullName), g && g !== this && !g.options.disabled && i.push([a.isFunction(g.options.items) ? g.options.items.call(g.element) : a(g.options.items, g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), g]);
for (i.push([a.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
options: this.options,
item: this.currentItem
}) : a(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), d = i.length - 1; d >= 0; d--) i[d][0].each(c);
return a(h)
},
_removeCurrentsFromItems: function() {
var b = this.currentItem.find(":data(" + this.widgetName + "-item)");
this.items = a.grep(this.items, function(a) {
for (var c = 0; c < b.length; c++)
if (b[c] === a.item[0]) return !1;
return !0
})
},
_refreshItems: function(b) {
this.items = [], this.containers = [this];
var c, d, e, f, g, h, i, j, k = this.items,
l = [
[a.isFunction(this.options.items) ? this.options.items.call(this.element[0], b, {
item: this.currentItem
}) : a(this.options.items, this.element), this]
],
m = this._connectWith();
if (m && this.ready)
for (c = m.length - 1; c >= 0; c--)
for (e = a(m[c], this.document[0]), d = e.length - 1; d >= 0; d--) f = a.data(e[d], this.widgetFullName), f && f !== this && !f.options.disabled && (l.push([a.isFunction(f.options.items) ? f.options.items.call(f.element[0], b, {
item: this.currentItem
}) : a(f.options.items, f.element), f]), this.containers.push(f));
for (c = l.length - 1; c >= 0; c--)
for (g = l[c][1], h = l[c][0], d = 0, j = h.length; j > d; d++) i = a(h[d]), i.data(this.widgetName + "-item", g), k.push({
item: i,
instance: g,
width: 0,
height: 0,
left: 0,
top: 0
})
},
refreshPositions: function(b) {
this.floating = this.items.length ? "x" === this.options.axis || this._isFloating(this.items[0].item) : !1, this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset());
var c, d, e, f;
for (c = this.items.length - 1; c >= 0; c--) d = this.items[c], d.instance !== this.currentContainer && this.currentContainer && d.item[0] !== this.currentItem[0] || (e = this.options.toleranceElement ? a(this.options.toleranceElement, d.item) : d.item, b || (d.width = e.outerWidth(), d.height = e.outerHeight()), f = e.offset(), d.left = f.left, d.top = f.top);
if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this);
else
for (c = this.containers.length - 1; c >= 0; c--) f = this.containers[c].element.offset(), this.containers[c].containerCache.left = f.left, this.containers[c].containerCache.top = f.top, this.containers[c].containerCache.width = this.containers[c].element.outerWidth(), this.containers[c].containerCache.height = this.containers[c].element.outerHeight();
return this
},
_createPlaceholder: function(b) {
b = b || this;
var c, d = b.options;
d.placeholder && d.placeholder.constructor !== String || (c = d.placeholder, d.placeholder = {
element: function() {
var d = b.currentItem[0].nodeName.toLowerCase(),
e = a("<" + d + ">", b.document[0]).addClass(c || b.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper");
return "tbody" === d ? b._createTrPlaceholder(b.currentItem.find("tr").eq(0), a("<tr>", b.document[0]).appendTo(e)) : "tr" === d ? b._createTrPlaceholder(b.currentItem, e) : "img" === d && e.attr("src", b.currentItem.attr("src")), c || e.css("visibility", "hidden"), e
},
update: function(a, e) {
(!c || d.forcePlaceholderSize) && (e.height() || e.height(b.currentItem.innerHeight() - parseInt(b.currentItem.css("paddingTop") || 0, 10) - parseInt(b.currentItem.css("paddingBottom") || 0, 10)), e.width() || e.width(b.currentItem.innerWidth() - parseInt(b.currentItem.css("paddingLeft") || 0, 10) - parseInt(b.currentItem.css("paddingRight") || 0, 10)))
}
}), b.placeholder = a(d.placeholder.element.call(b.element, b.currentItem)), b.currentItem.after(b.placeholder), d.placeholder.update(b, b.placeholder)
},
_createTrPlaceholder: function(b, c) {
var d = this;
b.children().each(function() {
a("<td> </td>", d.document[0]).attr("colspan", a(this).attr("colspan") || 1).appendTo(c)
})
},
_contactContainers: function(b) {
var c, d, e, f, g, h, i, j, k, l, m = null,
n = null;
for (c = this.containers.length - 1; c >= 0; c--)
if (!a.contains(this.currentItem[0], this.containers[c].element[0]))
if (this._intersectsWith(this.containers[c].containerCache)) {
if (m && a.contains(this.containers[c].element[0], m.element[0])) continue;
m = this.containers[c], n = c
} else this.containers[c].containerCache.over && (this.containers[c]._trigger("out", b, this._uiHash(this)), this.containers[c].containerCache.over = 0);
if (m)
if (1 === this.containers.length) this.containers[n].containerCache.over || (this.containers[n]._trigger("over", b, this._uiHash(this)), this.containers[n].containerCache.over = 1);
else {
for (e = 1e4, f = null, k = m.floating || this._isFloating(this.currentItem), g = k ? "left" : "top", h = k ? "width" : "height", l = k ? "clientX" : "clientY", d = this.items.length - 1; d >= 0; d--) a.contains(this.containers[n].element[0], this.items[d].item[0]) && this.items[d].item[0] !== this.currentItem[0] && (i = this.items[d].item.offset()[g], j = !1, b[l] - i > this.items[d][h] / 2 && (j = !0), Math.abs(b[l] - i) < e && (e = Math.abs(b[l] - i), f = this.items[d], this.direction = j ? "up" : "down"));
if (!f && !this.options.dropOnEmpty) return;
if (this.currentContainer === this.containers[n]) return void(this.currentContainer.containerCache.over || (this.containers[n]._trigger("over", b, this._uiHash()), this.currentContainer.containerCache.over = 1));
f ? this._rearrange(b, f, null, !0) : this._rearrange(b, null, this.containers[n].element, !0), this._trigger("change", b, this._uiHash()), this.containers[n]._trigger("change", b, this._uiHash(this)), this.currentContainer = this.containers[n], this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[n]._trigger("over", b, this._uiHash(this)), this.containers[n].containerCache.over = 1
}
},
_createHelper: function(b) {
var c = this.options,
d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b, this.currentItem])) : "clone" === c.helper ? this.currentItem.clone() : this.currentItem;
return d.parents("body").length || a("parent" !== c.appendTo ? c.appendTo : this.currentItem[0].parentNode)[0].appendChild(d[0]), d[0] === this.currentItem[0] && (this._storedCSS = {
width: this.currentItem[0].style.width,
height: this.currentItem[0].style.height,
position: this.currentItem.css("position"),
top: this.currentItem.css("top"),
left: this.currentItem.css("left")
}), (!d[0].style.width || c.forceHelperSize) && d.width(this.currentItem.width()), (!d[0].style.height || c.forceHelperSize) && d.height(this.currentItem.height()), d
},
_adjustOffsetFromHelper: function(b) {
"string" == typeof b && (b = b.split(" ")), a.isArray(b) && (b = {
left: +b[0],
top: +b[1] || 0
}), "left" in b && (this.offset.click.left = b.left + this.margins.left), "right" in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), "top" in b && (this.offset.click.top = b.top + this.margins.top), "bottom" in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top)
},
_getParentOffset: function() {
this.offsetParent = this.helper.offsetParent();
var b = this.offsetParent.offset();
return "absolute" === this.cssPosition && this.scrollParent[0] !== this.document[0] && a.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && a.ui.ie) && (b = {
top: 0,
left: 0
}), {
top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
}
},
_getRelativeOffset: function() {
if ("relative" === this.cssPosition) {
var a = this.currentItem.position();
return {
top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
}
}
return {
top: 0,
left: 0
}
},
_cacheMargins: function() {
this.margins = {
left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
top: parseInt(this.currentItem.css("marginTop"), 10) || 0
}
},
_cacheHelperProportions: function() {
this.helperProportions = {
width: this.helper.outerWidth(),
height: this.helper.outerHeight()
}
},
_setContainment: function() {
var b, c, d, e = this.options;
"parent" === e.containment && (e.containment = this.helper[0].parentNode), ("document" === e.containment || "window" === e.containment) && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, "document" === e.containment ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, ("document" === e.containment ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]), /^(document|window|parent)$/.test(e.containment) || (b = a(e.containment)[0], c = a(e.containment).offset(), d = "hidden" !== a(b).css("overflow"), this.containment = [c.left + (parseInt(a(b).css("borderLeftWidth"), 10) || 0) + (parseInt(a(b).css("paddingLeft"), 10) || 0) - this.margins.left, c.top + (parseInt(a(b).css("borderTopWidth"), 10) || 0) + (parseInt(a(b).css("paddingTop"), 10) || 0) - this.margins.top, c.left + (d ? Math.max(b.scrollWidth, b.offsetWidth) : b.offsetWidth) - (parseInt(a(b).css("borderLeftWidth"), 10) || 0) - (parseInt(a(b).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, c.top + (d ? Math.max(b.scrollHeight, b.offsetHeight) : b.offsetHeight) - (parseInt(a(b).css("borderTopWidth"), 10) || 0) - (parseInt(a(b).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top])
},
_convertPositionTo: function(b, c) {
c || (c = this.position);
var d = "absolute" === b ? 1 : -1,
e = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && a.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
f = /(html|body)/i.test(e[0].tagName);
return {
top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : f ? 0 : e.scrollTop()) * d,
left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : f ? 0 : e.scrollLeft()) * d
}
},
_generatePosition: function(b) {
var c, d, e = this.options,
f = b.pageX,
g = b.pageY,
h = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && a.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
i = /(html|body)/i.test(h[0].tagName);
return "relative" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (b.pageX - this.offset.click.left < this.containment[0] && (f = this.containment[0] + this.offset.click.left), b.pageY - this.offset.click.top < this.containment[1] && (g = this.containment[1] + this.offset.click.top), b.pageX - this.offset.click.left > this.containment[2] && (f = this.containment[2] + this.offset.click.left), b.pageY - this.offset.click.top > this.containment[3] && (g = this.containment[3] + this.offset.click.top)), e.grid && (c = this.originalPageY + Math.round((g - this.originalPageY) / e.grid[1]) * e.grid[1], g = this.containment ? c - this.offset.click.top >= this.containment[1] && c - this.offset.click.top <= this.containment[3] ? c : c - this.offset.click.top >= this.containment[1] ? c - e.grid[1] : c + e.grid[1] : c, d = this.originalPageX + Math.round((f - this.originalPageX) / e.grid[0]) * e.grid[0], f = this.containment ? d - this.offset.click.left >= this.containment[0] && d - this.offset.click.left <= this.containment[2] ? d : d - this.offset.click.left >= this.containment[0] ? d - e.grid[0] : d + e.grid[0] : d)), {
top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : i ? 0 : h.scrollTop()),
left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : i ? 0 : h.scrollLeft())
}
},
_rearrange: function(a, b, c, d) {
c ? c[0].appendChild(this.placeholder[0]) : b.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? b.item[0] : b.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1;
var e = this.counter;
this._delay(function() {
e === this.counter && this.refreshPositions(!d)
})
},
_clear: function(a, b) {
function c(a, b, c) {
return function(d) {
c._trigger(a, d, b._uiHash(b))
}
}
this.reverting = !1;
var d, e = [];
if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) {
for (d in this._storedCSS)("auto" === this._storedCSS[d] || "static" === this._storedCSS[d]) && (this._storedCSS[d] = "");
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
} else this.currentItem.show();
for (this.fromOutside && !b && e.push(function(a) {
this._trigger("receive", a, this._uiHash(this.fromOutside))
}), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || b || e.push(function(a) {
this._trigger("update", a, this._uiHash())
}), this !== this.currentContainer && (b || (e.push(function(a) {
this._trigger("remove", a, this._uiHash())
}), e.push(function(a) {
return function(b) {
a._trigger("receive", b, this._uiHash(this))
}
}.call(this, this.currentContainer)), e.push(function(a) {
return function(b) {
a._trigger("update", b, this._uiHash(this))
}
}.call(this, this.currentContainer)))), d = this.containers.length - 1; d >= 0; d--) b || e.push(c("deactivate", this, this.containers[d])), this.containers[d].containerCache.over && (e.push(c("out", this, this.containers[d])), this.containers[d].containerCache.over = 0);
if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex), this.dragging = !1, b || this._trigger("beforeStop", a, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.cancelHelperRemoval || (this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null), !b) {
for (d = 0; d < e.length; d++) e[d].call(this, a);
this._trigger("stop", a, this._uiHash())
}
return this.fromOutside = !1, !this.cancelHelperRemoval
},
_trigger: function() {
a.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel()
},
_uiHash: function(b) {
var c = b || this;
return {
helper: c.helper,
placeholder: c.placeholder || a([]),
position: c.position,
originalPosition: c.originalPosition,
offset: c.positionAbs,
item: c.currentItem,
sender: b ? b.element : null
}
}
}), a.widget("ui.spinner", {
version: "1.11.4",
defaultElement: "<input>",
widgetEventPrefix: "spin",
options: {
culture: null,
icons: {
down: "ui-icon-triangle-1-s",
up: "ui-icon-triangle-1-n"
},
incremental: !0,
max: null,
min: null,
numberFormat: null,
page: 10,
step: 1,
change: null,
spin: null,
start: null,
stop: null
},
_create: function() {
this._setOption("max", this.options.max), this._setOption("min", this.options.min), this._setOption("step", this.options.step), "" !== this.value() && this._value(this.element.val(), !0), this._draw(), this._on(this._events), this._refresh(), this._on(this.window, {
beforeunload: function() {
this.element.removeAttr("autocomplete")
}
})
},
_getCreateOptions: function() {
var b = {},
c = this.element;
return a.each(["min", "max", "step"], function(a, d) {
var e = c.attr(d);
void 0 !== e && e.length && (b[d] = e)
}), b
},
_events: {
keydown: function(a) {
this._start(a) && this._keydown(a) && a.preventDefault()
},
keyup: "_stop",
focus: function() {
this.previous = this.element.val()
},
blur: function(a) {
return this.cancelBlur ? void delete this.cancelBlur : (this._stop(), this._refresh(), void(this.previous !== this.element.val() && this._trigger("change", a)))
},
mousewheel: function(a, b) {
if (b) {
if (!this.spinning && !this._start(a)) return !1;
this._spin((b > 0 ? 1 : -1) * this.options.step, a), clearTimeout(this.mousewheelTimer), this.mousewheelTimer = this._delay(function() {
this.spinning && this._stop(a)
}, 100), a.preventDefault()
}
},
"mousedown .ui-spinner-button": function(b) {
function c() {
var a = this.element[0] === this.document[0].activeElement;
a || (this.element.focus(), this.previous = d, this._delay(function() {
this.previous = d
}))
}
var d;
d = this.element[0] === this.document[0].activeElement ? this.previous : this.element.val(), b.preventDefault(), c.call(this), this.cancelBlur = !0, this._delay(function() {
delete this.cancelBlur, c.call(this)
}), this._start(b) !== !1 && this._repeat(null, a(b.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, b)
},
"mouseup .ui-spinner-button": "_stop",
"mouseenter .ui-spinner-button": function(b) {
return a(b.currentTarget).hasClass("ui-state-active") ? this._start(b) === !1 ? !1 : void this._repeat(null, a(b.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, b) : void 0
},
"mouseleave .ui-spinner-button": "_stop"
},
_draw: function() {
var a = this.uiSpinner = this.element.addClass("ui-spinner-input").attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());
this.element.attr("role", "spinbutton"), this.buttons = a.find(".ui-spinner-button").attr("tabIndex", -1).button().removeClass("ui-corner-all"), this.buttons.height() > Math.ceil(.5 * a.height()) && a.height() > 0 && a.height(a.height()), this.options.disabled && this.disable()
},
_keydown: function(b) {
var c = this.options,
d = a.ui.keyCode;
switch (b.keyCode) {
case d.UP:
return this._repeat(null, 1, b), !0;
case d.DOWN:
return this._repeat(null, -1, b), !0;
case d.PAGE_UP:
return this._repeat(null, c.page, b), !0;
case d.PAGE_DOWN:
return this._repeat(null, -c.page, b), !0
}
return !1
},
_uiSpinnerHtml: function() {
return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"
},
_buttonHtml: function() {
return "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon " + this.options.icons.up + "'>▲</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon " + this.options.icons.down + "'>▼</span></a>"
},
_start: function(a) {
return this.spinning || this._trigger("start", a) !== !1 ? (this.counter || (this.counter = 1), this.spinning = !0, !0) : !1
},
_repeat: function(a, b, c) {
a = a || 500, clearTimeout(this.timer), this.timer = this._delay(function() {
this._repeat(40, b, c)
}, a), this._spin(b * this.options.step, c)
},
_spin: function(a, b) {
var c = this.value() || 0;
this.counter || (this.counter = 1), c = this._adjustValue(c + a * this._increment(this.counter)), this.spinning && this._trigger("spin", b, {
value: c
}) === !1 || (this._value(c), this.counter++)
},
_increment: function(b) {
var c = this.options.incremental;
return c ? a.isFunction(c) ? c(b) : Math.floor(b * b * b / 5e4 - b * b / 500 + 17 * b / 200 + 1) : 1
},
_precision: function() {
var a = this._precisionOf(this.options.step);
return null !== this.options.min && (a = Math.max(a, this._precisionOf(this.options.min))), a
},
_precisionOf: function(a) {
var b = a.toString(),
c = b.indexOf(".");
return -1 === c ? 0 : b.length - c - 1
},
_adjustValue: function(a) {
var b, c, d = this.options;
return b = null !== d.min ? d.min : 0, c = a - b, c = Math.round(c / d.step) * d.step, a = b + c, a = parseFloat(a.toFixed(this._precision())), null !== d.max && a > d.max ? d.max : null !== d.min && a < d.min ? d.min : a
},
_stop: function(a) {
this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter = 0, this.spinning = !1, this._trigger("stop", a))
},
_setOption: function(a, b) {
if ("culture" === a || "numberFormat" === a) {
var c = this._parse(this.element.val());
return this.options[a] = b, void this.element.val(this._format(c))
}("max" === a || "min" === a || "step" === a) && "string" == typeof b && (b = this._parse(b)), "icons" === a && (this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up), this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)), this._super(a, b), "disabled" === a && (this.widget().toggleClass("ui-state-disabled", !!b), this.element.prop("disabled", !!b), this.buttons.button(b ? "disable" : "enable"))
},
_setOptions: i(function(a) {
this._super(a)
}),
_parse: function(a) {
return "string" == typeof a && "" !== a && (a = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(a, 10, this.options.culture) : +a), "" === a || isNaN(a) ? null : a
},
_format: function(a) {
return "" === a ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(a, this.options.numberFormat, this.options.culture) : a
},
_refresh: function() {
this.element.attr({
"aria-valuemin": this.options.min,
"aria-valuemax": this.options.max,
"aria-valuenow": this._parse(this.element.val())
})
},
isValid: function() {
var a = this.value();
return null === a ? !1 : a === this._adjustValue(a)
},
_value: function(a, b) {
var c;
"" !== a && (c = this._parse(a), null !== c && (b || (c = this._adjustValue(c)), a = this._format(c))), this.element.val(a), this._refresh()
},
_destroy: function() {
this.element.removeClass("ui-spinner-input").prop("disabled", !1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.uiSpinner.replaceWith(this.element)
},
stepUp: i(function(a) {
this._stepUp(a)
}),
_stepUp: function(a) {
this._start() && (this._spin((a || 1) * this.options.step), this._stop())
},
stepDown: i(function(a) {
this._stepDown(a)
}),
_stepDown: function(a) {
this._start() && (this._spin((a || 1) * -this.options.step), this._stop())
},
pageUp: i(function(a) {
this._stepUp((a || 1) * this.options.page)
}),
pageDown: i(function(a) {
this._stepDown((a || 1) * this.options.page)
}),
value: function(a) {
return arguments.length ? void i(this._value).call(this, a) : this._parse(this.element.val())
},
widget: function() {
return this.uiSpinner
}
}), a.widget("ui.tabs", {
version: "1.11.4",
delay: 300,
options: {
active: null,
collapsible: !1,
event: "click",
heightStyle: "content",
hide: null,
show: null,
activate: null,
beforeActivate: null,
beforeLoad: null,
load: null
},
_isLocal: function() {
var a = /#.*$/;
return function(b) {
var c, d;
b = b.cloneNode(!1), c = b.href.replace(a, ""), d = location.href.replace(a, "");
try {
c = decodeURIComponent(c)
} catch (e) {}
try {
d = decodeURIComponent(d)
} catch (e) {}
return b.hash.length > 1 && c === d
}
}(),
_create: function() {
var b = this,
c = this.options;
this.running = !1, this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible", c.collapsible), this._processTabs(), c.active = this._initialActive(), a.isArray(c.disabled) && (c.disabled = a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"), function(a) {
return b.tabs.index(a)
}))).sort()), this.active = this.options.active !== !1 && this.anchors.length ? this._findActive(c.active) : a(), this._refresh(), this.active.length && this.load(c.active)
},
_initialActive: function() {
var b = this.options.active,
c = this.options.collapsible,
d = location.hash.substring(1);
return null === b && (d && this.tabs.each(function(c, e) {
return a(e).attr("aria-controls") === d ? (b = c, !1) : void 0
}), null === b && (b = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), (null === b || -1 === b) && (b = this.tabs.length ? 0 : !1)), b !== !1 && (b = this.tabs.index(this.tabs.eq(b)), -1 === b && (b = c ? !1 : 0)), !c && b === !1 && this.anchors.length && (b = 0), b
},
_getCreateEventData: function() {
return {
tab: this.active,
panel: this.active.length ? this._getPanelForTab(this.active) : a()
}
},
_tabKeydown: function(b) {
var c = a(this.document[0].activeElement).closest("li"),
d = this.tabs.index(c),
e = !0;
if (!this._handlePageNav(b)) {
switch (b.keyCode) {
case a.ui.keyCode.RIGHT:
case a.ui.keyCode.DOWN:
d++;
break;
case a.ui.keyCode.UP:
case a.ui.keyCode.LEFT:
e = !1, d--;
break;
case a.ui.keyCode.END:
d = this.anchors.length - 1;
break;
case a.ui.keyCode.HOME:
d = 0;
break;
case a.ui.keyCode.SPACE:
return b.preventDefault(), clearTimeout(this.activating), void this._activate(d);
case a.ui.keyCode.ENTER:
return b.preventDefault(), clearTimeout(this.activating), void this._activate(d === this.options.active ? !1 : d);
default:
return
}
b.preventDefault(), clearTimeout(this.activating), d = this._focusNextTab(d, e), b.ctrlKey || b.metaKey || (c.attr("aria-selected", "false"), this.tabs.eq(d).attr("aria-selected", "true"), this.activating = this._delay(function() {
this.option("active", d)
}, this.delay))
}
},
_panelKeydown: function(b) {
this._handlePageNav(b) || b.ctrlKey && b.keyCode === a.ui.keyCode.UP && (b.preventDefault(), this.active.focus())
},
_handlePageNav: function(b) {
return b.altKey && b.keyCode === a.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : b.altKey && b.keyCode === a.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0
},
_findNextTab: function(b, c) {
function d() {
return b > e && (b = 0), 0 > b && (b = e), b
}
for (var e = this.tabs.length - 1; - 1 !== a.inArray(d(), this.options.disabled);) b = c ? b + 1 : b - 1;
return b
},
_focusNextTab: function(a, b) {
return a = this._findNextTab(a, b), this.tabs.eq(a).focus(), a
},
_setOption: function(a, b) {
return "active" === a ? void this._activate(b) : "disabled" === a ? void this._setupDisabled(b) : (this._super(a, b), "collapsible" === a && (this.element.toggleClass("ui-tabs-collapsible", b), b || this.options.active !== !1 || this._activate(0)), "event" === a && this._setupEvents(b), void("heightStyle" === a && this._setupHeightStyle(b)))
},
_sanitizeSelector: function(a) {
return a ? a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""
},
refresh: function() {
var b = this.options,
c = this.tablist.children(":has(a[href])");
b.disabled = a.map(c.filter(".ui-state-disabled"), function(a) {
return c.index(a)
}), this._processTabs(), b.active !== !1 && this.anchors.length ? this.active.length && !a.contains(this.tablist[0], this.active[0]) ? this.tabs.length === b.disabled.length ? (b.active = !1, this.active = a()) : this._activate(this._findNextTab(Math.max(0, b.active - 1), !1)) : b.active = this.tabs.index(this.active) : (b.active = !1, this.active = a()), this._refresh()
},
_refresh: function() {
this._setupDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({
"aria-selected": "false",
"aria-expanded": "false",
tabIndex: -1
}), this.panels.not(this._getPanelForTab(this.active)).hide().attr({
"aria-hidden": "true"
}), this.active.length ? (this.active.addClass("ui-tabs-active ui-state-active").attr({
"aria-selected": "true",
"aria-expanded": "true",
tabIndex: 0
}), this._getPanelForTab(this.active).show().attr({
"aria-hidden": "false"
})) : this.tabs.eq(0).attr("tabIndex", 0)
},
_processTabs: function() {
var b = this,
c = this.tabs,
d = this.anchors,
e = this.panels;
this.tablist = this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role", "tablist").delegate("> li", "mousedown" + this.eventNamespace, function(b) {
a(this).is(".ui-state-disabled") && b.preventDefault()
}).delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
a(this).closest("li").is(".ui-state-disabled") && this.blur()
}), this.tabs = this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({
role: "tab",
tabIndex: -1
}), this.anchors = this.tabs.map(function() {
return a("a", this)[0]
}).addClass("ui-tabs-anchor").attr({
role: "presentation",
tabIndex: -1
}), this.panels = a(), this.anchors.each(function(c, d) {
var e, f, g, h = a(d).uniqueId().attr("id"),
i = a(d).closest("li"),
j = i.attr("aria-controls");
b._isLocal(d) ? (e = d.hash, g = e.substring(1), f = b.element.find(b._sanitizeSelector(e))) : (g = i.attr("aria-controls") || a({}).uniqueId()[0].id, e = "#" + g, f = b.element.find(e), f.length || (f = b._createPanel(g), f.insertAfter(b.panels[c - 1] || b.tablist)), f.attr("aria-live", "polite")), f.length && (b.panels = b.panels.add(f)), j && i.data("ui-tabs-aria-controls", j), i.attr({
"aria-controls": g,
"aria-labelledby": h
}), f.attr("aria-labelledby", h)
}), this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role", "tabpanel"), c && (this._off(c.not(this.tabs)), this._off(d.not(this.anchors)), this._off(e.not(this.panels)))
},
_getList: function() {
return this.tablist || this.element.find("ol,ul").eq(0)
},
_createPanel: function(b) {
return a("<div>").attr("id", b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", !0)
},
_setupDisabled: function(b) {
a.isArray(b) && (b.length ? b.length === this.anchors.length && (b = !0) : b = !1);
for (var c, d = 0; c = this.tabs[d]; d++) b === !0 || -1 !== a.inArray(d, b) ? a(c).addClass("ui-state-disabled").attr("aria-disabled", "true") : a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");
this.options.disabled = b
},
_setupEvents: function(b) {
var c = {};
b && a.each(b.split(" "), function(a, b) {
c[b] = "_eventHandler"
}), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(!0, this.anchors, {
click: function(a) {
a.preventDefault()
}
}), this._on(this.anchors, c), this._on(this.tabs, {
keydown: "_tabKeydown"
}), this._on(this.panels, {
keydown: "_panelKeydown"
}), this._focusable(this.tabs), this._hoverable(this.tabs)
},
_setupHeightStyle: function(b) {
var c, d = this.element.parent();
"fill" === b ? (c = d.height(), c -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function() {
var b = a(this),
d = b.css("position");
"absolute" !== d && "fixed" !== d && (c -= b.outerHeight(!0))
}), this.element.children().not(this.panels).each(function() {
c -= a(this).outerHeight(!0)
}), this.panels.each(function() {
a(this).height(Math.max(0, c - a(this).innerHeight() + a(this).height()))
}).css("overflow", "auto")) : "auto" === b && (c = 0, this.panels.each(function() {
c = Math.max(c, a(this).height("").height())
}).height(c))
},
_eventHandler: function(b) {
var c = this.options,
d = this.active,
e = a(b.currentTarget),
f = e.closest("li"),
g = f[0] === d[0],
h = g && c.collapsible,
i = h ? a() : this._getPanelForTab(f),
j = d.length ? this._getPanelForTab(d) : a(),
k = {
oldTab: d,
oldPanel: j,
newTab: h ? a() : f,
newPanel: i
};
b.preventDefault(), f.hasClass("ui-state-disabled") || f.hasClass("ui-tabs-loading") || this.running || g && !c.collapsible || this._trigger("beforeActivate", b, k) === !1 || (c.active = h ? !1 : this.tabs.index(f), this.active = g ? a() : f, this.xhr && this.xhr.abort(), j.length || i.length || a.error("jQuery UI Tabs: Mismatching fragment identifier."), i.length && this.load(this.tabs.index(f), b), this._toggle(b, k))
},
_toggle: function(b, c) {
function d() {
f.running = !1, f._trigger("activate", b, c)
}
function e() {
c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"), g.length && f.options.show ? f._show(g, f.options.show, d) : (g.show(), d())
}
var f = this,
g = c.newPanel,
h = c.oldPanel;
this.running = !0, h.length && this.options.hide ? this._hide(h, this.options.hide, function() {
c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), e()
}) : (c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), h.hide(), e()), h.attr("aria-hidden", "true"), c.oldTab.attr({
"aria-selected": "false",
"aria-expanded": "false"
}), g.length && h.length ? c.oldTab.attr("tabIndex", -1) : g.length && this.tabs.filter(function() {
return 0 === a(this).attr("tabIndex")
}).attr("tabIndex", -1), g.attr("aria-hidden", "false"), c.newTab.attr({
"aria-selected": "true",
"aria-expanded": "true",
tabIndex: 0
})
},
_activate: function(b) {
var c, d = this._findActive(b);
d[0] !== this.active[0] && (d.length || (d = this.active), c = d.find(".ui-tabs-anchor")[0], this._eventHandler({
target: c,
currentTarget: c,
preventDefault: a.noop
}))
},
_findActive: function(b) {
return b === !1 ? a() : this.tabs.eq(b)
},
_getIndex: function(a) {
return "string" == typeof a && (a = this.anchors.index(this.anchors.filter("[href$='" + a + "']"))), a
},
_destroy: function() {
this.xhr && this.xhr.abort(), this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"), this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"), this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(), this.tablist.unbind(this.eventNamespace), this.tabs.add(this.panels).each(function() {
a.data(this, "ui-tabs-destroy") ? a(this).remove() : a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")
}), this.tabs.each(function() {
var b = a(this),
c = b.data("ui-tabs-aria-controls");
c ? b.attr("aria-controls", c).removeData("ui-tabs-aria-controls") : b.removeAttr("aria-controls")
}), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", "")
},
enable: function(b) {
var c = this.options.disabled;
c !== !1 && (void 0 === b ? c = !1 : (b = this._getIndex(b), c = a.isArray(c) ? a.map(c, function(a) {
return a !== b ? a : null
}) : a.map(this.tabs, function(a, c) {
return c !== b ? c : null
})), this._setupDisabled(c))
},
disable: function(b) {
var c = this.options.disabled;
if (c !== !0) {
if (void 0 === b) c = !0;
else {
if (b = this._getIndex(b), -1 !== a.inArray(b, c)) return;
c = a.isArray(c) ? a.merge([b], c).sort() : [b]
}
this._setupDisabled(c)
}
},
load: function(b, c) {
b = this._getIndex(b);
var d = this,
e = this.tabs.eq(b),
f = e.find(".ui-tabs-anchor"),
g = this._getPanelForTab(e),
h = {
tab: e,
panel: g
},
i = function(a, b) {
"abort" === b && d.panels.stop(!1, !0), e.removeClass("ui-tabs-loading"), g.removeAttr("aria-busy"), a === d.xhr && delete d.xhr
};
this._isLocal(f[0]) || (this.xhr = a.ajax(this._ajaxSettings(f, c, h)), this.xhr && "canceled" !== this.xhr.statusText && (e.addClass("ui-tabs-loading"), g.attr("aria-busy", "true"), this.xhr.done(function(a, b, e) {
setTimeout(function() {
g.html(a), d._trigger("load", c, h), i(e, b)
}, 1)
}).fail(function(a, b) {
setTimeout(function() {
i(a, b)
}, 1)
})))
},
_ajaxSettings: function(b, c, d) {
var e = this;
return {
url: b.attr("href"),
beforeSend: function(b, f) {
return e._trigger("beforeLoad", c, a.extend({
jqXHR: b,
ajaxSettings: f
}, d))
}
}
},
_getPanelForTab: function(b) {
var c = a(b).attr("aria-controls");
return this.element.find(this._sanitizeSelector("#" + c))
}
}), a.widget("ui.tooltip", {
version: "1.11.4",
options: {
content: function() {
var b = a(this).attr("title") || "";
return a("<a>").text(b).html()
},
hide: !0,
items: "[title]:not([disabled])",
position: {
my: "left top+15",
at: "left bottom",
collision: "flipfit flip"
},
show: !0,
tooltipClass: null,
track: !1,
close: null,
open: null
},
_addDescribedBy: function(b, c) {
var d = (b.attr("aria-describedby") || "").split(/\s+/);
d.push(c), b.data("ui-tooltip-id", c).attr("aria-describedby", a.trim(d.join(" ")))
},
_removeDescribedBy: function(b) {
var c = b.data("ui-tooltip-id"),
d = (b.attr("aria-describedby") || "").split(/\s+/),
e = a.inArray(c, d); - 1 !== e && d.splice(e, 1), b.removeData("ui-tooltip-id"), d = a.trim(d.join(" ")), d ? b.attr("aria-describedby", d) : b.removeAttr("aria-describedby")
},
_create: function() {
this._on({
mouseover: "open",
focusin: "open"
}), this.tooltips = {}, this.parents = {}, this.options.disabled && this._disable(), this.liveRegion = a("<div>").attr({
role: "log",
"aria-live": "assertive",
"aria-relevant": "additions"
}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)
},
_setOption: function(b, c) {
var d = this;
return "disabled" === b ? (this[c ? "_disable" : "_enable"](), void(this.options[b] = c)) : (this._super(b, c), void("content" === b && a.each(this.tooltips, function(a, b) {
d._updateContent(b.element)
})))
},
_disable: function() {
var b = this;
a.each(this.tooltips, function(c, d) {
var e = a.Event("blur");
e.target = e.currentTarget = d.element[0], b.close(e, !0)
}), this.element.find(this.options.items).addBack().each(function() {
var b = a(this);
b.is("[title]") && b.data("ui-tooltip-title", b.attr("title")).removeAttr("title")
})
},
_enable: function() {
this.element.find(this.options.items).addBack().each(function() {
var b = a(this);
b.data("ui-tooltip-title") && b.attr("title", b.data("ui-tooltip-title"))
})
},
open: function(b) {
var c = this,
d = a(b ? b.target : this.element).closest(this.options.items);
d.length && !d.data("ui-tooltip-id") && (d.attr("title") && d.data("ui-tooltip-title", d.attr("title")), d.data("ui-tooltip-open", !0), b && "mouseover" === b.type && d.parents().each(function() {
var b, d = a(this);
d.data("ui-tooltip-open") && (b = a.Event("blur"), b.target = b.currentTarget = this, c.close(b, !0)), d.attr("title") && (d.uniqueId(), c.parents[this.id] = {
element: this,
title: d.attr("title")
}, d.attr("title", ""))
}), this._registerCloseHandlers(b, d), this._updateContent(d, b))
},
_updateContent: function(a, b) {
var c, d = this.options.content,
e = this,
f = b ? b.type : null;
return "string" == typeof d ? this._open(b, a, d) : (c = d.call(a[0], function(c) {
e._delay(function() {
a.data("ui-tooltip-open") && (b && (b.type = f), this._open(b, a, c))
})
}), void(c && this._open(b, a, c)))
},
_open: function(b, c, d) {
function e(a) {
j.of = a, g.is(":hidden") || g.position(j)
}
var f, g, h, i, j = a.extend({}, this.options.position);
if (d) {
if (f = this._find(c)) return void f.tooltip.find(".ui-tooltip-content").html(d);
c.is("[title]") && (b && "mouseover" === b.type ? c.attr("title", "") : c.removeAttr("title")), f = this._tooltip(c), g = f.tooltip, this._addDescribedBy(c, g.attr("id")), g.find(".ui-tooltip-content").html(d), this.liveRegion.children().hide(), d.clone ? (i = d.clone(), i.removeAttr("id").find("[id]").removeAttr("id")) : i = d, a("<div>").html(i).appendTo(this.liveRegion), this.options.track && b && /^mouse/.test(b.type) ? (this._on(this.document, {
mousemove: e
}), e(b)) : g.position(a.extend({ of: c
}, this.options.position)), g.hide(), this._show(g, this.options.show), this.options.show && this.options.show.delay && (h = this.delayedShow = setInterval(function() {
g.is(":visible") && (e(j.of), clearInterval(h))
}, a.fx.interval)), this._trigger("open", b, {
tooltip: g
})
}
},
_registerCloseHandlers: function(b, c) {
var d = {
keyup: function(b) {
if (b.keyCode === a.ui.keyCode.ESCAPE) {
var d = a.Event(b);
d.currentTarget = c[0], this.close(d, !0)
}
}
};
c[0] !== this.element[0] && (d.remove = function() {
this._removeTooltip(this._find(c).tooltip)
}), b && "mouseover" !== b.type || (d.mouseleave = "close"), b && "focusin" !== b.type || (d.focusout = "close"), this._on(!0, c, d)
},
close: function(b) {
var c, d = this,
e = a(b ? b.currentTarget : this.element),
f = this._find(e);
return f ? (c = f.tooltip, void(f.closing || (clearInterval(this.delayedShow), e.data("ui-tooltip-title") && !e.attr("title") && e.attr("title", e.data("ui-tooltip-title")), this._removeDescribedBy(e), f.hiding = !0, c.stop(!0), this._hide(c, this.options.hide, function() {
d._removeTooltip(a(this))
}), e.removeData("ui-tooltip-open"), this._off(e, "mouseleave focusout keyup"), e[0] !== this.element[0] && this._off(e, "remove"), this._off(this.document, "mousemove"), b && "mouseleave" === b.type && a.each(this.parents, function(b, c) {
a(c.element).attr("title", c.title), delete d.parents[b]
}), f.closing = !0, this._trigger("close", b, {
tooltip: c
}), f.hiding || (f.closing = !1)))) : void e.removeData("ui-tooltip-open")
},
_tooltip: function(b) {
var c = a("<div>").attr("role", "tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || "")),
d = c.uniqueId().attr("id");
return a("<div>").addClass("ui-tooltip-content").appendTo(c), c.appendTo(this.document[0].body), this.tooltips[d] = {
element: b,
tooltip: c
}
},
_find: function(a) {
var b = a.data("ui-tooltip-id");
return b ? this.tooltips[b] : null
},
_removeTooltip: function(a) {
a.remove(), delete this.tooltips[a.attr("id")]
},
_destroy: function() {
var b = this;
a.each(this.tooltips, function(c, d) {
var e = a.Event("blur"),
f = d.element;
e.target = e.currentTarget = f[0], b.close(e, !0), a("#" + c).remove(), f.data("ui-tooltip-title") && (f.attr("title") || f.attr("title", f.data("ui-tooltip-title")), f.removeData("ui-tooltip-title"))
}), this.liveRegion.remove()
}
})
}),
function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : a(jQuery);
}(function(a) {
a.extend(a.fn, {
validate: function(b) {
if (!this.length) return void(b && b.debug && window.console && console.warn("Nothing selected, can't validate, returning nothing."));
var c = a.data(this[0], "validator");
return c ? c : (this.attr("novalidate", "novalidate"), c = new a.validator(b, this[0]), a.data(this[0], "validator", c), c.settings.onsubmit && (this.validateDelegate(":submit", "click", function(b) {
c.settings.submitHandler && (c.submitButton = b.target), a(b.target).hasClass("cancel") && (c.cancelSubmit = !0), void 0 !== a(b.target).attr("formnovalidate") && (c.cancelSubmit = !0)
}), this.submit(function(b) {
function d() {
var d, e;
return c.settings.submitHandler ? (c.submitButton && (d = a("<input type='hidden'/>").attr("name", c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)), e = c.settings.submitHandler.call(c, c.currentForm, b), c.submitButton && d.remove(), void 0 !== e ? e : !1) : !0
}
return c.settings.debug && b.preventDefault(), c.cancelSubmit ? (c.cancelSubmit = !1, d()) : c.form() ? c.pendingRequest ? (c.formSubmitted = !0, !1) : d() : (c.focusInvalid(), !1)
})), c)
},
valid: function() {
var b, c;
return a(this[0]).is("form") ? b = this.validate().form() : (b = !0, c = a(this[0].form).validate(), this.each(function() {
b = c.element(this) && b
})), b
},
removeAttrs: function(b) {
var c = {},
d = this;
return a.each(b.split(/\s/), function(a, b) {
c[b] = d.attr(b), d.removeAttr(b)
}), c
},
rules: function(b, c) {
var d, e, f, g, h, i, j = this[0];
if (b) switch (d = a.data(j.form, "validator").settings, e = d.rules, f = a.validator.staticRules(j), b) {
case "add":
a.extend(f, a.validator.normalizeRule(c)), delete f.messages, e[j.name] = f, c.messages && (d.messages[j.name] = a.extend(d.messages[j.name], c.messages));
break;
case "remove":
return c ? (i = {}, a.each(c.split(/\s/), function(b, c) {
i[c] = f[c], delete f[c], "required" === c && a(j).removeAttr("aria-required")
}), i) : (delete e[j.name], f)
}
return g = a.validator.normalizeRules(a.extend({}, a.validator.classRules(j), a.validator.attributeRules(j), a.validator.dataRules(j), a.validator.staticRules(j)), j), g.required && (h = g.required, delete g.required, g = a.extend({
required: h
}, g), a(j).attr("aria-required", "true")), g.remote && (h = g.remote, delete g.remote, g = a.extend(g, {
remote: h
})), g
}
}), a.extend(a.expr[":"], {
blank: function(b) {
return !a.trim("" + a(b).val())
},
filled: function(b) {
return !!a.trim("" + a(b).val())
},
unchecked: function(b) {
return !a(b).prop("checked")
}
}), a.validator = function(b, c) {
this.settings = a.extend(!0, {}, a.validator.defaults, b), this.currentForm = c, this.init()
}, a.validator.format = function(b, c) {
return 1 === arguments.length ? function() {
var c = a.makeArray(arguments);
return c.unshift(b), a.validator.format.apply(this, c)
} : (arguments.length > 2 && c.constructor !== Array && (c = a.makeArray(arguments).slice(1)), c.constructor !== Array && (c = [c]), a.each(c, function(a, c) {
b = b.replace(new RegExp("\\{" + a + "\\}", "g"), function() {
return c
})
}), b)
}, a.extend(a.validator, {
defaults: {
messages: {},
groups: {},
rules: {},
errorClass: "error",
validClass: "valid",
errorElement: "label",
focusCleanup: !1,
focusInvalid: !0,
errorContainer: a([]),
errorLabelContainer: a([]),
onsubmit: !0,
ignore: ":hidden",
ignoreTitle: !1,
onfocusin: function(a) {
this.lastActive = a, this.settings.focusCleanup && (this.settings.unhighlight && this.settings.unhighlight.call(this, a, this.settings.errorClass, this.settings.validClass), this.hideThese(this.errorsFor(a)))
},
onfocusout: function(a) {
this.checkable(a) || !(a.name in this.submitted) && this.optional(a) || this.element(a)
},
onkeyup: function(a, b) {
(9 !== b.which || "" !== this.elementValue(a)) && (a.name in this.submitted || a === this.lastElement) && this.element(a)
},
onclick: function(a) {
a.name in this.submitted ? this.element(a) : a.parentNode.name in this.submitted && this.element(a.parentNode)
},
highlight: function(b, c, d) {
"radio" === b.type ? this.findByName(b.name).addClass(c).removeClass(d) : a(b).addClass(c).removeClass(d)
},
unhighlight: function(b, c, d) {
"radio" === b.type ? this.findByName(b.name).removeClass(c).addClass(d) : a(b).removeClass(c).addClass(d)
}
},
setDefaults: function(b) {
a.extend(a.validator.defaults, b)
},
messages: {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date ( ISO ).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: a.validator.format("Please enter no more than {0} characters."),
minlength: a.validator.format("Please enter at least {0} characters."),
rangelength: a.validator.format("Please enter a value between {0} and {1} characters long."),
range: a.validator.format("Please enter a value between {0} and {1}."),
max: a.validator.format("Please enter a value less than or equal to {0}."),
min: a.validator.format("Please enter a value greater than or equal to {0}.")
},
autoCreateRanges: !1,
prototype: {
init: function() {
function b(b) {
var c = a.data(this[0].form, "validator"),
d = "on" + b.type.replace(/^validate/, ""),
e = c.settings;
e[d] && !this.is(e.ignore) && e[d].call(c, this[0], b)
}
this.labelContainer = a(this.settings.errorLabelContainer), this.errorContext = this.labelContainer.length && this.labelContainer || a(this.currentForm), this.containers = a(this.settings.errorContainer).add(this.settings.errorLabelContainer), this.submitted = {}, this.valueCache = {}, this.pendingRequest = 0, this.pending = {}, this.invalid = {}, this.reset();
var c, d = this.groups = {};
a.each(this.settings.groups, function(b, c) {
"string" == typeof c && (c = c.split(/\s/)), a.each(c, function(a, c) {
d[c] = b
})
}), c = this.settings.rules, a.each(c, function(b, d) {
c[b] = a.validator.normalizeRule(d)
}), a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']", "focusin focusout keyup", b).validateDelegate("select, option, [type='radio'], [type='checkbox']", "click", b), this.settings.invalidHandler && a(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler), a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required", "true")
},
form: function() {
return this.checkForm(), a.extend(this.submitted, this.errorMap), this.invalid = a.extend({}, this.errorMap), this.valid() || a(this.currentForm).triggerHandler("invalid-form", [this]), this.showErrors(), this.valid()
},
checkForm: function() {
this.prepareForm();
for (var a = 0, b = this.currentElements = this.elements(); b[a]; a++) this.check(b[a]);
return this.valid()
},
element: function(b) {
var c = this.clean(b),
d = this.validationTargetFor(c),
e = !0;
return this.lastElement = d, void 0 === d ? delete this.invalid[c.name] : (this.prepareElement(d), this.currentElements = a(d), e = this.check(d) !== !1, e ? delete this.invalid[d.name] : this.invalid[d.name] = !0), a(b).attr("aria-invalid", !e), this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers)), this.showErrors(), e
},
showErrors: function(b) {
if (b) {
a.extend(this.errorMap, b), this.errorList = [];
for (var c in b) this.errorList.push({
message: b[c],
element: this.findByName(c)[0]
});
this.successList = a.grep(this.successList, function(a) {
return !(a.name in b)
})
}
this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors()
},
resetForm: function() {
a.fn.resetForm && a(this.currentForm).resetForm(), this.submitted = {}, this.lastElement = null, this.prepareForm(), this.hideErrors(), this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")
},
numberOfInvalids: function() {
return this.objectLength(this.invalid)
},
objectLength: function(a) {
var b, c = 0;
for (b in a) c++;
return c
},
hideErrors: function() {
this.hideThese(this.toHide)
},
hideThese: function(a) {
a.not(this.containers).text(""), this.addWrapper(a).hide()
},
valid: function() {
return 0 === this.size()
},
size: function() {
return this.errorList.length
},
focusInvalid: function() {
if (this.settings.focusInvalid) try {
a(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin")
} catch (b) {}
},
findLastActive: function() {
var b = this.lastActive;
return b && 1 === a.grep(this.errorList, function(a) {
return a.element.name === b.name
}).length && b
},
elements: function() {
var b = this,
c = {};
return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function() {
return !this.name && b.settings.debug && window.console && console.error("%o has no name assigned", this), this.name in c || !b.objectLength(a(this).rules()) ? !1 : (c[this.name] = !0, !0)
})
},
clean: function(b) {
return a(b)[0]
},
errors: function() {
var b = this.settings.errorClass.split(" ").join(".");
return a(this.settings.errorElement + "." + b, this.errorContext)
},
reset: function() {
this.successList = [], this.errorList = [], this.errorMap = {}, this.toShow = a([]), this.toHide = a([]), this.currentElements = a([])
},
prepareForm: function() {
this.reset(), this.toHide = this.errors().add(this.containers)
},
prepareElement: function(a) {
this.reset(), this.toHide = this.errorsFor(a)
},
elementValue: function(b) {
var c, d = a(b),
e = b.type;
return "radio" === e || "checkbox" === e ? a("input[name='" + b.name + "']:checked").val() : "number" === e && "undefined" != typeof b.validity ? b.validity.badInput ? !1 : d.val() : (c = d.val(), "string" == typeof c ? c.replace(/\r/g, "") : c)
},
check: function(b) {
b = this.validationTargetFor(this.clean(b));
var c, d, e, f = a(b).rules(),
g = a.map(f, function(a, b) {
return b
}).length,
h = !1,
i = this.elementValue(b);
for (d in f) {
e = {
method: d,
parameters: f[d]
};
try {
if (c = a.validator.methods[d].call(this, i, b, e.parameters), "dependency-mismatch" === c && 1 === g) {
h = !0;
continue
}
if (h = !1, "pending" === c) return void(this.toHide = this.toHide.not(this.errorsFor(b)));
if (!c) return this.formatAndAdd(b, e), !1
} catch (j) {
throw this.settings.debug && window.console && console.log("Exception occurred when checking element " + b.id + ", check the '" + e.method + "' method.", j), j
}
}
if (!h) return this.objectLength(f) && this.successList.push(b), !0
},
customDataMessage: function(b, c) {
return a(b).data("msg" + c.charAt(0).toUpperCase() + c.substring(1).toLowerCase()) || a(b).data("msg")
},
customMessage: function(a, b) {
var c = this.settings.messages[a];
return c && (c.constructor === String ? c : c[b])
},
findDefined: function() {
for (var a = 0; a < arguments.length; a++)
if (void 0 !== arguments[a]) return arguments[a];
return void 0
},
defaultMessage: function(b, c) {
return this.findDefined(this.customMessage(b.name, c), this.customDataMessage(b, c), !this.settings.ignoreTitle && b.title || void 0, a.validator.messages[c], "<strong>Warning: No message defined for " + b.name + "</strong>")
},
formatAndAdd: function(b, c) {
var d = this.defaultMessage(b, c.method),
e = /\$?\{(\d+)\}/g;
"function" == typeof d ? d = d.call(this, c.parameters, b) : e.test(d) && (d = a.validator.format(d.replace(e, "{$1}"), c.parameters)), this.errorList.push({
message: d,
element: b,
method: c.method
}), this.errorMap[b.name] = d, this.submitted[b.name] = d
},
addWrapper: function(a) {
return this.settings.wrapper && (a = a.add(a.parent(this.settings.wrapper))), a
},
defaultShowErrors: function() {
var a, b, c;
for (a = 0; this.errorList[a]; a++) c = this.errorList[a], this.settings.highlight && this.settings.highlight.call(this, c.element, this.settings.errorClass, this.settings.validClass), this.showLabel(c.element, c.message);
if (this.errorList.length && (this.toShow = this.toShow.add(this.containers)), this.settings.success)
for (a = 0; this.successList[a]; a++) this.showLabel(this.successList[a]);
if (this.settings.unhighlight)
for (a = 0, b = this.validElements(); b[a]; a++) this.settings.unhighlight.call(this, b[a], this.settings.errorClass, this.settings.validClass);
this.toHide = this.toHide.not(this.toShow), this.hideErrors(), this.addWrapper(this.toShow).show()
},
validElements: function() {
return this.currentElements.not(this.invalidElements())
},
invalidElements: function() {
return a(this.errorList).map(function() {
return this.element
})
},
showLabel: function(b, c) {
var d, e, f, g = this.errorsFor(b),
h = this.idOrName(b),
i = a(b).attr("aria-describedby");
g.length ? (g.removeClass(this.settings.validClass).addClass(this.settings.errorClass), g.html(c)) : (g = a("<" + this.settings.errorElement + ">").attr("id", h + "-error").addClass(this.settings.errorClass).html(c || ""), d = g, this.settings.wrapper && (d = g.hide().show().wrap("<" + this.settings.wrapper + "/>").parent()), this.labelContainer.length ? this.labelContainer.append(d) : this.settings.errorPlacement ? this.settings.errorPlacement(d, a(b)) : d.insertAfter(b), g.is("label") ? g.attr("for", h) : 0 === g.parents("label[for='" + h + "']").length && (f = g.attr("id").replace(/(:|\.|\[|\])/g, "\\$1"), i ? i.match(new RegExp("\\b" + f + "\\b")) || (i += " " + f) : i = f, a(b).attr("aria-describedby", i), e = this.groups[b.name], e && a.each(this.groups, function(b, c) {
c === e && a("[name='" + b + "']", this.currentForm).attr("aria-describedby", g.attr("id"))
}))), !c && this.settings.success && (g.text(""), "string" == typeof this.settings.success ? g.addClass(this.settings.success) : this.settings.success(g, b)), this.toShow = this.toShow.add(g)
},
errorsFor: function(b) {
var c = this.idOrName(b),
d = a(b).attr("aria-describedby"),
e = "label[for='" + c + "'], label[for='" + c + "'] *";
return d && (e = e + ", #" + d.replace(/\s+/g, ", #")), this.errors().filter(e)
},
idOrName: function(a) {
return this.groups[a.name] || (this.checkable(a) ? a.name : a.id || a.name)
},
validationTargetFor: function(b) {
return this.checkable(b) && (b = this.findByName(b.name)), a(b).not(this.settings.ignore)[0]
},
checkable: function(a) {
return /radio|checkbox/i.test(a.type)
},
findByName: function(b) {
return a(this.currentForm).find("[name='" + b + "']")
},
getLength: function(b, c) {
switch (c.nodeName.toLowerCase()) {
case "select":
return a("option:selected", c).length;
case "input":
if (this.checkable(c)) return this.findByName(c.name).filter(":checked").length
}
return b.length
},
depend: function(a, b) {
return this.dependTypes[typeof a] ? this.dependTypes[typeof a](a, b) : !0
},
dependTypes: {
"boolean": function(a) {
return a
},
string: function(b, c) {
return !!a(b, c.form).length
},
"function": function(a, b) {
return a(b)
}
},
optional: function(b) {
var c = this.elementValue(b);
return !a.validator.methods.required.call(this, c, b) && "dependency-mismatch"
},
startRequest: function(a) {
this.pending[a.name] || (this.pendingRequest++, this.pending[a.name] = !0)
},
stopRequest: function(b, c) {
this.pendingRequest--, this.pendingRequest < 0 && (this.pendingRequest = 0), delete this.pending[b.name], c && 0 === this.pendingRequest && this.formSubmitted && this.form() ? (a(this.currentForm).submit(), this.formSubmitted = !1) : !c && 0 === this.pendingRequest && this.formSubmitted && (a(this.currentForm).triggerHandler("invalid-form", [this]), this.formSubmitted = !1)
},
previousValue: function(b) {
return a.data(b, "previousValue") || a.data(b, "previousValue", {
old: null,
valid: !0,
message: this.defaultMessage(b, "remote")
})
}
},
classRuleSettings: {
required: {
required: !0
},
email: {
email: !0
},
url: {
url: !0
},
date: {
date: !0
},
dateISO: {
dateISO: !0
},
number: {
number: !0
},
digits: {
digits: !0
},
creditcard: {
creditcard: !0
}
},
addClassRules: function(b, c) {
b.constructor === String ? this.classRuleSettings[b] = c : a.extend(this.classRuleSettings, b)
},
classRules: function(b) {
var c = {},
d = a(b).attr("class");
return d && a.each(d.split(" "), function() {
this in a.validator.classRuleSettings && a.extend(c, a.validator.classRuleSettings[this])
}), c
},
attributeRules: function(b) {
var c, d, e = {},
f = a(b),
g = b.getAttribute("type");
for (c in a.validator.methods) "required" === c ? (d = b.getAttribute(c), "" === d && (d = !0), d = !!d) : d = f.attr(c), /min|max/.test(c) && (null === g || /number|range|text/.test(g)) && (d = Number(d)), d || 0 === d ? e[c] = d : g === c && "range" !== g && (e[c] = !0);
return e.maxlength && /-1|2147483647|524288/.test(e.maxlength) && delete e.maxlength, e
},
dataRules: function(b) {
var c, d, e = {},
f = a(b);
for (c in a.validator.methods) d = f.data("rule" + c.charAt(0).toUpperCase() + c.substring(1).toLowerCase()), void 0 !== d && (e[c] = d);
return e
},
staticRules: function(b) {
var c = {},
d = a.data(b.form, "validator");
return d.settings.rules && (c = a.validator.normalizeRule(d.settings.rules[b.name]) || {}), c
},
normalizeRules: function(b, c) {
return a.each(b, function(d, e) {
if (e === !1) return void delete b[d];
if (e.param || e.depends) {
var f = !0;
switch (typeof e.depends) {
case "string":
f = !!a(e.depends, c.form).length;
break;
case "function":
f = e.depends.call(c, c)
}
f ? b[d] = void 0 !== e.param ? e.param : !0 : delete b[d]
}
}), a.each(b, function(d, e) {
b[d] = a.isFunction(e) ? e(c) : e
}), a.each(["minlength", "maxlength"], function() {
b[this] && (b[this] = Number(b[this]))
}), a.each(["rangelength", "range"], function() {
var c;
b[this] && (a.isArray(b[this]) ? b[this] = [Number(b[this][0]), Number(b[this][1])] : "string" == typeof b[this] && (c = b[this].replace(/[\[\]]/g, "").split(/[\s,]+/), b[this] = [Number(c[0]), Number(c[1])]))
}), a.validator.autoCreateRanges && (null != b.min && null != b.max && (b.range = [b.min, b.max], delete b.min, delete b.max), null != b.minlength && null != b.maxlength && (b.rangelength = [b.minlength, b.maxlength], delete b.minlength, delete b.maxlength)), b
},
normalizeRule: function(b) {
if ("string" == typeof b) {
var c = {};
a.each(b.split(/\s/), function() {
c[this] = !0
}), b = c
}
return b
},
addMethod: function(b, c, d) {
a.validator.methods[b] = c, a.validator.messages[b] = void 0 !== d ? d : a.validator.messages[b], c.length < 3 && a.validator.addClassRules(b, a.validator.normalizeRule(b))
},
methods: {
required: function(b, c, d) {
if (!this.depend(d, c)) return "dependency-mismatch";
if ("select" === c.nodeName.toLowerCase()) {
var e = a(c).val();
return e && e.length > 0
}
return this.checkable(c) ? this.getLength(b, c) > 0 : a.trim(b).length > 0
},
email: function(a, b) {
return this.optional(b) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[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])?)*$/.test(a)
},
url: function(a, b) {
return this.optional(b) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)
},
date: function(a, b) {
return this.optional(b) || !/Invalid|NaN/.test(new Date(a).toString())
},
dateISO: function(a, b) {
return this.optional(b) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)
},
number: function(a, b) {
return this.optional(b) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)
},
digits: function(a, b) {
return this.optional(b) || /^\d+$/.test(a)
},
creditcard: function(a, b) {
if (this.optional(b)) return "dependency-mismatch";
if (/[^0-9 \-]+/.test(a)) return !1;
var c, d, e = 0,
f = 0,
g = !1;
if (a = a.replace(/\D/g, ""), a.length < 13 || a.length > 19) return !1;
for (c = a.length - 1; c >= 0; c--) d = a.charAt(c), f = parseInt(d, 10), g && (f *= 2) > 9 && (f -= 9), e += f, g = !g;
return e % 10 === 0
},
minlength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(b, c);
return this.optional(c) || e >= d
},
maxlength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(b, c);
return this.optional(c) || d >= e
},
rangelength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(b, c);
return this.optional(c) || e >= d[0] && e <= d[1]
},
min: function(a, b, c) {
return this.optional(b) || a >= c
},
max: function(a, b, c) {
return this.optional(b) || c >= a
},
range: function(a, b, c) {
return this.optional(b) || a >= c[0] && a <= c[1]
},
equalTo: function(b, c, d) {
var e = a(d);
return this.settings.onfocusout && e.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
a(c).valid()
}), b === e.val()
},
remote: function(b, c, d) {
if (this.optional(c)) return "dependency-mismatch";
var e, f, g = this.previousValue(c);
return this.settings.messages[c.name] || (this.settings.messages[c.name] = {}), g.originalMessage = this.settings.messages[c.name].remote, this.settings.messages[c.name].remote = g.message, d = "string" == typeof d && {
url: d
} || d, g.old === b ? g.valid : (g.old = b, e = this, this.startRequest(c), f = {}, f[c.name] = b, a.ajax(a.extend(!0, {
url: d,
mode: "abort",
port: "validate" + c.name,
dataType: "json",
data: f,
context: e.currentForm,
success: function(d) {
var f, h, i, j = d === !0 || "true" === d;
e.settings.messages[c.name].remote = g.originalMessage, j ? (i = e.formSubmitted, e.prepareElement(c), e.formSubmitted = i, e.successList.push(c), delete e.invalid[c.name], e.showErrors()) : (f = {}, h = d || e.defaultMessage(c, "remote"), f[c.name] = g.message = a.isFunction(h) ? h(b) : h, e.invalid[c.name] = !0, e.showErrors(f)), g.valid = j, e.stopRequest(c, j)
}
}, d)), "pending")
}
}
}), a.format = function() {
throw "$.format has been deprecated. Please use $.validator.format instead."
};
var b, c = {};
a.ajaxPrefilter ? a.ajaxPrefilter(function(a, b, d) {
var e = a.port;
"abort" === a.mode && (c[e] && c[e].abort(), c[e] = d)
}) : (b = a.ajax, a.ajax = function(d) {
var e = ("mode" in d ? d : a.ajaxSettings).mode,
f = ("port" in d ? d : a.ajaxSettings).port;
return "abort" === e ? (c[f] && c[f].abort(), c[f] = b.apply(this, arguments), c[f]) : b.apply(this, arguments)
}), a.extend(a.fn, {
validateDelegate: function(b, c, d) {
return this.bind(c, function(c) {
var e = a(c.target);
return e.is(b) ? d.apply(e, arguments) : void 0
})
}
})
}),
function(a) {
if ("function" == typeof define && define.amd) define(a);
else if ("object" == typeof exports) module.exports = a();
else {
var b = window.Cookies,
c = window.Cookies = a();
c.noConflict = function() {
return window.Cookies = b, c
}
}
}(function() {
function a() {
for (var a = 0, b = {}; a < arguments.length; a++) {
var c = arguments[a];
for (var d in c) b[d] = c[d]
}
return b
}
function b(c) {
function d(b, e, f) {
var g;
if ("undefined" != typeof document) {
if (arguments.length > 1) {
if (f = a({
path: "/"
}, d.defaults, f), "number" == typeof f.expires) {
var h = new Date;
h.setMilliseconds(h.getMilliseconds() + 864e5 * f.expires), f.expires = h
}
try {
g = JSON.stringify(e), /^[\{\[]/.test(g) && (e = g)
} catch (i) {}
return e = c.write ? c.write(e, b) : encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), b = encodeURIComponent(String(b)), b = b.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent), b = b.replace(/[\(\)]/g, escape), document.cookie = [b, "=", e, f.expires && "; expires=" + f.expires.toUTCString(), f.path && "; path=" + f.path, f.domain && "; domain=" + f.domain, f.secure ? "; secure" : ""].join("")
}
b || (g = {});
for (var j = document.cookie ? document.cookie.split("; ") : [], k = /(%[0-9A-Z]{2})+/g, l = 0; l < j.length; l++) {
var m = j[l].split("="),
n = m.slice(1).join("=");
'"' === n.charAt(0) && (n = n.slice(1, -1));
try {
var o = m[0].replace(k, decodeURIComponent);
if (n = c.read ? c.read(n, o) : c(n, o) || n.replace(k, decodeURIComponent), this.json) try {
n = JSON.parse(n)
} catch (i) {}
if (b === o) {
g = n;
break
}
b || (g[o] = n)
} catch (i) {}
}
return g
}
}
return d.set = d, d.get = function(a) {
return d(a)
}, d.getJSON = function() {
return d.apply({
json: !0
}, [].slice.call(arguments))
}, d.defaults = {}, d.remove = function(b, c) {
d(b, "", a(c, {
expires: -1
}))
}, d.withConverter = b, d
}
return b(function() {})
}),
function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : jQuery)
}(function(a) {
function b(b, d, e) {
var d = {
content: {
message: "object" == typeof d ? d.message : d,
title: d.title ? d.title : "",
icon: d.icon ? d.icon : "",
url: d.url ? d.url : "#",
target: d.target ? d.target : "-"
}
};
e = a.extend(!0, {}, d, e), this.settings = a.extend(!0, {}, c, e), this._defaults = c, "-" == this.settings.content.target && (this.settings.content.target = this.settings.url_target), this.animations = {
start: "webkitAnimationStart oanimationstart MSAnimationStart animationstart",
end: "webkitAnimationEnd oanimationend MSAnimationEnd animationend"
}, "number" == typeof this.settings.offset && (this.settings.offset = {
x: this.settings.offset,
y: this.settings.offset
}), this.init()
}
var c = {
element: "body",
position: null,
type: "info",
allow_dismiss: !0,
newest_on_top: !1,
showProgressbar: !1,
placement: {
from: "top",
align: "right"
},
offset: 20,
spacing: 10,
z_index: 1031,
delay: 5e3,
timer: 1e3,
url_target: "_blank",
mouse_over: null,
animate: {
enter: "animated fadeInDown",
exit: "animated fadeOutUp"
},
onShow: null,
onShown: null,
onClose: null,
onClosed: null,
icon_type: "class",
template: '<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'
};
String.format = function() {
for (var a = arguments[0], b = 1; b < arguments.length; b++) a = a.replace(RegExp("\\{" + (b - 1) + "\\}", "gm"), arguments[b]);
return a
}, a.extend(b.prototype, {
init: function() {
var a = this;
this.buildNotify(), this.settings.content.icon && this.setIcon(), "#" != this.settings.content.url && this.styleURL(), this.placement(), this.bind(), this.notify = {
$ele: this.$ele,
update: function(b, c) {
var d = {};
"string" == typeof b ? d[b] = c : d = b;
for (var b in d) switch (b) {
case "type":
this.$ele.removeClass("alert-" + a.settings.type), this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-" + a.settings.type), a.settings.type = d[b], this.$ele.addClass("alert-" + d[b]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-" + d[b]);
break;
case "icon":
var e = this.$ele.find('[data-notify="icon"]');
"class" == a.settings.icon_type.toLowerCase() ? e.removeClass(a.settings.content.icon).addClass(d[b]) : (e.is("img") || e.find("img"), e.attr("src", d[b]));
break;
case "progress":
var f = a.settings.delay - a.settings.delay * (d[b] / 100);
this.$ele.data("notify-delay", f), this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow", d[b]).css("width", d[b] + "%");
break;
case "url":
this.$ele.find('[data-notify="url"]').attr("href", d[b]);
break;
case "target":
this.$ele.find('[data-notify="url"]').attr("target", d[b]);
break;
default:
this.$ele.find('[data-notify="' + b + '"]').html(d[b])
}
var g = this.$ele.outerHeight() + parseInt(a.settings.spacing) + parseInt(a.settings.offset.y);
a.reposition(g)
},
close: function() {
a.close()
}
}
},
buildNotify: function() {
var b = this.settings.content;
this.$ele = a(String.format(this.settings.template, this.settings.type, b.title, b.message, b.url, b.target)), this.$ele.attr("data-notify-position", this.settings.placement.from + "-" + this.settings.placement.align), this.settings.allow_dismiss || this.$ele.find('[data-notify="dismiss"]').css("display", "none"), (this.settings.delay <= 0 && !this.settings.showProgressbar || !this.settings.showProgressbar) && this.$ele.find('[data-notify="progressbar"]').remove()
},
setIcon: function() {
"class" == this.settings.icon_type.toLowerCase() ? this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon) : this.$ele.find('[data-notify="icon"]').is("img") ? this.$ele.find('[data-notify="icon"]').attr("src", this.settings.content.icon) : this.$ele.find('[data-notify="icon"]').append('<img src="' + this.settings.content.icon + '" alt="Notify Icon" />')
},
styleURL: function() {
this.$ele.find('[data-notify="url"]').css({
backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",
height: "100%",
left: "0px",
position: "absolute",
top: "0px",
width: "100%",
zIndex: this.settings.z_index + 1
}), this.$ele.find('[data-notify="dismiss"]').css({
position: "absolute",
right: "10px",
top: "5px",
zIndex: this.settings.z_index + 2
})
},
placement: function() {
var b = this,
c = this.settings.offset.y,
d = {
display: "inline-block",
margin: "0px auto",
position: this.settings.position ? this.settings.position : "body" === this.settings.element ? "fixed" : "absolute",
transition: "all .5s ease-in-out",
zIndex: this.settings.z_index
},
e = !1,
f = this.settings;
switch (a('[data-notify-position="' + this.settings.placement.from + "-" + this.settings.placement.align + '"]:not([data-closing="true"])').each(function() {
return c = Math.max(c, parseInt(a(this).css(f.placement.from)) + parseInt(a(this).outerHeight()) + parseInt(f.spacing))
}), 1 == this.settings.newest_on_top && (c = this.settings.offset.y), d[this.settings.placement.from] = c + "px", this.settings.placement.align) {
case "left":
case "right":
d[this.settings.placement.align] = this.settings.offset.x + "px";
break;
case "center":
d.left = 0, d.right = 0
}
this.$ele.css(d).addClass(this.settings.animate.enter), a.each(Array("webkit", "moz", "o", "ms", ""), function(a, c) {
b.$ele[0].style[c + "AnimationIterationCount"] = 1
}), a(this.settings.element).append(this.$ele), 1 == this.settings.newest_on_top && (c = parseInt(c) + parseInt(this.settings.spacing) + this.$ele.outerHeight(), this.reposition(c)), a.isFunction(b.settings.onShow) && b.settings.onShow.call(this.$ele), this.$ele.one(this.animations.start, function() {
e = !0
}).one(this.animations.end, function() {
a.isFunction(b.settings.onShown) && b.settings.onShown.call(this)
}), setTimeout(function() {
e || a.isFunction(b.settings.onShown) && b.settings.onShown.call(this)
}, 600)
},
bind: function() {
var b = this;
if (this.$ele.find('[data-notify="dismiss"]').on("click", function() {
b.close()
}), this.$ele.mouseover(function() {
a(this).data("data-hover", "true")
}).mouseout(function() {
a(this).data("data-hover", "false")
}), this.$ele.data("data-hover", "false"), this.settings.delay > 0) {
b.$ele.data("notify-delay", b.settings.delay);
var c = setInterval(function() {
var a = parseInt(b.$ele.data("notify-delay")) - b.settings.timer;
if ("false" === b.$ele.data("data-hover") && "pause" == b.settings.mouse_over || "pause" != b.settings.mouse_over) {
var d = (b.settings.delay - a) / b.settings.delay * 100;
b.$ele.data("notify-delay", a), b.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow", d).css("width", d + "%")
}
a <= -b.settings.timer && (clearInterval(c), b.close())
}, b.settings.timer)
}
},
close: function() {
var b = this,
c = parseInt(this.$ele.css(this.settings.placement.from)),
d = !1;
this.$ele.data("closing", "true").addClass(this.settings.animate.exit), b.reposition(c), a.isFunction(b.settings.onClose) && b.settings.onClose.call(this.$ele), this.$ele.one(this.animations.start, function() {
d = !0
}).one(this.animations.end, function() {
a(this).remove(), a.isFunction(b.settings.onClosed) && b.settings.onClosed.call(this)
}), setTimeout(function() {
d || (b.$ele.remove(), b.settings.onClosed && b.settings.onClosed(b.$ele))
}, 600)
},
reposition: function(b) {
var c = this,
d = '[data-notify-position="' + this.settings.placement.from + "-" + this.settings.placement.align + '"]:not([data-closing="true"])',
e = this.$ele.nextAll(d);
1 == this.settings.newest_on_top && (e = this.$ele.prevAll(d)), e.each(function() {
a(this).css(c.settings.placement.from, b), b = parseInt(b) + parseInt(c.settings.spacing) + a(this).outerHeight()
})
}
}), a.notify = function(a, c) {
var d = new b(this, a, c);
return d.notify
}, a.notifyDefaults = function(b) {
return c = a.extend(!0, {}, c, b)
}, a.notifyClose = function(b) {
"undefined" == typeof b || "all" == b ? a("[data-notify]").find('[data-notify="dismiss"]').trigger("click") : a('[data-notify-position="' + b + '"]').find('[data-notify="dismiss"]').trigger("click")
}
}),
function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : jQuery)
}(function(a, b) {
function c() {
return new Date(Date.UTC.apply(Date, arguments))
}
"indexOf" in Array.prototype || (Array.prototype.indexOf = function(a, c) {
c === b && (c = 0), 0 > c && (c += this.length), 0 > c && (c = 0);
for (var d = this.length; d > c; c++)
if (c in this && this[c] === a) return c;
return -1
});
var d = function(c, d) {
var e = this;
this.element = a(c), this.container = d.container || "body", this.language = d.language || this.element.data("date-language") || "en", this.language = this.language in f ? this.language : this.language.split("-")[0], this.language = this.language in f ? this.language : "en", this.isRTL = f[this.language].rtl || !1, this.formatType = d.formatType || this.element.data("format-type") || "standard", this.format = g.parseFormat(d.format || this.element.data("date-format") || f[this.language].format || g.getDefaultFormat(this.formatType, "input"), this.formatType), this.isInline = !1, this.isVisible = !1, this.isInput = this.element.is("input"), this.fontAwesome = d.fontAwesome || this.element.data("font-awesome") || !1,
this.bootcssVer = d.bootcssVer || (this.isInput ? this.element.is(".form-control") ? 3 : 2 : this.bootcssVer = this.element.is(".input-group") ? 3 : 2), this.component = this.element.is(".date") ? 3 == this.bootcssVer ? this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent() : this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o").parent() : !1, this.componentReset = this.element.is(".date") ? 3 == this.bootcssVer ? this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent() : this.element.find(".add-on .icon-remove, .add-on .fa-times").parent() : !1, this.hasInput = this.component && this.element.find("input").length, this.component && 0 === this.component.length && (this.component = !1), this.linkField = d.linkField || this.element.data("link-field") || !1, this.linkFormat = g.parseFormat(d.linkFormat || this.element.data("link-format") || g.getDefaultFormat(this.formatType, "link"), this.formatType), this.minuteStep = d.minuteStep || this.element.data("minute-step") || 5, this.pickerPosition = d.pickerPosition || this.element.data("picker-position") || "bottom-right", this.showMeridian = d.showMeridian || this.element.data("show-meridian") || !1, this.initialDate = d.initialDate || new Date, this.zIndex = d.zIndex || this.element.data("z-index") || b, this.title = "undefined" == typeof d.title ? !1 : d.title, this.defaultTimeZone = (new Date).toString().split("(")[1].slice(0, -1), this.timezone = d.timezone || this.defaultTimeZone, this.icons = {
leftArrow: this.fontAwesome ? "fa-arrow-left" : 3 === this.bootcssVer ? "glyphicon-arrow-left" : "icon-arrow-left",
rightArrow: this.fontAwesome ? "fa-arrow-right" : 3 === this.bootcssVer ? "glyphicon-arrow-right" : "icon-arrow-right"
}, this.icontype = this.fontAwesome ? "fa" : "glyphicon", this._attachEvents(), this.clickedOutside = function(b) {
0 === a(b.target).closest(".datetimepicker").length && e.hide()
}, this.formatViewType = "datetime", "formatViewType" in d ? this.formatViewType = d.formatViewType : "formatViewType" in this.element.data() && (this.formatViewType = this.element.data("formatViewType")), this.minView = 0, "minView" in d ? this.minView = d.minView : "minView" in this.element.data() && (this.minView = this.element.data("min-view")), this.minView = g.convertViewMode(this.minView), this.maxView = g.modes.length - 1, "maxView" in d ? this.maxView = d.maxView : "maxView" in this.element.data() && (this.maxView = this.element.data("max-view")), this.maxView = g.convertViewMode(this.maxView), this.wheelViewModeNavigation = !1, "wheelViewModeNavigation" in d ? this.wheelViewModeNavigation = d.wheelViewModeNavigation : "wheelViewModeNavigation" in this.element.data() && (this.wheelViewModeNavigation = this.element.data("view-mode-wheel-navigation")), this.wheelViewModeNavigationInverseDirection = !1, "wheelViewModeNavigationInverseDirection" in d ? this.wheelViewModeNavigationInverseDirection = d.wheelViewModeNavigationInverseDirection : "wheelViewModeNavigationInverseDirection" in this.element.data() && (this.wheelViewModeNavigationInverseDirection = this.element.data("view-mode-wheel-navigation-inverse-dir")), this.wheelViewModeNavigationDelay = 100, "wheelViewModeNavigationDelay" in d ? this.wheelViewModeNavigationDelay = d.wheelViewModeNavigationDelay : "wheelViewModeNavigationDelay" in this.element.data() && (this.wheelViewModeNavigationDelay = this.element.data("view-mode-wheel-navigation-delay")), this.startViewMode = 2, "startView" in d ? this.startViewMode = d.startView : "startView" in this.element.data() && (this.startViewMode = this.element.data("start-view")), this.startViewMode = g.convertViewMode(this.startViewMode), this.viewMode = this.startViewMode, this.viewSelect = this.minView, "viewSelect" in d ? this.viewSelect = d.viewSelect : "viewSelect" in this.element.data() && (this.viewSelect = this.element.data("view-select")), this.viewSelect = g.convertViewMode(this.viewSelect), this.forceParse = !0, "forceParse" in d ? this.forceParse = d.forceParse : "dateForceParse" in this.element.data() && (this.forceParse = this.element.data("date-force-parse"));
for (var h = 3 === this.bootcssVer ? g.templateV3 : g.template; - 1 !== h.indexOf("{iconType}");) h = h.replace("{iconType}", this.icontype);
for (; - 1 !== h.indexOf("{leftArrow}");) h = h.replace("{leftArrow}", this.icons.leftArrow);
for (; - 1 !== h.indexOf("{rightArrow}");) h = h.replace("{rightArrow}", this.icons.rightArrow);
if (this.picker = a(h).appendTo(this.isInline ? this.element : this.container).on({
click: a.proxy(this.click, this),
mousedown: a.proxy(this.mousedown, this)
}), this.wheelViewModeNavigation && (a.fn.mousewheel ? this.picker.on({
mousewheel: a.proxy(this.mousewheel, this)
}) : console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")), this.picker.addClass(this.isInline ? "datetimepicker-inline" : "datetimepicker-dropdown-" + this.pickerPosition + " dropdown-menu"), this.isRTL) {
this.picker.addClass("datetimepicker-rtl");
var i = 3 === this.bootcssVer ? ".prev span, .next span" : ".prev i, .next i";
this.picker.find(i).toggleClass(this.icons.leftArrow + " " + this.icons.rightArrow)
}
a(document).on("mousedown", this.clickedOutside), this.autoclose = !1, "autoclose" in d ? this.autoclose = d.autoclose : "dateAutoclose" in this.element.data() && (this.autoclose = this.element.data("date-autoclose")), this.keyboardNavigation = !0, "keyboardNavigation" in d ? this.keyboardNavigation = d.keyboardNavigation : "dateKeyboardNavigation" in this.element.data() && (this.keyboardNavigation = this.element.data("date-keyboard-navigation")), this.todayBtn = d.todayBtn || this.element.data("date-today-btn") || !1, this.clearBtn = d.clearBtn || this.element.data("date-clear-btn") || !1, this.todayHighlight = d.todayHighlight || this.element.data("date-today-highlight") || !1, this.weekStart = (d.weekStart || this.element.data("date-weekstart") || f[this.language].weekStart || 0) % 7, this.weekEnd = (this.weekStart + 6) % 7, this.startDate = -(1 / 0), this.endDate = 1 / 0, this.datesDisabled = [], this.daysOfWeekDisabled = [], this.setStartDate(d.startDate || this.element.data("date-startdate")), this.setEndDate(d.endDate || this.element.data("date-enddate")), this.setDatesDisabled(d.datesDisabled || this.element.data("date-dates-disabled")), this.setDaysOfWeekDisabled(d.daysOfWeekDisabled || this.element.data("date-days-of-week-disabled")), this.setMinutesDisabled(d.minutesDisabled || this.element.data("date-minute-disabled")), this.setHoursDisabled(d.hoursDisabled || this.element.data("date-hour-disabled")), this.fillDow(), this.fillMonths(), this.update(), this.showMode(), this.isInline && this.show()
};
d.prototype = {
constructor: d,
_events: [],
_attachEvents: function() {
this._detachEvents(), this.isInput ? this._events = [
[this.element, {
focus: a.proxy(this.show, this),
keyup: a.proxy(this.update, this),
keydown: a.proxy(this.keydown, this)
}]
] : this.component && this.hasInput ? (this._events = [
[this.element.find("input"), {
focus: a.proxy(this.show, this),
keyup: a.proxy(this.update, this),
keydown: a.proxy(this.keydown, this)
}],
[this.component, {
click: a.proxy(this.show, this)
}]
], this.componentReset && this._events.push([this.componentReset, {
click: a.proxy(this.reset, this)
}])) : this.element.is("div") ? this.isInline = !0 : this._events = [
[this.element, {
click: a.proxy(this.show, this)
}]
];
for (var b, c, d = 0; d < this._events.length; d++) b = this._events[d][0], c = this._events[d][1], b.on(c)
},
_detachEvents: function() {
for (var a, b, c = 0; c < this._events.length; c++) a = this._events[c][0], b = this._events[c][1], a.off(b);
this._events = []
},
show: function(b) {
this.picker.show(), this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(), this.forceParse && this.update(), this.place(), a(window).on("resize", a.proxy(this.place, this)), b && (b.stopPropagation(), b.preventDefault()), this.isVisible = !0, this.element.trigger({
type: "show",
date: this.date
})
},
hide: function() {
this.isVisible && (this.isInline || (this.picker.hide(), a(window).off("resize", this.place), this.viewMode = this.startViewMode, this.showMode(), this.isInput || a(document).off("mousedown", this.hide), this.forceParse && (this.isInput && this.element.val() || this.hasInput && this.element.find("input").val()) && this.setValue(), this.isVisible = !1, this.element.trigger({
type: "hide",
date: this.date
})))
},
remove: function() {
this._detachEvents(), a(document).off("mousedown", this.clickedOutside), this.picker.remove(), delete this.picker, delete this.element.data().datetimepicker
},
getDate: function() {
var a = this.getUTCDate();
return new Date(a.getTime() + 6e4 * a.getTimezoneOffset())
},
getUTCDate: function() {
return this.date
},
getInitialDate: function() {
return this.initialDate
},
setInitialDate: function(a) {
this.initialDate = a
},
setDate: function(a) {
this.setUTCDate(new Date(a.getTime() - 6e4 * a.getTimezoneOffset()))
},
setUTCDate: function(a) {
a >= this.startDate && a <= this.endDate ? (this.date = a, this.setValue(), this.viewDate = this.date, this.fill()) : this.element.trigger({
type: "outOfRange",
date: a,
startDate: this.startDate,
endDate: this.endDate
})
},
setFormat: function(a) {
this.format = g.parseFormat(a, this.formatType);
var b;
this.isInput ? b = this.element : this.component && (b = this.element.find("input")), b && b.val() && this.setValue()
},
setValue: function() {
var b = this.getFormattedDate();
this.isInput ? this.element.val(b) : (this.component && this.element.find("input").val(b), this.element.data("date", b)), this.linkField && a("#" + this.linkField).val(this.getFormattedDate(this.linkFormat))
},
getFormattedDate: function(a) {
return a == b && (a = this.format), g.formatDate(this.date, a, this.language, this.formatType, this.timezone)
},
setStartDate: function(a) {
this.startDate = a || -(1 / 0), this.startDate !== -(1 / 0) && (this.startDate = g.parseDate(this.startDate, this.format, this.language, this.formatType, this.timezone)), this.update(), this.updateNavArrows()
},
setEndDate: function(a) {
this.endDate = a || 1 / 0, this.endDate !== 1 / 0 && (this.endDate = g.parseDate(this.endDate, this.format, this.language, this.formatType, this.timezone)), this.update(), this.updateNavArrows()
},
setDatesDisabled: function(b) {
this.datesDisabled = b || [], a.isArray(this.datesDisabled) || (this.datesDisabled = this.datesDisabled.split(/,\s*/)), this.datesDisabled = a.map(this.datesDisabled, function(a) {
return g.parseDate(a, this.format, this.language, this.formatType, this.timezone).toDateString()
}), this.update(), this.updateNavArrows()
},
setTitle: function(a, b) {
return this.picker.find(a).find("th:eq(1)").text(this.title === !1 ? b : this.title)
},
setDaysOfWeekDisabled: function(b) {
this.daysOfWeekDisabled = b || [], a.isArray(this.daysOfWeekDisabled) || (this.daysOfWeekDisabled = this.daysOfWeekDisabled.split(/,\s*/)), this.daysOfWeekDisabled = a.map(this.daysOfWeekDisabled, function(a) {
return parseInt(a, 10)
}), this.update(), this.updateNavArrows()
},
setMinutesDisabled: function(b) {
this.minutesDisabled = b || [], a.isArray(this.minutesDisabled) || (this.minutesDisabled = this.minutesDisabled.split(/,\s*/)), this.minutesDisabled = a.map(this.minutesDisabled, function(a) {
return parseInt(a, 10)
}), this.update(), this.updateNavArrows()
},
setHoursDisabled: function(b) {
this.hoursDisabled = b || [], a.isArray(this.hoursDisabled) || (this.hoursDisabled = this.hoursDisabled.split(/,\s*/)), this.hoursDisabled = a.map(this.hoursDisabled, function(a) {
return parseInt(a, 10)
}), this.update(), this.updateNavArrows()
},
place: function() {
if (!this.isInline) {
if (!this.zIndex) {
var b = 0;
a("div").each(function() {
var c = parseInt(a(this).css("zIndex"), 10);
c > b && (b = c)
}), this.zIndex = b + 10
}
var c, d, e, f;
f = this.container instanceof a ? this.container.offset() : a(this.container).offset(), this.component ? (c = this.component.offset(), e = c.left, ("bottom-left" == this.pickerPosition || "top-left" == this.pickerPosition) && (e += this.component.outerWidth() - this.picker.outerWidth())) : (c = this.element.offset(), e = c.left, ("bottom-left" == this.pickerPosition || "top-left" == this.pickerPosition) && (e += this.element.outerWidth() - this.picker.outerWidth()));
var g = document.body.clientWidth || window.innerWidth;
e + 220 > g && (e = g - 220), d = "top-left" == this.pickerPosition || "top-right" == this.pickerPosition ? c.top - this.picker.outerHeight() : c.top + this.height, d -= f.top, e -= f.left, this.picker.css({
top: d,
left: e,
zIndex: this.zIndex
})
}
},
update: function() {
var a, b = !1;
arguments && arguments.length && ("string" == typeof arguments[0] || arguments[0] instanceof Date) ? (a = arguments[0], b = !0) : (a = (this.isInput ? this.element.val() : this.element.find("input").val()) || this.element.data("date") || this.initialDate, ("string" == typeof a || a instanceof String) && (a = a.replace(/^\s+|\s+$/g, ""))), a || (a = new Date, b = !1), this.date = g.parseDate(a, this.format, this.language, this.formatType, this.timezone), b && this.setValue(), this.viewDate = new Date(this.date < this.startDate ? this.startDate : this.date > this.endDate ? this.endDate : this.date), this.fill()
},
fillDow: function() {
for (var a = this.weekStart, b = "<tr>"; a < this.weekStart + 7;) b += '<th class="dow">' + f[this.language].daysMin[a++ % 7] + "</th>";
b += "</tr>", this.picker.find(".datetimepicker-days thead").append(b)
},
fillMonths: function() {
for (var a = "", b = 0; 12 > b;) a += '<span class="month">' + f[this.language].monthsShort[b++] + "</span>";
this.picker.find(".datetimepicker-months td").html(a)
},
fill: function() {
if (null != this.date && null != this.viewDate) {
var b = new Date(this.viewDate),
d = b.getUTCFullYear(),
e = b.getUTCMonth(),
h = b.getUTCDate(),
i = b.getUTCHours(),
j = b.getUTCMinutes(),
k = this.startDate !== -(1 / 0) ? this.startDate.getUTCFullYear() : -(1 / 0),
l = this.startDate !== -(1 / 0) ? this.startDate.getUTCMonth() : -(1 / 0),
m = this.endDate !== 1 / 0 ? this.endDate.getUTCFullYear() : 1 / 0,
n = this.endDate !== 1 / 0 ? this.endDate.getUTCMonth() + 1 : 1 / 0,
o = new c(this.date.getUTCFullYear(), this.date.getUTCMonth(), this.date.getUTCDate()).valueOf(),
p = new Date;
if (this.setTitle(".datetimepicker-days", f[this.language].months[e] + " " + d), "time" == this.formatViewType) {
var q = this.getFormattedDate();
this.setTitle(".datetimepicker-hours", q), this.setTitle(".datetimepicker-minutes", q)
} else this.setTitle(".datetimepicker-hours", h + " " + f[this.language].months[e] + " " + d), this.setTitle(".datetimepicker-minutes", h + " " + f[this.language].months[e] + " " + d);
this.picker.find("tfoot th.today").text(f[this.language].today || f.en.today).toggle(this.todayBtn !== !1), this.picker.find("tfoot th.clear").text(f[this.language].clear || f.en.clear).toggle(this.clearBtn !== !1), this.updateNavArrows(), this.fillMonths();
var r = c(d, e - 1, 28, 0, 0, 0, 0),
s = g.getDaysInMonth(r.getUTCFullYear(), r.getUTCMonth());
r.setUTCDate(s), r.setUTCDate(s - (r.getUTCDay() - this.weekStart + 7) % 7);
var t = new Date(r);
t.setUTCDate(t.getUTCDate() + 42), t = t.valueOf();
for (var u, v = []; r.valueOf() < t;) r.getUTCDay() == this.weekStart && v.push("<tr>"), u = "", r.getUTCFullYear() < d || r.getUTCFullYear() == d && r.getUTCMonth() < e ? u += " old" : (r.getUTCFullYear() > d || r.getUTCFullYear() == d && r.getUTCMonth() > e) && (u += " new"), this.todayHighlight && r.getUTCFullYear() == p.getFullYear() && r.getUTCMonth() == p.getMonth() && r.getUTCDate() == p.getDate() && (u += " today"), r.valueOf() == o && (u += " active"), (r.valueOf() + 864e5 <= this.startDate || r.valueOf() > this.endDate || -1 !== a.inArray(r.getUTCDay(), this.daysOfWeekDisabled) || -1 !== a.inArray(r.toDateString(), this.datesDisabled)) && (u += " disabled"), v.push('<td class="day' + u + '">' + r.getUTCDate() + "</td>"), r.getUTCDay() == this.weekEnd && v.push("</tr>"), r.setUTCDate(r.getUTCDate() + 1);
this.picker.find(".datetimepicker-days tbody").empty().append(v.join("")), v = [];
for (var w = "", x = "", y = "", z = this.hoursDisabled || [], A = 0; 24 > A; A++)
if (-1 === z.indexOf(A)) {
var B = c(d, e, h, A);
u = "", B.valueOf() + 36e5 <= this.startDate || B.valueOf() > this.endDate ? u += " disabled" : i == A && (u += " active"), this.showMeridian && 2 == f[this.language].meridiem.length ? (x = 12 > A ? f[this.language].meridiem[0] : f[this.language].meridiem[1], x != y && ("" != y && v.push("</fieldset>"), v.push('<fieldset class="hour"><legend>' + x.toUpperCase() + "</legend>")), y = x, w = A % 12 ? A % 12 : 12, v.push('<span class="hour' + u + " hour_" + (12 > A ? "am" : "pm") + '">' + w + "</span>"), 23 == A && v.push("</fieldset>")) : (w = A + ":00", v.push('<span class="hour' + u + '">' + w + "</span>"))
}
this.picker.find(".datetimepicker-hours td").html(v.join("")), v = [], w = "", x = "", y = "";
for (var C = this.minutesDisabled || [], A = 0; 60 > A; A += this.minuteStep)
if (-1 === C.indexOf(A)) {
var B = c(d, e, h, i, A, 0);
u = "", B.valueOf() < this.startDate || B.valueOf() > this.endDate ? u += " disabled" : Math.floor(j / this.minuteStep) == Math.floor(A / this.minuteStep) && (u += " active"), this.showMeridian && 2 == f[this.language].meridiem.length ? (x = 12 > i ? f[this.language].meridiem[0] : f[this.language].meridiem[1], x != y && ("" != y && v.push("</fieldset>"), v.push('<fieldset class="minute"><legend>' + x.toUpperCase() + "</legend>")), y = x, w = i % 12 ? i % 12 : 12, v.push('<span class="minute' + u + '">' + w + ":" + (10 > A ? "0" + A : A) + "</span>"), 59 == A && v.push("</fieldset>")) : (w = A + ":00", v.push('<span class="minute' + u + '">' + i + ":" + (10 > A ? "0" + A : A) + "</span>"))
}
this.picker.find(".datetimepicker-minutes td").html(v.join(""));
var D = this.date.getUTCFullYear(),
E = this.setTitle(".datetimepicker-months", d).end().find("span").removeClass("active");
if (D == d) {
var F = E.length - 12;
E.eq(this.date.getUTCMonth() + F).addClass("active")
}(k > d || d > m) && E.addClass("disabled"), d == k && E.slice(0, l).addClass("disabled"), d == m && E.slice(n).addClass("disabled"), v = "", d = 10 * parseInt(d / 10, 10);
var G = this.setTitle(".datetimepicker-years", d + "-" + (d + 9)).end().find("td");
d -= 1;
for (var A = -1; 11 > A; A++) v += '<span class="year' + (-1 == A || 10 == A ? " old" : "") + (D == d ? " active" : "") + (k > d || d > m ? " disabled" : "") + '">' + d + "</span>", d += 1;
G.html(v), this.place()
}
},
updateNavArrows: function() {
var a = new Date(this.viewDate),
b = a.getUTCFullYear(),
c = a.getUTCMonth(),
d = a.getUTCDate(),
e = a.getUTCHours();
switch (this.viewMode) {
case 0:
this.picker.find(".prev").css(this.startDate !== -(1 / 0) && b <= this.startDate.getUTCFullYear() && c <= this.startDate.getUTCMonth() && d <= this.startDate.getUTCDate() && e <= this.startDate.getUTCHours() ? {
visibility: "hidden"
} : {
visibility: "visible"
}), this.picker.find(".next").css(this.endDate !== 1 / 0 && b >= this.endDate.getUTCFullYear() && c >= this.endDate.getUTCMonth() && d >= this.endDate.getUTCDate() && e >= this.endDate.getUTCHours() ? {
visibility: "hidden"
} : {
visibility: "visible"
});
break;
case 1:
this.picker.find(".prev").css(this.startDate !== -(1 / 0) && b <= this.startDate.getUTCFullYear() && c <= this.startDate.getUTCMonth() && d <= this.startDate.getUTCDate() ? {
visibility: "hidden"
} : {
visibility: "visible"
}), this.picker.find(".next").css(this.endDate !== 1 / 0 && b >= this.endDate.getUTCFullYear() && c >= this.endDate.getUTCMonth() && d >= this.endDate.getUTCDate() ? {
visibility: "hidden"
} : {
visibility: "visible"
});
break;
case 2:
this.picker.find(".prev").css(this.startDate !== -(1 / 0) && b <= this.startDate.getUTCFullYear() && c <= this.startDate.getUTCMonth() ? {
visibility: "hidden"
} : {
visibility: "visible"
}), this.picker.find(".next").css(this.endDate !== 1 / 0 && b >= this.endDate.getUTCFullYear() && c >= this.endDate.getUTCMonth() ? {
visibility: "hidden"
} : {
visibility: "visible"
});
break;
case 3:
case 4:
this.picker.find(".prev").css(this.startDate !== -(1 / 0) && b <= this.startDate.getUTCFullYear() ? {
visibility: "hidden"
} : {
visibility: "visible"
}), this.picker.find(".next").css(this.endDate !== 1 / 0 && b >= this.endDate.getUTCFullYear() ? {
visibility: "hidden"
} : {
visibility: "visible"
})
}
},
mousewheel: function(b) {
if (b.preventDefault(), b.stopPropagation(), !this.wheelPause) {
this.wheelPause = !0;
var c = b.originalEvent,
d = c.wheelDelta,
e = d > 0 ? 1 : 0 === d ? 0 : -1;
this.wheelViewModeNavigationInverseDirection && (e = -e), this.showMode(e), setTimeout(a.proxy(function() {
this.wheelPause = !1
}, this), this.wheelViewModeNavigationDelay)
}
},
click: function(b) {
b.stopPropagation(), b.preventDefault();
var d = a(b.target).closest("span, td, th, legend");
if (d.is("." + this.icontype) && (d = a(d).parent().closest("span, td, th, legend")), 1 == d.length) {
if (d.is(".disabled")) return void this.element.trigger({
type: "outOfRange",
date: this.viewDate,
startDate: this.startDate,
endDate: this.endDate
});
switch (d[0].nodeName.toLowerCase()) {
case "th":
switch (d[0].className) {
case "switch":
this.showMode(1);
break;
case "prev":
case "next":
var e = g.modes[this.viewMode].navStep * ("prev" == d[0].className ? -1 : 1);
switch (this.viewMode) {
case 0:
this.viewDate = this.moveHour(this.viewDate, e);
break;
case 1:
this.viewDate = this.moveDate(this.viewDate, e);
break;
case 2:
this.viewDate = this.moveMonth(this.viewDate, e);
break;
case 3:
case 4:
this.viewDate = this.moveYear(this.viewDate, e)
}
this.fill(), this.element.trigger({
type: d[0].className + ":" + this.convertViewModeText(this.viewMode),
date: this.viewDate,
startDate: this.startDate,
endDate: this.endDate
});
break;
case "clear":
this.reset(), this.autoclose && this.hide();
break;
case "today":
var f = new Date;
f = c(f.getFullYear(), f.getMonth(), f.getDate(), f.getHours(), f.getMinutes(), f.getSeconds(), 0), f < this.startDate ? f = this.startDate : f > this.endDate && (f = this.endDate), this.viewMode = this.startViewMode, this.showMode(0), this._setDate(f), this.fill(), this.autoclose && this.hide()
}
break;
case "span":
if (!d.is(".disabled")) {
var h = this.viewDate.getUTCFullYear(),
i = this.viewDate.getUTCMonth(),
j = this.viewDate.getUTCDate(),
k = this.viewDate.getUTCHours(),
l = this.viewDate.getUTCMinutes(),
m = this.viewDate.getUTCSeconds();
if (d.is(".month") ? (this.viewDate.setUTCDate(1), i = d.parent().find("span").index(d), j = this.viewDate.getUTCDate(), this.viewDate.setUTCMonth(i), this.element.trigger({
type: "changeMonth",
date: this.viewDate
}), this.viewSelect >= 3 && this._setDate(c(h, i, j, k, l, m, 0))) : d.is(".year") ? (this.viewDate.setUTCDate(1), h = parseInt(d.text(), 10) || 0, this.viewDate.setUTCFullYear(h), this.element.trigger({
type: "changeYear",
date: this.viewDate
}), this.viewSelect >= 4 && this._setDate(c(h, i, j, k, l, m, 0))) : d.is(".hour") ? (k = parseInt(d.text(), 10) || 0, (d.hasClass("hour_am") || d.hasClass("hour_pm")) && (12 == k && d.hasClass("hour_am") ? k = 0 : 12 != k && d.hasClass("hour_pm") && (k += 12)), this.viewDate.setUTCHours(k), this.element.trigger({
type: "changeHour",
date: this.viewDate
}), this.viewSelect >= 1 && this._setDate(c(h, i, j, k, l, m, 0))) : d.is(".minute") && (l = parseInt(d.text().substr(d.text().indexOf(":") + 1), 10) || 0, this.viewDate.setUTCMinutes(l), this.element.trigger({
type: "changeMinute",
date: this.viewDate
}), this.viewSelect >= 0 && this._setDate(c(h, i, j, k, l, m, 0))), 0 != this.viewMode) {
var n = this.viewMode;
this.showMode(-1), this.fill(), n == this.viewMode && this.autoclose && this.hide()
} else this.fill(), this.autoclose && this.hide()
}
break;
case "td":
if (d.is(".day") && !d.is(".disabled")) {
var j = parseInt(d.text(), 10) || 1,
h = this.viewDate.getUTCFullYear(),
i = this.viewDate.getUTCMonth(),
k = this.viewDate.getUTCHours(),
l = this.viewDate.getUTCMinutes(),
m = this.viewDate.getUTCSeconds();
d.is(".old") ? 0 === i ? (i = 11, h -= 1) : i -= 1 : d.is(".new") && (11 == i ? (i = 0, h += 1) : i += 1), this.viewDate.setUTCFullYear(h), this.viewDate.setUTCMonth(i, j), this.element.trigger({
type: "changeDay",
date: this.viewDate
}), this.viewSelect >= 2 && this._setDate(c(h, i, j, k, l, m, 0))
}
var n = this.viewMode;
this.showMode(-1), this.fill(), n == this.viewMode && this.autoclose && this.hide()
}
}
},
_setDate: function(a, b) {
b && "date" != b || (this.date = a), b && "view" != b || (this.viewDate = a), this.fill(), this.setValue();
var c;
this.isInput ? c = this.element : this.component && (c = this.element.find("input")), c && (c.change(), this.autoclose && (!b || "date" == b)), this.element.trigger({
type: "changeDate",
date: this.getDate()
}), null == a && (this.date = this.viewDate)
},
moveMinute: function(a, b) {
if (!b) return a;
var c = new Date(a.valueOf());
return c.setUTCMinutes(c.getUTCMinutes() + b * this.minuteStep), c
},
moveHour: function(a, b) {
if (!b) return a;
var c = new Date(a.valueOf());
return c.setUTCHours(c.getUTCHours() + b), c
},
moveDate: function(a, b) {
if (!b) return a;
var c = new Date(a.valueOf());
return c.setUTCDate(c.getUTCDate() + b), c
},
moveMonth: function(a, b) {
if (!b) return a;
var c, d, e = new Date(a.valueOf()),
f = e.getUTCDate(),
g = e.getUTCMonth(),
h = Math.abs(b);
if (b = b > 0 ? 1 : -1, 1 == h) d = -1 == b ? function() {
return e.getUTCMonth() == g
} : function() {
return e.getUTCMonth() != c
}, c = g + b, e.setUTCMonth(c), (0 > c || c > 11) && (c = (c + 12) % 12);
else {
for (var i = 0; h > i; i++) e = this.moveMonth(e, b);
c = e.getUTCMonth(), e.setUTCDate(f), d = function() {
return c != e.getUTCMonth()
}
}
for (; d();) e.setUTCDate(--f), e.setUTCMonth(c);
return e
},
moveYear: function(a, b) {
return this.moveMonth(a, 12 * b)
},
dateWithinRange: function(a) {
return a >= this.startDate && a <= this.endDate
},
keydown: function(a) {
if (this.picker.is(":not(:visible)")) return void(27 == a.keyCode && this.show());
var b, c, d, e = !1;
switch (a.keyCode) {
case 27:
this.hide(), a.preventDefault();
break;
case 37:
case 39:
if (!this.keyboardNavigation) break;
b = 37 == a.keyCode ? -1 : 1, viewMode = this.viewMode, a.ctrlKey ? viewMode += 2 : a.shiftKey && (viewMode += 1), 4 == viewMode ? (c = this.moveYear(this.date, b), d = this.moveYear(this.viewDate, b)) : 3 == viewMode ? (c = this.moveMonth(this.date, b), d = this.moveMonth(this.viewDate, b)) : 2 == viewMode ? (c = this.moveDate(this.date, b), d = this.moveDate(this.viewDate, b)) : 1 == viewMode ? (c = this.moveHour(this.date, b), d = this.moveHour(this.viewDate, b)) : 0 == viewMode && (c = this.moveMinute(this.date, b), d = this.moveMinute(this.viewDate, b)), this.dateWithinRange(c) && (this.date = c, this.viewDate = d, this.setValue(), this.update(), a.preventDefault(), e = !0);
break;
case 38:
case 40:
if (!this.keyboardNavigation) break;
b = 38 == a.keyCode ? -1 : 1, viewMode = this.viewMode, a.ctrlKey ? viewMode += 2 : a.shiftKey && (viewMode += 1), 4 == viewMode ? (c = this.moveYear(this.date, b), d = this.moveYear(this.viewDate, b)) : 3 == viewMode ? (c = this.moveMonth(this.date, b), d = this.moveMonth(this.viewDate, b)) : 2 == viewMode ? (c = this.moveDate(this.date, 7 * b), d = this.moveDate(this.viewDate, 7 * b)) : 1 == viewMode ? this.showMeridian ? (c = this.moveHour(this.date, 6 * b), d = this.moveHour(this.viewDate, 6 * b)) : (c = this.moveHour(this.date, 4 * b), d = this.moveHour(this.viewDate, 4 * b)) : 0 == viewMode && (c = this.moveMinute(this.date, 4 * b), d = this.moveMinute(this.viewDate, 4 * b)), this.dateWithinRange(c) && (this.date = c, this.viewDate = d, this.setValue(), this.update(), a.preventDefault(), e = !0);
break;
case 13:
if (0 != this.viewMode) {
var f = this.viewMode;
this.showMode(-1), this.fill(), f == this.viewMode && this.autoclose && this.hide()
} else this.fill(), this.autoclose && this.hide();
a.preventDefault();
break;
case 9:
this.hide()
}
if (e) {
var g;
this.isInput ? g = this.element : this.component && (g = this.element.find("input")), g && g.change(), this.element.trigger({
type: "changeDate",
date: this.getDate()
})
}
},
showMode: function(a) {
if (a) {
var b = Math.max(0, Math.min(g.modes.length - 1, this.viewMode + a));
b >= this.minView && b <= this.maxView && (this.element.trigger({
type: "changeMode",
date: this.viewDate,
oldViewMode: this.viewMode,
newViewMode: b
}), this.viewMode = b)
}
this.picker.find(">div").hide().filter(".datetimepicker-" + g.modes[this.viewMode].clsName).css("display", "block"), this.updateNavArrows()
},
reset: function() {
this._setDate(null, "date")
},
convertViewModeText: function(a) {
switch (a) {
case 4:
return "decade";
case 3:
return "year";
case 2:
return "month";
case 1:
return "day";
case 0:
return "hour"
}
}
};
var e = a.fn.datetimepicker;
a.fn.datetimepicker = function(c) {
var e = Array.apply(null, arguments);
e.shift();
var f;
return this.each(function() {
var g = a(this),
h = g.data("datetimepicker"),
i = "object" == typeof c && c;
return h || g.data("datetimepicker", h = new d(this, a.extend({}, a.fn.datetimepicker.defaults, i))), "string" == typeof c && "function" == typeof h[c] && (f = h[c].apply(h, e), f !== b) ? !1 : void 0
}), f !== b ? f : this
}, a.fn.datetimepicker.defaults = {}, a.fn.datetimepicker.Constructor = d;
var f = a.fn.datetimepicker.dates = {
en: {
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
meridiem: ["am", "pm"],
suffix: ["st", "nd", "rd", "th"],
today: "Today",
clear: "Clear"
}
},
g = {
modes: [{
clsName: "minutes",
navFnc: "Hours",
navStep: 1
}, {
clsName: "hours",
navFnc: "Date",
navStep: 1
}, {
clsName: "days",
navFnc: "Month",
navStep: 1
}, {
clsName: "months",
navFnc: "FullYear",
navStep: 1
}, {
clsName: "years",
navFnc: "FullYear",
navStep: 10
}],
isLeapYear: function(a) {
return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0
},
getDaysInMonth: function(a, b) {
return [31, g.isLeapYear(a) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][b]
},
getDefaultFormat: function(a, b) {
if ("standard" == a) return "input" == b ? "yyyy-mm-dd hh:ii" : "yyyy-mm-dd hh:ii:ss";
if ("php" == a) return "input" == b ? "Y-m-d H:i" : "Y-m-d H:i:s";
throw new Error("Invalid format type.")
},
validParts: function(a) {
if ("standard" == a) return /t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;
if ("php" == a) return /[dDjlNwzFmMnStyYaABgGhHis]/g;
throw new Error("Invalid format type.")
},
nonpunctuation: /[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,
parseFormat: function(a, b) {
var c = a.replace(this.validParts(b), "\x00").split("\x00"),
d = a.match(this.validParts(b));
if (!c || !c.length || !d || 0 == d.length) throw new Error("Invalid date format.");
return {
separators: c,
parts: d
}
},
parseDate: function(b, e, g, h, i) {
if (b instanceof Date) {
var j = new Date(b.valueOf() - 6e4 * b.getTimezoneOffset());
return j.setMilliseconds(0), j
}
if (/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(b) && (e = this.parseFormat("yyyy-mm-dd", h)), /^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(b) && (e = this.parseFormat("yyyy-mm-dd hh:ii", h)), /^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(b) && (e = this.parseFormat("yyyy-mm-dd hh:ii:ss", h)), /^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(b)) {
var k, l, m = /([-+]\d+)([dmwy])/,
n = b.match(/([-+]\d+)([dmwy])/g);
b = new Date;
for (var o = 0; o < n.length; o++) switch (k = m.exec(n[o]), l = parseInt(k[1]), k[2]) {
case "d":
b.setUTCDate(b.getUTCDate() + l);
break;
case "m":
b = d.prototype.moveMonth.call(d.prototype, b, l);
break;
case "w":
b.setUTCDate(b.getUTCDate() + 7 * l);
break;
case "y":
b = d.prototype.moveYear.call(d.prototype, b, l)
}
return c(b.getUTCFullYear(), b.getUTCMonth(), b.getUTCDate(), b.getUTCHours(), b.getUTCMinutes(), b.getUTCSeconds(), 0)
}
var p, q, k, n = b && b.toString().match(this.nonpunctuation) || [],
b = new Date(0, 0, 0, 0, 0, 0, 0),
r = {},
s = ["hh", "h", "ii", "i", "ss", "s", "yyyy", "yy", "M", "MM", "m", "mm", "D", "DD", "d", "dd", "H", "HH", "p", "P", "z", "Z"],
t = {
hh: function(a, b) {
return a.setUTCHours(b)
},
h: function(a, b) {
return a.setUTCHours(b)
},
HH: function(a, b) {
return a.setUTCHours(12 == b ? 0 : b)
},
H: function(a, b) {
return a.setUTCHours(12 == b ? 0 : b)
},
ii: function(a, b) {
return a.setUTCMinutes(b)
},
i: function(a, b) {
return a.setUTCMinutes(b)
},
ss: function(a, b) {
return a.setUTCSeconds(b)
},
s: function(a, b) {
return a.setUTCSeconds(b)
},
yyyy: function(a, b) {
return a.setUTCFullYear(b)
},
yy: function(a, b) {
return a.setUTCFullYear(2e3 + b)
},
m: function(a, b) {
for (b -= 1; 0 > b;) b += 12;
for (b %= 12, a.setUTCMonth(b); a.getUTCMonth() != b;) {
if (isNaN(a.getUTCMonth())) return a;
a.setUTCDate(a.getUTCDate() - 1)
}
return a
},
d: function(a, b) {
return a.setUTCDate(b)
},
p: function(a, b) {
return a.setUTCHours(1 == b ? a.getUTCHours() + 12 : a.getUTCHours())
},
z: function() {
return i
}
};
if (t.M = t.MM = t.mm = t.m, t.dd = t.d, t.P = t.p, t.Z = t.z, b = c(b.getFullYear(), b.getMonth(), b.getDate(), b.getHours(), b.getMinutes(), b.getSeconds()), n.length == e.parts.length) {
for (var o = 0, u = e.parts.length; u > o; o++) {
if (p = parseInt(n[o], 10), k = e.parts[o], isNaN(p)) switch (k) {
case "MM":
q = a(f[g].months).filter(function() {
var a = this.slice(0, n[o].length),
b = n[o].slice(0, a.length);
return a == b
}), p = a.inArray(q[0], f[g].months) + 1;
break;
case "M":
q = a(f[g].monthsShort).filter(function() {
var a = this.slice(0, n[o].length),
b = n[o].slice(0, a.length);
return a.toLowerCase() == b.toLowerCase()
}), p = a.inArray(q[0], f[g].monthsShort) + 1;
break;
case "p":
case "P":
p = a.inArray(n[o].toLowerCase(), f[g].meridiem);
break;
case "z":
case "Z":
}
r[k] = p
}
for (var v, o = 0; o < s.length; o++) v = s[o], v in r && !isNaN(r[v]) && t[v](b, r[v])
}
return b
},
formatDate: function(b, c, d, e, h) {
if (null == b) return "";
var i;
if ("standard" == e) i = {
t: b.getTime(),
yy: b.getUTCFullYear().toString().substring(2),
yyyy: b.getUTCFullYear(),
m: b.getUTCMonth() + 1,
M: f[d].monthsShort[b.getUTCMonth()],
MM: f[d].months[b.getUTCMonth()],
d: b.getUTCDate(),
D: f[d].daysShort[b.getUTCDay()],
DD: f[d].days[b.getUTCDay()],
p: 2 == f[d].meridiem.length ? f[d].meridiem[b.getUTCHours() < 12 ? 0 : 1] : "",
h: b.getUTCHours(),
i: b.getUTCMinutes(),
s: b.getUTCSeconds(),
z: h
}, i.H = 2 == f[d].meridiem.length ? i.h % 12 == 0 ? 12 : i.h % 12 : i.h, i.HH = (i.H < 10 ? "0" : "") + i.H, i.P = i.p.toUpperCase(), i.Z = i.z, i.hh = (i.h < 10 ? "0" : "") + i.h, i.ii = (i.i < 10 ? "0" : "") + i.i, i.ss = (i.s < 10 ? "0" : "") + i.s, i.dd = (i.d < 10 ? "0" : "") + i.d, i.mm = (i.m < 10 ? "0" : "") + i.m;
else {
if ("php" != e) throw new Error("Invalid format type.");
i = {
y: b.getUTCFullYear().toString().substring(2),
Y: b.getUTCFullYear(),
F: f[d].months[b.getUTCMonth()],
M: f[d].monthsShort[b.getUTCMonth()],
n: b.getUTCMonth() + 1,
t: g.getDaysInMonth(b.getUTCFullYear(), b.getUTCMonth()),
j: b.getUTCDate(),
l: f[d].days[b.getUTCDay()],
D: f[d].daysShort[b.getUTCDay()],
w: b.getUTCDay(),
N: 0 == b.getUTCDay() ? 7 : b.getUTCDay(),
S: b.getUTCDate() % 10 <= f[d].suffix.length ? f[d].suffix[b.getUTCDate() % 10 - 1] : "",
a: 2 == f[d].meridiem.length ? f[d].meridiem[b.getUTCHours() < 12 ? 0 : 1] : "",
g: b.getUTCHours() % 12 == 0 ? 12 : b.getUTCHours() % 12,
G: b.getUTCHours(),
i: b.getUTCMinutes(),
s: b.getUTCSeconds()
}, i.m = (i.n < 10 ? "0" : "") + i.n, i.d = (i.j < 10 ? "0" : "") + i.j, i.A = i.a.toString().toUpperCase(), i.h = (i.g < 10 ? "0" : "") + i.g, i.H = (i.G < 10 ? "0" : "") + i.G, i.i = (i.i < 10 ? "0" : "") + i.i, i.s = (i.s < 10 ? "0" : "") + i.s
}
for (var b = [], j = a.extend([], c.separators), k = 0, l = c.parts.length; l > k; k++) j.length && b.push(j.shift()), b.push(i[c.parts[k]]);
return j.length && b.push(j.shift()), b.join("")
},
convertViewMode: function(a) {
switch (a) {
case 4:
case "decade":
a = 4;
break;
case 3:
case "year":
a = 3;
break;
case 2:
case "month":
a = 2;
break;
case 1:
case "day":
a = 1;
break;
case 0:
case "hour":
a = 0
}
return a
},
headTemplate: '<thead><tr><th class="prev"><i class="{iconType} {leftArrow}"/></th><th colspan="5" class="switch"></th><th class="next"><i class="{iconType} {rightArrow}"/></th></tr></thead>',
headTemplateV3: '<thead><tr><th class="prev"><span class="{iconType} {leftArrow}"></span> </th><th colspan="5" class="switch"></th><th class="next"><span class="{iconType} {rightArrow}"></span> </th></tr></thead>',
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>',
footTemplate: '<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'
};
g.template = '<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">' + g.headTemplate + g.contTemplate + g.footTemplate + '</table></div><div class="datetimepicker-hours"><table class=" table-condensed">' + g.headTemplate + g.contTemplate + g.footTemplate + '</table></div><div class="datetimepicker-days"><table class=" table-condensed">' + g.headTemplate + "<tbody></tbody>" + g.footTemplate + '</table></div><div class="datetimepicker-months"><table class="table-condensed">' + g.headTemplate + g.contTemplate + g.footTemplate + '</table></div><div class="datetimepicker-years"><table class="table-condensed">' + g.headTemplate + g.contTemplate + g.footTemplate + "</table></div></div>", g.templateV3 = '<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">' + g.headTemplateV3 + g.contTemplate + g.footTemplate + '</table></div><div class="datetimepicker-hours"><table class=" table-condensed">' + g.headTemplateV3 + g.contTemplate + g.footTemplate + '</table></div><div class="datetimepicker-days"><table class=" table-condensed">' + g.headTemplateV3 + "<tbody></tbody>" + g.footTemplate + '</table></div><div class="datetimepicker-months"><table class="table-condensed">' + g.headTemplateV3 + g.contTemplate + g.footTemplate + '</table></div><div class="datetimepicker-years"><table class="table-condensed">' + g.headTemplateV3 + g.contTemplate + g.footTemplate + "</table></div></div>", a.fn.datetimepicker.DPGlobal = g, a.fn.datetimepicker.noConflict = function() {
return a.fn.datetimepicker = e, this
}, a(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api", '[data-provide="datetimepicker"]', function(b) {
var c = a(this);
c.data("datetimepicker") || (b.preventDefault(), c.datetimepicker("show"))
}), a(function() {
a('[data-provide="datetimepicker-inline"]').datetimepicker()
})
});
var saveAs = saveAs || function(a) {
"use strict";
if ("undefined" == typeof navigator || !/MSIE [1-9]\./.test(navigator.userAgent)) {
var b = a.document,
c = function() {
return a.URL || a.webkitURL || a
},
d = b.createElementNS("http://www.w3.org/1999/xhtml", "a"),
e = "download" in d,
f = function(c) {
var d = b.createEvent("MouseEvents");
d.initMouseEvent("click", !0, !1, a, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), c.dispatchEvent(d)
},
g = a.webkitRequestFileSystem,
h = a.requestFileSystem || g || a.mozRequestFileSystem,
i = function(b) {
(a.setImmediate || a.setTimeout)(function() {
throw b
}, 0)
},
j = "application/octet-stream",
k = 0,
l = 500,
m = function(b) {
var d = function() {
"string" == typeof b ? c().revokeObjectURL(b) : b.remove()
};
a.chrome ? d() : setTimeout(d, l)
},
n = function(a, b, c) {
b = [].concat(b);
for (var d = b.length; d--;) {
var e = a["on" + b[d]];
if ("function" == typeof e) try {
e.call(a, c || a)
} catch (f) {
i(f)
}
}
},
o = function(a) {
return /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type) ? new Blob(["\ufeff", a], {
type: a.type
}) : a
},
p = function(b, i) {
b = o(b);
var l, p, q, r = this,
s = b.type,
t = !1,
u = function() {
n(r, "writestart progress write writeend".split(" "))
},
v = function() {
if ((t || !l) && (l = c().createObjectURL(b)), p) p.location.href = l;
else {
var d = a.open(l, "_blank");
void 0 == d && "undefined" != typeof safari && (a.location.href = l)
}
r.readyState = r.DONE, u(), m(l)
},
w = function(a) {
return function() {
return r.readyState !== r.DONE ? a.apply(this, arguments) : void 0
}
},
x = {
create: !0,
exclusive: !1
};
return r.readyState = r.INIT, i || (i = "download"), e ? (l = c().createObjectURL(b), d.href = l, d.download = i, f(d), r.readyState = r.DONE, u(), void m(l)) : (a.chrome && s && s !== j && (q = b.slice || b.webkitSlice, b = q.call(b, 0, b.size, j), t = !0), g && "download" !== i && (i += ".download"), (s === j || g) && (p = a), h ? (k += b.size, void h(a.TEMPORARY, k, w(function(a) {
a.root.getDirectory("saved", x, w(function(a) {
var c = function() {
a.getFile(i, x, w(function(a) {
a.createWriter(w(function(c) {
c.onwriteend = function(b) {
p.location.href = a.toURL(), r.readyState = r.DONE, n(r, "writeend", b), m(a)
}, c.onerror = function() {
var a = c.error;
a.code !== a.ABORT_ERR && v()
}, "writestart progress write abort".split(" ").forEach(function(a) {
c["on" + a] = r["on" + a]
}), c.write(b), r.abort = function() {
c.abort(), r.readyState = r.DONE
}, r.readyState = r.WRITING
}), v)
}), v)
};
a.getFile(i, {
create: !1
}, w(function(a) {
a.remove(), c()
}), w(function(a) {
a.code === a.NOT_FOUND_ERR ? c() : v()
}))
}), v)
}), v)) : void v())
},
q = p.prototype,
r = function(a, b) {
return new p(a, b)
};
return "undefined" != typeof navigator && navigator.msSaveOrOpenBlob ? function(a, b) {
return navigator.msSaveOrOpenBlob(o(a), b)
} : (q.abort = function() {
var a = this;
a.readyState = a.DONE, n(a, "abort")
}, q.readyState = q.INIT = 0, q.WRITING = 1, q.DONE = 2, q.error = q.onwritestart = q.onprogress = q.onwrite = q.onabort = q.onerror = q.onwriteend = null, r)
}
}("undefined" != typeof self && self || "undefined" != typeof window && window || this.content);
"undefined" != typeof module && module.exports ? module.exports.saveAs = saveAs : "undefined" != typeof define && null !== define && null != define.amd && define([], function() {
return saveAs
}),
function(a, b, c) {
"use strict";
function d(a, b, c) {
var d, e = a.runtimeStyle && a.runtimeStyle[b],
f = a.style;
return !/^-?[0-9]+\.?[0-9]*(?:px)?$/i.test(c) && /^-?\d/.test(c) && (d = f.left, e && (a.runtimeStyle.left = a.currentStyle.left), f.left = "fontSize" === b ? "1em" : c || 0, c = f.pixelLeft + "px", f.left = d, e && (a.runtimeStyle.left = e)), /^(thin|medium|thick)$/i.test(c) ? c : Math.round(parseFloat(c)) + "px"
}
function e(a) {
return parseInt(a, 10)
}
function f(a, b, e, f) {
if (a = (a || "").split(","), a = a[f || 0] || a[0] || "auto", a = l.Util.trimText(a).split(" "), "backgroundSize" !== e || a[0] && !a[0].match(/cover|contain|auto/)) {
if (a[0] = -1 === a[0].indexOf("%") ? d(b, e + "X", a[0]) : a[0], a[1] === c) {
if ("backgroundSize" === e) return a[1] = "auto", a;
a[1] = a[0]
}
a[1] = -1 === a[1].indexOf("%") ? d(b, e + "Y", a[1]) : a[1]
} else;
return a
}
function g(a, b, c, d, e, f) {
var g, h, i, j, k = l.Util.getCSS(b, a, e);
if (1 === k.length && (j = k[0], k = [], k[0] = j, k[1] = j), -1 !== k[0].toString().indexOf("%")) i = parseFloat(k[0]) / 100, h = c.width * i, "backgroundSize" !== a && (h -= (f || d).width * i);
else if ("backgroundSize" === a)
if ("auto" === k[0]) h = d.width;
else if (/contain|cover/.test(k[0])) {
var m = l.Util.resizeBounds(d.width, d.height, c.width, c.height, k[0]);
h = m.width, g = m.height
} else h = parseInt(k[0], 10);
else h = parseInt(k[0], 10);
return "auto" === k[1] ? g = h / d.width * d.height : -1 !== k[1].toString().indexOf("%") ? (i = parseFloat(k[1]) / 100, g = c.height * i, "backgroundSize" !== a && (g -= (f || d).height * i)) : g = parseInt(k[1], 10), [h, g]
}
function h(a, b) {
var c = [];
return {
storage: c,
width: a,
height: b,
clip: function() {
c.push({
type: "function",
name: "clip",
arguments: arguments
})
},
translate: function() {
c.push({
type: "function",
name: "translate",
arguments: arguments
})
},
fill: function() {
c.push({
type: "function",
name: "fill",
arguments: arguments
})
},
save: function() {
c.push({
type: "function",
name: "save",
arguments: arguments
})
},
restore: function() {
c.push({
type: "function",
name: "restore",
arguments: arguments
})
},
fillRect: function() {
c.push({
type: "function",
name: "fillRect",
arguments: arguments
})
},
createPattern: function() {
c.push({
type: "function",
name: "createPattern",
arguments: arguments
})
},
drawShape: function() {
var a = [];
return c.push({
type: "function",
name: "drawShape",
arguments: a
}), {
moveTo: function() {
a.push({
name: "moveTo",
arguments: arguments
})
},
lineTo: function() {
a.push({
name: "lineTo",
arguments: arguments
})
},
arcTo: function() {
a.push({
name: "arcTo",
arguments: arguments
})
},
bezierCurveTo: function() {
a.push({
name: "bezierCurveTo",
arguments: arguments
})
},
quadraticCurveTo: function() {
a.push({
name: "quadraticCurveTo",
arguments: arguments
})
}
}
},
drawImage: function() {
c.push({
type: "function",
name: "drawImage",
arguments: arguments
})
},
fillText: function() {
c.push({
type: "function",
name: "fillText",
arguments: arguments
})
},
setVariable: function(a, b) {
return c.push({
type: "variable",
name: a,
arguments: b
}), b
}
}
}
function i(a) {
return {
zindex: a,
children: []
}
}
var j, k, l = {};
l.Util = {}, l.Util.log = function(b) {
l.logging && a.console && a.console.log && a.console.log(b)
}, l.Util.trimText = function(a) {
return function(b) {
return a ? a.apply(b) : ((b || "") + "").replace(/^\s+|\s+$/g, "")
}
}(String.prototype.trim), l.Util.asFloat = function(a) {
return parseFloat(a)
},
function() {
var a = /((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,
b = /(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;
l.Util.parseTextShadows = function(c) {
if (!c || "none" === c) return [];
for (var d = c.match(a), e = [], f = 0; d && f < d.length; f++) {
var g = d[f].match(b);
e.push({
color: g[0],
offsetX: g[1] ? g[1].replace("px", "") : 0,
offsetY: g[2] ? g[2].replace("px", "") : 0,
blur: g[3] ? g[3].replace("px", "") : 0
})
}
return e
}
}(), l.Util.parseBackgroundImage = function(a) {
var b, c, d, e, f, g, h, i, j = " \r\n ",
k = [],
l = 0,
m = 0,
n = function() {
b && ('"' === c.substr(0, 1) && (c = c.substr(1, c.length - 2)), c && i.push(c), "-" === b.substr(0, 1) && (e = b.indexOf("-", 1) + 1) > 0 && (d = b.substr(0, e), b = b.substr(e)), k.push({
prefix: d,
method: b.toLowerCase(),
value: f,
args: i
})), i = [], b = d = c = f = ""
};
n();
for (var o = 0, p = a.length; p > o; o++)
if (g = a[o], !(0 === l && j.indexOf(g) > -1)) {
switch (g) {
case '"':
h ? h === g && (h = null) : h = g;
break;
case "(":
if (h) break;
if (0 === l) {
l = 1, f += g;
continue
}
m++;
break;
case ")":
if (h) break;
if (1 === l) {
if (0 === m) {
l = 0, f += g, n();
continue
}
m--
}
break;
case ",":
if (h) break;
if (0 === l) {
n();
continue
}
if (1 === l && 0 === m && !b.match(/^url$/i)) {
i.push(c), c = "", f += g;
continue
}
}
f += g, 0 === l ? b += g : c += g
}
return n(), k
}, l.Util.Bounds = function(a) {
var b, c = {};
return a.getBoundingClientRect && (b = a.getBoundingClientRect(), c.top = b.top, c.bottom = b.bottom || b.top + b.height, c.left = b.left, c.width = a.offsetWidth, c.height = a.offsetHeight), c
}, l.Util.OffsetBounds = function(a) {
var b = a.offsetParent ? l.Util.OffsetBounds(a.offsetParent) : {
top: 0,
left: 0
};
return {
top: a.offsetTop + b.top,
bottom: a.offsetTop + a.offsetHeight + b.top,
left: a.offsetLeft + b.left,
width: a.offsetWidth,
height: a.offsetHeight
}
}, l.Util.getCSS = function(a, c, d) {
j !== a && (k = b.defaultView.getComputedStyle(a, null));
var g = k[c];
if (/^background(Size|Position)$/.test(c)) return f(g, a, c, d);
if (/border(Top|Bottom)(Left|Right)Radius/.test(c)) {
var h = g.split(" ");
return h.length <= 1 && (h[1] = h[0]), h.map(e)
}
return g
}, l.Util.resizeBounds = function(a, b, c, d, e) {
var f, g, h = c / d,
i = a / b;
return e && "auto" !== e ? i > h ^ "contain" === e ? (g = d, f = d * i) : (f = c, g = c / i) : (f = c, g = d), {
width: f,
height: g
}
}, l.Util.BackgroundPosition = function(a, b, c, d, e) {
var f = g("backgroundPosition", a, b, c, d, e);
return {
left: f[0],
top: f[1]
}
}, l.Util.BackgroundSize = function(a, b, c, d) {
var e = g("backgroundSize", a, b, c, d);
return {
width: e[0],
height: e[1]
}
}, l.Util.Extend = function(a, b) {
for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c]);
return b
}, l.Util.Children = function(a) {
var b;
try {
b = a.nodeName && "IFRAME" === a.nodeName.toUpperCase() ? a.contentDocument || a.contentWindow.document : function(a) {
var b = [];
return null !== a && ! function(a, b) {
var d = a.length,
e = 0;
if ("number" == typeof b.length)
for (var f = b.length; f > e; e++) a[d++] = b[e];
else
for (; b[e] !== c;) a[d++] = b[e++];
return a.length = d, a
}(b, a), b
}(a.childNodes)
} catch (d) {
l.Util.log("html2canvas.Util.Children failed with exception: " + d.message), b = []
}
return b
}, l.Util.isTransparent = function(a) {
return "transparent" === a || "rgba(0, 0, 0, 0)" === a
}, l.Util.Font = function() {
var a = {};
return function(b, d, e) {
if (a[b + "-" + d] !== c) return a[b + "-" + d];
var f, g, h, i = e.createElement("div"),
j = e.createElement("img"),
k = e.createElement("span"),
l = "Hidden Text";
return i.style.visibility = "hidden", i.style.fontFamily = b, i.style.fontSize = d, i.style.margin = 0, i.style.padding = 0, e.body.appendChild(i), j.src = "data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=", j.width = 1, j.height = 1, j.style.margin = 0, j.style.padding = 0, j.style.verticalAlign = "baseline", k.style.fontFamily = b, k.style.fontSize = d, k.style.margin = 0, k.style.padding = 0, k.appendChild(e.createTextNode(l)), i.appendChild(k), i.appendChild(j), f = j.offsetTop - k.offsetTop + 1, i.removeChild(k), i.appendChild(e.createTextNode(l)), i.style.lineHeight = "normal", j.style.verticalAlign = "super", g = j.offsetTop - i.offsetTop + 1, h = {
baseline: f,
lineWidth: 1,
middle: g
}, a[b + "-" + d] = h, e.body.removeChild(i), h
}
}(),
function() {
function a(a) {
return function(b) {
try {
a.addColorStop(b.stop, b.color)
} catch (d) {
c.log(["failed to add color stop: ", d, "; tried to add: ", b])
}
}
}
var c = l.Util,
d = {};
l.Generate = d;
var e = [/^(-webkit-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/, /^(-o-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/, /^(-webkit-gradient)\((linear|radial),\s((?:\d{1,3}%?)\s(?:\d{1,3}%?),\s(?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)\-]+)\)$/, /^(-moz-linear-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)]+)\)$/, /^(-webkit-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/, /^(-moz-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s?([a-z\-]*)([\w\d\.\s,%\(\)]+)\)$/, /^(-o-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/];
d.parseGradient = function(a, b) {
var c, d, f, g, h, i, j, k, l, m, n, o, p = e.length;
for (d = 0; p > d && !(f = a.match(e[d])); d += 1);
if (f) switch (f[1]) {
case "-webkit-linear-gradient":
case "-o-linear-gradient":
if (c = {
type: "linear",
x0: null,
y0: null,
x1: null,
y1: null,
colorStops: []
}, h = f[2].match(/\w+/g))
for (i = h.length, d = 0; i > d; d += 1) switch (h[d]) {
case "top":
c.y0 = 0, c.y1 = b.height;
break;
case "right":
c.x0 = b.width, c.x1 = 0;
break;
case "bottom":
c.y0 = b.height, c.y1 = 0;
break;
case "left":
c.x0 = 0, c.x1 = b.width
}
if (null === c.x0 && null === c.x1 && (c.x0 = c.x1 = b.width / 2), null === c.y0 && null === c.y1 && (c.y0 = c.y1 = b.height / 2), h = f[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g))
for (i = h.length, j = 1 / Math.max(i - 1, 1), d = 0; i > d; d += 1) k = h[d].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/), k[2] ? (g = parseFloat(k[2]), g /= "%" === k[3] ? 100 : b.width) : g = d * j, c.colorStops.push({
color: k[1],
stop: g
});
break;
case "-webkit-gradient":
if (c = {
type: "radial" === f[2] ? "circle" : f[2],
x0: 0,
y0: 0,
x1: 0,
y1: 0,
colorStops: []
}, h = f[3].match(/(\d{1,3})%?\s(\d{1,3})%?,\s(\d{1,3})%?\s(\d{1,3})%?/), h && (c.x0 = h[1] * b.width / 100, c.y0 = h[2] * b.height / 100, c.x1 = h[3] * b.width / 100, c.y1 = h[4] * b.height / 100), h = f[4].match(/((?:from|to|color-stop)\((?:[0-9\.]+,\s)?(?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)\))+/g))
for (i = h.length, d = 0; i > d; d += 1) k = h[d].match(/(from|to|color-stop)\(([0-9\.]+)?(?:,\s)?((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\)/), g = parseFloat(k[2]), "from" === k[1] && (g = 0), "to" === k[1] && (g = 1), c.colorStops.push({
color: k[3],
stop: g
});
break;
case "-moz-linear-gradient":
if (c = {
type: "linear",
x0: 0,
y0: 0,
x1: 0,
y1: 0,
colorStops: []
}, h = f[2].match(/(\d{1,3})%?\s(\d{1,3})%?/), h && (c.x0 = h[1] * b.width / 100, c.y0 = h[2] * b.height / 100, c.x1 = b.width - c.x0, c.y1 = b.height - c.y0), h = f[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}%)?)+/g))
for (i = h.length, j = 1 / Math.max(i - 1, 1), d = 0; i > d; d += 1) k = h[d].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%)?/), k[2] ? (g = parseFloat(k[2]), k[3] && (g /= 100)) : g = d * j, c.colorStops.push({
color: k[1],
stop: g
});
break;
case "-webkit-radial-gradient":
case "-moz-radial-gradient":
case "-o-radial-gradient":
if (c = {
type: "circle",
x0: 0,
y0: 0,
x1: b.width,
y1: b.height,
cx: 0,
cy: 0,
rx: 0,
ry: 0,
colorStops: []
}, h = f[2].match(/(\d{1,3})%?\s(\d{1,3})%?/), h && (c.cx = h[1] * b.width / 100, c.cy = h[2] * b.height / 100), h = f[3].match(/\w+/), k = f[4].match(/[a-z\-]*/), h && k) switch (k[0]) {
case "farthest-corner":
case "cover":
case "":
l = Math.sqrt(Math.pow(c.cx, 2) + Math.pow(c.cy, 2)), m = Math.sqrt(Math.pow(c.cx, 2) + Math.pow(c.y1 - c.cy, 2)), n = Math.sqrt(Math.pow(c.x1 - c.cx, 2) + Math.pow(c.y1 - c.cy, 2)), o = Math.sqrt(Math.pow(c.x1 - c.cx, 2) + Math.pow(c.cy, 2)), c.rx = c.ry = Math.max(l, m, n, o);
break;
case "closest-corner":
l = Math.sqrt(Math.pow(c.cx, 2) + Math.pow(c.cy, 2)), m = Math.sqrt(Math.pow(c.cx, 2) + Math.pow(c.y1 - c.cy, 2)), n = Math.sqrt(Math.pow(c.x1 - c.cx, 2) + Math.pow(c.y1 - c.cy, 2)), o = Math.sqrt(Math.pow(c.x1 - c.cx, 2) + Math.pow(c.cy, 2)), c.rx = c.ry = Math.min(l, m, n, o);
break;
case "farthest-side":
"circle" === h[0] ? c.rx = c.ry = Math.max(c.cx, c.cy, c.x1 - c.cx, c.y1 - c.cy) : (c.type = h[0], c.rx = Math.max(c.cx, c.x1 - c.cx), c.ry = Math.max(c.cy, c.y1 - c.cy));
break;
case "closest-side":
case "contain":
"circle" === h[0] ? c.rx = c.ry = Math.min(c.cx, c.cy, c.x1 - c.cx, c.y1 - c.cy) : (c.type = h[0], c.rx = Math.min(c.cx, c.x1 - c.cx), c.ry = Math.min(c.cy, c.y1 - c.cy))
}
if (h = f[5].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g))
for (i = h.length, j = 1 / Math.max(i - 1, 1), d = 0; i > d; d += 1) k = h[d].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/), k[2] ? (g = parseFloat(k[2]), g /= "%" === k[3] ? 100 : b.width) : g = d * j, c.colorStops.push({
color: k[1],
stop: g
})
}
return c
}, d.Gradient = function(c, d) {
if (0 !== d.width && 0 !== d.height) {
var e, f, g = b.createElement("canvas"),
h = g.getContext("2d");
if (g.width = d.width, g.height = d.height, e = l.Generate.parseGradient(c, d)) switch (e.type) {
case "linear":
f = h.createLinearGradient(e.x0, e.y0, e.x1, e.y1), e.colorStops.forEach(a(f)), h.fillStyle = f, h.fillRect(0, 0, d.width, d.height);
break;
case "circle":
f = h.createRadialGradient(e.cx, e.cy, 0, e.cx, e.cy, e.rx), e.colorStops.forEach(a(f)), h.fillStyle = f, h.fillRect(0, 0, d.width, d.height);
break;
case "ellipse":
var i = b.createElement("canvas"),
j = i.getContext("2d"),
k = Math.max(e.rx, e.ry),
m = 2 * k;
i.width = i.height = m, f = j.createRadialGradient(e.rx, e.ry, 0, e.rx, e.ry, k), e.colorStops.forEach(a(f)), j.fillStyle = f, j.fillRect(0, 0, m, m), h.fillStyle = e.colorStops[e.colorStops.length - 1].color, h.fillRect(0, 0, g.width, g.height), h.drawImage(i, e.cx - e.rx, e.cy - e.ry, 2 * e.rx, 2 * e.ry)
}
return g
}
}, d.ListAlpha = function(a) {
var b, c = "";
do b = a % 26, c = String.fromCharCode(b + 64) + c, a /= 26; while (26 * a > 26);
return c
}, d.ListRoman = function(a) {
var b, c = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"],
d = [1e3, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],
e = "",
f = c.length;
if (0 >= a || a >= 4e3) return a;
for (b = 0; f > b; b += 1)
for (; a >= d[b];) a -= d[b], e += c[b];
return e
}
}(), l.Parse = function(d, e) {
function f() {
return Math.max(Math.max(ka.body.scrollWidth, ka.documentElement.scrollWidth), Math.max(ka.body.offsetWidth, ka.documentElement.offsetWidth), Math.max(ka.body.clientWidth, ka.documentElement.clientWidth))
}
function g() {
return Math.max(Math.max(ka.body.scrollHeight, ka.documentElement.scrollHeight), Math.max(ka.body.offsetHeight, ka.documentElement.offsetHeight), Math.max(ka.body.clientHeight, ka.documentElement.clientHeight))
}
function j(a, b) {
var c = parseInt(pa(a, b), 10);
return isNaN(c) ? 0 : c
}
function k(a, b, c, d, e, f) {
"transparent" !== f && (a.setVariable("fillStyle", f), a.fillRect(b, c, d, e), ja += 1)
}
function m(a, b, c) {
return a.length > 0 ? b + c.toUpperCase() : void 0
}
function n(a, b) {
switch (b) {
case "lowercase":
return a.toLowerCase();
case "capitalize":
return a.replace(/(^|\s|:|-|\(|\))([a-z])/g, m);
case "uppercase":
return a.toUpperCase();
default:
return a
}
}
function o(a) {
return /^(normal|none|0px)$/.test(a)
}
function p(a, b, c, d) {
null !== a && la.trimText(a).length > 0 && (d.fillText(a, b, c), ja += 1)
}
function q(a, b, c, d) {
var e = !1,
f = pa(b, "fontWeight"),
g = pa(b, "fontFamily"),
h = pa(b, "fontSize"),
i = la.parseTextShadows(pa(b, "textShadow"));
switch (parseInt(f, 10)) {
case 401:
f = "bold";
break;
case 400:
f = "normal"
}
return a.setVariable("fillStyle", d), a.setVariable("font", [pa(b, "fontStyle"), pa(b, "fontVariant"), f, h, g].join(" ")), a.setVariable("textAlign", e ? "right" : "left"), i.length && (a.setVariable("shadowColor", i[0].color), a.setVariable("shadowOffsetX", i[0].offsetX), a.setVariable("shadowOffsetY", i[0].offsetY), a.setVariable("shadowBlur", i[0].blur)), "none" !== c ? la.Font(g, h, ka) : void 0
}
function r(a, b, c, d, e) {
switch (b) {
case "underline":
k(a, c.left, Math.round(c.top + d.baseline + d.lineWidth), c.width, 1, e);
break;
case "overline":
k(a, c.left, Math.round(c.top), c.width, 1, e);
break;
case "line-through":
k(a, c.left, Math.ceil(c.top + d.middle + d.lineWidth), c.width, 1, e)
}
}
function s(a, b, c, d, e) {
var f;
if (ma.rangeBounds && !e)("none" !== c || 0 !== la.trimText(b).length) && (f = t(b, a.node, a.textOffset)), a.textOffset += b.length;
else if (a.node && "string" == typeof a.node.nodeValue) {
var g = d ? a.node.splitText(b.length) : null;
f = u(a.node, e), a.node = g
}
return f
}
function t(a, b, c) {
var d = ka.createRange();
return d.setStart(b, c), d.setEnd(b, c + a.length), d.getBoundingClientRect()
}
function u(a, b) {
var c = a.parentNode,
d = ka.createElement("wrapper"),
e = a.cloneNode(!0);
d.appendChild(a.cloneNode(!0)), c.replaceChild(d, a);
var f = b ? la.OffsetBounds(d) : la.Bounds(d);
return c.replaceChild(e, d), f
}
function v(a, b, c) {
var d, f, g = c.ctx,
h = pa(a, "color"),
i = pa(a, "textDecoration"),
j = pa(a, "textAlign"),
k = {
node: b,
textOffset: 0
};
la.trimText(b.nodeValue).length > 0 && (b.nodeValue = n(b.nodeValue, pa(a, "textTransform")), j = j.replace(["-webkit-auto"], ["auto"]), f = b.nodeValue.split(!e.letterRendering && /^(left|right|justify|auto)$/.test(j) && o(pa(a, "letterSpacing")) ? /(\b| )/ : ""), d = q(g, a, i, h), e.chinese && f.forEach(function(a, b) {
/.*[\u4E00-\u9FA5].*$/.test(a) && (a = a.split(""), a.unshift(b, 1), f.splice.apply(f, a))
}), f.forEach(function(a, b) {
var e = s(k, a, i, b < f.length - 1, c.transform.matrix);
e && (p(a, e.left, e.bottom, g), r(g, i, e, d, h))
}))
}
function w(a, b) {
var c, d, e = ka.createElement("boundelement");
return e.style.display = "inline", c = a.style.listStyleType, a.style.listStyleType = "none", e.appendChild(ka.createTextNode(b)), a.insertBefore(e, a.firstChild), d = la.Bounds(e), a.removeChild(e), a.style.listStyleType = c, d
}
function x(a) {
var b = -1,
c = 1,
d = a.parentNode.childNodes;
if (a.parentNode) {
for (; d[++b] !== a;) 1 === d[b].nodeType && c++;
return c
}
return -1
}
function y(a, b) {
var c, d = x(a);
switch (b) {
case "decimal":
c = d;
break;
case "decimal-leading-zero":
c = 1 === d.toString().length ? d = "0" + d.toString() : d.toString();
break;
case "upper-roman":
c = l.Generate.ListRoman(d);
break;
case "lower-roman":
c = l.Generate.ListRoman(d).toLowerCase();
break;
case "lower-alpha":
c = l.Generate.ListAlpha(d).toLowerCase();
break;
case "upper-alpha":
c = l.Generate.ListAlpha(d)
}
return c + ". "
}
function z(a, b, c) {
var d, e, f, g = b.ctx,
h = pa(a, "listStyleType");
if (/^(decimal|decimal-leading-zero|upper-alpha|upper-latin|upper-roman|lower-alpha|lower-greek|lower-latin|lower-roman)$/i.test(h)) {
if (e = y(a, h), f = w(a, e), q(g, a, "none", pa(a, "color")), "inside" !== pa(a, "listStylePosition")) return;
g.setVariable("textAlign", "left"), d = c.left, p(e, d, f.bottom, g)
}
}
function A(a) {
var b = d[a];
return b && b.succeeded === !0 ? b.img : !1
}
function B(a, b) {
var c = Math.max(a.left, b.left),
d = Math.max(a.top, b.top),
e = Math.min(a.left + a.width, b.left + b.width),
f = Math.min(a.top + a.height, b.top + b.height);
return {
left: c,
top: d,
width: e - c,
height: f - d
}
}
function C(a, b, c) {
var d, e = "static" !== b.cssPosition,
f = e ? pa(a, "zIndex") : "auto",
g = pa(a, "opacity"),
h = "none" !== pa(a, "cssFloat");
b.zIndex = d = i(f), d.isPositioned = e, d.isFloated = h, d.opacity = g, d.ownStacking = "auto" !== f || 1 > g, c && c.zIndex.children.push(b)
}
function D(a, b, c, d, e) {
var f = j(b, "paddingLeft"),
g = j(b, "paddingTop"),
h = j(b, "paddingRight"),
i = j(b, "paddingBottom");
P(a, c, 0, 0, c.width, c.height, d.left + f + e[3].width, d.top + g + e[0].width, d.width - (e[1].width + e[3].width + f + h), d.height - (e[0].width + e[2].width + g + i))
}
function E(a) {
return ["Top", "Right", "Bottom", "Left"].map(function(b) {
return {
width: j(a, "border" + b + "Width"),
color: pa(a, "border" + b + "Color")
}
})
}
function F(a) {
return ["TopLeft", "TopRight", "BottomRight", "BottomLeft"].map(function(b) {
return pa(a, "border" + b + "Radius")
})
}
function G(a, b, c, d) {
var e = function(a, b, c) {
return {
x: a.x + (b.x - a.x) * c,
y: a.y + (b.y - a.y) * c
}
};
return {
start: a,
startControl: b,
endControl: c,
end: d,
subdivide: function(f) {
var g = e(a, b, f),
h = e(b, c, f),
i = e(c, d, f),
j = e(g, h, f),
k = e(h, i, f),
l = e(j, k, f);
return [G(a, g, j, l), G(l, k, i, d)]
},
curveTo: function(a) {
a.push(["bezierCurve", b.x, b.y, c.x, c.y, d.x, d.y])
},
curveToReversed: function(d) {
d.push(["bezierCurve", c.x, c.y, b.x, b.y, a.x, a.y])
}
}
}
function H(a, b, c, d, e, f, g) {
b[0] > 0 || b[1] > 0 ? (a.push(["line", d[0].start.x, d[0].start.y]), d[0].curveTo(a), d[1].curveTo(a)) : a.push(["line", f, g]), (c[0] > 0 || c[1] > 0) && a.push(["line", e[0].start.x, e[0].start.y])
}
function I(a, b, c, d, e, f, g) {
var h = [];
return b[0] > 0 || b[1] > 0 ? (h.push(["line", d[1].start.x, d[1].start.y]), d[1].curveTo(h)) : h.push(["line", a.c1[0], a.c1[1]]), c[0] > 0 || c[1] > 0 ? (h.push(["line", f[0].start.x, f[0].start.y]), f[0].curveTo(h), h.push(["line", g[0].end.x, g[0].end.y]), g[0].curveToReversed(h)) : (h.push(["line", a.c2[0], a.c2[1]]), h.push(["line", a.c3[0], a.c3[1]])), b[0] > 0 || b[1] > 0 ? (h.push(["line", e[1].end.x, e[1].end.y]), e[1].curveToReversed(h)) : h.push(["line", a.c4[0], a.c4[1]]), h
}
function J(a, b, c) {
var d = a.left,
e = a.top,
f = a.width,
g = a.height,
h = b[0][0],
i = b[0][1],
j = b[1][0],
k = b[1][1],
l = b[2][0],
m = b[2][1],
n = b[3][0],
o = b[3][1],
p = f - j,
q = g - m,
r = f - l,
s = g - o;
return {
topLeftOuter: sa(d, e, h, i).topLeft.subdivide(.5),
topLeftInner: sa(d + c[3].width, e + c[0].width, Math.max(0, h - c[3].width), Math.max(0, i - c[0].width)).topLeft.subdivide(.5),
topRightOuter: sa(d + p, e, j, k).topRight.subdivide(.5),
topRightInner: sa(d + Math.min(p, f + c[3].width), e + c[0].width, p > f + c[3].width ? 0 : j - c[3].width, k - c[0].width).topRight.subdivide(.5),
bottomRightOuter: sa(d + r, e + q, l, m).bottomRight.subdivide(.5),
bottomRightInner: sa(d + Math.min(r, f + c[3].width), e + Math.min(q, g + c[0].width), Math.max(0, l - c[1].width), Math.max(0, m - c[2].width)).bottomRight.subdivide(.5),
bottomLeftOuter: sa(d, e + s, n, o).bottomLeft.subdivide(.5),
bottomLeftInner: sa(d + c[3].width, e + s, Math.max(0, n - c[3].width), Math.max(0, o - c[2].width)).bottomLeft.subdivide(.5)
}
}
function K(a, b, c, d, e) {
var f = pa(a, "backgroundClip"),
g = [];
switch (f) {
case "content-box":
case "padding-box":
H(g, d[0], d[1], b.topLeftInner, b.topRightInner, e.left + c[3].width, e.top + c[0].width), H(g, d[1], d[2], b.topRightInner, b.bottomRightInner, e.left + e.width - c[1].width, e.top + c[0].width), H(g, d[2], d[3], b.bottomRightInner, b.bottomLeftInner, e.left + e.width - c[1].width, e.top + e.height - c[2].width), H(g, d[3], d[0], b.bottomLeftInner, b.topLeftInner, e.left + c[3].width, e.top + e.height - c[2].width);
break;
default:
H(g, d[0], d[1], b.topLeftOuter, b.topRightOuter, e.left, e.top), H(g, d[1], d[2], b.topRightOuter, b.bottomRightOuter, e.left + e.width, e.top), H(g, d[2], d[3], b.bottomRightOuter, b.bottomLeftOuter, e.left + e.width, e.top + e.height), H(g, d[3], d[0], b.bottomLeftOuter, b.topLeftOuter, e.left, e.top + e.height)
}
return g
}
function L(a, b, c) {
var d, e, f, g, h, i, j = b.left,
k = b.top,
l = b.width,
m = b.height,
n = F(a),
o = J(b, n, c),
p = {
clip: K(a, o, c, n, b),
borders: []
};
for (d = 0; 4 > d; d++)
if (c[d].width > 0) {
switch (e = j, f = k, g = l, h = m - c[2].width, d) {
case 0:
h = c[0].width, i = I({
c1: [e, f],
c2: [e + g, f],
c3: [e + g - c[1].width, f + h],
c4: [e + c[3].width, f + h]
}, n[0], n[1], o.topLeftOuter, o.topLeftInner, o.topRightOuter, o.topRightInner);
break;
case 1:
e = j + l - c[1].width, g = c[1].width, i = I({
c1: [e + g, f],
c2: [e + g, f + h + c[2].width],
c3: [e, f + h],
c4: [e, f + c[0].width]
}, n[1], n[2], o.topRightOuter, o.topRightInner, o.bottomRightOuter, o.bottomRightInner);
break;
case 2:
f = f + m - c[2].width, h = c[2].width, i = I({
c1: [e + g, f + h],
c2: [e, f + h],
c3: [e + c[3].width, f],
c4: [e + g - c[3].width, f]
}, n[2], n[3], o.bottomRightOuter, o.bottomRightInner, o.bottomLeftOuter, o.bottomLeftInner);
break;
case 3:
g = c[3].width, i = I({
c1: [e, f + h + c[2].width],
c2: [e, f],
c3: [e + g, f + c[0].width],
c4: [e + g, f + h]
}, n[3], n[0], o.bottomLeftOuter, o.bottomLeftInner, o.topLeftOuter, o.topLeftInner)
}
p.borders.push({
args: i,
color: c[d].color
})
}
return p
}
function M(a, b) {
var c = a.drawShape();
return b.forEach(function(a, b) {
c[0 === b ? "moveTo" : a[0] + "To"].apply(null, a.slice(1))
}), c
}
function N(a, b, c) {
"transparent" !== c && (a.setVariable("fillStyle", c), M(a, b), a.fill(), ja += 1)
}
function O(a, b, c) {
var d, e, f = ka.createElement("valuewrap"),
g = ["lineHeight", "textAlign", "fontFamily", "color", "fontSize", "paddingLeft", "paddingTop", "width", "height", "border", "borderLeftWidth", "borderTopWidth"];
g.forEach(function(b) {
try {
f.style[b] = pa(a, b)
} catch (c) {
la.log("html2canvas: Parse: Exception caught in renderFormValue: " + c.message)
}
}), f.style.borderColor = "black", f.style.borderStyle = "solid", f.style.display = "block", f.style.position = "absolute", (/^(submit|reset|button|text|password)$/.test(a.type) || "SELECT" === a.nodeName) && (f.style.lineHeight = pa(a, "height")), f.style.top = b.top + "px", f.style.left = b.left + "px", d = "SELECT" === a.nodeName ? (a.options[a.selectedIndex] || 0).text : a.value, d || (d = a.placeholder), e = ka.createTextNode(d), f.appendChild(e), oa.appendChild(f), v(a, e, c), oa.removeChild(f)
}
function P(a) {
a.drawImage.apply(a, Array.prototype.slice.call(arguments, 1)), ja += 1
}
function Q(c, d) {
var e = a.getComputedStyle(c, d);
if (e && e.content && "none" !== e.content && "-moz-alt-content" !== e.content && "none" !== e.display) {
var f = e.content + "",
g = f.substr(0, 1);
g === f.substr(f.length - 1) && g.match(/'|"/) && (f = f.substr(1, f.length - 2));
var h = "url" === f.substr(0, 3),
i = b.createElement(h ? "img" : "span");
return i.className = qa + "-before " + qa + "-after", Object.keys(e).filter(R).forEach(function(a) {
try {
i.style[a] = e[a]
} catch (b) {
la.log(["Tried to assign readonly property ", a, "Error:", b])
}
}), h ? i.src = la.parseBackgroundImage(f)[0].args[0] : i.innerHTML = f, i
}
}
function R(b) {
return isNaN(a.parseInt(b, 10))
}
function S(a, b) {
var c = Q(a, ":before"),
d = Q(a, ":after");
(c || d) && (c && (a.className += " " + qa + "-before", a.parentNode.insertBefore(c, a), fa(c, b, !0), a.parentNode.removeChild(c), a.className = a.className.replace(qa + "-before", "").trim()), d && (a.className += " " + qa + "-after", a.appendChild(d), fa(d, b, !0), a.removeChild(d), a.className = a.className.replace(qa + "-after", "").trim()))
}
function T(a, b, c, d) {
var e = Math.round(d.left + c.left),
f = Math.round(d.top + c.top);
a.createPattern(b), a.translate(e, f), a.fill(), a.translate(-e, -f)
}
function U(a, b, c, d, e, f, g, h) {
var i = [];
i.push(["line", Math.round(e), Math.round(f)]), i.push(["line", Math.round(e + g), Math.round(f)]), i.push(["line", Math.round(e + g), Math.round(h + f)]), i.push(["line", Math.round(e), Math.round(h + f)]), M(a, i), a.save(), a.clip(), T(a, b, c, d), a.restore()
}
function V(a, b, c) {
k(a, b.left, b.top, b.width, b.height, c)
}
function W(a, b, c, d, e) {
var f = la.BackgroundSize(a, b, d, e),
g = la.BackgroundPosition(a, b, d, e, f),
h = pa(a, "backgroundRepeat").split(",").map(la.trimText);
switch (d = Y(d, f), h = h[e] || h[0]) {
case "repeat-x":
U(c, d, g, b, b.left, b.top + g.top, 99999, d.height);
break;
case "repeat-y":
U(c, d, g, b, b.left + g.left, b.top, d.width, 99999);
break;
case "no-repeat":
U(c, d, g, b, b.left + g.left, b.top + g.top, d.width, d.height);
break;
default:
T(c, d, g, {
top: b.top,
left: b.left,
width: d.width,
height: d.height
})
}
}
function X(a, b, c) {
for (var d, e = pa(a, "backgroundImage"), f = la.parseBackgroundImage(e), g = f.length; g--;)
if (e = f[g], e.args && 0 !== e.args.length) {
var h = "url" === e.method ? e.args[0] : e.value;
d = A(h), d ? W(a, b, c, d, g) : la.log("html2canvas: Error loading background:", e)
}
}
function Y(a, b) {
if (a.width === b.width && a.height === b.height) return a;
var c, d = ka.createElement("canvas");
return d.width = b.width, d.height = b.height, c = d.getContext("2d"), P(c, a, 0, 0, a.width, a.height, 0, 0, b.width, b.height), d
}
function Z(a, b, c) {
return a.setVariable("globalAlpha", pa(b, "opacity") * (c ? c.opacity : 1))
}
function $(a) {
return a.replace("px", "")
}
function _(a) {
var b = pa(a, "transform") || pa(a, "-webkit-transform") || pa(a, "-moz-transform") || pa(a, "-ms-transform") || pa(a, "-o-transform"),
c = pa(a, "transform-origin") || pa(a, "-webkit-transform-origin") || pa(a, "-moz-transform-origin") || pa(a, "-ms-transform-origin") || pa(a, "-o-transform-origin") || "0px 0px";
c = c.split(" ").map($).map(la.asFloat);
var d;
if (b && "none" !== b) {
var e = b.match(ta);
if (e) switch (e[1]) {
case "matrix":
d = e[2].split(",").map(la.trimText).map(la.asFloat)
}
}
return {
origin: c,
matrix: d
}
}
function aa(a, b, c, d) {
var i = h(b ? c.width : f(), b ? c.height : g()),
j = {
ctx: i,
opacity: Z(i, a, b),
cssPosition: pa(a, "position"),
borders: E(a),
transform: d,
clip: b && b.clip ? la.Extend({}, b.clip) : null
};
return C(a, j, b), e.useOverflow === !0 && /(hidden|scroll|auto)/.test(pa(a, "overflow")) === !0 && /(BODY)/i.test(a.nodeName) === !1 && (j.clip = j.clip ? B(j.clip, c) : c), j
}
function ba(a, b, c) {
var d = {
left: b.left + a[3].width,
top: b.top + a[0].width,
width: b.width - (a[1].width + a[3].width),
height: b.height - (a[0].width + a[2].width)
};
return c && (d = B(d, c)), d
}
function ca(a, b) {
var c = b.matrix ? la.OffsetBounds(a) : la.Bounds(a);
return b.origin[0] += c.left, b.origin[1] += c.top, c
}
function da(a, b, c, d) {
var e, f = _(a, b),
g = ca(a, f),
h = aa(a, b, g, f),
i = h.borders,
j = h.ctx,
k = ba(i, g, h.clip),
l = L(a, g, i),
m = na.test(a.nodeName) ? "#efefef" : pa(a, "backgroundColor");
switch (M(j, l.clip), j.save(), j.clip(), k.height > 0 && k.width > 0 && !d ? (V(j, g, m), X(a, k, j)) : d && (h.backgroundColor = m),
j.restore(), l.borders.forEach(function(a) {
N(j, a.args, a.color)
}), c || S(a, h), a.nodeName) {
case "IMG":
(e = A(a.getAttribute("src"))) ? D(j, a, e, g, i): la.log("html2canvas: Error loading <img>:" + a.getAttribute("src"));
break;
case "INPUT":
/^(text|url|email|submit|button|reset)$/.test(a.type) && (a.value || a.placeholder || "").length > 0 && O(a, g, h);
break;
case "TEXTAREA":
(a.value || a.placeholder || "").length > 0 && O(a, g, h);
break;
case "SELECT":
(a.options || a.placeholder || "").length > 0 && O(a, g, h);
break;
case "LI":
z(a, h, k);
break;
case "CANVAS":
D(j, a, a, g, i)
}
return h
}
function ea(a) {
return "none" !== pa(a, "display") && "hidden" !== pa(a, "visibility") && !a.hasAttribute("data-html2canvas-ignore")
}
function fa(a, b, c) {
ea(a) && (b = da(a, b, c, !1) || b, na.test(a.nodeName) || ga(a, b, c))
}
function ga(a, b, c) {
la.Children(a).forEach(function(d) {
d.nodeType === d.ELEMENT_NODE ? fa(d, b, c) : d.nodeType === d.TEXT_NODE && v(a, d, b)
})
}
function ha() {
var a = pa(b.documentElement, "backgroundColor"),
c = la.isTransparent(a) && ia === b.body,
d = da(ia, null, !1, c);
return ga(ia, d), c && (a = d.backgroundColor), oa.removeChild(ra), {
backgroundColor: a,
stack: d
}
}
a.scroll(0, 0);
var ia = e.elements === c ? b.body : e.elements[0],
ja = 0,
ka = ia.ownerDocument,
la = l.Util,
ma = la.Support(e, ka),
na = new RegExp("(" + e.ignoreElements + ")"),
oa = ka.body,
pa = la.getCSS,
qa = "___html2canvas___pseudoelement",
ra = ka.createElement("style");
ra.innerHTML = "." + qa + '-before:before { content: "" !important; display: none !important; }.' + qa + '-after:after { content: "" !important; display: none !important; }', oa.appendChild(ra), d = d || {};
var sa = function(a) {
return function(b, c, d, e) {
var f = d * a,
g = e * a,
h = b + d,
i = c + e;
return {
topLeft: G({
x: b,
y: i
}, {
x: b,
y: i - g
}, {
x: h - f,
y: c
}, {
x: h,
y: c
}),
topRight: G({
x: b,
y: c
}, {
x: b + f,
y: c
}, {
x: h,
y: i - g
}, {
x: h,
y: i
}),
bottomRight: G({
x: h,
y: c
}, {
x: h,
y: c + g
}, {
x: b + f,
y: i
}, {
x: b,
y: i
}),
bottomLeft: G({
x: h,
y: i
}, {
x: h - f,
y: i
}, {
x: b,
y: c + g
}, {
x: b,
y: c
})
}
}
}(4 * ((Math.sqrt(2) - 1) / 3)),
ta = /(matrix)\((.+)\)/;
return ha()
}, l.Preload = function(d) {
function e(a) {
A.href = a, A.href = A.href;
var b = A.protocol + A.host;
return b === p
}
function f() {
u.log("html2canvas: start: images: " + t.numLoaded + " / " + t.numTotal + " (failed: " + t.numFailed + ")"), !t.firstRun && t.numLoaded >= t.numTotal && (u.log("Finished loading images: # " + t.numTotal + " (failed: " + t.numFailed + ")"), "function" == typeof d.complete && d.complete(t))
}
function g(b, e, g) {
var h, i, j = d.proxy;
A.href = b, b = A.href, h = "html2canvas_" + v++, g.callbackname = h, j += j.indexOf("?") > -1 ? "&" : "?", j += "url=" + encodeURIComponent(b) + "&callback=" + h, i = x.createElement("script"), a[h] = function(b) {
"error:" === b.substring(0, 6) ? (g.succeeded = !1, t.numLoaded++, t.numFailed++, f()) : (o(e, g), e.src = b), a[h] = c;
try {
delete a[h]
} catch (d) {}
i.parentNode.removeChild(i), i = null, delete g.script, delete g.callbackname
}, i.setAttribute("type", "text/javascript"), i.setAttribute("src", j), g.script = i, a.document.body.appendChild(i)
}
function h(b, c) {
var d = a.getComputedStyle(b, c),
e = d.content;
"url" === e.substr(0, 3) && q.loadImage(l.Util.parseBackgroundImage(e)[0].args[0]), m(d.backgroundImage, b)
}
function i(a) {
h(a, ":before"), h(a, ":after")
}
function j(a, b) {
var d = l.Generate.Gradient(a, b);
d !== c && (t[a] = {
img: d,
succeeded: !0
}, t.numTotal++, t.numLoaded++, f())
}
function k(a) {
return a && a.method && a.args && a.args.length > 0
}
function m(a, b) {
var d;
l.Util.parseBackgroundImage(a).filter(k).forEach(function(a) {
"url" === a.method ? q.loadImage(a.args[0]) : a.method.match(/\-?gradient$/) && (d === c && (d = l.Util.Bounds(b)), j(a.value, d))
})
}
function n(a) {
var b = !1;
try {
u.Children(a).forEach(n)
} catch (d) {}
try {
b = a.nodeType
} catch (e) {
b = !1, u.log("html2canvas: failed to access some element's nodeType - Exception: " + e.message)
}
if (1 === b || b === c) {
i(a);
try {
m(u.getCSS(a, "backgroundImage"), a)
} catch (d) {
u.log("html2canvas: failed to get background-image - Exception: " + d.message)
}
m(a)
}
}
function o(b, e) {
b.onload = function() {
e.timer !== c && a.clearTimeout(e.timer), t.numLoaded++, e.succeeded = !0, b.onerror = b.onload = null, f()
}, b.onerror = function() {
if ("anonymous" === b.crossOrigin && (a.clearTimeout(e.timer), d.proxy)) {
var c = b.src;
return b = new Image, e.img = b, b.src = c, void g(b.src, b, e)
}
t.numLoaded++, t.numFailed++, e.succeeded = !1, b.onerror = b.onload = null, f()
}
}
var p, q, r, s, t = {
numLoaded: 0,
numFailed: 0,
numTotal: 0,
cleanupDone: !1
},
u = l.Util,
v = 0,
w = d.elements[0] || b.body,
x = w.ownerDocument,
y = w.getElementsByTagName("img"),
z = y.length,
A = x.createElement("a"),
B = function(a) {
return a.crossOrigin !== c
}(new Image);
for (A.href = a.location.href, p = A.protocol + A.host, q = {
loadImage: function(a) {
var b, f;
a && t[a] === c && (b = new Image, a.match(/data:image\/.*;base64,/i) ? (b.src = a.replace(/url\(['"]{0,}|['"]{0,}\)$/gi, ""), f = t[a] = {
img: b
}, t.numTotal++, o(b, f)) : e(a) || d.allowTaint === !0 ? (f = t[a] = {
img: b
}, t.numTotal++, o(b, f), b.src = a) : B && !d.allowTaint && d.useCORS ? (b.crossOrigin = "anonymous", f = t[a] = {
img: b
}, t.numTotal++, o(b, f), b.src = a) : d.proxy && (f = t[a] = {
img: b
}, t.numTotal++, g(a, b, f)))
},
cleanupDOM: function(e) {
var g, h;
if (!t.cleanupDone) {
u.log(e && "string" == typeof e ? "html2canvas: Cleanup because: " + e : "html2canvas: Cleanup after timeout: " + d.timeout + " ms.");
for (h in t)
if (t.hasOwnProperty(h) && (g = t[h], "object" == typeof g && g.callbackname && g.succeeded === c)) {
a[g.callbackname] = c;
try {
delete a[g.callbackname]
} catch (i) {}
g.script && g.script.parentNode && (g.script.setAttribute("src", "about:blank"), g.script.parentNode.removeChild(g.script)), t.numLoaded++, t.numFailed++, u.log("html2canvas: Cleaned up failed img: '" + h + "' Steps: " + t.numLoaded + " / " + t.numTotal)
}
a.stop !== c ? a.stop() : b.execCommand !== c && b.execCommand("Stop", !1), b.close !== c && b.close(), t.cleanupDone = !0, e && "string" == typeof e || f()
}
},
renderingDone: function() {
s && a.clearTimeout(s)
}
}, d.timeout > 0 && (s = a.setTimeout(q.cleanupDOM, d.timeout)), u.log("html2canvas: Preload starts: finding background-images"), t.firstRun = !0, n(w), u.log("html2canvas: Preload: Finding images"), r = 0; z > r; r += 1) q.loadImage(y[r].getAttribute("src"));
return t.firstRun = !1, u.log("html2canvas: Preload: Done."), t.numTotal === t.numLoaded && f(), q
}, l.Renderer = function(a, d) {
function e(a) {
function b(a) {
Object.keys(a).sort().forEach(function(c) {
var d = [],
f = [],
g = [],
h = [];
a[c].forEach(function(a) {
a.node.zIndex.isPositioned || a.node.zIndex.opacity < 1 ? g.push(a) : a.node.zIndex.isFloated ? f.push(a) : d.push(a)
}),
function i(a) {
a.forEach(function(a) {
h.push(a), a.children && i(a.children)
})
}(d.concat(f, g)), h.forEach(function(a) {
a.context ? b(a.context) : e.push(a.node)
})
})
}
var d, e = [];
return d = function(a) {
function b(a, d, e) {
var f = "auto" === d.zIndex.zindex ? 0 : Number(d.zIndex.zindex),
g = a,
h = d.zIndex.isPositioned,
i = d.zIndex.isFloated,
j = {
node: d
},
k = e;
d.zIndex.ownStacking ? (g = j.context = {
"!": [{
node: d,
children: []
}]
}, k = c) : (h || i) && (k = j.children = []), 0 === f && e ? e.push(j) : (a[f] || (a[f] = []), a[f].push(j)), d.zIndex.children.forEach(function(a) {
b(g, a, k)
})
}
var d = {};
return b(d, a), d
}(a), b(d), e
}
function f(a) {
var b;
if ("string" == typeof d.renderer && l.Renderer[a] !== c) b = l.Renderer[a](d);
else {
if ("function" != typeof a) throw new Error("Unknown renderer");
b = a(d)
}
if ("function" != typeof b) throw new Error("Invalid renderer defined");
return b
}
return f(d.renderer)(a, d, b, e(a.stack), l)
}, l.Util.Support = function(a, b) {
function d() {
var a = new Image,
d = b.createElement("canvas"),
e = d.getContext === c ? !1 : d.getContext("2d");
if (e === !1) return !1;
d.width = d.height = 10, a.src = ["data:image/svg+xml,", "<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'>", "<foreignObject width='10' height='10'>", "<div xmlns='http://www.w3.org/1999/xhtml' style='width:10;height:10;'>", "sup", "</div>", "</foreignObject>", "</svg>"].join("");
try {
e.drawImage(a, 0, 0), d.toDataURL()
} catch (f) {
return !1
}
return l.Util.log("html2canvas: Parse: SVG powered rendering available"), !0
}
function e() {
var a, c, d, e, f = !1;
return b.createRange && (a = b.createRange(), a.getBoundingClientRect && (c = b.createElement("boundtest"), c.style.height = "123px", c.style.display = "block", b.body.appendChild(c), a.selectNode(c), d = a.getBoundingClientRect(), e = d.height, 123 === e && (f = !0), b.body.removeChild(c))), f
}
return {
rangeBounds: e(),
svgRendering: a.svgRendering && d()
}
}, a.html2canvas = function(b, c) {
b = b.length ? b : [b];
var d, e, f = {
logging: !1,
elements: b,
background: "#fff",
proxy: null,
timeout: 0,
useCORS: !1,
allowTaint: !1,
svgRendering: !1,
ignoreElements: "IFRAME|OBJECT|PARAM",
useOverflow: !0,
letterRendering: !1,
chinese: !1,
width: null,
height: null,
taintTest: !0,
renderer: "Canvas"
};
return f = l.Util.Extend(c, f), l.logging = f.logging, f.complete = function(a) {
("function" != typeof f.onpreloaded || f.onpreloaded(a) !== !1) && (d = l.Parse(a, f), ("function" != typeof f.onparsed || f.onparsed(d) !== !1) && (e = l.Renderer(d, f), "function" == typeof f.onrendered && f.onrendered(e)))
}, a.setTimeout(function() {
l.Preload(f)
}, 0), {
render: function(a, b) {
return l.Renderer(a, l.Util.Extend(b, f))
},
parse: function(a, b) {
return l.Parse(a, l.Util.Extend(b, f))
},
preload: function(a) {
return l.Preload(l.Util.Extend(a, f))
},
log: l.Util.log
}
}, a.html2canvas.log = l.Util.log, a.html2canvas.Renderer = {
Canvas: c
}, l.Renderer.Canvas = function(a) {
function d(a, b) {
a.beginPath(), b.forEach(function(b) {
a[b.name].apply(a, b.arguments)
}), a.closePath()
}
function e(a) {
if (-1 === h.indexOf(a.arguments[0].src)) {
j.drawImage(a.arguments[0], 0, 0);
try {
j.getImageData(0, 0, 1, 1)
} catch (b) {
return i = g.createElement("canvas"), j = i.getContext("2d"), !1
}
h.push(a.arguments[0].src)
}
return !0
}
function f(b, c) {
switch (c.type) {
case "variable":
b[c.name] = c.arguments;
break;
case "function":
switch (c.name) {
case "createPattern":
if (c.arguments[0].width > 0 && c.arguments[0].height > 0) try {
b.fillStyle = b.createPattern(c.arguments[0], "repeat")
} catch (f) {
k.log("html2canvas: Renderer: Error creating pattern", f.message)
}
break;
case "drawShape":
d(b, c.arguments);
break;
case "drawImage":
c.arguments[8] > 0 && c.arguments[7] > 0 && (!a.taintTest || a.taintTest && e(c)) && b.drawImage.apply(b, c.arguments);
break;
default:
b[c.name].apply(b, c.arguments)
}
}
}
a = a || {};
var g = b,
h = [],
i = b.createElement("canvas"),
j = i.getContext("2d"),
k = l.Util,
m = a.canvas || g.createElement("canvas");
return function(a, b, d, e, g) {
var h, i, j, l = m.getContext("2d"),
n = a.stack;
return m.width = m.style.width = b.width || n.ctx.width, m.height = m.style.height = b.height || n.ctx.height, j = l.fillStyle, l.fillStyle = k.isTransparent(n.backgroundColor) && b.background !== c ? b.background : a.backgroundColor, l.fillRect(0, 0, m.width, m.height), l.fillStyle = j, e.forEach(function(a) {
l.textBaseline = "bottom", l.save(), a.transform.matrix && (l.translate(a.transform.origin[0], a.transform.origin[1]), l.transform.apply(l, a.transform.matrix), l.translate(-a.transform.origin[0], -a.transform.origin[1])), a.clip && (l.beginPath(), l.rect(a.clip.left, a.clip.top, a.clip.width, a.clip.height), l.clip()), a.ctx.storage && a.ctx.storage.forEach(function(a) {
f(l, a)
}), l.restore()
}), k.log("html2canvas: Renderer: Canvas renderer done - returning canvas obj"), 1 === b.elements.length && "object" == typeof b.elements[0] && "BODY" !== b.elements[0].nodeName ? (i = g.Util.Bounds(b.elements[0]), h = d.createElement("canvas"), h.width = Math.ceil(i.width), h.height = Math.ceil(i.height), l = h.getContext("2d"), l.drawImage(m, i.left, i.top, i.width, i.height, 0, 0, i.width, i.height), m = null, h) : m
}
}
}(window, document), ! function(a, b) {
b["true"] = a;
var c = function(a) {
"use strict";
function b(b) {
var c = {};
this.subscribe = function(a, b, d) {
if ("function" != typeof b) return !1;
c.hasOwnProperty(a) || (c[a] = {});
var e = Math.random().toString(35);
return c[a][e] = [b, !!d], e
}, this.unsubscribe = function(a) {
for (var b in c)
if (c[b][a]) return delete c[b][a], !0;
return !1
}, this.publish = function(d) {
if (c.hasOwnProperty(d)) {
var e = Array.prototype.slice.call(arguments, 1),
f = [];
for (var g in c[d]) {
var h = c[d][g];
try {
h[0].apply(b, e)
} catch (i) {
a.console && console.error("jsPDF PubSub Error", i.message, i)
}
h[1] && f.push(g)
}
f.length && f.forEach(this.unsubscribe)
}
}
}
function c(h, i, j, k) {
var l = {};
"object" == typeof h && (l = h, h = l.orientation, i = l.unit || i, j = l.format || j, k = l.compress || l.compressPdf || k), i = i || "mm", j = j || "a4", h = ("" + (h || "P")).toLowerCase();
var m, n, o, p, q, r, s, t, u, v = (("" + j).toLowerCase(), !!k && "function" == typeof Uint8Array),
w = l.textColor || "0 g",
x = l.drawColor || "0 G",
y = l.fontSize || 16,
z = l.lineHeight || 1.15,
A = l.lineWidth || .200025,
B = 2,
C = !1,
D = [],
E = {},
F = {},
G = 0,
H = [],
I = {},
J = [],
K = 0,
L = 0,
M = 0,
N = {
title: "",
subject: "",
author: "",
keywords: "",
creator: ""
},
O = {},
P = new b(O),
Q = function(a) {
return a.toFixed(2)
},
R = function(a) {
return a.toFixed(3)
},
S = function(a) {
return ("0" + parseInt(a)).slice(-2)
},
T = function(a) {
C ? H[p].push(a) : (M += a.length + 1, J.push(a))
},
U = function() {
return B++, D[B] = M, T(B + " 0 obj"), B
},
V = function(a) {
T("stream"), T(a), T("endstream")
},
W = function() {
var b, d, f, g, h, i, j, k, l;
for (j = a.adler32cs || c.adler32cs, v && "undefined" == typeof j && (v = !1), b = 1; G >= b; b++) {
if (U(), k = (q = I[b].width) * n, l = (r = I[b].height) * n, T("<</Type /Page"), T("/Parent 1 0 R"), T("/Resources 2 0 R"), T("/MediaBox [0 0 " + Q(k) + " " + Q(l) + "]"), T("/Contents " + (B + 1) + " 0 R>>"), T("endobj"), d = H[b].join("\n"), U(), v) {
for (f = [], g = d.length; g--;) f[g] = d.charCodeAt(g);
i = j.from(d), h = new e(6), h.append(new Uint8Array(f)), d = h.flush(), f = new Uint8Array(d.length + 6), f.set(new Uint8Array([120, 156])), f.set(d, 2), f.set(new Uint8Array([255 & i, i >> 8 & 255, i >> 16 & 255, i >> 24 & 255]), d.length + 2), d = String.fromCharCode.apply(null, f), T("<</Length " + d.length + " /Filter [/FlateDecode]>>")
} else T("<</Length " + d.length + ">>");
V(d), T("endobj")
}
D[1] = M, T("1 0 obj"), T("<</Type /Pages");
var m = "/Kids [";
for (g = 0; G > g; g++) m += 3 + 2 * g + " 0 R ";
T(m + "]"), T("/Count " + G), T(">>"), T("endobj")
},
X = function(a) {
a.objectNumber = U(), T("<</BaseFont/" + a.PostScriptName + "/Type/Font"), "string" == typeof a.encoding && T("/Encoding/" + a.encoding), T("/Subtype/Type1>>"), T("endobj")
},
Y = function() {
for (var a in E) E.hasOwnProperty(a) && X(E[a])
},
Z = function() {
P.publish("putXobjectDict")
},
$ = function() {
T("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"), T("/Font <<");
for (var a in E) E.hasOwnProperty(a) && T("/" + a + " " + E[a].objectNumber + " 0 R");
T(">>"), T("/XObject <<"), Z(), T(">>")
},
_ = function() {
Y(), P.publish("putResources"), D[2] = M, T("2 0 obj"), T("<<"), $(), T(">>"), T("endobj"), P.publish("postPutResources")
},
aa = function(a, b, c) {
F.hasOwnProperty(b) || (F[b] = {}), F[b][c] = a
},
ba = function(a, b, c, d) {
var e = "F" + (Object.keys(E).length + 1).toString(10),
f = E[e] = {
id: e,
PostScriptName: a,
fontName: b,
fontStyle: c,
encoding: d,
metadata: {}
};
return aa(e, b, c), P.publish("addFont", f), e
},
ca = function() {
for (var a = "helvetica", b = "times", c = "courier", d = "normal", e = "bold", f = "italic", g = "bolditalic", h = "StandardEncoding", i = [
["Helvetica", a, d],
["Helvetica-Bold", a, e],
["Helvetica-Oblique", a, f],
["Helvetica-BoldOblique", a, g],
["Courier", c, d],
["Courier-Bold", c, e],
["Courier-Oblique", c, f],
["Courier-BoldOblique", c, g],
["Times-Roman", b, d],
["Times-Bold", b, e],
["Times-Italic", b, f],
["Times-BoldItalic", b, g]
], j = 0, k = i.length; k > j; j++) {
var l = ba(i[j][0], i[j][1], i[j][2], h),
m = i[j][0].split("-");
aa(l, m[0], m[1] || "")
}
P.publish("addFonts", {
fonts: E,
dictionary: F
})
},
da = function(b) {
return b.foo = function() {
try {
return b.apply(this, arguments)
} catch (c) {
var d = c.stack || "";
~d.indexOf(" at ") && (d = d.split(" at ")[1]);
var e = "Error in function " + d.split("\n")[0].split("<")[0] + ": " + c.message;
if (!a.console) throw new Error(e);
a.console.error(e, c), a.alert && alert(e)
}
}, b.foo.bar = b, b.foo
},
ea = function(a, b) {
var c, d, e, f, g, h, i, j, k;
if (b = b || {}, e = b.sourceEncoding || "Unicode", g = b.outputEncoding, (b.autoencode || g) && E[m].metadata && E[m].metadata[e] && E[m].metadata[e].encoding && (f = E[m].metadata[e].encoding, !g && E[m].encoding && (g = E[m].encoding), !g && f.codePages && (g = f.codePages[0]), "string" == typeof g && (g = f[g]), g)) {
for (i = !1, h = [], c = 0, d = a.length; d > c; c++) j = g[a.charCodeAt(c)], h.push(j ? String.fromCharCode(j) : a[c]), h[c].charCodeAt(0) >> 8 && (i = !0);
a = h.join("")
}
for (c = a.length; void 0 === i && 0 !== c;) a.charCodeAt(c - 1) >> 8 && (i = !0), c--;
if (!i) return a;
for (h = b.noBOM ? [] : [254, 255], c = 0, d = a.length; d > c; c++) {
if (j = a.charCodeAt(c), k = j >> 8, k >> 8) throw new Error("Character at position " + c + " of string '" + a + "' exceeds 16bits. Cannot be encoded into UCS-2 BE");
h.push(k), h.push(j - (k << 8))
}
return String.fromCharCode.apply(void 0, h)
},
fa = function(a, b) {
return ea(a, b).replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)")
},
ga = function() {
T("/Producer (jsPDF " + c.version + ")");
for (var a in N) N.hasOwnProperty(a) && N[a] && T("/" + a.substr(0, 1).toUpperCase() + a.substr(1) + " (" + fa(N[a]) + ")");
var b = new Date,
d = b.getTimezoneOffset(),
e = 0 > d ? "+" : "-",
f = Math.floor(Math.abs(d / 60)),
g = Math.abs(d % 60),
h = [e, S(f), "'", S(g), "'"].join("");
T(["/CreationDate (D:", b.getFullYear(), S(b.getMonth() + 1), S(b.getDate()), S(b.getHours()), S(b.getMinutes()), S(b.getSeconds()), h, ")"].join(""))
},
ha = function() {
switch (T("/Type /Catalog"), T("/Pages 1 0 R"), t || (t = "fullwidth"), t) {
case "fullwidth":
T("/OpenAction [3 0 R /FitH null]");
break;
case "fullheight":
T("/OpenAction [3 0 R /FitV null]");
break;
case "fullpage":
T("/OpenAction [3 0 R /Fit]");
break;
case "original":
T("/OpenAction [3 0 R /XYZ null null 1]");
break;
default:
var a = "" + t;
"%" === a.substr(a.length - 1) && (t = parseInt(t) / 100), "number" == typeof t && T("/OpenAction [3 0 R /XYZ null null " + Q(t) + "]")
}
switch (u || (u = "continuous"), u) {
case "continuous":
T("/PageLayout /OneColumn");
break;
case "single":
T("/PageLayout /SinglePage");
break;
case "two":
case "twoleft":
T("/PageLayout /TwoColumnLeft");
break;
case "tworight":
T("/PageLayout /TwoColumnRight")
}
s && T("/PageMode /" + s), P.publish("putCatalog")
},
ia = function() {
T("/Size " + (B + 1)), T("/Root " + B + " 0 R"), T("/Info " + (B - 1) + " 0 R")
},
ja = function(a, b) {
var c = "string" == typeof b && b.toLowerCase();
if ("string" == typeof a) {
var d = a.toLowerCase();
g.hasOwnProperty(d) && (a = g[d][0] / n, b = g[d][1] / n)
}
if (Array.isArray(a) && (b = a[1], a = a[0]), c) {
switch (c.substr(0, 1)) {
case "l":
b > a && (c = "s");
break;
case "p":
a > b && (c = "s")
}
"s" === c && (o = a, a = b, b = o)
}
C = !0, H[++G] = [], I[G] = {
width: Number(a) || q,
height: Number(b) || r
}, la(G)
},
ka = function() {
ja.apply(this, arguments), T(Q(A * n) + " w"), T(x), 0 !== K && T(K + " J"), 0 !== L && T(L + " j"), P.publish("addPage", {
pageNumber: G
})
},
la = function(a) {
a > 0 && G >= a && (p = a, q = I[a].width, r = I[a].height)
},
ma = function(a, b) {
var c;
a = void 0 !== a ? a : E[m].fontName, b = void 0 !== b ? b : E[m].fontStyle;
try {
c = F[a][b]
} catch (d) {}
if (!c) throw new Error("Unable to look up font label for font '" + a + "', '" + b + "'. Refer to getFontList() for available fonts.");
return c
},
na = function() {
C = !1, B = 2, J = [], D = [], T("%PDF-" + f), W(), _(), U(), T("<<"), ga(), T(">>"), T("endobj"), U(), T("<<"), ha(), T(">>"), T("endobj");
var a, b = M,
c = "0000000000";
for (T("xref"), T("0 " + (B + 1)), T(c + " 65535 f "), a = 1; B >= a; a++) T((c + D[a]).slice(-10) + " 00000 n ");
return T("trailer"), T("<<"), ia(), T(">>"), T("startxref"), T(b), T("%%EOF"), C = !0, J.join("\n")
},
oa = function(a) {
var b = "S";
return "F" === a ? b = "f" : "FD" === a || "DF" === a ? b = "B" : ("f" === a || "f*" === a || "B" === a || "B*" === a) && (b = a), b
},
pa = function() {
for (var a = na(), b = a.length, c = new ArrayBuffer(b), d = new Uint8Array(c); b--;) d[b] = a.charCodeAt(b);
return c
},
qa = function() {
return new Blob([pa()], {
type: "application/pdf"
})
},
ra = da(function(b, c) {
var e = "dataur" === ("" + b).substr(0, 6) ? "data:application/pdf;base64," + btoa(na()) : 0;
switch (b) {
case void 0:
return na();
case "save":
if (navigator.getUserMedia && (void 0 === a.URL || void 0 === a.URL.createObjectURL)) return O.output("dataurlnewwindow");
d(qa(), c), "function" == typeof d.unload && a.setTimeout && setTimeout(d.unload, 911);
break;
case "arraybuffer":
return pa();
case "blob":
return qa();
case "bloburi":
case "bloburl":
return a.URL && a.URL.createObjectURL(qa()) || void 0;
case "datauristring":
case "dataurlstring":
return e;
case "dataurlnewwindow":
var f = a.open(e);
if (f || "undefined" == typeof safari) return f;
case "datauri":
case "dataurl":
return a.document.location.href = e;
default:
throw new Error('Output type "' + b + '" is not supported.')
}
});
switch (i) {
case "pt":
n = 1;
break;
case "mm":
n = 72 / 25.4;
break;
case "cm":
n = 72 / 2.54;
break;
case "in":
n = 72;
break;
case "px":
n = 96 / 72;
break;
case "pc":
n = 12;
break;
case "em":
n = 12;
break;
case "ex":
n = 6;
break;
default:
throw "Invalid unit: " + i
}
O.internal = {
pdfEscape: fa,
getStyle: oa,
getFont: function() {
return E[ma.apply(O, arguments)]
},
getFontSize: function() {
return y
},
getLineHeight: function() {
return y * z
},
write: function(a) {
T(1 === arguments.length ? a : Array.prototype.join.call(arguments, " "))
},
getCoordinateString: function(a) {
return Q(a * n)
},
getVerticalCoordinateString: function(a) {
return Q((r - a) * n)
},
collections: {},
newObject: U,
putStream: V,
events: P,
scaleFactor: n,
pageSize: {
get width() {
return q
},
get height() {
return r
}
},
output: function(a, b) {
return ra(a, b)
},
getNumberOfPages: function() {
return H.length - 1
},
pages: H
}, O.addPage = function() {
return ka.apply(this, arguments), this
}, O.setPage = function() {
return la.apply(this, arguments), this
}, O.setDisplayMode = function(a, b, c) {
return t = a, u = b, s = c, this
}, O.text = function(a, b, c, d, e) {
function f(a) {
return a = a.split(" ").join(Array(l.TabLen || 9).join(" ")), fa(a, d)
}
"number" == typeof a && (o = c, c = b, b = a, a = o), "string" == typeof a && a.match(/[\n\r]/) && (a = a.split(/\r\n|\r|\n/g)), "number" == typeof d && (e = d, d = null);
var g, h = "",
i = "Td";
if (e) {
e *= Math.PI / 180;
var j = Math.cos(e),
k = Math.sin(e);
h = [Q(j), Q(k), Q(-1 * k), Q(j), ""].join(" "), i = "Tm"
}
if (d = d || {}, "noBOM" in d || (d.noBOM = !0), "autoencode" in d || (d.autoencode = !0), "string" == typeof a) a = f(a);
else {
if (!(a instanceof Array)) throw new Error('Type of text must be string or Array. "' + a + '" is not recognized.');
for (var p = a.concat(), q = [], s = p.length; s--;) q.push(f(p.shift()));
var t = Math.ceil((r - c) * n / (y * z));
t >= 0 && t < q.length + 1 && (g = q.splice(t - 1)), a = q.join(") Tj\nT* (")
}
return T("BT\n/" + m + " " + y + " Tf\n" + y * z + " TL\n" + w + "\n" + h + Q(b * n) + " " + Q((r - c) * n) + " " + i + "\n(" + a + ") Tj\nET"), g && (this.addPage(), this.text(g, b, 1.7 * y / n)), this
}, O.lstext = function(a, b, c, d) {
for (var e = 0, f = a.length; f > e; e++, b += d) this.text(a[e], b, c)
}, O.line = function(a, b, c, d) {
return this.lines([
[c - a, d - b]
], a, b)
}, O.clip = function() {
T("W"), T("S")
}, O.lines = function(a, b, c, d, e, f) {
var g, h, i, j, k, l, m, p, q, s, t;
for ("number" == typeof a && (o = c, c = b, b = a, a = o), d = d || [1, 1], T(R(b * n) + " " + R((r - c) * n) + " m "), g = d[0], h = d[1], j = a.length, s = b, t = c, i = 0; j > i; i++) k = a[i], 2 === k.length ? (s = k[0] * g + s, t = k[1] * h + t, T(R(s * n) + " " + R((r - t) * n) + " l")) : (l = k[0] * g + s, m = k[1] * h + t, p = k[2] * g + s, q = k[3] * h + t, s = k[4] * g + s, t = k[5] * h + t, T(R(l * n) + " " + R((r - m) * n) + " " + R(p * n) + " " + R((r - q) * n) + " " + R(s * n) + " " + R((r - t) * n) + " c"));
return f && T(" h"), null !== e && T(oa(e)), this
}, O.rect = function(a, b, c, d, e) {
return oa(e), T([Q(a * n), Q((r - b) * n), Q(c * n), Q(-d * n), "re"].join(" ")), null !== e && T(oa(e)), this
}, O.triangle = function(a, b, c, d, e, f, g) {
return this.lines([
[c - a, d - b],
[e - c, f - d],
[a - e, b - f]
], a, b, [1, 1], g, !0), this
}, O.roundedRect = function(a, b, c, d, e, f, g) {
var h = 4 / 3 * (Math.SQRT2 - 1);
return this.lines([
[c - 2 * e, 0],
[e * h, 0, e, f - f * h, e, f],
[0, d - 2 * f],
[0, f * h, -(e * h), f, -e, f],
[-c + 2 * e, 0],
[-(e * h), 0, -e, -(f * h), -e, -f],
[0, -d + 2 * f],
[0, -(f * h), e * h, -f, e, -f]
], a + e, b, [1, 1], g), this
}, O.ellipse = function(a, b, c, d, e) {
var f = 4 / 3 * (Math.SQRT2 - 1) * c,
g = 4 / 3 * (Math.SQRT2 - 1) * d;
return T([Q((a + c) * n), Q((r - b) * n), "m", Q((a + c) * n), Q((r - (b - g)) * n), Q((a + f) * n), Q((r - (b - d)) * n), Q(a * n), Q((r - (b - d)) * n), "c"].join(" ")), T([Q((a - f) * n), Q((r - (b - d)) * n), Q((a - c) * n), Q((r - (b - g)) * n), Q((a - c) * n), Q((r - b) * n), "c"].join(" ")), T([Q((a - c) * n), Q((r - (b + g)) * n), Q((a - f) * n), Q((r - (b + d)) * n), Q(a * n), Q((r - (b + d)) * n), "c"].join(" ")), T([Q((a + f) * n), Q((r - (b + d)) * n), Q((a + c) * n), Q((r - (b + g)) * n), Q((a + c) * n), Q((r - b) * n), "c"].join(" ")), null !== e && T(oa(e)), this
}, O.circle = function(a, b, c, d) {
return this.ellipse(a, b, c, c, d)
}, O.setProperties = function(a) {
for (var b in N) N.hasOwnProperty(b) && a[b] && (N[b] = a[b]);
return this
}, O.setFontSize = function(a) {
return y = a, this
}, O.setFont = function(a, b) {
return m = ma(a, b), this
}, O.setFontStyle = O.setFontType = function(a) {
return m = ma(void 0, a), this
}, O.getFontList = function() {
var a, b, c, d = {};
for (a in F)
if (F.hasOwnProperty(a)) {
d[a] = c = [];
for (b in F[a]) F[a].hasOwnProperty(b) && c.push(b)
}
return d
}, O.setLineWidth = function(a) {
return T((a * n).toFixed(2) + " w"), this
}, O.setDrawColor = function(a, b, c, d) {
var e;
return e = void 0 === b || void 0 === d && a === b === c ? "string" == typeof a ? a + " G" : Q(a / 255) + " G" : void 0 === d ? "string" == typeof a ? [a, b, c, "RG"].join(" ") : [Q(a / 255), Q(b / 255), Q(c / 255), "RG"].join(" ") : "string" == typeof a ? [a, b, c, d, "K"].join(" ") : [Q(a), Q(b), Q(c), Q(d), "K"].join(" "), T(e), this
}, O.setFillColor = function(a, b, c, d) {
var e;
return e = void 0 === b || void 0 === d && a === b === c ? "string" == typeof a ? a + " g" : Q(a / 255) + " g" : void 0 === d ? "string" == typeof a ? [a, b, c, "rg"].join(" ") : [Q(a / 255), Q(b / 255), Q(c / 255), "rg"].join(" ") : "string" == typeof a ? [a, b, c, d, "k"].join(" ") : [Q(a), Q(b), Q(c), Q(d), "k"].join(" "), T(e), this
}, O.setTextColor = function(a, b, c) {
if ("string" == typeof a && /^#[0-9A-Fa-f]{6}$/.test(a)) {
var d = parseInt(a.substr(1), 16);
a = d >> 16 & 255, b = d >> 8 & 255, c = 255 & d
}
return w = 0 === a && 0 === b && 0 === c || "undefined" == typeof b ? R(a / 255) + " g" : [R(a / 255), R(b / 255), R(c / 255), "rg"].join(" "), this
}, O.CapJoinStyles = {
0: 0,
butt: 0,
but: 0,
miter: 0,
1: 1,
round: 1,
rounded: 1,
circle: 1,
2: 2,
projecting: 2,
project: 2,
square: 2,
bevel: 2
}, O.setLineCap = function(a) {
var b = this.CapJoinStyles[a];
if (void 0 === b) throw new Error("Line cap style of '" + a + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
return K = b, T(b + " J"), this
}, O.setLineJoin = function(a) {
var b = this.CapJoinStyles[a];
if (void 0 === b) throw new Error("Line join style of '" + a + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
return L = b, T(b + " j"), this
}, O.output = ra, O.save = function(a) {
O.output("save", a)
};
for (var sa in c.API) c.API.hasOwnProperty(sa) && ("events" === sa && c.API.events.length ? ! function(a, b) {
var c, d, e;
for (e = b.length - 1; - 1 !== e; e--) c = b[e][0], d = b[e][1], a.subscribe.apply(a, [c].concat("function" == typeof d ? [d] : d))
}(P, c.API.events) : O[sa] = c.API[sa]);
return ca(), m = "F1", ka(j, h), P.publish("initialized"), O
}
var f = "1.3",
g = {
a0: [2383.94, 3370.39],
a1: [1683.78, 2383.94],
a2: [1190.55, 1683.78],
a3: [841.89, 1190.55],
a4: [595.28, 841.89],
a5: [419.53, 595.28],
a6: [297.64, 419.53],
a7: [209.76, 297.64],
a8: [147.4, 209.76],
a9: [104.88, 147.4],
a10: [73.7, 104.88],
b0: [2834.65, 4008.19],
b1: [2004.09, 2834.65],
b2: [1417.32, 2004.09],
b3: [1000.63, 1417.32],
b4: [708.66, 1000.63],
b5: [498.9, 708.66],
b6: [354.33, 498.9],
b7: [249.45, 354.33],
b8: [175.75, 249.45],
b9: [124.72, 175.75],
b10: [87.87, 124.72],
c0: [2599.37, 3676.54],
c1: [1836.85, 2599.37],
c2: [1298.27, 1836.85],
c3: [918.43, 1298.27],
c4: [649.13, 918.43],
c5: [459.21, 649.13],
c6: [323.15, 459.21],
c7: [229.61, 323.15],
c8: [161.57, 229.61],
c9: [113.39, 161.57],
c10: [79.37, 113.39],
dl: [311.81, 623.62],
letter: [612, 792],
"government-letter": [576, 756],
legal: [612, 1008],
"junior-legal": [576, 360],
ledger: [1224, 792],
tabloid: [792, 1224],
"credit-card": [153, 243]
};
return c.API = {
events: []
}, c.version = "1.0.272-git 2014-09-29T15:09:diegocr", "function" == typeof define && define.amd ? define("jsPDF", function() {
return c
}) : a.jsPDF = c, c
}("undefined" != typeof self && self || "undefined" != typeof window && window || this);
! function(a) {
"use strict";
a.addHTML = function(a, b, c, d, e) {
if ("undefined" == typeof html2canvas && "undefined" == typeof rasterizeHTML) throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js");
"number" != typeof b && (d = b, e = c), "function" == typeof d && (e = d, d = null);
var f = this.internal,
g = f.scaleFactor,
h = f.pageSize.width,
i = f.pageSize.height;
if (d = d || {}, d.onrendered = function(a) {
b = parseInt(b) || 0, c = parseInt(c) || 0;
var f = d.dim || {},
j = f.h || 0,
k = f.w || Math.min(h, a.width / g) - b,
l = "JPEG";
if (d.format && (l = d.format), a.height > i && d.pagesplit) {
var m = function() {
for (var d = 0;;) {
var f = document.createElement("canvas");
f.width = Math.min(h * g, a.width), f.height = Math.min(i * g, a.height - d);
var j = f.getContext("2d");
j.drawImage(a, 0, d, a.width, f.height, 0, 0, f.width, f.height);
var m = [f, b, d ? 0 : c, f.width / g, f.height / g, l, null, "SLOW"];
if (this.addImage.apply(this, m), d += f.height, d >= a.height) break;
this.addPage()
}
e(k, d, null, m)
}.bind(this);
if ("CANVAS" === a.nodeName) {
var n = new Image;
n.onload = m, n.src = a.toDataURL("image/png"), a = n
} else m()
} else {
var o = Math.random().toString(35),
p = [a, b, c, k, j, l, o, "SLOW"];
this.addImage.apply(this, p), e(k, j, o, p)
}
}.bind(this), "undefined" != typeof html2canvas && !d.rstz) return html2canvas(a, d);
if ("undefined" != typeof rasterizeHTML) {
var j = "drawDocument";
return "string" == typeof a && (j = /^http/.test(a) ? "drawURL" : "drawHTML"), d.width = d.width || h * g, rasterizeHTML[j](a, void 0, d).then(function(a) {
d.onrendered(a.image)
}, function(a) {
e(null, a)
})
}
return null
}
}(c.API),
function(a) {
"use strict";
var b = "addImage_",
c = ["jpeg", "jpg", "png"],
d = function(a) {
var b = this.internal.newObject(),
c = this.internal.write,
e = this.internal.putStream;
if (a.n = b, c("<</Type /XObject"), c("/Subtype /Image"), c("/Width " + a.w), c("/Height " + a.h), a.cs === this.color_spaces.INDEXED ? c("/ColorSpace [/Indexed /DeviceRGB " + (a.pal.length / 3 - 1) + " " + ("smask" in a ? b + 2 : b + 1) + " 0 R]") : (c("/ColorSpace /" + a.cs), a.cs === this.color_spaces.DEVICE_CMYK && c("/Decode [1 0 1 0 1 0 1 0]")), c("/BitsPerComponent " + a.bpc), "f" in a && c("/Filter /" + a.f), "dp" in a && c("/DecodeParms <<" + a.dp + ">>"), "trns" in a && a.trns.constructor == Array) {
for (var f = "", g = 0, h = a.trns.length; h > g; g++) f += a.trns[g] + " " + a.trns[g] + " ";
c("/Mask [" + f + "]")
}
if ("smask" in a && c("/SMask " + (b + 1) + " 0 R"), c("/Length " + a.data.length + ">>"), e(a.data), c("endobj"), "smask" in a) {
var i = "/Predictor 15 /Colors 1 /BitsPerComponent " + a.bpc + " /Columns " + a.w,
j = {
w: a.w,
h: a.h,
cs: "DeviceGray",
bpc: a.bpc,
dp: i,
data: a.smask
};
"f" in a && (j.f = a.f), d.call(this, j)
}
a.cs === this.color_spaces.INDEXED && (this.internal.newObject(), c("<< /Length " + a.pal.length + ">>"), e(this.arrayBufferToBinaryString(new Uint8Array(a.pal))), c("endobj"))
},
e = function() {
var a = this.internal.collections[b + "images"];
for (var c in a) d.call(this, a[c])
},
f = function() {
var a, c = this.internal.collections[b + "images"],
d = this.internal.write;
for (var e in c) a = c[e], d("/I" + a.i, a.n, "0", "R")
},
g = function(b) {
return b && "string" == typeof b && (b = b.toUpperCase()), b in a.image_compression ? b : a.image_compression.NONE
},
h = function() {
var a = this.internal.collections[b + "images"];
return a || (this.internal.collections[b + "images"] = a = {}, this.internal.events.subscribe("putResources", e), this.internal.events.subscribe("putXobjectDict", f)), a
},
i = function(a) {
var b = 0;
return a && (b = Object.keys ? Object.keys(a).length : function(a) {
var b = 0;
for (var c in a) a.hasOwnProperty(c) && b++;
return b
}(a)), b
},
j = function(a) {
return "undefined" == typeof a || null === a
},
k = function(b) {
return "string" == typeof b && a.sHashCode(b)
},
l = function(a) {
return -1 === c.indexOf(a)
},
m = function(b) {
return "function" != typeof a["process" + b.toUpperCase()]
},
n = function(a) {
return "object" == typeof a && 1 === a.nodeType
},
o = function(a, b, c) {
if ("IMG" === a.nodeName && a.hasAttribute("src")) {
var d = "" + a.getAttribute("src");
if (!c && 0 === d.indexOf("data:image/")) return d;
!b && /\.png(?:[?#].*)?$/i.test(d) && (b = "png")
}
if ("CANVAS" === a.nodeName) var e = a;
else {
var e = document.createElement("canvas");
e.width = a.clientWidth || a.width, e.height = a.clientHeight || a.height;
var f = e.getContext("2d");
if (!f) throw "addImage requires canvas to be supported by browser.";
if (c) {
var g, h, i, j, k, l, m, n, o = Math.PI / 180;
"object" == typeof c && (g = c.x, h = c.y, i = c.bg, c = c.angle), n = c * o, j = Math.abs(Math.cos(n)), k = Math.abs(Math.sin(n)), l = e.width, m = e.height, e.width = m * k + l * j, e.height = m * j + l * k, isNaN(g) && (g = e.width / 2), isNaN(h) && (h = e.height / 2), f.clearRect(0, 0, e.width, e.height), f.fillStyle = i || "white", f.fillRect(0, 0, e.width, e.height), f.save(), f.translate(g, h), f.rotate(n), f.drawImage(a, -(l / 2), -(m / 2)), f.rotate(-n), f.translate(-g, -h), f.restore()
} else f.drawImage(a, 0, 0, e.width, e.height)
}
return e.toDataURL("png" == ("" + b).toLowerCase() ? "image/png" : "image/jpeg")
},
p = function(a, b) {
var c;
if (b)
for (var d in b)
if (a === b[d].alias) {
c = b[d];
break
}
return c
},
q = function(a, b, c) {
return a || b || (a = -96, b = -96), 0 > a && (a = -1 * c.w * 72 / a / this.internal.scaleFactor), 0 > b && (b = -1 * c.h * 72 / b / this.internal.scaleFactor), 0 === a && (a = b * c.w / c.h), 0 === b && (b = a * c.h / c.w), [a, b]
},
r = function(a, b, c, d, e, f, g) {
var h = q.call(this, c, d, e),
i = this.internal.getCoordinateString,
j = this.internal.getVerticalCoordinateString;
c = h[0], d = h[1], g[f] = e, this.internal.write("q", i(c), "0 0", i(d), i(a), j(b + d), "cm /I" + e.i, "Do Q")
};
a.color_spaces = {
DEVICE_RGB: "DeviceRGB",
DEVICE_GRAY: "DeviceGray",
DEVICE_CMYK: "DeviceCMYK",
CAL_GREY: "CalGray",
CAL_RGB: "CalRGB",
LAB: "Lab",
ICC_BASED: "ICCBased",
INDEXED: "Indexed",
PATTERN: "Pattern",
SEPERATION: "Seperation",
DEVICE_N: "DeviceN"
}, a.decode = {
DCT_DECODE: "DCTDecode",
FLATE_DECODE: "FlateDecode",
LZW_DECODE: "LZWDecode",
JPX_DECODE: "JPXDecode",
JBIG2_DECODE: "JBIG2Decode",
ASCII85_DECODE: "ASCII85Decode",
ASCII_HEX_DECODE: "ASCIIHexDecode",
RUN_LENGTH_DECODE: "RunLengthDecode",
CCITT_FAX_DECODE: "CCITTFaxDecode"
}, a.image_compression = {
NONE: "NONE",
FAST: "FAST",
MEDIUM: "MEDIUM",
SLOW: "SLOW"
}, a.sHashCode = function(a) {
return Array.prototype.reduce && a.split("").reduce(function(a, b) {
return a = (a << 5) - a + b.charCodeAt(0), a & a
}, 0)
}, a.isString = function(a) {
return "string" == typeof a
}, a.extractInfoFromBase64DataURI = function(a) {
return /^data:([\w]+?\/([\w]+?));base64,(.+?)$/g.exec(a)
}, a.supportsArrayBuffer = function() {
return "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array
}, a.isArrayBuffer = function(a) {
return this.supportsArrayBuffer() ? a instanceof ArrayBuffer : !1
}, a.isArrayBufferView = function(a) {
return this.supportsArrayBuffer() ? "undefined" == typeof Uint32Array ? !1 : a instanceof Int8Array || a instanceof Uint8Array || "undefined" != typeof Uint8ClampedArray && a instanceof Uint8ClampedArray || a instanceof Int16Array || a instanceof Uint16Array || a instanceof Int32Array || a instanceof Uint32Array || a instanceof Float32Array || a instanceof Float64Array : !1;
}, a.binaryStringToUint8Array = function(a) {
for (var b = a.length, c = new Uint8Array(b), d = 0; b > d; d++) c[d] = a.charCodeAt(d);
return c
}, a.arrayBufferToBinaryString = function(a) {
this.isArrayBuffer(a) && (a = new Uint8Array(a));
for (var b = "", c = a.byteLength, d = 0; c > d; d++) b += String.fromCharCode(a[d]);
return b
}, a.arrayBufferToBase64 = function(a) {
for (var b, c, d, e, f, g = "", h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = new Uint8Array(a), j = i.byteLength, k = j % 3, l = j - k, m = 0; l > m; m += 3) f = i[m] << 16 | i[m + 1] << 8 | i[m + 2], b = (16515072 & f) >> 18, c = (258048 & f) >> 12, d = (4032 & f) >> 6, e = 63 & f, g += h[b] + h[c] + h[d] + h[e];
return 1 == k ? (f = i[l], b = (252 & f) >> 2, c = (3 & f) << 4, g += h[b] + h[c] + "==") : 2 == k && (f = i[l] << 8 | i[l + 1], b = (64512 & f) >> 10, c = (1008 & f) >> 4, d = (15 & f) << 2, g += h[b] + h[c] + h[d] + "="), g
}, a.createImageInfo = function(a, b, c, d, e, f, g, h, i, j, k, l) {
var m = {
alias: h,
w: b,
h: c,
cs: d,
bpc: e,
i: g,
data: a
};
return f && (m.f = f), i && (m.dp = i), j && (m.trns = j), k && (m.pal = k), l && (m.smask = l), m
}, a.addImage = function(a, b, d, e, f, q, s, t, u) {
if ("string" != typeof b) {
var v = q;
q = f, f = e, e = d, d = b, b = v
}
if ("object" == typeof a && !n(a) && "imageData" in a) {
var w = a;
a = w.imageData, b = w.format || b, d = w.x || d || 0, e = w.y || e || 0, f = w.w || f, q = w.h || q, s = w.alias || s, t = w.compression || t, u = w.rotation || w.angle || u
}
if (isNaN(d) || isNaN(e)) throw console.error("jsPDF.addImage: Invalid coordinates", arguments), new Error("Invalid coordinates passed to jsPDF.addImage");
var x, y = h.call(this);
if (!(x = p(a, y))) {
var z;
if (n(a) && (a = o(a, b, u)), j(s) && (s = k(a)), !(x = p(s, y))) {
if (this.isString(a)) {
var A = this.extractInfoFromBase64DataURI(a);
A ? (b = A[2], a = atob(A[3])) : 137 === a.charCodeAt(0) && 80 === a.charCodeAt(1) && 78 === a.charCodeAt(2) && 71 === a.charCodeAt(3) && (b = "png")
}
if (b = (b || "JPEG").toLowerCase(), l(b)) throw new Error("addImage currently only supports formats " + c + ", not '" + b + "'");
if (m(b)) throw new Error("please ensure that the plugin for '" + b + "' support is added");
if (this.supportsArrayBuffer() && (z = a, a = this.binaryStringToUint8Array(a)), x = this["process" + b.toUpperCase()](a, i(y), s, g(t), z), !x) throw new Error("An unkwown error occurred whilst processing the image")
}
}
return r.call(this, d, e, f, q, x, x.i, y), this
};
var s = function(a) {
var b, c, d;
if (255 === !a.charCodeAt(0) || 216 === !a.charCodeAt(1) || 255 === !a.charCodeAt(2) || 224 === !a.charCodeAt(3) || !a.charCodeAt(6) === "J".charCodeAt(0) || !a.charCodeAt(7) === "F".charCodeAt(0) || !a.charCodeAt(8) === "I".charCodeAt(0) || !a.charCodeAt(9) === "F".charCodeAt(0) || 0 === !a.charCodeAt(10)) throw new Error("getJpegSize requires a binary string jpeg file");
for (var e = 256 * a.charCodeAt(4) + a.charCodeAt(5), f = 4, g = a.length; g > f;) {
if (f += e, 255 !== a.charCodeAt(f)) throw new Error("getJpegSize could not find the size of the image");
if (192 === a.charCodeAt(f + 1) || 193 === a.charCodeAt(f + 1) || 194 === a.charCodeAt(f + 1) || 195 === a.charCodeAt(f + 1) || 196 === a.charCodeAt(f + 1) || 197 === a.charCodeAt(f + 1) || 198 === a.charCodeAt(f + 1) || 199 === a.charCodeAt(f + 1)) return c = 256 * a.charCodeAt(f + 5) + a.charCodeAt(f + 6), b = 256 * a.charCodeAt(f + 7) + a.charCodeAt(f + 8), d = a.charCodeAt(f + 9), [b, c, d];
f += 2, e = 256 * a.charCodeAt(f) + a.charCodeAt(f + 1)
}
},
t = function(a) {
var b = a[0] << 8 | a[1];
if (65496 !== b) throw new Error("Supplied data is not a JPEG");
for (var c, d, e, f, g = a.length, h = (a[4] << 8) + a[5], i = 4; g > i;) {
if (i += h, c = u(a, i), h = (c[2] << 8) + c[3], (192 === c[1] || 194 === c[1]) && 255 === c[0] && h > 7) return c = u(a, i + 5), d = (c[2] << 8) + c[3], e = (c[0] << 8) + c[1], f = c[4], {
width: d,
height: e,
numcomponents: f
};
i += 2
}
throw new Error("getJpegSizeFromBytes could not find the size of the image")
},
u = function(a, b) {
return a.subarray(b, b + 5)
};
a.processJPEG = function(a, b, c, d, e) {
var f, g = this.color_spaces.DEVICE_RGB,
h = this.decode.DCT_DECODE,
i = 8;
return this.isString(a) ? (f = s(a), this.createImageInfo(a, f[0], f[1], 1 == f[3] ? this.color_spaces.DEVICE_GRAY : g, i, h, b, c)) : (this.isArrayBuffer(a) && (a = new Uint8Array(a)), this.isArrayBufferView(a) ? (f = t(a), a = e || this.arrayBufferToBinaryString(a), this.createImageInfo(a, f.width, f.height, 1 == f.numcomponents ? this.color_spaces.DEVICE_GRAY : g, i, h, b, c)) : null)
}, a.processJPG = function() {
return this.processJPEG.apply(this, arguments)
}
}(c.API),
function(a) {
"use strict";
a.autoPrint = function() {
var a;
return this.internal.events.subscribe("postPutResources", function() {
a = this.internal.newObject(), this.internal.write("<< /S/Named /Type/Action /N/Print >>", "endobj")
}), this.internal.events.subscribe("putCatalog", function() {
this.internal.write("/OpenAction " + a + " 0 R")
}), this
}
}(c.API),
function(a) {
"use strict";
var b, c, d, e, f = 3,
g = 13,
h = {
x: void 0,
y: void 0,
w: void 0,
h: void 0,
ln: void 0
},
i = 1,
j = function(a, b, c, d, e) {
h = {
x: a,
y: b,
w: c,
h: d,
ln: e
}
},
k = function() {
return h
},
l = {
left: 0,
top: 0,
bottom: 0
};
a.setHeaderFunction = function(a) {
e = a
}, a.getTextDimensions = function(a) {
b = this.internal.getFont().fontName, c = this.table_font_size || this.internal.getFontSize(), d = this.internal.getFont().fontStyle;
var e, f, g = 19.049976 / 25.4;
return f = document.createElement("font"), f.id = "jsPDFCell", f.style.fontStyle = d, f.style.fontName = b, f.style.fontSize = c + "pt", f.textContent = a, document.body.appendChild(f), e = {
w: (f.offsetWidth + 1) * g,
h: (f.offsetHeight + 1) * g
}, document.body.removeChild(f), e
}, a.cellAddPage = function() {
var a = this.margins || l;
this.addPage(), j(a.left, a.top, void 0, void 0), i += 1
}, a.cellInitialize = function() {
h = {
x: void 0,
y: void 0,
w: void 0,
h: void 0,
ln: void 0
}, i = 1
}, a.cell = function(a, b, c, d, e, h, i) {
var m = k();
if (void 0 !== m.ln)
if (m.ln === h) a = m.x + m.w, b = m.y;
else {
var n = this.margins || l;
m.y + m.h + d + g >= this.internal.pageSize.height - n.bottom && (this.cellAddPage(), this.printHeaders && this.tableHeaderRow && this.printHeaderRow(h, !0)), b = k().y + k().h
}
if (void 0 !== e[0])
if (this.printingHeaderRow ? this.rect(a, b, c, d, "FD") : this.rect(a, b, c, d), "right" === i) {
if (e instanceof Array)
for (var o = 0; o < e.length; o++) {
var p = e[o],
q = this.getStringUnitWidth(p) * this.internal.getFontSize();
this.text(p, a + c - q - f, b + this.internal.getLineHeight() * (o + 1))
}
} else this.text(e, a + f, b + this.internal.getLineHeight());
return j(a, b, c, d, h), this
}, a.arrayMax = function(a, b) {
var c, d, e, f = a[0];
for (c = 0, d = a.length; d > c; c += 1) e = a[c], b ? -1 === b(f, e) && (f = e) : e > f && (f = e);
return f
}, a.table = function(b, c, d, e, f) {
if (!d) throw "No data for PDF table";
var g, j, k, m, n, o, p, q, r, s, t = [],
u = [],
v = {},
w = {},
x = [],
y = [],
z = !1,
A = !0,
B = 12,
C = l;
if (C.width = this.internal.pageSize.width, f && (f.autoSize === !0 && (z = !0), f.printHeaders === !1 && (A = !1), f.fontSize && (B = f.fontSize), f.margins && (C = f.margins)), this.lnMod = 0, h = {
x: void 0,
y: void 0,
w: void 0,
h: void 0,
ln: void 0
}, i = 1, this.printHeaders = A, this.margins = C, this.setFontSize(B), this.table_font_size = B, void 0 === e || null === e) t = Object.keys(d[0]);
else if (e[0] && "string" != typeof e[0]) {
var D = 19.049976 / 25.4;
for (j = 0, k = e.length; k > j; j += 1) g = e[j], t.push(g.name), u.push(g.prompt), w[g.name] = g.width * D
} else t = e;
if (z)
for (s = function(a) {
return a[g]
}, j = 0, k = t.length; k > j; j += 1) {
for (g = t[j], v[g] = d.map(s), x.push(this.getTextDimensions(u[j] || g).w), o = v[g], p = 0, m = o.length; m > p; p += 1) n = o[p], x.push(this.getTextDimensions(n).w);
w[g] = a.arrayMax(x)
}
if (A) {
var E = this.calculateLineHeight(t, w, u.length ? u : t);
for (j = 0, k = t.length; k > j; j += 1) g = t[j], y.push([b, c, w[g], E, String(u.length ? u[j] : g)]);
this.setTableHeaderRow(y), this.printHeaderRow(1, !1)
}
for (j = 0, k = d.length; k > j; j += 1) {
var E;
for (q = d[j], E = this.calculateLineHeight(t, w, q), p = 0, r = t.length; r > p; p += 1) g = t[p], this.cell(b, c, w[g], E, q[g], j + 2, g.align)
}
return this.lastCellPos = h, this.table_x = b, this.table_y = c, this
}, a.calculateLineHeight = function(a, b, c) {
for (var d, e = 0, g = 0; g < a.length; g++) {
d = a[g], c[d] = this.splitTextToSize(String(c[d]), b[d] - f);
var h = this.internal.getLineHeight() * c[d].length + f;
h > e && (e = h)
}
return e
}, a.setTableHeaderRow = function(a) {
this.tableHeaderRow = a
}, a.printHeaderRow = function(a, b) {
if (!this.tableHeaderRow) throw "Property tableHeaderRow does not exist.";
var c, d, f, g;
if (this.printingHeaderRow = !0, void 0 !== e) {
var h = e(this, i);
j(h[0], h[1], h[2], h[3], -1)
}
this.setFontStyle("bold");
var k = [];
for (f = 0, g = this.tableHeaderRow.length; g > f; f += 1) this.setFillColor(200, 200, 200), c = this.tableHeaderRow[f], b && (c[1] = this.margins && this.margins.top || 0, k.push(c)), d = [].concat(c), this.cell.apply(this, d.concat(a));
k.length > 0 && this.setTableHeaderRow(k), this.setFontStyle("normal"), this.printingHeaderRow = !1
}
}(c.API),
function(a) {
var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t;
b = function() {
function a() {}
return function(b) {
return a.prototype = b, new a
}
}(), j = function(a) {
var b, c, d, e, f, g, h;
for (c = 0, d = a.length, b = void 0, e = !1, g = !1; !e && c !== d;) b = a[c] = a[c].trimLeft(), b && (e = !0), c++;
for (c = d - 1; d && !g && -1 !== c;) b = a[c] = a[c].trimRight(), b && (g = !0), c--;
for (f = /\s+$/g, h = !0, c = 0; c !== d;) b = a[c].replace(/\s+/g, " "), h && (b = b.trimLeft()), b && (h = f.test(b)), a[c] = b, c++;
return a
}, k = function(a, b, c, d) {
return this.pdf = a, this.x = b, this.y = c, this.settings = d, this.watchFunctions = [], this.init(), this
}, l = function(a) {
var b, c, e;
for (b = void 0, e = a.split(","), c = e.shift(); !b && c;) b = d[c.trim().toLowerCase()], c = e.shift();
return b
}, m = function(a) {
a = "auto" === a ? "0px" : a, a.indexOf("em") > -1 && !isNaN(Number(a.replace("em", ""))) && (a = 18.719 * Number(a.replace("em", "")) + "px"), a.indexOf("pt") > -1 && !isNaN(Number(a.replace("pt", ""))) && (a = 1.333 * Number(a.replace("pt", "")) + "px");
var b, c, d;
return c = void 0, b = 16, (d = n[a]) ? d : (d = {
"xx-small": 9,
"x-small": 11,
small: 13,
medium: 16,
large: 19,
"x-large": 23,
"xx-large": 28,
auto: 0
}[{
css_line_height_string: a
}], d !== c ? n[a] = d / b : (d = parseFloat(a)) ? n[a] = d / b : (d = a.match(/([\d\.]+)(px)/), n[a] = 3 === d.length ? parseFloat(d[1]) / b : 1))
}, i = function(a) {
var b, c, d;
return d = function(a) {
var b;
return b = function(a) {
return document.defaultView && document.defaultView.getComputedStyle ? document.defaultView.getComputedStyle(a, null) : a.currentStyle ? a.currentStyle : a.style
}(a),
function(a) {
return a = a.replace(/-\D/g, function(a) {
return a.charAt(1).toUpperCase()
}), b[a]
}
}(a), b = {}, c = void 0, b["font-family"] = l(d("font-family")) || "times", b["font-style"] = e[d("font-style")] || "normal", b["text-align"] = TextAlignMap[d("text-align")] || "left", c = f[d("font-weight")] || "normal", "bold" === c && (b["font-style"] = "normal" === b["font-style"] ? c : c + b["font-style"]), b["font-size"] = m(d("font-size")) || 1, b["line-height"] = m(d("line-height")) || 1, b.display = "inline" === d("display") ? "inline" : "block", c = "block" === b.display, b["margin-top"] = c && m(d("margin-top")) || 0, b["margin-bottom"] = c && m(d("margin-bottom")) || 0, b["padding-top"] = c && m(d("padding-top")) || 0, b["padding-bottom"] = c && m(d("padding-bottom")) || 0, b["margin-left"] = c && m(d("margin-left")) || 0, b["margin-right"] = c && m(d("margin-right")) || 0, b["padding-left"] = c && m(d("padding-left")) || 0, b["padding-right"] = c && m(d("padding-right")) || 0, b["float"] = g[d("cssFloat")] || "none", b.clear = h[d("clear")] || "none", b
}, o = function(a, b, c) {
var d, e, f, g, h;
if (f = !1, e = void 0, g = void 0, h = void 0, d = c["#" + a.id])
if ("function" == typeof d) f = d(a, b);
else
for (e = 0, g = d.length; !f && e !== g;) f = d[e](a, b), e++;
if (d = c[a.nodeName], !f && d)
if ("function" == typeof d) f = d(a, b);
else
for (e = 0, g = d.length; !f && e !== g;) f = d[e](a, b), e++;
return f
}, t = function(a, b) {
var c, d, e, f, g, h, i, j, k, l;
for (c = [], d = [], e = 0, l = a.rows[0].cells.length, j = a.clientWidth; l > e;) k = a.rows[0].cells[e], d[e] = {
name: k.textContent.toLowerCase().replace(/\s+/g, ""),
prompt: k.textContent.replace(/\r?\n/g, ""),
width: k.clientWidth / j * b.pdf.internal.pageSize.width
}, e++;
for (e = 1; e < a.rows.length;) {
for (h = a.rows[e], g = {}, f = 0; f < h.cells.length;) g[d[f].name] = h.cells[f].textContent.replace(/\r?\n/g, ""), f++;
c.push(g), e++
}
return i = {
rows: c,
headers: d
}
};
var u = {
SCRIPT: 1,
STYLE: 1,
NOSCRIPT: 1,
OBJECT: 1,
EMBED: 1,
SELECT: 1
},
v = 1;
c = function(a, b, d) {
var e, f, g, h, j, k, l, m, n;
for (f = a.childNodes, e = void 0, g = i(a), j = "block" === g.display, j && (b.setBlockBoundary(), b.setBlockStyle(g)), l = 19.049976 / 25.4, h = 0, k = f.length; k > h;) {
if (e = f[h], "object" == typeof e) {
if (b.executeWatchFunctions(e), 1 === e.nodeType && "HEADER" === e.nodeName) {
var q = e,
r = b.pdf.margins_doc.top;
b.pdf.internal.events.subscribe("addPage", function() {
b.y = r, c(q, b, d), b.pdf.margins_doc.top = b.y + 10, b.y += 10
}, !1)
}
if (8 === e.nodeType && "#comment" === e.nodeName) ~e.textContent.indexOf("ADD_PAGE") && (b.pdf.addPage(), b.y = b.pdf.margins_doc.top);
else if (1 !== e.nodeType || u[e.nodeName])
if (3 === e.nodeType) {
var s = e.nodeValue;
if (e.nodeValue && "LI" === e.parentNode.nodeName)
if ("OL" === e.parentNode.parentNode.nodeName) s = v++ + ". " + s;
else {
var w = 16 * g["font-size"],
x = 2;
w > 20 && (x = 3), n = function(a, b) {
this.pdf.circle(a, b, x, "FD")
}
}
b.addText(s, g)
} else "string" == typeof e && b.addText(e, g);
else {
var y;
if ("IMG" === e.nodeName) {
var z = e.getAttribute("src");
y = p[b.pdf.sHashCode(z) || z]
}
if (y) {
b.pdf.internal.pageSize.height - b.pdf.margins_doc.bottom < b.y + e.height && b.y > b.pdf.margins_doc.top && (b.pdf.addPage(), b.y = b.pdf.margins_doc.top, b.executeWatchFunctions(e));
var A = i(e),
B = b.x,
C = 12 / b.pdf.internal.scaleFactor,
D = (A["margin-left"] + A["padding-left"]) * C,
E = (A["margin-right"] + A["padding-right"]) * C,
F = (A["margin-top"] + A["padding-top"]) * C,
G = (A["margin-bottom"] + A["padding-bottom"]) * C;
B += void 0 !== A["float"] && "right" === A["float"] ? b.settings.width - e.width - E : D, b.pdf.addImage(y, B, b.y + F, e.width, e.height), y = void 0, "right" === A["float"] || "left" === A["float"] ? (b.watchFunctions.push(function(a, c, d, e) {
return b.y >= c ? (b.x += a, b.settings.width += d, !0) : e && 1 === e.nodeType && !u[e.nodeName] && b.x + e.width > b.pdf.margins_doc.left + b.pdf.margins_doc.width ? (b.x += a, b.y = c, b.settings.width += d, !0) : !1
}.bind(this, "left" === A["float"] ? -e.width - D - E : 0, b.y + e.height + F + G, e.width)), b.watchFunctions.push(function(a, c, d) {
return b.y < a && c === b.pdf.internal.getNumberOfPages() ? 1 === d.nodeType && "both" === i(d).clear ? (b.y = a, !0) : !1 : !0
}.bind(this, b.y + e.height, b.pdf.internal.getNumberOfPages())), b.settings.width -= e.width + D + E, "left" === A["float"] && (b.x += e.width + D + E)) : b.y += e.height + G
} else if ("TABLE" === e.nodeName) m = t(e, b), b.y += 10, b.pdf.table(b.x, b.y, m.rows, m.headers, {
autoSize: !1,
printHeaders: !0,
margins: b.pdf.margins_doc
}), b.y = b.pdf.lastCellPos.y + b.pdf.lastCellPos.h + 20;
else if ("OL" === e.nodeName || "UL" === e.nodeName) v = 1, o(e, b, d) || c(e, b, d), b.y += 10;
else if ("LI" === e.nodeName) {
var H = b.x;
b.x += "UL" === e.parentNode.nodeName ? 22 : 10, b.y += 3, o(e, b, d) || c(e, b, d), b.x = H
} else "BR" === e.nodeName ? b.y += g["font-size"] * b.pdf.internal.scaleFactor : o(e, b, d) || c(e, b, d)
}
}
h++
}
return j ? b.setBlockBoundary(n) : void 0
}, p = {}, q = function(a, b, c, d) {
function e() {
b.pdf.internal.events.publish("imagesLoaded"), d(g)
}
function f(a, c, d) {
if (a) {
var f = new Image;
g = ++j, f.crossOrigin = "", f.onerror = f.onload = function() {
if (f.complete && (0 === f.src.indexOf("data:image/") && (f.width = c || f.width || 0, f.height = d || f.height || 0), f.width + f.height)) {
var g = b.pdf.sHashCode(a) || a;
p[g] = p[g] || f
}--j || e()
}, f.src = a
}
}
for (var g, h = a.getElementsByTagName("img"), i = h.length, j = 0; i--;) f(h[i].getAttribute("src"), h[i].width, h[i].height);
return j || e()
}, r = function(a, b, d) {
var e = a.getElementsByTagName("footer");
if (e.length > 0) {
e = e[0];
var f = b.pdf.internal.write,
g = b.y;
b.pdf.internal.write = function() {}, c(e, b, d);
var h = Math.ceil(b.y - g) + 5;
b.y = g, b.pdf.internal.write = f, b.pdf.margins_doc.bottom += h;
for (var i = function(a) {
var f = void 0 !== a ? a.pageNumber : 1,
g = b.y;
b.y = b.pdf.internal.pageSize.height - b.pdf.margins_doc.bottom, b.pdf.margins_doc.bottom -= h;
for (var i = e.getElementsByTagName("span"), j = 0; j < i.length; ++j)(" " + i[j].className + " ").replace(/[\n\t]/g, " ").indexOf(" pageCounter ") > -1 && (i[j].innerHTML = f), (" " + i[j].className + " ").replace(/[\n\t]/g, " ").indexOf(" totalPages ") > -1 && (i[j].innerHTML = "###jsPDFVarTotalPages###");
c(e, b, d), b.pdf.margins_doc.bottom += h, b.y = g
}, j = e.getElementsByTagName("span"), k = 0; k < j.length; ++k)(" " + j[k].className + " ").replace(/[\n\t]/g, " ").indexOf(" totalPages ") > -1 && b.pdf.internal.events.subscribe("htmlRenderingFinished", b.pdf.putTotalPages.bind(b.pdf, "###jsPDFVarTotalPages###"), !0);
b.pdf.internal.events.subscribe("addPage", i, !1), i(), u.FOOTER = 1
}
}, s = function(a, b, d, e, f, g) {
if (!b) return !1;
"string" == typeof b || b.parentNode || (b = "" + b.innerHTML), "string" == typeof b && (b = function(a) {
var b, c, d, e;
return d = "jsPDFhtmlText" + Date.now().toString() + (1e3 * Math.random()).toFixed(0), e = "position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;", c = document.createElement("div"), c.style.cssText = e, c.innerHTML = '<iframe style="height:1px;width:1px" name="' + d + '" />', document.body.appendChild(c), b = window.frames[d], b.document.body.innerHTML = a, b.document.body
}(b.replace(/<\/?script[^>]*?>/gi, "")));
var h, i = new k(a, d, e, f);
return q.call(this, b, i, f.elementHandlers, function(a) {
r(b, i, f.elementHandlers), c(b, i, f.elementHandlers), i.pdf.internal.events.publish("htmlRenderingFinished"), h = i.dispose(), "function" == typeof g ? g(h) : a && console.error("jsPDF Warning: rendering issues? provide a callback to fromHTML!")
}), h || {
x: i.x,
y: i.y
}
}, k.prototype.init = function() {
return this.paragraph = {
text: [],
style: []
}, this.pdf.internal.write("q")
}, k.prototype.dispose = function() {
return this.pdf.internal.write("Q"), {
x: this.x,
y: this.y,
ready: !0
}
}, k.prototype.executeWatchFunctions = function(a) {
var b = !1,
c = [];
if (this.watchFunctions.length > 0) {
for (var d = 0; d < this.watchFunctions.length; ++d) this.watchFunctions[d](a) === !0 ? b = !0 : c.push(this.watchFunctions[d]);
this.watchFunctions = c
}
return b
}, k.prototype.splitFragmentsIntoLines = function(a, c) {
var d, e, f, g, h, i, j, k, l, m, n, o, p, q, r;
for (e = 12, n = this.pdf.internal.scaleFactor, h = {}, f = void 0, m = void 0, g = void 0, i = void 0, r = void 0, l = void 0, k = void 0, j = void 0, o = [], p = [o], d = 0, q = this.settings.width; a.length;)
if (i = a.shift(), r = c.shift(), i)
if (f = r["font-family"], m = r["font-style"], g = h[f + m], g || (g = this.pdf.internal.getFont(f, m).metadata.Unicode, h[f + m] = g), l = {
widths: g.widths,
kerning: g.kerning,
fontSize: r["font-size"] * e,
textIndent: d
}, k = this.pdf.getStringUnitWidth(i, l) * l.fontSize / n, d + k > q) {
for (j = this.pdf.splitTextToSize(i, q, l), o.push([j.shift(), r]); j.length;) o = [
[j.shift(), r]
], p.push(o);
d = this.pdf.getStringUnitWidth(o[0][0], l) * l.fontSize / n
} else o.push([i, r]), d += k;
if (void 0 !== r["text-align"] && ("center" === r["text-align"] || "right" === r["text-align"] || "justify" === r["text-align"]))
for (var s = 0; s < p.length; ++s) {
var t = this.pdf.getStringUnitWidth(p[s][0][0], l) * l.fontSize / n;
s > 0 && (p[s][0][1] = b(p[s][0][1]));
var u = q - t;
if ("right" === r["text-align"]) p[s][0][1]["margin-left"] = u;
else if ("center" === r["text-align"]) p[s][0][1]["margin-left"] = u / 2;
else if ("justify" === r["text-align"]) {
var v = p[s][0][0].split(" ").length - 1;
p[s][0][1]["word-spacing"] = u / v, s === p.length - 1 && (p[s][0][1]["word-spacing"] = 0)
}
}
return p
}, k.prototype.RenderTextFragment = function(a, b) {
var c, d, e;
e = 0, c = 12, this.pdf.internal.pageSize.height - this.pdf.margins_doc.bottom < this.y + this.pdf.internal.getFontSize() && (this.pdf.internal.write("ET", "Q"), this.pdf.addPage(), this.y = this.pdf.margins_doc.top, this.pdf.internal.write("q", "BT 0 g", this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), "Td"), e = Math.max(e, b["line-height"], b["font-size"]), this.pdf.internal.write(0, (-1 * c * e).toFixed(2), "Td")), d = this.pdf.internal.getFont(b["font-family"], b["font-style"]), void 0 !== b["word-spacing"] && b["word-spacing"] > 0 && this.pdf.internal.write(b["word-spacing"].toFixed(2), "Tw"), this.pdf.internal.write("/" + d.id, (c * b["font-size"]).toFixed(2), "Tf", "(" + this.pdf.internal.pdfEscape(a) + ") Tj"), void 0 !== b["word-spacing"] && this.pdf.internal.write(0, "Tw")
}, k.prototype.renderParagraph = function(a) {
var b, c, d, e, f, g, h, i, k, l, m, n, o, p, q;
if (e = j(this.paragraph.text), p = this.paragraph.style, b = this.paragraph.blockstyle, o = this.paragraph.blockstyle || {}, this.paragraph = {
text: [],
style: [],
blockstyle: {},
priorblockstyle: b
}, e.join("").trim()) {
i = this.splitFragmentsIntoLines(e, p), h = void 0, k = void 0, c = 12, d = c / this.pdf.internal.scaleFactor, n = (Math.max((b["margin-top"] || 0) - (o["margin-bottom"] || 0), 0) + (b["padding-top"] || 0)) * d, m = ((b["margin-bottom"] || 0) + (b["padding-bottom"] || 0)) * d, l = this.pdf.internal.write, f = void 0, g = void 0, this.y += n, l("q", "BT 0 g", this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), "Td");
for (var r = 0; i.length;) {
for (h = i.shift(), k = 0, f = 0, g = h.length; f !== g;) h[f][0].trim() && (k = Math.max(k, h[f][1]["line-height"], h[f][1]["font-size"]), q = 7 * h[f][1]["font-size"]), f++;
var s = 0;
for (void 0 !== h[0][1]["margin-left"] && h[0][1]["margin-left"] > 0 && (wantedIndent = this.pdf.internal.getCoordinateString(h[0][1]["margin-left"]), s = wantedIndent - r, r = wantedIndent), l(s, (-1 * c * k).toFixed(2), "Td"), f = 0, g = h.length; f !== g;) h[f][0] && this.RenderTextFragment(h[f][0], h[f][1]), f++;
if (this.y += k * d, this.executeWatchFunctions(h[0][1]) && i.length > 0) {
var t = [],
u = [];
i.forEach(function(a) {
for (var b = 0, c = a.length; b !== c;) a[b][0] && (t.push(a[b][0] + " "), u.push(a[b][1])), ++b
}), i = this.splitFragmentsIntoLines(j(t), u), l("ET", "Q"), l("q", "BT 0 g", this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), "Td")
}
}
return a && "function" == typeof a && a.call(this, this.x - 9, this.y - q / 2), l("ET", "Q"), this.y += m
}
}, k.prototype.setBlockBoundary = function(a) {
return this.renderParagraph(a)
}, k.prototype.setBlockStyle = function(a) {
return this.paragraph.blockstyle = a
}, k.prototype.addText = function(a, b) {
return this.paragraph.text.push(a), this.paragraph.style.push(b)
}, d = {
helvetica: "helvetica",
"sans-serif": "helvetica",
"times new roman": "times",
serif: "times",
times: "times",
monospace: "courier",
courier: "courier"
}, f = {
100: "normal",
200: "normal",
300: "normal",
400: "normal",
500: "bold",
600: "bold",
700: "bold",
800: "bold",
900: "bold",
normal: "normal",
bold: "bold",
bolder: "bold",
lighter: "normal"
}, e = {
normal: "normal",
italic: "italic",
oblique: "italic"
}, TextAlignMap = {
left: "left",
right: "right",
center: "center",
justify: "justify"
}, g = {
none: "none",
right: "right",
left: "left"
}, h = {
none: "none",
both: "both"
}, n = {
normal: 1
}, a.fromHTML = function(a, b, c, d, e, f) {
"use strict";
return this.margins_doc = f || {
top: 0,
bottom: 0
}, d || (d = {}), d.elementHandlers || (d.elementHandlers = {}), s(this, a, isNaN(b) ? 4 : b, isNaN(c) ? 4 : c, d, e)
}
}(c.API),
function(a) {
"use strict";
var b, c, d;
a.addJS = function(a) {
return d = a, this.internal.events.subscribe("postPutResources", function() {
b = this.internal.newObject(), this.internal.write("<< /Names [(EmbeddedJS) " + (b + 1) + " 0 R] >>", "endobj"), c = this.internal.newObject(), this.internal.write("<< /S /JavaScript /JS (", d, ") >>", "endobj")
}), this.internal.events.subscribe("putCatalog", function() {
void 0 !== b && void 0 !== c && this.internal.write("/Names <</JavaScript " + b + " 0 R>>")
}), this
}
}(c.API),
function(a) {
"use strict";
var b = function() {
return "function" != typeof PNG || "function" != typeof g
},
c = function(b) {
return b !== a.image_compression.NONE && d()
},
d = function() {
var a = "function" == typeof e;
if (!a) throw new Error("requires deflate.js for compression");
return a
},
f = function(b, c, d, f) {
var g = 5,
k = m;
switch (f) {
case a.image_compression.FAST:
g = 3, k = l;
break;
case a.image_compression.MEDIUM:
g = 6, k = n;
break;
case a.image_compression.SLOW:
g = 9, k = o
}
b = j(b, c, d, k);
var p = new Uint8Array(h(g)),
q = i(b),
r = new e(g),
s = r.append(b),
t = r.flush(),
u = p.length + s.length + t.length,
v = new Uint8Array(u + 4);
return v.set(p), v.set(s, p.length), v.set(t, p.length + s.length), v[u++] = q >>> 24 & 255, v[u++] = q >>> 16 & 255, v[u++] = q >>> 8 & 255, v[u++] = 255 & q, a.arrayBufferToBinaryString(v)
},
h = function(a, b) {
var c = 8,
d = Math.LOG2E * Math.log(32768) - 8,
e = d << 4 | c,
f = e << 8,
g = Math.min(3, (b - 1 & 255) >> 1);
return f |= g << 6, f |= 0, f += 31 - f % 31, [e, 255 & f & 255]
},
i = function(a, b) {
for (var c, d = 1, e = 65535 & d, f = d >>> 16 & 65535, g = a.length, h = 0; g > 0;) {
c = g > b ? b : g, g -= c;
do e += a[h++], f += e; while (--c);
e %= 65521, f %= 65521
}
return (f << 16 | e) >>> 0
},
j = function(a, b, c, d) {
for (var e, f, g, h = a.length / b, i = new Uint8Array(a.length + h), j = q(), k = 0; h > k; k++) {
if (g = k * b, e = a.subarray(g, g + b), d) i.set(d(e, c, f), g + k);
else {
for (var l = 0, m = j.length, n = []; m > l; l++) n[l] = j[l](e, c, f);
var o = r(n.concat());
i.set(n[o], g + k)
}
f = e
}
return i
},
k = function(a) {
var b = Array.apply([], a);
return b.unshift(0), b
},
l = function(a, b) {
var c, d = [],
e = 0,
f = a.length;
for (d[0] = 1; f > e; e++) c = a[e - b] || 0, d[e + 1] = a[e] - c + 256 & 255;
return d
},
m = function(a, b, c) {
var d, e = [],
f = 0,
g = a.length;
for (e[0] = 2; g > f; f++) d = c && c[f] || 0, e[f + 1] = a[f] - d + 256 & 255;
return e
},
n = function(a, b, c) {
var d, e, f = [],
g = 0,
h = a.length;
for (f[0] = 3; h > g; g++) d = a[g - b] || 0, e = c && c[g] || 0, f[g + 1] = a[g] + 256 - (d + e >>> 1) & 255;
return f
},
o = function(a, b, c) {
var d, e, f, g, h = [],
i = 0,
j = a.length;
for (h[0] = 4; j > i; i++) d = a[i - b] || 0, e = c && c[i] || 0, f = c && c[i - b] || 0, g = p(d, e, f), h[i + 1] = a[i] - g + 256 & 255;
return h
},
p = function(a, b, c) {
var d = a + b - c,
e = Math.abs(d - a),
f = Math.abs(d - b),
g = Math.abs(d - c);
return f >= e && g >= e ? a : g >= f ? b : c
},
q = function() {
return [k, l, m, n, o]
},
r = function(a) {
for (var b, c, d, e = 0, f = a.length; f > e;) b = s(a[e].slice(1)), (c > b || !c) && (c = b, d = e), e++;
return d
},
s = function(a) {
for (var b = 0, c = a.length, d = 0; c > b;) d += Math.abs(a[b++]);
return d
};
a.processPNG = function(a, d, e, g) {
var h, i, j, k, l, m, n = this.color_spaces.DEVICE_RGB,
o = this.decode.FLATE_DECODE,
p = 8;
if (this.isArrayBuffer(a) && (a = new Uint8Array(a)), this.isArrayBufferView(a)) {
if (b()) throw new Error("PNG support requires png.js and zlib.js");
if (h = new PNG(a), a = h.imgData, p = h.bits, n = h.colorSpace, k = h.colors, -1 !== [4, 6].indexOf(h.colorType)) {
if (8 === h.bits)
for (var q, r, s = window["Uint" + h.pixelBitlength + "Array"], t = new s(h.decodePixels().buffer), u = t.length, v = new Uint8Array(u * h.colors), w = new Uint8Array(u), x = h.pixelBitlength - h.bits, y = 0, z = 0; u > y; y++) {
for (q = t[y], r = 0; x > r;) v[z++] = q >>> r & 255, r += h.bits;
w[y] = q >>> r & 255
}
if (16 === h.bits) {
for (var q, t = new Uint32Array(h.decodePixels().buffer), u = t.length, v = new Uint8Array(u * (32 / h.pixelBitlength) * h.colors), w = new Uint8Array(u * (32 / h.pixelBitlength)), A = h.colors > 1, y = 0, z = 0, B = 0; u > y;) q = t[y++], v[z++] = q >>> 0 & 255, A && (v[z++] = q >>> 16 & 255, q = t[y++], v[z++] = q >>> 0 & 255), w[B++] = q >>> 16 & 255;
p = 8
}
c(g) ? (a = f(v, h.width * h.colors, h.colors, g), m = f(w, h.width, 1, g)) : (a = v, m = w, o = null)
}
if (3 === h.colorType && (n = this.color_spaces.INDEXED, l = h.palette, h.transparency.indexed)) {
for (var C = h.transparency.indexed, D = 0, y = 0, u = C.length; u > y; ++y) D += C[y];
if (D /= 255, D === u - 1 && -1 !== C.indexOf(0)) j = [C.indexOf(0)];
else if (D !== u) {
for (var t = h.decodePixels(), w = new Uint8Array(t.length), y = 0, u = t.length; u > y; y++) w[y] = C[t[y]];
m = f(w, h.width, 1)
}
}
return i = o === this.decode.FLATE_DECODE ? "/Predictor 15 /Colors " + k + " /BitsPerComponent " + p + " /Columns " + h.width : "/Colors " + k + " /BitsPerComponent " + p + " /Columns " + h.width, (this.isArrayBuffer(a) || this.isArrayBufferView(a)) && (a = this.arrayBufferToBinaryString(a)), (m && this.isArrayBuffer(m) || this.isArrayBufferView(m)) && (m = this.arrayBufferToBinaryString(m)), this.createImageInfo(a, h.width, h.height, n, p, o, d, e, i, j, l, m)
}
throw new Error("Unsupported PNG image data, try using JPEG instead.")
}
}(c.API),
function(a) {
"use strict";
a.addSVG = function(a, b, c, d, e) {
function f(a, b) {
var c = b.createElement("style");
c.type = "text/css", c.styleSheet ? c.styleSheet.cssText = a : c.appendChild(b.createTextNode(a)), b.getElementsByTagName("head")[0].appendChild(c)
}
function g(a) {
var b = "childframe",
c = a.createElement("iframe");
return f(".jsPDF_sillysvg_iframe {display:none;position:absolute;}", a), c.name = b, c.setAttribute("width", 0), c.setAttribute("height", 0), c.setAttribute("frameborder", "0"), c.setAttribute("scrolling", "no"), c.setAttribute("seamless", "seamless"), c.setAttribute("class", "jsPDF_sillysvg_iframe"), a.body.appendChild(c), c
}
function h(a, b) {
var c = (b.contentWindow || b.contentDocument).document;
return c.write(a), c.close(), c.getElementsByTagName("svg")[0]
}
function i(a) {
for (var b = parseFloat(a[1]), c = parseFloat(a[2]), d = [], e = 3, f = a.length; f > e;) "c" === a[e] ? (d.push([parseFloat(a[e + 1]), parseFloat(a[e + 2]), parseFloat(a[e + 3]), parseFloat(a[e + 4]), parseFloat(a[e + 5]), parseFloat(a[e + 6])]), e += 7) : "l" === a[e] ? (d.push([parseFloat(a[e + 1]), parseFloat(a[e + 2])]), e += 3) : e += 1;
return [b, c, d]
}
var j;
if (b === j || c === j) throw new Error("addSVG needs values for 'x' and 'y'");
var k = g(document),
l = h(a, k),
m = [1, 1],
n = parseFloat(l.getAttribute("width")),
o = parseFloat(l.getAttribute("height"));
n && o && (d && e ? m = [d / n, e / o] : d ? m = [d / n, d / n] : e && (m = [e / o, e / o]));
var p, q, r, s, t = l.childNodes;
for (p = 0, q = t.length; q > p; p++) r = t[p], r.tagName && "PATH" === r.tagName.toUpperCase() && (s = i(r.getAttribute("d").split(" ")), s[0] = s[0] * m[0] + b, s[1] = s[1] * m[1] + c, this.lines.call(this, s[2], s[0], s[1], m));
return this
}
}(c.API),
function(a) {
"use strict";
var b = a.getCharWidthsArray = function(a, b) {
b || (b = {});
var c, d, e, f = b.widths ? b.widths : this.internal.getFont().metadata.Unicode.widths,
g = f.fof ? f.fof : 1,
h = b.kerning ? b.kerning : this.internal.getFont().metadata.Unicode.kerning,
i = h.fof ? h.fof : 1,
j = 0,
k = f[0] || g,
l = [];
for (c = 0, d = a.length; d > c; c++) e = a.charCodeAt(c), l.push((f[e] || k) / g + (h[e] && h[e][j] || 0) / i), j = e;
return l
},
c = function(a) {
for (var b = a.length, c = 0; b;) b--, c += a[b];
return c
},
d = a.getStringUnitWidth = function(a, d) {
return c(b.call(this, a, d))
},
e = function(a, b, c, d) {
for (var e = [], f = 0, g = a.length, h = 0; f !== g && h + b[f] < c;) h += b[f], f++;
e.push(a.slice(0, f));
var i = f;
for (h = 0; f !== g;) h + b[f] > d && (e.push(a.slice(i, f)), h = 0, i = f), h += b[f], f++;
return i !== f && e.push(a.slice(i, f)), e
},
f = function(a, f, g) {
g || (g = {});
var h, i, j, k, l, m, n = [],
o = [n],
p = g.textIndent || 0,
q = 0,
r = 0,
s = a.split(" "),
t = b(" ", g)[0];
if (m = -1 === g.lineIndent ? s[0].length + 2 : g.lineIndent || 0) {
var u = Array(m).join(" "),
v = [];
s.map(function(a) {
a = a.split(/\s*\n/), a.length > 1 ? v = v.concat(a.map(function(a, b) {
return (b && a.length ? "\n" : "") + a
})) : v.push(a[0])
}), s = v, m = d(u, g)
}
for (j = 0, k = s.length; k > j; j++) {
var w = 0;
if (h = s[j], m && "\n" == h[0] && (h = h.substr(1), w = 1), i = b(h, g), r = c(i), p + q + r > f || w) {
if (r > f) {
for (l = e(h, i, f - (p + q), f), n.push(l.shift()), n = [l.pop()]; l.length;) o.push([l.shift()]);
r = c(i.slice(h.length - n[0].length))
} else n = [h];
o.push(n), p = r + m, q = t
} else n.push(h), p += q + r, q = t
}
if (m) var x = function(a, b) {
return (b ? u : "") + a.join(" ")
};
else var x = function(a) {
return a.join(" ")
};
return o.map(x)
};
a.splitTextToSize = function(a, b, c) {
c || (c = {});
var d, e = c.fontSize || this.internal.getFontSize(),
g = function(a) {
var b = {
0: 1
},
c = {};
if (a.widths && a.kerning) return {
widths: a.widths,
kerning: a.kerning
};
var d = this.internal.getFont(a.fontName, a.fontStyle),
e = "Unicode";
return d.metadata[e] ? {
widths: d.metadata[e].widths || b,
kerning: d.metadata[e].kerning || c
} : {
widths: b,
kerning: c
}
}.call(this, c);
d = Array.isArray(a) ? a : a.split(/\r?\n/);
var h = 1 * this.internal.scaleFactor * b / e;
g.textIndent = c.textIndent ? 1 * c.textIndent * this.internal.scaleFactor / e : 0, g.lineIndent = c.lineIndent;
var i, j, k = [];
for (i = 0, j = d.length; j > i; i++) k = k.concat(f(d[i], h, g));
return k
}
}(c.API),
function(a) {
"use strict";
var b = function(a) {
for (var b = "0123456789abcdef", c = "klmnopqrstuvwxyz", d = {}, e = 0; e < c.length; e++) d[c[e]] = b[e];
var f, g, h, i, j, k = {},
l = 1,
m = k,
n = [],
o = "",
p = "",
q = a.length - 1;
for (e = 1; e != q;) j = a[e], e += 1, "'" == j ? g ? (i = g.join(""), g = f) : g = [] : g ? g.push(j) : "{" == j ? (n.push([m, i]), m = {}, i = f) : "}" == j ? (h = n.pop(), h[0][h[1]] = m, i = f, m = h[0]) : "-" == j ? l = -1 : i === f ? d.hasOwnProperty(j) ? (o += d[j], i = parseInt(o, 16) * l, l = 1, o = "") : o += j : d.hasOwnProperty(j) ? (p += d[j], m[i] = parseInt(p, 16) * l, l = 1, i = f, p = "") : p += j;
return k
},
c = {
codePages: ["WinAnsiEncoding"],
WinAnsiEncoding: b("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")
},
d = {
Unicode: {
Courier: c,
"Courier-Bold": c,
"Courier-BoldOblique": c,
"Courier-Oblique": c,
Helvetica: c,
"Helvetica-Bold": c,
"Helvetica-BoldOblique": c,
"Helvetica-Oblique": c,
"Times-Roman": c,
"Times-Bold": c,
"Times-BoldItalic": c,
"Times-Italic": c
}
},
e = {
Unicode: {
"Courier-Oblique": b("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
"Times-BoldItalic": b("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),
"Helvetica-Bold": b("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),
Courier: b("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
"Courier-BoldOblique": b("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
"Times-Bold": b("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),
Helvetica: b("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),
"Helvetica-BoldOblique": b("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),
"Courier-Bold": b("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
"Times-Italic": b("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),
"Times-Roman": b("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),
"Helvetica-Oblique": b("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")
}
};
a.events.push(["addFonts", function(a) {
var b, c, f, g, h, i = "Unicode";
for (c in a.fonts) a.fonts.hasOwnProperty(c) && (b = a.fonts[c], f = e[i][b.PostScriptName], f && (g = b.metadata[i] ? b.metadata[i] : b.metadata[i] = {}, g.widths = f.widths, g.kerning = f.kerning), h = d[i][b.PostScriptName], h && (g = b.metadata[i] ? b.metadata[i] : b.metadata[i] = {}, g.encoding = h, h.codePages && h.codePages.length && (b.encoding = h.codePages[0])))
}])
}(c.API),
function(a) {
"use strict";
a.putTotalPages = function(a) {
for (var b = new RegExp(a, "g"), c = 1; c <= this.internal.getNumberOfPages(); c++)
for (var d = 0; d < this.internal.pages[c].length; d++) this.internal.pages[c][d] = this.internal.pages[c][d].replace(b, this.internal.getNumberOfPages());
return this
}
}(c.API),
function(a) {
"use strict";
if (a.URL = a.URL || a.webkitURL, a.Blob && a.URL) try {
return void new Blob
} catch (b) {}
var c = a.BlobBuilder || a.WebKitBlobBuilder || a.MozBlobBuilder || function(a) {
var b = function(a) {
return Object.prototype.toString.call(a).match(/^\[object\s(.*)\]$/)[1]
},
c = function() {
this.data = []
},
d = function(a, b, c) {
this.data = a, this.size = a.length, this.type = b, this.encoding = c
},
e = c.prototype,
f = d.prototype,
g = a.FileReaderSync,
h = function(a) {
this.code = this[this.name = a]
},
i = "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),
j = i.length,
k = a.URL || a.webkitURL || a,
l = k.createObjectURL,
m = k.revokeObjectURL,
n = k,
o = a.btoa,
p = a.atob,
q = a.ArrayBuffer,
r = a.Uint8Array,
s = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;
for (d.fake = f.fake = !0; j--;) h.prototype[i[j]] = j + 1;
return k.createObjectURL || (n = a.URL = function(a) {
var b, c = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
return c.href = a, "origin" in c || ("data:" === c.protocol.toLowerCase() ? c.origin = null : (b = a.match(s), c.origin = b && b[1])), c
}), n.createObjectURL = function(a) {
var b, c = a.type;
return null === c && (c = "application/octet-stream"), a instanceof d ? (b = "data:" + c, "base64" === a.encoding ? b + ";base64," + a.data : "URI" === a.encoding ? b + "," + decodeURIComponent(a.data) : o ? b + ";base64," + o(a.data) : b + "," + encodeURIComponent(a.data)) : l ? l.call(k, a) : void 0
}, n.revokeObjectURL = function(a) {
"data:" !== a.substring(0, 5) && m && m.call(k, a)
}, e.append = function(a) {
var c = this.data;
if (r && (a instanceof q || a instanceof r)) {
for (var e = "", f = new r(a), i = 0, j = f.length; j > i; i++) e += String.fromCharCode(f[i]);
c.push(e)
} else if ("Blob" === b(a) || "File" === b(a)) {
if (!g) throw new h("NOT_READABLE_ERR");
var k = new g;
c.push(k.readAsBinaryString(a))
} else a instanceof d ? "base64" === a.encoding && p ? c.push(p(a.data)) : "URI" === a.encoding ? c.push(decodeURIComponent(a.data)) : "raw" === a.encoding && c.push(a.data) : ("string" != typeof a && (a += ""), c.push(unescape(encodeURIComponent(a))))
}, e.getBlob = function(a) {
return arguments.length || (a = null), new d(this.data.join(""), a, "raw")
}, e.toString = function() {
return "[object BlobBuilder]"
}, f.slice = function(a, b, c) {
var e = arguments.length;
return 3 > e && (c = null), new d(this.data.slice(a, e > 1 ? b : this.data.length), c, this.encoding)
}, f.toString = function() {
return "[object Blob]"
}, f.close = function() {
this.size = 0, delete this.data
}, c
}(a);
a.Blob = function(a, b) {
var d = b ? b.type || "" : "",
e = new c;
if (a)
for (var f = 0, g = a.length; g > f; f++) e.append(a[f]);
return e.getBlob(d)
}
}("undefined" != typeof self && self || "undefined" != typeof window && window || this.content || this);
var d = d || "undefined" != typeof navigator && navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator) || function(a) {
"use strict";
if ("undefined" == typeof navigator || !/MSIE [1-9]\./.test(navigator.userAgent)) {
var b = a.document,
c = function() {
return a.URL || a.webkitURL || a
},
d = b.createElementNS("http://www.w3.org/1999/xhtml", "a"),
e = "download" in d,
f = function(c) {
var d = b.createEvent("MouseEvents");
d.initMouseEvent("click", !0, !1, a, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), c.dispatchEvent(d)
},
g = a.webkitRequestFileSystem,
h = a.requestFileSystem || g || a.mozRequestFileSystem,
i = function(b) {
(a.setImmediate || a.setTimeout)(function() {
throw b
}, 0)
},
j = "application/octet-stream",
k = 0,
l = 10,
m = function(b) {
var d = function() {
"string" == typeof b ? c().revokeObjectURL(b) : b.remove()
};
a.chrome ? d() : setTimeout(d, l)
},
n = function(a, b, c) {
b = [].concat(b);
for (var d = b.length; d--;) {
var e = a["on" + b[d]];
if ("function" == typeof e) try {
e.call(a, c || a)
} catch (f) {
i(f)
}
}
},
o = function(b, i) {
var l, o, p, q = this,
r = b.type,
s = !1,
t = function() {
n(q, "writestart progress write writeend".split(" "))
},
u = function() {
if ((s || !l) && (l = c().createObjectURL(b)), o) o.location.href = l;
else {
var d = a.open(l, "_blank");
void 0 == d && "undefined" != typeof safari && (a.location.href = l)
}
q.readyState = q.DONE, t(), m(l)
},
v = function(a) {
return function() {
return q.readyState !== q.DONE ? a.apply(this, arguments) : void 0
}
},
w = {
create: !0,
exclusive: !1
};
return q.readyState = q.INIT, i || (i = "download"), e ? (l = c().createObjectURL(b), d.href = l, d.download = i, f(d), q.readyState = q.DONE, t(), void m(l)) : (a.chrome && r && r !== j && (p = b.slice || b.webkitSlice, b = p.call(b, 0, b.size, j), s = !0), g && "download" !== i && (i += ".download"), (r === j || g) && (o = a), h ? (k += b.size, void h(a.TEMPORARY, k, v(function(a) {
a.root.getDirectory("saved", w, v(function(a) {
var c = function() {
a.getFile(i, w, v(function(a) {
a.createWriter(v(function(c) {
c.onwriteend = function(b) {
o.location.href = a.toURL(), q.readyState = q.DONE, n(q, "writeend", b), m(a)
}, c.onerror = function() {
var a = c.error;
a.code !== a.ABORT_ERR && u()
}, "writestart progress write abort".split(" ").forEach(function(a) {
c["on" + a] = q["on" + a]
}), c.write(b), q.abort = function() {
c.abort(), q.readyState = q.DONE
}, q.readyState = q.WRITING
}), u)
}), u)
};
a.getFile(i, {
create: !1
}, v(function(a) {
a.remove(), c()
}), v(function(a) {
a.code === a.NOT_FOUND_ERR ? c() : u()
}))
}), u)
}), u)) : void u())
},
p = o.prototype,
q = function(a, b) {
return new o(a, b)
};
return p.abort = function() {
var a = this;
a.readyState = a.DONE, n(a, "abort")
}, p.readyState = p.INIT = 0, p.WRITING = 1, p.DONE = 2, p.error = p.onwritestart = p.onprogress = p.onwrite = p.onabort = p.onerror = p.onwriteend = null, q
}
}("undefined" != typeof self && self || "undefined" != typeof window && window || this.content);
"undefined" != typeof module && null !== module && (module.exports = d), void
function(a, b) {
"object" == typeof module ? module.exports = b() : a.adler32cs = b()
}(c, function() {
var a = "function" == typeof ArrayBuffer && "function" == typeof Uint8Array,
b = null,
c = function() {
if (!a) return function() {
return !1
};
try {
var c = require("buffer");
"function" == typeof c.Buffer && (b = c.Buffer)
} catch (d) {}
return function(a) {
return a instanceof ArrayBuffer || null !== b && a instanceof b
}
}(),
d = function() {
return null !== b ? function(a) {
return new b(a, "utf8").toString("binary")
} : function(a) {
return unescape(encodeURIComponent(a))
}
}(),
e = 65521,
f = function(a, b) {
for (var c = 65535 & a, d = a >>> 16, f = 0, g = b.length; g > f; f++) c = (c + (255 & b.charCodeAt(f))) % e, d = (d + c) % e;
return (d << 16 | c) >>> 0
},
g = function(a, b) {
for (var c = 65535 & a, d = a >>> 16, f = 0, g = b.length; g > f; f++) c = (c + b[f]) % e, d = (d + c) % e;
return (d << 16 | c) >>> 0
},
h = {},
i = h.Adler32 = function() {
var b = function(a) {
if (!(this instanceof b)) throw new TypeError("Constructor cannot called be as a function.");
if (!isFinite(a = null == a ? 1 : +a)) throw new Error("First arguments needs to be a finite number.");
this.checksum = a >>> 0
},
e = b.prototype = {};
return e.constructor = b, b.from = function(a) {
return a.prototype = e, a
}(function(a) {
if (!(this instanceof b)) throw new TypeError("Constructor cannot called be as a function.");
if (null == a) throw new Error("First argument needs to be a string.");
this.checksum = f(1, a.toString())
}), b.fromUtf8 = function(a) {
return a.prototype = e, a
}(function(a) {
if (!(this instanceof b)) throw new TypeError("Constructor cannot called be as a function.");
if (null == a) throw new Error("First argument needs to be a string.");
var c = d(a.toString());
this.checksum = f(1, c)
}), a && (b.fromBuffer = function(a) {
return a.prototype = e, a
}(function(a) {
if (!(this instanceof b)) throw new TypeError("Constructor cannot called be as a function.");
if (!c(a)) throw new Error("First argument needs to be ArrayBuffer.");
var d = new Uint8Array(a);
return this.checksum = g(1, d)
})), e.update = function(a) {
if (null == a) throw new Error("First argument needs to be a string.");
return a = a.toString(), this.checksum = f(this.checksum, a)
}, e.updateUtf8 = function(a) {
if (null == a) throw new Error("First argument needs to be a string.");
var b = d(a.toString());
return this.checksum = f(this.checksum, b)
}, a && (e.updateBuffer = function(a) {
if (!c(a)) throw new Error("First argument needs to be ArrayBuffer.");
var b = new Uint8Array(a);
return this.checksum = g(this.checksum, b)
}), e.clone = function() {
return new i(this.checksum)
}, b
}();
return h.from = function(a) {
if (null == a) throw new Error("First argument needs to be a string.");
return f(1, a.toString())
}, h.fromUtf8 = function(a) {
if (null == a) throw new Error("First argument needs to be a string.");
var b = d(a.toString());
return f(1, b)
}, a && (h.fromBuffer = function(a) {
if (!c(a)) throw new Error("First argument need to be ArrayBuffer.");
var b = new Uint8Array(a);
return g(1, b)
}), h
});
var e = function() {
function a() {
function a(a) {
var b, c, e, f, h, i, j = d.dyn_tree,
k = d.stat_desc.static_tree,
l = d.stat_desc.extra_bits,
n = d.stat_desc.extra_base,
o = d.stat_desc.max_length,
p = 0;
for (f = 0; g >= f; f++) a.bl_count[f] = 0;
for (j[2 * a.heap[a.heap_max] + 1] = 0, b = a.heap_max + 1; m > b; b++) c = a.heap[b], f = j[2 * j[2 * c + 1] + 1] + 1, f > o && (f = o, p++), j[2 * c + 1] = f, c > d.max_code || (a.bl_count[f]++, h = 0, c >= n && (h = l[c - n]), i = j[2 * c], a.opt_len += i * (f + h), k && (a.static_len += i * (k[2 * c + 1] + h)));
if (0 !== p) {
do {
for (f = o - 1; 0 === a.bl_count[f];) f--;
a.bl_count[f]--, a.bl_count[f + 1] += 2, a.bl_count[o]--, p -= 2
} while (p > 0);
for (f = o; 0 !== f; f--)
for (c = a.bl_count[f]; 0 !== c;) e = a.heap[--b], e > d.max_code || (j[2 * e + 1] != f && (a.opt_len += (f - j[2 * e + 1]) * j[2 * e], j[2 * e + 1] = f), c--)
}
}
function b(a, b) {
var c = 0;
do c |= 1 & a, a >>>= 1, c <<= 1; while (--b > 0);
return c >>> 1
}
function c(a, c, d) {
var e, f, h, i = [],
j = 0;
for (e = 1; g >= e; e++) i[e] = j = j + d[e - 1] << 1;
for (f = 0; c >= f; f++) h = a[2 * f + 1], 0 !== h && (a[2 * f] = b(i[h]++, h))
}
var d = this;
d.build_tree = function(b) {
var e, f, g, h = d.dyn_tree,
i = d.stat_desc.static_tree,
j = d.stat_desc.elems,
k = -1;
for (b.heap_len = 0, b.heap_max = m, e = 0; j > e; e++) 0 !== h[2 * e] ? (b.heap[++b.heap_len] = k = e, b.depth[e] = 0) : h[2 * e + 1] = 0;
for (; b.heap_len < 2;) g = b.heap[++b.heap_len] = 2 > k ? ++k : 0, h[2 * g] = 1, b.depth[g] = 0, b.opt_len--, i && (b.static_len -= i[2 * g + 1]);
for (d.max_code = k, e = Math.floor(b.heap_len / 2); e >= 1; e--) b.pqdownheap(h, e);
g = j;
do e = b.heap[1], b.heap[1] = b.heap[b.heap_len--], b.pqdownheap(h, 1), f = b.heap[1], b.heap[--b.heap_max] = e, b.heap[--b.heap_max] = f, h[2 * g] = h[2 * e] + h[2 * f], b.depth[g] = Math.max(b.depth[e], b.depth[f]) + 1, h[2 * e + 1] = h[2 * f + 1] = g, b.heap[1] = g++, b.pqdownheap(h, 1); while (b.heap_len >= 2);
b.heap[--b.heap_max] = b.heap[1], a(b), c(h, d.max_code, b.bl_count)
}
}
function b(a, b, c, d, e) {
var f = this;
f.static_tree = a, f.extra_bits = b, f.extra_base = c, f.elems = d, f.max_length = e
}
function c(a, b, c, d, e) {
var f = this;
f.good_length = a, f.max_lazy = b, f.nice_length = c, f.max_chain = d, f.func = e
}
function d(a, b, c, d) {
var e = a[2 * b],
f = a[2 * c];
return f > e || e == f && d[b] <= d[c]
}
function e() {
function c() {
var a;
for (Ea = 2 * Aa, Ga[Ia - 1] = 0, a = 0; Ia - 1 > a; a++) Ga[a] = 0;
Va = N[Wa].max_lazy, Ya = N[Wa].good_length, Za = N[Wa].nice_length, Ua = N[Wa].max_chain, Qa = 0, Ma = 0, Sa = 0, Na = Ta = _ - 1, Pa = 0, Ha = 0
}
function e() {
var a;
for (a = 0; l > a; a++) $a[2 * a] = 0;
for (a = 0; h > a; a++) _a[2 * a] = 0;
for (a = 0; i > a; a++) ab[2 * a] = 0;
$a[2 * n] = 1, bb.opt_len = bb.static_len = 0, hb = jb = 0
}
function f() {
cb.dyn_tree = $a, cb.stat_desc = b.static_l_desc, db.dyn_tree = _a, db.stat_desc = b.static_d_desc, eb.dyn_tree = ab, eb.stat_desc = b.static_bl_desc, lb = 0, mb = 0, kb = 8, e()
}
function g(a, b) {
var c, d, e = -1,
f = a[1],
g = 0,
h = 7,
i = 4;
for (0 === f && (h = 138, i = 3), a[2 * (b + 1) + 1] = 65535, c = 0; b >= c; c++) d = f, f = a[2 * (c + 1) + 1], ++g < h && d == f || (i > g ? ab[2 * d] += g : 0 !== d ? (d != e && ab[2 * d]++, ab[2 * p]++) : 10 >= g ? ab[2 * q]++ : ab[2 * r]++, g = 0, e = d, 0 === f ? (h = 138, i = 3) : d == f ? (h = 6, i = 3) : (h = 7, i = 4))
}
function j() {
var b;
for (g($a, cb.max_code), g(_a, db.max_code), eb.build_tree(bb), b = i - 1; b >= 3 && 0 === ab[2 * a.bl_order[b] + 1]; b--);
return bb.opt_len += 3 * (b + 1) + 5 + 5 + 4, b
}
function m(a) {
bb.pending_buf[bb.pending++] = a
}
function o(a) {
m(255 & a), m(a >>> 8 & 255)
}
function H(a) {
m(a >> 8 & 255), m(255 & a & 255)
}
function ca(a, b) {
var c, d = b;
mb > s - d ? (c = a, lb |= c << mb & 65535, o(lb), lb = c >>> s - mb, mb += d - s) : (lb |= a << mb & 65535, mb += d)
}
function da(a, b) {
var c = 2 * a;
ca(65535 & b[c], 65535 & b[c + 1])
}
function ea(a, b) {
var c, d, e = -1,
f = a[1],
g = 0,
h = 7,
i = 4;
for (0 === f && (h = 138, i = 3), c = 0; b >= c; c++)
if (d = f, f = a[2 * (c + 1) + 1], !(++g < h && d == f)) {
if (i > g) {
do da(d, ab); while (0 !== --g)
} else 0 !== d ? (d != e && (da(d, ab), g--), da(p, ab), ca(g - 3, 2)) : 10 >= g ? (da(q, ab), ca(g - 3, 3)) : (da(r, ab), ca(g - 11, 7));
g = 0, e = d, 0 === f ? (h = 138, i = 3) : d == f ? (h = 6, i = 3) : (h = 7, i = 4)
}
}
function fa(b, c, d) {
var e;
for (ca(b - 257, 5), ca(c - 1, 5), ca(d - 4, 4), e = 0; d > e; e++) ca(ab[2 * a.bl_order[e] + 1], 3);
ea($a, b - 1), ea(_a, c - 1)
}
function ga() {
16 == mb ? (o(lb), lb = 0, mb = 0) : mb >= 8 && (m(255 & lb), lb >>>= 8, mb -= 8)
}
function ha() {
ca(Z << 1, 3), da(n, b.static_ltree), ga(), 9 > 1 + kb + 10 - mb && (ca(Z << 1, 3), da(n, b.static_ltree), ga()), kb = 7
}
function ia(b, c) {
var d, e, f;
if (bb.pending_buf[ib + 2 * hb] = b >>> 8 & 255, bb.pending_buf[ib + 2 * hb + 1] = 255 & b, bb.pending_buf[fb + hb] = 255 & c, hb++, 0 === b ? $a[2 * c]++ : (jb++, b--, $a[2 * (a._length_code[c] + k + 1)]++, _a[2 * a.d_code(b)]++), 0 === (8191 & hb) && Wa > 2) {
for (d = 8 * hb, e = Qa - Ma, f = 0; h > f; f++) d += _a[2 * f] * (5 + a.extra_dbits[f]);
if (d >>>= 3, jb < Math.floor(hb / 2) && d < Math.floor(e / 2)) return !0
}
return hb == gb - 1
}
function ja(b, c) {
var d, e, f, g, h = 0;
if (0 !== hb)
do d = bb.pending_buf[ib + 2 * h] << 8 & 65280 | 255 & bb.pending_buf[ib + 2 * h + 1], e = 255 & bb.pending_buf[fb + h], h++, 0 === d ? da(e, b) : (f = a._length_code[e], da(f + k + 1, b), g = a.extra_lbits[f], 0 !== g && (e -= a.base_length[f], ca(e, g)), d--, f = a.d_code(d), da(f, c), g = a.extra_dbits[f], 0 !== g && (d -= a.base_dist[f], ca(d, g))); while (hb > h);
da(n, b), kb = b[2 * n + 1]
}
function ka() {
mb > 8 ? o(lb) : mb > 0 && m(255 & lb), lb = 0, mb = 0
}
function la(a, b, c) {
ka(), kb = 8, c && (o(b), o(~b)), bb.pending_buf.set(Da.subarray(a, a + b), bb.pending), bb.pending += b
}
function ma(a, b, c) {
ca((Y << 1) + (c ? 1 : 0), 3), la(a, b, !0)
}
function na(a, c, d) {
var f, g, h = 0;
Wa > 0 ? (cb.build_tree(bb), db.build_tree(bb), h = j(), f = bb.opt_len + 3 + 7 >>> 3, g = bb.static_len + 3 + 7 >>> 3, f >= g && (f = g)) : f = g = c + 5, f >= c + 4 && -1 != a ? ma(a, c, d) : g == f ? (ca((Z << 1) + (d ? 1 : 0), 3), ja(b.static_ltree, b.static_dtree)) : (ca(($ << 1) + (d ? 1 : 0), 3), fa(cb.max_code + 1, db.max_code + 1, h + 1), ja($a, _a)), e(), d && ka()
}
function oa(a) {
na(Ma >= 0 ? Ma : -1, Qa - Ma, a), Ma = Qa, va.flush_pending()
}
function pa() {
var a, b, c, d;
do {
if (d = Ea - Sa - Qa, 0 === d && 0 === Qa && 0 === Sa) d = Aa;
else if (-1 == d) d--;
else if (Qa >= Aa + Aa - ba) {
Da.set(Da.subarray(Aa, Aa + Aa), 0), Ra -= Aa, Qa -= Aa, Ma -= Aa, a = Ia, c = a;
do b = 65535 & Ga[--c], Ga[c] = b >= Aa ? b - Aa : 0; while (0 !== --a);
a = Aa, c = a;
do b = 65535 & Fa[--c], Fa[c] = b >= Aa ? b - Aa : 0; while (0 !== --a);
d += Aa
}
if (0 === va.avail_in) return;
a = va.read_buf(Da, Qa + Sa, d), Sa += a, Sa >= _ && (Ha = 255 & Da[Qa], Ha = (Ha << La ^ 255 & Da[Qa + 1]) & Ka)
} while (ba > Sa && 0 !== va.avail_in)
}
function qa(a) {
var b, c = 65535;
for (c > xa - 5 && (c = xa - 5);;) {
if (1 >= Sa) {
if (pa(), 0 === Sa && a == x) return P;
if (0 === Sa) break
}
if (Qa += Sa, Sa = 0, b = Ma + c, (0 === Qa || Qa >= b) && (Sa = Qa - b, Qa = b, oa(!1), 0 === va.avail_out)) return P;
if (Qa - Ma >= Aa - ba && (oa(!1), 0 === va.avail_out)) return P
}
return oa(a == A), 0 === va.avail_out ? a == A ? R : P : a == A ? S : Q
}
function ra(a) {
var b, c, d = Ua,
e = Qa,
f = Ta,
g = Qa > Aa - ba ? Qa - (Aa - ba) : 0,
h = Za,
i = Ca,
j = Qa + aa,
k = Da[e + f - 1],
l = Da[e + f];
Ta >= Ya && (d >>= 2), h > Sa && (h = Sa);
do
if (b = a, Da[b + f] == l && Da[b + f - 1] == k && Da[b] == Da[e] && Da[++b] == Da[e + 1]) {
e += 2, b++;
do; while (Da[++e] == Da[++b] && Da[++e] == Da[++b] && Da[++e] == Da[++b] && Da[++e] == Da[++b] && Da[++e] == Da[++b] && Da[++e] == Da[++b] && Da[++e] == Da[++b] && Da[++e] == Da[++b] && j > e);
if (c = aa - (j - e), e = j - aa, c > f) {
if (Ra = a, f = c, c >= h) break;
k = Da[e + f - 1], l = Da[e + f]
}
}
while ((a = 65535 & Fa[a & i]) > g && 0 !== --d);
return Sa >= f ? f : Sa
}
function sa(a) {
for (var b, c = 0;;) {
if (ba > Sa) {
if (pa(), ba > Sa && a == x) return P;
if (0 === Sa) break
}
if (Sa >= _ && (Ha = (Ha << La ^ 255 & Da[Qa + (_ - 1)]) & Ka, c = 65535 & Ga[Ha], Fa[Qa & Ca] = Ga[Ha], Ga[Ha] = Qa), 0 !== c && Aa - ba >= (Qa - c & 65535) && Xa != v && (Na = ra(c)), Na >= _)
if (b = ia(Qa - Ra, Na - _), Sa -= Na, Va >= Na && Sa >= _) {
Na--;
do Qa++, Ha = (Ha << La ^ 255 & Da[Qa + (_ - 1)]) & Ka, c = 65535 & Ga[Ha], Fa[Qa & Ca] = Ga[Ha], Ga[Ha] = Qa; while (0 !== --Na);
Qa++
} else Qa += Na, Na = 0, Ha = 255 & Da[Qa], Ha = (Ha << La ^ 255 & Da[Qa + 1]) & Ka;
else b = ia(0, 255 & Da[Qa]), Sa--, Qa++;
if (b && (oa(!1), 0 === va.avail_out)) return P
}
return oa(a == A), 0 === va.avail_out ? a == A ? R : P : a == A ? S : Q
}
function ta(a) {
for (var b, c, d = 0;;) {
if (ba > Sa) {
if (pa(), ba > Sa && a == x) return P;
if (0 === Sa) break
}
if (Sa >= _ && (Ha = (Ha << La ^ 255 & Da[Qa + (_ - 1)]) & Ka, d = 65535 & Ga[Ha], Fa[Qa & Ca] = Ga[Ha], Ga[Ha] = Qa), Ta = Na, Oa = Ra, Na = _ - 1, 0 !== d && Va > Ta && Aa - ba >= (Qa - d & 65535) && (Xa != v && (Na = ra(d)), 5 >= Na && (Xa == u || Na == _ && Qa - Ra > 4096) && (Na = _ - 1)), Ta >= _ && Ta >= Na) {
c = Qa + Sa - _, b = ia(Qa - 1 - Oa, Ta - _), Sa -= Ta - 1, Ta -= 2;
do ++Qa <= c && (Ha = (Ha << La ^ 255 & Da[Qa + (_ - 1)]) & Ka, d = 65535 & Ga[Ha], Fa[Qa & Ca] = Ga[Ha], Ga[Ha] = Qa); while (0 !== --Ta);
if (Pa = 0, Na = _ - 1, Qa++, b && (oa(!1), 0 === va.avail_out)) return P
} else if (0 !== Pa) {
if (b = ia(0, 255 & Da[Qa - 1]), b && oa(!1), Qa++, Sa--, 0 === va.avail_out) return P
} else Pa = 1, Qa++, Sa--
}
return 0 !== Pa && (b = ia(0, 255 & Da[Qa - 1]), Pa = 0), oa(a == A), 0 === va.avail_out ? a == A ? R : P : a == A ? S : Q
}
function ua(a) {
return a.total_in = a.total_out = 0, a.msg = null, bb.pending = 0, bb.pending_out = 0, wa = V, za = x, f(), c(), B
}
var va, wa, xa, ya, za, Aa, Ba, Ca, Da, Ea, Fa, Ga, Ha, Ia, Ja, Ka, La, Ma, Na, Oa, Pa, Qa, Ra, Sa, Ta, Ua, Va, Wa, Xa, Ya, Za, $a, _a, ab, bb = this,
cb = new a,
db = new a,
eb = new a;
bb.depth = [];
var fb, gb, hb, ib, jb, kb, lb, mb;
bb.bl_count = [], bb.heap = [], $a = [], _a = [], ab = [], bb.pqdownheap = function(a, b) {
for (var c = bb.heap, e = c[b], f = b << 1; f <= bb.heap_len && (f < bb.heap_len && d(a, c[f + 1], c[f], bb.depth) && f++, !d(a, e, c[f], bb.depth));) c[b] = c[f], b = f, f <<= 1;
c[b] = e
}, bb.deflateInit = function(a, b, c, d, e, f) {
return d || (d = X), e || (e = J), f || (f = w), a.msg = null, b == t && (b = 6), 1 > e || e > I || d != X || 9 > c || c > 15 || 0 > b || b > 9 || 0 > f || f > v ? E : (a.dstate = bb, Ba = c, Aa = 1 << Ba, Ca = Aa - 1, Ja = e + 7, Ia = 1 << Ja, Ka = Ia - 1, La = Math.floor((Ja + _ - 1) / _), Da = new Uint8Array(2 * Aa), Fa = [], Ga = [], gb = 1 << e + 6, bb.pending_buf = new Uint8Array(4 * gb), xa = 4 * gb, ib = Math.floor(gb / 2), fb = 3 * gb, Wa = b, Xa = f, ya = 255 & d, ua(a))
}, bb.deflateEnd = function() {
return wa != U && wa != V && wa != W ? E : (bb.pending_buf = null, Ga = null, Fa = null, Da = null, bb.dstate = null, wa == V ? F : B)
}, bb.deflateParams = function(a, b, c) {
var d = B;
return b == t && (b = 6), 0 > b || b > 9 || 0 > c || c > v ? E : (N[Wa].func != N[b].func && 0 !== a.total_in && (d = a.deflate(y)), Wa != b && (Wa = b, Va = N[Wa].max_lazy, Ya = N[Wa].good_length, Za = N[Wa].nice_length, Ua = N[Wa].max_chain), Xa = c, d)
}, bb.deflateSetDictionary = function(a, b, c) {
var d, e = c,
f = 0;
if (!b || wa != U) return E;
if (_ > e) return B;
for (e > Aa - ba && (e = Aa - ba, f = c - e), Da.set(b.subarray(f, f + e), 0), Qa = e, Ma = e, Ha = 255 & Da[0], Ha = (Ha << La ^ 255 & Da[1]) & Ka, d = 0; e - _ >= d; d++) Ha = (Ha << La ^ 255 & Da[d + (_ - 1)]) & Ka, Fa[d & Ca] = Ga[Ha], Ga[Ha] = d;
return B
}, bb.deflate = function(a, b) {
var c, d, e, f, g;
if (b > A || 0 > b) return E;
if (!a.next_out || !a.next_in && 0 !== a.avail_in || wa == W && b != A) return a.msg = O[D - E], E;
if (0 === a.avail_out) return a.msg = O[D - G], G;
if (va = a, f = za, za = b, wa == U && (d = X + (Ba - 8 << 4) << 8, e = (Wa - 1 & 255) >> 1, e > 3 && (e = 3), d |= e << 6, 0 !== Qa && (d |= T), d += 31 - d % 31, wa = V, H(d)), 0 !== bb.pending) {
if (va.flush_pending(), 0 === va.avail_out) return za = -1, B
} else if (0 === va.avail_in && f >= b && b != A) return va.msg = O[D - G], G;
if (wa == W && 0 !== va.avail_in) return a.msg = O[D - G], G;
if (0 !== va.avail_in || 0 !== Sa || b != x && wa != W) {
switch (g = -1, N[Wa].func) {
case K:
g = qa(b);
break;
case L:
g = sa(b);
break;
case M:
g = ta(b)
}
if ((g == R || g == S) && (wa = W), g == P || g == R) return 0 === va.avail_out && (za = -1), B;
if (g == Q) {
if (b == y) ha();
else if (ma(0, 0, !1), b == z)
for (c = 0; Ia > c; c++) Ga[c] = 0;
if (va.flush_pending(), 0 === va.avail_out) return za = -1, B
}
}
return b != A ? B : C
}
}
function f() {
var a = this;
a.next_in_index = 0, a.next_out_index = 0, a.avail_in = 0, a.total_in = 0, a.avail_out = 0, a.total_out = 0
}
var g = 15,
h = 30,
i = 19,
j = 29,
k = 256,
l = k + 1 + j,
m = 2 * l + 1,
n = 256,
o = 7,
p = 16,
q = 17,
r = 18,
s = 16,
t = -1,
u = 1,
v = 2,
w = 0,
x = 0,
y = 1,
z = 3,
A = 4,
B = 0,
C = 1,
D = 2,
E = -2,
F = -3,
G = -5,
H = [0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29];
a._length_code = [0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28], a.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0], a.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576], a.d_code = function(a) {
return 256 > a ? H[a] : H[256 + (a >>> 7)]
}, a.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], a.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], a.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], a.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], b.static_ltree = [12, 8, 140, 8, 76, 8, 204, 8, 44, 8, 172, 8, 108, 8, 236, 8, 28, 8, 156, 8, 92, 8, 220, 8, 60, 8, 188, 8, 124, 8, 252, 8, 2, 8, 130, 8, 66, 8, 194, 8, 34, 8, 162, 8, 98, 8, 226, 8, 18, 8, 146, 8, 82, 8, 210, 8, 50, 8, 178, 8, 114, 8, 242, 8, 10, 8, 138, 8, 74, 8, 202, 8, 42, 8, 170, 8, 106, 8, 234, 8, 26, 8, 154, 8, 90, 8, 218, 8, 58, 8, 186, 8, 122, 8, 250, 8, 6, 8, 134, 8, 70, 8, 198, 8, 38, 8, 166, 8, 102, 8, 230, 8, 22, 8, 150, 8, 86, 8, 214, 8, 54, 8, 182, 8, 118, 8, 246, 8, 14, 8, 142, 8, 78, 8, 206, 8, 46, 8, 174, 8, 110, 8, 238, 8, 30, 8, 158, 8, 94, 8, 222, 8, 62, 8, 190, 8, 126, 8, 254, 8, 1, 8, 129, 8, 65, 8, 193, 8, 33, 8, 161, 8, 97, 8, 225, 8, 17, 8, 145, 8, 81, 8, 209, 8, 49, 8, 177, 8, 113, 8, 241, 8, 9, 8, 137, 8, 73, 8, 201, 8, 41, 8, 169, 8, 105, 8, 233, 8, 25, 8, 153, 8, 89, 8, 217, 8, 57, 8, 185, 8, 121, 8, 249, 8, 5, 8, 133, 8, 69, 8, 197, 8, 37, 8, 165, 8, 101, 8, 229, 8, 21, 8, 149, 8, 85, 8, 213, 8, 53, 8, 181, 8, 117, 8, 245, 8, 13, 8, 141, 8, 77, 8, 205, 8, 45, 8, 173, 8, 109, 8, 237, 8, 29, 8, 157, 8, 93, 8, 221, 8, 61, 8, 189, 8, 125, 8, 253, 8, 19, 9, 275, 9, 147, 9, 403, 9, 83, 9, 339, 9, 211, 9, 467, 9, 51, 9, 307, 9, 179, 9, 435, 9, 115, 9, 371, 9, 243, 9, 499, 9, 11, 9, 267, 9, 139, 9, 395, 9, 75, 9, 331, 9, 203, 9, 459, 9, 43, 9, 299, 9, 171, 9, 427, 9, 107, 9, 363, 9, 235, 9, 491, 9, 27, 9, 283, 9, 155, 9, 411, 9, 91, 9, 347, 9, 219, 9, 475, 9, 59, 9, 315, 9, 187, 9, 443, 9, 123, 9, 379, 9, 251, 9, 507, 9, 7, 9, 263, 9, 135, 9, 391, 9, 71, 9, 327, 9, 199, 9, 455, 9, 39, 9, 295, 9, 167, 9, 423, 9, 103, 9, 359, 9, 231, 9, 487, 9, 23, 9, 279, 9, 151, 9, 407, 9, 87, 9, 343, 9, 215, 9, 471, 9, 55, 9, 311, 9, 183, 9, 439, 9, 119, 9, 375, 9, 247, 9, 503, 9, 15, 9, 271, 9, 143, 9, 399, 9, 79, 9, 335, 9, 207, 9, 463, 9, 47, 9, 303, 9, 175, 9, 431, 9, 111, 9, 367, 9, 239, 9, 495, 9, 31, 9, 287, 9, 159, 9, 415, 9, 95, 9, 351, 9, 223, 9, 479, 9, 63, 9, 319, 9, 191, 9, 447, 9, 127, 9, 383, 9, 255, 9, 511, 9, 0, 7, 64, 7, 32, 7, 96, 7, 16, 7, 80, 7, 48, 7, 112, 7, 8, 7, 72, 7, 40, 7, 104, 7, 24, 7, 88, 7, 56, 7, 120, 7, 4, 7, 68, 7, 36, 7, 100, 7, 20, 7, 84, 7, 52, 7, 116, 7, 3, 8, 131, 8, 67, 8, 195, 8, 35, 8, 163, 8, 99, 8, 227, 8], b.static_dtree = [0, 5, 16, 5, 8, 5, 24, 5, 4, 5, 20, 5, 12, 5, 28, 5, 2, 5, 18, 5, 10, 5, 26, 5, 6, 5, 22, 5, 14, 5, 30, 5, 1, 5, 17, 5, 9, 5, 25, 5, 5, 5, 21, 5, 13, 5, 29, 5, 3, 5, 19, 5, 11, 5, 27, 5, 7, 5, 23, 5], b.static_l_desc = new b(b.static_ltree, a.extra_lbits, k + 1, l, g), b.static_d_desc = new b(b.static_dtree, a.extra_dbits, 0, h, g), b.static_bl_desc = new b(null, a.extra_blbits, 0, i, o);
var I = 9,
J = 8,
K = 0,
L = 1,
M = 2,
N = [new c(0, 0, 0, 0, K), new c(4, 4, 8, 4, L), new c(4, 5, 16, 8, L), new c(4, 6, 32, 32, L), new c(4, 4, 16, 16, M), new c(8, 16, 32, 32, M), new c(8, 16, 128, 128, M), new c(8, 32, 128, 256, M), new c(32, 128, 258, 1024, M), new c(32, 258, 258, 4096, M)],
O = ["need dictionary", "stream end", "", "", "stream error", "data error", "", "buffer error", "", ""],
P = 0,
Q = 1,
R = 2,
S = 3,
T = 32,
U = 42,
V = 113,
W = 666,
X = 8,
Y = 0,
Z = 1,
$ = 2,
_ = 3,
aa = 258,
ba = aa + _ + 1;
return f.prototype = {
deflateInit: function(a, b) {
var c = this;
return c.dstate = new e, b || (b = g), c.dstate.deflateInit(c, a, b)
},
deflate: function(a) {
var b = this;
return b.dstate ? b.dstate.deflate(b, a) : E
},
deflateEnd: function() {
var a = this;
if (!a.dstate) return E;
var b = a.dstate.deflateEnd();
return a.dstate = null, b
},
deflateParams: function(a, b) {
var c = this;
return c.dstate ? c.dstate.deflateParams(c, a, b) : E
},
deflateSetDictionary: function(a, b) {
var c = this;
return c.dstate ? c.dstate.deflateSetDictionary(c, a, b) : E
},
read_buf: function(a, b, c) {
var d = this,
e = d.avail_in;
return e > c && (e = c), 0 === e ? 0 : (d.avail_in -= e, a.set(d.next_in.subarray(d.next_in_index, d.next_in_index + e), b), d.next_in_index += e, d.total_in += e, e)
},
flush_pending: function() {
var a = this,
b = a.dstate.pending;
b > a.avail_out && (b = a.avail_out), 0 !== b && (a.next_out.set(a.dstate.pending_buf.subarray(a.dstate.pending_out, a.dstate.pending_out + b), a.next_out_index), a.next_out_index += b, a.dstate.pending_out += b, a.total_out += b, a.avail_out -= b, a.dstate.pending -= b, 0 === a.dstate.pending && (a.dstate.pending_out = 0))
}
},
function(a) {
var b = this,
c = new f,
d = 512,
e = x,
g = new Uint8Array(d);
"undefined" == typeof a && (a = t), c.deflateInit(a), c.next_out = g, b.append = function(a, b) {
var f, h, i = [],
j = 0,
k = 0,
l = 0;
if (a.length) {
c.next_in_index = 0, c.next_in = a, c.avail_in = a.length;
do {
if (c.next_out_index = 0, c.avail_out = d, f = c.deflate(e), f != B) throw "deflating: " + c.msg;
c.next_out_index && i.push(new Uint8Array(c.next_out_index == d ? g : g.subarray(0, c.next_out_index))), l += c.next_out_index, b && c.next_in_index > 0 && c.next_in_index != j && (b(c.next_in_index), j = c.next_in_index)
} while (c.avail_in > 0 || 0 === c.avail_out);
return h = new Uint8Array(l), i.forEach(function(a) {
h.set(a, k), k += a.length
}), h
}
}, b.flush = function() {
var a, b, e = [],
f = 0,
h = 0;
do {
if (c.next_out_index = 0, c.avail_out = d, a = c.deflate(A), a != C && a != B) throw "deflating: " + c.msg;
d - c.avail_out > 0 && e.push(new Uint8Array(g.subarray(0, c.next_out_index))), h += c.next_out_index
} while (c.avail_in > 0 || 0 === c.avail_out);
return c.deflateEnd(), b = new Uint8Array(h), e.forEach(function(a) {
b.set(a, f), f += a.length
}), b
}
}
}(this);
! function(a) {
var b;
b = function() {
function b(a) {
var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p;
for (this.data = a, this.pos = 8, this.palette = [], this.imgData = [], this.transparency = {}, this.animation = null, this.text = {}, g = null;;) {
switch (b = this.readUInt32(), k = function() {
var a, b;
for (b = [], h = a = 0; 4 > a; h = ++a) b.push(String.fromCharCode(this.data[this.pos++]));
return b
}.call(this).join("")) {
case "IHDR":
this.width = this.readUInt32(), this.height = this.readUInt32(), this.bits = this.data[this.pos++], this.colorType = this.data[this.pos++], this.compressionMethod = this.data[this.pos++], this.filterMethod = this.data[this.pos++], this.interlaceMethod = this.data[this.pos++];
break;
case "acTL":
this.animation = {
numFrames: this.readUInt32(),
numPlays: this.readUInt32() || 1 / 0,
frames: []
};
break;
case "PLTE":
this.palette = this.read(b);
break;
case "fcTL":
g && this.animation.frames.push(g), this.pos += 4, g = {
width: this.readUInt32(),
height: this.readUInt32(),
xOffset: this.readUInt32(),
yOffset: this.readUInt32()
}, f = this.readUInt16(), e = this.readUInt16() || 100, g.delay = 1e3 * f / e, g.disposeOp = this.data[this.pos++], g.blendOp = this.data[this.pos++], g.data = [];
break;
case "IDAT":
case "fdAT":
for ("fdAT" === k && (this.pos += 4, b -= 4), a = (null != g ? g.data : void 0) || this.imgData, h = n = 0; b >= 0 ? b > n : n > b; h = b >= 0 ? ++n : --n) a.push(this.data[this.pos++]);
break;
case "tRNS":
switch (this.transparency = {}, this.colorType) {
case 3:
if (d = this.palette.length / 3, this.transparency.indexed = this.read(b), this.transparency.indexed.length > d) throw new Error("More transparent colors than palette size");
if (l = d - this.transparency.indexed.length, l > 0)
for (h = o = 0; l >= 0 ? l > o : o > l; h = l >= 0 ? ++o : --o) this.transparency.indexed.push(255);
break;
case 0:
this.transparency.grayscale = this.read(b)[0];
break;
case 2:
this.transparency.rgb = this.read(b)
}
break;
case "tEXt":
m = this.read(b), i = m.indexOf(0), j = String.fromCharCode.apply(String, m.slice(0, i)), this.text[j] = String.fromCharCode.apply(String, m.slice(i + 1));
break;
case "IEND":
return g && this.animation.frames.push(g), this.colors = function() {
switch (this.colorType) {
case 0:
case 3:
case 4:
return 1;
case 2:
case 6:
return 3
}
}.call(this), this.hasAlphaChannel = 4 === (p = this.colorType) || 6 === p, c = this.colors + (this.hasAlphaChannel ? 1 : 0), this.pixelBitlength = this.bits * c, this.colorSpace = function() {
switch (this.colors) {
case 1:
return "DeviceGray";
case 3:
return "DeviceRGB"
}
}.call(this), void(this.imgData = new Uint8Array(this.imgData));
default:
this.pos += b
}
if (this.pos += 4, this.pos > this.data.length) throw new Error("Incomplete or corrupt PNG file")
}
}
var c, d, e, f, h, i, j, k;
b.load = function(a, c, d) {
var e;
return "function" == typeof c && (d = c), e = new XMLHttpRequest, e.open("GET", a, !0), e.responseType = "arraybuffer", e.onload = function() {
var a, f;
return a = new Uint8Array(e.response || e.mozResponseArrayBuffer), f = new b(a), "function" == typeof(null != c ? c.getContext : void 0) && f.render(c), "function" == typeof d ? d(f) : void 0
}, e.send(null)
}, f = 0, e = 1, h = 2, d = 0, c = 1, b.prototype.read = function(a) {
var b, c, d;
for (d = [], b = c = 0; a >= 0 ? a > c : c > a; b = a >= 0 ? ++c : --c) d.push(this.data[this.pos++]);
return d
}, b.prototype.readUInt32 = function() {
var a, b, c, d;
return a = this.data[this.pos++] << 24, b = this.data[this.pos++] << 16, c = this.data[this.pos++] << 8, d = this.data[this.pos++], a | b | c | d
}, b.prototype.readUInt16 = function() {
var a, b;
return a = this.data[this.pos++] << 8, b = this.data[this.pos++], a | b
}, b.prototype.decodePixels = function(a) {
var b, c, d, e, f, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y;
if (null == a && (a = this.imgData), 0 === a.length) return new Uint8Array(0);
for (a = new g(a), a = a.getBytes(), n = this.pixelBitlength / 8, r = n * this.width, o = new Uint8Array(r * this.height), h = a.length, q = 0, p = 0, c = 0; h > p;) {
switch (a[p++]) {
case 0:
for (e = u = 0; r > u; e = u += 1) o[c++] = a[p++];
break;
case 1:
for (e = v = 0; r > v; e = v += 1) b = a[p++], f = n > e ? 0 : o[c - n], o[c++] = (b + f) % 256;
break;
case 2:
for (e = w = 0; r > w; e = w += 1) b = a[p++], d = (e - e % n) / n, s = q && o[(q - 1) * r + d * n + e % n], o[c++] = (s + b) % 256;
break;
case 3:
for (e = x = 0; r > x; e = x += 1) b = a[p++], d = (e - e % n) / n, f = n > e ? 0 : o[c - n], s = q && o[(q - 1) * r + d * n + e % n], o[c++] = (b + Math.floor((f + s) / 2)) % 256;
break;
case 4:
for (e = y = 0; r > y; e = y += 1) b = a[p++], d = (e - e % n) / n, f = n > e ? 0 : o[c - n], 0 === q ? s = t = 0 : (s = o[(q - 1) * r + d * n + e % n], t = d && o[(q - 1) * r + (d - 1) * n + e % n]), i = f + s - t, j = Math.abs(i - f), l = Math.abs(i - s), m = Math.abs(i - t), k = l >= j && m >= j ? f : m >= l ? s : t, o[c++] = (b + k) % 256;
break;
default:
throw new Error("Invalid filter algorithm: " + a[p - 1])
}
q++
}
return o
}, b.prototype.decodePalette = function() {
var a, b, c, d, e, f, g, h, i, j;
for (d = this.palette, g = this.transparency.indexed || [], f = new Uint8Array((g.length || 0) + d.length), e = 0, c = d.length, a = 0, b = h = 0, i = d.length; i > h; b = h += 3) f[e++] = d[b], f[e++] = d[b + 1], f[e++] = d[b + 2], f[e++] = null != (j = g[a++]) ? j : 255;
return f
}, b.prototype.copyToImageData = function(a, b) {
var c, d, e, f, g, h, i, j, k, l, m;
if (d = this.colors, k = null, c = this.hasAlphaChannel, this.palette.length && (k = null != (m = this._decodedPalette) ? m : this._decodedPalette = this.decodePalette(), d = 4, c = !0), e = a.data || a, j = e.length, g = k || b, f = h = 0, 1 === d)
for (; j > f;) i = k ? 4 * b[f / 4] : h, l = g[i++], e[f++] = l, e[f++] = l, e[f++] = l, e[f++] = c ? g[i++] : 255, h = i;
else
for (; j > f;) i = k ? 4 * b[f / 4] : h, e[f++] = g[i++], e[f++] = g[i++], e[f++] = g[i++], e[f++] = c ? g[i++] : 255, h = i
}, b.prototype.decode = function() {
var a;
return a = new Uint8Array(this.width * this.height * 4), this.copyToImageData(a, this.decodePixels()), a
};
try {
j = a.document.createElement("canvas"), k = j.getContext("2d")
} catch (l) {
return -1
}
return i = function(a) {
var b;
return k.width = a.width, k.height = a.height, k.clearRect(0, 0, a.width, a.height), k.putImageData(a, 0, 0), b = new Image, b.src = j.toDataURL(), b
}, b.prototype.decodeFrames = function(a) {
var b, c, d, e, f, g, h, j;
if (this.animation) {
for (h = this.animation.frames, j = [], c = f = 0, g = h.length; g > f; c = ++f) b = h[c], d = a.createImageData(b.width, b.height), e = this.decodePixels(new Uint8Array(b.data)), this.copyToImageData(d, e), b.imageData = d, j.push(b.image = i(d));
return j
}
}, b.prototype.renderFrame = function(a, b) {
var c, f, g;
return f = this.animation.frames, c = f[b], g = f[b - 1], 0 === b && a.clearRect(0, 0, this.width, this.height), (null != g ? g.disposeOp : void 0) === e ? a.clearRect(g.xOffset, g.yOffset, g.width, g.height) : (null != g ? g.disposeOp : void 0) === h && a.putImageData(g.imageData, g.xOffset, g.yOffset), c.blendOp === d && a.clearRect(c.xOffset, c.yOffset, c.width, c.height), a.drawImage(c.image, c.xOffset, c.yOffset)
}, b.prototype.animate = function(a) {
var b, c, d, e, f, g, h = this;
return c = 0, g = this.animation, e = g.numFrames, d = g.frames, f = g.numPlays, (b = function() {
var g, i;
return g = c++ % e, i = d[g], h.renderFrame(a, g), e > 1 && f > c / e ? h.animation._timeout = setTimeout(b, i.delay) : void 0
})()
}, b.prototype.stopAnimation = function() {
var a;
return clearTimeout(null != (a = this.animation) ? a._timeout : void 0)
}, b.prototype.render = function(a) {
var b, c;
return a._png && a._png.stopAnimation(), a._png = this, a.width = this.width, a.height = this.height, b = a.getContext("2d"), this.animation ? (this.decodeFrames(b), this.animate(b)) : (c = b.createImageData(this.width, this.height), this.copyToImageData(c, this.decodePixels()), b.putImageData(c, 0, 0))
}, b
}(), a.PNG = b
}("undefined" != typeof window && window || this);
var f = function() {
function a() {
this.pos = 0, this.bufferLength = 0, this.eof = !1, this.buffer = null
}
return a.prototype = {
ensureBuffer: function(a) {
var b = this.buffer,
c = b ? b.byteLength : 0;
if (c > a) return b;
for (var d = 512; a > d;) d <<= 1;
for (var e = new Uint8Array(d), f = 0; c > f; ++f) e[f] = b[f];
return this.buffer = e
},
getByte: function() {
for (var a = this.pos; this.bufferLength <= a;) {
if (this.eof) return null;
this.readBlock()
}
return this.buffer[this.pos++]
},
getBytes: function(a) {
var b = this.pos;
if (a) {
this.ensureBuffer(b + a);
for (var c = b + a; !this.eof && this.bufferLength < c;) this.readBlock();
var d = this.bufferLength;
c > d && (c = d)
} else {
for (; !this.eof;) this.readBlock();
var c = this.bufferLength
}
return this.pos = c, this.buffer.subarray(b, c)
},
lookChar: function() {
for (var a = this.pos; this.bufferLength <= a;) {
if (this.eof) return null;
this.readBlock()
}
return String.fromCharCode(this.buffer[this.pos])
},
getChar: function() {
for (var a = this.pos; this.bufferLength <= a;) {
if (this.eof) return null;
this.readBlock()
}
return String.fromCharCode(this.buffer[this.pos++])
},
makeSubStream: function(a, b, c) {
for (var d = a + b; this.bufferLength <= d && !this.eof;) this.readBlock();
return new Stream(this.buffer, a, b, c)
},
skip: function(a) {
a || (a = 1), this.pos += a
},
reset: function() {
this.pos = 0
}
}, a
}(),
g = function() {
function a(a) {
throw new Error(a)
}
function b(b) {
var c = 0,
d = b[c++],
e = b[c++];
(-1 == d || -1 == e) && a("Invalid header in flate stream"), 8 != (15 & d) && a("Unknown compression method in flate stream"), ((d << 8) + e) % 31 != 0 && a("Bad FCHECK in flate stream"), 32 & e && a("FDICT bit set in flate stream"), this.bytes = b, this.bytesPos = c, this.codeSize = 0, this.codeBuf = 0, f.call(this)
}
if ("undefined" == typeof Uint32Array) return void 0;
var c = new Uint32Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
d = new Uint32Array([3, 4, 5, 6, 7, 8, 9, 10, 65547, 65549, 65551, 65553, 131091, 131095, 131099, 131103, 196643, 196651, 196659, 196667, 262211, 262227, 262243, 262259, 327811, 327843, 327875, 327907, 258, 258, 258]),
e = new Uint32Array([1, 2, 3, 4, 65541, 65543, 131081, 131085, 196625, 196633, 262177, 262193, 327745, 327777, 393345, 393409, 459009, 459137, 524801, 525057, 590849, 591361, 657409, 658433, 724993, 727041, 794625, 798721, 868353, 876545]),
g = [new Uint32Array([459008, 524368, 524304, 524568, 459024, 524400, 524336, 590016, 459016, 524384, 524320, 589984, 524288, 524416, 524352, 590048, 459012, 524376, 524312, 589968, 459028, 524408, 524344, 590032, 459020, 524392, 524328, 59e4, 524296, 524424, 524360, 590064, 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590024, 459018, 524388, 524324, 589992, 524292, 524420, 524356, 590056, 459014, 524380, 524316, 589976, 459030, 524412, 524348, 590040, 459022, 524396, 524332, 590008, 524300, 524428, 524364, 590072, 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590020, 459017, 524386, 524322, 589988, 524290, 524418, 524354, 590052, 459013, 524378, 524314, 589972, 459029, 524410, 524346, 590036, 459021, 524394, 524330, 590004, 524298, 524426, 524362, 590068, 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590028, 459019, 524390, 524326, 589996, 524294, 524422, 524358, 590060, 459015, 524382, 524318, 589980, 459031, 524414, 524350, 590044, 459023, 524398, 524334, 590012, 524302, 524430, 524366, 590076, 459008, 524369, 524305, 524569, 459024, 524401, 524337, 590018, 459016, 524385, 524321, 589986, 524289, 524417, 524353, 590050, 459012, 524377, 524313, 589970, 459028, 524409, 524345, 590034, 459020, 524393, 524329, 590002, 524297, 524425, 524361, 590066, 459010, 524373, 524309, 524573, 459026, 524405, 524341, 590026, 459018, 524389, 524325, 589994, 524293, 524421, 524357, 590058, 459014, 524381, 524317, 589978, 459030, 524413, 524349, 590042, 459022, 524397, 524333, 590010, 524301, 524429, 524365, 590074, 459009, 524371, 524307, 524571, 459025, 524403, 524339, 590022, 459017, 524387, 524323, 589990, 524291, 524419, 524355, 590054, 459013, 524379, 524315, 589974, 459029, 524411, 524347, 590038, 459021, 524395, 524331, 590006, 524299, 524427, 524363, 590070, 459011, 524375, 524311, 524575, 459027, 524407, 524343, 590030, 459019, 524391, 524327, 589998, 524295, 524423, 524359, 590062, 459015, 524383, 524319, 589982, 459031, 524415, 524351, 590046, 459023, 524399, 524335, 590014, 524303, 524431, 524367, 590078, 459008, 524368, 524304, 524568, 459024, 524400, 524336, 590017, 459016, 524384, 524320, 589985, 524288, 524416, 524352, 590049, 459012, 524376, 524312, 589969, 459028, 524408, 524344, 590033, 459020, 524392, 524328, 590001, 524296, 524424, 524360, 590065, 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590025, 459018, 524388, 524324, 589993, 524292, 524420, 524356, 590057, 459014, 524380, 524316, 589977, 459030, 524412, 524348, 590041, 459022, 524396, 524332, 590009, 524300, 524428, 524364, 590073, 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590021, 459017, 524386, 524322, 589989, 524290, 524418, 524354, 590053, 459013, 524378, 524314, 589973, 459029, 524410, 524346, 590037, 459021, 524394, 524330, 590005, 524298, 524426, 524362, 590069, 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590029, 459019, 524390, 524326, 589997, 524294, 524422, 524358, 590061, 459015, 524382, 524318, 589981, 459031, 524414, 524350, 590045, 459023, 524398, 524334, 590013, 524302, 524430, 524366, 590077, 459008, 524369, 524305, 524569, 459024, 524401, 524337, 590019, 459016, 524385, 524321, 589987, 524289, 524417, 524353, 590051, 459012, 524377, 524313, 589971, 459028, 524409, 524345, 590035, 459020, 524393, 524329, 590003, 524297, 524425, 524361, 590067, 459010, 524373, 524309, 524573, 459026, 524405, 524341, 590027, 459018, 524389, 524325, 589995, 524293, 524421, 524357, 590059, 459014, 524381, 524317, 589979, 459030, 524413, 524349, 590043, 459022, 524397, 524333, 590011, 524301, 524429, 524365, 590075, 459009, 524371, 524307, 524571, 459025, 524403, 524339, 590023, 459017, 524387, 524323, 589991, 524291, 524419, 524355, 590055, 459013, 524379, 524315, 589975, 459029, 524411, 524347, 590039, 459021, 524395, 524331, 590007, 524299, 524427, 524363, 590071, 459011, 524375, 524311, 524575, 459027, 524407, 524343, 590031, 459019, 524391, 524327, 589999, 524295, 524423, 524359, 590063, 459015, 524383, 524319, 589983, 459031, 524415, 524351, 590047, 459023, 524399, 524335, 590015, 524303, 524431, 524367, 590079]), 9],
h = [new Uint32Array([327680, 327696, 327688, 327704, 327684, 327700, 327692, 327708, 327682, 327698, 327690, 327706, 327686, 327702, 327694, 0, 327681, 327697, 327689, 327705, 327685, 327701, 327693, 327709, 327683, 327699, 327691, 327707, 327687, 327703, 327695, 0]), 5];
return b.prototype = Object.create(f.prototype), b.prototype.getBits = function(b) {
for (var c, d = this.codeSize, e = this.codeBuf, f = this.bytes, g = this.bytesPos; b > d;) "undefined" == typeof(c = f[g++]) && a("Bad encoding in flate stream"), e |= c << d, d += 8;
return c = e & (1 << b) - 1, this.codeBuf = e >> b, this.codeSize = d -= b, this.bytesPos = g, c
}, b.prototype.getCode = function(b) {
for (var c = b[0], d = b[1], e = this.codeSize, f = this.codeBuf, g = this.bytes, h = this.bytesPos; d > e;) {
var i;
"undefined" == typeof(i = g[h++]) && a("Bad encoding in flate stream"), f |= i << e, e += 8
}
var j = c[f & (1 << d) - 1],
k = j >> 16,
l = 65535 & j;
return (0 == e || k > e || 0 == k) && a("Bad encoding in flate stream"), this.codeBuf = f >> k, this.codeSize = e - k, this.bytesPos = h, l
}, b.prototype.generateHuffmanTable = function(a) {
for (var b = a.length, c = 0, d = 0; b > d; ++d) a[d] > c && (c = a[d]);
for (var e = 1 << c, f = new Uint32Array(e), g = 1, h = 0, i = 2; c >= g; ++g, h <<= 1, i <<= 1)
for (var j = 0; b > j; ++j)
if (a[j] == g) {
for (var k = 0, l = h, d = 0; g > d; ++d) k = k << 1 | 1 & l, l >>= 1;
for (var d = k; e > d; d += i) f[d] = g << 16 | j;
++h
}
return [f, c]
}, b.prototype.readBlock = function() {
function b(a, b, c, d, e) {
for (var f = a.getBits(c) + d; f-- > 0;) b[x++] = e
}
var f = this.getBits(3);
if (1 & f && (this.eof = !0), f >>= 1, 0 == f) {
var i, j = this.bytes,
k = this.bytesPos;
"undefined" == typeof(i = j[k++]) && a("Bad block header in flate stream");
var l = i;
"undefined" == typeof(i = j[k++]) && a("Bad block header in flate stream"), l |= i << 8, "undefined" == typeof(i = j[k++]) && a("Bad block header in flate stream");
var m = i;
"undefined" == typeof(i = j[k++]) && a("Bad block header in flate stream"), m |= i << 8, m != (65535 & ~l) && a("Bad uncompressed block length in flate stream"), this.codeBuf = 0, this.codeSize = 0;
var n = this.bufferLength,
o = this.ensureBuffer(n + l),
p = n + l;
this.bufferLength = p;
for (var q = n; p > q; ++q) {
if ("undefined" == typeof(i = j[k++])) {
this.eof = !0;
break
}
o[q] = i
}
return void(this.bytesPos = k)
}
var r, s;
if (1 == f) r = g, s = h;
else if (2 == f) {
for (var t = this.getBits(5) + 257, u = this.getBits(5) + 1, v = this.getBits(4) + 4, w = Array(c.length), x = 0; v > x;) w[c[x++]] = this.getBits(3);
for (var y = this.generateHuffmanTable(w), z = 0, x = 0, A = t + u, B = new Array(A); A > x;) {
var C = this.getCode(y);
16 == C ? b(this, B, 2, 3, z) : 17 == C ? b(this, B, 3, 3, z = 0) : 18 == C ? b(this, B, 7, 11, z = 0) : B[x++] = z = C
}
r = this.generateHuffmanTable(B.slice(0, t)), s = this.generateHuffmanTable(B.slice(t, A))
} else a("Unknown block type in flate stream");
for (var o = this.buffer, D = o ? o.length : 0, E = this.bufferLength;;) {
var F = this.getCode(r);
if (256 > F) E + 1 >= D && (o = this.ensureBuffer(E + 1), D = o.length), o[E++] = F;
else {
if (256 == F) return void(this.bufferLength = E);
F -= 257, F = d[F];
var G = F >> 16;
G > 0 && (G = this.getBits(G));
var z = (65535 & F) + G;
F = this.getCode(s), F = e[F], G = F >> 16, G > 0 && (G = this.getBits(G));
var H = (65535 & F) + G;
E + z >= D && (o = this.ensureBuffer(E + z), D = o.length);
for (var I = 0; z > I; ++I, ++E) o[E] = o[E - H]
}
}
}, b
}();
! function(a) {
var b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
"undefined" == typeof a.btoa && (a.btoa = function(a) {
var c, d, e, f, g, h, i, j, k = 0,
l = 0,
m = "",
n = [];
if (!a) return a;
do c = a.charCodeAt(k++), d = a.charCodeAt(k++), e = a.charCodeAt(k++), j = c << 16 | d << 8 | e, f = j >> 18 & 63, g = j >> 12 & 63, h = j >> 6 & 63, i = 63 & j, n[l++] = b.charAt(f) + b.charAt(g) + b.charAt(h) + b.charAt(i); while (k < a.length);
m = n.join("");
var o = a.length % 3;
return (o ? m.slice(0, o - 3) : m) + "===".slice(o || 3)
}), "undefined" == typeof a.atob && (a.atob = function(a) {
var c, d, e, f, g, h, i, j, k = 0,
l = 0,
m = "",
n = [];
if (!a) return a;
a += "";
do f = b.indexOf(a.charAt(k++)), g = b.indexOf(a.charAt(k++)), h = b.indexOf(a.charAt(k++)), i = b.indexOf(a.charAt(k++)), j = f << 18 | g << 12 | h << 6 | i, c = j >> 16 & 255, d = j >> 8 & 255, e = 255 & j, n[l++] = 64 == h ? String.fromCharCode(c) : 64 == i ? String.fromCharCode(c, d) : String.fromCharCode(c, d, e); while (k < a.length);
return m = n.join("")
}), Array.prototype.map || (Array.prototype.map = function(a) {
if (void 0 === this || null === this || "function" != typeof a) throw new TypeError;
for (var b = Object(this), c = b.length >>> 0, d = new Array(c), e = arguments.length > 1 ? arguments[1] : void 0, f = 0; c > f; f++) f in b && (d[f] = a.call(e, b[f], f, b));
return d
}), Array.isArray || (Array.isArray = function(a) {
return "[object Array]" === Object.prototype.toString.call(a)
}), Array.prototype.forEach || (Array.prototype.forEach = function(a, b) {
"use strict";
if (void 0 === this || null === this || "function" != typeof a) throw new TypeError;
for (var c = Object(this), d = c.length >>> 0, e = 0; d > e; e++) e in c && a.call(b, c[e], e, c)
}), Object.keys || (Object.keys = function() {
"use strict";
var a = Object.prototype.hasOwnProperty,
b = !{
toString: null
}.propertyIsEnumerable("toString"),
c = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"],
d = c.length;
return function(e) {
if ("object" != typeof e && ("function" != typeof e || null === e)) throw new TypeError;
var f, g, h = [];
for (f in e) a.call(e, f) && h.push(f);
if (b)
for (g = 0; d > g; g++) a.call(e, c[g]) && h.push(c[g]);
return h
}
}()), String.prototype.trim || (String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "")
}), String.prototype.trimLeft || (String.prototype.trimLeft = function() {
return this.replace(/^\s+/g, "")
}), String.prototype.trimRight || (String.prototype.trimRight = function() {
return this.replace(/\s+$/g, "")
})
}("undefined" != typeof self && self || "undefined" != typeof window && window || this)
}({}, function() {
return this
}()),
function(a) {
"use strict";
function b(a) {
var b = n(w(), a);
"undefined" != typeof b.extendWidth && (b.tableWidth = b.extendWidth ? "auto" : "wrap", console.error("Use of deprecated option: extendWidth, use tableWidth instead.")), "undefined" != typeof b.margins && ("undefined" == typeof b.margin && (b.margin = b.margins), console.error("Use of deprecated option: margins, use margin instead.")), [
["padding", "cellPadding"],
["lineHeight", "rowHeight"], "fontSize", "overflow"
].forEach(function(a) {
var c = "string" == typeof a ? a : a[0],
d = "string" == typeof a ? a : a[1];
"undefined" != typeof b[c] && ("undefined" == typeof b.styles[d] && (b.styles[d] = b[c]), console.error("Use of deprecated option: " + c + ", use the style " + d + " instead."))
});
var c = b.margin;
return b.margin = {}, "number" == typeof c.horizontal && (c.right = c.horizontal, c.left = c.horizontal), "number" == typeof c.vertical && (c.top = c.vertical, c.bottom = c.vertical), ["top", "right", "bottom", "left"].forEach(function(a, d) {
if ("number" == typeof c) b.margin[a] = c;
else {
var e = Array.isArray(c) ? d : a;
b.margin[a] = "number" == typeof c[e] ? c[e] : 40
}
}), b
}
function c(a, b) {
s = new Table, s.x = q.margin.left;
var c = /\r\n|\r|\n/g,
d = new Row(a);
d.index = -1;
var e = n(u, v[q.theme].table, v[q.theme].header);
d.styles = n(e, q.styles, q.headerStyles), a.forEach(function(a, b) {
"object" == typeof a && (b = "undefined" != typeof a.dataKey ? a.dataKey : a.key), "undefined" != typeof a.width && console.error("Use of deprecated option: column.width, use column.styles.columnWidth instead.");
var e = new Column(b);
e.styles = q.columnStyles[e.dataKey] || {}, s.columns.push(e);
var f = new Cell;
f.raw = "object" == typeof a ? a.title : a, f.styles = d.styles, f.text = "" + f.raw, f.contentWidth = 2 * f.styles.cellPadding + m(f.text, f.styles), f.text = f.text.split(c), d.cells[b] = f, q.createdHeaderCell(f, {
column: e,
row: d,
settings: q
})
}), s.headerRow = d, b.forEach(function(a, b) {
var d = new Row(a),
e = b % 2 === 0,
f = n(u, v[q.theme].table, e ? v[q.theme].alternateRow : {}),
g = n(q.styles, q.bodyStyles, e ? q.alternateRowStyles : {});
d.styles = n(f, g), d.index = b, s.columns.forEach(function(b) {
var e = new Cell;
e.raw = a[b.dataKey], e.styles = n(d.styles, b.styles), e.text = "undefined" != typeof e.raw ? "" + e.raw : "", d.cells[b.dataKey] = e, q.createdCell(e, k({
column: b,
row: d
})), e.contentWidth = 2 * e.styles.cellPadding + m(e.text, e.styles), e.text = e.text.split(c)
}), s.rows.push(d)
})
}
function d() {
var a = 0;
s.columns.forEach(function(b) {
b.contentWidth = s.headerRow.cells[b.dataKey].contentWidth, s.rows.forEach(function(a) {
var c = a.cells[b.dataKey].contentWidth;
c > b.contentWidth && (b.contentWidth = c)
}), b.width = b.contentWidth, a += b.contentWidth
}), s.contentWidth = a;
var b = o.internal.pageSize.width - q.margin.left - q.margin.right,
c = b;
"number" == typeof q.tableWidth ? c = q.tableWidth : "wrap" === q.tableWidth && (c = s.contentWidth), s.width = b > c ? c : b;
var d = [],
f = 0,
g = s.width / s.columns.length,
h = 0;
s.columns.forEach(function(a) {
var b = n(u, v[q.theme].table, q.styles, a.styles);
"wrap" === b.columnWidth ? a.width = a.contentWidth : "number" == typeof b.columnWidth ? a.width = b.columnWidth : ("auto" === b.columnWidth, 0 || (a.contentWidth <= g && s.contentWidth > s.width ? a.width = a.contentWidth : (d.push(a), f += a.contentWidth, a.width = 0))), h += a.width
}), e(d, h, f, g), s.height = 0;
var i = s.rows.concat(s.headerRow);
i.forEach(function(a) {
var b = 0,
c = s.x;
s.columns.forEach(function(d) {
var e = a.cells[d.dataKey];
d.x = c, j(e.styles);
var f = d.width - 2 * e.styles.cellPadding;
"linebreak" === e.styles.overflow ? e.text = o.splitTextToSize(e.text, f + 1, {
fontSize: e.styles.fontSize
}) : "ellipsize" === e.styles.overflow ? e.text = l(e.text, f, e.styles) : "visible" === e.styles.overflow || ("hidden" === e.styles.overflow ? e.text = l(e.text, f, e.styles, "") : "function" == typeof e.styles.overflow ? e.text = e.styles.overflow(e.text, f) : console.error("Unrecognized overflow type: " + e.styles.overflow));
var g = Array.isArray(e.text) ? e.text.length - 1 : 0;
g > b && (b = g), c += d.width
}), a.heightStyle = a.styles.rowHeight, a.height = a.heightStyle + b * a.styles.fontSize * t, s.height += a.height
})
}
function e(a, b, c, d) {
for (var f = s.width - b - c, g = 0; g < a.length; g++) {
var h = a[g],
i = h.contentWidth / c,
j = h.contentWidth + f * i < d;
if (0 > f && j) {
a.splice(g, 1), c -= h.contentWidth, h.width = d, b += h.width, e(a, b, c, d);
break
}
h.width = h.contentWidth + f * i
}
}
function f() {
s.rows.forEach(function(a) {
if (h(a.height)) {
g()
}
a.y = p.y, q.drawRow(a, k({
row: a
})) !== !1 && i(a, q.drawCell)
})
}
function g() {
q.afterPageContent(k()), o.addPage(), r++, p = {
x: q.margin.left,
y: q.margin.top
}, q.beforePageContent(k()), q.drawHeaderRow(s.headerRow, k({
row: s.headerRow
})) !== !1 && i(s.headerRow, q.drawHeaderCell)
}
function h(a) {
var b = p.y + a + q.margin.bottom;
return b >= o.internal.pageSize.height
}
function i(a, b) {
for (var c = 0; c < s.columns.length; c++) {
var d = s.columns[c],
e = a.cells[d.dataKey];
if (e) {
j(e.styles), e.x = d.x, e.y = p.y, e.height = a.height, e.width = d.width, e.textPos.y = "top" === e.styles.valign ? p.y + e.styles.cellPadding : "bottom" === e.styles.valign ? p.y + a.height - e.styles.cellPadding : p.y + a.height / 2, e.textPos.x = "right" === e.styles.halign ? e.x + e.width - e.styles.cellPadding : "center" === e.styles.halign ? e.x + e.width / 2 : e.x + e.styles.cellPadding;
var f = k({
column: d,
row: a
});
b(e, f) !== !1 && (o.rect(e.x, e.y, e.width, e.height, e.styles.fillStyle), o.autoTableText(e.text, e.textPos.x, e.textPos.y, {
halign: e.styles.halign,
valign: e.styles.valign
}))
}
}
p.y += a.height
}
function j(a) {
var b = [{
func: o.setFillColor,
value: a.fillColor
}, {
func: o.setTextColor,
value: a.textColor
}, {
func: o.setFontStyle,
value: a.fontStyle
}, {
func: o.setDrawColor,
value: a.lineColor
}, {
func: o.setLineWidth,
value: a.lineWidth
}, {
func: o.setFont,
value: a.font
}, {
func: o.setFontSize,
value: a.fontSize
}];
b.forEach(function(a) {
"undefined" != typeof a.value && (a.value.constructor === Array ? a.func.apply(this, a.value) : a.func(a.value))
})
}
function k(a) {
a = a || {};
var b = {
pageCount: r,
settings: q,
table: s,
cursor: p
};
for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c]);
return b
}
function l(a, b, c, d) {
if (d = "undefined" != typeof d ? d : "...", Array.isArray(a)) return a.forEach(function(e, f) {
a[f] = l(e, b, c, d)
}), a;
if (b >= m(a, c)) return a;
for (; b < m(a + d, c) && !(a.length < 2);) a = a.substring(0, a.length - 1);
return a.trim() + d
}
function m(a, b) {
j(b);
var c = o.getStringUnitWidth(a);
return c * b.fontSize
}
function n(a) {
var b, c = {};
for (b in a) a.hasOwnProperty(b) && (c[b] = a[b]);
for (var d = 1; d < arguments.length; d++) {
var e = arguments[d];
for (b in e) e.hasOwnProperty(b) && (c[b] = "object" != typeof e[b] || Array.isArray(e[b]) ? e[b] : e[b])
}
return c
}
var o, p, q, r, s, t = 1.15,
u = {
cellPadding: 5,
fontSize: 10,
font: "helvetica",
lineColor: 200,
lineWidth: .1,
fontStyle: "normal",
overflow: "ellipsize",
fillColor: 255,
textColor: 20,
halign: "left",
valign: "top",
fillStyle: "F",
rowHeight: 20,
columnWidth: "auto"
},
v = {
striped: {
table: {
fillColor: 255,
textColor: 80,
fontStyle: "normal",
fillStyle: "F"
},
header: {
textColor: 255,
fillColor: [41, 128, 185],
rowHeight: 23,
fontStyle: "bold"
},
body: {},
alternateRow: {
fillColor: 245
}
},
grid: {
table: {
fillColor: 255,
textColor: 80,
fontStyle: "normal",
lineWidth: .1,
fillStyle: "DF"
},
header: {
textColor: 255,
fillColor: [26, 188, 156],
rowHeight: 23,
fillStyle: "F",
fontStyle: "bold"
},
body: {},
alternateRow: {}
},
plain: {
header: {
fontStyle: "bold"
}
}
},
w = function() {
return {
theme: "striped",
styles: {},
headerStyles: {},
bodyStyles: {},
alternateRowStyles: {},
columnStyles: {},
startY: !1,
margin: 40,
pageBreak: "auto",
tableWidth: "auto",
createdHeaderCell: function() {},
createdCell: function() {},
drawHeaderRow: function() {},
drawRow: function() {},
drawHeaderCell: function() {},
drawCell: function() {},
beforePageContent: function() {},
afterPageContent: function() {}
}
};
a.autoTable = function(a, e, g) {
o = this, q = b(g || {}), r = 1, p = {
y: q.startY === !1 ? q.margin.top : q.startY
};
var h = {
textColor: 30,
fontSize: o.internal.getFontSize(),
fontStyle: o.internal.getFont().fontStyle
};
c(a, e), d();
var l = s.rows[0] && "auto" === q.pageBreak ? s.rows[0].height : 0,
m = q.startY + q.margin.bottom + s.headerRow.height + l;
return "avoid" === q.pageBreak && (m += s.height), ("always" === q.pageBreak && q.startY !== !1 || q.startY !== !1 && m > o.internal.pageSize.height) && (o.addPage(), p.y = q.margin.top), j(h), q.beforePageContent(k()), q.drawHeaderRow(s.headerRow, k({
row: s.headerRow
})) !== !1 && i(s.headerRow, q.drawHeaderCell), j(h), f(), q.afterPageContent(k()), j(h), this
}, a.autoTableEndPosY = function() {
return "undefined" == typeof p || "undefined" == typeof p.y ? 0 : p.y
}, a.autoTableHtmlToJson = function(a) {
var b, c, d, e, f = [],
g = [],
h = a.rows[0];
for (d = 0; d < h.cells.length; d++) g.push("undefined" != typeof h.cells[d] ? h.cells[d].textContent : "");
for (d = 1; d < a.rows.length; d++) {
for (b = a.rows[d], c = [], e = 0; e < h.cells.length; e++) c.push("undefined" != typeof b.cells[e] ? b.cells[e].textContent : "");
f.push(c)
}
return {
columns: g,
data: f,
rows: f
}
}, a.autoTableText = function(a, b, c, d) {
("number" != typeof b || "number" != typeof c) && console.error("The x and y parameters are required. Missing for the text: ", a);
var e = o.internal.getFontSize() / o.internal.scaleFactor,
f = t,
g = /\r\n|\r|\n/g,
h = null,
i = 1;
if (("middle" === d.valign || "bottom" === d.valign || "center" === d.halign || "right" === d.halign) && (h = "string" == typeof a ? a.split(g) : a, i = h.length || 1), c += e * (2 - f), "middle" === d.valign ? c -= i / 2 * e : "bottom" === d.valign && (c -= i * e), "center" === d.halign || "right" === d.halign) {
var j = e;
if ("center" === d.halign && (j *= .5),
i >= 1) {
for (var k = 0; k < h.length; k++) o.text(h[k], b - o.getStringUnitWidth(h[k]) * j, c), c += e;
return o
}
b -= o.getStringUnitWidth(a) * j
}
return o.text(a, b, c), o
}
}(jsPDF.API);
var Table = function a() {
_classCallCheck(this, a), this.height = 0, this.width = 0, this.x = 0, this.y = 0, this.contentWidth = 0, this.rows = [], this.columns = [], this.headerRow = null, this.settings = {}
},
Row = function b(a) {
_classCallCheck(this, b), this.raw = a || {}, this.index = 0, this.styles = {}, this.cells = {}, this.height = 0, this.y = 0
},
Cell = function d(a) {
_classCallCheck(this, d), this.raw = a, this.styles = {}, this.text = "", this.contentWidth = 0, this.textPos = {}, this.height = 0, this.width = 0, this.x = 0, this.y = 0
},
Column = function e(a) {
_classCallCheck(this, e), this.dataKey = a, this.options = {}, this.styles = {}, this.contentWidth = 0, this.width = 0, this.x = 0
};
! function(a) {
a.fn.extend({
tableExport: function(b) {
function d(b) {
var c = [];
return a(b).find("thead").first().find("th").each(function(b, d) {
void 0 !== a(d).attr("data-field") && (c[b] = a(d).attr("data-field"))
}), c
}
function e(b, d, e, f, g) {
if (-1 == a.inArray(e, s.ignoreRow) && -1 == a.inArray(e - f, s.ignoreRow)) {
var h = a(b).filter(function() {
return "none" != a(this).data("tableexport-display") && (a(this).is(":visible") || "always" == a(this).data("tableexport-display") || "always" == a(this).closest("table").data("tableexport-display"))
}).find(d),
i = 0;
if (h.each(function(b) {
if ("always" == a(this).data("tableexport-display") || "none" != a(this).css("display") && "hidden" != a(this).css("visibility") && "none" != a(this).data("tableexport-display")) {
var c = b,
d = !1;
if (0 < s.ignoreColumn.length && ("string" == typeof s.ignoreColumn[0] ? A.length > c && "undefined" != typeof A[c] && -1 != a.inArray(A[c], s.ignoreColumn) && (d = !0) : "number" != typeof s.ignoreColumn[0] || -1 == a.inArray(c, s.ignoreColumn) && -1 == a.inArray(c - h.length, s.ignoreColumn) || (d = !0)), 0 == d && "function" == typeof g) {
var f, d = 0,
j = 0;
if ("undefined" != typeof y[e] && 0 < y[e].length)
for (c = 0; b >= c; c++) "undefined" != typeof y[e][c] && (g(null, e, c), delete y[e][c], b++);
for (a(this).is("[colspan]") && (d = parseInt(a(this).attr("colspan")), i += d > 0 ? d - 1 : 0), a(this).is("[rowspan]") && (j = parseInt(a(this).attr("rowspan"))), g(this, e, b), c = 0; d - 1 > c; c++) g(null, e, b + c);
if (j)
for (f = 1; j > f; f++)
for ("undefined" == typeof y[e + f] && (y[e + f] = []), y[e + f][b + i] = "", c = 1; d > c; c++) y[e + f][b + i - c] = ""
}
}
}), "undefined" != typeof y[e] && 0 < y[e].length)
for (c = 0; c <= y[e].length; c++) "undefined" != typeof y[e][c] && (g(null, e, c), delete y[e][c])
}
}
function f(a) {
if (!0 === s.consoleLog && console.log(a.output()), "string" === s.outputMode) return a.output();
if ("base64" === s.outputMode) return r(a.output());
try {
var b = a.output("blob");
saveAs(b, s.fileName + ".pdf")
} catch (c) {
q(s.fileName + ".pdf", "data:application/pdf;base64,", a.output())
}
}
function g(a, b, c) {
var d = 0;
if ("undefined" != typeof c && (d = c.colspan), d >= 0) {
for (var e = a.width, f = a.textPos.x, g = b.table.columns.indexOf(b.column), h = 1; d > h; h++) e += b.table.columns[g + h].width;
return d > 1 && ("right" === a.styles.halign ? f = a.textPos.x + e - a.width : "center" === a.styles.halign && (f = a.textPos.x + (e - a.width) / 2)), a.width = e, a.textPos.x = f, "undefined" != typeof c && 1 < c.rowspan && (a.height *= c.rowspan), ("middle" === a.styles.valign || "bottom" === a.styles.valign) && (c = ("string" == typeof a.text ? a.text.split(/\r\n|\r|\n/g) : a.text).length || 1, c > 2 && (a.textPos.y -= (2 - 1.15) / 2 * b.row.styles.fontSize * (c - 2) / 3)), !0
}
return !1
}
function h(b, c, d) {
c.each(function() {
var c = a(this).children();
if (a(this).is("div")) {
var e = m(o(this, "background-color"), [255, 255, 255]),
f = m(o(this, "border-top-color"), [0, 0, 0]),
g = p(this, "border-top-width", s.jspdf.unit),
i = this.getBoundingClientRect(),
j = this.offsetLeft * d.dw,
k = this.offsetTop * d.dh,
l = i.width * d.dw,
i = i.height * d.dh;
d.doc.setDrawColor.apply(void 0, f), d.doc.setFillColor.apply(void 0, e), d.doc.setLineWidth(g), d.doc.rect(b.x + j, b.y + k, l, i, g ? "FD" : "F")
}
"undefined" != typeof c && 0 < c.length && h(b, c, d)
})
}
function i(a, b, c) {
return a.replace(new RegExp(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"), "g"), c)
}
function j(a) {
return a = i(a || "0", s.numbers.html.decimalMark, "."), a = i(a, s.numbers.html.thousandsSeparator, ""), "number" == typeof a || !1 !== jQuery.isNumeric(a) ? a : !1
}
function k(b, c, d) {
var e = "";
if (null != b) {
b = a(b);
var f;
if (f = b[0].hasAttribute("data-tableexport-value") ? b.data("tableexport-value") : b.html(), "function" == typeof s.onCellHtmlData && (f = s.onCellHtmlData(b, c, d, f)), !0 === s.htmlContent) e = a.trim(f);
else {
var g = f.replace(/\n/g, "\u2028").replace(/<br\s*[\/]?>/gi, "");
if (f = a("<div/>").html(g).contents(), g = "", a.each(f.text().split("\u2028"), function(b, c) {
b > 0 && (g += " "), g += a.trim(c)
}), a.each(g.split(""), function(b, c) {
b > 0 && (e += "\n"), e += a.trim(c).replace(/\u00AD/g, "")
}), (s.numbers.html.decimalMark != s.numbers.output.decimalMark || s.numbers.html.thousandsSeparator != s.numbers.output.thousandsSeparator) && (f = j(e), !1 !== f)) {
var h = ("" + f).split(".");
1 == h.length && (h[1] = "");
var i = 3 < h[0].length ? h[0].length % 3 : 0,
e = (0 > f ? "-" : "") + (s.numbers.output.thousandsSeparator ? (i ? h[0].substr(0, i) + s.numbers.output.thousandsSeparator : "") + h[0].substr(i).replace(/(\d{3})(?=\d)/g, "$1" + s.numbers.output.thousandsSeparator) : h[0]) + (h[1].length ? s.numbers.output.decimalMark + h[1] : "")
}
}!0 === s.escape && (e = escape(e)), "function" == typeof s.onCellData && (e = s.onCellData(b, c, d, e))
}
return e
}
function l(a, b, c) {
return b + "-" + c.toLowerCase()
}
function m(a, b) {
var c = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(a),
d = b;
return c && (d = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])]), d
}
function n(b) {
var c = o(b, "text-align"),
d = o(b, "font-weight"),
e = o(b, "font-style"),
f = "";
return "start" == c && (c = "rtl" == o(b, "direction") ? "right" : "left"), d >= 700 && (f = "bold"), "italic" == e && (f += e), "" == f && (f = "normal"), c = {
style: {
align: c,
bcolor: m(o(b, "background-color"), [255, 255, 255]),
color: m(o(b, "color"), [0, 0, 0]),
fstyle: f
},
colspan: parseInt(a(b).attr("colspan")) || 0,
rowspan: parseInt(a(b).attr("rowspan")) || 0
}, null !== b && (b = b.getBoundingClientRect(), c.rect = {
width: b.width,
height: b.height
}), c
}
function o(a, b) {
try {
return window.getComputedStyle ? (b = b.replace(/([a-z])([A-Z])/, l), window.getComputedStyle(a, null).getPropertyValue(b)) : a.currentStyle ? a.currentStyle[b] : a.style[b]
} catch (c) {}
return ""
}
function p(a, b, c) {
if (b = o(a, b).match(/\d+/), null !== b) {
b = b[0], a = a.parentElement;
var d = document.createElement("div");
return d.style.overflow = "hidden", d.style.visibility = "hidden", a.appendChild(d), d.style.width = 100 + c, c = 100 / d.offsetWidth, a.removeChild(d), b * c
}
return 0
}
function q(a, b, c) {
var d = window.navigator.userAgent;
0 < d.indexOf("MSIE ") || d.match(/Trident.*rv\:11\./) ? (b = document.createElement("iframe")) && (document.body.appendChild(b), b.setAttribute("style", "display:none"), b.contentDocument.open("txt/html", "replace"), b.contentDocument.write(c), b.contentDocument.close(), b.focus(), b.contentDocument.execCommand("SaveAs", !0, a), document.body.removeChild(b)) : (d = document.createElement("a")) && (d.style.display = "none", d.download = a, d.href = 0 <= b.toLowerCase().indexOf("base64,") ? b + r(c) : b + encodeURIComponent(c), document.body.appendChild(d), document.createEvent ? (null == u && (u = document.createEvent("MouseEvents")), u.initEvent("click", !0, !1), d.dispatchEvent(u)) : document.createEventObject ? d.fireEvent("onclick") : "function" == typeof d.onclick && d.onclick(), document.body.removeChild(d))
}
function r(a) {
var b, c, d, e, f, g, h = "",
i = 0;
for (a = a.replace(/\x0d\x0a/g, "\n"), c = "", d = 0; d < a.length; d++) e = a.charCodeAt(d), 128 > e ? c += String.fromCharCode(e) : (e > 127 && 2048 > e ? c += String.fromCharCode(e >> 6 | 192) : (c += String.fromCharCode(e >> 12 | 224), c += String.fromCharCode(e >> 6 & 63 | 128)), c += String.fromCharCode(63 & e | 128));
for (a = c; i < a.length;) b = a.charCodeAt(i++), c = a.charCodeAt(i++), d = a.charCodeAt(i++), e = b >> 2, b = (3 & b) << 4 | c >> 4, f = (15 & c) << 2 | d >> 6, g = 63 & d, isNaN(c) ? f = g = 64 : isNaN(d) && (g = 64), h = h + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g);
return h
}
var s = {
consoleLog: !1,
csvEnclosure: '"',
csvSeparator: ",",
csvUseBOM: !0,
displayTableName: !1,
escape: !1,
excelstyles: [],
fileName: "tableExport",
htmlContent: !1,
ignoreColumn: [],
ignoreRow: [],
jsonScope: "all",
jspdf: {
orientation: "p",
unit: "pt",
format: "a4",
margins: {
left: 20,
right: 10,
top: 10,
bottom: 10
},
autotable: {
styles: {
cellPadding: 2,
rowHeight: 12,
fontSize: 8,
fillColor: 255,
textColor: 50,
fontStyle: "normal",
overflow: "ellipsize",
halign: "left",
valign: "middle"
},
headerStyles: {
fillColor: [52, 73, 94],
textColor: 255,
fontStyle: "bold",
halign: "center"
},
alternateRowStyles: {
fillColor: 245
},
tableExport: {
onAfterAutotable: null,
onBeforeAutotable: null,
onTable: null
}
}
},
numbers: {
html: {
decimalMark: ".",
thousandsSeparator: ","
},
output: {
decimalMark: ".",
thousandsSeparator: ","
}
},
onCellData: null,
onCellHtmlData: null,
outputMode: "file",
tbodySelector: "tr",
theadSelector: "tr",
tableName: "myTableName",
type: "csv",
worksheetName: "xlsWorksheetName"
},
t = this,
u = null,
v = [],
w = [],
x = 0,
y = [],
z = "",
A = [];
if (a.extend(!0, s, b), A = d(t), "csv" == s.type || "txt" == s.type) {
b = function(b, c, d, f) {
return w = a(t).find(b).first().find(c), w.each(function() {
z = "", e(this, d, x, f + w.length, function(a, b, c) {
var d = z,
e = "";
null != a && (a = k(a, b, c), b = null === a || "" == a ? "" : a.toString(), a instanceof Date ? e = s.csvEnclosure + a.toLocaleString() + s.csvEnclosure : (e = i(b, s.csvEnclosure, s.csvEnclosure + s.csvEnclosure), (0 <= e.indexOf(s.csvSeparator) || /[\r\n ]/g.test(e)) && (e = s.csvEnclosure + e + s.csvEnclosure))), z = d + (e + s.csvSeparator)
}), z = a.trim(z).substring(0, z.length - 1), 0 < z.length && (0 < B.length && (B += "\n"), B += z), x++
}), w.length
};
var B = "",
C = 0,
x = 0,
C = C + b("thead", s.theadSelector, "th,td", C),
C = C + b("tbody", s.tbodySelector, "td", C);
if (b("tfoot", s.tbodySelector, "td", C), B += "\n", !0 === s.consoleLog && console.log(B), "string" === s.outputMode) return B;
if ("base64" === s.outputMode) return r(B);
try {
var D = new Blob([B], {
type: "text/" + ("csv" == s.type ? "csv" : "plain") + ";charset=utf-8"
});
saveAs(D, s.fileName + "." + s.type, "csv" != s.type || !1 === s.csvUseBOM)
} catch (E) {
q(s.fileName + "." + s.type, "data:text/" + ("csv" == s.type ? "csv" : "plain") + ";charset=utf-8," + ("csv" == s.type && s.csvUseBOM ? "\ufeff" : ""), B)
}
} else if ("sql" == s.type) {
var x = 0,
F = "INSERT INTO `" + s.tableName + "` (",
v = a(t).find("thead").first().find(s.theadSelector);
if (v.each(function() {
e(this, "th,td", x, v.length, function(a, b, c) {
F += "'" + k(a, b, c) + "',"
}), x++, F = a.trim(F), F = a.trim(F).substring(0, F.length - 1)
}), F += ") VALUES ", w = a(t).find("tbody").first().find(s.tbodySelector), w.each(function() {
z = "", e(this, "td", x, v.length + w.length, function(a, b, c) {
z += "'" + k(a, b, c) + "',"
}), 3 < z.length && (F += "(" + z, F = a.trim(F).substring(0, F.length - 1), F += "),"), x++
}), F = a.trim(F).substring(0, F.length - 1), F += ";", !0 === s.consoleLog && console.log(F), "string" === s.outputMode) return F;
if ("base64" === s.outputMode) return r(F);
try {
D = new Blob([F], {
type: "text/plain;charset=utf-8"
}), saveAs(D, s.fileName + ".sql")
} catch (E) {
q(s.fileName + ".sql", "data:application/sql;charset=utf-8,", F)
}
} else if ("json" == s.type) {
var G = [],
v = a(t).find("thead").first().find(s.theadSelector);
v.each(function() {
var a = [];
e(this, "th,td", x, v.length, function(b, c, d) {
a.push(k(b, c, d))
}), G.push(a)
});
var H = [],
w = a(t).find("tbody").first().find(s.tbodySelector);
if (w.each(function() {
var b = {},
c = 0;
e(this, "td", x, v.length + w.length, function(a, d, e) {
G.length ? b[G[G.length - 1][c]] = k(a, d, e) : b[c] = k(a, d, e), c++
}), 0 == a.isEmptyObject(b) && H.push(b), x++
}), b = "", b = JSON.stringify("head" == s.jsonScope ? G : "data" == s.jsonScope ? H : {
header: G,
data: H
}), !0 === s.consoleLog && console.log(b), "string" === s.outputMode) return b;
if ("base64" === s.outputMode) return r(b);
try {
D = new Blob([b], {
type: "application/json;charset=utf-8"
}), saveAs(D, s.fileName + ".json")
} catch (E) {
q(s.fileName + ".json", "data:application/json;charset=utf-8;base64,", b)
}
} else if ("xml" === s.type) {
var x = 0,
I = '<?xml version="1.0" encoding="utf-8"?>',
I = I + "<tabledata><fields>",
v = a(t).find("thead").first().find(s.theadSelector);
v.each(function() {
e(this, "th,td", x, w.length, function(a, b, c) {
I += "<field>" + k(a, b, c) + "</field>"
}), x++
});
var I = I + "</fields><data>",
J = 1,
w = a(t).find("tbody").first().find(s.tbodySelector);
if (w.each(function() {
var a = 1;
z = "", e(this, "td", x, v.length + w.length, function(b, c, d) {
z += "<column-" + a + ">" + k(b, c, d) + "</column-" + a + ">", a++
}), 0 < z.length && "<column-1></column-1>" != z && (I += '<row id="' + J + '">' + z + "</row>", J++), x++
}), I += "</data></tabledata>", !0 === s.consoleLog && console.log(I), "string" === s.outputMode) return I;
if ("base64" === s.outputMode) return r(I);
try {
D = new Blob([I], {
type: "application/xml;charset=utf-8"
}), saveAs(D, s.fileName + ".xml")
} catch (E) {
q(s.fileName + ".xml", "data:application/xml;charset=utf-8;base64,", I)
}
} else if ("excel" == s.type || "xls" == s.type || "word" == s.type || "doc" == s.type) {
b = "excel" == s.type || "xls" == s.type ? "excel" : "word";
var C = "excel" == b ? "xls" : "doc",
K = "xls" == C ? 'xmlns:x="urn:schemas-microsoft-com:office:excel"' : 'xmlns:w="urn:schemas-microsoft-com:office:word"',
L = "";
var lead_zero_chk = ["EMPLOYEE CODE","BANK ACCOUNT NUMBER","UAN NUMBER","PF ACCOUNT NUMBER","IFSC CODE"];
var lead_zero = [];
if (a(t).filter(function() {
return "none" != a(this).data("tableexport-display") && (a(this).is(":visible") || "always" == a(this).data("tableexport-display"))
}).each(function() {
x = 0, A = d(this), L += "<table><thead>", v = a(this).find("thead").first().find(s.theadSelector), v.each(function() {
z = "", e(this, "th,td", x, v.length, function(b, c, d) {
if (null != b) {
var e = "";
z += "<th";
for (var f in s.excelstyles)
if (s.excelstyles.hasOwnProperty(f)) {
var g = a(b).css(s.excelstyles[f]);
"" != g && "0px none rgb(0, 0, 0)" != g && ("" == e && (e = 'style="'), e += s.excelstyles[f] + ":" + g + ";")
}
"" != e && (z += " " + e + '"'), a(b).is("[colspan]") && (z += ' colspan="' + a(b).attr("colspan") + '"'), a(b).is("[rowspan]") && (z += ' rowspan="' + a(b).attr("rowspan") + '"'), z += ">" + k(b, c, d) + "</th>"
th_name = k(b, c, d);
var th_name = th_name.toUpperCase();
if(jQuery.inArray(th_name, lead_zero_chk) !== -1){
//alert(th_name + " , b ::"+ b + " , c::"+ c + " , d::"+ d);
lead_zero.push(d);
}
}
}), 0 < z.length && (L += "<tr>" + z + "</tr>"), x++
}), L += "</thead><tbody>", w = a(this).find("tbody").first().find(s.tbodySelector), w.each(function() {
z = "", e(this, "td", x, v.length + w.length, function(b, c, d) {
if (null != b) {
var e = "";
if(jQuery.inArray(d, lead_zero) !== -1){
z += "<td class='text'";
}else{
z += "<td";
}
/*
if(Leading_zero === 1){
z += "<td class='text'";
}else{
z += "<td";
} */
for (var f in s.excelstyles)
if (s.excelstyles.hasOwnProperty(f)) {
var g = a(b).css(s.excelstyles[f]);
"" != g && "0px none rgb(0, 0, 0)" != g && ("" == e && (e = 'style="'), e += s.excelstyles[f] + ":" + g + ";")
}
"" != e && (z += " " + e + '"'), a(b).is("[colspan]") && (z += ' colspan="' + a(b).attr("colspan") + '"'), a(b).is("[rowspan]") && (z += ' rowspan="' + a(b).attr("rowspan") + '"'), z += ">" + k(b, c, d) + "</td>"
}
}), 0 < z.length && (L += "<tr>" + z + "</tr>"), x++
}), s.displayTableName && (L += "<tr><td></td></tr><tr><td></td></tr><tr><td>" + k(a("<p>" + s.tableName + "</p>")) + "</td></tr>"), L += "</tbody></table>", !0 === s.consoleLog && console.log(L)
}), K = '<html xmlns:o="urn:schemas-microsoft-com:office:office" ' + K + ' xmlns="http://www.w3.org/TR/REC-html40">' + ('<meta http-equiv="content-type" content="application/vnd.ms-' + b + '; charset=UTF-8">'), K += "<head>", "excel" === b && (K += "<!--[if gte mso 9]>", K += "<xml>", K += "<x:ExcelWorkbook>", K += "<x:ExcelWorksheets>", K += "<x:ExcelWorksheet>", K += "<x:Name>", K += s.worksheetName, K += "</x:Name>", K += "<x:WorksheetOptions>", K += "<x:DisplayGridlines/>", K += "</x:WorksheetOptions>", K += "</x:ExcelWorksheet>", K += "</x:ExcelWorksheets>", K += "</x:ExcelWorkbook>", K += "</xml>", K += "<![endif]-->"), K += "</head>", K += "<body> <style>.num {mso-number-format:General;}.text{mso-number-format:'\@';}</style>", K += L, K += "</body>", K += "</html>", !0 === s.consoleLog && console.log(K), "string" === s.outputMode) return K;
if ("base64" === s.outputMode) return r(K);
try {
D = new Blob([K], {
type: "application/vnd.ms-" + s.type
}), saveAs(D, s.fileName + "." + C)
} catch (E) {
q(s.fileName + "." + C, "data:application/vnd.ms-" + b + ";base64,", K)
}
} else if ("png" == s.type) html2canvas(a(t)[0], {
allowTaint: !0,
background: "#fff",
onrendered: function(a) {
a = a.toDataURL(), a = a.substring(22);
for (var b = atob(a), c = new ArrayBuffer(b.length), d = new Uint8Array(c), e = 0; e < b.length; e++) d[e] = b.charCodeAt(e);
if (!0 === s.consoleLog && console.log(b), "string" === s.outputMode) return b;
if ("base64" === s.outputMode) return r(a);
try {
var f = new Blob([c], {
type: "image/png"
});
saveAs(f, s.fileName + ".png")
} catch (g) {
q(s.fileName + ".png", "data:image/png;base64,", a)
}
}
});
else if ("pdf" == s.type)
if (!1 === s.jspdf.autotable) {
var D = {
dim: {
w: p(a(t).first().get(0), "width", "mm"),
h: p(a(t).first().get(0), "height", "mm")
},
pagesplit: !1
},
M = new jsPDF(s.jspdf.orientation, s.jspdf.unit, s.jspdf.format);
M.addHTML(a(t).first(), s.jspdf.margins.left, s.jspdf.margins.top, D, function() {
f(M)
})
} else {
var N = s.jspdf.autotable.tableExport;
if ("string" == typeof s.jspdf.format && "bestfit" === s.jspdf.format.toLowerCase()) {
var O = {
a0: [2383.94, 3370.39],
a1: [1683.78, 2383.94],
a2: [1190.55, 1683.78],
a3: [841.89, 1190.55],
a4: [595.28, 841.89]
},
P = "",
Q = "",
R = 0;
a(t).filter(":visible").each(function() {
if ("none" != a(this).css("display")) {
var b = p(a(this).get(0), "width", "pt");
if (b > R) {
b > O.a0[0] && (P = "a0", Q = "l");
for (var c in O) O.hasOwnProperty(c) && O[c][1] > b && (P = c, Q = "l", O[c][0] > b && (Q = "p"));
R = b
}
}
}), s.jspdf.format = "" == P ? "a4" : P, s.jspdf.orientation = "" == Q ? "w" : Q
}
N.doc = new jsPDF(s.jspdf.orientation, s.jspdf.unit, s.jspdf.format), a(t).filter(function() {
return "none" != a(this).data("tableexport-display") && (a(this).is(":visible") || "always" == a(this).data("tableexport-display"))
}).each(function() {
var b, c = 0;
if (A = d(this), N.columns = [], N.rows = [], N.rowoptions = {}, "function" == typeof N.onTable && !1 === N.onTable(a(this), s)) return !0;
s.jspdf.autotable.tableExport = null;
var f = a.extend(!0, {}, s.jspdf.autotable);
s.jspdf.autotable.tableExport = N, f.margin = {}, a.extend(!0, f.margin, s.jspdf.margins), f.tableExport = N, "function" != typeof f.beforePageContent && (f.beforePageContent = function(a) {
1 == a.pageCount && a.table.rows.concat(a.table.headerRow).forEach(function(b) {
0 < b.height && (b.height += (2 - 1.15) / 2 * b.styles.fontSize, a.table.height += (2 - 1.15) / 2 * b.styles.fontSize)
})
}), "function" != typeof f.createdHeaderCell && (f.createdHeaderCell = function(b, c) {
if (b.styles = a.extend({}, c.row.styles), "undefined" != typeof N.columns[c.column.dataKey]) {
var d = N.columns[c.column.dataKey];
if ("undefined" != typeof d.rect) {
var e;
b.contentWidth = d.rect.width, ("undefined" == typeof N.heightRatio || 0 == N.heightRatio) && (e = c.row.raw[c.column.dataKey].rowspan ? c.row.raw[c.column.dataKey].rect.height / c.row.raw[c.column.dataKey].rowspan : c.row.raw[c.column.dataKey].rect.height, N.heightRatio = b.styles.rowHeight / e), e = c.row.raw[c.column.dataKey].rect.height * N.heightRatio, e > b.styles.rowHeight && (b.styles.rowHeight = e)
}
"undefined" != typeof d.style && !0 !== d.style.hidden && (b.styles.halign = d.style.align, "inherit" === f.styles.fillColor && (b.styles.fillColor = d.style.bcolor), "inherit" === f.styles.textColor && (b.styles.textColor = d.style.color), "inherit" === f.styles.fontStyle && (b.styles.fontStyle = d.style.fstyle))
}
}), "function" != typeof f.createdCell && (f.createdCell = function(a, b) {
var c = N.rowoptions[b.row.index + ":" + b.column.dataKey];
"undefined" != typeof c && "undefined" != typeof c.style && !0 !== c.style.hidden && (a.styles.halign = c.style.align, "inherit" === f.styles.fillColor && (a.styles.fillColor = c.style.bcolor), "inherit" === f.styles.textColor && (a.styles.textColor = c.style.color), "inherit" === f.styles.fontStyle && (a.styles.fontStyle = c.style.fstyle))
}), "function" != typeof f.drawHeaderCell && (f.drawHeaderCell = function(a, b) {
var c = N.columns[b.column.dataKey];
return (1 != c.style.hasOwnProperty("hidden") || !0 !== c.style.hidden) && 0 <= c.rowIndex ? g(a, b, c) : !1
}), "function" != typeof f.drawCell && (f.drawCell = function(a, b) {
var c = N.rowoptions[b.row.index + ":" + b.column.dataKey];
if (g(a, b, c)) {
if (N.doc.rect(a.x, a.y, a.width, a.height, a.styles.fillStyle), "undefined" != typeof c && "undefined" != typeof c.kids && 0 < c.kids.length) {
var d = a.height / c.rect.height;
(d > N.dh || "undefined" == typeof N.dh) && (N.dh = d), N.dw = a.width / c.rect.width, h(a, c.kids, N)
}
N.doc.autoTableText(a.text, a.textPos.x, a.textPos.y, {
halign: a.styles.halign,
valign: a.styles.valign
})
}
return !1
}), N.headerrows = [], v = a(this).find("thead").find(s.theadSelector), v.each(function() {
b = 0, N.headerrows[c] = [], e(this, "th,td", c, v.length, function(a, d, e) {
var f = n(a);
f.title = k(a, d, e), f.key = b++, f.rowIndex = c, N.headerrows[c].push(f)
}), c++
}), c > 0 && a.each(N.headerrows[c - 1], function() {
obj = c > 1 && null == this.rect ? N.headerrows[c - 2][this.key] : this, null != obj && N.columns.push(obj)
});
var i = 0;
w = a(this).find("tbody").find(s.tbodySelector), w.each(function() {
var d = [];
b = 0, e(this, "td", c, v.length + w.length, function(c, e, f) {
if ("undefined" == typeof N.columns[b]) {
var g = {
title: "",
key: b,
style: {
hidden: !0
}
};
N.columns.push(g)
}
"undefined" != typeof c && null != c ? (g = n(c), g.kids = a(c).children()) : (g = a.extend(!0, {}, N.rowoptions[i + ":" + (b - 1)]), g.colspan = -1), N.rowoptions[i + ":" + b++] = g, d.push(k(c, e, f))
}), d.length && (N.rows.push(d), i++), c++
}), "function" == typeof N.onBeforeAutotable && N.onBeforeAutotable(a(this), N.columns, N.rows, f), N.doc.autoTable(N.columns, N.rows, f), "function" == typeof N.onAfterAutotable && N.onAfterAutotable(a(this), f), s.jspdf.autotable.startY = N.doc.autoTableEndPosY() + f.margin.top
}), f(N.doc), "undefined" != typeof N.headerrows && (N.headerrows.length = 0), "undefined" != typeof N.columns && (N.columns.length = 0), "undefined" != typeof N.rows && (N.rows.length = 0), delete N.doc, N.doc = null
}
return this
}
})
}(jQuery),
function(a) {
a.expr[":"].linkingToImage = function(b, c, d) {
return !(!a(b).attr(d[3]) || !a(b).attr(d[3]).match(/\.(gif|jpe?g|png|bmp)$/i))
}, a.fn.imgPreview = function(b) {
function c(a) {
return a && a.replace(/(\/?)([^\/]+)$/, "$1" + d.thumbPrefix + "$2")
}
var d = a.extend({
imgCSS: {},
distanceFromCursor: {
top: 10,
left: 10
},
preloadImages: !0,
onShow: function() {},
onHide: function() {},
onLoad: function() {},
containerID: "imgPreviewContainer",
containerLoadingClass: "loading",
thumbPrefix: "",
srcAttr: "href"
}, b),
e = a("<div/>").attr("id", d.containerID).append("<img/>").hide().css("position", "absolute").appendTo("body"),
f = a("img", e).css(d.imgCSS),
g = this.filter(":linkingToImage(" + d.srcAttr + ")");
return d.preloadImages && ! function(b) {
var e = new Image,
f = arguments.callee,
h = a(g[b]).attr(d.srcAttr);
h && (e.src = c(h), e.onload = function() {
g[b + 1] && f(b + 1)
})
}(0), g.mousemove(function(a) {
e.css({
top: a.pageY + d.distanceFromCursor.top + "px",
left: a.pageX + d.distanceFromCursor.left + "px"
})
}).hover(function() {
var b = this;
e.addClass(d.containerLoadingClass).show(), f.load(function() {
e.removeClass(d.containerLoadingClass), f.show(), d.onLoad.call(f[0], b)
}).attr("src", c(a(b).attr(d.srcAttr))), d.onShow.call(e[0], b)
}, function() {
e.hide(), f.unbind("load").attr("src", "").hide(), d.onHide.call(e[0], this)
}), this
}
}(jQuery),
function(a, b) {
var c, d, e = function() {
d.close()
},
f = function() {
return c
},
g = function(a) {
return function(e) {
c = a, d = e, "submit" == a && b("form", e.$modalBody).first().submit()
}
},
h = {
submit: "btn-primary",
"delete": "btn-danger"
},
i = function(a) {
var c = function() {
var a = [],
c = "modal-dlg";
return b.each(b(this).attr("class").split(/\s+/), function(a, b) {
var d = b.split("modal-dlg-");
d && d.length > 1 && (c = b)
}), b.each(b(this).data(), function(b, c) {
var d = b.split("btn");
if (d && d.length > 1) {
var e = d[1].toLowerCase(),
f = "submit" == e;
a.push({
id: e,
label: c,
cssClass: h[e],
hotkey: f ? 13 : void 0,
action: g(e)
})
}
}), !a.length && a.push({
id: "close",
label: lang.line("common_close"),
cssClass: "btn-primary",
action: function(a) {
a.close()
}
}), {
buttons: a.sort(function(a, c) {
return b(c).text() < b(a).text() ? -1 : 1
}),
cssClass: c
}
};
b(a).each(function() {
return b(a).off("click").on("click", function(a) {
var d = b(a.target);
return d = d.is("a, button") ? d : d.parents("a, button"), BootstrapDialog.show(b.extend({
title: d.attr("title"),
message: function() {
var a = b("<div></div>");
return b.get(d.attr("href") || d.data("href"), function(b) {
a.html(b)
}), a
}
}, c.call(this, a))), !1
})
})
};
b.extend(a, {
init: i,
submit: g,
hide: e,
clicked_id: f
})
}(window.dialog_support = window.dialog_support || {}, jQuery),
function(a, b) {
var c, d = function(a) {
return function() {
var c = 0 == g().length;
b("#toolbar button:not(.dropdown-toggle)").attr("disabled", c), "function" == typeof a && a()
}
},
e = function() {
return b(c.table_name).data("bootstrap.table")
},
f = function() {
return b.map(e().getSelections(), function(a) {
return "-" !== a[c.uniqueId || "id"] ? a[c.uniqueId || "id"] : null
})
},
g = function() {
return b(c.table_name+" td input:checkbox:checked").parents("tr")
},
h = function(a) {
return "tr[data-uniqueid='" + a + "']"
},
i = function(a) {
var c = [];
return a = a instanceof Array ? a : ("" + a).split(":"), b.each(a, function(a, b) {
c.push(h(b))
}), c
},
j = function(a, c) {
b(i(a)).each(function(a, d) {
var e = b(d).css("backgroundColor");
b(d).find("td").animate({
backgroundColor: "#eac7c7"
}, "slow", "linear").animate({
backgroundColor: "#eac7c7"
}, 5e3).animate({
backgroundColor: e
}, "slow", "linear")
})
},
k = function(a, i) {
return confirm(b.fn.bootstrapTable.defaults.formatConfirmDelete()) ? void b.post((a || c.resource) + "/delete", {
"ids[]": i || f()
}, function(a) {
if (a.success) {
var j = i ? h(i) : g();
e().collapseAllRows(), b(j).each(function(a) {
b(this).find("td").animate({
backgroundColor: "#eac7c7"
}, 1200, "linear").end().animate({
opacity: 0
}, 1200, "linear", function() {
e().remove({
field: c.uniqueId,
values: f()
}), a == b(j).length - 1 && (p(), d())
})
}), b.notify(a.message, {
type: "success"
})
} else b.notify(a.message, {
type: "danger"
})
}, "json") : !1
},
l = function(a) {
return function(b) {
"function" == typeof c.load_callback && c.load_callback(), c.load_callback = void 0, dialog_support.init("a.modal-dlg"), "function" == typeof a && a.call(this, b)
}
},
m = function() {
if (localStorage[c.employee_id]) {
var a = JSON.parse(localStorage[c.employee_id]);
a[c.resource] && b.each(a[c.resource], function(a, b) {
b ? e().showColumn(a) : e().hideColumn(a)
})
}
},
n = function(a) {
c = a, d = d(c.enableActions), b(c.table_name || "#table").bootstrapTable(b.extend(c, {
columns: c.headers,
url: c.resource + "/search",
sidePagination: "server",
pageSize: c.pageSize,
striped: !0,
pagination: !0,
search: c.resource || !1,
showColumns: !0,
clickToSelect: !0,
showExport: !0,
exportOptions: {
fileName: c.resource.replace(/.*\/(.*?)$/g, "$1")
},
onPageChange: l(c.onLoadSuccess),
toolbar: "#toolbar",
uniqueId: c.uniqueId || "id",
table_name: c.table_name || "#table",
onCheck: d,
onUncheck: d,
onCheckAll: d,
onUncheckAll: d,
onLoadSuccess: l(c.onLoadSuccess),
onColumnSwitch: function(a, b) {
var d = localStorage[c.employee_id];
d = d && JSON.parse(d) || {}, d[c.resource] = d[c.resource] || {}, d[c.resource][a] = b, localStorage[c.employee_id] = JSON.stringify(d)
},
queryParamsType: "limit",
iconSize: "sm",
silentSort: !0,
paginationVAlign: "bottom",
escape: !1
})), d(), o(), m(), dialog_support.init("button.modal-dlg")
},
o = function() {
b("#delete").click(function() {
k()
})
},
p = function() {
e().refresh()
},
q = function(a) {
return function(f, g) {
var h = g.id;
if (g.success) {
var k = g.message,
l = i(g.id),
m = b(l.join(",")).length;
if (m > 0 && 15 > m) {
var n = g.id.split(":");
b.get({
url: [a || f + "/get_row", h].join("/"),
success: function(a) {
b.each(l, function(c, d) {
var f = b(d).data("uniqueid");
e().updateByUniqueId({
id: f,
row: a[f] || a
})
}), dialog_support.init("a.modal-dlg"), j(n)
},
dataType: "json"
})
} else c.load_callback = function() {
d(), j(h)
}, p();
b.notify(k, {
type: "success"
})
} else b.notify(g.message, {
type: "danger"
})
}
},
r = q();
b.extend(a, {
submit_handler: function(a) {
this.handle_submit = q(a)
},
handle_submit: r,
init: n,
do_delete: k,
refresh: p,
selected_ids: f
})
}(window.table_support = window.table_support || {}, jQuery),
function(a, b) {
a.error = {
errorClass: "has-error",
errorLabelContainer: "#error_message_box",
wrapper: "li",
highlight: function(a) {
b(a).closest(".form-group").addClass("has-error")
},
unhighlight: function(a) {
b(a).closest(".form-group").removeClass("has-error")
}
}, a.handler = b.extend({
submitHandler: function(a) {
b(a).ajaxSubmit({
success: function(a) {
b.notify(a.message, {
type: a.success ? "success" : "danger"
})
},
dataType: "json"
})
},
rules: {},
messages: {}
}, a.error)
}(window.form_support = window.form_support || {}, jQuery),
function(a) {
function b(a) {
return document.location.protocol + "//" + a
}
var c = b("nominatim.openstreetmap.org/search"),
d = function(b) {
return function(c, d) {
var e = d.item.results;
if (null != e && e.length > 0) {
for (var f in b) a("#" + b[f]).val(e[f]);
return !1
}
return !0
}
},
e = function(b, c) {
var d = function(b, c) {
var d = [];
return a.each(b.split("|"), function(b, e) {
c[e] && d.length < 2 && -1 === a.inArray(c[e], d) && d.push(c[e])
}), d[0] + (d[1] ? " (" + d[1] + ")" : "")
};
return function(e) {
var f = [];
return a.each(e, function(e, g) {
var h = [],
i = g.address;
a.each(c, function(a, b) {
h.push(d(b, i))
}), f[e] = {
label: h.join(", "),
results: h,
value: i[b]
}
}), f
}
},
f = function(b) {
var f = function(c, d, e) {
return function() {
var f = {
format: "json",
limit: 5,
addressdetails: 1,
countrycodes: b.country_codes,
"accept-language": e || navigator.language
};
return f[d || c] = a("#" + c).val(), f
}
};
a.each(b.fields, function(g, h) {
var i = d(h.dependencies);
a("#" + g).autocomplete({
source: function(d, i) {
var j = f(g, h.response && h.response.field, b.language),
k = {
q: d.term
};
a.each(b.extra_params, function(a, b) {
k[a] = "function" == typeof b ? b() : b
}), a.ajax({
type: "GET",
url: c,
dataType: "json",
data: a.extend(k, j()),
success: function(b) {
i(a.map(b, function() {
return e(g, h.response && h.response.format || h.dependencies)(b)
}))
}
})
},
minChars: 3,
delay: 500,
appendTo: ".modal-content",
select: i
})
})
},
g = {
init: f
};
window.nominatim = g
}(jQuery);